// // Copyright 2020 FoxyUtils ehf. All rights reserved. // // This is a commercial product and requires a license to operate. // A trial license can be obtained at https://unidoc.io // // DO NOT EDIT: generated by unitwist Go source code obfuscator. // // Use of this source code is governed by the UniDoc End User License Agreement // terms that can be accessed at https://unidoc.io/eula/ package basic ;import _g "github.com/unidoc/unipdf/v3/internal/jbig2/errors";func (_gb *Stack )Pop ()(_ag interface{},_db bool ){_ag ,_db =_gb .peek ();if !_db {return nil ,_db ;};_gb .Data =_gb .Data [:_gb .top ()];return _ag ,true ;};func NewNumSlice (i int )*NumSlice {_bfe :=NumSlice (make ([]float32 ,i )); return &_bfe };type Stack struct{Data []interface{};Aux *Stack ;};func (_cd NumSlice )Get (i int )(float32 ,error ){if i < 0||i > len (_cd )-1{return 0,_g .Errorf ("\u004e\u0075\u006dS\u006c\u0069\u0063\u0065\u002e\u0047\u0065\u0074","\u0069n\u0064\u0065\u0078\u003a\u0020\u0027\u0025\u0064\u0027\u0020\u006fu\u0074\u0020\u006f\u0066\u0020\u0072\u0061\u006e\u0067\u0065",i ); };return _cd [i ],nil ;};func (_cde *Stack )Push (v interface{}){_cde .Data =append (_cde .Data ,v )};type NumSlice []float32 ;func Abs (v int )int {if v > 0{return v ;};return -v ;};func (_bg IntSlice )Get (index int )(int ,error ){if index > len (_bg )-1{return 0,_g .Errorf ("\u0049\u006e\u0074S\u006c\u0069\u0063\u0065\u002e\u0047\u0065\u0074","\u0069\u006e\u0064\u0065x:\u0020\u0025\u0064\u0020\u006f\u0075\u0074\u0020\u006f\u0066\u0020\u0072\u0061\u006eg\u0065",index ); };return _bg [index ],nil ;};func Ceil (numerator ,denominator int )int {if numerator %denominator ==0{return numerator /denominator ;};return (numerator /denominator )+1;};func (_ef *Stack )peek ()(interface{},bool ){_ed :=_ef .top ();if _ed ==-1{return nil ,false ; };return _ef .Data [_ed ],true ;};func Max (x ,y int )int {if x > y {return x ;};return y ;};type IntSlice []int ;func (_fe *IntSlice )Copy ()*IntSlice {_fb :=IntSlice (make ([]int ,len (*_fe )));copy (_fb ,*_fe );return &_fb ;};func (_bf *IntSlice )Add (v int )error {if _bf ==nil {return _g .Error ("\u0049\u006e\u0074S\u006c\u0069\u0063\u0065\u002e\u0041\u0064\u0064","\u0073\u006c\u0069\u0063\u0065\u0020\u006e\u006f\u0074\u0020\u0064\u0065f\u0069\u006e\u0065\u0064"); };*_bf =append (*_bf ,v );return nil ;};func (_cf NumSlice )GetInt (i int )(int ,error ){const _ff ="\u0047\u0065\u0074\u0049\u006e\u0074";if i < 0||i > len (_cf )-1{return 0,_g .Errorf (_ff ,"\u0069n\u0064\u0065\u0078\u003a\u0020\u0027\u0025\u0064\u0027\u0020\u006fu\u0074\u0020\u006f\u0066\u0020\u0072\u0061\u006e\u0067\u0065",i ); };_bef :=_cf [i ];return int (_bef +Sign (_bef )*0.5),nil ;};func (_be IntsMap )Delete (key uint64 ){delete (_be ,key )};func (_ad *Stack )Peek ()(_fc interface{},_fcc bool ){return _ad .peek ()};func (_dg *NumSlice )AddInt (v int ){*_dg =append (*_dg ,float32 (v ))}; func (_ge *NumSlice )Add (v float32 ){*_ge =append (*_ge ,v )};func (_bgf NumSlice )GetIntSlice ()[]int {_fa :=make ([]int ,len (_bgf ));for _ee ,_cfg :=range _bgf {_fa [_ee ]=int (_cfg );};return _fa ;};func (_da *Stack )top ()int {return len (_da .Data )-1}; func (_bed IntSlice )Size ()int {return len (_bed )};func Sign (v float32 )float32 {if v >=0.0{return 1.0;};return -1.0;};func NewIntSlice (i int )*IntSlice {_f :=IntSlice (make ([]int ,i ));return &_f };func (_c IntsMap )Get (key uint64 )(int ,bool ){_dc ,_e :=_c [key ]; if !_e {return 0,false ;};if len (_dc )==0{return 0,false ;};return _dc [0],true ;};func (_a IntsMap )GetSlice (key uint64 )([]int ,bool ){_bb ,_cg :=_a [key ];if !_cg {return nil ,false ;};return _bb ,true ;};func (_b IntsMap )Add (key uint64 ,value int ){_b [key ]=append (_b [key ],value )}; func (_cdf *Stack )Len ()int {return len (_cdf .Data )};type IntsMap map[uint64 ][]int ;func Min (x ,y int )int {if x < y {return x ;};return y ;};