jspdf.es.min.js 533 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971
  1. var Nf = Object.defineProperty;
  2. var Lf = (n, e, t) => e in n ? Nf(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
  3. var xe = (n, e, t) => Lf(n, typeof e != "symbol" ? e + "" : e, t);
  4. import { dx as Se } from "./index2.js";
  5. var tr = Uint8Array, Rn = Uint16Array, Ko = Int32Array, Xo = new tr([
  6. 0,
  7. 0,
  8. 0,
  9. 0,
  10. 0,
  11. 0,
  12. 0,
  13. 0,
  14. 1,
  15. 1,
  16. 1,
  17. 1,
  18. 2,
  19. 2,
  20. 2,
  21. 2,
  22. 3,
  23. 3,
  24. 3,
  25. 3,
  26. 4,
  27. 4,
  28. 4,
  29. 4,
  30. 5,
  31. 5,
  32. 5,
  33. 5,
  34. 0,
  35. /* unused */
  36. 0,
  37. 0,
  38. /* impossible */
  39. 0
  40. ]), $o = new tr([
  41. 0,
  42. 0,
  43. 0,
  44. 0,
  45. 1,
  46. 1,
  47. 2,
  48. 2,
  49. 3,
  50. 3,
  51. 4,
  52. 4,
  53. 5,
  54. 5,
  55. 6,
  56. 6,
  57. 7,
  58. 7,
  59. 8,
  60. 8,
  61. 9,
  62. 9,
  63. 10,
  64. 10,
  65. 11,
  66. 11,
  67. 12,
  68. 12,
  69. 13,
  70. 13,
  71. /* unused */
  72. 0,
  73. 0
  74. ]), Bl = new tr([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), Ku = function(n, e) {
  75. for (var t = new Rn(31), i = 0; i < 31; ++i)
  76. t[i] = e += 1 << n[i - 1];
  77. for (var s = new Ko(t[30]), i = 1; i < 30; ++i)
  78. for (var a = t[i]; a < t[i + 1]; ++a)
  79. s[a] = a - t[i] << 5 | i;
  80. return { b: t, r: s };
  81. }, Xu = Ku(Xo, 2), Sf = Xu.b, To = Xu.r;
  82. Sf[28] = 258, To[258] = 28;
  83. var kf = Ku($o, 0), Ml = kf.r, Do = new Rn(32768);
  84. for (var Oe = 0; Oe < 32768; ++Oe) {
  85. var Kr = (Oe & 43690) >> 1 | (Oe & 21845) << 1;
  86. Kr = (Kr & 52428) >> 2 | (Kr & 13107) << 2, Kr = (Kr & 61680) >> 4 | (Kr & 3855) << 4, Do[Oe] = ((Kr & 65280) >> 8 | (Kr & 255) << 8) >> 1;
  87. }
  88. var Ca = function(n, e, t) {
  89. for (var i = n.length, s = 0, a = new Rn(e); s < i; ++s)
  90. n[s] && ++a[n[s] - 1];
  91. var c = new Rn(e);
  92. for (s = 1; s < e; ++s)
  93. c[s] = c[s - 1] + a[s - 1] << 1;
  94. var l;
  95. if (t) {
  96. l = new Rn(1 << e);
  97. var f = 15 - e;
  98. for (s = 0; s < i; ++s)
  99. if (n[s])
  100. for (var d = s << 4 | n[s], m = e - n[s], _ = c[n[s] - 1]++ << m, k = _ | (1 << m) - 1; _ <= k; ++_)
  101. l[Do[_] >> f] = d;
  102. } else
  103. for (l = new Rn(i), s = 0; s < i; ++s)
  104. n[s] && (l[s] = Do[c[n[s] - 1]++] >> 15 - n[s]);
  105. return l;
  106. }, xi = new tr(288);
  107. for (var Oe = 0; Oe < 144; ++Oe)
  108. xi[Oe] = 8;
  109. for (var Oe = 144; Oe < 256; ++Oe)
  110. xi[Oe] = 9;
  111. for (var Oe = 256; Oe < 280; ++Oe)
  112. xi[Oe] = 7;
  113. for (var Oe = 280; Oe < 288; ++Oe)
  114. xi[Oe] = 8;
  115. var Is = new tr(32);
  116. for (var Oe = 0; Oe < 32; ++Oe)
  117. Is[Oe] = 5;
  118. var Pf = /* @__PURE__ */ Ca(xi, 9, 0), If = /* @__PURE__ */ Ca(Is, 5, 0), $u = function(n) {
  119. return (n + 7) / 8 | 0;
  120. }, Ff = function(n, e, t) {
  121. return (t == null || t > n.length) && (t = n.length), new tr(n.subarray(e, t));
  122. }, Er = function(n, e, t) {
  123. t <<= e & 7;
  124. var i = e / 8 | 0;
  125. n[i] |= t, n[i + 1] |= t >> 8;
  126. }, Ia = function(n, e, t) {
  127. t <<= e & 7;
  128. var i = e / 8 | 0;
  129. n[i] |= t, n[i + 1] |= t >> 8, n[i + 2] |= t >> 16;
  130. }, vo = function(n, e) {
  131. for (var t = [], i = 0; i < n.length; ++i)
  132. n[i] && t.push({ s: i, f: n[i] });
  133. var s = t.length, a = t.slice();
  134. if (!s)
  135. return { t: Qu, l: 0 };
  136. if (s == 1) {
  137. var c = new tr(t[0].s + 1);
  138. return c[t[0].s] = 1, { t: c, l: 1 };
  139. }
  140. t.sort(function(it, vt) {
  141. return it.f - vt.f;
  142. }), t.push({ s: -1, f: 25001 });
  143. var l = t[0], f = t[1], d = 0, m = 1, _ = 2;
  144. for (t[0] = { s: -1, f: l.f + f.f, l, r: f }; m != s - 1; )
  145. l = t[t[d].f < t[_].f ? d++ : _++], f = t[d != m && t[d].f < t[_].f ? d++ : _++], t[m++] = { s: -1, f: l.f + f.f, l, r: f };
  146. for (var k = a[0].s, i = 1; i < s; ++i)
  147. a[i].s > k && (k = a[i].s);
  148. var p = new Rn(k + 1), j = qo(t[m - 1], p, 0);
  149. if (j > e) {
  150. var i = 0, O = 0, M = j - e, S = 1 << M;
  151. for (a.sort(function(vt, dt) {
  152. return p[dt.s] - p[vt.s] || vt.f - dt.f;
  153. }); i < s; ++i) {
  154. var V = a[i].s;
  155. if (p[V] > e)
  156. O += S - (1 << j - p[V]), p[V] = e;
  157. else
  158. break;
  159. }
  160. for (O >>= M; O > 0; ) {
  161. var G = a[i].s;
  162. p[G] < e ? O -= 1 << e - p[G]++ - 1 : ++i;
  163. }
  164. for (; i >= 0 && O; --i) {
  165. var q = a[i].s;
  166. p[q] == e && (--p[q], ++O);
  167. }
  168. j = e;
  169. }
  170. return { t: new tr(p), l: j };
  171. }, qo = function(n, e, t) {
  172. return n.s == -1 ? Math.max(qo(n.l, e, t + 1), qo(n.r, e, t + 1)) : e[n.s] = t;
  173. }, Rl = function(n) {
  174. for (var e = n.length; e && !n[--e]; )
  175. ;
  176. for (var t = new Rn(++e), i = 0, s = n[0], a = 1, c = function(f) {
  177. t[i++] = f;
  178. }, l = 1; l <= e; ++l)
  179. if (n[l] == s && l != e)
  180. ++a;
  181. else {
  182. if (!s && a > 2) {
  183. for (; a > 138; a -= 138)
  184. c(32754);
  185. a > 2 && (c(a > 10 ? a - 11 << 5 | 28690 : a - 3 << 5 | 12305), a = 0);
  186. } else if (a > 3) {
  187. for (c(s), --a; a > 6; a -= 6)
  188. c(8304);
  189. a > 2 && (c(a - 3 << 5 | 8208), a = 0);
  190. }
  191. for (; a--; )
  192. c(s);
  193. a = 1, s = n[l];
  194. }
  195. return { c: t.subarray(0, i), n: e };
  196. }, Fa = function(n, e) {
  197. for (var t = 0, i = 0; i < e.length; ++i)
  198. t += n[i] * e[i];
  199. return t;
  200. }, Zu = function(n, e, t) {
  201. var i = t.length, s = $u(e + 2);
  202. n[s] = i & 255, n[s + 1] = i >> 8, n[s + 2] = n[s] ^ 255, n[s + 3] = n[s + 1] ^ 255;
  203. for (var a = 0; a < i; ++a)
  204. n[s + a + 4] = t[a];
  205. return (s + 4 + i) * 8;
  206. }, Tl = function(n, e, t, i, s, a, c, l, f, d, m) {
  207. Er(e, m++, t), ++s[256];
  208. for (var _ = vo(s, 15), k = _.t, p = _.l, j = vo(a, 15), O = j.t, M = j.l, S = Rl(k), V = S.c, G = S.n, q = Rl(O), it = q.c, vt = q.n, dt = new Rn(19), X = 0; X < V.length; ++X)
  209. ++dt[V[X] & 31];
  210. for (var X = 0; X < it.length; ++X)
  211. ++dt[it[X] & 31];
  212. for (var R = vo(dt, 7), tt = R.t, N = R.l, E = 19; E > 4 && !tt[Bl[E - 1]]; --E)
  213. ;
  214. var z = d + 5 << 3, U = Fa(s, xi) + Fa(a, Is) + c, rt = Fa(s, k) + Fa(a, O) + c + 14 + 3 * E + Fa(dt, tt) + 2 * dt[16] + 3 * dt[17] + 7 * dt[18];
  215. if (f >= 0 && z <= U && z <= rt)
  216. return Zu(e, m, n.subarray(f, f + d));
  217. var ot, ht, nt, ct;
  218. if (Er(e, m, 1 + (rt < U)), m += 2, rt < U) {
  219. ot = Ca(k, p, 0), ht = k, nt = Ca(O, M, 0), ct = O;
  220. var At = Ca(tt, N, 0);
  221. Er(e, m, G - 257), Er(e, m + 5, vt - 1), Er(e, m + 10, E - 4), m += 14;
  222. for (var X = 0; X < E; ++X)
  223. Er(e, m + 3 * X, tt[Bl[X]]);
  224. m += 3 * E;
  225. for (var wt = [V, it], x = 0; x < 2; ++x)
  226. for (var B = wt[x], X = 0; X < B.length; ++X) {
  227. var T = B[X] & 31;
  228. Er(e, m, At[T]), m += tt[T], T > 15 && (Er(e, m, B[X] >> 5 & 127), m += B[X] >> 12);
  229. }
  230. } else
  231. ot = Pf, ht = xi, nt = If, ct = Is;
  232. for (var X = 0; X < l; ++X) {
  233. var H = i[X];
  234. if (H > 255) {
  235. var T = H >> 18 & 31;
  236. Ia(e, m, ot[T + 257]), m += ht[T + 257], T > 7 && (Er(e, m, H >> 23 & 31), m += Xo[T]);
  237. var J = H & 31;
  238. Ia(e, m, nt[J]), m += ct[J], J > 3 && (Ia(e, m, H >> 5 & 8191), m += $o[J]);
  239. } else
  240. Ia(e, m, ot[H]), m += ht[H];
  241. }
  242. return Ia(e, m, ot[256]), m + ht[256];
  243. }, Cf = /* @__PURE__ */ new Ko([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]), Qu = /* @__PURE__ */ new tr(0), Ef = function(n, e, t, i, s, a) {
  244. var c = a.z || n.length, l = new tr(i + c + 5 * (1 + Math.ceil(c / 7e3)) + s), f = l.subarray(i, l.length - s), d = a.l, m = (a.r || 0) & 7;
  245. if (e) {
  246. m && (f[0] = a.r >> 3);
  247. for (var _ = Cf[e - 1], k = _ >> 13, p = _ & 8191, j = (1 << t) - 1, O = a.p || new Rn(32768), M = a.h || new Rn(j + 1), S = Math.ceil(t / 3), V = 2 * S, G = function(Dt) {
  248. return (n[Dt] ^ n[Dt + 1] << S ^ n[Dt + 2] << V) & j;
  249. }, q = new Ko(25e3), it = new Rn(288), vt = new Rn(32), dt = 0, X = 0, R = a.i || 0, tt = 0, N = a.w || 0, E = 0; R + 2 < c; ++R) {
  250. var z = G(R), U = R & 32767, rt = M[z];
  251. if (O[U] = rt, M[z] = U, N <= R) {
  252. var ot = c - R;
  253. if ((dt > 7e3 || tt > 24576) && (ot > 423 || !d)) {
  254. m = Tl(n, f, 0, q, it, vt, X, tt, E, R - E, m), tt = dt = X = 0, E = R;
  255. for (var ht = 0; ht < 286; ++ht)
  256. it[ht] = 0;
  257. for (var ht = 0; ht < 30; ++ht)
  258. vt[ht] = 0;
  259. }
  260. var nt = 2, ct = 0, At = p, wt = U - rt & 32767;
  261. if (ot > 2 && z == G(R - wt))
  262. for (var x = Math.min(k, ot) - 1, B = Math.min(32767, R), T = Math.min(258, ot); wt <= B && --At && U != rt; ) {
  263. if (n[R + nt] == n[R + nt - wt]) {
  264. for (var H = 0; H < T && n[R + H] == n[R + H - wt]; ++H)
  265. ;
  266. if (H > nt) {
  267. if (nt = H, ct = wt, H > x)
  268. break;
  269. for (var J = Math.min(wt, H - 2), Z = 0, ht = 0; ht < J; ++ht) {
  270. var at = R - wt + ht & 32767, st = O[at], gt = at - st & 32767;
  271. gt > Z && (Z = gt, rt = at);
  272. }
  273. }
  274. }
  275. U = rt, rt = O[U], wt += U - rt & 32767;
  276. }
  277. if (ct) {
  278. q[tt++] = 268435456 | To[nt] << 18 | Ml[ct];
  279. var _t = To[nt] & 31, kt = Ml[ct] & 31;
  280. X += Xo[_t] + $o[kt], ++it[257 + _t], ++vt[kt], N = R + nt, ++dt;
  281. } else
  282. q[tt++] = n[R], ++it[n[R]];
  283. }
  284. }
  285. for (R = Math.max(R, N); R < c; ++R)
  286. q[tt++] = n[R], ++it[n[R]];
  287. m = Tl(n, f, d, q, it, vt, X, tt, E, R - E, m), d || (a.r = m & 7 | f[m / 8 | 0] << 3, m -= 7, a.h = M, a.p = O, a.i = R, a.w = N);
  288. } else {
  289. for (var R = a.w || 0; R < c + d; R += 65535) {
  290. var St = R + 65535;
  291. St >= c && (f[m / 8 | 0] = d, St = c), m = Zu(f, m + 1, n.subarray(R, St));
  292. }
  293. a.i = c;
  294. }
  295. return Ff(l, 0, i + $u(m) + s);
  296. }, th = function() {
  297. var n = 1, e = 0;
  298. return {
  299. p: function(t) {
  300. for (var i = n, s = e, a = t.length | 0, c = 0; c != a; ) {
  301. for (var l = Math.min(c + 2655, a); c < l; ++c)
  302. s += i += t[c];
  303. i = (i & 65535) + 15 * (i >> 16), s = (s & 65535) + 15 * (s >> 16);
  304. }
  305. n = i, e = s;
  306. },
  307. d: function() {
  308. return n %= 65521, e %= 65521, (n & 255) << 24 | (n & 65280) << 8 | (e & 255) << 8 | e >> 8;
  309. }
  310. };
  311. }, Of = function(n, e, t, i, s) {
  312. if (!s && (s = { l: 1 }, e.dictionary)) {
  313. var a = e.dictionary.subarray(-32768), c = new tr(a.length + n.length);
  314. c.set(a), c.set(n, a.length), n = c, s.w = a.length;
  315. }
  316. return Ef(n, e.level == null ? 6 : e.level, e.mem == null ? s.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(n.length))) * 1.5) : 20 : 12 + e.mem, t, i, s);
  317. }, eh = function(n, e, t) {
  318. for (; t; ++e)
  319. n[e] = t, t >>>= 8;
  320. }, jf = function(n, e) {
  321. var t = e.level, i = t == 0 ? 0 : t < 6 ? 1 : t == 9 ? 3 : 2;
  322. if (n[0] = 120, n[1] = i << 6 | (e.dictionary && 32), n[1] |= 31 - (n[0] << 8 | n[1]) % 31, e.dictionary) {
  323. var s = th();
  324. s.p(e.dictionary), eh(n, 2, s.d());
  325. }
  326. };
  327. function Uo(n, e) {
  328. e || (e = {});
  329. var t = th();
  330. t.p(n);
  331. var i = Of(n, e, e.dictionary ? 6 : 2, 4);
  332. return jf(i, e), eh(i, i.length - 4, t.d()), i;
  333. }
  334. var Bf = typeof TextDecoder != "undefined" && /* @__PURE__ */ new TextDecoder(), Mf = 0;
  335. try {
  336. Bf.decode(Qu, { stream: !0 }), Mf = 1;
  337. } catch (n) {
  338. }
  339. function Rf(n) {
  340. if (Array.isArray(n)) return n;
  341. }
  342. function Tf(n, e) {
  343. var t = n == null ? null : typeof Symbol != "undefined" && n[Symbol.iterator] || n["@@iterator"];
  344. if (t != null) {
  345. var i, s, a, c, l = [], f = !0, d = !1;
  346. try {
  347. if (a = (t = t.call(n)).next, e !== 0) for (; !(f = (i = a.call(t)).done) && (l.push(i.value), l.length !== e); f = !0) ;
  348. } catch (m) {
  349. d = !0, s = m;
  350. } finally {
  351. try {
  352. if (!f && t.return != null && (c = t.return(), Object(c) !== c)) return;
  353. } finally {
  354. if (d) throw s;
  355. }
  356. }
  357. return l;
  358. }
  359. }
  360. function Dl(n, e) {
  361. (e == null || e > n.length) && (e = n.length);
  362. for (var t = 0, i = Array(e); t < e; t++) i[t] = n[t];
  363. return i;
  364. }
  365. function Df(n, e) {
  366. if (n) {
  367. if (typeof n == "string") return Dl(n, e);
  368. var t = {}.toString.call(n).slice(8, -1);
  369. return t === "Object" && n.constructor && (t = n.constructor.name), t === "Map" || t === "Set" ? Array.from(n) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? Dl(n, e) : void 0;
  370. }
  371. }
  372. function qf() {
  373. throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  374. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
  375. }
  376. function ql(n, e) {
  377. return Rf(n) || Tf(n, e) || Df(n, e) || qf();
  378. }
  379. function Ul(n, e = "utf8") {
  380. return new TextDecoder(e).decode(n);
  381. }
  382. const Uf = new TextEncoder();
  383. function zf(n) {
  384. return Uf.encode(n);
  385. }
  386. const Hf = 1024 * 8, Wf = (() => {
  387. const n = new Uint8Array(4), e = new Uint32Array(n.buffer);
  388. return !((e[0] = 1) & n[0]);
  389. })(), bo = {
  390. int8: globalThis.Int8Array,
  391. uint8: globalThis.Uint8Array,
  392. int16: globalThis.Int16Array,
  393. uint16: globalThis.Uint16Array,
  394. int32: globalThis.Int32Array,
  395. uint32: globalThis.Uint32Array,
  396. uint64: globalThis.BigUint64Array,
  397. int64: globalThis.BigInt64Array,
  398. float32: globalThis.Float32Array,
  399. float64: globalThis.Float64Array
  400. };
  401. class Zo {
  402. /**
  403. * Create a new IOBuffer.
  404. * @param data - The data to construct the IOBuffer with.
  405. * If data is a number, it will be the new buffer's length<br>
  406. * If data is `undefined`, the buffer will be initialized with a default length of 8Kb<br>
  407. * If data is an ArrayBuffer, SharedArrayBuffer, an ArrayBufferView (Typed Array), an IOBuffer instance,
  408. * or a Node.js Buffer, a view will be created over the underlying ArrayBuffer.
  409. * @param options - An object for the options.
  410. * @returns A new IOBuffer instance.
  411. */
  412. constructor(e = Hf, t = {}) {
  413. /**
  414. * Reference to the internal ArrayBuffer object.
  415. */
  416. xe(this, "buffer");
  417. /**
  418. * Byte length of the internal ArrayBuffer.
  419. */
  420. xe(this, "byteLength");
  421. /**
  422. * Byte offset of the internal ArrayBuffer.
  423. */
  424. xe(this, "byteOffset");
  425. /**
  426. * Byte length of the internal ArrayBuffer.
  427. */
  428. xe(this, "length");
  429. /**
  430. * The current offset of the buffer's pointer.
  431. */
  432. xe(this, "offset");
  433. xe(this, "lastWrittenByte");
  434. xe(this, "littleEndian");
  435. xe(this, "_data");
  436. xe(this, "_mark");
  437. xe(this, "_marks");
  438. let i = !1;
  439. typeof e == "number" ? e = new ArrayBuffer(e) : (i = !0, this.lastWrittenByte = e.byteLength);
  440. const s = t.offset ? t.offset >>> 0 : 0, a = e.byteLength - s;
  441. let c = s;
  442. (ArrayBuffer.isView(e) || e instanceof Zo) && (e.byteLength !== e.buffer.byteLength && (c = e.byteOffset + s), e = e.buffer), i ? this.lastWrittenByte = a : this.lastWrittenByte = 0, this.buffer = e, this.length = a, this.byteLength = a, this.byteOffset = c, this.offset = 0, this.littleEndian = !0, this._data = new DataView(this.buffer, c, a), this._mark = 0, this._marks = [];
  443. }
  444. /**
  445. * Checks if the memory allocated to the buffer is sufficient to store more
  446. * bytes after the offset.
  447. * @param byteLength - The needed memory in bytes.
  448. * @returns `true` if there is sufficient space and `false` otherwise.
  449. */
  450. available(e = 1) {
  451. return this.offset + e <= this.length;
  452. }
  453. /**
  454. * Check if little-endian mode is used for reading and writing multi-byte
  455. * values.
  456. * @returns `true` if little-endian mode is used, `false` otherwise.
  457. */
  458. isLittleEndian() {
  459. return this.littleEndian;
  460. }
  461. /**
  462. * Set little-endian mode for reading and writing multi-byte values.
  463. * @returns This.
  464. */
  465. setLittleEndian() {
  466. return this.littleEndian = !0, this;
  467. }
  468. /**
  469. * Check if big-endian mode is used for reading and writing multi-byte values.
  470. * @returns `true` if big-endian mode is used, `false` otherwise.
  471. */
  472. isBigEndian() {
  473. return !this.littleEndian;
  474. }
  475. /**
  476. * Switches to big-endian mode for reading and writing multi-byte values.
  477. * @returns This.
  478. */
  479. setBigEndian() {
  480. return this.littleEndian = !1, this;
  481. }
  482. /**
  483. * Move the pointer n bytes forward.
  484. * @param n - Number of bytes to skip.
  485. * @returns This.
  486. */
  487. skip(e = 1) {
  488. return this.offset += e, this;
  489. }
  490. /**
  491. * Move the pointer n bytes backward.
  492. * @param n - Number of bytes to move back.
  493. * @returns This.
  494. */
  495. back(e = 1) {
  496. return this.offset -= e, this;
  497. }
  498. /**
  499. * Move the pointer to the given offset.
  500. * @param offset - The offset to move to.
  501. * @returns This.
  502. */
  503. seek(e) {
  504. return this.offset = e, this;
  505. }
  506. /**
  507. * Store the current pointer offset.
  508. * @see {@link IOBuffer#reset}
  509. * @returns This.
  510. */
  511. mark() {
  512. return this._mark = this.offset, this;
  513. }
  514. /**
  515. * Move the pointer back to the last pointer offset set by mark.
  516. * @see {@link IOBuffer#mark}
  517. * @returns This.
  518. */
  519. reset() {
  520. return this.offset = this._mark, this;
  521. }
  522. /**
  523. * Push the current pointer offset to the mark stack.
  524. * @see {@link IOBuffer#popMark}
  525. * @returns This.
  526. */
  527. pushMark() {
  528. return this._marks.push(this.offset), this;
  529. }
  530. /**
  531. * Pop the last pointer offset from the mark stack, and set the current
  532. * pointer offset to the popped value.
  533. * @see {@link IOBuffer#pushMark}
  534. * @returns This.
  535. */
  536. popMark() {
  537. const e = this._marks.pop();
  538. if (e === void 0)
  539. throw new Error("Mark stack empty");
  540. return this.seek(e), this;
  541. }
  542. /**
  543. * Move the pointer offset back to 0.
  544. * @returns This.
  545. */
  546. rewind() {
  547. return this.offset = 0, this;
  548. }
  549. /**
  550. * Make sure the buffer has sufficient memory to write a given byteLength at
  551. * the current pointer offset.
  552. * If the buffer's memory is insufficient, this method will create a new
  553. * buffer (a copy) with a length that is twice (byteLength + current offset).
  554. * @param byteLength - The needed memory in bytes.
  555. * @returns This.
  556. */
  557. ensureAvailable(e = 1) {
  558. if (!this.available(e)) {
  559. const i = (this.offset + e) * 2, s = new Uint8Array(i);
  560. s.set(new Uint8Array(this.buffer)), this.buffer = s.buffer, this.length = i, this.byteLength = i, this._data = new DataView(this.buffer);
  561. }
  562. return this;
  563. }
  564. /**
  565. * Read a byte and return false if the byte's value is 0, or true otherwise.
  566. * Moves pointer forward by one byte.
  567. * @returns The read boolean.
  568. */
  569. readBoolean() {
  570. return this.readUint8() !== 0;
  571. }
  572. /**
  573. * Read a signed 8-bit integer and move pointer forward by 1 byte.
  574. * @returns The read byte.
  575. */
  576. readInt8() {
  577. return this._data.getInt8(this.offset++);
  578. }
  579. /**
  580. * Read an unsigned 8-bit integer and move pointer forward by 1 byte.
  581. * @returns The read byte.
  582. */
  583. readUint8() {
  584. return this._data.getUint8(this.offset++);
  585. }
  586. /**
  587. * Alias for {@link IOBuffer#readUint8}.
  588. * @returns The read byte.
  589. */
  590. readByte() {
  591. return this.readUint8();
  592. }
  593. /**
  594. * Read `n` bytes and move pointer forward by `n` bytes.
  595. * @param n - Number of bytes to read.
  596. * @returns The read bytes.
  597. */
  598. readBytes(e = 1) {
  599. return this.readArray(e, "uint8");
  600. }
  601. /**
  602. * Creates an array of corresponding to the type `type` and size `size`.
  603. * For example type `uint8` will create a `Uint8Array`.
  604. * @param size - size of the resulting array
  605. * @param type - number type of elements to read
  606. * @returns The read array.
  607. */
  608. readArray(e, t) {
  609. const i = bo[t].BYTES_PER_ELEMENT * e, s = this.byteOffset + this.offset, a = this.buffer.slice(s, s + i);
  610. if (this.littleEndian === Wf && t !== "uint8" && t !== "int8") {
  611. const l = new Uint8Array(this.buffer.slice(s, s + i));
  612. l.reverse();
  613. const f = new bo[t](l.buffer);
  614. return this.offset += i, f.reverse(), f;
  615. }
  616. const c = new bo[t](a);
  617. return this.offset += i, c;
  618. }
  619. /**
  620. * Read a 16-bit signed integer and move pointer forward by 2 bytes.
  621. * @returns The read value.
  622. */
  623. readInt16() {
  624. const e = this._data.getInt16(this.offset, this.littleEndian);
  625. return this.offset += 2, e;
  626. }
  627. /**
  628. * Read a 16-bit unsigned integer and move pointer forward by 2 bytes.
  629. * @returns The read value.
  630. */
  631. readUint16() {
  632. const e = this._data.getUint16(this.offset, this.littleEndian);
  633. return this.offset += 2, e;
  634. }
  635. /**
  636. * Read a 32-bit signed integer and move pointer forward by 4 bytes.
  637. * @returns The read value.
  638. */
  639. readInt32() {
  640. const e = this._data.getInt32(this.offset, this.littleEndian);
  641. return this.offset += 4, e;
  642. }
  643. /**
  644. * Read a 32-bit unsigned integer and move pointer forward by 4 bytes.
  645. * @returns The read value.
  646. */
  647. readUint32() {
  648. const e = this._data.getUint32(this.offset, this.littleEndian);
  649. return this.offset += 4, e;
  650. }
  651. /**
  652. * Read a 32-bit floating number and move pointer forward by 4 bytes.
  653. * @returns The read value.
  654. */
  655. readFloat32() {
  656. const e = this._data.getFloat32(this.offset, this.littleEndian);
  657. return this.offset += 4, e;
  658. }
  659. /**
  660. * Read a 64-bit floating number and move pointer forward by 8 bytes.
  661. * @returns The read value.
  662. */
  663. readFloat64() {
  664. const e = this._data.getFloat64(this.offset, this.littleEndian);
  665. return this.offset += 8, e;
  666. }
  667. /**
  668. * Read a 64-bit signed integer number and move pointer forward by 8 bytes.
  669. * @returns The read value.
  670. */
  671. readBigInt64() {
  672. const e = this._data.getBigInt64(this.offset, this.littleEndian);
  673. return this.offset += 8, e;
  674. }
  675. /**
  676. * Read a 64-bit unsigned integer number and move pointer forward by 8 bytes.
  677. * @returns The read value.
  678. */
  679. readBigUint64() {
  680. const e = this._data.getBigUint64(this.offset, this.littleEndian);
  681. return this.offset += 8, e;
  682. }
  683. /**
  684. * Read a 1-byte ASCII character and move pointer forward by 1 byte.
  685. * @returns The read character.
  686. */
  687. readChar() {
  688. return String.fromCharCode(this.readInt8());
  689. }
  690. /**
  691. * Read `n` 1-byte ASCII characters and move pointer forward by `n` bytes.
  692. * @param n - Number of characters to read.
  693. * @returns The read characters.
  694. */
  695. readChars(e = 1) {
  696. let t = "";
  697. for (let i = 0; i < e; i++)
  698. t += this.readChar();
  699. return t;
  700. }
  701. /**
  702. * Read the next `n` bytes, return a UTF-8 decoded string and move pointer
  703. * forward by `n` bytes.
  704. * @param n - Number of bytes to read.
  705. * @returns The decoded string.
  706. */
  707. readUtf8(e = 1) {
  708. return Ul(this.readBytes(e));
  709. }
  710. /**
  711. * Read the next `n` bytes, return a string decoded with `encoding` and move pointer
  712. * forward by `n` bytes.
  713. * If no encoding is passed, the function is equivalent to @see {@link IOBuffer#readUtf8}
  714. * @param n - Number of bytes to read.
  715. * @param encoding - The encoding to use. Default is 'utf8'.
  716. * @returns The decoded string.
  717. */
  718. decodeText(e = 1, t = "utf8") {
  719. return Ul(this.readBytes(e), t);
  720. }
  721. /**
  722. * Write 0xff if the passed value is truthy, 0x00 otherwise and move pointer
  723. * forward by 1 byte.
  724. * @param value - The value to write.
  725. * @returns This.
  726. */
  727. writeBoolean(e) {
  728. return this.writeUint8(e ? 255 : 0), this;
  729. }
  730. /**
  731. * Write `value` as an 8-bit signed integer and move pointer forward by 1 byte.
  732. * @param value - The value to write.
  733. * @returns This.
  734. */
  735. writeInt8(e) {
  736. return this.ensureAvailable(1), this._data.setInt8(this.offset++, e), this._updateLastWrittenByte(), this;
  737. }
  738. /**
  739. * Write `value` as an 8-bit unsigned integer and move pointer forward by 1
  740. * byte.
  741. * @param value - The value to write.
  742. * @returns This.
  743. */
  744. writeUint8(e) {
  745. return this.ensureAvailable(1), this._data.setUint8(this.offset++, e), this._updateLastWrittenByte(), this;
  746. }
  747. /**
  748. * An alias for {@link IOBuffer#writeUint8}.
  749. * @param value - The value to write.
  750. * @returns This.
  751. */
  752. writeByte(e) {
  753. return this.writeUint8(e);
  754. }
  755. /**
  756. * Write all elements of `bytes` as uint8 values and move pointer forward by
  757. * `bytes.length` bytes.
  758. * @param bytes - The array of bytes to write.
  759. * @returns This.
  760. */
  761. writeBytes(e) {
  762. this.ensureAvailable(e.length);
  763. for (let t = 0; t < e.length; t++)
  764. this._data.setUint8(this.offset++, e[t]);
  765. return this._updateLastWrittenByte(), this;
  766. }
  767. /**
  768. * Write `value` as a 16-bit signed integer and move pointer forward by 2
  769. * bytes.
  770. * @param value - The value to write.
  771. * @returns This.
  772. */
  773. writeInt16(e) {
  774. return this.ensureAvailable(2), this._data.setInt16(this.offset, e, this.littleEndian), this.offset += 2, this._updateLastWrittenByte(), this;
  775. }
  776. /**
  777. * Write `value` as a 16-bit unsigned integer and move pointer forward by 2
  778. * bytes.
  779. * @param value - The value to write.
  780. * @returns This.
  781. */
  782. writeUint16(e) {
  783. return this.ensureAvailable(2), this._data.setUint16(this.offset, e, this.littleEndian), this.offset += 2, this._updateLastWrittenByte(), this;
  784. }
  785. /**
  786. * Write `value` as a 32-bit signed integer and move pointer forward by 4
  787. * bytes.
  788. * @param value - The value to write.
  789. * @returns This.
  790. */
  791. writeInt32(e) {
  792. return this.ensureAvailable(4), this._data.setInt32(this.offset, e, this.littleEndian), this.offset += 4, this._updateLastWrittenByte(), this;
  793. }
  794. /**
  795. * Write `value` as a 32-bit unsigned integer and move pointer forward by 4
  796. * bytes.
  797. * @param value - The value to write.
  798. * @returns This.
  799. */
  800. writeUint32(e) {
  801. return this.ensureAvailable(4), this._data.setUint32(this.offset, e, this.littleEndian), this.offset += 4, this._updateLastWrittenByte(), this;
  802. }
  803. /**
  804. * Write `value` as a 32-bit floating number and move pointer forward by 4
  805. * bytes.
  806. * @param value - The value to write.
  807. * @returns This.
  808. */
  809. writeFloat32(e) {
  810. return this.ensureAvailable(4), this._data.setFloat32(this.offset, e, this.littleEndian), this.offset += 4, this._updateLastWrittenByte(), this;
  811. }
  812. /**
  813. * Write `value` as a 64-bit floating number and move pointer forward by 8
  814. * bytes.
  815. * @param value - The value to write.
  816. * @returns This.
  817. */
  818. writeFloat64(e) {
  819. return this.ensureAvailable(8), this._data.setFloat64(this.offset, e, this.littleEndian), this.offset += 8, this._updateLastWrittenByte(), this;
  820. }
  821. /**
  822. * Write `value` as a 64-bit signed bigint and move pointer forward by 8
  823. * bytes.
  824. * @param value - The value to write.
  825. * @returns This.
  826. */
  827. writeBigInt64(e) {
  828. return this.ensureAvailable(8), this._data.setBigInt64(this.offset, e, this.littleEndian), this.offset += 8, this._updateLastWrittenByte(), this;
  829. }
  830. /**
  831. * Write `value` as a 64-bit unsigned bigint and move pointer forward by 8
  832. * bytes.
  833. * @param value - The value to write.
  834. * @returns This.
  835. */
  836. writeBigUint64(e) {
  837. return this.ensureAvailable(8), this._data.setBigUint64(this.offset, e, this.littleEndian), this.offset += 8, this._updateLastWrittenByte(), this;
  838. }
  839. /**
  840. * Write the charCode of `str`'s first character as an 8-bit unsigned integer
  841. * and move pointer forward by 1 byte.
  842. * @param str - The character to write.
  843. * @returns This.
  844. */
  845. writeChar(e) {
  846. return this.writeUint8(e.charCodeAt(0));
  847. }
  848. /**
  849. * Write the charCodes of all `str`'s characters as 8-bit unsigned integers
  850. * and move pointer forward by `str.length` bytes.
  851. * @param str - The characters to write.
  852. * @returns This.
  853. */
  854. writeChars(e) {
  855. for (let t = 0; t < e.length; t++)
  856. this.writeUint8(e.charCodeAt(t));
  857. return this;
  858. }
  859. /**
  860. * UTF-8 encode and write `str` to the current pointer offset and move pointer
  861. * forward according to the encoded length.
  862. * @param str - The string to write.
  863. * @returns This.
  864. */
  865. writeUtf8(e) {
  866. return this.writeBytes(zf(e));
  867. }
  868. /**
  869. * Export a Uint8Array view of the internal buffer.
  870. * The view starts at the byte offset and its length
  871. * is calculated to stop at the last written byte or the original length.
  872. * @returns A new Uint8Array view.
  873. */
  874. toArray() {
  875. return new Uint8Array(this.buffer, this.byteOffset, this.lastWrittenByte);
  876. }
  877. /**
  878. * Get the total number of bytes written so far, regardless of the current offset.
  879. * @returns - Total number of bytes.
  880. */
  881. getWrittenByteLength() {
  882. return this.lastWrittenByte - this.byteOffset;
  883. }
  884. /**
  885. * Update the last written byte offset
  886. * @private
  887. */
  888. _updateLastWrittenByte() {
  889. this.offset > this.lastWrittenByte && (this.lastWrittenByte = this.offset);
  890. }
  891. }
  892. function aa(n) {
  893. let e = n.length;
  894. for (; --e >= 0; )
  895. n[e] = 0;
  896. }
  897. const Vf = 3, Gf = 258, nh = 29, Yf = 256, Jf = Yf + 1 + nh, rh = 30, Kf = 512, Xf = new Array((Jf + 2) * 2);
  898. aa(Xf);
  899. const $f = new Array(rh * 2);
  900. aa($f);
  901. const Zf = new Array(Kf);
  902. aa(Zf);
  903. const Qf = new Array(Gf - Vf + 1);
  904. aa(Qf);
  905. const tc = new Array(nh);
  906. aa(tc);
  907. const ec = new Array(rh);
  908. aa(ec);
  909. const nc = (n, e, t, i) => {
  910. let s = n & 65535 | 0, a = n >>> 16 & 65535 | 0, c = 0;
  911. for (; t !== 0; ) {
  912. c = t > 2e3 ? 2e3 : t, t -= c;
  913. do
  914. s = s + e[i++] | 0, a = a + s | 0;
  915. while (--c);
  916. s %= 65521, a %= 65521;
  917. }
  918. return s | a << 16 | 0;
  919. };
  920. var zo = nc;
  921. const rc = () => {
  922. let n, e = [];
  923. for (var t = 0; t < 256; t++) {
  924. n = t;
  925. for (var i = 0; i < 8; i++)
  926. n = n & 1 ? 3988292384 ^ n >>> 1 : n >>> 1;
  927. e[t] = n;
  928. }
  929. return e;
  930. }, ic = new Uint32Array(rc()), ac = (n, e, t, i) => {
  931. const s = ic, a = i + t;
  932. n ^= -1;
  933. for (let c = i; c < a; c++)
  934. n = n >>> 8 ^ s[(n ^ e[c]) & 255];
  935. return n ^ -1;
  936. };
  937. var dr = ac, Ho = {
  938. 2: "need dictionary",
  939. /* Z_NEED_DICT 2 */
  940. 1: "stream end",
  941. /* Z_STREAM_END 1 */
  942. 0: "",
  943. /* Z_OK 0 */
  944. "-1": "file error",
  945. /* Z_ERRNO (-1) */
  946. "-2": "stream error",
  947. /* Z_STREAM_ERROR (-2) */
  948. "-3": "data error",
  949. /* Z_DATA_ERROR (-3) */
  950. "-4": "insufficient memory",
  951. /* Z_MEM_ERROR (-4) */
  952. "-5": "buffer error",
  953. /* Z_BUF_ERROR (-5) */
  954. "-6": "incompatible version"
  955. /* Z_VERSION_ERROR (-6) */
  956. }, ih = {
  957. /* Allowed flush values; see deflate() and inflate() below for details */
  958. Z_NO_FLUSH: 0,
  959. Z_FINISH: 4,
  960. Z_BLOCK: 5,
  961. Z_TREES: 6,
  962. /* Return codes for the compression/decompression functions. Negative values
  963. * are errors, positive values are used for special but normal events.
  964. */
  965. Z_OK: 0,
  966. Z_STREAM_END: 1,
  967. Z_NEED_DICT: 2,
  968. Z_STREAM_ERROR: -2,
  969. Z_DATA_ERROR: -3,
  970. Z_MEM_ERROR: -4,
  971. Z_BUF_ERROR: -5,
  972. /* The deflate compression method */
  973. Z_DEFLATED: 8
  974. //Z_NULL: null // Use -1 or null inline, depending on var type
  975. };
  976. const sc = (n, e) => Object.prototype.hasOwnProperty.call(n, e);
  977. var oc = function(n) {
  978. const e = Array.prototype.slice.call(arguments, 1);
  979. for (; e.length; ) {
  980. const t = e.shift();
  981. if (t) {
  982. if (typeof t != "object")
  983. throw new TypeError(t + "must be non-object");
  984. for (const i in t)
  985. sc(t, i) && (n[i] = t[i]);
  986. }
  987. }
  988. return n;
  989. }, lc = (n) => {
  990. let e = 0;
  991. for (let i = 0, s = n.length; i < s; i++)
  992. e += n[i].length;
  993. const t = new Uint8Array(e);
  994. for (let i = 0, s = 0, a = n.length; i < a; i++) {
  995. let c = n[i];
  996. t.set(c, s), s += c.length;
  997. }
  998. return t;
  999. }, ah = {
  1000. assign: oc,
  1001. flattenChunks: lc
  1002. };
  1003. let sh = !0;
  1004. try {
  1005. String.fromCharCode.apply(null, new Uint8Array(1));
  1006. } catch (n) {
  1007. sh = !1;
  1008. }
  1009. const Oa = new Uint8Array(256);
  1010. for (let n = 0; n < 256; n++)
  1011. Oa[n] = n >= 252 ? 6 : n >= 248 ? 5 : n >= 240 ? 4 : n >= 224 ? 3 : n >= 192 ? 2 : 1;
  1012. Oa[254] = Oa[255] = 1;
  1013. var uc = (n) => {
  1014. if (typeof TextEncoder == "function" && TextEncoder.prototype.encode)
  1015. return new TextEncoder().encode(n);
  1016. let e, t, i, s, a, c = n.length, l = 0;
  1017. for (s = 0; s < c; s++)
  1018. t = n.charCodeAt(s), (t & 64512) === 55296 && s + 1 < c && (i = n.charCodeAt(s + 1), (i & 64512) === 56320 && (t = 65536 + (t - 55296 << 10) + (i - 56320), s++)), l += t < 128 ? 1 : t < 2048 ? 2 : t < 65536 ? 3 : 4;
  1019. for (e = new Uint8Array(l), a = 0, s = 0; a < l; s++)
  1020. t = n.charCodeAt(s), (t & 64512) === 55296 && s + 1 < c && (i = n.charCodeAt(s + 1), (i & 64512) === 56320 && (t = 65536 + (t - 55296 << 10) + (i - 56320), s++)), t < 128 ? e[a++] = t : t < 2048 ? (e[a++] = 192 | t >>> 6, e[a++] = 128 | t & 63) : t < 65536 ? (e[a++] = 224 | t >>> 12, e[a++] = 128 | t >>> 6 & 63, e[a++] = 128 | t & 63) : (e[a++] = 240 | t >>> 18, e[a++] = 128 | t >>> 12 & 63, e[a++] = 128 | t >>> 6 & 63, e[a++] = 128 | t & 63);
  1021. return e;
  1022. };
  1023. const hc = (n, e) => {
  1024. if (e < 65534 && n.subarray && sh)
  1025. return String.fromCharCode.apply(null, n.length === e ? n : n.subarray(0, e));
  1026. let t = "";
  1027. for (let i = 0; i < e; i++)
  1028. t += String.fromCharCode(n[i]);
  1029. return t;
  1030. };
  1031. var fc = (n, e) => {
  1032. const t = e || n.length;
  1033. if (typeof TextDecoder == "function" && TextDecoder.prototype.decode)
  1034. return new TextDecoder().decode(n.subarray(0, e));
  1035. let i, s;
  1036. const a = new Array(t * 2);
  1037. for (s = 0, i = 0; i < t; ) {
  1038. let c = n[i++];
  1039. if (c < 128) {
  1040. a[s++] = c;
  1041. continue;
  1042. }
  1043. let l = Oa[c];
  1044. if (l > 4) {
  1045. a[s++] = 65533, i += l - 1;
  1046. continue;
  1047. }
  1048. for (c &= l === 2 ? 31 : l === 3 ? 15 : 7; l > 1 && i < t; )
  1049. c = c << 6 | n[i++] & 63, l--;
  1050. if (l > 1) {
  1051. a[s++] = 65533;
  1052. continue;
  1053. }
  1054. c < 65536 ? a[s++] = c : (c -= 65536, a[s++] = 55296 | c >> 10 & 1023, a[s++] = 56320 | c & 1023);
  1055. }
  1056. return hc(a, s);
  1057. }, cc = (n, e) => {
  1058. e = e || n.length, e > n.length && (e = n.length);
  1059. let t = e - 1;
  1060. for (; t >= 0 && (n[t] & 192) === 128; )
  1061. t--;
  1062. return t < 0 || t === 0 ? e : t + Oa[n[t]] > e ? t : e;
  1063. }, Wo = {
  1064. string2buf: uc,
  1065. buf2string: fc,
  1066. utf8border: cc
  1067. };
  1068. function dc() {
  1069. this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = "", this.state = null, this.data_type = 2, this.adler = 0;
  1070. }
  1071. var pc = dc;
  1072. const gs = 16209, gc = 16191;
  1073. var mc = function(e, t) {
  1074. let i, s, a, c, l, f, d, m, _, k, p, j, O, M, S, V, G, q, it, vt, dt, X, R, tt;
  1075. const N = e.state;
  1076. i = e.next_in, R = e.input, s = i + (e.avail_in - 5), a = e.next_out, tt = e.output, c = a - (t - e.avail_out), l = a + (e.avail_out - 257), f = N.dmax, d = N.wsize, m = N.whave, _ = N.wnext, k = N.window, p = N.hold, j = N.bits, O = N.lencode, M = N.distcode, S = (1 << N.lenbits) - 1, V = (1 << N.distbits) - 1;
  1077. t:
  1078. do {
  1079. j < 15 && (p += R[i++] << j, j += 8, p += R[i++] << j, j += 8), G = O[p & S];
  1080. e:
  1081. for (; ; ) {
  1082. if (q = G >>> 24, p >>>= q, j -= q, q = G >>> 16 & 255, q === 0)
  1083. tt[a++] = G & 65535;
  1084. else if (q & 16) {
  1085. it = G & 65535, q &= 15, q && (j < q && (p += R[i++] << j, j += 8), it += p & (1 << q) - 1, p >>>= q, j -= q), j < 15 && (p += R[i++] << j, j += 8, p += R[i++] << j, j += 8), G = M[p & V];
  1086. n:
  1087. for (; ; ) {
  1088. if (q = G >>> 24, p >>>= q, j -= q, q = G >>> 16 & 255, q & 16) {
  1089. if (vt = G & 65535, q &= 15, j < q && (p += R[i++] << j, j += 8, j < q && (p += R[i++] << j, j += 8)), vt += p & (1 << q) - 1, vt > f) {
  1090. e.msg = "invalid distance too far back", N.mode = gs;
  1091. break t;
  1092. }
  1093. if (p >>>= q, j -= q, q = a - c, vt > q) {
  1094. if (q = vt - q, q > m && N.sane) {
  1095. e.msg = "invalid distance too far back", N.mode = gs;
  1096. break t;
  1097. }
  1098. if (dt = 0, X = k, _ === 0) {
  1099. if (dt += d - q, q < it) {
  1100. it -= q;
  1101. do
  1102. tt[a++] = k[dt++];
  1103. while (--q);
  1104. dt = a - vt, X = tt;
  1105. }
  1106. } else if (_ < q) {
  1107. if (dt += d + _ - q, q -= _, q < it) {
  1108. it -= q;
  1109. do
  1110. tt[a++] = k[dt++];
  1111. while (--q);
  1112. if (dt = 0, _ < it) {
  1113. q = _, it -= q;
  1114. do
  1115. tt[a++] = k[dt++];
  1116. while (--q);
  1117. dt = a - vt, X = tt;
  1118. }
  1119. }
  1120. } else if (dt += _ - q, q < it) {
  1121. it -= q;
  1122. do
  1123. tt[a++] = k[dt++];
  1124. while (--q);
  1125. dt = a - vt, X = tt;
  1126. }
  1127. for (; it > 2; )
  1128. tt[a++] = X[dt++], tt[a++] = X[dt++], tt[a++] = X[dt++], it -= 3;
  1129. it && (tt[a++] = X[dt++], it > 1 && (tt[a++] = X[dt++]));
  1130. } else {
  1131. dt = a - vt;
  1132. do
  1133. tt[a++] = tt[dt++], tt[a++] = tt[dt++], tt[a++] = tt[dt++], it -= 3;
  1134. while (it > 2);
  1135. it && (tt[a++] = tt[dt++], it > 1 && (tt[a++] = tt[dt++]));
  1136. }
  1137. } else if (q & 64) {
  1138. e.msg = "invalid distance code", N.mode = gs;
  1139. break t;
  1140. } else {
  1141. G = M[(G & 65535) + (p & (1 << q) - 1)];
  1142. continue n;
  1143. }
  1144. break;
  1145. }
  1146. } else if (q & 64)
  1147. if (q & 32) {
  1148. N.mode = gc;
  1149. break t;
  1150. } else {
  1151. e.msg = "invalid literal/length code", N.mode = gs;
  1152. break t;
  1153. }
  1154. else {
  1155. G = O[(G & 65535) + (p & (1 << q) - 1)];
  1156. continue e;
  1157. }
  1158. break;
  1159. }
  1160. } while (i < s && a < l);
  1161. it = j >> 3, i -= it, j -= it << 3, p &= (1 << j) - 1, e.next_in = i, e.next_out = a, e.avail_in = i < s ? 5 + (s - i) : 5 - (i - s), e.avail_out = a < l ? 257 + (l - a) : 257 - (a - l), N.hold = p, N.bits = j;
  1162. };
  1163. const Ji = 15, zl = 852, Hl = 592, Wl = 0, wo = 1, Vl = 2, vc = new Uint16Array([
  1164. /* Length codes 257..285 base */
  1165. 3,
  1166. 4,
  1167. 5,
  1168. 6,
  1169. 7,
  1170. 8,
  1171. 9,
  1172. 10,
  1173. 11,
  1174. 13,
  1175. 15,
  1176. 17,
  1177. 19,
  1178. 23,
  1179. 27,
  1180. 31,
  1181. 35,
  1182. 43,
  1183. 51,
  1184. 59,
  1185. 67,
  1186. 83,
  1187. 99,
  1188. 115,
  1189. 131,
  1190. 163,
  1191. 195,
  1192. 227,
  1193. 258,
  1194. 0,
  1195. 0
  1196. ]), bc = new Uint8Array([
  1197. /* Length codes 257..285 extra */
  1198. 16,
  1199. 16,
  1200. 16,
  1201. 16,
  1202. 16,
  1203. 16,
  1204. 16,
  1205. 16,
  1206. 17,
  1207. 17,
  1208. 17,
  1209. 17,
  1210. 18,
  1211. 18,
  1212. 18,
  1213. 18,
  1214. 19,
  1215. 19,
  1216. 19,
  1217. 19,
  1218. 20,
  1219. 20,
  1220. 20,
  1221. 20,
  1222. 21,
  1223. 21,
  1224. 21,
  1225. 21,
  1226. 16,
  1227. 199,
  1228. 75
  1229. ]), wc = new Uint16Array([
  1230. /* Distance codes 0..29 base */
  1231. 1,
  1232. 2,
  1233. 3,
  1234. 4,
  1235. 5,
  1236. 7,
  1237. 9,
  1238. 13,
  1239. 17,
  1240. 25,
  1241. 33,
  1242. 49,
  1243. 65,
  1244. 97,
  1245. 129,
  1246. 193,
  1247. 257,
  1248. 385,
  1249. 513,
  1250. 769,
  1251. 1025,
  1252. 1537,
  1253. 2049,
  1254. 3073,
  1255. 4097,
  1256. 6145,
  1257. 8193,
  1258. 12289,
  1259. 16385,
  1260. 24577,
  1261. 0,
  1262. 0
  1263. ]), yc = new Uint8Array([
  1264. /* Distance codes 0..29 extra */
  1265. 16,
  1266. 16,
  1267. 16,
  1268. 16,
  1269. 17,
  1270. 17,
  1271. 18,
  1272. 18,
  1273. 19,
  1274. 19,
  1275. 20,
  1276. 20,
  1277. 21,
  1278. 21,
  1279. 22,
  1280. 22,
  1281. 23,
  1282. 23,
  1283. 24,
  1284. 24,
  1285. 25,
  1286. 25,
  1287. 26,
  1288. 26,
  1289. 27,
  1290. 27,
  1291. 28,
  1292. 28,
  1293. 29,
  1294. 29,
  1295. 64,
  1296. 64
  1297. ]), xc = (n, e, t, i, s, a, c, l) => {
  1298. const f = l.bits;
  1299. let d = 0, m = 0, _ = 0, k = 0, p = 0, j = 0, O = 0, M = 0, S = 0, V = 0, G, q, it, vt, dt, X = null, R;
  1300. const tt = new Uint16Array(Ji + 1), N = new Uint16Array(Ji + 1);
  1301. let E = null, z, U, rt;
  1302. for (d = 0; d <= Ji; d++)
  1303. tt[d] = 0;
  1304. for (m = 0; m < i; m++)
  1305. tt[e[t + m]]++;
  1306. for (p = f, k = Ji; k >= 1 && tt[k] === 0; k--)
  1307. ;
  1308. if (p > k && (p = k), k === 0)
  1309. return s[a++] = 1 << 24 | 64 << 16 | 0, s[a++] = 1 << 24 | 64 << 16 | 0, l.bits = 1, 0;
  1310. for (_ = 1; _ < k && tt[_] === 0; _++)
  1311. ;
  1312. for (p < _ && (p = _), M = 1, d = 1; d <= Ji; d++)
  1313. if (M <<= 1, M -= tt[d], M < 0)
  1314. return -1;
  1315. if (M > 0 && (n === Wl || k !== 1))
  1316. return -1;
  1317. for (N[1] = 0, d = 1; d < Ji; d++)
  1318. N[d + 1] = N[d] + tt[d];
  1319. for (m = 0; m < i; m++)
  1320. e[t + m] !== 0 && (c[N[e[t + m]]++] = m);
  1321. if (n === Wl ? (X = E = c, R = 20) : n === wo ? (X = vc, E = bc, R = 257) : (X = wc, E = yc, R = 0), V = 0, m = 0, d = _, dt = a, j = p, O = 0, it = -1, S = 1 << p, vt = S - 1, n === wo && S > zl || n === Vl && S > Hl)
  1322. return 1;
  1323. for (; ; ) {
  1324. z = d - O, c[m] + 1 < R ? (U = 0, rt = c[m]) : c[m] >= R ? (U = E[c[m] - R], rt = X[c[m] - R]) : (U = 96, rt = 0), G = 1 << d - O, q = 1 << j, _ = q;
  1325. do
  1326. q -= G, s[dt + (V >> O) + q] = z << 24 | U << 16 | rt | 0;
  1327. while (q !== 0);
  1328. for (G = 1 << d - 1; V & G; )
  1329. G >>= 1;
  1330. if (G !== 0 ? (V &= G - 1, V += G) : V = 0, m++, --tt[d] === 0) {
  1331. if (d === k)
  1332. break;
  1333. d = e[t + c[m]];
  1334. }
  1335. if (d > p && (V & vt) !== it) {
  1336. for (O === 0 && (O = p), dt += _, j = d - O, M = 1 << j; j + O < k && (M -= tt[j + O], !(M <= 0)); )
  1337. j++, M <<= 1;
  1338. if (S += 1 << j, n === wo && S > zl || n === Vl && S > Hl)
  1339. return 1;
  1340. it = V & vt, s[it] = p << 24 | j << 16 | dt - a | 0;
  1341. }
  1342. }
  1343. return V !== 0 && (s[dt + V] = d - O << 24 | 64 << 16 | 0), l.bits = p, 0;
  1344. };
  1345. var Ea = xc;
  1346. const _c = 0, oh = 1, lh = 2, {
  1347. Z_FINISH: Gl,
  1348. Z_BLOCK: Ac,
  1349. Z_TREES: ms,
  1350. Z_OK: _i,
  1351. Z_STREAM_END: Nc,
  1352. Z_NEED_DICT: Lc,
  1353. Z_STREAM_ERROR: Vn,
  1354. Z_DATA_ERROR: uh,
  1355. Z_MEM_ERROR: hh,
  1356. Z_BUF_ERROR: Sc,
  1357. Z_DEFLATED: Yl
  1358. } = ih, Os = 16180, Jl = 16181, Kl = 16182, Xl = 16183, $l = 16184, Zl = 16185, Ql = 16186, tu = 16187, eu = 16188, nu = 16189, Fs = 16190, Or = 16191, yo = 16192, ru = 16193, xo = 16194, iu = 16195, au = 16196, su = 16197, ou = 16198, vs = 16199, bs = 16200, lu = 16201, uu = 16202, hu = 16203, fu = 16204, cu = 16205, _o = 16206, du = 16207, pu = 16208, Me = 16209, fh = 16210, ch = 16211, kc = 852, Pc = 592, Ic = 15, Fc = Ic, gu = (n) => (n >>> 24 & 255) + (n >>> 8 & 65280) + ((n & 65280) << 8) + ((n & 255) << 24);
  1359. function Cc() {
  1360. this.strm = null, this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new Uint16Array(320), this.work = new Uint16Array(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;
  1361. }
  1362. const Ni = (n) => {
  1363. if (!n)
  1364. return 1;
  1365. const e = n.state;
  1366. return !e || e.strm !== n || e.mode < Os || e.mode > ch ? 1 : 0;
  1367. }, dh = (n) => {
  1368. if (Ni(n))
  1369. return Vn;
  1370. const e = n.state;
  1371. return n.total_in = n.total_out = e.total = 0, n.msg = "", e.wrap && (n.adler = e.wrap & 1), e.mode = Os, e.last = 0, e.havedict = 0, e.flags = -1, e.dmax = 32768, e.head = null, e.hold = 0, e.bits = 0, e.lencode = e.lendyn = new Int32Array(kc), e.distcode = e.distdyn = new Int32Array(Pc), e.sane = 1, e.back = -1, _i;
  1372. }, ph = (n) => {
  1373. if (Ni(n))
  1374. return Vn;
  1375. const e = n.state;
  1376. return e.wsize = 0, e.whave = 0, e.wnext = 0, dh(n);
  1377. }, gh = (n, e) => {
  1378. let t;
  1379. if (Ni(n))
  1380. return Vn;
  1381. const i = n.state;
  1382. return e < 0 ? (t = 0, e = -e) : (t = (e >> 4) + 5, e < 48 && (e &= 15)), e && (e < 8 || e > 15) ? Vn : (i.window !== null && i.wbits !== e && (i.window = null), i.wrap = t, i.wbits = e, ph(n));
  1383. }, mh = (n, e) => {
  1384. if (!n)
  1385. return Vn;
  1386. const t = new Cc();
  1387. n.state = t, t.strm = n, t.window = null, t.mode = Os;
  1388. const i = gh(n, e);
  1389. return i !== _i && (n.state = null), i;
  1390. }, Ec = (n) => mh(n, Fc);
  1391. let mu = !0, Ao, No;
  1392. const Oc = (n) => {
  1393. if (mu) {
  1394. Ao = new Int32Array(512), No = new Int32Array(32);
  1395. let e = 0;
  1396. for (; e < 144; )
  1397. n.lens[e++] = 8;
  1398. for (; e < 256; )
  1399. n.lens[e++] = 9;
  1400. for (; e < 280; )
  1401. n.lens[e++] = 7;
  1402. for (; e < 288; )
  1403. n.lens[e++] = 8;
  1404. for (Ea(oh, n.lens, 0, 288, Ao, 0, n.work, { bits: 9 }), e = 0; e < 32; )
  1405. n.lens[e++] = 5;
  1406. Ea(lh, n.lens, 0, 32, No, 0, n.work, { bits: 5 }), mu = !1;
  1407. }
  1408. n.lencode = Ao, n.lenbits = 9, n.distcode = No, n.distbits = 5;
  1409. }, vh = (n, e, t, i) => {
  1410. let s;
  1411. const a = n.state;
  1412. return a.window === null && (a.window = new Uint8Array(1 << a.wbits)), a.wsize === 0 && (a.wsize = 1 << a.wbits, a.wnext = 0, a.whave = 0), i >= a.wsize ? (a.window.set(e.subarray(t - a.wsize, t), 0), a.wnext = 0, a.whave = a.wsize) : (s = a.wsize - a.wnext, s > i && (s = i), a.window.set(e.subarray(t - i, t - i + s), a.wnext), i -= s, i ? (a.window.set(e.subarray(t - i, t), 0), a.wnext = i, a.whave = a.wsize) : (a.wnext += s, a.wnext === a.wsize && (a.wnext = 0), a.whave < a.wsize && (a.whave += s))), 0;
  1413. }, jc = (n, e) => {
  1414. let t, i, s, a, c, l, f, d, m, _, k, p, j, O, M = 0, S, V, G, q, it, vt, dt, X;
  1415. const R = new Uint8Array(4);
  1416. let tt, N;
  1417. const E = (
  1418. /* permutation of code lengths */
  1419. new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15])
  1420. );
  1421. if (Ni(n) || !n.output || !n.input && n.avail_in !== 0)
  1422. return Vn;
  1423. t = n.state, t.mode === Or && (t.mode = yo), c = n.next_out, s = n.output, f = n.avail_out, a = n.next_in, i = n.input, l = n.avail_in, d = t.hold, m = t.bits, _ = l, k = f, X = _i;
  1424. t:
  1425. for (; ; )
  1426. switch (t.mode) {
  1427. case Os:
  1428. if (t.wrap === 0) {
  1429. t.mode = yo;
  1430. break;
  1431. }
  1432. for (; m < 16; ) {
  1433. if (l === 0)
  1434. break t;
  1435. l--, d += i[a++] << m, m += 8;
  1436. }
  1437. if (t.wrap & 2 && d === 35615) {
  1438. t.wbits === 0 && (t.wbits = 15), t.check = 0, R[0] = d & 255, R[1] = d >>> 8 & 255, t.check = dr(t.check, R, 2, 0), d = 0, m = 0, t.mode = Jl;
  1439. break;
  1440. }
  1441. if (t.head && (t.head.done = !1), !(t.wrap & 1) || /* check if zlib header allowed */
  1442. (((d & 255) << 8) + (d >> 8)) % 31) {
  1443. n.msg = "incorrect header check", t.mode = Me;
  1444. break;
  1445. }
  1446. if ((d & 15) !== Yl) {
  1447. n.msg = "unknown compression method", t.mode = Me;
  1448. break;
  1449. }
  1450. if (d >>>= 4, m -= 4, dt = (d & 15) + 8, t.wbits === 0 && (t.wbits = dt), dt > 15 || dt > t.wbits) {
  1451. n.msg = "invalid window size", t.mode = Me;
  1452. break;
  1453. }
  1454. t.dmax = 1 << t.wbits, t.flags = 0, n.adler = t.check = 1, t.mode = d & 512 ? nu : Or, d = 0, m = 0;
  1455. break;
  1456. case Jl:
  1457. for (; m < 16; ) {
  1458. if (l === 0)
  1459. break t;
  1460. l--, d += i[a++] << m, m += 8;
  1461. }
  1462. if (t.flags = d, (t.flags & 255) !== Yl) {
  1463. n.msg = "unknown compression method", t.mode = Me;
  1464. break;
  1465. }
  1466. if (t.flags & 57344) {
  1467. n.msg = "unknown header flags set", t.mode = Me;
  1468. break;
  1469. }
  1470. t.head && (t.head.text = d >> 8 & 1), t.flags & 512 && t.wrap & 4 && (R[0] = d & 255, R[1] = d >>> 8 & 255, t.check = dr(t.check, R, 2, 0)), d = 0, m = 0, t.mode = Kl;
  1471. case Kl:
  1472. for (; m < 32; ) {
  1473. if (l === 0)
  1474. break t;
  1475. l--, d += i[a++] << m, m += 8;
  1476. }
  1477. t.head && (t.head.time = d), t.flags & 512 && t.wrap & 4 && (R[0] = d & 255, R[1] = d >>> 8 & 255, R[2] = d >>> 16 & 255, R[3] = d >>> 24 & 255, t.check = dr(t.check, R, 4, 0)), d = 0, m = 0, t.mode = Xl;
  1478. case Xl:
  1479. for (; m < 16; ) {
  1480. if (l === 0)
  1481. break t;
  1482. l--, d += i[a++] << m, m += 8;
  1483. }
  1484. t.head && (t.head.xflags = d & 255, t.head.os = d >> 8), t.flags & 512 && t.wrap & 4 && (R[0] = d & 255, R[1] = d >>> 8 & 255, t.check = dr(t.check, R, 2, 0)), d = 0, m = 0, t.mode = $l;
  1485. case $l:
  1486. if (t.flags & 1024) {
  1487. for (; m < 16; ) {
  1488. if (l === 0)
  1489. break t;
  1490. l--, d += i[a++] << m, m += 8;
  1491. }
  1492. t.length = d, t.head && (t.head.extra_len = d), t.flags & 512 && t.wrap & 4 && (R[0] = d & 255, R[1] = d >>> 8 & 255, t.check = dr(t.check, R, 2, 0)), d = 0, m = 0;
  1493. } else t.head && (t.head.extra = null);
  1494. t.mode = Zl;
  1495. case Zl:
  1496. if (t.flags & 1024 && (p = t.length, p > l && (p = l), p && (t.head && (dt = t.head.extra_len - t.length, t.head.extra || (t.head.extra = new Uint8Array(t.head.extra_len)), t.head.extra.set(
  1497. i.subarray(
  1498. a,
  1499. // extra field is limited to 65536 bytes
  1500. // - no need for additional size check
  1501. a + p
  1502. ),
  1503. /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/
  1504. dt
  1505. )), t.flags & 512 && t.wrap & 4 && (t.check = dr(t.check, i, p, a)), l -= p, a += p, t.length -= p), t.length))
  1506. break t;
  1507. t.length = 0, t.mode = Ql;
  1508. case Ql:
  1509. if (t.flags & 2048) {
  1510. if (l === 0)
  1511. break t;
  1512. p = 0;
  1513. do
  1514. dt = i[a + p++], t.head && dt && t.length < 65536 && (t.head.name += String.fromCharCode(dt));
  1515. while (dt && p < l);
  1516. if (t.flags & 512 && t.wrap & 4 && (t.check = dr(t.check, i, p, a)), l -= p, a += p, dt)
  1517. break t;
  1518. } else t.head && (t.head.name = null);
  1519. t.length = 0, t.mode = tu;
  1520. case tu:
  1521. if (t.flags & 4096) {
  1522. if (l === 0)
  1523. break t;
  1524. p = 0;
  1525. do
  1526. dt = i[a + p++], t.head && dt && t.length < 65536 && (t.head.comment += String.fromCharCode(dt));
  1527. while (dt && p < l);
  1528. if (t.flags & 512 && t.wrap & 4 && (t.check = dr(t.check, i, p, a)), l -= p, a += p, dt)
  1529. break t;
  1530. } else t.head && (t.head.comment = null);
  1531. t.mode = eu;
  1532. case eu:
  1533. if (t.flags & 512) {
  1534. for (; m < 16; ) {
  1535. if (l === 0)
  1536. break t;
  1537. l--, d += i[a++] << m, m += 8;
  1538. }
  1539. if (t.wrap & 4 && d !== (t.check & 65535)) {
  1540. n.msg = "header crc mismatch", t.mode = Me;
  1541. break;
  1542. }
  1543. d = 0, m = 0;
  1544. }
  1545. t.head && (t.head.hcrc = t.flags >> 9 & 1, t.head.done = !0), n.adler = t.check = 0, t.mode = Or;
  1546. break;
  1547. case nu:
  1548. for (; m < 32; ) {
  1549. if (l === 0)
  1550. break t;
  1551. l--, d += i[a++] << m, m += 8;
  1552. }
  1553. n.adler = t.check = gu(d), d = 0, m = 0, t.mode = Fs;
  1554. case Fs:
  1555. if (t.havedict === 0)
  1556. return n.next_out = c, n.avail_out = f, n.next_in = a, n.avail_in = l, t.hold = d, t.bits = m, Lc;
  1557. n.adler = t.check = 1, t.mode = Or;
  1558. case Or:
  1559. if (e === Ac || e === ms)
  1560. break t;
  1561. case yo:
  1562. if (t.last) {
  1563. d >>>= m & 7, m -= m & 7, t.mode = _o;
  1564. break;
  1565. }
  1566. for (; m < 3; ) {
  1567. if (l === 0)
  1568. break t;
  1569. l--, d += i[a++] << m, m += 8;
  1570. }
  1571. switch (t.last = d & 1, d >>>= 1, m -= 1, d & 3) {
  1572. case 0:
  1573. t.mode = ru;
  1574. break;
  1575. case 1:
  1576. if (Oc(t), t.mode = vs, e === ms) {
  1577. d >>>= 2, m -= 2;
  1578. break t;
  1579. }
  1580. break;
  1581. case 2:
  1582. t.mode = au;
  1583. break;
  1584. case 3:
  1585. n.msg = "invalid block type", t.mode = Me;
  1586. }
  1587. d >>>= 2, m -= 2;
  1588. break;
  1589. case ru:
  1590. for (d >>>= m & 7, m -= m & 7; m < 32; ) {
  1591. if (l === 0)
  1592. break t;
  1593. l--, d += i[a++] << m, m += 8;
  1594. }
  1595. if ((d & 65535) !== (d >>> 16 ^ 65535)) {
  1596. n.msg = "invalid stored block lengths", t.mode = Me;
  1597. break;
  1598. }
  1599. if (t.length = d & 65535, d = 0, m = 0, t.mode = xo, e === ms)
  1600. break t;
  1601. case xo:
  1602. t.mode = iu;
  1603. case iu:
  1604. if (p = t.length, p) {
  1605. if (p > l && (p = l), p > f && (p = f), p === 0)
  1606. break t;
  1607. s.set(i.subarray(a, a + p), c), l -= p, a += p, f -= p, c += p, t.length -= p;
  1608. break;
  1609. }
  1610. t.mode = Or;
  1611. break;
  1612. case au:
  1613. for (; m < 14; ) {
  1614. if (l === 0)
  1615. break t;
  1616. l--, d += i[a++] << m, m += 8;
  1617. }
  1618. if (t.nlen = (d & 31) + 257, d >>>= 5, m -= 5, t.ndist = (d & 31) + 1, d >>>= 5, m -= 5, t.ncode = (d & 15) + 4, d >>>= 4, m -= 4, t.nlen > 286 || t.ndist > 30) {
  1619. n.msg = "too many length or distance symbols", t.mode = Me;
  1620. break;
  1621. }
  1622. t.have = 0, t.mode = su;
  1623. case su:
  1624. for (; t.have < t.ncode; ) {
  1625. for (; m < 3; ) {
  1626. if (l === 0)
  1627. break t;
  1628. l--, d += i[a++] << m, m += 8;
  1629. }
  1630. t.lens[E[t.have++]] = d & 7, d >>>= 3, m -= 3;
  1631. }
  1632. for (; t.have < 19; )
  1633. t.lens[E[t.have++]] = 0;
  1634. if (t.lencode = t.lendyn, t.lenbits = 7, tt = { bits: t.lenbits }, X = Ea(_c, t.lens, 0, 19, t.lencode, 0, t.work, tt), t.lenbits = tt.bits, X) {
  1635. n.msg = "invalid code lengths set", t.mode = Me;
  1636. break;
  1637. }
  1638. t.have = 0, t.mode = ou;
  1639. case ou:
  1640. for (; t.have < t.nlen + t.ndist; ) {
  1641. for (; M = t.lencode[d & (1 << t.lenbits) - 1], S = M >>> 24, V = M >>> 16 & 255, G = M & 65535, !(S <= m); ) {
  1642. if (l === 0)
  1643. break t;
  1644. l--, d += i[a++] << m, m += 8;
  1645. }
  1646. if (G < 16)
  1647. d >>>= S, m -= S, t.lens[t.have++] = G;
  1648. else {
  1649. if (G === 16) {
  1650. for (N = S + 2; m < N; ) {
  1651. if (l === 0)
  1652. break t;
  1653. l--, d += i[a++] << m, m += 8;
  1654. }
  1655. if (d >>>= S, m -= S, t.have === 0) {
  1656. n.msg = "invalid bit length repeat", t.mode = Me;
  1657. break;
  1658. }
  1659. dt = t.lens[t.have - 1], p = 3 + (d & 3), d >>>= 2, m -= 2;
  1660. } else if (G === 17) {
  1661. for (N = S + 3; m < N; ) {
  1662. if (l === 0)
  1663. break t;
  1664. l--, d += i[a++] << m, m += 8;
  1665. }
  1666. d >>>= S, m -= S, dt = 0, p = 3 + (d & 7), d >>>= 3, m -= 3;
  1667. } else {
  1668. for (N = S + 7; m < N; ) {
  1669. if (l === 0)
  1670. break t;
  1671. l--, d += i[a++] << m, m += 8;
  1672. }
  1673. d >>>= S, m -= S, dt = 0, p = 11 + (d & 127), d >>>= 7, m -= 7;
  1674. }
  1675. if (t.have + p > t.nlen + t.ndist) {
  1676. n.msg = "invalid bit length repeat", t.mode = Me;
  1677. break;
  1678. }
  1679. for (; p--; )
  1680. t.lens[t.have++] = dt;
  1681. }
  1682. }
  1683. if (t.mode === Me)
  1684. break;
  1685. if (t.lens[256] === 0) {
  1686. n.msg = "invalid code -- missing end-of-block", t.mode = Me;
  1687. break;
  1688. }
  1689. if (t.lenbits = 9, tt = { bits: t.lenbits }, X = Ea(oh, t.lens, 0, t.nlen, t.lencode, 0, t.work, tt), t.lenbits = tt.bits, X) {
  1690. n.msg = "invalid literal/lengths set", t.mode = Me;
  1691. break;
  1692. }
  1693. if (t.distbits = 6, t.distcode = t.distdyn, tt = { bits: t.distbits }, X = Ea(lh, t.lens, t.nlen, t.ndist, t.distcode, 0, t.work, tt), t.distbits = tt.bits, X) {
  1694. n.msg = "invalid distances set", t.mode = Me;
  1695. break;
  1696. }
  1697. if (t.mode = vs, e === ms)
  1698. break t;
  1699. case vs:
  1700. t.mode = bs;
  1701. case bs:
  1702. if (l >= 6 && f >= 258) {
  1703. n.next_out = c, n.avail_out = f, n.next_in = a, n.avail_in = l, t.hold = d, t.bits = m, mc(n, k), c = n.next_out, s = n.output, f = n.avail_out, a = n.next_in, i = n.input, l = n.avail_in, d = t.hold, m = t.bits, t.mode === Or && (t.back = -1);
  1704. break;
  1705. }
  1706. for (t.back = 0; M = t.lencode[d & (1 << t.lenbits) - 1], S = M >>> 24, V = M >>> 16 & 255, G = M & 65535, !(S <= m); ) {
  1707. if (l === 0)
  1708. break t;
  1709. l--, d += i[a++] << m, m += 8;
  1710. }
  1711. if (V && !(V & 240)) {
  1712. for (q = S, it = V, vt = G; M = t.lencode[vt + ((d & (1 << q + it) - 1) >> q)], S = M >>> 24, V = M >>> 16 & 255, G = M & 65535, !(q + S <= m); ) {
  1713. if (l === 0)
  1714. break t;
  1715. l--, d += i[a++] << m, m += 8;
  1716. }
  1717. d >>>= q, m -= q, t.back += q;
  1718. }
  1719. if (d >>>= S, m -= S, t.back += S, t.length = G, V === 0) {
  1720. t.mode = cu;
  1721. break;
  1722. }
  1723. if (V & 32) {
  1724. t.back = -1, t.mode = Or;
  1725. break;
  1726. }
  1727. if (V & 64) {
  1728. n.msg = "invalid literal/length code", t.mode = Me;
  1729. break;
  1730. }
  1731. t.extra = V & 15, t.mode = lu;
  1732. case lu:
  1733. if (t.extra) {
  1734. for (N = t.extra; m < N; ) {
  1735. if (l === 0)
  1736. break t;
  1737. l--, d += i[a++] << m, m += 8;
  1738. }
  1739. t.length += d & (1 << t.extra) - 1, d >>>= t.extra, m -= t.extra, t.back += t.extra;
  1740. }
  1741. t.was = t.length, t.mode = uu;
  1742. case uu:
  1743. for (; M = t.distcode[d & (1 << t.distbits) - 1], S = M >>> 24, V = M >>> 16 & 255, G = M & 65535, !(S <= m); ) {
  1744. if (l === 0)
  1745. break t;
  1746. l--, d += i[a++] << m, m += 8;
  1747. }
  1748. if (!(V & 240)) {
  1749. for (q = S, it = V, vt = G; M = t.distcode[vt + ((d & (1 << q + it) - 1) >> q)], S = M >>> 24, V = M >>> 16 & 255, G = M & 65535, !(q + S <= m); ) {
  1750. if (l === 0)
  1751. break t;
  1752. l--, d += i[a++] << m, m += 8;
  1753. }
  1754. d >>>= q, m -= q, t.back += q;
  1755. }
  1756. if (d >>>= S, m -= S, t.back += S, V & 64) {
  1757. n.msg = "invalid distance code", t.mode = Me;
  1758. break;
  1759. }
  1760. t.offset = G, t.extra = V & 15, t.mode = hu;
  1761. case hu:
  1762. if (t.extra) {
  1763. for (N = t.extra; m < N; ) {
  1764. if (l === 0)
  1765. break t;
  1766. l--, d += i[a++] << m, m += 8;
  1767. }
  1768. t.offset += d & (1 << t.extra) - 1, d >>>= t.extra, m -= t.extra, t.back += t.extra;
  1769. }
  1770. if (t.offset > t.dmax) {
  1771. n.msg = "invalid distance too far back", t.mode = Me;
  1772. break;
  1773. }
  1774. t.mode = fu;
  1775. case fu:
  1776. if (f === 0)
  1777. break t;
  1778. if (p = k - f, t.offset > p) {
  1779. if (p = t.offset - p, p > t.whave && t.sane) {
  1780. n.msg = "invalid distance too far back", t.mode = Me;
  1781. break;
  1782. }
  1783. p > t.wnext ? (p -= t.wnext, j = t.wsize - p) : j = t.wnext - p, p > t.length && (p = t.length), O = t.window;
  1784. } else
  1785. O = s, j = c - t.offset, p = t.length;
  1786. p > f && (p = f), f -= p, t.length -= p;
  1787. do
  1788. s[c++] = O[j++];
  1789. while (--p);
  1790. t.length === 0 && (t.mode = bs);
  1791. break;
  1792. case cu:
  1793. if (f === 0)
  1794. break t;
  1795. s[c++] = t.length, f--, t.mode = bs;
  1796. break;
  1797. case _o:
  1798. if (t.wrap) {
  1799. for (; m < 32; ) {
  1800. if (l === 0)
  1801. break t;
  1802. l--, d |= i[a++] << m, m += 8;
  1803. }
  1804. if (k -= f, n.total_out += k, t.total += k, t.wrap & 4 && k && (n.adler = t.check = /*UPDATE_CHECK(state.check, put - _out, _out);*/
  1805. t.flags ? dr(t.check, s, k, c - k) : zo(t.check, s, k, c - k)), k = f, t.wrap & 4 && (t.flags ? d : gu(d)) !== t.check) {
  1806. n.msg = "incorrect data check", t.mode = Me;
  1807. break;
  1808. }
  1809. d = 0, m = 0;
  1810. }
  1811. t.mode = du;
  1812. case du:
  1813. if (t.wrap && t.flags) {
  1814. for (; m < 32; ) {
  1815. if (l === 0)
  1816. break t;
  1817. l--, d += i[a++] << m, m += 8;
  1818. }
  1819. if (t.wrap & 4 && d !== (t.total & 4294967295)) {
  1820. n.msg = "incorrect length check", t.mode = Me;
  1821. break;
  1822. }
  1823. d = 0, m = 0;
  1824. }
  1825. t.mode = pu;
  1826. case pu:
  1827. X = Nc;
  1828. break t;
  1829. case Me:
  1830. X = uh;
  1831. break t;
  1832. case fh:
  1833. return hh;
  1834. case ch:
  1835. default:
  1836. return Vn;
  1837. }
  1838. return n.next_out = c, n.avail_out = f, n.next_in = a, n.avail_in = l, t.hold = d, t.bits = m, (t.wsize || k !== n.avail_out && t.mode < Me && (t.mode < _o || e !== Gl)) && vh(n, n.output, n.next_out, k - n.avail_out), _ -= n.avail_in, k -= n.avail_out, n.total_in += _, n.total_out += k, t.total += k, t.wrap & 4 && k && (n.adler = t.check = /*UPDATE_CHECK(state.check, strm.next_out - _out, _out);*/
  1839. t.flags ? dr(t.check, s, k, n.next_out - k) : zo(t.check, s, k, n.next_out - k)), n.data_type = t.bits + (t.last ? 64 : 0) + (t.mode === Or ? 128 : 0) + (t.mode === vs || t.mode === xo ? 256 : 0), (_ === 0 && k === 0 || e === Gl) && X === _i && (X = Sc), X;
  1840. }, Bc = (n) => {
  1841. if (Ni(n))
  1842. return Vn;
  1843. let e = n.state;
  1844. return e.window && (e.window = null), n.state = null, _i;
  1845. }, Mc = (n, e) => {
  1846. if (Ni(n))
  1847. return Vn;
  1848. const t = n.state;
  1849. return t.wrap & 2 ? (t.head = e, e.done = !1, _i) : Vn;
  1850. }, Rc = (n, e) => {
  1851. const t = e.length;
  1852. let i, s, a;
  1853. return Ni(n) || (i = n.state, i.wrap !== 0 && i.mode !== Fs) ? Vn : i.mode === Fs && (s = 1, s = zo(s, e, t, 0), s !== i.check) ? uh : (a = vh(n, e, t, t), a ? (i.mode = fh, hh) : (i.havedict = 1, _i));
  1854. };
  1855. var Tc = ph, Dc = gh, qc = dh, Uc = Ec, zc = mh, Hc = jc, Wc = Bc, Vc = Mc, Gc = Rc, Yc = "pako inflate (from Nodeca project)", gr = {
  1856. inflateReset: Tc,
  1857. inflateReset2: Dc,
  1858. inflateResetKeep: qc,
  1859. inflateInit: Uc,
  1860. inflateInit2: zc,
  1861. inflate: Hc,
  1862. inflateEnd: Wc,
  1863. inflateGetHeader: Vc,
  1864. inflateSetDictionary: Gc,
  1865. inflateInfo: Yc
  1866. };
  1867. function Jc() {
  1868. this.text = 0, this.time = 0, this.xflags = 0, this.os = 0, this.extra = null, this.extra_len = 0, this.name = "", this.comment = "", this.hcrc = 0, this.done = !1;
  1869. }
  1870. var Kc = Jc;
  1871. const bh = Object.prototype.toString, {
  1872. Z_NO_FLUSH: Xc,
  1873. Z_FINISH: vu,
  1874. Z_OK: ta,
  1875. Z_STREAM_END: Lo,
  1876. Z_NEED_DICT: So,
  1877. Z_STREAM_ERROR: $c,
  1878. Z_DATA_ERROR: bu,
  1879. Z_MEM_ERROR: Zc,
  1880. Z_BUF_ERROR: wu
  1881. } = ih, Qc = {
  1882. chunkSize: 1024 * 64,
  1883. windowBits: 15,
  1884. to: ""
  1885. };
  1886. function ja(n) {
  1887. this.options = ah.assign({}, Qc, n || {});
  1888. const e = this.options;
  1889. e.raw && e.windowBits >= 0 && e.windowBits < 16 && (e.windowBits = -e.windowBits, e.windowBits === 0 && (e.windowBits = -15)), e.windowBits >= 0 && e.windowBits < 16 && !(n && n.windowBits) && (e.windowBits += 32), e.windowBits > 15 && e.windowBits < 48 && (e.windowBits & 15 || (e.windowBits |= 15)), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new pc(), this.strm.avail_out = 0;
  1890. let t = gr.inflateInit2(
  1891. this.strm,
  1892. e.windowBits
  1893. );
  1894. if (t !== ta)
  1895. throw new Error(Ho[t]);
  1896. if (this.header = new Kc(), gr.inflateGetHeader(this.strm, this.header), e.dictionary && (typeof e.dictionary == "string" ? e.dictionary = Wo.string2buf(e.dictionary) : bh.call(e.dictionary) === "[object ArrayBuffer]" && (e.dictionary = new Uint8Array(e.dictionary)), e.raw && (t = gr.inflateSetDictionary(this.strm, e.dictionary), t !== ta)))
  1897. throw new Error(Ho[t]);
  1898. }
  1899. ja.prototype.push = function(n, e) {
  1900. const t = this.strm, i = this.options.chunkSize, s = this.options.dictionary;
  1901. let a, c, l;
  1902. if (this.ended) return !1;
  1903. for (e === ~~e ? c = e : c = e === !0 ? vu : Xc, bh.call(n) === "[object ArrayBuffer]" ? t.input = new Uint8Array(n) : t.input = n, t.next_in = 0, t.avail_in = t.input.length; ; ) {
  1904. for (t.avail_out === 0 && (t.output = new Uint8Array(i), t.next_out = 0, t.avail_out = i), a = gr.inflate(t, c), a === So && s && (a = gr.inflateSetDictionary(t, s), a === ta ? a = gr.inflate(t, c) : a === bu && (a = So)); t.avail_in > 0 && a === Lo && t.state.wrap & 2 && t.state.flags !== 0 && t.input[t.next_in] !== 0; )
  1905. gr.inflateReset(t), a = gr.inflate(t, c);
  1906. switch (a) {
  1907. case $c:
  1908. case bu:
  1909. case So:
  1910. case Zc:
  1911. return this.onEnd(a), this.ended = !0, !1;
  1912. }
  1913. if (l = t.avail_out, t.next_out && (t.avail_out === 0 || a === Lo || c > 0))
  1914. if (this.options.to === "string") {
  1915. let f = Wo.utf8border(t.output, t.next_out), d = t.next_out - f, m = Wo.buf2string(t.output, f);
  1916. t.next_out = d, t.avail_out = i - d, d && t.output.set(t.output.subarray(f, f + d), 0), this.onData(m);
  1917. } else
  1918. this.onData(t.output.length === t.next_out ? t.output : t.output.subarray(0, t.next_out)), t.avail_out = 0, t.next_out = 0;
  1919. if (!((a === ta || a === wu) && l === 0)) {
  1920. if (a === Lo)
  1921. return a = gr.inflateEnd(this.strm), this.onEnd(a), this.ended = !0, !0;
  1922. if (t.avail_in === 0) {
  1923. if (c === vu)
  1924. return a = gr.inflateEnd(this.strm), this.onEnd(a === ta ? wu : a), this.ended = !0, !1;
  1925. break;
  1926. }
  1927. }
  1928. }
  1929. return !0;
  1930. };
  1931. ja.prototype.onData = function(n) {
  1932. this.chunks.push(n);
  1933. };
  1934. ja.prototype.onEnd = function(n) {
  1935. n === ta && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = ah.flattenChunks(this.chunks)), this.chunks = [], this.err = n, this.msg = this.strm.msg;
  1936. };
  1937. function t1(n, e) {
  1938. const t = new ja(e);
  1939. if (t.push(n, !0), t.err) throw t.msg || Ho[t.err];
  1940. return t.result;
  1941. }
  1942. var e1 = ja, n1 = t1, r1 = {
  1943. Inflate: e1,
  1944. inflate: n1
  1945. };
  1946. const { Inflate: i1, inflate: a1 } = r1;
  1947. var yu = i1, s1 = a1;
  1948. const wh = [];
  1949. for (let n = 0; n < 256; n++) {
  1950. let e = n;
  1951. for (let t = 0; t < 8; t++)
  1952. e & 1 ? e = 3988292384 ^ e >>> 1 : e = e >>> 1;
  1953. wh[n] = e;
  1954. }
  1955. const xu = 4294967295;
  1956. function o1(n, e, t) {
  1957. let i = n;
  1958. for (let s = 0; s < t; s++)
  1959. i = wh[(i ^ e[s]) & 255] ^ i >>> 8;
  1960. return i;
  1961. }
  1962. function l1(n, e) {
  1963. return (o1(xu, n, e) ^ xu) >>> 0;
  1964. }
  1965. function _u(n, e, t) {
  1966. const i = n.readUint32(), s = l1(new Uint8Array(n.buffer, n.byteOffset + n.offset - e - 4, e), e);
  1967. if (s !== i)
  1968. throw new Error(`CRC mismatch for chunk ${t}. Expected ${i}, found ${s}`);
  1969. }
  1970. function yh(n, e, t) {
  1971. for (let i = 0; i < t; i++)
  1972. e[i] = n[i];
  1973. }
  1974. function xh(n, e, t, i) {
  1975. let s = 0;
  1976. for (; s < i; s++)
  1977. e[s] = n[s];
  1978. for (; s < t; s++)
  1979. e[s] = n[s] + e[s - i] & 255;
  1980. }
  1981. function _h(n, e, t, i) {
  1982. let s = 0;
  1983. if (t.length === 0)
  1984. for (; s < i; s++)
  1985. e[s] = n[s];
  1986. else
  1987. for (; s < i; s++)
  1988. e[s] = n[s] + t[s] & 255;
  1989. }
  1990. function Ah(n, e, t, i, s) {
  1991. let a = 0;
  1992. if (t.length === 0) {
  1993. for (; a < s; a++)
  1994. e[a] = n[a];
  1995. for (; a < i; a++)
  1996. e[a] = n[a] + (e[a - s] >> 1) & 255;
  1997. } else {
  1998. for (; a < s; a++)
  1999. e[a] = n[a] + (t[a] >> 1) & 255;
  2000. for (; a < i; a++)
  2001. e[a] = n[a] + (e[a - s] + t[a] >> 1) & 255;
  2002. }
  2003. }
  2004. function Nh(n, e, t, i, s) {
  2005. let a = 0;
  2006. if (t.length === 0) {
  2007. for (; a < s; a++)
  2008. e[a] = n[a];
  2009. for (; a < i; a++)
  2010. e[a] = n[a] + e[a - s] & 255;
  2011. } else {
  2012. for (; a < s; a++)
  2013. e[a] = n[a] + t[a] & 255;
  2014. for (; a < i; a++)
  2015. e[a] = n[a] + u1(e[a - s], t[a], t[a - s]) & 255;
  2016. }
  2017. }
  2018. function u1(n, e, t) {
  2019. const i = n + e - t, s = Math.abs(i - n), a = Math.abs(i - e), c = Math.abs(i - t);
  2020. return s <= a && s <= c ? n : a <= c ? e : t;
  2021. }
  2022. function h1(n, e, t, i, s, a) {
  2023. switch (n) {
  2024. case 0:
  2025. yh(e, t, s);
  2026. break;
  2027. case 1:
  2028. xh(e, t, s, a);
  2029. break;
  2030. case 2:
  2031. _h(e, t, i, s);
  2032. break;
  2033. case 3:
  2034. Ah(e, t, i, s, a);
  2035. break;
  2036. case 4:
  2037. Nh(e, t, i, s, a);
  2038. break;
  2039. default:
  2040. throw new Error(`Unsupported filter: ${n}`);
  2041. }
  2042. }
  2043. const f1 = new Uint16Array([255]), c1 = new Uint8Array(f1.buffer), d1 = c1[0] === 255;
  2044. function p1(n) {
  2045. const { data: e, width: t, height: i, channels: s, depth: a } = n, c = [
  2046. { x: 0, y: 0, xStep: 8, yStep: 8 },
  2047. // Pass 1
  2048. { x: 4, y: 0, xStep: 8, yStep: 8 },
  2049. // Pass 2
  2050. { x: 0, y: 4, xStep: 4, yStep: 8 },
  2051. // Pass 3
  2052. { x: 2, y: 0, xStep: 4, yStep: 4 },
  2053. // Pass 4
  2054. { x: 0, y: 2, xStep: 2, yStep: 4 },
  2055. // Pass 5
  2056. { x: 1, y: 0, xStep: 2, yStep: 2 },
  2057. // Pass 6
  2058. { x: 0, y: 1, xStep: 1, yStep: 2 }
  2059. // Pass 7
  2060. ], l = Math.ceil(a / 8) * s, f = new Uint8Array(i * t * l);
  2061. let d = 0;
  2062. for (let m = 0; m < 7; m++) {
  2063. const _ = c[m], k = Math.ceil((t - _.x) / _.xStep), p = Math.ceil((i - _.y) / _.yStep);
  2064. if (k <= 0 || p <= 0)
  2065. continue;
  2066. const j = k * l, O = new Uint8Array(j);
  2067. for (let M = 0; M < p; M++) {
  2068. const S = e[d++], V = e.subarray(d, d + j);
  2069. d += j;
  2070. const G = new Uint8Array(j);
  2071. h1(S, V, G, O, j, l), O.set(G);
  2072. for (let q = 0; q < k; q++) {
  2073. const it = _.x + q * _.xStep, vt = _.y + M * _.yStep;
  2074. if (!(it >= t || vt >= i))
  2075. for (let dt = 0; dt < l; dt++)
  2076. f[(vt * t + it) * l + dt] = G[q * l + dt];
  2077. }
  2078. }
  2079. }
  2080. if (a === 16) {
  2081. const m = new Uint16Array(f.buffer);
  2082. if (d1)
  2083. for (let _ = 0; _ < m.length; _++)
  2084. m[_] = g1(m[_]);
  2085. return m;
  2086. } else
  2087. return f;
  2088. }
  2089. function g1(n) {
  2090. return (n & 255) << 8 | n >> 8 & 255;
  2091. }
  2092. const m1 = new Uint16Array([255]), v1 = new Uint8Array(m1.buffer), b1 = v1[0] === 255, w1 = new Uint8Array(0);
  2093. function Au(n) {
  2094. const { data: e, width: t, height: i, channels: s, depth: a } = n, c = Math.ceil(a / 8) * s, l = Math.ceil(a / 8 * s * t), f = new Uint8Array(i * l);
  2095. let d = w1, m = 0, _, k;
  2096. for (let p = 0; p < i; p++) {
  2097. switch (_ = e.subarray(m + 1, m + 1 + l), k = f.subarray(p * l, (p + 1) * l), e[m]) {
  2098. case 0:
  2099. yh(_, k, l);
  2100. break;
  2101. case 1:
  2102. xh(_, k, l, c);
  2103. break;
  2104. case 2:
  2105. _h(_, k, d, l);
  2106. break;
  2107. case 3:
  2108. Ah(_, k, d, l, c);
  2109. break;
  2110. case 4:
  2111. Nh(_, k, d, l, c);
  2112. break;
  2113. default:
  2114. throw new Error(`Unsupported filter: ${e[m]}`);
  2115. }
  2116. d = k, m += l + 1;
  2117. }
  2118. if (a === 16) {
  2119. const p = new Uint16Array(f.buffer);
  2120. if (b1)
  2121. for (let j = 0; j < p.length; j++)
  2122. p[j] = y1(p[j]);
  2123. return p;
  2124. } else
  2125. return f;
  2126. }
  2127. function y1(n) {
  2128. return (n & 255) << 8 | n >> 8 & 255;
  2129. }
  2130. const As = Uint8Array.of(137, 80, 78, 71, 13, 10, 26, 10);
  2131. function Nu(n) {
  2132. if (!x1(n.readBytes(As.length)))
  2133. throw new Error("wrong PNG signature");
  2134. }
  2135. function x1(n) {
  2136. if (n.length < As.length)
  2137. return !1;
  2138. for (let e = 0; e < As.length; e++)
  2139. if (n[e] !== As[e])
  2140. return !1;
  2141. return !0;
  2142. }
  2143. const _1 = "tEXt", A1 = 0, Lh = new TextDecoder("latin1");
  2144. function N1(n) {
  2145. if (S1(n), n.length === 0 || n.length > 79)
  2146. throw new Error("keyword length must be between 1 and 79");
  2147. }
  2148. const L1 = /^[\u0000-\u00FF]*$/;
  2149. function S1(n) {
  2150. if (!L1.test(n))
  2151. throw new Error("invalid latin1 text");
  2152. }
  2153. function k1(n, e, t) {
  2154. const i = Sh(e);
  2155. n[i] = P1(e, t - i.length - 1);
  2156. }
  2157. function Sh(n) {
  2158. for (n.mark(); n.readByte() !== A1; )
  2159. ;
  2160. const e = n.offset;
  2161. n.reset();
  2162. const t = Lh.decode(n.readBytes(e - n.offset - 1));
  2163. return n.skip(1), N1(t), t;
  2164. }
  2165. function P1(n, e) {
  2166. return Lh.decode(n.readBytes(e));
  2167. }
  2168. const Mn = {
  2169. UNKNOWN: -1,
  2170. GREYSCALE: 0,
  2171. TRUECOLOUR: 2,
  2172. INDEXED_COLOUR: 3,
  2173. GREYSCALE_ALPHA: 4,
  2174. TRUECOLOUR_ALPHA: 6
  2175. }, ko = {
  2176. UNKNOWN: -1,
  2177. DEFLATE: 0
  2178. }, Lu = {
  2179. UNKNOWN: -1,
  2180. ADAPTIVE: 0
  2181. }, Po = {
  2182. UNKNOWN: -1,
  2183. NO_INTERLACE: 0,
  2184. ADAM7: 1
  2185. }, ws = {
  2186. NONE: 0,
  2187. BACKGROUND: 1,
  2188. PREVIOUS: 2
  2189. }, Io = {
  2190. SOURCE: 0,
  2191. OVER: 1
  2192. };
  2193. class I1 extends Zo {
  2194. constructor(t, i = {}) {
  2195. super(t);
  2196. xe(this, "_checkCrc");
  2197. xe(this, "_inflator");
  2198. xe(this, "_png");
  2199. xe(this, "_apng");
  2200. xe(this, "_end");
  2201. xe(this, "_hasPalette");
  2202. xe(this, "_palette");
  2203. xe(this, "_hasTransparency");
  2204. xe(this, "_transparency");
  2205. xe(this, "_compressionMethod");
  2206. xe(this, "_filterMethod");
  2207. xe(this, "_interlaceMethod");
  2208. xe(this, "_colorType");
  2209. xe(this, "_isAnimated");
  2210. xe(this, "_numberOfFrames");
  2211. xe(this, "_numberOfPlays");
  2212. xe(this, "_frames");
  2213. xe(this, "_writingDataChunks");
  2214. const { checkCrc: s = !1 } = i;
  2215. this._checkCrc = s, this._inflator = new yu(), this._png = {
  2216. width: -1,
  2217. height: -1,
  2218. channels: -1,
  2219. data: new Uint8Array(0),
  2220. depth: 1,
  2221. text: {}
  2222. }, this._apng = {
  2223. width: -1,
  2224. height: -1,
  2225. channels: -1,
  2226. depth: 1,
  2227. numberOfFrames: 1,
  2228. numberOfPlays: 0,
  2229. text: {},
  2230. frames: []
  2231. }, this._end = !1, this._hasPalette = !1, this._palette = [], this._hasTransparency = !1, this._transparency = new Uint16Array(0), this._compressionMethod = ko.UNKNOWN, this._filterMethod = Lu.UNKNOWN, this._interlaceMethod = Po.UNKNOWN, this._colorType = Mn.UNKNOWN, this._isAnimated = !1, this._numberOfFrames = 1, this._numberOfPlays = 0, this._frames = [], this._writingDataChunks = !1, this.setBigEndian();
  2232. }
  2233. decode() {
  2234. for (Nu(this); !this._end; ) {
  2235. const t = this.readUint32(), i = this.readChars(4);
  2236. this.decodeChunk(t, i);
  2237. }
  2238. return this.decodeImage(), this._png;
  2239. }
  2240. decodeApng() {
  2241. for (Nu(this); !this._end; ) {
  2242. const t = this.readUint32(), i = this.readChars(4);
  2243. this.decodeApngChunk(t, i);
  2244. }
  2245. return this.decodeApngImage(), this._apng;
  2246. }
  2247. // https://www.w3.org/TR/PNG/#5Chunk-layout
  2248. decodeChunk(t, i) {
  2249. const s = this.offset;
  2250. switch (i) {
  2251. case "IHDR":
  2252. this.decodeIHDR();
  2253. break;
  2254. case "PLTE":
  2255. this.decodePLTE(t);
  2256. break;
  2257. case "IDAT":
  2258. this.decodeIDAT(t);
  2259. break;
  2260. case "IEND":
  2261. this._end = !0;
  2262. break;
  2263. case "tRNS":
  2264. this.decodetRNS(t);
  2265. break;
  2266. case "iCCP":
  2267. this.decodeiCCP(t);
  2268. break;
  2269. case _1:
  2270. k1(this._png.text, this, t);
  2271. break;
  2272. case "pHYs":
  2273. this.decodepHYs();
  2274. break;
  2275. default:
  2276. this.skip(t);
  2277. break;
  2278. }
  2279. if (this.offset - s !== t)
  2280. throw new Error(`Length mismatch while decoding chunk ${i}`);
  2281. this._checkCrc ? _u(this, t + 4, i) : this.skip(4);
  2282. }
  2283. decodeApngChunk(t, i) {
  2284. const s = this.offset;
  2285. switch (i !== "fdAT" && i !== "IDAT" && this._writingDataChunks && this.pushDataToFrame(), i) {
  2286. case "acTL":
  2287. this.decodeACTL();
  2288. break;
  2289. case "fcTL":
  2290. this.decodeFCTL();
  2291. break;
  2292. case "fdAT":
  2293. this.decodeFDAT(t);
  2294. break;
  2295. default:
  2296. this.decodeChunk(t, i), this.offset = s + t;
  2297. break;
  2298. }
  2299. if (this.offset - s !== t)
  2300. throw new Error(`Length mismatch while decoding chunk ${i}`);
  2301. this._checkCrc ? _u(this, t + 4, i) : this.skip(4);
  2302. }
  2303. // https://www.w3.org/TR/PNG/#11IHDR
  2304. decodeIHDR() {
  2305. const t = this._png;
  2306. t.width = this.readUint32(), t.height = this.readUint32(), t.depth = F1(this.readUint8());
  2307. const i = this.readUint8();
  2308. this._colorType = i;
  2309. let s;
  2310. switch (i) {
  2311. case Mn.GREYSCALE:
  2312. s = 1;
  2313. break;
  2314. case Mn.TRUECOLOUR:
  2315. s = 3;
  2316. break;
  2317. case Mn.INDEXED_COLOUR:
  2318. s = 1;
  2319. break;
  2320. case Mn.GREYSCALE_ALPHA:
  2321. s = 2;
  2322. break;
  2323. case Mn.TRUECOLOUR_ALPHA:
  2324. s = 4;
  2325. break;
  2326. case Mn.UNKNOWN:
  2327. default:
  2328. throw new Error(`Unknown color type: ${i}`);
  2329. }
  2330. if (this._png.channels = s, this._compressionMethod = this.readUint8(), this._compressionMethod !== ko.DEFLATE)
  2331. throw new Error(`Unsupported compression method: ${this._compressionMethod}`);
  2332. this._filterMethod = this.readUint8(), this._interlaceMethod = this.readUint8();
  2333. }
  2334. decodeACTL() {
  2335. this._numberOfFrames = this.readUint32(), this._numberOfPlays = this.readUint32(), this._isAnimated = !0;
  2336. }
  2337. decodeFCTL() {
  2338. const t = {
  2339. sequenceNumber: this.readUint32(),
  2340. width: this.readUint32(),
  2341. height: this.readUint32(),
  2342. xOffset: this.readUint32(),
  2343. yOffset: this.readUint32(),
  2344. delayNumber: this.readUint16(),
  2345. delayDenominator: this.readUint16(),
  2346. disposeOp: this.readUint8(),
  2347. blendOp: this.readUint8(),
  2348. data: new Uint8Array(0)
  2349. };
  2350. this._frames.push(t);
  2351. }
  2352. // https://www.w3.org/TR/PNG/#11PLTE
  2353. decodePLTE(t) {
  2354. if (t % 3 !== 0)
  2355. throw new RangeError(`PLTE field length must be a multiple of 3. Got ${t}`);
  2356. const i = t / 3;
  2357. this._hasPalette = !0;
  2358. const s = [];
  2359. this._palette = s;
  2360. for (let a = 0; a < i; a++)
  2361. s.push([this.readUint8(), this.readUint8(), this.readUint8()]);
  2362. }
  2363. // https://www.w3.org/TR/PNG/#11IDAT
  2364. decodeIDAT(t) {
  2365. this._writingDataChunks = !0;
  2366. const i = t, s = this.offset + this.byteOffset;
  2367. if (this._inflator.push(new Uint8Array(this.buffer, s, i)), this._inflator.err)
  2368. throw new Error(`Error while decompressing the data: ${this._inflator.err}`);
  2369. this.skip(t);
  2370. }
  2371. decodeFDAT(t) {
  2372. this._writingDataChunks = !0;
  2373. let i = t, s = this.offset + this.byteOffset;
  2374. if (s += 4, i -= 4, this._inflator.push(new Uint8Array(this.buffer, s, i)), this._inflator.err)
  2375. throw new Error(`Error while decompressing the data: ${this._inflator.err}`);
  2376. this.skip(t);
  2377. }
  2378. // https://www.w3.org/TR/PNG/#11tRNS
  2379. decodetRNS(t) {
  2380. switch (this._colorType) {
  2381. case Mn.GREYSCALE:
  2382. case Mn.TRUECOLOUR: {
  2383. if (t % 2 !== 0)
  2384. throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${t}`);
  2385. if (t / 2 > this._png.width * this._png.height)
  2386. throw new Error(`tRNS chunk contains more alpha values than there are pixels (${t / 2} vs ${this._png.width * this._png.height})`);
  2387. this._hasTransparency = !0, this._transparency = new Uint16Array(t / 2);
  2388. for (let i = 0; i < t / 2; i++)
  2389. this._transparency[i] = this.readUint16();
  2390. break;
  2391. }
  2392. case Mn.INDEXED_COLOUR: {
  2393. if (t > this._palette.length)
  2394. throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${t} vs ${this._palette.length})`);
  2395. let i = 0;
  2396. for (; i < t; i++) {
  2397. const s = this.readByte();
  2398. this._palette[i].push(s);
  2399. }
  2400. for (; i < this._palette.length; i++)
  2401. this._palette[i].push(255);
  2402. break;
  2403. }
  2404. case Mn.UNKNOWN:
  2405. case Mn.GREYSCALE_ALPHA:
  2406. case Mn.TRUECOLOUR_ALPHA:
  2407. default:
  2408. throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`);
  2409. }
  2410. }
  2411. // https://www.w3.org/TR/PNG/#11iCCP
  2412. decodeiCCP(t) {
  2413. const i = Sh(this), s = this.readUint8();
  2414. if (s !== ko.DEFLATE)
  2415. throw new Error(`Unsupported iCCP compression method: ${s}`);
  2416. const a = this.readBytes(t - i.length - 2);
  2417. this._png.iccEmbeddedProfile = {
  2418. name: i,
  2419. profile: s1(a)
  2420. };
  2421. }
  2422. // https://www.w3.org/TR/PNG/#11pHYs
  2423. decodepHYs() {
  2424. const t = this.readUint32(), i = this.readUint32(), s = this.readByte();
  2425. this._png.resolution = { x: t, y: i, unit: s };
  2426. }
  2427. decodeApngImage() {
  2428. this._apng.width = this._png.width, this._apng.height = this._png.height, this._apng.channels = this._png.channels, this._apng.depth = this._png.depth, this._apng.numberOfFrames = this._numberOfFrames, this._apng.numberOfPlays = this._numberOfPlays, this._apng.text = this._png.text, this._apng.resolution = this._png.resolution;
  2429. for (let t = 0; t < this._numberOfFrames; t++) {
  2430. const i = {
  2431. sequenceNumber: this._frames[t].sequenceNumber,
  2432. delayNumber: this._frames[t].delayNumber,
  2433. delayDenominator: this._frames[t].delayDenominator,
  2434. data: this._apng.depth === 8 ? new Uint8Array(this._apng.width * this._apng.height * this._apng.channels) : new Uint16Array(this._apng.width * this._apng.height * this._apng.channels)
  2435. }, s = this._frames.at(t);
  2436. if (s) {
  2437. if (s.data = Au({
  2438. data: s.data,
  2439. width: s.width,
  2440. height: s.height,
  2441. channels: this._apng.channels,
  2442. depth: this._apng.depth
  2443. }), this._hasPalette && (this._apng.palette = this._palette), this._hasTransparency && (this._apng.transparency = this._transparency), t === 0 || s.xOffset === 0 && s.yOffset === 0 && s.width === this._png.width && s.height === this._png.height)
  2444. i.data = s.data;
  2445. else {
  2446. const a = this._apng.frames.at(t - 1);
  2447. this.disposeFrame(s, a, i), this.addFrameDataToCanvas(i, s);
  2448. }
  2449. this._apng.frames.push(i);
  2450. }
  2451. }
  2452. return this._apng;
  2453. }
  2454. disposeFrame(t, i, s) {
  2455. switch (t.disposeOp) {
  2456. case ws.NONE:
  2457. break;
  2458. case ws.BACKGROUND:
  2459. for (let a = 0; a < this._png.height; a++)
  2460. for (let c = 0; c < this._png.width; c++) {
  2461. const l = (a * t.width + c) * this._png.channels;
  2462. for (let f = 0; f < this._png.channels; f++)
  2463. s.data[l + f] = 0;
  2464. }
  2465. break;
  2466. case ws.PREVIOUS:
  2467. s.data.set(i.data);
  2468. break;
  2469. default:
  2470. throw new Error("Unknown disposeOp");
  2471. }
  2472. }
  2473. addFrameDataToCanvas(t, i) {
  2474. const s = 1 << this._png.depth, a = (c, l) => {
  2475. const f = ((c + i.yOffset) * this._png.width + i.xOffset + l) * this._png.channels, d = (c * i.width + l) * this._png.channels;
  2476. return { index: f, frameIndex: d };
  2477. };
  2478. switch (i.blendOp) {
  2479. case Io.SOURCE:
  2480. for (let c = 0; c < i.height; c++)
  2481. for (let l = 0; l < i.width; l++) {
  2482. const { index: f, frameIndex: d } = a(c, l);
  2483. for (let m = 0; m < this._png.channels; m++)
  2484. t.data[f + m] = i.data[d + m];
  2485. }
  2486. break;
  2487. case Io.OVER:
  2488. for (let c = 0; c < i.height; c++)
  2489. for (let l = 0; l < i.width; l++) {
  2490. const { index: f, frameIndex: d } = a(c, l);
  2491. for (let m = 0; m < this._png.channels; m++) {
  2492. const _ = i.data[d + this._png.channels - 1] / s, k = m % (this._png.channels - 1) === 0 ? 1 : i.data[d + m], p = Math.floor(_ * k + (1 - _) * t.data[f + m]);
  2493. t.data[f + m] += p;
  2494. }
  2495. }
  2496. break;
  2497. default:
  2498. throw new Error("Unknown blendOp");
  2499. }
  2500. }
  2501. decodeImage() {
  2502. var i;
  2503. if (this._inflator.err)
  2504. throw new Error(`Error while decompressing the data: ${this._inflator.err}`);
  2505. const t = this._isAnimated ? ((i = this._frames) == null ? void 0 : i.at(0)).data : this._inflator.result;
  2506. if (this._filterMethod !== Lu.ADAPTIVE)
  2507. throw new Error(`Filter method ${this._filterMethod} not supported`);
  2508. if (this._interlaceMethod === Po.NO_INTERLACE)
  2509. this._png.data = Au({
  2510. data: t,
  2511. width: this._png.width,
  2512. height: this._png.height,
  2513. channels: this._png.channels,
  2514. depth: this._png.depth
  2515. });
  2516. else if (this._interlaceMethod === Po.ADAM7)
  2517. this._png.data = p1({
  2518. data: t,
  2519. width: this._png.width,
  2520. height: this._png.height,
  2521. channels: this._png.channels,
  2522. depth: this._png.depth
  2523. });
  2524. else
  2525. throw new Error(`Interlace method ${this._interlaceMethod} not supported`);
  2526. this._hasPalette && (this._png.palette = this._palette), this._hasTransparency && (this._png.transparency = this._transparency);
  2527. }
  2528. pushDataToFrame() {
  2529. const t = this._inflator.result, i = this._frames.at(-1);
  2530. i ? i.data = t : this._frames.push({
  2531. sequenceNumber: 0,
  2532. width: this._png.width,
  2533. height: this._png.height,
  2534. xOffset: 0,
  2535. yOffset: 0,
  2536. delayNumber: 0,
  2537. delayDenominator: 0,
  2538. disposeOp: ws.NONE,
  2539. blendOp: Io.SOURCE,
  2540. data: t
  2541. }), this._inflator = new yu(), this._writingDataChunks = !1;
  2542. }
  2543. }
  2544. function F1(n) {
  2545. if (n !== 1 && n !== 2 && n !== 4 && n !== 8 && n !== 16)
  2546. throw new Error(`invalid bit depth: ${n}`);
  2547. return n;
  2548. }
  2549. var Su;
  2550. (function(n) {
  2551. n[n.UNKNOWN = 0] = "UNKNOWN", n[n.METRE = 1] = "METRE";
  2552. })(Su || (Su = {}));
  2553. function C1(n, e) {
  2554. return new I1(n, e).decode();
  2555. }
  2556. /** @license
  2557. *
  2558. * jsPDF - PDF Document creation from JavaScript
  2559. * Version 4.2.1 Built on 2026-03-17T11:11:27.057Z
  2560. * CommitID 00000000
  2561. *
  2562. * Copyright (c) 2010-2025 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
  2563. * 2015-2025 yWorks GmbH, http://www.yworks.com
  2564. * 2015-2025 Lukas Holländer <lukas.hollaender@yworks.com>, https://github.com/HackbrettXXX
  2565. * 2016-2018 Aras Abbasi <aras.abbasi@gmail.com>
  2566. * 2010 Aaron Spike, https://github.com/acspike
  2567. * 2012 Willow Systems Corporation, https://github.com/willowsystems
  2568. * 2012 Pablo Hess, https://github.com/pablohess
  2569. * 2012 Florian Jenett, https://github.com/fjenett
  2570. * 2013 Warren Weckesser, https://github.com/warrenweckesser
  2571. * 2013 Youssef Beddad, https://github.com/lifof
  2572. * 2013 Lee Driscoll, https://github.com/lsdriscoll
  2573. * 2013 Stefan Slonevskiy, https://github.com/stefslon
  2574. * 2013 Jeremy Morel, https://github.com/jmorel
  2575. * 2013 Christoph Hartmann, https://github.com/chris-rock
  2576. * 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria
  2577. * 2014 James Makes, https://github.com/dollaruw
  2578. * 2014 Diego Casorran, https://github.com/diegocr
  2579. * 2014 Steven Spungin, https://github.com/Flamenco
  2580. * 2014 Kenneth Glassey, https://github.com/Gavvers
  2581. *
  2582. * Permission is hereby granted, free of charge, to any person obtaining
  2583. * a copy of this software and associated documentation files (the
  2584. * "Software"), to deal in the Software without restriction, including
  2585. * without limitation the rights to use, copy, modify, merge, publish,
  2586. * distribute, sublicense, and/or sell copies of the Software, and to
  2587. * permit persons to whom the Software is furnished to do so, subject to
  2588. * the following conditions:
  2589. *
  2590. * The above copyright notice and this permission notice shall be
  2591. * included in all copies or substantial portions of the Software.
  2592. *
  2593. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  2594. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  2595. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  2596. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  2597. * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  2598. * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  2599. * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  2600. *
  2601. * Contributor(s):
  2602. * siefkenj, ahwolf, rickygu, Midnith, saintclair, eaparango,
  2603. * kim3er, mfo, alnorth, Flamenco
  2604. */
  2605. var Kt = /* @__PURE__ */ function() {
  2606. return typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this;
  2607. }();
  2608. function Fo() {
  2609. Kt.console && typeof Kt.console.log == "function" && Kt.console.log.apply(Kt.console, arguments);
  2610. }
  2611. var Le = { log: Fo, warn: function(n) {
  2612. Kt.console && (typeof Kt.console.warn == "function" ? Kt.console.warn.apply(Kt.console, arguments) : Fo.call(null, arguments));
  2613. }, error: function(n) {
  2614. Kt.console && (typeof Kt.console.error == "function" ? Kt.console.error.apply(Kt.console, arguments) : Fo(n));
  2615. } };
  2616. function Co(n, e, t) {
  2617. var i = new XMLHttpRequest();
  2618. i.open("GET", n), i.responseType = "blob", i.onload = function() {
  2619. bi(i.response, e, t);
  2620. }, i.onerror = function() {
  2621. Le.error("could not download file");
  2622. }, i.send();
  2623. }
  2624. function ku(n) {
  2625. var e = new XMLHttpRequest();
  2626. e.open("HEAD", n, !1);
  2627. try {
  2628. e.send();
  2629. } catch (t) {
  2630. }
  2631. return e.status >= 200 && e.status <= 299;
  2632. }
  2633. function ys(n) {
  2634. try {
  2635. n.dispatchEvent(new MouseEvent("click"));
  2636. } catch (t) {
  2637. var e = document.createEvent("MouseEvents");
  2638. e.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), n.dispatchEvent(e);
  2639. }
  2640. }
  2641. var bi = Kt.saveAs || ((typeof window == "undefined" ? "undefined" : Se(window)) !== "object" || window !== Kt ? function() {
  2642. } : typeof HTMLAnchorElement != "undefined" && "download" in HTMLAnchorElement.prototype ? function(n, e, t) {
  2643. var i = Kt.URL || Kt.webkitURL, s = document.createElement("a");
  2644. e = e || n.name || "download", s.download = e, s.rel = "noopener", typeof n == "string" ? (s.href = n, s.origin !== location.origin ? ku(s.href) ? Co(n, e, t) : ys(s, s.target = "_blank") : ys(s)) : (s.href = i.createObjectURL(n), setTimeout(function() {
  2645. i.revokeObjectURL(s.href);
  2646. }, 4e4), setTimeout(function() {
  2647. ys(s);
  2648. }, 0));
  2649. } : "msSaveOrOpenBlob" in navigator ? function(n, e, t) {
  2650. if (e = e || n.name || "download", typeof n == "string") if (ku(n)) Co(n, e, t);
  2651. else {
  2652. var i = document.createElement("a");
  2653. i.href = n, i.target = "_blank", setTimeout(function() {
  2654. ys(i);
  2655. });
  2656. }
  2657. else navigator.msSaveOrOpenBlob(function(s, a) {
  2658. return a === void 0 ? a = { autoBom: !1 } : Se(a) !== "object" && (Le.warn("Deprecated: Expected third argument to be a object"), a = { autoBom: !a }), a.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(s.type) ? new Blob(["\uFEFF", s], { type: s.type }) : s;
  2659. }(n, t), e);
  2660. } : function(n, e, t, i) {
  2661. if ((i = i || open("", "_blank")) && (i.document.title = i.document.body.innerText = "downloading..."), typeof n == "string") return Co(n, e, t);
  2662. var s = n.type === "application/octet-stream", a = /constructor/i.test(Kt.HTMLElement) || Kt.safari, c = /CriOS\/[\d]+/.test(navigator.userAgent);
  2663. if ((c || s && a) && (typeof FileReader == "undefined" ? "undefined" : Se(FileReader)) === "object") {
  2664. var l = new FileReader();
  2665. l.onloadend = function() {
  2666. var m = l.result;
  2667. m = c ? m : m.replace(/^data:[^;]*;/, "data:attachment/file;"), i ? i.location.href = m : location = m, i = null;
  2668. }, l.readAsDataURL(n);
  2669. } else {
  2670. var f = Kt.URL || Kt.webkitURL, d = f.createObjectURL(n);
  2671. i ? i.location = d : location.href = d, i = null, setTimeout(function() {
  2672. f.revokeObjectURL(d);
  2673. }, 4e4);
  2674. }
  2675. });
  2676. /**
  2677. * A class to parse color values
  2678. * @author Stoyan Stefanov <sstoo@gmail.com>
  2679. * {@link http://www.phpied.com/rgb-color-parser-in-javascript/}
  2680. * @license Use it if you like it
  2681. */
  2682. function kh(n) {
  2683. var e;
  2684. n = n || "", this.ok = !1, n.charAt(0) == "#" && (n = n.substr(1, 6)), n = { aliceblue: "f0f8ff", antiquewhite: "faebd7", aqua: "00ffff", aquamarine: "7fffd4", azure: "f0ffff", beige: "f5f5dc", bisque: "ffe4c4", black: "000000", blanchedalmond: "ffebcd", blue: "0000ff", blueviolet: "8a2be2", brown: "a52a2a", burlywood: "deb887", cadetblue: "5f9ea0", chartreuse: "7fff00", chocolate: "d2691e", coral: "ff7f50", cornflowerblue: "6495ed", cornsilk: "fff8dc", crimson: "dc143c", cyan: "00ffff", darkblue: "00008b", darkcyan: "008b8b", darkgoldenrod: "b8860b", darkgray: "a9a9a9", darkgreen: "006400", darkkhaki: "bdb76b", darkmagenta: "8b008b", darkolivegreen: "556b2f", darkorange: "ff8c00", darkorchid: "9932cc", darkred: "8b0000", darksalmon: "e9967a", darkseagreen: "8fbc8f", darkslateblue: "483d8b", darkslategray: "2f4f4f", darkturquoise: "00ced1", darkviolet: "9400d3", deeppink: "ff1493", deepskyblue: "00bfff", dimgray: "696969", dodgerblue: "1e90ff", feldspar: "d19275", firebrick: "b22222", floralwhite: "fffaf0", forestgreen: "228b22", fuchsia: "ff00ff", gainsboro: "dcdcdc", ghostwhite: "f8f8ff", gold: "ffd700", goldenrod: "daa520", gray: "808080", green: "008000", greenyellow: "adff2f", honeydew: "f0fff0", hotpink: "ff69b4", indianred: "cd5c5c", indigo: "4b0082", ivory: "fffff0", khaki: "f0e68c", lavender: "e6e6fa", lavenderblush: "fff0f5", lawngreen: "7cfc00", lemonchiffon: "fffacd", lightblue: "add8e6", lightcoral: "f08080", lightcyan: "e0ffff", lightgoldenrodyellow: "fafad2", lightgrey: "d3d3d3", lightgreen: "90ee90", lightpink: "ffb6c1", lightsalmon: "ffa07a", lightseagreen: "20b2aa", lightskyblue: "87cefa", lightslateblue: "8470ff", lightslategray: "778899", lightsteelblue: "b0c4de", lightyellow: "ffffe0", lime: "00ff00", limegreen: "32cd32", linen: "faf0e6", magenta: "ff00ff", maroon: "800000", mediumaquamarine: "66cdaa", mediumblue: "0000cd", mediumorchid: "ba55d3", mediumpurple: "9370d8", mediumseagreen: "3cb371", mediumslateblue: "7b68ee", mediumspringgreen: "00fa9a", mediumturquoise: "48d1cc", mediumvioletred: "c71585", midnightblue: "191970", mintcream: "f5fffa", mistyrose: "ffe4e1", moccasin: "ffe4b5", navajowhite: "ffdead", navy: "000080", oldlace: "fdf5e6", olive: "808000", olivedrab: "6b8e23", orange: "ffa500", orangered: "ff4500", orchid: "da70d6", palegoldenrod: "eee8aa", palegreen: "98fb98", paleturquoise: "afeeee", palevioletred: "d87093", papayawhip: "ffefd5", peachpuff: "ffdab9", peru: "cd853f", pink: "ffc0cb", plum: "dda0dd", powderblue: "b0e0e6", purple: "800080", red: "ff0000", rosybrown: "bc8f8f", royalblue: "4169e1", saddlebrown: "8b4513", salmon: "fa8072", sandybrown: "f4a460", seagreen: "2e8b57", seashell: "fff5ee", sienna: "a0522d", silver: "c0c0c0", skyblue: "87ceeb", slateblue: "6a5acd", slategray: "708090", snow: "fffafa", springgreen: "00ff7f", steelblue: "4682b4", tan: "d2b48c", teal: "008080", thistle: "d8bfd8", tomato: "ff6347", turquoise: "40e0d0", violet: "ee82ee", violetred: "d02090", wheat: "f5deb3", white: "ffffff", whitesmoke: "f5f5f5", yellow: "ffff00", yellowgreen: "9acd32" }[n = (n = n.replace(/ /g, "")).toLowerCase()] || n;
  2685. for (var t = [{ re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/, example: ["rgb(123, 234, 45)", "rgb(255,234,245)"], process: function(l) {
  2686. return [parseInt(l[1]), parseInt(l[2]), parseInt(l[3])];
  2687. } }, { re: /^(\w{2})(\w{2})(\w{2})$/, example: ["#00ff00", "336699"], process: function(l) {
  2688. return [parseInt(l[1], 16), parseInt(l[2], 16), parseInt(l[3], 16)];
  2689. } }, { re: /^(\w{1})(\w{1})(\w{1})$/, example: ["#fb0", "f0f"], process: function(l) {
  2690. return [parseInt(l[1] + l[1], 16), parseInt(l[2] + l[2], 16), parseInt(l[3] + l[3], 16)];
  2691. } }], i = 0; i < t.length; i++) {
  2692. var s = t[i].re, a = t[i].process, c = s.exec(n);
  2693. c && (e = a(c), this.r = e[0], this.g = e[1], this.b = e[2], this.ok = !0);
  2694. }
  2695. this.r = this.r < 0 || isNaN(this.r) ? 0 : this.r > 255 ? 255 : this.r, this.g = this.g < 0 || isNaN(this.g) ? 0 : this.g > 255 ? 255 : this.g, this.b = this.b < 0 || isNaN(this.b) ? 0 : this.b > 255 ? 255 : this.b, this.toRGB = function() {
  2696. return "rgb(" + this.r + ", " + this.g + ", " + this.b + ")";
  2697. }, this.toHex = function() {
  2698. var l = this.r.toString(16), f = this.g.toString(16), d = this.b.toString(16);
  2699. return l.length == 1 && (l = "0" + l), f.length == 1 && (f = "0" + f), d.length == 1 && (d = "0" + d), "#" + l + f + d;
  2700. };
  2701. }
  2702. var Ns = Kt.atob.bind(Kt), Pu = Kt.btoa.bind(Kt);
  2703. /**
  2704. * @license
  2705. * Joseph Myers does not specify a particular license for his work.
  2706. *
  2707. * Author: Joseph Myers
  2708. * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
  2709. *
  2710. * Modified by: Owen Leong
  2711. */
  2712. function Eo(n, e) {
  2713. var t = n[0], i = n[1], s = n[2], a = n[3];
  2714. t = mn(t, i, s, a, e[0], 7, -680876936), a = mn(a, t, i, s, e[1], 12, -389564586), s = mn(s, a, t, i, e[2], 17, 606105819), i = mn(i, s, a, t, e[3], 22, -1044525330), t = mn(t, i, s, a, e[4], 7, -176418897), a = mn(a, t, i, s, e[5], 12, 1200080426), s = mn(s, a, t, i, e[6], 17, -1473231341), i = mn(i, s, a, t, e[7], 22, -45705983), t = mn(t, i, s, a, e[8], 7, 1770035416), a = mn(a, t, i, s, e[9], 12, -1958414417), s = mn(s, a, t, i, e[10], 17, -42063), i = mn(i, s, a, t, e[11], 22, -1990404162), t = mn(t, i, s, a, e[12], 7, 1804603682), a = mn(a, t, i, s, e[13], 12, -40341101), s = mn(s, a, t, i, e[14], 17, -1502002290), t = vn(t, i = mn(i, s, a, t, e[15], 22, 1236535329), s, a, e[1], 5, -165796510), a = vn(a, t, i, s, e[6], 9, -1069501632), s = vn(s, a, t, i, e[11], 14, 643717713), i = vn(i, s, a, t, e[0], 20, -373897302), t = vn(t, i, s, a, e[5], 5, -701558691), a = vn(a, t, i, s, e[10], 9, 38016083), s = vn(s, a, t, i, e[15], 14, -660478335), i = vn(i, s, a, t, e[4], 20, -405537848), t = vn(t, i, s, a, e[9], 5, 568446438), a = vn(a, t, i, s, e[14], 9, -1019803690), s = vn(s, a, t, i, e[3], 14, -187363961), i = vn(i, s, a, t, e[8], 20, 1163531501), t = vn(t, i, s, a, e[13], 5, -1444681467), a = vn(a, t, i, s, e[2], 9, -51403784), s = vn(s, a, t, i, e[7], 14, 1735328473), t = bn(t, i = vn(i, s, a, t, e[12], 20, -1926607734), s, a, e[5], 4, -378558), a = bn(a, t, i, s, e[8], 11, -2022574463), s = bn(s, a, t, i, e[11], 16, 1839030562), i = bn(i, s, a, t, e[14], 23, -35309556), t = bn(t, i, s, a, e[1], 4, -1530992060), a = bn(a, t, i, s, e[4], 11, 1272893353), s = bn(s, a, t, i, e[7], 16, -155497632), i = bn(i, s, a, t, e[10], 23, -1094730640), t = bn(t, i, s, a, e[13], 4, 681279174), a = bn(a, t, i, s, e[0], 11, -358537222), s = bn(s, a, t, i, e[3], 16, -722521979), i = bn(i, s, a, t, e[6], 23, 76029189), t = bn(t, i, s, a, e[9], 4, -640364487), a = bn(a, t, i, s, e[12], 11, -421815835), s = bn(s, a, t, i, e[15], 16, 530742520), t = wn(t, i = bn(i, s, a, t, e[2], 23, -995338651), s, a, e[0], 6, -198630844), a = wn(a, t, i, s, e[7], 10, 1126891415), s = wn(s, a, t, i, e[14], 15, -1416354905), i = wn(i, s, a, t, e[5], 21, -57434055), t = wn(t, i, s, a, e[12], 6, 1700485571), a = wn(a, t, i, s, e[3], 10, -1894986606), s = wn(s, a, t, i, e[10], 15, -1051523), i = wn(i, s, a, t, e[1], 21, -2054922799), t = wn(t, i, s, a, e[8], 6, 1873313359), a = wn(a, t, i, s, e[15], 10, -30611744), s = wn(s, a, t, i, e[6], 15, -1560198380), i = wn(i, s, a, t, e[13], 21, 1309151649), t = wn(t, i, s, a, e[4], 6, -145523070), a = wn(a, t, i, s, e[11], 10, -1120210379), s = wn(s, a, t, i, e[2], 15, 718787259), i = wn(i, s, a, t, e[9], 21, -343485551), n[0] = $r(t, n[0]), n[1] = $r(i, n[1]), n[2] = $r(s, n[2]), n[3] = $r(a, n[3]);
  2715. }
  2716. function js(n, e, t, i, s, a) {
  2717. return e = $r($r(e, n), $r(i, a)), $r(e << s | e >>> 32 - s, t);
  2718. }
  2719. function mn(n, e, t, i, s, a, c) {
  2720. return js(e & t | ~e & i, n, e, s, a, c);
  2721. }
  2722. function vn(n, e, t, i, s, a, c) {
  2723. return js(e & i | t & ~i, n, e, s, a, c);
  2724. }
  2725. function bn(n, e, t, i, s, a, c) {
  2726. return js(e ^ t ^ i, n, e, s, a, c);
  2727. }
  2728. function wn(n, e, t, i, s, a, c) {
  2729. return js(t ^ (e | ~i), n, e, s, a, c);
  2730. }
  2731. function Ph(n) {
  2732. var e, t = n.length, i = [1732584193, -271733879, -1732584194, 271733878];
  2733. for (e = 64; e <= n.length; e += 64) Eo(i, E1(n.substring(e - 64, e)));
  2734. n = n.substring(e - 64);
  2735. var s = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  2736. for (e = 0; e < n.length; e++) s[e >> 2] |= n.charCodeAt(e) << (e % 4 << 3);
  2737. if (s[e >> 2] |= 128 << (e % 4 << 3), e > 55) for (Eo(i, s), e = 0; e < 16; e++) s[e] = 0;
  2738. return s[14] = 8 * t, Eo(i, s), i;
  2739. }
  2740. function E1(n) {
  2741. var e, t = [];
  2742. for (e = 0; e < 64; e += 4) t[e >> 2] = n.charCodeAt(e) + (n.charCodeAt(e + 1) << 8) + (n.charCodeAt(e + 2) << 16) + (n.charCodeAt(e + 3) << 24);
  2743. return t;
  2744. }
  2745. var Iu = "0123456789abcdef".split("");
  2746. function O1(n) {
  2747. for (var e = "", t = 0; t < 4; t++) e += Iu[n >> 8 * t + 4 & 15] + Iu[n >> 8 * t & 15];
  2748. return e;
  2749. }
  2750. function j1(n) {
  2751. return String.fromCharCode(255 & n, (65280 & n) >> 8, (16711680 & n) >> 16, (4278190080 & n) >> 24);
  2752. }
  2753. function Vo(n) {
  2754. return Ph(n).map(j1).join("");
  2755. }
  2756. var B1 = function(n) {
  2757. for (var e = 0; e < n.length; e++) n[e] = O1(n[e]);
  2758. return n.join("");
  2759. }(Ph("hello")) != "5d41402abc4b2a76b9719d911017c592";
  2760. function $r(n, e) {
  2761. if (B1) {
  2762. var t = (65535 & n) + (65535 & e);
  2763. return (n >> 16) + (e >> 16) + (t >> 16) << 16 | 65535 & t;
  2764. }
  2765. return n + e & 4294967295;
  2766. }
  2767. /**
  2768. * @license
  2769. * FPDF is released under a permissive license: there is no usage restriction.
  2770. * You may embed it freely in your application (commercial or not), with or
  2771. * without modifications.
  2772. *
  2773. * Reference: http://www.fpdf.org/en/script/script37.php
  2774. */
  2775. function Go(n, e) {
  2776. var t, i, s, a;
  2777. if (n !== t) {
  2778. for (var c = (s = n, a = 1 + (256 / n.length | 0), new Array(a + 1).join(s)), l = [], f = 0; f < 256; f++) l[f] = f;
  2779. var d = 0;
  2780. for (f = 0; f < 256; f++) {
  2781. var m = l[f];
  2782. d = (d + m + c.charCodeAt(f)) % 256, l[f] = l[d], l[d] = m;
  2783. }
  2784. t = n, i = l;
  2785. } else l = i;
  2786. var _ = e.length, k = 0, p = 0, j = "";
  2787. for (f = 0; f < _; f++) p = (p + (m = l[k = (k + 1) % 256])) % 256, l[k] = l[p], l[p] = m, c = l[(l[k] + l[p]) % 256], j += String.fromCharCode(e.charCodeAt(f) ^ c);
  2788. return j;
  2789. }
  2790. /**
  2791. * @license
  2792. * Licensed under the MIT License.
  2793. * http://opensource.org/licenses/mit-license
  2794. * Author: Owen Leong (@owenl131)
  2795. * Date: 15 Oct 2020
  2796. * References:
  2797. * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
  2798. * https://github.com/foliojs/pdfkit/blob/master/lib/security.js
  2799. * http://www.fpdf.org/en/script/script37.php
  2800. */
  2801. var Fu = { print: 4, modify: 8, copy: 16, "annot-forms": 32 };
  2802. function $i(n, e, t, i) {
  2803. this.v = 1, this.r = 2;
  2804. var s = 192;
  2805. n.forEach(function(l) {
  2806. if (Fu.perm !== void 0) throw new Error("Invalid permission: " + l);
  2807. s += Fu[l];
  2808. }), this.padding = "(¿N^NuŠAd\0NVÿú\b..\0¶Ðh>€/\f©þdSiz";
  2809. var a = (e + this.padding).substr(0, 32), c = (t + this.padding).substr(0, 32);
  2810. this.O = this.processOwnerPassword(a, c), this.P = -(1 + (255 ^ s)), this.encryptionKey = Vo(a + this.O + this.lsbFirstWord(this.P) + this.hexToBytes(i)).substr(0, 5), this.U = Go(this.encryptionKey, this.padding);
  2811. }
  2812. function Zi(n) {
  2813. if (/[^\u0000-\u00ff]/.test(n)) throw new Error("Invalid PDF Name Object: " + n + ", Only accept ASCII characters.");
  2814. for (var e = "", t = n.length, i = 0; i < t; i++) {
  2815. var s = n.charCodeAt(i);
  2816. e += s < 33 || s === 35 || s === 37 || s === 40 || s === 41 || s === 47 || s === 60 || s === 62 || s === 91 || s === 93 || s === 123 || s === 125 || s > 126 ? "#" + ("0" + s.toString(16)).slice(-2) : n[i];
  2817. }
  2818. return e;
  2819. }
  2820. function Cu(n) {
  2821. if (Se(n) !== "object") throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");
  2822. var e = {};
  2823. this.subscribe = function(t, i, s) {
  2824. if (s = s || !1, typeof t != "string" || typeof i != "function" || typeof s != "boolean") throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");
  2825. e.hasOwnProperty(t) || (e[t] = {});
  2826. var a = Math.random().toString(35);
  2827. return e[t][a] = [i, !!s], a;
  2828. }, this.unsubscribe = function(t) {
  2829. for (var i in e) if (e[i][t]) return delete e[i][t], Object.keys(e[i]).length === 0 && delete e[i], !0;
  2830. return !1;
  2831. }, this.publish = function(t) {
  2832. if (e.hasOwnProperty(t)) {
  2833. var i = Array.prototype.slice.call(arguments, 1), s = [];
  2834. for (var a in e[t]) {
  2835. var c = e[t][a];
  2836. try {
  2837. c[0].apply(n, i);
  2838. } catch (l) {
  2839. Kt.console && Le.error("jsPDF PubSub Error", l.message, l);
  2840. }
  2841. c[1] && s.push(a);
  2842. }
  2843. s.length && s.forEach(this.unsubscribe);
  2844. }
  2845. }, this.getTopics = function() {
  2846. return e;
  2847. };
  2848. }
  2849. function Cs(n) {
  2850. if (!(this instanceof Cs)) return new Cs(n);
  2851. var e = "opacity,stroke-opacity".split(",");
  2852. for (var t in n) n.hasOwnProperty(t) && e.indexOf(t) >= 0 && (this[t] = n[t]);
  2853. this.id = "", this.objectNumber = -1;
  2854. }
  2855. function Ih(n, e) {
  2856. this.gState = n, this.matrix = e, this.id = "", this.objectNumber = -1;
  2857. }
  2858. function wi(n, e, t, i, s) {
  2859. if (!(this instanceof wi)) return new wi(n, e, t, i, s);
  2860. this.type = n === "axial" ? 2 : 3, this.coords = e, this.colors = t, Ih.call(this, i, s);
  2861. }
  2862. function Qi(n, e, t, i, s) {
  2863. if (!(this instanceof Qi)) return new Qi(n, e, t, i, s);
  2864. this.boundingBox = n, this.xStep = e, this.yStep = t, this.stream = "", this.cloneIndex = 0, Ih.call(this, i, s);
  2865. }
  2866. function Tt(n) {
  2867. var e, t = typeof arguments[0] == "string" ? arguments[0] : "p", i = arguments[1], s = arguments[2], a = arguments[3], c = [], l = 1, f = 16, d = "S", m = null;
  2868. Se(n = n || {}) === "object" && (t = n.orientation, i = n.unit || i, s = n.format || s, a = n.compress || n.compressPdf || a, (m = n.encryption || null) !== null && (m.userPassword = m.userPassword || "", m.ownerPassword = m.ownerPassword || "", m.userPermissions = m.userPermissions || []), l = typeof n.userUnit == "number" ? Math.abs(n.userUnit) : 1, n.precision !== void 0 && (e = n.precision), n.floatPrecision !== void 0 && (f = n.floatPrecision), d = n.defaultPathOperation || "S"), c = n.filters || (a === !0 ? ["FlateEncode"] : c), i = i || "mm", t = ("" + (t || "P")).toLowerCase();
  2869. var _ = n.putOnlyUsedFonts || !1, k = {}, p = { internal: {}, __private__: {} };
  2870. p.__private__.PubSub = Cu;
  2871. var j = "1.3", O = p.__private__.getPdfVersion = function() {
  2872. return j;
  2873. };
  2874. p.__private__.setPdfVersion = function(u) {
  2875. j = u;
  2876. };
  2877. var M = { a0: [2383.94, 3370.39], a1: [1683.78, 2383.94], a2: [1190.55, 1683.78], a3: [841.89, 1190.55], a4: [595.28, 841.89], a5: [419.53, 595.28], a6: [297.64, 419.53], a7: [209.76, 297.64], a8: [147.4, 209.76], a9: [104.88, 147.4], a10: [73.7, 104.88], b0: [2834.65, 4008.19], b1: [2004.09, 2834.65], b2: [1417.32, 2004.09], b3: [1000.63, 1417.32], b4: [708.66, 1000.63], b5: [498.9, 708.66], b6: [354.33, 498.9], b7: [249.45, 354.33], b8: [175.75, 249.45], b9: [124.72, 175.75], b10: [87.87, 124.72], c0: [2599.37, 3676.54], c1: [1836.85, 2599.37], c2: [1298.27, 1836.85], c3: [918.43, 1298.27], c4: [649.13, 918.43], c5: [459.21, 649.13], c6: [323.15, 459.21], c7: [229.61, 323.15], c8: [161.57, 229.61], c9: [113.39, 161.57], c10: [79.37, 113.39], dl: [311.81, 623.62], letter: [612, 792], "government-letter": [576, 756], legal: [612, 1008], "junior-legal": [576, 360], ledger: [1224, 792], tabloid: [792, 1224], "credit-card": [153, 243] };
  2878. p.__private__.getPageFormats = function() {
  2879. return M;
  2880. };
  2881. var S = p.__private__.getPageFormat = function(u) {
  2882. return M[u];
  2883. };
  2884. s = s || "a4";
  2885. var V = "compat", G = "advanced", q = V;
  2886. function it() {
  2887. this.saveGraphicsState(), P(new Gt(ne, 0, 0, -ne, 0, ai() * ne).toString() + " cm"), this.setFontSize(this.getFontSize() / ne), d = "n", q = G;
  2888. }
  2889. function vt() {
  2890. this.restoreGraphicsState(), d = "S", q = V;
  2891. }
  2892. var dt = p.__private__.combineFontStyleAndFontWeight = function(u, v) {
  2893. if (u == "bold" && v == "normal" || u == "bold" && v == 400 || u == "normal" && v == "italic" || u == "bold" && v == "italic") throw new Error("Invalid Combination of fontweight and fontstyle");
  2894. return v && (u = v == 400 || v === "normal" ? u === "italic" ? "italic" : "normal" : v != 700 && v !== "bold" || u !== "normal" ? (v == 700 ? "bold" : v) + "" + u : "bold"), u;
  2895. };
  2896. p.advancedAPI = function(u) {
  2897. var v = q === V;
  2898. return v && it.call(this), typeof u != "function" || (u(this), v && vt.call(this)), this;
  2899. }, p.compatAPI = function(u) {
  2900. var v = q === G;
  2901. return v && vt.call(this), typeof u != "function" || (u(this), v && it.call(this)), this;
  2902. }, p.isAdvancedAPI = function() {
  2903. return q === G;
  2904. };
  2905. var X, R = function(u) {
  2906. if (q !== G) throw new Error(u + " is only available in 'advanced' API mode. You need to call advancedAPI() first.");
  2907. }, tt = p.roundToPrecision = p.__private__.roundToPrecision = function(u, v) {
  2908. var I = e || v;
  2909. if (isNaN(u) || isNaN(I)) throw new Error("Invalid argument passed to jsPDF.roundToPrecision");
  2910. return u.toFixed(I).replace(/0+$/, "");
  2911. };
  2912. X = p.hpf = p.__private__.hpf = typeof f == "number" ? function(u) {
  2913. if (isNaN(u)) throw new Error("Invalid argument passed to jsPDF.hpf");
  2914. return tt(u, f);
  2915. } : f === "smart" ? function(u) {
  2916. if (isNaN(u)) throw new Error("Invalid argument passed to jsPDF.hpf");
  2917. return tt(u, u > -1 && u < 1 ? 16 : 5);
  2918. } : function(u) {
  2919. if (isNaN(u)) throw new Error("Invalid argument passed to jsPDF.hpf");
  2920. return tt(u, 16);
  2921. };
  2922. var N = p.f2 = p.__private__.f2 = function(u) {
  2923. if (isNaN(u)) throw new Error("Invalid argument passed to jsPDF.f2");
  2924. return tt(u, 2);
  2925. }, E = p.__private__.f3 = function(u) {
  2926. if (isNaN(u)) throw new Error("Invalid argument passed to jsPDF.f3");
  2927. return tt(u, 3);
  2928. }, z = p.scale = p.__private__.scale = function(u) {
  2929. if (isNaN(u)) throw new Error("Invalid argument passed to jsPDF.scale");
  2930. return q === V ? u * ne : q === G ? u : void 0;
  2931. }, U = function(u) {
  2932. return z(function(v) {
  2933. return q === V ? ai() - v : q === G ? v : void 0;
  2934. }(u));
  2935. };
  2936. p.__private__.setPrecision = p.setPrecision = function(u) {
  2937. typeof parseInt(u, 10) == "number" && (e = parseInt(u, 10));
  2938. };
  2939. var rt, ot = "00000000000000000000000000000000", ht = p.__private__.getFileId = function() {
  2940. return ot;
  2941. }, nt = p.__private__.setFileId = function(u) {
  2942. return ot = u !== void 0 && /^[a-fA-F0-9]{32}$/.test(u) ? u.toUpperCase() : ot.split("").map(function() {
  2943. return "ABCDEF0123456789".charAt(Math.floor(16 * Math.random()));
  2944. }).join(""), m !== null && (on = new $i(m.userPermissions, m.userPassword, m.ownerPassword, ot)), ot;
  2945. };
  2946. p.setFileId = function(u) {
  2947. return nt(u), this;
  2948. }, p.getFileId = function() {
  2949. return ht();
  2950. };
  2951. var ct = p.__private__.convertDateToPDFDate = function(u) {
  2952. var v = u.getTimezoneOffset(), I = v < 0 ? "+" : "-", D = Math.floor(Math.abs(v / 60)), K = Math.abs(v % 60), lt = [I, T(D), "'", T(K), "'"].join("");
  2953. return ["D:", u.getFullYear(), T(u.getMonth() + 1), T(u.getDate()), T(u.getHours()), T(u.getMinutes()), T(u.getSeconds()), lt].join("");
  2954. }, At = p.__private__.convertPDFDateToDate = function(u) {
  2955. var v = parseInt(u.substr(2, 4), 10), I = parseInt(u.substr(6, 2), 10) - 1, D = parseInt(u.substr(8, 2), 10), K = parseInt(u.substr(10, 2), 10), lt = parseInt(u.substr(12, 2), 10), mt = parseInt(u.substr(14, 2), 10);
  2956. return new Date(v, I, D, K, lt, mt, 0);
  2957. }, wt = p.__private__.setCreationDate = function(u) {
  2958. var v;
  2959. if (u === void 0 && (u = /* @__PURE__ */ new Date()), u instanceof Date) v = ct(u);
  2960. else {
  2961. if (!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(u)) throw new Error("Invalid argument passed to jsPDF.setCreationDate");
  2962. v = u;
  2963. }
  2964. return rt = v;
  2965. }, x = p.__private__.getCreationDate = function(u) {
  2966. var v = rt;
  2967. return u === "jsDate" && (v = At(rt)), v;
  2968. };
  2969. p.setCreationDate = function(u) {
  2970. return wt(u), this;
  2971. }, p.getCreationDate = function(u) {
  2972. return x(u);
  2973. };
  2974. var B, T = p.__private__.padd2 = function(u) {
  2975. return ("0" + parseInt(u)).slice(-2);
  2976. }, H = p.__private__.padd2Hex = function(u) {
  2977. return ("00" + (u = u.toString())).substr(u.length);
  2978. }, J = 0, Z = [], at = [], st = 0, gt = [], _t = [], kt = !1, St = at;
  2979. p.__private__.setCustomOutputDestination = function(u) {
  2980. kt = !0, St = u;
  2981. };
  2982. var Dt = function(u) {
  2983. kt || (St = u);
  2984. };
  2985. p.__private__.resetCustomOutputDestination = function() {
  2986. kt = !1, St = at;
  2987. };
  2988. var P = p.__private__.out = function(u) {
  2989. return u = u.toString(), st += u.length + 1, St.push(u), St;
  2990. }, Lt = p.__private__.write = function(u) {
  2991. return P(arguments.length === 1 ? u.toString() : Array.prototype.join.call(arguments, " "));
  2992. }, ae = p.__private__.getArrayBuffer = function(u) {
  2993. for (var v = u.length, I = new ArrayBuffer(v), D = new Uint8Array(I); v--; ) D[v] = u.charCodeAt(v);
  2994. return I;
  2995. }, Ht = [["Helvetica", "helvetica", "normal", "WinAnsiEncoding"], ["Helvetica-Bold", "helvetica", "bold", "WinAnsiEncoding"], ["Helvetica-Oblique", "helvetica", "italic", "WinAnsiEncoding"], ["Helvetica-BoldOblique", "helvetica", "bolditalic", "WinAnsiEncoding"], ["Courier", "courier", "normal", "WinAnsiEncoding"], ["Courier-Bold", "courier", "bold", "WinAnsiEncoding"], ["Courier-Oblique", "courier", "italic", "WinAnsiEncoding"], ["Courier-BoldOblique", "courier", "bolditalic", "WinAnsiEncoding"], ["Times-Roman", "times", "normal", "WinAnsiEncoding"], ["Times-Bold", "times", "bold", "WinAnsiEncoding"], ["Times-Italic", "times", "italic", "WinAnsiEncoding"], ["Times-BoldItalic", "times", "bolditalic", "WinAnsiEncoding"], ["ZapfDingbats", "zapfdingbats", "normal", null], ["Symbol", "symbol", "normal", null]];
  2996. p.__private__.getStandardFonts = function() {
  2997. return Ht;
  2998. };
  2999. var yt = n.fontSize || 16;
  3000. p.__private__.setFontSize = p.setFontSize = function(u) {
  3001. return yt = q === G ? u / ne : u, this;
  3002. };
  3003. var Wt, It = p.__private__.getFontSize = p.getFontSize = function() {
  3004. return q === V ? yt : yt * ne;
  3005. }, zt = n.R2L || !1;
  3006. p.__private__.setR2L = p.setR2L = function(u) {
  3007. return zt = u, this;
  3008. }, p.__private__.getR2L = p.getR2L = function() {
  3009. return zt;
  3010. };
  3011. var qt, ve = p.__private__.setZoomMode = function(u) {
  3012. if (/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(u)) Wt = u;
  3013. else if (isNaN(u)) {
  3014. if ([void 0, null, "fullwidth", "fullheight", "fullpage", "original"].indexOf(u) === -1) throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "' + u + '" is not recognized.');
  3015. Wt = u;
  3016. } else Wt = parseInt(u, 10);
  3017. };
  3018. p.__private__.getZoomMode = function() {
  3019. return Wt;
  3020. };
  3021. var ue, Zt = p.__private__.setPageMode = function(u) {
  3022. if ([void 0, null, "UseNone", "UseOutlines", "UseThumbs", "FullScreen"].indexOf(u) == -1) throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "' + u + '" is not recognized.');
  3023. qt = u;
  3024. };
  3025. p.__private__.getPageMode = function() {
  3026. return qt;
  3027. };
  3028. var fe = p.__private__.setLayoutMode = function(u) {
  3029. if ([void 0, null, "continuous", "single", "twoleft", "tworight", "two"].indexOf(u) == -1) throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "' + u + '" is not recognized.');
  3030. ue = u;
  3031. };
  3032. p.__private__.getLayoutMode = function() {
  3033. return ue;
  3034. }, p.__private__.setDisplayMode = p.setDisplayMode = function(u, v, I) {
  3035. return ve(u), fe(v), Zt(I), this;
  3036. };
  3037. var he = { title: "", subject: "", author: "", keywords: "", creator: "" };
  3038. p.__private__.getDocumentProperty = function(u) {
  3039. if (Object.keys(he).indexOf(u) === -1) throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");
  3040. return he[u];
  3041. }, p.__private__.getDocumentProperties = function() {
  3042. return he;
  3043. }, p.__private__.setDocumentProperties = p.setProperties = p.setDocumentProperties = function(u) {
  3044. for (var v in he) he.hasOwnProperty(v) && u[v] && (he[v] = u[v]);
  3045. return this;
  3046. }, p.__private__.setDocumentProperty = function(u, v) {
  3047. if (Object.keys(he).indexOf(u) === -1) throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");
  3048. return he[u] = v;
  3049. };
  3050. var Bt, ne, Rt, He, ge, se = {}, oe = {}, je = [], Ut = {}, ke = {}, Yt = {}, Qt = {}, Be = null, le = 0, Vt = [], be = new Cu(p), Qr = n.hotfixes || [], fn = {}, br = {}, rr = [], Gt = function u(v, I, D, K, lt, mt) {
  3051. if (!(this instanceof u)) return new u(v, I, D, K, lt, mt);
  3052. isNaN(v) && (v = 1), isNaN(I) && (I = 0), isNaN(D) && (D = 0), isNaN(K) && (K = 1), isNaN(lt) && (lt = 0), isNaN(mt) && (mt = 0), this._matrix = [v, I, D, K, lt, mt];
  3053. };
  3054. Object.defineProperty(Gt.prototype, "sx", { get: function() {
  3055. return this._matrix[0];
  3056. }, set: function(u) {
  3057. this._matrix[0] = u;
  3058. } }), Object.defineProperty(Gt.prototype, "shy", { get: function() {
  3059. return this._matrix[1];
  3060. }, set: function(u) {
  3061. this._matrix[1] = u;
  3062. } }), Object.defineProperty(Gt.prototype, "shx", { get: function() {
  3063. return this._matrix[2];
  3064. }, set: function(u) {
  3065. this._matrix[2] = u;
  3066. } }), Object.defineProperty(Gt.prototype, "sy", { get: function() {
  3067. return this._matrix[3];
  3068. }, set: function(u) {
  3069. this._matrix[3] = u;
  3070. } }), Object.defineProperty(Gt.prototype, "tx", { get: function() {
  3071. return this._matrix[4];
  3072. }, set: function(u) {
  3073. this._matrix[4] = u;
  3074. } }), Object.defineProperty(Gt.prototype, "ty", { get: function() {
  3075. return this._matrix[5];
  3076. }, set: function(u) {
  3077. this._matrix[5] = u;
  3078. } }), Object.defineProperty(Gt.prototype, "a", { get: function() {
  3079. return this._matrix[0];
  3080. }, set: function(u) {
  3081. this._matrix[0] = u;
  3082. } }), Object.defineProperty(Gt.prototype, "b", { get: function() {
  3083. return this._matrix[1];
  3084. }, set: function(u) {
  3085. this._matrix[1] = u;
  3086. } }), Object.defineProperty(Gt.prototype, "c", { get: function() {
  3087. return this._matrix[2];
  3088. }, set: function(u) {
  3089. this._matrix[2] = u;
  3090. } }), Object.defineProperty(Gt.prototype, "d", { get: function() {
  3091. return this._matrix[3];
  3092. }, set: function(u) {
  3093. this._matrix[3] = u;
  3094. } }), Object.defineProperty(Gt.prototype, "e", { get: function() {
  3095. return this._matrix[4];
  3096. }, set: function(u) {
  3097. this._matrix[4] = u;
  3098. } }), Object.defineProperty(Gt.prototype, "f", { get: function() {
  3099. return this._matrix[5];
  3100. }, set: function(u) {
  3101. this._matrix[5] = u;
  3102. } }), Object.defineProperty(Gt.prototype, "rotation", { get: function() {
  3103. return Math.atan2(this.shx, this.sx);
  3104. } }), Object.defineProperty(Gt.prototype, "scaleX", { get: function() {
  3105. return this.decompose().scale.sx;
  3106. } }), Object.defineProperty(Gt.prototype, "scaleY", { get: function() {
  3107. return this.decompose().scale.sy;
  3108. } }), Object.defineProperty(Gt.prototype, "isIdentity", { get: function() {
  3109. return this.sx === 1 && this.shy === 0 && this.shx === 0 && this.sy === 1 && this.tx === 0 && this.ty === 0;
  3110. } }), Gt.prototype.join = function(u) {
  3111. return [this.sx, this.shy, this.shx, this.sy, this.tx, this.ty].map(X).join(u);
  3112. }, Gt.prototype.multiply = function(u) {
  3113. var v = u.sx * this.sx + u.shy * this.shx, I = u.sx * this.shy + u.shy * this.sy, D = u.shx * this.sx + u.sy * this.shx, K = u.shx * this.shy + u.sy * this.sy, lt = u.tx * this.sx + u.ty * this.shx + this.tx, mt = u.tx * this.shy + u.ty * this.sy + this.ty;
  3114. return new Gt(v, I, D, K, lt, mt);
  3115. }, Gt.prototype.decompose = function() {
  3116. var u = this.sx, v = this.shy, I = this.shx, D = this.sy, K = this.tx, lt = this.ty, mt = Math.sqrt(u * u + v * v), Et = (u /= mt) * I + (v /= mt) * D;
  3117. I -= u * Et, D -= v * Et;
  3118. var Ct = Math.sqrt(I * I + D * D);
  3119. return Et /= Ct, u * (D /= Ct) < v * (I /= Ct) && (u = -u, v = -v, Et = -Et, mt = -mt), { scale: new Gt(mt, 0, 0, Ct, 0, 0), translate: new Gt(1, 0, 0, 1, K, lt), rotate: new Gt(u, v, -v, u, 0, 0), skew: new Gt(1, 0, Et, 1, 0, 0) };
  3120. }, Gt.prototype.toString = function(u) {
  3121. return this.join(" ");
  3122. }, Gt.prototype.inversed = function() {
  3123. var u = this.sx, v = this.shy, I = this.shx, D = this.sy, K = this.tx, lt = this.ty, mt = 1 / (u * D - v * I), Et = D * mt, Ct = -v * mt, Xt = -I * mt, te = u * mt;
  3124. return new Gt(Et, Ct, Xt, te, -Et * K - Xt * lt, -Ct * K - te * lt);
  3125. }, Gt.prototype.applyToPoint = function(u) {
  3126. var v = u.x * this.sx + u.y * this.shx + this.tx, I = u.x * this.shy + u.y * this.sy + this.ty;
  3127. return new ii(v, I);
  3128. }, Gt.prototype.applyToRectangle = function(u) {
  3129. var v = this.applyToPoint(u), I = this.applyToPoint(new ii(u.x + u.w, u.y + u.h));
  3130. return new pa(v.x, v.y, I.x - v.x, I.y - v.y);
  3131. }, Gt.prototype.clone = function() {
  3132. var u = this.sx, v = this.shy, I = this.shx, D = this.sy, K = this.tx, lt = this.ty;
  3133. return new Gt(u, v, I, D, K, lt);
  3134. }, p.Matrix = Gt;
  3135. var wr = p.matrixMult = function(u, v) {
  3136. return v.multiply(u);
  3137. }, yr = new Gt(1, 0, 0, 1, 0, 0);
  3138. p.unitMatrix = p.identityMatrix = yr;
  3139. var Tn = function(u, v) {
  3140. if (!ke[u]) {
  3141. var I = (v instanceof wi ? "Sh" : "P") + (Object.keys(Ut).length + 1).toString(10);
  3142. v.id = I, ke[u] = I, Ut[I] = v, be.publish("addPattern", v);
  3143. }
  3144. };
  3145. p.ShadingPattern = wi, p.TilingPattern = Qi, p.addShadingPattern = function(u, v) {
  3146. return R("addShadingPattern()"), Tn(u, v), this;
  3147. }, p.beginTilingPattern = function(u) {
  3148. R("beginTilingPattern()"), ga(u.boundingBox[0], u.boundingBox[1], u.boundingBox[2] - u.boundingBox[0], u.boundingBox[3] - u.boundingBox[1], u.matrix);
  3149. }, p.endTilingPattern = function(u, v) {
  3150. R("endTilingPattern()"), v.stream = _t[B].join(`
  3151. `), Tn(u, v), be.publish("endTilingPattern", v), rr.pop().restore();
  3152. };
  3153. var Dn, De = p.__private__.newObject = function() {
  3154. var u = rn();
  3155. return sn(u, !0), u;
  3156. }, rn = p.__private__.newObjectDeferred = function() {
  3157. return J++, Z[J] = function() {
  3158. return st;
  3159. }, J;
  3160. }, sn = function(u, v) {
  3161. return v = typeof v == "boolean" && v, Z[u] = st, v && P(u + " 0 obj"), u;
  3162. }, ti = p.__private__.newAdditionalObject = function() {
  3163. var u = { objId: rn(), content: "" };
  3164. return gt.push(u), u;
  3165. }, jr = rn(), Gn = rn(), ir = p.__private__.decodeColorString = function(u) {
  3166. var v = u.split(" ");
  3167. if (v.length !== 2 || v[1] !== "g" && v[1] !== "G") v.length !== 5 || v[4] !== "k" && v[4] !== "K" || (v = [(1 - v[0]) * (1 - v[3]), (1 - v[1]) * (1 - v[3]), (1 - v[2]) * (1 - v[3]), "r"]);
  3168. else {
  3169. var I = parseFloat(v[0]);
  3170. v = [I, I, I, "r"];
  3171. }
  3172. for (var D = "#", K = 0; K < 3; K++) D += ("0" + Math.floor(255 * parseFloat(v[K])).toString(16)).slice(-2);
  3173. return D;
  3174. }, Yn = p.__private__.encodeColorString = function(u) {
  3175. var v;
  3176. typeof u == "string" && (u = { ch1: u });
  3177. var I = u.ch1, D = u.ch2, K = u.ch3, lt = u.ch4, mt = u.pdfColorType === "draw" ? ["G", "RG", "K"] : ["g", "rg", "k"];
  3178. if (typeof I == "string" && I.charAt(0) !== "#") {
  3179. var Et = new kh(I);
  3180. if (Et.ok) I = Et.toHex();
  3181. else if (!/^\d*\.?\d*$/.test(I)) throw new Error('Invalid color "' + I + '" passed to jsPDF.encodeColorString.');
  3182. }
  3183. if (typeof I == "string" && /^#[0-9A-Fa-f]{3}$/.test(I) && (I = "#" + I[1] + I[1] + I[2] + I[2] + I[3] + I[3]), typeof I == "string" && /^#[0-9A-Fa-f]{6}$/.test(I)) {
  3184. var Ct = parseInt(I.substr(1), 16);
  3185. I = Ct >> 16 & 255, D = Ct >> 8 & 255, K = 255 & Ct;
  3186. }
  3187. if (D === void 0 || lt === void 0 && I === D && D === K) v = typeof I == "string" ? I + " " + mt[0] : u.precision === 2 ? N(I / 255) + " " + mt[0] : E(I / 255) + " " + mt[0];
  3188. else if (lt === void 0 || Se(lt) === "object") {
  3189. if (lt && !isNaN(lt.a) && lt.a === 0) return ["1.", "1.", "1.", mt[1]].join(" ");
  3190. v = typeof I == "string" ? [I, D, K, mt[1]].join(" ") : u.precision === 2 ? [N(I / 255), N(D / 255), N(K / 255), mt[1]].join(" ") : [E(I / 255), E(D / 255), E(K / 255), mt[1]].join(" ");
  3191. } else v = typeof I == "string" ? [I, D, K, lt, mt[2]].join(" ") : u.precision === 2 ? [N(I), N(D), N(K), N(lt), mt[2]].join(" ") : [E(I), E(D), E(K), E(lt), mt[2]].join(" ");
  3192. return v;
  3193. }, Jn = p.__private__.getFilters = function() {
  3194. return c;
  3195. }, qn = p.__private__.putStream = function(u) {
  3196. var v = (u = u || {}).data || "", I = u.filters || Jn(), D = u.alreadyAppliedFilters || [], K = u.addLength1 || !1, lt = v.length, mt = u.objectId, Et = function(Ce) {
  3197. return Ce;
  3198. };
  3199. if (m !== null && mt === void 0) throw new Error("ObjectId must be passed to putStream for file encryption");
  3200. m !== null && (Et = on.encryptor(mt, 0));
  3201. var Ct = {};
  3202. I === !0 && (I = ["FlateEncode"]);
  3203. var Xt = u.additionalKeyValues || [], te = (Ct = Tt.API.processDataByFilters !== void 0 ? Tt.API.processDataByFilters(v, I) : { data: v, reverseChain: [] }).reverseChain + (Array.isArray(D) ? D.join(" ") : D.toString());
  3204. if (Ct.data.length !== 0 && (Xt.push({ key: "Length", value: Ct.data.length }), K === !0 && Xt.push({ key: "Length1", value: lt })), te.length != 0) if (te.split("/").length - 1 == 1) Xt.push({ key: "Filter", value: te });
  3205. else {
  3206. Xt.push({ key: "Filter", value: "[" + te + "]" });
  3207. for (var de = 0; de < Xt.length; de += 1) if (Xt[de].key === "DecodeParms") {
  3208. for (var $e = [], Ae = 0; Ae < Ct.reverseChain.split("/").length - 1; Ae += 1) $e.push("null");
  3209. $e.push(Xt[de].value), Xt[de].value = "[" + $e.join(" ") + "]";
  3210. }
  3211. }
  3212. P("<<");
  3213. for (var _e = 0; _e < Xt.length; _e++) P("/" + Xt[_e].key + " " + Xt[_e].value);
  3214. P(">>"), Ct.data.length !== 0 && (P("stream"), P(Et(Ct.data)), P("endstream"));
  3215. }, ei = p.__private__.putPage = function(u) {
  3216. var v = u.number, I = u.data, D = u.objId, K = u.contentsObjId;
  3217. sn(D, !0), P("<</Type /Page"), P("/Parent " + u.rootDictionaryObjId + " 0 R"), P("/Resources " + u.resourceDictionaryObjId + " 0 R"), P("/MediaBox [" + parseFloat(X(u.mediaBox.bottomLeftX)) + " " + parseFloat(X(u.mediaBox.bottomLeftY)) + " " + X(u.mediaBox.topRightX) + " " + X(u.mediaBox.topRightY) + "]"), u.cropBox !== null && P("/CropBox [" + X(u.cropBox.bottomLeftX) + " " + X(u.cropBox.bottomLeftY) + " " + X(u.cropBox.topRightX) + " " + X(u.cropBox.topRightY) + "]"), u.bleedBox !== null && P("/BleedBox [" + X(u.bleedBox.bottomLeftX) + " " + X(u.bleedBox.bottomLeftY) + " " + X(u.bleedBox.topRightX) + " " + X(u.bleedBox.topRightY) + "]"), u.trimBox !== null && P("/TrimBox [" + X(u.trimBox.bottomLeftX) + " " + X(u.trimBox.bottomLeftY) + " " + X(u.trimBox.topRightX) + " " + X(u.trimBox.topRightY) + "]"), u.artBox !== null && P("/ArtBox [" + X(u.artBox.bottomLeftX) + " " + X(u.artBox.bottomLeftY) + " " + X(u.artBox.topRightX) + " " + X(u.artBox.topRightY) + "]"), typeof u.userUnit == "number" && u.userUnit !== 1 && P("/UserUnit " + u.userUnit), be.publish("putPage", { objId: D, pageContext: Vt[v], pageNumber: v, page: I }), P("/Contents " + K + " 0 R"), P(">>"), P("endobj");
  3218. var lt = I.join(`
  3219. `);
  3220. return q === G && (lt += `
  3221. Q`), sn(K, !0), qn({ data: lt, filters: Jn(), objectId: K }), P("endobj"), D;
  3222. }, ar = p.__private__.putPages = function() {
  3223. var u, v, I = [];
  3224. for (u = 1; u <= le; u++) Vt[u].objId = rn(), Vt[u].contentsObjId = rn();
  3225. for (u = 1; u <= le; u++) I.push(ei({ number: u, data: _t[u], objId: Vt[u].objId, contentsObjId: Vt[u].contentsObjId, mediaBox: Vt[u].mediaBox, cropBox: Vt[u].cropBox, bleedBox: Vt[u].bleedBox, trimBox: Vt[u].trimBox, artBox: Vt[u].artBox, userUnit: Vt[u].userUnit, rootDictionaryObjId: jr, resourceDictionaryObjId: Gn }));
  3226. sn(jr, !0), P("<</Type /Pages");
  3227. var D = "/Kids [";
  3228. for (v = 0; v < le; v++) D += I[v] + " 0 R ";
  3229. P(D + "]"), P("/Count " + le), P(">>"), P("endobj"), be.publish("postPutPages");
  3230. }, ni = function(u) {
  3231. be.publish("putFont", { font: u, out: P, newObject: De, putStream: qn }), u.isAlreadyPutted !== !0 && (u.objectNumber = De(), P("<<"), P("/Type /Font"), P("/BaseFont /" + Zi(u.postScriptName)), P("/Subtype /Type1"), typeof u.encoding == "string" && P("/Encoding /" + u.encoding), P("/FirstChar 32"), P("/LastChar 255"), P(">>"), P("endobj"));
  3232. }, Si = function(u) {
  3233. u.objectNumber = De();
  3234. var v = [];
  3235. v.push({ key: "Type", value: "/XObject" }), v.push({ key: "Subtype", value: "/Form" }), v.push({ key: "BBox", value: "[" + [X(u.x), X(u.y), X(u.x + u.width), X(u.y + u.height)].join(" ") + "]" }), v.push({ key: "Matrix", value: "[" + u.matrix.toString() + "]" });
  3236. var I = u.pages[1].join(`
  3237. `);
  3238. qn({ data: I, additionalKeyValues: v, objectId: u.objectNumber }), P("endobj");
  3239. }, ki = function(u, v) {
  3240. v || (v = 21);
  3241. var I = De(), D = function(mt, Et) {
  3242. var Ct, Xt = [], te = 1 / (Et - 1);
  3243. for (Ct = 0; Ct < 1; Ct += te) Xt.push(Ct);
  3244. if (Xt.push(1), mt[0].offset != 0) {
  3245. var de = { offset: 0, color: mt[0].color };
  3246. mt.unshift(de);
  3247. }
  3248. if (mt[mt.length - 1].offset != 1) {
  3249. var $e = { offset: 1, color: mt[mt.length - 1].color };
  3250. mt.push($e);
  3251. }
  3252. for (var Ae = "", _e = 0, Ce = 0; Ce < Xt.length; Ce++) {
  3253. for (Ct = Xt[Ce]; Ct > mt[_e + 1].offset; ) _e++;
  3254. var Re = mt[_e].offset, Te = (Ct - Re) / (mt[_e + 1].offset - Re), cn = mt[_e].color, Sr = mt[_e + 1].color;
  3255. Ae += H(Math.round((1 - Te) * cn[0] + Te * Sr[0]).toString(16)) + H(Math.round((1 - Te) * cn[1] + Te * Sr[1]).toString(16)) + H(Math.round((1 - Te) * cn[2] + Te * Sr[2]).toString(16));
  3256. }
  3257. return Ae.trim();
  3258. }(u.colors, v), K = [];
  3259. K.push({ key: "FunctionType", value: "0" }), K.push({ key: "Domain", value: "[0.0 1.0]" }), K.push({ key: "Size", value: "[" + v + "]" }), K.push({ key: "BitsPerSample", value: "8" }), K.push({ key: "Range", value: "[0.0 1.0 0.0 1.0 0.0 1.0]" }), K.push({ key: "Decode", value: "[0.0 1.0 0.0 1.0 0.0 1.0]" }), qn({ data: D, additionalKeyValues: K, alreadyAppliedFilters: ["/ASCIIHexDecode"], objectId: I }), P("endobj"), u.objectNumber = De(), P("<< /ShadingType " + u.type), P("/ColorSpace /DeviceRGB");
  3260. var lt = "/Coords [" + X(parseFloat(u.coords[0])) + " " + X(parseFloat(u.coords[1])) + " ";
  3261. u.type === 2 ? lt += X(parseFloat(u.coords[2])) + " " + X(parseFloat(u.coords[3])) : lt += X(parseFloat(u.coords[2])) + " " + X(parseFloat(u.coords[3])) + " " + X(parseFloat(u.coords[4])) + " " + X(parseFloat(u.coords[5])), P(lt += "]"), u.matrix && P("/Matrix [" + u.matrix.toString() + "]"), P("/Function " + I + " 0 R"), P("/Extend [true true]"), P(">>"), P("endobj");
  3262. }, Pi = function(u, v) {
  3263. var I = rn(), D = De();
  3264. v.push({ resourcesOid: I, objectOid: D }), u.objectNumber = D;
  3265. var K = [];
  3266. K.push({ key: "Type", value: "/Pattern" }), K.push({ key: "PatternType", value: "1" }), K.push({ key: "PaintType", value: "1" }), K.push({ key: "TilingType", value: "1" }), K.push({ key: "BBox", value: "[" + u.boundingBox.map(X).join(" ") + "]" }), K.push({ key: "XStep", value: X(u.xStep) }), K.push({ key: "YStep", value: X(u.yStep) }), K.push({ key: "Resources", value: I + " 0 R" }), u.matrix && K.push({ key: "Matrix", value: "[" + u.matrix.toString() + "]" }), qn({ data: u.stream, additionalKeyValues: K, objectId: u.objectNumber }), P("endobj");
  3267. }, Bs = function(u) {
  3268. for (var v in u.objectNumber = De(), P("<<"), u) switch (v) {
  3269. case "opacity":
  3270. P("/ca " + N(u[v]));
  3271. break;
  3272. case "stroke-opacity":
  3273. P("/CA " + N(u[v]));
  3274. }
  3275. P(">>"), P("endobj");
  3276. }, sa = function(u) {
  3277. sn(u.resourcesOid, !0), P("<<"), P("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"), function() {
  3278. for (var v in P("/Font <<"), se) se.hasOwnProperty(v) && (_ === !1 || _ === !0 && k.hasOwnProperty(v)) && P("/" + v + " " + se[v].objectNumber + " 0 R");
  3279. P(">>");
  3280. }(), function() {
  3281. if (Object.keys(Ut).length > 0) {
  3282. for (var v in P("/Shading <<"), Ut) Ut.hasOwnProperty(v) && Ut[v] instanceof wi && Ut[v].objectNumber >= 0 && P("/" + v + " " + Ut[v].objectNumber + " 0 R");
  3283. be.publish("putShadingPatternDict"), P(">>");
  3284. }
  3285. }(), function(v) {
  3286. if (Object.keys(Ut).length > 0) {
  3287. for (var I in P("/Pattern <<"), Ut) Ut.hasOwnProperty(I) && Ut[I] instanceof p.TilingPattern && Ut[I].objectNumber >= 0 && Ut[I].objectNumber < v && P("/" + I + " " + Ut[I].objectNumber + " 0 R");
  3288. be.publish("putTilingPatternDict"), P(">>");
  3289. }
  3290. }(u.objectOid), function() {
  3291. if (Object.keys(Yt).length > 0) {
  3292. var v;
  3293. for (v in P("/ExtGState <<"), Yt) Yt.hasOwnProperty(v) && Yt[v].objectNumber >= 0 && P("/" + v + " " + Yt[v].objectNumber + " 0 R");
  3294. be.publish("putGStateDict"), P(">>");
  3295. }
  3296. }(), function() {
  3297. for (var v in P("/XObject <<"), fn) fn.hasOwnProperty(v) && fn[v].objectNumber >= 0 && P("/" + v + " " + fn[v].objectNumber + " 0 R");
  3298. be.publish("putXobjectDict"), P(">>");
  3299. }(), P(">>"), P("endobj");
  3300. }, Ba = function(u) {
  3301. oe[u.fontName] = oe[u.fontName] || {}, oe[u.fontName][u.fontStyle] = u.id;
  3302. }, Ma = function(u, v, I, D, K) {
  3303. var lt = { id: "F" + (Object.keys(se).length + 1).toString(10), postScriptName: u, fontName: v, fontStyle: I, encoding: D, isStandardFont: K || !1, metadata: {} };
  3304. return be.publish("addFont", { font: lt, instance: this }), se[lt.id] = lt, Ba(lt), lt.id;
  3305. }, Un = p.__private__.pdfEscape = p.pdfEscape = function(u, v) {
  3306. return function(I, D) {
  3307. var K, lt, mt, Et, Ct, Xt, te, de, $e;
  3308. if (mt = (D = D || {}).sourceEncoding || "Unicode", Ct = D.outputEncoding, (D.autoencode || Ct) && se[Bt].metadata && se[Bt].metadata[mt] && se[Bt].metadata[mt].encoding && (Et = se[Bt].metadata[mt].encoding, !Ct && se[Bt].encoding && (Ct = se[Bt].encoding), !Ct && Et.codePages && (Ct = Et.codePages[0]), typeof Ct == "string" && (Ct = Et[Ct]), Ct)) {
  3309. for (te = !1, Xt = [], K = 0, lt = I.length; K < lt; K++) (de = Ct[I.charCodeAt(K)]) ? Xt.push(String.fromCharCode(de)) : Xt.push(I[K]), Xt[K].charCodeAt(0) >> 8 && (te = !0);
  3310. I = Xt.join("");
  3311. }
  3312. for (K = I.length; te === void 0 && K !== 0; ) I.charCodeAt(K - 1) >> 8 && (te = !0), K--;
  3313. if (!te) return I;
  3314. for (Xt = D.noBOM ? [] : [254, 255], K = 0, lt = I.length; K < lt; K++) {
  3315. if (($e = (de = I.charCodeAt(K)) >> 8) >> 8) throw new Error("Character at position " + K + " of string '" + I + "' exceeds 16bits. Cannot be encoded into UCS-2 BE");
  3316. Xt.push($e), Xt.push(de - ($e << 8));
  3317. }
  3318. return String.fromCharCode.apply(void 0, Xt);
  3319. }(u, v).replace(/\\/g, "\\\\").replace(/\(/g, "\\(").replace(/\)/g, "\\)");
  3320. }, oa = p.__private__.beginPage = function(u) {
  3321. _t[++le] = [], Vt[le] = { objId: 0, contentsObjId: 0, userUnit: Number(l), artBox: null, bleedBox: null, cropBox: null, trimBox: null, mediaBox: { bottomLeftX: 0, bottomLeftY: 0, topRightX: Number(u[0]), topRightY: Number(u[1]) } }, Ta(le), Dt(_t[B]);
  3322. }, Ra = function(u, v) {
  3323. var I, D, K;
  3324. switch (t = v || t, typeof u == "string" && (I = S(u.toLowerCase()), Array.isArray(I) && (D = I[0], K = I[1])), Array.isArray(u) && (D = u[0] * ne, K = u[1] * ne), isNaN(D) && (D = s[0], K = s[1]), (D > 14400 || K > 14400) && (Le.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"), D = Math.min(14400, D), K = Math.min(14400, K)), s = [D, K], t.substr(0, 1)) {
  3325. case "l":
  3326. K > D && (s = [K, D]);
  3327. break;
  3328. case "p":
  3329. D > K && (s = [K, D]);
  3330. }
  3331. oa(s), Vs(Jt), P(ji), ca !== 0 && P(ca + " J"), Rr !== 0 && P(Rr + " j"), be.publish("addPage", { pageNumber: le });
  3332. }, la = function(u) {
  3333. u > 0 && u <= le && (_t.splice(u, 1), Vt.splice(u, 1), le--, B > le && (B = le), this.setPage(B));
  3334. }, Ta = function(u) {
  3335. u > 0 && u <= le && (B = u);
  3336. }, Da = p.__private__.getNumberOfPages = p.getNumberOfPages = function() {
  3337. return _t.length - 1;
  3338. }, qa = function(u, v, I) {
  3339. var D, K = void 0;
  3340. return I = I || {}, u = u !== void 0 ? u : se[Bt].fontName, v = v !== void 0 ? v : se[Bt].fontStyle, D = u.toLowerCase(), oe[D] !== void 0 && oe[D][v] !== void 0 ? K = oe[D][v] : oe[u] !== void 0 && oe[u][v] !== void 0 ? K = oe[u][v] : I.disableWarning === !1 && Le.warn("Unable to look up font label for font '" + u + "', '" + v + "'. Refer to getFontList() for available fonts."), K || I.noFallback || (K = oe.times[v]) == null && (K = oe.times.normal), K;
  3341. }, sr = p.__private__.putInfo = function() {
  3342. var u = De(), v = function(D) {
  3343. return D;
  3344. };
  3345. for (var I in m !== null && (v = on.encryptor(u, 0)), P("<<"), P("/Producer (" + Un(v("jsPDF " + Tt.version)) + ")"), he) he.hasOwnProperty(I) && he[I] && P("/" + I.substr(0, 1).toUpperCase() + I.substr(1) + " (" + Un(v(he[I])) + ")");
  3346. P("/CreationDate (" + Un(v(rt)) + ")"), P(">>"), P("endobj");
  3347. }, Ii = p.__private__.putCatalog = function(u) {
  3348. var v = (u = u || {}).rootDictionaryObjId || jr;
  3349. switch (De(), P("<<"), P("/Type /Catalog"), P("/Pages " + v + " 0 R"), Wt || (Wt = "fullwidth"), Wt) {
  3350. case "fullwidth":
  3351. P("/OpenAction [3 0 R /FitH null]");
  3352. break;
  3353. case "fullheight":
  3354. P("/OpenAction [3 0 R /FitV null]");
  3355. break;
  3356. case "fullpage":
  3357. P("/OpenAction [3 0 R /Fit]");
  3358. break;
  3359. case "original":
  3360. P("/OpenAction [3 0 R /XYZ null null 1]");
  3361. break;
  3362. default:
  3363. var I = "" + Wt;
  3364. I.substr(I.length - 1) === "%" && (Wt = parseInt(Wt) / 100), typeof Wt == "number" && P("/OpenAction [3 0 R /XYZ null null " + N(Wt) + "]");
  3365. }
  3366. switch (ue || (ue = "continuous"), ue) {
  3367. case "continuous":
  3368. P("/PageLayout /OneColumn");
  3369. break;
  3370. case "single":
  3371. P("/PageLayout /SinglePage");
  3372. break;
  3373. case "two":
  3374. case "twoleft":
  3375. P("/PageLayout /TwoColumnLeft");
  3376. break;
  3377. case "tworight":
  3378. P("/PageLayout /TwoColumnRight");
  3379. }
  3380. qt && P("/PageMode /" + qt), be.publish("putCatalog"), P(">>"), P("endobj");
  3381. }, Ms = p.__private__.putTrailer = function() {
  3382. P("trailer"), P("<<"), P("/Size " + (J + 1)), P("/Root " + J + " 0 R"), P("/Info " + (J - 1) + " 0 R"), m !== null && P("/Encrypt " + on.oid + " 0 R"), P("/ID [ <" + ot + "> <" + ot + "> ]"), P(">>");
  3383. }, Xe = p.__private__.putHeader = function() {
  3384. P("%PDF-" + j), P("%ºß¬à");
  3385. }, Ua = p.__private__.putXRef = function() {
  3386. var u = "0000000000";
  3387. P("xref"), P("0 " + (J + 1)), P("0000000000 65535 f ");
  3388. for (var v = 1; v <= J; v++) typeof Z[v] == "function" ? P((u + Z[v]()).slice(-10) + " 00000 n ") : Z[v] !== void 0 ? P((u + Z[v]).slice(-10) + " 00000 n ") : P("0000000000 00000 n ");
  3389. }, or = p.__private__.buildDocument = function() {
  3390. var u;
  3391. J = 0, st = 0, at = [], Z = [], gt = [], jr = rn(), Gn = rn(), Dt(at), be.publish("buildDocument"), Xe(), ar(), function() {
  3392. be.publish("putAdditionalObjects");
  3393. for (var I = 0; I < gt.length; I++) {
  3394. var D = gt[I];
  3395. sn(D.objId, !0), P(D.content), P("endobj");
  3396. }
  3397. be.publish("postPutAdditionalObjects");
  3398. }(), u = [], function() {
  3399. for (var I in se) se.hasOwnProperty(I) && (_ === !1 || _ === !0 && k.hasOwnProperty(I)) && ni(se[I]);
  3400. }(), function() {
  3401. var I;
  3402. for (I in Yt) Yt.hasOwnProperty(I) && Bs(Yt[I]);
  3403. }(), function() {
  3404. for (var I in fn) fn.hasOwnProperty(I) && Si(fn[I]);
  3405. }(), function(I) {
  3406. var D;
  3407. for (D in Ut) Ut.hasOwnProperty(D) && (Ut[D] instanceof wi ? ki(Ut[D]) : Ut[D] instanceof Qi && Pi(Ut[D], I));
  3408. }(u), be.publish("putResources"), u.forEach(sa), sa({ resourcesOid: Gn, objectOid: Number.MAX_SAFE_INTEGER }), be.publish("postPutResources"), m !== null && (on.oid = De(), P("<<"), P("/Filter /Standard"), P("/V " + on.v), P("/R " + on.r), P("/U <" + on.toHexString(on.U) + ">"), P("/O <" + on.toHexString(on.O) + ">"), P("/P " + on.P), P(">>"), P("endobj")), sr(), Ii();
  3409. var v = st;
  3410. return Ua(), Ms(), P("startxref"), P("" + v), P("%%EOF"), Dt(_t[B]), at.join(`
  3411. `);
  3412. }, Fi = p.__private__.getBlob = function(u) {
  3413. return new Blob([ae(u)], { type: "application/pdf" });
  3414. }, ua = function(u) {
  3415. for (; u.firstChild; ) u.removeChild(u.firstChild);
  3416. }, In = function(u) {
  3417. var v, I = u.document, D = I.documentElement, K = I.head, lt = I.body;
  3418. return K || (K = I.createElement("head"), D.appendChild(K)), lt || (lt = I.createElement("body"), D.appendChild(lt)), ua(K), ua(lt), (v = I.createElement("style")).appendChild(I.createTextNode("html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}")), K.appendChild(v), { document: I, body: lt };
  3419. }, Ci = p.output = p.__private__.output = (Dn = function(u, v) {
  3420. switch (typeof (v = v || {}) == "string" ? v = { filename: v } : v.filename = v.filename || "generated.pdf", u) {
  3421. case void 0:
  3422. return or();
  3423. case "save":
  3424. p.save(v.filename);
  3425. break;
  3426. case "arraybuffer":
  3427. return ae(or());
  3428. case "blob":
  3429. return Fi(or());
  3430. case "bloburi":
  3431. case "bloburl":
  3432. if (Kt.URL !== void 0 && typeof Kt.URL.createObjectURL == "function") return Kt.URL && Kt.URL.createObjectURL(Fi(or())) || void 0;
  3433. Le.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");
  3434. break;
  3435. case "datauristring":
  3436. case "dataurlstring":
  3437. var I = "", D = or();
  3438. try {
  3439. I = Pu(D);
  3440. } catch (cn) {
  3441. I = Pu(unescape(encodeURIComponent(D)));
  3442. }
  3443. return "data:application/pdf;filename=" + encodeURIComponent(v.filename) + ";base64," + I;
  3444. case "pdfobjectnewwindow":
  3445. if (Object.prototype.toString.call(Kt) === "[object Window]") {
  3446. var K = "https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js", lt = !v.pdfObjectUrl;
  3447. lt || (K = v.pdfObjectUrl);
  3448. var mt = Kt.open();
  3449. if (mt !== null) {
  3450. var Et = In(mt), Ct = Et.document.createElement("script"), Xt = this;
  3451. Ct.src = K, lt && (Ct.integrity = "sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==", Ct.crossOrigin = "anonymous"), Ct.onload = function() {
  3452. mt.PDFObject.embed(Xt.output("dataurlstring"), v);
  3453. }, Et.body.appendChild(Ct);
  3454. }
  3455. return mt;
  3456. }
  3457. throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");
  3458. case "pdfjsnewwindow":
  3459. if (Object.prototype.toString.call(Kt) === "[object Window]") {
  3460. var te = v.pdfJsUrl || "examples/PDF.js/web/viewer.html", de = Kt.open();
  3461. if (de !== null) {
  3462. var $e = In(de), Ae = $e.document.createElement("iframe"), _e = te.indexOf("?") === -1 ? "?" : "&";
  3463. Xt = this, Ae.id = "pdfViewer", Ae.width = "500px", Ae.height = "400px", Ae.src = te + _e + "file=&downloadName=" + encodeURIComponent(v.filename), Ae.onload = function() {
  3464. de.document.title = v.filename, Ae.contentWindow.PDFViewerApplication.open(Xt.output("bloburl"));
  3465. }, $e.body.appendChild(Ae);
  3466. }
  3467. return de;
  3468. }
  3469. throw new Error("The option pdfjsnewwindow just works in a browser-environment.");
  3470. case "dataurlnewwindow":
  3471. if (Object.prototype.toString.call(Kt) !== "[object Window]") throw new Error("The option dataurlnewwindow just works in a browser-environment.");
  3472. var Ce = Kt.open();
  3473. if (Ce !== null) {
  3474. var Re = In(Ce), Te = Re.document.createElement("iframe");
  3475. Te.src = this.output("datauristring", v), Re.body.appendChild(Te), Ce.document.title = v.filename;
  3476. }
  3477. if (Ce || typeof safari == "undefined") return Ce;
  3478. break;
  3479. case "datauri":
  3480. case "dataurl":
  3481. return Kt.document.location.href = this.output("datauristring", v);
  3482. default:
  3483. return null;
  3484. }
  3485. }, Dn.foo = function() {
  3486. try {
  3487. return Dn.apply(this, arguments);
  3488. } catch (I) {
  3489. var u = I.stack || "";
  3490. ~u.indexOf(" at ") && (u = u.split(" at ")[1]);
  3491. var v = "Error in function " + u.split(`
  3492. `)[0].split("<")[0] + ": " + I.message;
  3493. if (!Kt.console) throw new Error(v);
  3494. Kt.console.error(v, I), Kt.alert && alert(v);
  3495. }
  3496. }, Dn.foo.bar = Dn, Dn.foo), xr = function(u) {
  3497. return Array.isArray(Qr) === !0 && Qr.indexOf(u) > -1;
  3498. };
  3499. switch (i) {
  3500. case "pt":
  3501. ne = 1;
  3502. break;
  3503. case "mm":
  3504. ne = 72 / 25.4;
  3505. break;
  3506. case "cm":
  3507. ne = 72 / 2.54;
  3508. break;
  3509. case "in":
  3510. ne = 72;
  3511. break;
  3512. case "px":
  3513. ne = xr("px_scaling") == 1 ? 0.75 : 96 / 72;
  3514. break;
  3515. case "pc":
  3516. case "em":
  3517. ne = 12;
  3518. break;
  3519. case "ex":
  3520. ne = 6;
  3521. break;
  3522. default:
  3523. if (typeof i != "number") throw new Error("Invalid unit: " + i);
  3524. ne = i;
  3525. }
  3526. var on = null;
  3527. wt(), nt();
  3528. var za = p.__private__.getPageInfo = p.getPageInfo = function(u) {
  3529. if (isNaN(u) || u % 1 != 0) throw new Error("Invalid argument passed to jsPDF.getPageInfo");
  3530. return { objId: Vt[u].objId, pageNumber: u, pageContext: Vt[u] };
  3531. }, Rs = p.__private__.getPageInfoByObjId = function(u) {
  3532. if (isNaN(u) || u % 1 != 0) throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");
  3533. for (var v in Vt) if (Vt[v].objId === u) break;
  3534. return za(v);
  3535. }, Ts = p.__private__.getCurrentPageInfo = p.getCurrentPageInfo = function() {
  3536. return { objId: Vt[B].objId, pageNumber: B, pageContext: Vt[B] };
  3537. };
  3538. p.addPage = function() {
  3539. return Ra.apply(this, arguments), this;
  3540. }, p.setPage = function() {
  3541. return Ta.apply(this, arguments), Dt.call(this, _t[B]), this;
  3542. }, p.insertPage = function(u) {
  3543. return this.addPage(), this.movePage(B, u), this;
  3544. }, p.movePage = function(u, v) {
  3545. var I, D;
  3546. if (u > v) {
  3547. I = _t[u], D = Vt[u];
  3548. for (var K = u; K > v; K--) _t[K] = _t[K - 1], Vt[K] = Vt[K - 1];
  3549. _t[v] = I, Vt[v] = D, this.setPage(v);
  3550. } else if (u < v) {
  3551. I = _t[u], D = Vt[u];
  3552. for (var lt = u; lt < v; lt++) _t[lt] = _t[lt + 1], Vt[lt] = Vt[lt + 1];
  3553. _t[v] = I, Vt[v] = D, this.setPage(v);
  3554. }
  3555. return this;
  3556. }, p.deletePage = function() {
  3557. return la.apply(this, arguments), this;
  3558. }, p.__private__.text = p.text = function(u, v, I, D, K) {
  3559. var lt, mt, Et, Ct, Xt, te, de, $e, Ae, _e = (D = D || {}).scope || this;
  3560. if (typeof u == "number" && typeof v == "number" && (typeof I == "string" || Array.isArray(I))) {
  3561. var Ce = I;
  3562. I = v, v = u, u = Ce;
  3563. }
  3564. if (arguments[3] instanceof Gt == 0 ? (Et = arguments[4], Ct = arguments[5], Se(de = arguments[3]) === "object" && de !== null || (typeof Et == "string" && (Ct = Et, Et = null), typeof de == "string" && (Ct = de, de = null), typeof de == "number" && (Et = de, de = null), D = { flags: de, angle: Et, align: Ct })) : (R("The transform parameter of text() with a Matrix value"), Ae = K), isNaN(v) || isNaN(I) || u == null) throw new Error("Invalid arguments passed to jsPDF.text");
  3565. if (u.length === 0) return _e;
  3566. var Re, Te = "", cn = typeof D.lineHeightFactor == "number" ? D.lineHeightFactor : ri, Sr = _e.internal.scaleFactor;
  3567. function ma(Pe) {
  3568. return Pe = Pe.split(" ").join(Array(D.TabLen || 9).join(" ")), Un(Pe, de);
  3569. }
  3570. function si(Pe) {
  3571. for (var Ie, We = Pe.concat(), Qe = [], Pr = We.length; Pr--; ) typeof (Ie = We.shift()) == "string" ? Qe.push(Ie) : Array.isArray(Pe) && (Ie.length === 1 || Ie[1] === void 0 && Ie[2] === void 0) ? Qe.push(Ie[0]) : Qe.push([Ie[0], Ie[1], Ie[2]]);
  3572. return Qe;
  3573. }
  3574. function oi(Pe, Ie) {
  3575. var We;
  3576. if (typeof Pe == "string") We = Ie(Pe)[0];
  3577. else if (Array.isArray(Pe)) {
  3578. for (var Qe, Pr, _a = Pe.concat(), Gi = [], Za = _a.length; Za--; ) typeof (Qe = _a.shift()) == "string" ? Gi.push(Ie(Qe)[0]) : Array.isArray(Qe) && typeof Qe[0] == "string" && (Pr = Ie(Qe[0], Qe[1], Qe[2]), Gi.push([Pr[0], Pr[1], Pr[2]]));
  3579. We = Gi;
  3580. }
  3581. return We;
  3582. }
  3583. var Tr = !1, li = !0;
  3584. if (typeof u == "string") Tr = !0;
  3585. else if (Array.isArray(u)) {
  3586. var Ti = u.concat();
  3587. mt = [];
  3588. for (var Di, dn = Ti.length; dn--; ) (typeof (Di = Ti.shift()) != "string" || Array.isArray(Di) && typeof Di[0] != "string") && (li = !1);
  3589. Tr = li;
  3590. }
  3591. if (Tr === !1) throw new Error('Type of text must be string or Array. "' + u + '" is not recognized.');
  3592. typeof u == "string" && (u = u.match(/[\r?\n]/) ? u.split(/\r\n|\r|\n/g) : [u]);
  3593. var ui = yt / _e.internal.scaleFactor, hi = ui * (cn - 1);
  3594. switch (D.baseline) {
  3595. case "bottom":
  3596. I -= hi;
  3597. break;
  3598. case "top":
  3599. I += ui - hi;
  3600. break;
  3601. case "hanging":
  3602. I += ui - 2 * hi;
  3603. break;
  3604. case "middle":
  3605. I += ui / 2 - hi;
  3606. }
  3607. if ((te = D.maxWidth || 0) > 0 && (typeof u == "string" ? u = _e.splitTextToSize(u, te) : Object.prototype.toString.call(u) === "[object Array]" && (u = u.reduce(function(Pe, Ie) {
  3608. return Pe.concat(_e.splitTextToSize(Ie, te));
  3609. }, []))), lt = { text: u, x: v, y: I, options: D, mutex: { pdfEscape: Un, activeFontKey: Bt, fonts: se, activeFontSize: yt } }, be.publish("preProcessText", lt), u = lt.text, Et = (D = lt.options).angle, Ae instanceof Gt == 0 && Et && typeof Et == "number") {
  3610. Et *= Math.PI / 180, D.rotationDirection === 0 && (Et = -Et), q === G && (Et = -Et);
  3611. var va = Math.cos(Et), hr = Math.sin(Et);
  3612. Ae = new Gt(va, hr, -hr, va, 0, 0);
  3613. } else Et && Et instanceof Gt && (Ae = Et);
  3614. q !== G || Ae || (Ae = yr), (Xt = D.charSpace || Bi) !== void 0 && (Te += X(z(Xt)) + ` Tc
  3615. `, this.setCharSpace(this.getCharSpace() || 0)), ($e = D.horizontalScale) !== void 0 && (Te += X(100 * $e) + ` Tz
  3616. `), D.lang;
  3617. var yn = -1, Xa = D.renderingMode !== void 0 ? D.renderingMode : D.stroke, qi = _e.internal.getCurrentPageInfo().pageContext;
  3618. switch (Xa) {
  3619. case 0:
  3620. case !1:
  3621. case "fill":
  3622. yn = 0;
  3623. break;
  3624. case 1:
  3625. case !0:
  3626. case "stroke":
  3627. yn = 1;
  3628. break;
  3629. case 2:
  3630. case "fillThenStroke":
  3631. yn = 2;
  3632. break;
  3633. case 3:
  3634. case "invisible":
  3635. yn = 3;
  3636. break;
  3637. case 4:
  3638. case "fillAndAddForClipping":
  3639. yn = 4;
  3640. break;
  3641. case 5:
  3642. case "strokeAndAddPathForClipping":
  3643. yn = 5;
  3644. break;
  3645. case 6:
  3646. case "fillThenStrokeAndAddToPathForClipping":
  3647. yn = 6;
  3648. break;
  3649. case 7:
  3650. case "addToPathForClipping":
  3651. yn = 7;
  3652. }
  3653. var $a = qi.usedRenderingMode !== void 0 ? qi.usedRenderingMode : -1;
  3654. yn !== -1 ? Te += yn + ` Tr
  3655. ` : $a !== -1 && (Te += `0 Tr
  3656. `), yn !== -1 && (qi.usedRenderingMode = yn), Ct = D.align || "left";
  3657. var zn, fi = yt * cn, ba = _e.internal.pageSize.getWidth(), Ui = se[Bt];
  3658. Xt = D.charSpace || Bi, te = D.maxWidth || 0, de = Object.assign({ autoencode: !0, noBOM: !0 }, D.flags);
  3659. var ci = [], wa = function(Pe) {
  3660. return _e.getStringUnitWidth(Pe, { font: Ui, charSpace: Xt, fontSize: yt, doKerning: !1 }) * yt / Sr;
  3661. };
  3662. if (Object.prototype.toString.call(u) === "[object Array]") {
  3663. var xn;
  3664. mt = si(u), Ct !== "left" && (zn = mt.map(wa));
  3665. var Ln, zi = 0;
  3666. if (Ct === "right") {
  3667. v -= zn[0], u = [], dn = mt.length;
  3668. for (var Dr = 0; Dr < dn; Dr++) Dr === 0 ? (Ln = _r(v), xn = Ar(I)) : (Ln = z(zi - zn[Dr]), xn = -fi), u.push([mt[Dr], Ln, xn]), zi = zn[Dr];
  3669. } else if (Ct === "center") {
  3670. v -= zn[0] / 2, u = [], dn = mt.length;
  3671. for (var qr = 0; qr < dn; qr++) qr === 0 ? (Ln = _r(v), xn = Ar(I)) : (Ln = z((zi - zn[qr]) / 2), xn = -fi), u.push([mt[qr], Ln, xn]), zi = zn[qr];
  3672. } else if (Ct === "left") {
  3673. u = [], dn = mt.length;
  3674. for (var Hi = 0; Hi < dn; Hi++) u.push(mt[Hi]);
  3675. } else if (Ct === "justify" && Ui.encoding === "Identity-H") {
  3676. u = [], dn = mt.length, te = te !== 0 ? te : ba;
  3677. for (var di = 0, Ze = 0; Ze < dn; Ze++) if (xn = Ze === 0 ? Ar(I) : -fi, Ln = Ze === 0 ? _r(v) : di, Ze < dn - 1) {
  3678. var Qs = z((te - zn[Ze]) / (mt[Ze].split(" ").length - 1)), fr = mt[Ze].split(" ");
  3679. u.push([fr[0] + " ", Ln, xn]), di = 0;
  3680. for (var Kn = 1; Kn < fr.length; Kn++) {
  3681. var pi = (wa(fr[Kn - 1] + " " + fr[Kn]) - wa(fr[Kn])) * Sr + Qs;
  3682. Kn == fr.length - 1 ? u.push([fr[Kn], pi, 0]) : u.push([fr[Kn] + " ", pi, 0]), di -= pi;
  3683. }
  3684. } else u.push([mt[Ze], Ln, xn]);
  3685. u.push(["", di, 0]);
  3686. } else {
  3687. if (Ct !== "justify") throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');
  3688. for (u = [], dn = mt.length, te = te !== 0 ? te : ba, Ze = 0; Ze < dn; Ze++) {
  3689. xn = Ze === 0 ? Ar(I) : -fi, Ln = Ze === 0 ? _r(v) : 0;
  3690. var ya = mt[Ze].split(" ").length - 1, xa = ya > 0 ? (te - zn[Ze]) / ya : 0;
  3691. Ze < dn - 1 ? ci.push(X(z(xa))) : ci.push(0), u.push([mt[Ze], Ln, xn]);
  3692. }
  3693. }
  3694. }
  3695. (typeof D.R2L == "boolean" ? D.R2L : zt) === !0 && (u = oi(u, function(Pe, Ie, We) {
  3696. return [Pe.split("").reverse().join(""), Ie, We];
  3697. })), lt = { text: u, x: v, y: I, options: D, mutex: { pdfEscape: Un, activeFontKey: Bt, fonts: se, activeFontSize: yt } }, be.publish("postProcessText", lt), u = lt.text, Re = lt.mutex.isHex || !1;
  3698. var Wi = se[Bt].encoding;
  3699. Wi !== "WinAnsiEncoding" && Wi !== "StandardEncoding" || (u = oi(u, function(Pe, Ie, We) {
  3700. return [ma(Pe), Ie, We];
  3701. })), mt = si(u), u = [];
  3702. for (var gi, mi, Ur, kr = Array.isArray(mt[0]) ? 1 : 0, zr = "", Vi = function(Pe, Ie, We) {
  3703. var Qe = "";
  3704. return We instanceof Gt ? (We = typeof D.angle == "number" ? wr(We, new Gt(1, 0, 0, 1, Pe, Ie)) : wr(new Gt(1, 0, 0, 1, Pe, Ie), We), q === G && (We = wr(new Gt(1, 0, 0, -1, 0, 0), We)), Qe = We.join(" ") + ` Tm
  3705. `) : Qe = X(Pe) + " " + X(Ie) + ` Td
  3706. `, Qe;
  3707. }, pn = 0; pn < mt.length; pn++) {
  3708. switch (zr = "", kr) {
  3709. case 1:
  3710. Ur = (Re ? "<" : "(") + mt[pn][0] + (Re ? ">" : ")"), gi = parseFloat(mt[pn][1]), mi = parseFloat(mt[pn][2]);
  3711. break;
  3712. case 0:
  3713. Ur = (Re ? "<" : "(") + mt[pn] + (Re ? ">" : ")"), gi = _r(v), mi = Ar(I);
  3714. }
  3715. ci !== void 0 && ci[pn] !== void 0 && (zr = ci[pn] + ` Tw
  3716. `), pn === 0 ? u.push(zr + Vi(gi, mi, Ae) + Ur) : kr === 0 ? u.push(zr + Ur) : kr === 1 && u.push(zr + Vi(gi, mi, Ae) + Ur);
  3717. }
  3718. u = kr === 0 ? u.join(` Tj
  3719. T* `) : u.join(` Tj
  3720. `), u += ` Tj
  3721. `;
  3722. var cr = `BT
  3723. /`;
  3724. return cr += Bt + " " + yt + ` Tf
  3725. `, cr += X(yt * cn) + ` TL
  3726. `, cr += ur + `
  3727. `, cr += Te, cr += u, P(cr += "ET"), k[Bt] = !0, _e;
  3728. };
  3729. var Ds = p.__private__.clip = p.clip = function(u) {
  3730. return P(u === "evenodd" ? "W*" : "W"), this;
  3731. };
  3732. p.clipEvenOdd = function() {
  3733. return Ds("evenodd");
  3734. }, p.__private__.discardPath = p.discardPath = function() {
  3735. return P("n"), this;
  3736. };
  3737. var lr = p.__private__.isValidStyle = function(u) {
  3738. var v = !1;
  3739. return [void 0, null, "S", "D", "F", "DF", "FD", "f", "f*", "B", "B*", "n"].indexOf(u) !== -1 && (v = !0), v;
  3740. };
  3741. p.__private__.setDefaultPathOperation = p.setDefaultPathOperation = function(u) {
  3742. return lr(u) && (d = u), this;
  3743. };
  3744. var Ha = p.__private__.getStyle = p.getStyle = function(u) {
  3745. var v = d;
  3746. switch (u) {
  3747. case "D":
  3748. case "S":
  3749. v = "S";
  3750. break;
  3751. case "F":
  3752. v = "f";
  3753. break;
  3754. case "FD":
  3755. case "DF":
  3756. v = "B";
  3757. break;
  3758. case "f":
  3759. case "f*":
  3760. case "B":
  3761. case "B*":
  3762. v = u;
  3763. }
  3764. return v;
  3765. }, Ei = p.close = function() {
  3766. return P("h"), this;
  3767. };
  3768. p.stroke = function() {
  3769. return P("S"), this;
  3770. }, p.fill = function(u) {
  3771. return Oi("f", u), this;
  3772. }, p.fillEvenOdd = function(u) {
  3773. return Oi("f*", u), this;
  3774. }, p.fillStroke = function(u) {
  3775. return Oi("B", u), this;
  3776. }, p.fillStrokeEvenOdd = function(u) {
  3777. return Oi("B*", u), this;
  3778. };
  3779. var Oi = function(u, v) {
  3780. Se(v) === "object" ? Us(v, u) : P(u);
  3781. }, ha = function(u) {
  3782. u === null || q === G && u === void 0 || (u = Ha(u), P(u));
  3783. };
  3784. function qs(u, v, I, D, K) {
  3785. var lt = new Qi(v || this.boundingBox, I || this.xStep, D || this.yStep, this.gState, K || this.matrix);
  3786. lt.stream = this.stream;
  3787. var mt = u + "$$" + this.cloneIndex++ + "$$";
  3788. return Tn(mt, lt), lt;
  3789. }
  3790. var Us = function(u, v) {
  3791. var I = ke[u.key], D = Ut[I];
  3792. if (D instanceof wi) P("q"), P(zs(v)), D.gState && p.setGState(D.gState), P(u.matrix.toString() + " cm"), P("/" + I + " sh"), P("Q");
  3793. else if (D instanceof Qi) {
  3794. var K = new Gt(1, 0, 0, -1, 0, ai());
  3795. u.matrix && (K = K.multiply(u.matrix || yr), I = qs.call(D, u.key, u.boundingBox, u.xStep, u.yStep, K).id), P("q"), P("/Pattern cs"), P("/" + I + " scn"), D.gState && p.setGState(D.gState), P(v), P("Q");
  3796. }
  3797. }, zs = function(u) {
  3798. switch (u) {
  3799. case "f":
  3800. case "F":
  3801. case "n":
  3802. return "W n";
  3803. case "f*":
  3804. return "W* n";
  3805. case "B":
  3806. case "S":
  3807. return "W S";
  3808. case "B*":
  3809. return "W* S";
  3810. }
  3811. }, Br = p.moveTo = function(u, v) {
  3812. return P(X(z(u)) + " " + X(U(v)) + " m"), this;
  3813. }, Wa = p.lineTo = function(u, v) {
  3814. return P(X(z(u)) + " " + X(U(v)) + " l"), this;
  3815. }, Mr = p.curveTo = function(u, v, I, D, K, lt) {
  3816. return P([X(z(u)), X(U(v)), X(z(I)), X(U(D)), X(z(K)), X(U(lt)), "c"].join(" ")), this;
  3817. };
  3818. p.__private__.line = p.line = function(u, v, I, D, K) {
  3819. if (isNaN(u) || isNaN(v) || isNaN(I) || isNaN(D) || !lr(K)) throw new Error("Invalid arguments passed to jsPDF.line");
  3820. return q === V ? this.lines([[I - u, D - v]], u, v, [1, 1], K || "S") : this.lines([[I - u, D - v]], u, v, [1, 1]).stroke();
  3821. }, p.__private__.lines = p.lines = function(u, v, I, D, K, lt) {
  3822. var mt, Et, Ct, Xt, te, de, $e, Ae, _e, Ce, Re, Te;
  3823. if (typeof u == "number" && (Te = I, I = v, v = u, u = Te), D = D || [1, 1], lt = lt || !1, isNaN(v) || isNaN(I) || !Array.isArray(u) || !Array.isArray(D) || !lr(K) || typeof lt != "boolean") throw new Error("Invalid arguments passed to jsPDF.lines");
  3824. for (Br(v, I), mt = D[0], Et = D[1], Xt = u.length, Ce = v, Re = I, Ct = 0; Ct < Xt; Ct++) (te = u[Ct]).length === 2 ? (Ce = te[0] * mt + Ce, Re = te[1] * Et + Re, Wa(Ce, Re)) : (de = te[0] * mt + Ce, $e = te[1] * Et + Re, Ae = te[2] * mt + Ce, _e = te[3] * Et + Re, Ce = te[4] * mt + Ce, Re = te[5] * Et + Re, Mr(de, $e, Ae, _e, Ce, Re));
  3825. return lt && Ei(), ha(K), this;
  3826. }, p.path = function(u) {
  3827. for (var v = 0; v < u.length; v++) {
  3828. var I = u[v], D = I.c;
  3829. switch (I.op) {
  3830. case "m":
  3831. Br(D[0], D[1]);
  3832. break;
  3833. case "l":
  3834. Wa(D[0], D[1]);
  3835. break;
  3836. case "c":
  3837. Mr.apply(this, D);
  3838. break;
  3839. case "h":
  3840. Ei();
  3841. }
  3842. }
  3843. return this;
  3844. }, p.__private__.rect = p.rect = function(u, v, I, D, K) {
  3845. if (isNaN(u) || isNaN(v) || isNaN(I) || isNaN(D) || !lr(K)) throw new Error("Invalid arguments passed to jsPDF.rect");
  3846. return q === V && (D = -D), P([X(z(u)), X(U(v)), X(z(I)), X(z(D)), "re"].join(" ")), ha(K), this;
  3847. }, p.__private__.triangle = p.triangle = function(u, v, I, D, K, lt, mt) {
  3848. if (isNaN(u) || isNaN(v) || isNaN(I) || isNaN(D) || isNaN(K) || isNaN(lt) || !lr(mt)) throw new Error("Invalid arguments passed to jsPDF.triangle");
  3849. return this.lines([[I - u, D - v], [K - I, lt - D], [u - K, v - lt]], u, v, [1, 1], mt, !0), this;
  3850. }, p.__private__.roundedRect = p.roundedRect = function(u, v, I, D, K, lt, mt) {
  3851. if (isNaN(u) || isNaN(v) || isNaN(I) || isNaN(D) || isNaN(K) || isNaN(lt) || !lr(mt)) throw new Error("Invalid arguments passed to jsPDF.roundedRect");
  3852. var Et = 4 / 3 * (Math.SQRT2 - 1);
  3853. return K = Math.min(K, 0.5 * I), lt = Math.min(lt, 0.5 * D), this.lines([[I - 2 * K, 0], [K * Et, 0, K, lt - lt * Et, K, lt], [0, D - 2 * lt], [0, lt * Et, -K * Et, lt, -K, lt], [2 * K - I, 0], [-K * Et, 0, -K, -lt * Et, -K, -lt], [0, 2 * lt - D], [0, -lt * Et, K * Et, -lt, K, -lt]], u + K, v, [1, 1], mt, !0), this;
  3854. }, p.__private__.ellipse = p.ellipse = function(u, v, I, D, K) {
  3855. if (isNaN(u) || isNaN(v) || isNaN(I) || isNaN(D) || !lr(K)) throw new Error("Invalid arguments passed to jsPDF.ellipse");
  3856. var lt = 4 / 3 * (Math.SQRT2 - 1) * I, mt = 4 / 3 * (Math.SQRT2 - 1) * D;
  3857. return Br(u + I, v), Mr(u + I, v - mt, u + lt, v - D, u, v - D), Mr(u - lt, v - D, u - I, v - mt, u - I, v), Mr(u - I, v + mt, u - lt, v + D, u, v + D), Mr(u + lt, v + D, u + I, v + mt, u + I, v), ha(K), this;
  3858. }, p.__private__.circle = p.circle = function(u, v, I, D) {
  3859. if (isNaN(u) || isNaN(v) || isNaN(I) || !lr(D)) throw new Error("Invalid arguments passed to jsPDF.circle");
  3860. return this.ellipse(u, v, I, I, D);
  3861. }, p.setFont = function(u, v, I) {
  3862. return I && (v = dt(v, I)), Bt = qa(u, v, { disableWarning: !1 }), this;
  3863. };
  3864. var Hs = p.__private__.getFont = p.getFont = function() {
  3865. return se[qa.apply(p, arguments)];
  3866. };
  3867. p.__private__.getFontList = p.getFontList = function() {
  3868. var u, v, I = {};
  3869. for (u in oe) if (oe.hasOwnProperty(u)) for (v in I[u] = [], oe[u]) oe[u].hasOwnProperty(v) && I[u].push(v);
  3870. return I;
  3871. }, p.addFont = function(u, v, I, D, K) {
  3872. var lt = ["StandardEncoding", "MacRomanEncoding", "Identity-H", "WinAnsiEncoding"];
  3873. return arguments[3] && lt.indexOf(arguments[3]) !== -1 ? K = arguments[3] : arguments[3] && lt.indexOf(arguments[3]) == -1 && (I = dt(I, D)), Ma.call(this, u, v, I, K = K || "Identity-H");
  3874. };
  3875. var ri, Jt = n.lineWidth || 0.200025, Ws = p.__private__.getLineWidth = p.getLineWidth = function() {
  3876. return Jt;
  3877. }, Vs = p.__private__.setLineWidth = p.setLineWidth = function(u) {
  3878. return Jt = u, P(X(z(u)) + " w"), this;
  3879. };
  3880. p.__private__.setLineDash = Tt.API.setLineDash = Tt.API.setLineDashPattern = function(u, v) {
  3881. if (u = u || [], v = v || 0, isNaN(v) || !Array.isArray(u)) throw new Error("Invalid arguments passed to jsPDF.setLineDash");
  3882. return u = u.map(function(I) {
  3883. return X(z(I));
  3884. }).join(" "), v = X(z(v)), P("[" + u + "] " + v + " d"), this;
  3885. };
  3886. var Gs = p.__private__.getLineHeight = p.getLineHeight = function() {
  3887. return yt * ri;
  3888. };
  3889. p.__private__.getLineHeight = p.getLineHeight = function() {
  3890. return yt * ri;
  3891. };
  3892. var Ys = p.__private__.setLineHeightFactor = p.setLineHeightFactor = function(u) {
  3893. return typeof (u = u || 1.15) == "number" && (ri = u), this;
  3894. }, Js = p.__private__.getLineHeightFactor = p.getLineHeightFactor = function() {
  3895. return ri;
  3896. };
  3897. Ys(n.lineHeight);
  3898. var _r = p.__private__.getHorizontalCoordinate = function(u) {
  3899. return z(u);
  3900. }, Ar = p.__private__.getVerticalCoordinate = function(u) {
  3901. return q === G ? u : Vt[B].mediaBox.topRightY - Vt[B].mediaBox.bottomLeftY - z(u);
  3902. }, Ks = p.__private__.getHorizontalCoordinateString = p.getHorizontalCoordinateString = function(u) {
  3903. return X(_r(u));
  3904. }, Xs = p.__private__.getVerticalCoordinateString = p.getVerticalCoordinateString = function(u) {
  3905. return X(Ar(u));
  3906. }, ji = n.strokeColor || "0 G";
  3907. p.__private__.getStrokeColor = p.getDrawColor = function() {
  3908. return ir(ji);
  3909. }, p.__private__.setStrokeColor = p.setDrawColor = function(u, v, I, D) {
  3910. return ji = Yn({ ch1: u, ch2: v, ch3: I, ch4: D, pdfColorType: "draw", precision: 2 }), P(ji), this;
  3911. };
  3912. var fa = n.fillColor || "0 g";
  3913. p.__private__.getFillColor = p.getFillColor = function() {
  3914. return ir(fa);
  3915. }, p.__private__.setFillColor = p.setFillColor = function(u, v, I, D) {
  3916. return fa = Yn({ ch1: u, ch2: v, ch3: I, ch4: D, pdfColorType: "fill", precision: 2 }), P(fa), this;
  3917. };
  3918. var ur = n.textColor || "0 g", $s = p.__private__.getTextColor = p.getTextColor = function() {
  3919. return ir(ur);
  3920. };
  3921. p.__private__.setTextColor = p.setTextColor = function(u, v, I, D) {
  3922. return ur = Yn({ ch1: u, ch2: v, ch3: I, ch4: D, pdfColorType: "text", precision: 3 }), this;
  3923. };
  3924. var Bi = n.charSpace, Zs = p.__private__.getCharSpace = p.getCharSpace = function() {
  3925. return parseFloat(Bi || 0);
  3926. };
  3927. p.__private__.setCharSpace = p.setCharSpace = function(u) {
  3928. if (isNaN(u)) throw new Error("Invalid argument passed to jsPDF.setCharSpace");
  3929. return Bi = u, this;
  3930. };
  3931. var ca = 0;
  3932. p.CapJoinStyles = { 0: 0, butt: 0, but: 0, miter: 0, 1: 1, round: 1, rounded: 1, circle: 1, 2: 2, projecting: 2, project: 2, square: 2, bevel: 2 }, p.__private__.setLineCap = p.setLineCap = function(u) {
  3933. var v = p.CapJoinStyles[u];
  3934. if (v === void 0) throw new Error("Line cap style of '" + u + "' is not recognized. See or extend .CapJoinStyles property for valid styles");
  3935. return ca = v, P(v + " J"), this;
  3936. };
  3937. var Rr = 0;
  3938. p.__private__.setLineJoin = p.setLineJoin = function(u) {
  3939. var v = p.CapJoinStyles[u];
  3940. if (v === void 0) throw new Error("Line join style of '" + u + "' is not recognized. See or extend .CapJoinStyles property for valid styles");
  3941. return Rr = v, P(v + " j"), this;
  3942. }, p.__private__.setLineMiterLimit = p.__private__.setMiterLimit = p.setLineMiterLimit = p.setMiterLimit = function(u) {
  3943. if (u = u || 0, isNaN(u)) throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");
  3944. return P(X(z(u)) + " M"), this;
  3945. }, p.GState = Cs, p.setGState = function(u) {
  3946. (u = typeof u == "string" ? Yt[Qt[u]] : da(null, u)).equals(Be) || (P("/" + u.id + " gs"), Be = u);
  3947. };
  3948. var da = function(u, v) {
  3949. if (!u || !Qt[u]) {
  3950. var I = !1;
  3951. for (var D in Yt) if (Yt.hasOwnProperty(D) && Yt[D].equals(v)) {
  3952. I = !0;
  3953. break;
  3954. }
  3955. if (I) v = Yt[D];
  3956. else {
  3957. var K = "GS" + (Object.keys(Yt).length + 1).toString(10);
  3958. Yt[K] = v, v.id = K;
  3959. }
  3960. return u && (Qt[u] = v.id), be.publish("addGState", v), v;
  3961. }
  3962. };
  3963. p.addGState = function(u, v) {
  3964. return da(u, v), this;
  3965. }, p.saveGraphicsState = function() {
  3966. return P("q"), je.push({ key: Bt, size: yt, color: ur }), this;
  3967. }, p.restoreGraphicsState = function() {
  3968. P("Q");
  3969. var u = je.pop();
  3970. return Bt = u.key, yt = u.size, ur = u.color, Be = null, this;
  3971. }, p.setCurrentTransformationMatrix = function(u) {
  3972. return P(u.toString() + " cm"), this;
  3973. }, p.comment = function(u) {
  3974. return P("#" + u), this;
  3975. };
  3976. var ii = function(u, v) {
  3977. var I = u || 0;
  3978. Object.defineProperty(this, "x", { enumerable: !0, get: function() {
  3979. return I;
  3980. }, set: function(lt) {
  3981. isNaN(lt) || (I = parseFloat(lt));
  3982. } });
  3983. var D = v || 0;
  3984. Object.defineProperty(this, "y", { enumerable: !0, get: function() {
  3985. return D;
  3986. }, set: function(lt) {
  3987. isNaN(lt) || (D = parseFloat(lt));
  3988. } });
  3989. var K = "pt";
  3990. return Object.defineProperty(this, "type", { enumerable: !0, get: function() {
  3991. return K;
  3992. }, set: function(lt) {
  3993. K = lt.toString();
  3994. } }), this;
  3995. }, pa = function(u, v, I, D) {
  3996. ii.call(this, u, v), this.type = "rect";
  3997. var K = I || 0;
  3998. Object.defineProperty(this, "w", { enumerable: !0, get: function() {
  3999. return K;
  4000. }, set: function(mt) {
  4001. isNaN(mt) || (K = parseFloat(mt));
  4002. } });
  4003. var lt = D || 0;
  4004. return Object.defineProperty(this, "h", { enumerable: !0, get: function() {
  4005. return lt;
  4006. }, set: function(mt) {
  4007. isNaN(mt) || (lt = parseFloat(mt));
  4008. } }), this;
  4009. }, Mi = function() {
  4010. this.page = le, this.currentPage = B, this.pages = _t.slice(0), this.pagesContext = Vt.slice(0), this.x = Rt, this.y = He, this.matrix = ge, this.width = Va(B), this.height = Lr(B), this.outputDestination = St, this.id = "", this.objectNumber = -1;
  4011. };
  4012. Mi.prototype.restore = function() {
  4013. le = this.page, B = this.currentPage, Vt = this.pagesContext, _t = this.pages, Rt = this.x, He = this.y, ge = this.matrix, Nr(B, this.width), Ga(B, this.height), St = this.outputDestination;
  4014. };
  4015. var ga = function(u, v, I, D, K) {
  4016. rr.push(new Mi()), le = B = 0, _t = [], Rt = u, He = v, ge = K, oa([I, D]);
  4017. };
  4018. for (var Ri in p.beginFormObject = function(u, v, I, D, K) {
  4019. return ga(u, v, I, D, K), this;
  4020. }, p.endFormObject = function(u) {
  4021. return function(v) {
  4022. if (br[v]) rr.pop().restore();
  4023. else {
  4024. var I = new Mi(), D = "Xo" + (Object.keys(fn).length + 1).toString(10);
  4025. I.id = D, br[v] = D, fn[D] = I, be.publish("addFormObject", I), rr.pop().restore();
  4026. }
  4027. }(u), this;
  4028. }, p.doFormObject = function(u, v) {
  4029. var I = fn[br[u]];
  4030. return P("q"), P(v.toString() + " cm"), P("/" + I.id + " Do"), P("Q"), this;
  4031. }, p.getFormObject = function(u) {
  4032. var v = fn[br[u]];
  4033. return { x: v.x, y: v.y, width: v.width, height: v.height, matrix: v.matrix };
  4034. }, p.save = function(u, v) {
  4035. return u = u || "generated.pdf", (v = v || {}).returnPromise = v.returnPromise || !1, v.returnPromise === !1 ? (bi(Fi(or()), u), typeof bi.unload == "function" && Kt.setTimeout && setTimeout(bi.unload, 911), this) : new Promise(function(I, D) {
  4036. try {
  4037. var K = bi(Fi(or()), u);
  4038. typeof bi.unload == "function" && Kt.setTimeout && setTimeout(bi.unload, 911), I(K);
  4039. } catch (lt) {
  4040. D(lt.message);
  4041. }
  4042. });
  4043. }, Tt.API) Tt.API.hasOwnProperty(Ri) && (Ri === "events" && Tt.API.events.length ? function(u, v) {
  4044. var I, D, K;
  4045. for (K = v.length - 1; K !== -1; K--) I = v[K][0], D = v[K][1], u.subscribe.apply(u, [I].concat(typeof D == "function" ? [D] : D));
  4046. }(be, Tt.API.events) : p[Ri] = Tt.API[Ri]);
  4047. function Va(u) {
  4048. return Vt[u].mediaBox.topRightX - Vt[u].mediaBox.bottomLeftX;
  4049. }
  4050. function Nr(u, v) {
  4051. Vt[u].mediaBox.topRightX = v + Vt[u].mediaBox.bottomLeftX;
  4052. }
  4053. function Lr(u) {
  4054. return Vt[u].mediaBox.topRightY - Vt[u].mediaBox.bottomLeftY;
  4055. }
  4056. function Ga(u, v) {
  4057. Vt[u].mediaBox.topRightY = v + Vt[u].mediaBox.bottomLeftY;
  4058. }
  4059. var Ya = p.getPageWidth = function(u) {
  4060. return Va(u = u || B) / ne;
  4061. }, Ja = p.setPageWidth = function(u, v) {
  4062. Nr(u, v * ne);
  4063. }, ai = p.getPageHeight = function(u) {
  4064. return Lr(u = u || B) / ne;
  4065. }, Ka = p.setPageHeight = function(u, v) {
  4066. Ga(u, v * ne);
  4067. };
  4068. return p.internal = { pdfEscape: Un, getStyle: Ha, getFont: Hs, getFontSize: It, getCharSpace: Zs, getTextColor: $s, getLineHeight: Gs, getLineHeightFactor: Js, getLineWidth: Ws, write: Lt, getHorizontalCoordinate: _r, getVerticalCoordinate: Ar, getCoordinateString: Ks, getVerticalCoordinateString: Xs, collections: {}, newObject: De, newAdditionalObject: ti, newObjectDeferred: rn, newObjectDeferredBegin: sn, getFilters: Jn, putStream: qn, events: be, scaleFactor: ne, pageSize: { getWidth: function() {
  4069. return Ya(B);
  4070. }, setWidth: function(u) {
  4071. Ja(B, u);
  4072. }, getHeight: function() {
  4073. return ai(B);
  4074. }, setHeight: function(u) {
  4075. Ka(B, u);
  4076. } }, encryptionOptions: m, encryption: on, getEncryptor: function(u) {
  4077. return m !== null ? on.encryptor(u, 0) : function(v) {
  4078. return v;
  4079. };
  4080. }, output: Ci, getNumberOfPages: Da, get pages() {
  4081. return _t;
  4082. }, out: P, f2: N, f3: E, getPageInfo: za, getPageInfoByObjId: Rs, getCurrentPageInfo: Ts, getPDFVersion: O, Point: ii, Rectangle: pa, Matrix: Gt, hasHotfix: xr }, Object.defineProperty(p.internal.pageSize, "width", { get: function() {
  4083. return Ya(B);
  4084. }, set: function(u) {
  4085. Ja(B, u);
  4086. }, enumerable: !0, configurable: !0 }), Object.defineProperty(p.internal.pageSize, "height", { get: function() {
  4087. return ai(B);
  4088. }, set: function(u) {
  4089. Ka(B, u);
  4090. }, enumerable: !0, configurable: !0 }), function(u) {
  4091. for (var v = 0, I = Ht.length; v < I; v++) {
  4092. var D = Ma.call(this, u[v][0], u[v][1], u[v][2], Ht[v][3], !0);
  4093. _ === !1 && (k[D] = !0);
  4094. var K = u[v][0].split("-");
  4095. Ba({ id: D, fontName: K[0], fontStyle: K[1] || "" });
  4096. }
  4097. be.publish("addFonts", { fonts: se, dictionary: oe });
  4098. }.call(p, Ht), Bt = "F1", Ra(s, t), be.publish("initialized"), p;
  4099. }
  4100. $i.prototype.lsbFirstWord = function(n) {
  4101. return String.fromCharCode(255 & n, n >> 8 & 255, n >> 16 & 255, n >> 24 & 255);
  4102. }, $i.prototype.toHexString = function(n) {
  4103. return n.split("").map(function(e) {
  4104. return ("0" + (255 & e.charCodeAt(0)).toString(16)).slice(-2);
  4105. }).join("");
  4106. }, $i.prototype.hexToBytes = function(n) {
  4107. for (var e = [], t = 0; t < n.length; t += 2) e.push(String.fromCharCode(parseInt(n.substr(t, 2), 16)));
  4108. return e.join("");
  4109. }, $i.prototype.processOwnerPassword = function(n, e) {
  4110. return Go(Vo(e).substr(0, 5), n);
  4111. }, $i.prototype.encryptor = function(n, e) {
  4112. var t = Vo(this.encryptionKey + String.fromCharCode(255 & n, n >> 8 & 255, n >> 16 & 255, 255 & e, e >> 8 & 255)).substr(0, 10);
  4113. return function(i) {
  4114. return Go(t, i);
  4115. };
  4116. }, Cs.prototype.equals = function(n) {
  4117. var e, t = "id,objectNumber,equals";
  4118. if (!n || Se(n) !== Se(this)) return !1;
  4119. var i = 0;
  4120. for (e in this) if (!(t.indexOf(e) >= 0)) {
  4121. if (this.hasOwnProperty(e) && !n.hasOwnProperty(e) || this[e] !== n[e]) return !1;
  4122. i++;
  4123. }
  4124. for (e in n) n.hasOwnProperty(e) && t.indexOf(e) < 0 && i--;
  4125. return i === 0;
  4126. }, Tt.API = { events: [] }, Tt.version = "4.2.1";
  4127. var ze = Tt.API, Qo = 1, Li = function(n) {
  4128. return n.replace(/\\/g, "\\\\").replace(/\(/g, "\\(").replace(/\)/g, "\\)");
  4129. }, Ki = function(n) {
  4130. return n.replace(/\\\\/g, "\\").replace(/\\\(/g, "(").replace(/\\\)/g, ")");
  4131. }, Ai = function(n) {
  4132. return n.toString().replace(/#/g, "#23").replace(/[\s\n\r()<>[\]{}\/%]/g, function(e) {
  4133. var t = e.charCodeAt(0).toString(16).toUpperCase();
  4134. return "#" + (t.length === 1 ? "0" + t : t);
  4135. });
  4136. }, $t = function(n) {
  4137. return n.toFixed(2);
  4138. }, Xr = function(n) {
  4139. return n.toFixed(5);
  4140. };
  4141. ze.__acroform__ = {};
  4142. var Pn = function(n, e) {
  4143. n.prototype = Object.create(e.prototype), n.prototype.constructor = n;
  4144. }, Eu = function(n) {
  4145. return n * Qo;
  4146. }, pr = function(n) {
  4147. var e = new Ch(), t = Ft.internal.getHeight(n) || 0, i = Ft.internal.getWidth(n) || 0;
  4148. return e.BBox = [0, 0, Number($t(i)), Number($t(t))], e;
  4149. }, M1 = ze.__acroform__.setBit = function(n, e) {
  4150. if (n = n || 0, e = e || 0, isNaN(n) || isNaN(e)) throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");
  4151. return n | 1 << e;
  4152. }, R1 = ze.__acroform__.clearBit = function(n, e) {
  4153. if (n = n || 0, e = e || 0, isNaN(n) || isNaN(e)) throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");
  4154. return n & ~(1 << e);
  4155. }, T1 = ze.__acroform__.getBit = function(n, e) {
  4156. if (isNaN(n) || isNaN(e)) throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");
  4157. return n & 1 << e ? 1 : 0;
  4158. }, Ye = ze.__acroform__.getBitForPdf = function(n, e) {
  4159. if (isNaN(n) || isNaN(e)) throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");
  4160. return T1(n, e - 1);
  4161. }, Je = ze.__acroform__.setBitForPdf = function(n, e) {
  4162. if (isNaN(n) || isNaN(e)) throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");
  4163. return M1(n, e - 1);
  4164. }, Ke = ze.__acroform__.clearBitForPdf = function(n, e) {
  4165. if (isNaN(n) || isNaN(e)) throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");
  4166. return R1(n, e - 1);
  4167. }, D1 = ze.__acroform__.calculateCoordinates = function(n, e) {
  4168. var t = e.internal.getHorizontalCoordinate, i = e.internal.getVerticalCoordinate, s = n[0], a = n[1], c = n[2], l = n[3], f = {};
  4169. return f.lowerLeft_X = t(s) || 0, f.lowerLeft_Y = i(a + l) || 0, f.upperRight_X = t(s + c) || 0, f.upperRight_Y = i(a) || 0, [Number($t(f.lowerLeft_X)), Number($t(f.lowerLeft_Y)), Number($t(f.upperRight_X)), Number($t(f.upperRight_Y))];
  4170. }, q1 = function(n) {
  4171. if (n.appearanceStreamContent) return n.appearanceStreamContent;
  4172. if (n.V || n.DV) {
  4173. var e = [], t = n._V || n.DV, i = Yo(n, t), s = n.scope.internal.getFont(n.fontName, n.fontStyle).id;
  4174. e.push("/Tx BMC"), e.push("q"), e.push("BT"), e.push(n.scope.__private__.encodeColorString(n.color)), e.push("/" + s + " " + $t(i.fontSize) + " Tf"), e.push("1 0 0 1 0 0 Tm"), e.push(i.text), e.push("ET"), e.push("Q"), e.push("EMC");
  4175. var a = pr(n);
  4176. return a.scope = n.scope, a.stream = e.join(`
  4177. `), a;
  4178. }
  4179. }, Yo = function(n, e) {
  4180. var t = n.fontSize === 0 ? n.maxFontSize : n.fontSize, i = { text: "", fontSize: "" }, s = (e = (e = e.substr(0, 1) == "(" ? e.substr(1) : e).substr(e.length - 1) == ")" ? e.substr(0, e.length - 1) : e).split(" ");
  4181. s = n.multiline ? s.map(function(N) {
  4182. return N.split(`
  4183. `);
  4184. }) : s.map(function(N) {
  4185. return [N];
  4186. });
  4187. var a = t, c = Ft.internal.getHeight(n) || 0;
  4188. c = c < 0 ? -c : c;
  4189. var l = Ft.internal.getWidth(n) || 0;
  4190. l = l < 0 ? -l : l;
  4191. var f = function(N, E, z) {
  4192. if (N + 1 < s.length) {
  4193. var U = E + " " + s[N + 1][0];
  4194. return xs(U, n, z).width <= l - 4;
  4195. }
  4196. return !1;
  4197. };
  4198. a++;
  4199. t: for (; a > 0; ) {
  4200. e = "", a--;
  4201. var d, m, _ = xs("3", n, a).height, k = n.multiline ? c - a : (c - _) / 2, p = k += 2, j = 0, O = 0, M = 0;
  4202. if (a <= 0) {
  4203. e = `(...) Tj
  4204. `, e += "% Width of Text: " + xs(e, n, a = 12).width + ", FieldWidth:" + l + `
  4205. `;
  4206. break;
  4207. }
  4208. for (var S = "", V = 0, G = 0; G < s.length; G++) if (s.hasOwnProperty(G)) {
  4209. var q = !1;
  4210. if (s[G].length !== 1 && M !== s[G].length - 1) {
  4211. if ((_ + 2) * (V + 2) + 2 > c) continue t;
  4212. S += s[G][M], q = !0, O = G, G--;
  4213. } else {
  4214. S = (S += s[G][M] + " ").substr(S.length - 1) == " " ? S.substr(0, S.length - 1) : S;
  4215. var it = parseInt(G), vt = f(it, S, a), dt = G >= s.length - 1;
  4216. if (vt && !dt) {
  4217. S += " ", M = 0;
  4218. continue;
  4219. }
  4220. if (vt || dt) {
  4221. if (dt) O = it;
  4222. else if (n.multiline && (_ + 2) * (V + 2) + 2 > c) continue t;
  4223. } else {
  4224. if (!n.multiline || (_ + 2) * (V + 2) + 2 > c) continue t;
  4225. O = it;
  4226. }
  4227. }
  4228. for (var X = "", R = j; R <= O; R++) {
  4229. var tt = s[R];
  4230. if (n.multiline) {
  4231. if (R === O) {
  4232. X += tt[M] + " ", M = (M + 1) % tt.length;
  4233. continue;
  4234. }
  4235. if (R === j) {
  4236. X += tt[tt.length - 1] + " ";
  4237. continue;
  4238. }
  4239. }
  4240. X += tt[0] + " ";
  4241. }
  4242. switch (X = X.substr(X.length - 1) == " " ? X.substr(0, X.length - 1) : X, m = xs(X, n, a).width, n.textAlign) {
  4243. case "right":
  4244. d = l - m - 2;
  4245. break;
  4246. case "center":
  4247. d = (l - m) / 2;
  4248. break;
  4249. default:
  4250. d = 2;
  4251. }
  4252. e += $t(d) + " " + $t(p) + ` Td
  4253. `, e += "(" + Li(X) + `) Tj
  4254. `, e += -$t(d) + ` 0 Td
  4255. `, p = -(a + 2), m = 0, j = q ? O : O + 1, V++, S = "";
  4256. }
  4257. break;
  4258. }
  4259. return i.text = e, i.fontSize = a, i;
  4260. }, xs = function(n, e, t) {
  4261. var i = e.scope.internal.getFont(e.fontName, e.fontStyle), s = e.scope.getStringUnitWidth(n, { font: i, fontSize: parseFloat(t), charSpace: 0 }) * parseFloat(t);
  4262. return { height: e.scope.getStringUnitWidth("3", { font: i, fontSize: parseFloat(t), charSpace: 0 }) * parseFloat(t) * 1.5, width: s };
  4263. }, U1 = { fields: [], xForms: [], acroFormDictionaryRoot: null, printedOut: !1, internal: null, isInitialized: !1 }, z1 = function(n, e) {
  4264. var t = { type: "reference", object: n };
  4265. e.internal.getPageInfo(n.page).pageContext.annotations.find(function(i) {
  4266. return i.type === t.type && i.object === t.object;
  4267. }) === void 0 && e.internal.getPageInfo(n.page).pageContext.annotations.push(t);
  4268. }, H1 = function(n, e) {
  4269. if (e.scope = n, n.internal !== void 0 && (n.internal.acroformPlugin === void 0 || n.internal.acroformPlugin.isInitialized === !1)) {
  4270. if (er.FieldNum = 0, n.internal.acroformPlugin = JSON.parse(JSON.stringify(U1)), n.internal.acroformPlugin.acroFormDictionaryRoot) throw new Error("Exception while creating AcroformDictionary");
  4271. Qo = n.internal.scaleFactor, n.internal.acroformPlugin.acroFormDictionaryRoot = new Eh(), n.internal.acroformPlugin.acroFormDictionaryRoot.scope = n, n.internal.acroformPlugin.acroFormDictionaryRoot._eventID = n.internal.events.subscribe("postPutResources", function() {
  4272. (function(t) {
  4273. t.internal.events.unsubscribe(t.internal.acroformPlugin.acroFormDictionaryRoot._eventID), delete t.internal.acroformPlugin.acroFormDictionaryRoot._eventID, t.internal.acroformPlugin.printedOut = !0;
  4274. })(n);
  4275. }), n.internal.events.subscribe("buildDocument", function() {
  4276. (function(t) {
  4277. t.internal.acroformPlugin.acroFormDictionaryRoot.objId = void 0;
  4278. var i = t.internal.acroformPlugin.acroFormDictionaryRoot.Fields;
  4279. for (var s in i) if (i.hasOwnProperty(s)) {
  4280. var a = i[s];
  4281. a.objId = void 0, a.hasAnnotation && z1(a, t);
  4282. }
  4283. })(n);
  4284. }), n.internal.events.subscribe("putCatalog", function() {
  4285. (function(t) {
  4286. if (t.internal.acroformPlugin.acroFormDictionaryRoot === void 0) throw new Error("putCatalogCallback: Root missing.");
  4287. t.internal.write("/AcroForm " + t.internal.acroformPlugin.acroFormDictionaryRoot.objId + " 0 R");
  4288. })(n);
  4289. }), n.internal.events.subscribe("postPutPages", function(t) {
  4290. (function(i, s) {
  4291. var a = !i;
  4292. for (var c in i || (s.internal.newObjectDeferredBegin(s.internal.acroformPlugin.acroFormDictionaryRoot.objId, !0), s.internal.acroformPlugin.acroFormDictionaryRoot.putStream()), i = i || s.internal.acroformPlugin.acroFormDictionaryRoot.Kids) if (i.hasOwnProperty(c)) {
  4293. var l = i[c], f = [], d = l.Rect;
  4294. if (l.Rect && (l.Rect = D1(l.Rect, s)), s.internal.newObjectDeferredBegin(l.objId, !0), l.DA = Ft.createDefaultAppearanceStream(l), Se(l) === "object" && typeof l.getKeyValueListForStream == "function" && (f = l.getKeyValueListForStream()), l.Rect = d, l.hasAppearanceStream && !l.appearanceStreamContent) {
  4295. var m = q1(l);
  4296. f.push({ key: "AP", value: "<</N " + m + ">>" }), s.internal.acroformPlugin.xForms.push(m);
  4297. }
  4298. if (l.appearanceStreamContent) {
  4299. var _ = "";
  4300. for (var k in l.appearanceStreamContent) if (l.appearanceStreamContent.hasOwnProperty(k)) {
  4301. var p = l.appearanceStreamContent[k];
  4302. if (_ += "/" + k + " ", _ += "<<", Object.keys(p).length >= 1 || Array.isArray(p)) {
  4303. for (var c in p) if (p.hasOwnProperty(c)) {
  4304. var j = p[c];
  4305. typeof j == "function" && (j = j.call(s, l)), _ += "/" + c + " " + j + " ", s.internal.acroformPlugin.xForms.indexOf(j) >= 0 || s.internal.acroformPlugin.xForms.push(j);
  4306. }
  4307. } else typeof (j = p) == "function" && (j = j.call(s, l)), _ += "/" + c + " " + j, s.internal.acroformPlugin.xForms.indexOf(j) >= 0 || s.internal.acroformPlugin.xForms.push(j);
  4308. _ += ">>";
  4309. }
  4310. f.push({ key: "AP", value: `<<
  4311. ` + _ + ">>" });
  4312. }
  4313. s.internal.putStream({ additionalKeyValues: f, objectId: l.objId }), s.internal.out("endobj");
  4314. }
  4315. a && function(O, M) {
  4316. for (var S in O) if (O.hasOwnProperty(S)) {
  4317. var V = S, G = O[S];
  4318. M.internal.newObjectDeferredBegin(G.objId, !0), Se(G) === "object" && typeof G.putStream == "function" && G.putStream(), delete O[V];
  4319. }
  4320. }(s.internal.acroformPlugin.xForms, s);
  4321. })(t, n);
  4322. }), n.internal.acroformPlugin.isInitialized = !0;
  4323. }
  4324. }, Fh = ze.__acroform__.arrayToPdfArray = function(n, e, t) {
  4325. var i = function(c) {
  4326. return c;
  4327. };
  4328. if (Array.isArray(n)) {
  4329. for (var s = "[", a = 0; a < n.length; a++) switch (a !== 0 && (s += " "), Se(n[a])) {
  4330. case "boolean":
  4331. case "number":
  4332. case "object":
  4333. s += n[a].toString();
  4334. break;
  4335. case "string":
  4336. n[a].substr(0, 1) === "/" ? s += "/" + Ai(n[a].substr(1)) : (e !== void 0 && t && (i = t.internal.getEncryptor(e)), s += "(" + Li(i(n[a].toString())) + ")");
  4337. }
  4338. return s + "]";
  4339. }
  4340. throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray");
  4341. }, Oo = function(n, e, t) {
  4342. var i = function(s) {
  4343. return s;
  4344. };
  4345. return e !== void 0 && t && (i = t.internal.getEncryptor(e)), (n = n || "").toString(), "(" + Li(i(n)) + ")";
  4346. }, mr = function() {
  4347. this._objId = void 0, this._scope = void 0, Object.defineProperty(this, "objId", { get: function() {
  4348. if (this._objId === void 0) {
  4349. if (this.scope === void 0) return;
  4350. this._objId = this.scope.internal.newObjectDeferred();
  4351. }
  4352. return this._objId;
  4353. }, set: function(n) {
  4354. this._objId = n;
  4355. } }), Object.defineProperty(this, "scope", { value: this._scope, writable: !0 });
  4356. };
  4357. mr.prototype.toString = function() {
  4358. return this.objId + " 0 R";
  4359. }, mr.prototype.putStream = function() {
  4360. var n = this.getKeyValueListForStream();
  4361. this.scope.internal.putStream({ data: this.stream, additionalKeyValues: n, objectId: this.objId }), this.scope.internal.out("endobj");
  4362. }, mr.prototype.getKeyValueListForStream = function() {
  4363. var n = [], e = Object.getOwnPropertyNames(this).filter(function(a) {
  4364. return a != "content" && a != "appearanceStreamContent" && a != "scope" && a != "objId" && a.substring(0, 1) != "_";
  4365. });
  4366. for (var t in e) if (Object.getOwnPropertyDescriptor(this, e[t]).configurable === !1) {
  4367. var i = e[t], s = this[i];
  4368. s && (Array.isArray(s) ? n.push({ key: i, value: Fh(s, this.objId, this.scope) }) : s instanceof mr ? (s.scope = this.scope, n.push({ key: i, value: s.objId + " 0 R" })) : typeof s != "function" && n.push({ key: i, value: s }));
  4369. }
  4370. return n;
  4371. };
  4372. var Ch = function() {
  4373. mr.call(this), Object.defineProperty(this, "Type", { value: "/XObject", configurable: !1, writable: !0 }), Object.defineProperty(this, "Subtype", { value: "/Form", configurable: !1, writable: !0 }), Object.defineProperty(this, "FormType", { value: 1, configurable: !1, writable: !0 });
  4374. var n, e = [];
  4375. Object.defineProperty(this, "BBox", { configurable: !1, get: function() {
  4376. return e;
  4377. }, set: function(t) {
  4378. e = t;
  4379. } }), Object.defineProperty(this, "Resources", { value: "2 0 R", configurable: !1, writable: !0 }), Object.defineProperty(this, "stream", { enumerable: !1, configurable: !0, set: function(t) {
  4380. n = t.trim();
  4381. }, get: function() {
  4382. return n || null;
  4383. } });
  4384. };
  4385. Pn(Ch, mr);
  4386. var Eh = function() {
  4387. mr.call(this);
  4388. var n, e = [];
  4389. Object.defineProperty(this, "Kids", { enumerable: !1, configurable: !0, get: function() {
  4390. return e.length > 0 ? e : void 0;
  4391. } }), Object.defineProperty(this, "Fields", { enumerable: !1, configurable: !1, get: function() {
  4392. return e;
  4393. } }), Object.defineProperty(this, "DA", { enumerable: !1, configurable: !1, get: function() {
  4394. if (n) {
  4395. var t = function(i) {
  4396. return i;
  4397. };
  4398. return this.scope && (t = this.scope.internal.getEncryptor(this.objId)), "(" + Li(t(n)) + ")";
  4399. }
  4400. }, set: function(t) {
  4401. n = t;
  4402. } });
  4403. };
  4404. Pn(Eh, mr);
  4405. var er = function n() {
  4406. mr.call(this);
  4407. var e = 4;
  4408. Object.defineProperty(this, "F", { enumerable: !1, configurable: !1, get: function() {
  4409. return e;
  4410. }, set: function(S) {
  4411. if (isNaN(S)) throw new Error('Invalid value "' + S + '" for attribute F supplied.');
  4412. e = S;
  4413. } }), Object.defineProperty(this, "showWhenPrinted", { enumerable: !0, configurable: !0, get: function() {
  4414. return !!Ye(e, 3);
  4415. }, set: function(S) {
  4416. S ? this.F = Je(e, 3) : this.F = Ke(e, 3);
  4417. } });
  4418. var t = 0;
  4419. Object.defineProperty(this, "Ff", { enumerable: !1, configurable: !1, get: function() {
  4420. return t;
  4421. }, set: function(S) {
  4422. if (isNaN(S)) throw new Error('Invalid value "' + S + '" for attribute Ff supplied.');
  4423. t = S;
  4424. } });
  4425. var i = [];
  4426. Object.defineProperty(this, "Rect", { enumerable: !1, configurable: !1, get: function() {
  4427. if (i.length !== 0) return i;
  4428. }, set: function(S) {
  4429. i = S !== void 0 ? S : [];
  4430. } }), Object.defineProperty(this, "x", { enumerable: !0, configurable: !0, get: function() {
  4431. return !i || isNaN(i[0]) ? 0 : i[0];
  4432. }, set: function(S) {
  4433. i[0] = S;
  4434. } }), Object.defineProperty(this, "y", { enumerable: !0, configurable: !0, get: function() {
  4435. return !i || isNaN(i[1]) ? 0 : i[1];
  4436. }, set: function(S) {
  4437. i[1] = S;
  4438. } }), Object.defineProperty(this, "width", { enumerable: !0, configurable: !0, get: function() {
  4439. return !i || isNaN(i[2]) ? 0 : i[2];
  4440. }, set: function(S) {
  4441. i[2] = S;
  4442. } }), Object.defineProperty(this, "height", { enumerable: !0, configurable: !0, get: function() {
  4443. return !i || isNaN(i[3]) ? 0 : i[3];
  4444. }, set: function(S) {
  4445. i[3] = S;
  4446. } });
  4447. var s = "";
  4448. Object.defineProperty(this, "FT", { enumerable: !0, configurable: !1, get: function() {
  4449. return s;
  4450. }, set: function(S) {
  4451. switch (S) {
  4452. case "/Btn":
  4453. case "/Tx":
  4454. case "/Ch":
  4455. case "/Sig":
  4456. s = S;
  4457. break;
  4458. default:
  4459. throw new Error('Invalid value "' + S + '" for attribute FT supplied.');
  4460. }
  4461. } });
  4462. var a = null;
  4463. Object.defineProperty(this, "T", { enumerable: !0, configurable: !1, get: function() {
  4464. if (!a || a.length < 1) {
  4465. if (this instanceof Es) return;
  4466. a = "FieldObject" + n.FieldNum++;
  4467. }
  4468. var S = function(V) {
  4469. return V;
  4470. };
  4471. return this.scope && (S = this.scope.internal.getEncryptor(this.objId)), "(" + Li(S(a)) + ")";
  4472. }, set: function(S) {
  4473. a = S.toString();
  4474. } }), Object.defineProperty(this, "fieldName", { configurable: !0, enumerable: !0, get: function() {
  4475. return a;
  4476. }, set: function(S) {
  4477. a = S;
  4478. } });
  4479. var c = "helvetica";
  4480. Object.defineProperty(this, "fontName", { enumerable: !0, configurable: !0, get: function() {
  4481. return c;
  4482. }, set: function(S) {
  4483. c = S;
  4484. } });
  4485. var l = "normal";
  4486. Object.defineProperty(this, "fontStyle", { enumerable: !0, configurable: !0, get: function() {
  4487. return l;
  4488. }, set: function(S) {
  4489. l = S;
  4490. } });
  4491. var f = 0;
  4492. Object.defineProperty(this, "fontSize", { enumerable: !0, configurable: !0, get: function() {
  4493. return f;
  4494. }, set: function(S) {
  4495. f = S;
  4496. } });
  4497. var d = void 0;
  4498. Object.defineProperty(this, "maxFontSize", { enumerable: !0, configurable: !0, get: function() {
  4499. return d === void 0 ? 50 / Qo : d;
  4500. }, set: function(S) {
  4501. d = S;
  4502. } });
  4503. var m = "black";
  4504. Object.defineProperty(this, "color", { enumerable: !0, configurable: !0, get: function() {
  4505. return m;
  4506. }, set: function(S) {
  4507. m = S;
  4508. } });
  4509. var _ = "/F1 0 Tf 0 g";
  4510. Object.defineProperty(this, "DA", { enumerable: !0, configurable: !1, get: function() {
  4511. if (!(!_ || this instanceof Es || this instanceof yi)) return Oo(_, this.objId, this.scope);
  4512. }, set: function(S) {
  4513. S = S.toString(), _ = S;
  4514. } });
  4515. var k = null;
  4516. Object.defineProperty(this, "DV", { enumerable: !1, configurable: !1, get: function() {
  4517. if (k) return this instanceof an == 0 ? Oo(k, this.objId, this.scope) : k;
  4518. }, set: function(S) {
  4519. S = S.toString(), k = this instanceof an == 0 ? S.substr(0, 1) === "(" ? Ki(S.substr(1, S.length - 2)) : Ki(S) : S;
  4520. } }), Object.defineProperty(this, "defaultValue", { enumerable: !0, configurable: !0, get: function() {
  4521. return this instanceof an == 1 ? Ki(k.substr(1, k.length - 1)) : k;
  4522. }, set: function(S) {
  4523. S = S.toString(), k = this instanceof an == 1 ? "/" + Ai(S) : S;
  4524. } });
  4525. var p = null;
  4526. Object.defineProperty(this, "_V", { enumerable: !1, configurable: !1, get: function() {
  4527. if (p) return p;
  4528. }, set: function(S) {
  4529. this.V = S;
  4530. } }), Object.defineProperty(this, "V", { enumerable: !1, configurable: !1, get: function() {
  4531. if (p) return this instanceof an == 0 ? Oo(p, this.objId, this.scope) : p;
  4532. }, set: function(S) {
  4533. S = S.toString(), p = this instanceof an == 0 ? S.substr(0, 1) === "(" ? Ki(S.substr(1, S.length - 2)) : Ki(S) : S;
  4534. } }), Object.defineProperty(this, "value", { enumerable: !0, configurable: !0, get: function() {
  4535. return this instanceof an == 1 ? Ki(p.substr(1, p.length - 1)) : p;
  4536. }, set: function(S) {
  4537. S = S.toString(), p = this instanceof an == 1 ? "/" + Ai(S) : S;
  4538. } }), Object.defineProperty(this, "hasAnnotation", { enumerable: !0, configurable: !0, get: function() {
  4539. return this.Rect;
  4540. } }), Object.defineProperty(this, "Type", { enumerable: !0, configurable: !1, get: function() {
  4541. return this.hasAnnotation ? "/Annot" : null;
  4542. } }), Object.defineProperty(this, "Subtype", { enumerable: !0, configurable: !1, get: function() {
  4543. return this.hasAnnotation ? "/Widget" : null;
  4544. } });
  4545. var j, O = !1;
  4546. Object.defineProperty(this, "hasAppearanceStream", { enumerable: !0, configurable: !0, get: function() {
  4547. return O;
  4548. }, set: function(S) {
  4549. S = !!S, O = S;
  4550. } }), Object.defineProperty(this, "page", { enumerable: !0, configurable: !0, get: function() {
  4551. if (j) return j;
  4552. }, set: function(S) {
  4553. j = S;
  4554. } }), Object.defineProperty(this, "readOnly", { enumerable: !0, configurable: !0, get: function() {
  4555. return !!Ye(this.Ff, 1);
  4556. }, set: function(S) {
  4557. S ? this.Ff = Je(this.Ff, 1) : this.Ff = Ke(this.Ff, 1);
  4558. } }), Object.defineProperty(this, "required", { enumerable: !0, configurable: !0, get: function() {
  4559. return !!Ye(this.Ff, 2);
  4560. }, set: function(S) {
  4561. S ? this.Ff = Je(this.Ff, 2) : this.Ff = Ke(this.Ff, 2);
  4562. } }), Object.defineProperty(this, "noExport", { enumerable: !0, configurable: !0, get: function() {
  4563. return !!Ye(this.Ff, 3);
  4564. }, set: function(S) {
  4565. S ? this.Ff = Je(this.Ff, 3) : this.Ff = Ke(this.Ff, 3);
  4566. } });
  4567. var M = null;
  4568. Object.defineProperty(this, "Q", { enumerable: !0, configurable: !1, get: function() {
  4569. if (M !== null) return M;
  4570. }, set: function(S) {
  4571. if ([0, 1, 2].indexOf(S) === -1) throw new Error('Invalid value "' + S + '" for attribute Q supplied.');
  4572. M = S;
  4573. } }), Object.defineProperty(this, "textAlign", { get: function() {
  4574. var S;
  4575. switch (M) {
  4576. case 0:
  4577. default:
  4578. S = "left";
  4579. break;
  4580. case 1:
  4581. S = "center";
  4582. break;
  4583. case 2:
  4584. S = "right";
  4585. }
  4586. return S;
  4587. }, configurable: !0, enumerable: !0, set: function(S) {
  4588. switch (S) {
  4589. case "right":
  4590. case 2:
  4591. M = 2;
  4592. break;
  4593. case "center":
  4594. case 1:
  4595. M = 1;
  4596. break;
  4597. default:
  4598. M = 0;
  4599. }
  4600. } });
  4601. };
  4602. Pn(er, mr);
  4603. var ea = function() {
  4604. er.call(this), this.FT = "/Ch", this.V = "()", this.fontName = "zapfdingbats";
  4605. var n = 0;
  4606. Object.defineProperty(this, "TI", { enumerable: !0, configurable: !1, get: function() {
  4607. return n;
  4608. }, set: function(t) {
  4609. n = t;
  4610. } }), Object.defineProperty(this, "topIndex", { enumerable: !0, configurable: !0, get: function() {
  4611. return n;
  4612. }, set: function(t) {
  4613. n = t;
  4614. } });
  4615. var e = [];
  4616. Object.defineProperty(this, "Opt", { enumerable: !0, configurable: !1, get: function() {
  4617. return Fh(e, this.objId, this.scope);
  4618. }, set: function(t) {
  4619. var i, s;
  4620. s = [], typeof (i = t) == "string" && (s = function(a, c, l) {
  4621. l || (l = 1);
  4622. for (var f, d = []; f = c.exec(a); ) d.push(f[l]);
  4623. return d;
  4624. }(i, /\((.*?)\)/g)), e = s;
  4625. } }), this.getOptions = function() {
  4626. return e;
  4627. }, this.setOptions = function(t) {
  4628. e = t, this.sort && e.sort();
  4629. }, this.addOption = function(t) {
  4630. t = (t = t || "").toString(), e.push(t), this.sort && e.sort();
  4631. }, this.removeOption = function(t, i) {
  4632. for (i = i || !1, t = (t = t || "").toString(); e.indexOf(t) !== -1 && (e.splice(e.indexOf(t), 1), i !== !1); ) ;
  4633. }, Object.defineProperty(this, "combo", { enumerable: !0, configurable: !0, get: function() {
  4634. return !!Ye(this.Ff, 18);
  4635. }, set: function(t) {
  4636. t ? this.Ff = Je(this.Ff, 18) : this.Ff = Ke(this.Ff, 18);
  4637. } }), Object.defineProperty(this, "edit", { enumerable: !0, configurable: !0, get: function() {
  4638. return !!Ye(this.Ff, 19);
  4639. }, set: function(t) {
  4640. this.combo === !0 && (t ? this.Ff = Je(this.Ff, 19) : this.Ff = Ke(this.Ff, 19));
  4641. } }), Object.defineProperty(this, "sort", { enumerable: !0, configurable: !0, get: function() {
  4642. return !!Ye(this.Ff, 20);
  4643. }, set: function(t) {
  4644. t ? (this.Ff = Je(this.Ff, 20), e.sort()) : this.Ff = Ke(this.Ff, 20);
  4645. } }), Object.defineProperty(this, "multiSelect", { enumerable: !0, configurable: !0, get: function() {
  4646. return !!Ye(this.Ff, 22);
  4647. }, set: function(t) {
  4648. t ? this.Ff = Je(this.Ff, 22) : this.Ff = Ke(this.Ff, 22);
  4649. } }), Object.defineProperty(this, "doNotSpellCheck", { enumerable: !0, configurable: !0, get: function() {
  4650. return !!Ye(this.Ff, 23);
  4651. }, set: function(t) {
  4652. t ? this.Ff = Je(this.Ff, 23) : this.Ff = Ke(this.Ff, 23);
  4653. } }), Object.defineProperty(this, "commitOnSelChange", { enumerable: !0, configurable: !0, get: function() {
  4654. return !!Ye(this.Ff, 27);
  4655. }, set: function(t) {
  4656. t ? this.Ff = Je(this.Ff, 27) : this.Ff = Ke(this.Ff, 27);
  4657. } }), this.hasAppearanceStream = !1;
  4658. };
  4659. Pn(ea, er);
  4660. var na = function() {
  4661. ea.call(this), this.fontName = "helvetica", this.combo = !1;
  4662. };
  4663. Pn(na, ea);
  4664. var ra = function() {
  4665. na.call(this), this.combo = !0;
  4666. };
  4667. Pn(ra, na);
  4668. var Ls = function() {
  4669. ra.call(this), this.edit = !0;
  4670. };
  4671. Pn(Ls, ra);
  4672. var an = function() {
  4673. er.call(this), this.FT = "/Btn", Object.defineProperty(this, "noToggleToOff", { enumerable: !0, configurable: !0, get: function() {
  4674. return !!Ye(this.Ff, 15);
  4675. }, set: function(t) {
  4676. t ? this.Ff = Je(this.Ff, 15) : this.Ff = Ke(this.Ff, 15);
  4677. } }), Object.defineProperty(this, "radio", { enumerable: !0, configurable: !0, get: function() {
  4678. return !!Ye(this.Ff, 16);
  4679. }, set: function(t) {
  4680. t ? this.Ff = Je(this.Ff, 16) : this.Ff = Ke(this.Ff, 16);
  4681. } }), Object.defineProperty(this, "pushButton", { enumerable: !0, configurable: !0, get: function() {
  4682. return !!Ye(this.Ff, 17);
  4683. }, set: function(t) {
  4684. t ? this.Ff = Je(this.Ff, 17) : this.Ff = Ke(this.Ff, 17);
  4685. } }), Object.defineProperty(this, "radioIsUnison", { enumerable: !0, configurable: !0, get: function() {
  4686. return !!Ye(this.Ff, 26);
  4687. }, set: function(t) {
  4688. t ? this.Ff = Je(this.Ff, 26) : this.Ff = Ke(this.Ff, 26);
  4689. } });
  4690. var n, e = {};
  4691. Object.defineProperty(this, "MK", { enumerable: !1, configurable: !1, get: function() {
  4692. var t = function(a) {
  4693. return a;
  4694. };
  4695. if (this.scope && (t = this.scope.internal.getEncryptor(this.objId)), Object.keys(e).length !== 0) {
  4696. var i, s = [];
  4697. for (i in s.push("<<"), e) s.push("/" + i + " (" + Li(t(e[i])) + ")");
  4698. return s.push(">>"), s.join(`
  4699. `);
  4700. }
  4701. }, set: function(t) {
  4702. Se(t) === "object" && (e = t);
  4703. } }), Object.defineProperty(this, "caption", { enumerable: !0, configurable: !0, get: function() {
  4704. return e.CA || "";
  4705. }, set: function(t) {
  4706. typeof t == "string" && (e.CA = t);
  4707. } }), Object.defineProperty(this, "AS", { enumerable: !1, configurable: !1, get: function() {
  4708. return n;
  4709. }, set: function(t) {
  4710. var i = t == null ? "" : t.toString();
  4711. i.substr(0, 1) === "/" && (i = i.substr(1)), n = "/" + Ai(i);
  4712. } }), Object.defineProperty(this, "appearanceState", { enumerable: !0, configurable: !0, get: function() {
  4713. return n.substr(1, n.length - 1);
  4714. }, set: function(t) {
  4715. n = "/" + Ai(t);
  4716. } });
  4717. };
  4718. Pn(an, er);
  4719. var Ss = function() {
  4720. an.call(this), this.pushButton = !0;
  4721. };
  4722. Pn(Ss, an);
  4723. var ia = function() {
  4724. an.call(this), this.radio = !0, this.pushButton = !1;
  4725. var n = [];
  4726. Object.defineProperty(this, "Kids", { enumerable: !0, configurable: !1, get: function() {
  4727. return n;
  4728. }, set: function(e) {
  4729. n = e !== void 0 ? e : [];
  4730. } });
  4731. };
  4732. Pn(ia, an);
  4733. var Es = function() {
  4734. var n, e;
  4735. er.call(this), Object.defineProperty(this, "Parent", { enumerable: !1, configurable: !1, get: function() {
  4736. return n;
  4737. }, set: function(s) {
  4738. n = s;
  4739. } }), Object.defineProperty(this, "optionName", { enumerable: !1, configurable: !0, get: function() {
  4740. return e;
  4741. }, set: function(s) {
  4742. e = s;
  4743. } });
  4744. var t, i = {};
  4745. Object.defineProperty(this, "MK", { enumerable: !1, configurable: !1, get: function() {
  4746. var s = function(l) {
  4747. return l;
  4748. };
  4749. this.scope && (s = this.scope.internal.getEncryptor(this.objId));
  4750. var a, c = [];
  4751. for (a in c.push("<<"), i) c.push("/" + a + " (" + Li(s(i[a])) + ")");
  4752. return c.push(">>"), c.join(`
  4753. `);
  4754. }, set: function(s) {
  4755. Se(s) === "object" && (i = s);
  4756. } }), Object.defineProperty(this, "caption", { enumerable: !0, configurable: !0, get: function() {
  4757. return i.CA || "";
  4758. }, set: function(s) {
  4759. typeof s == "string" && (i.CA = s);
  4760. } }), Object.defineProperty(this, "AS", { enumerable: !1, configurable: !1, get: function() {
  4761. return t;
  4762. }, set: function(s) {
  4763. var a = s == null ? "" : s.toString();
  4764. a.substr(0, 1) === "/" && (a = a.substr(1)), t = "/" + Ai(a);
  4765. } }), Object.defineProperty(this, "appearanceState", { enumerable: !0, configurable: !0, get: function() {
  4766. return t.substr(1, t.length - 1);
  4767. }, set: function(s) {
  4768. var a = s == null ? "" : s.toString();
  4769. a.substr(0, 1) === "/" && (a = a.substr(1)), t = "/" + Ai(a);
  4770. } }), this.caption = "l", this.appearanceState = "Off", this._AppearanceType = Ft.RadioButton.Circle, this.appearanceStreamContent = this._AppearanceType.createAppearanceStream(this.optionName);
  4771. };
  4772. Pn(Es, er), ia.prototype.setAppearance = function(n) {
  4773. if (!("createAppearanceStream" in n) || !("getCA" in n)) throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");
  4774. for (var e in this.Kids) if (this.Kids.hasOwnProperty(e)) {
  4775. var t = this.Kids[e];
  4776. t.appearanceStreamContent = n.createAppearanceStream(t.optionName), t.caption = n.getCA();
  4777. }
  4778. }, ia.prototype.createOption = function(n) {
  4779. var e = new Es();
  4780. return e.Parent = this, e.optionName = n, this.Kids.push(e), W1.call(this.scope, e), e;
  4781. };
  4782. var ks = function() {
  4783. an.call(this), this.fontName = "zapfdingbats", this.caption = "3", this.appearanceState = "On", this.value = "On", this.textAlign = "center", this.appearanceStreamContent = Ft.CheckBox.createAppearanceStream();
  4784. };
  4785. Pn(ks, an);
  4786. var yi = function() {
  4787. er.call(this), this.FT = "/Tx", Object.defineProperty(this, "multiline", { enumerable: !0, configurable: !0, get: function() {
  4788. return !!Ye(this.Ff, 13);
  4789. }, set: function(e) {
  4790. e ? this.Ff = Je(this.Ff, 13) : this.Ff = Ke(this.Ff, 13);
  4791. } }), Object.defineProperty(this, "fileSelect", { enumerable: !0, configurable: !0, get: function() {
  4792. return !!Ye(this.Ff, 21);
  4793. }, set: function(e) {
  4794. e ? this.Ff = Je(this.Ff, 21) : this.Ff = Ke(this.Ff, 21);
  4795. } }), Object.defineProperty(this, "doNotSpellCheck", { enumerable: !0, configurable: !0, get: function() {
  4796. return !!Ye(this.Ff, 23);
  4797. }, set: function(e) {
  4798. e ? this.Ff = Je(this.Ff, 23) : this.Ff = Ke(this.Ff, 23);
  4799. } }), Object.defineProperty(this, "doNotScroll", { enumerable: !0, configurable: !0, get: function() {
  4800. return !!Ye(this.Ff, 24);
  4801. }, set: function(e) {
  4802. e ? this.Ff = Je(this.Ff, 24) : this.Ff = Ke(this.Ff, 24);
  4803. } }), Object.defineProperty(this, "comb", { enumerable: !0, configurable: !0, get: function() {
  4804. return !!Ye(this.Ff, 25);
  4805. }, set: function(e) {
  4806. e ? this.Ff = Je(this.Ff, 25) : this.Ff = Ke(this.Ff, 25);
  4807. } }), Object.defineProperty(this, "richText", { enumerable: !0, configurable: !0, get: function() {
  4808. return !!Ye(this.Ff, 26);
  4809. }, set: function(e) {
  4810. e ? this.Ff = Je(this.Ff, 26) : this.Ff = Ke(this.Ff, 26);
  4811. } });
  4812. var n = null;
  4813. Object.defineProperty(this, "MaxLen", { enumerable: !0, configurable: !1, get: function() {
  4814. return n;
  4815. }, set: function(e) {
  4816. n = e;
  4817. } }), Object.defineProperty(this, "maxLength", { enumerable: !0, configurable: !0, get: function() {
  4818. return n;
  4819. }, set: function(e) {
  4820. Number.isInteger(e) && (n = e);
  4821. } }), Object.defineProperty(this, "hasAppearanceStream", { enumerable: !0, configurable: !0, get: function() {
  4822. return this.V || this.DV;
  4823. } });
  4824. };
  4825. Pn(yi, er);
  4826. var Ps = function() {
  4827. yi.call(this), Object.defineProperty(this, "password", { enumerable: !0, configurable: !0, get: function() {
  4828. return !!Ye(this.Ff, 14);
  4829. }, set: function(n) {
  4830. n ? this.Ff = Je(this.Ff, 14) : this.Ff = Ke(this.Ff, 14);
  4831. } }), this.password = !0;
  4832. };
  4833. Pn(Ps, yi);
  4834. var Ft = { CheckBox: { createAppearanceStream: function() {
  4835. return { N: { On: Ft.CheckBox.YesNormal }, D: { On: Ft.CheckBox.YesPushDown, Off: Ft.CheckBox.OffPushDown } };
  4836. }, YesPushDown: function(n) {
  4837. var e = pr(n);
  4838. e.scope = n.scope;
  4839. var t = [], i = n.scope.internal.getFont(n.fontName, n.fontStyle).id, s = n.scope.__private__.encodeColorString(n.color), a = Yo(n, n.caption);
  4840. return t.push("0.749023 g"), t.push("0 0 " + $t(Ft.internal.getWidth(n)) + " " + $t(Ft.internal.getHeight(n)) + " re"), t.push("f"), t.push("BMC"), t.push("q"), t.push("0 0 1 rg"), t.push("/" + i + " " + $t(a.fontSize) + " Tf " + s), t.push("BT"), t.push(a.text), t.push("ET"), t.push("Q"), t.push("EMC"), e.stream = t.join(`
  4841. `), e;
  4842. }, YesNormal: function(n) {
  4843. var e = pr(n);
  4844. e.scope = n.scope;
  4845. var t = n.scope.internal.getFont(n.fontName, n.fontStyle).id, i = n.scope.__private__.encodeColorString(n.color), s = [], a = Ft.internal.getHeight(n), c = Ft.internal.getWidth(n), l = Yo(n, n.caption);
  4846. return s.push("1 g"), s.push("0 0 " + $t(c) + " " + $t(a) + " re"), s.push("f"), s.push("q"), s.push("0 0 1 rg"), s.push("0 0 " + $t(c - 1) + " " + $t(a - 1) + " re"), s.push("W"), s.push("n"), s.push("0 g"), s.push("BT"), s.push("/" + t + " " + $t(l.fontSize) + " Tf " + i), s.push(l.text), s.push("ET"), s.push("Q"), e.stream = s.join(`
  4847. `), e;
  4848. }, OffPushDown: function(n) {
  4849. var e = pr(n);
  4850. e.scope = n.scope;
  4851. var t = [];
  4852. return t.push("0.749023 g"), t.push("0 0 " + $t(Ft.internal.getWidth(n)) + " " + $t(Ft.internal.getHeight(n)) + " re"), t.push("f"), e.stream = t.join(`
  4853. `), e;
  4854. } }, RadioButton: { Circle: { createAppearanceStream: function(n) {
  4855. var e = { D: { Off: Ft.RadioButton.Circle.OffPushDown }, N: {} };
  4856. return e.N[n] = Ft.RadioButton.Circle.YesNormal, e.D[n] = Ft.RadioButton.Circle.YesPushDown, e;
  4857. }, getCA: function() {
  4858. return "l";
  4859. }, YesNormal: function(n) {
  4860. var e = pr(n);
  4861. e.scope = n.scope;
  4862. var t = [], i = Ft.internal.getWidth(n) <= Ft.internal.getHeight(n) ? Ft.internal.getWidth(n) / 4 : Ft.internal.getHeight(n) / 4;
  4863. i = Number((0.9 * i).toFixed(5));
  4864. var s = Ft.internal.Bezier_C, a = Number((i * s).toFixed(5));
  4865. return t.push("q"), t.push("1 0 0 1 " + Xr(Ft.internal.getWidth(n) / 2) + " " + Xr(Ft.internal.getHeight(n) / 2) + " cm"), t.push(i + " 0 m"), t.push(i + " " + a + " " + a + " " + i + " 0 " + i + " c"), t.push("-" + a + " " + i + " -" + i + " " + a + " -" + i + " 0 c"), t.push("-" + i + " -" + a + " -" + a + " -" + i + " 0 -" + i + " c"), t.push(a + " -" + i + " " + i + " -" + a + " " + i + " 0 c"), t.push("f"), t.push("Q"), e.stream = t.join(`
  4866. `), e;
  4867. }, YesPushDown: function(n) {
  4868. var e = pr(n);
  4869. e.scope = n.scope;
  4870. var t = [], i = Ft.internal.getWidth(n) <= Ft.internal.getHeight(n) ? Ft.internal.getWidth(n) / 4 : Ft.internal.getHeight(n) / 4;
  4871. i = Number((0.9 * i).toFixed(5));
  4872. var s = Number((2 * i).toFixed(5)), a = Number((s * Ft.internal.Bezier_C).toFixed(5)), c = Number((i * Ft.internal.Bezier_C).toFixed(5));
  4873. return t.push("0.749023 g"), t.push("q"), t.push("1 0 0 1 " + Xr(Ft.internal.getWidth(n) / 2) + " " + Xr(Ft.internal.getHeight(n) / 2) + " cm"), t.push(s + " 0 m"), t.push(s + " " + a + " " + a + " " + s + " 0 " + s + " c"), t.push("-" + a + " " + s + " -" + s + " " + a + " -" + s + " 0 c"), t.push("-" + s + " -" + a + " -" + a + " -" + s + " 0 -" + s + " c"), t.push(a + " -" + s + " " + s + " -" + a + " " + s + " 0 c"), t.push("f"), t.push("Q"), t.push("0 g"), t.push("q"), t.push("1 0 0 1 " + Xr(Ft.internal.getWidth(n) / 2) + " " + Xr(Ft.internal.getHeight(n) / 2) + " cm"), t.push(i + " 0 m"), t.push(i + " " + c + " " + c + " " + i + " 0 " + i + " c"), t.push("-" + c + " " + i + " -" + i + " " + c + " -" + i + " 0 c"), t.push("-" + i + " -" + c + " -" + c + " -" + i + " 0 -" + i + " c"), t.push(c + " -" + i + " " + i + " -" + c + " " + i + " 0 c"), t.push("f"), t.push("Q"), e.stream = t.join(`
  4874. `), e;
  4875. }, OffPushDown: function(n) {
  4876. var e = pr(n);
  4877. e.scope = n.scope;
  4878. var t = [], i = Ft.internal.getWidth(n) <= Ft.internal.getHeight(n) ? Ft.internal.getWidth(n) / 4 : Ft.internal.getHeight(n) / 4;
  4879. i = Number((0.9 * i).toFixed(5));
  4880. var s = Number((2 * i).toFixed(5)), a = Number((s * Ft.internal.Bezier_C).toFixed(5));
  4881. return t.push("0.749023 g"), t.push("q"), t.push("1 0 0 1 " + Xr(Ft.internal.getWidth(n) / 2) + " " + Xr(Ft.internal.getHeight(n) / 2) + " cm"), t.push(s + " 0 m"), t.push(s + " " + a + " " + a + " " + s + " 0 " + s + " c"), t.push("-" + a + " " + s + " -" + s + " " + a + " -" + s + " 0 c"), t.push("-" + s + " -" + a + " -" + a + " -" + s + " 0 -" + s + " c"), t.push(a + " -" + s + " " + s + " -" + a + " " + s + " 0 c"), t.push("f"), t.push("Q"), e.stream = t.join(`
  4882. `), e;
  4883. } }, Cross: { createAppearanceStream: function(n) {
  4884. var e = { D: { Off: Ft.RadioButton.Cross.OffPushDown }, N: {} };
  4885. return e.N[n] = Ft.RadioButton.Cross.YesNormal, e.D[n] = Ft.RadioButton.Cross.YesPushDown, e;
  4886. }, getCA: function() {
  4887. return "8";
  4888. }, YesNormal: function(n) {
  4889. var e = pr(n);
  4890. e.scope = n.scope;
  4891. var t = [], i = Ft.internal.calculateCross(n);
  4892. return t.push("q"), t.push("1 1 " + $t(Ft.internal.getWidth(n) - 2) + " " + $t(Ft.internal.getHeight(n) - 2) + " re"), t.push("W"), t.push("n"), t.push($t(i.x1.x) + " " + $t(i.x1.y) + " m"), t.push($t(i.x2.x) + " " + $t(i.x2.y) + " l"), t.push($t(i.x4.x) + " " + $t(i.x4.y) + " m"), t.push($t(i.x3.x) + " " + $t(i.x3.y) + " l"), t.push("s"), t.push("Q"), e.stream = t.join(`
  4893. `), e;
  4894. }, YesPushDown: function(n) {
  4895. var e = pr(n);
  4896. e.scope = n.scope;
  4897. var t = Ft.internal.calculateCross(n), i = [];
  4898. return i.push("0.749023 g"), i.push("0 0 " + $t(Ft.internal.getWidth(n)) + " " + $t(Ft.internal.getHeight(n)) + " re"), i.push("f"), i.push("q"), i.push("1 1 " + $t(Ft.internal.getWidth(n) - 2) + " " + $t(Ft.internal.getHeight(n) - 2) + " re"), i.push("W"), i.push("n"), i.push($t(t.x1.x) + " " + $t(t.x1.y) + " m"), i.push($t(t.x2.x) + " " + $t(t.x2.y) + " l"), i.push($t(t.x4.x) + " " + $t(t.x4.y) + " m"), i.push($t(t.x3.x) + " " + $t(t.x3.y) + " l"), i.push("s"), i.push("Q"), e.stream = i.join(`
  4899. `), e;
  4900. }, OffPushDown: function(n) {
  4901. var e = pr(n);
  4902. e.scope = n.scope;
  4903. var t = [];
  4904. return t.push("0.749023 g"), t.push("0 0 " + $t(Ft.internal.getWidth(n)) + " " + $t(Ft.internal.getHeight(n)) + " re"), t.push("f"), e.stream = t.join(`
  4905. `), e;
  4906. } } }, createDefaultAppearanceStream: function(n) {
  4907. var e = n.scope.internal.getFont(n.fontName, n.fontStyle).id, t = n.scope.__private__.encodeColorString(n.color);
  4908. return "/" + e + " " + n.fontSize + " Tf " + t;
  4909. } };
  4910. Ft.internal = { Bezier_C: 0.551915024494, calculateCross: function(n) {
  4911. var e = Ft.internal.getWidth(n), t = Ft.internal.getHeight(n), i = Math.min(e, t);
  4912. return { x1: { x: (e - i) / 2, y: (t - i) / 2 + i }, x2: { x: (e - i) / 2 + i, y: (t - i) / 2 }, x3: { x: (e - i) / 2, y: (t - i) / 2 }, x4: { x: (e - i) / 2 + i, y: (t - i) / 2 + i } };
  4913. } }, Ft.internal.getWidth = function(n) {
  4914. var e = 0;
  4915. return Se(n) === "object" && (e = Eu(n.Rect[2])), e;
  4916. }, Ft.internal.getHeight = function(n) {
  4917. var e = 0;
  4918. return Se(n) === "object" && (e = Eu(n.Rect[3])), e;
  4919. };
  4920. var W1 = ze.addField = function(n) {
  4921. if (H1(this, n), !(n instanceof er)) throw new Error("Invalid argument passed to jsPDF.addField.");
  4922. var e;
  4923. return (e = n).scope.internal.acroformPlugin.printedOut && (e.scope.internal.acroformPlugin.printedOut = !1, e.scope.internal.acroformPlugin.acroFormDictionaryRoot = null), e.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(e), n.page = n.scope.internal.getCurrentPageInfo().pageNumber, this;
  4924. };
  4925. ze.AcroFormChoiceField = ea, ze.AcroFormListBox = na, ze.AcroFormComboBox = ra, ze.AcroFormEditBox = Ls, ze.AcroFormButton = an, ze.AcroFormPushButton = Ss, ze.AcroFormRadioButton = ia, ze.AcroFormCheckBox = ks, ze.AcroFormTextField = yi, ze.AcroFormPasswordField = Ps, ze.AcroFormAppearance = Ft, ze.AcroForm = { ChoiceField: ea, ListBox: na, ComboBox: ra, EditBox: Ls, Button: an, PushButton: Ss, RadioButton: ia, CheckBox: ks, TextField: yi, PasswordField: Ps, Appearance: Ft }, Tt.AcroForm = { ChoiceField: ea, ListBox: na, ComboBox: ra, EditBox: Ls, Button: an, PushButton: Ss, RadioButton: ia, CheckBox: ks, TextField: yi, PasswordField: Ps, Appearance: Ft };
  4926. var b2 = Tt.AcroForm;
  4927. function Oh(n) {
  4928. return n.reduce(function(e, t, i) {
  4929. return e[t] = i, e;
  4930. }, {});
  4931. }
  4932. (function(n) {
  4933. var e = "addImage_";
  4934. n.__addimage__ = {};
  4935. var t = "UNKNOWN", i = { PNG: [[137, 80, 78, 71]], TIFF: [[77, 77, 0, 42], [73, 73, 42, 0]], JPEG: [[255, 216, 255, 224, void 0, void 0, 74, 70, 73, 70, 0], [255, 216, 255, 225, void 0, void 0, 69, 120, 105, 102, 0, 0], [255, 216, 255, 219], [255, 216, 255, 238]], JPEG2000: [[0, 0, 0, 12, 106, 80, 32, 32]], GIF87a: [[71, 73, 70, 56, 55, 97]], GIF89a: [[71, 73, 70, 56, 57, 97]], WEBP: [[82, 73, 70, 70, void 0, void 0, void 0, void 0, 87, 69, 66, 80]], BMP: [[66, 77], [66, 65], [67, 73], [67, 80], [73, 67], [80, 84]] }, s = n.__addimage__.getImageFileTypeByImageData = function(N, E) {
  4936. var z, U, rt, ot, ht, nt = t;
  4937. if ((E = E || t) === "RGBA" || N.data !== void 0 && N.data instanceof Uint8ClampedArray && "height" in N && "width" in N) return "RGBA";
  4938. if (vt(N)) for (ht in i) for (rt = i[ht], z = 0; z < rt.length; z += 1) {
  4939. for (ot = !0, U = 0; U < rt[z].length; U += 1) if (rt[z][U] !== void 0 && rt[z][U] !== N[U]) {
  4940. ot = !1;
  4941. break;
  4942. }
  4943. if (ot === !0) {
  4944. nt = ht;
  4945. break;
  4946. }
  4947. }
  4948. else for (ht in i) for (rt = i[ht], z = 0; z < rt.length; z += 1) {
  4949. for (ot = !0, U = 0; U < rt[z].length; U += 1) if (rt[z][U] !== void 0 && rt[z][U] !== N.charCodeAt(U)) {
  4950. ot = !1;
  4951. break;
  4952. }
  4953. if (ot === !0) {
  4954. nt = ht;
  4955. break;
  4956. }
  4957. }
  4958. return nt === t && E !== t && (nt = E), nt;
  4959. }, a = function N(E) {
  4960. for (var z = this.internal.write, U = this.internal.putStream, rt = (0, this.internal.getFilters)(); rt.indexOf("FlateEncode") !== -1; ) rt.splice(rt.indexOf("FlateEncode"), 1);
  4961. E.objectId = this.internal.newObject();
  4962. var ot = [];
  4963. if (ot.push({ key: "Type", value: "/XObject" }), ot.push({ key: "Subtype", value: "/Image" }), ot.push({ key: "Width", value: E.width }), ot.push({ key: "Height", value: E.height }), E.colorSpace === S.INDEXED ? ot.push({ key: "ColorSpace", value: "[/Indexed /DeviceRGB " + (E.palette.length / 3 - 1) + " " + ("sMask" in E && E.sMask !== void 0 ? E.objectId + 2 : E.objectId + 1) + " 0 R]" }) : (ot.push({ key: "ColorSpace", value: "/" + E.colorSpace }), E.colorSpace === S.DEVICE_CMYK && ot.push({ key: "Decode", value: "[1 0 1 0 1 0 1 0]" })), ot.push({ key: "BitsPerComponent", value: E.bitsPerComponent }), "decodeParameters" in E && E.decodeParameters !== void 0 && ot.push({ key: "DecodeParms", value: "<<" + E.decodeParameters + ">>" }), "transparency" in E && Array.isArray(E.transparency) && E.transparency.length > 0) {
  4964. for (var ht = "", nt = 0, ct = E.transparency.length; nt < ct; nt++) ht += E.transparency[nt] + " " + E.transparency[nt] + " ";
  4965. ot.push({ key: "Mask", value: "[" + ht + "]" });
  4966. }
  4967. E.sMask !== void 0 && ot.push({ key: "SMask", value: E.objectId + 1 + " 0 R" });
  4968. var At = E.filter !== void 0 ? ["/" + E.filter] : void 0;
  4969. if (U({ data: E.data, additionalKeyValues: ot, alreadyAppliedFilters: At, objectId: E.objectId }), z("endobj"), "sMask" in E && E.sMask !== void 0) {
  4970. var wt, x = (wt = E.sMaskBitsPerComponent) !== null && wt !== void 0 ? wt : E.bitsPerComponent, B = { width: E.width, height: E.height, colorSpace: "DeviceGray", bitsPerComponent: x, data: E.sMask };
  4971. "filter" in E && (B.decodeParameters = "/Predictor ".concat(E.predictor, " /Colors 1 /BitsPerComponent ").concat(x, " /Columns ").concat(E.width), B.filter = E.filter), N.call(this, B);
  4972. }
  4973. if (E.colorSpace === S.INDEXED) {
  4974. var T = this.internal.newObject();
  4975. U({ data: X(new Uint8Array(E.palette)), objectId: T }), z("endobj");
  4976. }
  4977. }, c = function() {
  4978. var N = this.internal.collections[e + "images"];
  4979. for (var E in N) a.call(this, N[E]);
  4980. }, l = function() {
  4981. var N, E = this.internal.collections[e + "images"], z = this.internal.write;
  4982. for (var U in E) z("/I" + (N = E[U]).index, N.objectId, "0", "R");
  4983. }, f = function() {
  4984. this.internal.collections[e + "images"] || (this.internal.collections[e + "images"] = {}, this.internal.events.subscribe("putResources", c), this.internal.events.subscribe("putXobjectDict", l));
  4985. }, d = function() {
  4986. var N = this.internal.collections[e + "images"];
  4987. return f.call(this), N;
  4988. }, m = function() {
  4989. return Object.keys(this.internal.collections[e + "images"]).length;
  4990. }, _ = function(N) {
  4991. return typeof n["process" + N.toUpperCase()] == "function";
  4992. }, k = function(N) {
  4993. return Se(N) === "object" && N.nodeType === 1;
  4994. }, p = function(N, E) {
  4995. if (N.nodeName === "IMG" && N.hasAttribute("src")) {
  4996. var z = "" + N.getAttribute("src");
  4997. if (z.indexOf("data:image/") === 0) return Ns(unescape(z).split("base64,").pop());
  4998. var U = n.loadFile(z, !0);
  4999. if (U !== void 0) return U;
  5000. }
  5001. if (N.nodeName === "CANVAS") {
  5002. if (N.width === 0 || N.height === 0) throw new Error("Given canvas must have data. Canvas width: " + N.width + ", height: " + N.height);
  5003. var rt;
  5004. switch (E) {
  5005. case "PNG":
  5006. rt = "image/png";
  5007. break;
  5008. case "WEBP":
  5009. rt = "image/webp";
  5010. break;
  5011. default:
  5012. rt = "image/jpeg";
  5013. }
  5014. return Ns(N.toDataURL(rt, 1).split("base64,").pop());
  5015. }
  5016. }, j = function(N) {
  5017. var E = this.internal.collections[e + "images"];
  5018. if (E) {
  5019. for (var z in E) if (N === E[z].alias) return E[z];
  5020. }
  5021. }, O = function(N, E, z) {
  5022. return N || E || (N = -96, E = -96), N < 0 && (N = -1 * z.width * 72 / N / this.internal.scaleFactor), E < 0 && (E = -1 * z.height * 72 / E / this.internal.scaleFactor), N === 0 && (N = E * z.width / z.height), E === 0 && (E = N * z.height / z.width), [N, E];
  5023. }, M = function(N, E, z, U, rt, ot) {
  5024. var ht = O.call(this, z, U, rt), nt = this.internal.getCoordinateString, ct = this.internal.getVerticalCoordinateString, At = d.call(this);
  5025. if (z = ht[0], U = ht[1], At[rt.index] = rt, ot) {
  5026. ot *= Math.PI / 180;
  5027. var wt = Math.cos(ot), x = Math.sin(ot), B = function(H) {
  5028. return H.toFixed(4);
  5029. }, T = [B(wt), B(x), B(-1 * x), B(wt), 0, 0, "cm"];
  5030. }
  5031. this.internal.write("q"), ot ? (this.internal.write([1, "0", "0", 1, nt(N), ct(E + U), "cm"].join(" ")), this.internal.write(T.join(" ")), this.internal.write([nt(z), "0", "0", nt(U), "0", "0", "cm"].join(" "))) : this.internal.write([nt(z), "0", "0", nt(U), nt(N), ct(E + U), "cm"].join(" ")), this.isAdvancedAPI() && this.internal.write([1, 0, 0, -1, 0, 0, "cm"].join(" ")), this.internal.write("/I" + rt.index + " Do"), this.internal.write("Q");
  5032. }, S = n.color_spaces = { DEVICE_RGB: "DeviceRGB", DEVICE_GRAY: "DeviceGray", DEVICE_CMYK: "DeviceCMYK", CAL_GREY: "CalGray", CAL_RGB: "CalRGB", LAB: "Lab", ICC_BASED: "ICCBased", INDEXED: "Indexed", PATTERN: "Pattern", SEPARATION: "Separation", DEVICE_N: "DeviceN" };
  5033. n.decode = { DCT_DECODE: "DCTDecode", FLATE_DECODE: "FlateDecode", LZW_DECODE: "LZWDecode", JPX_DECODE: "JPXDecode", JBIG2_DECODE: "JBIG2Decode", ASCII85_DECODE: "ASCII85Decode", ASCII_HEX_DECODE: "ASCIIHexDecode", RUN_LENGTH_DECODE: "RunLengthDecode", CCITT_FAX_DECODE: "CCITTFaxDecode" };
  5034. var V = n.image_compression = { NONE: "NONE", FAST: "FAST", MEDIUM: "MEDIUM", SLOW: "SLOW" }, G = n.__addimage__.sHashCode = function(N) {
  5035. var E, z, U = 0;
  5036. if (typeof N == "string") for (z = N.length, E = 0; E < z; E++) U = (U << 5) - U + N.charCodeAt(E), U |= 0;
  5037. else if (vt(N)) for (z = N.byteLength / 2, E = 0; E < z; E++) U = (U << 5) - U + N[E], U |= 0;
  5038. return U;
  5039. }, q = n.__addimage__.validateStringAsBase64 = function(N) {
  5040. (N = N || "").toString().trim();
  5041. var E = !0;
  5042. return N.length === 0 && (E = !1), N.length % 4 != 0 && (E = !1), /^[A-Za-z0-9+/]+$/.test(N.substr(0, N.length - 2)) === !1 && (E = !1), /^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(N.substr(-2)) === !1 && (E = !1), E;
  5043. }, it = n.__addimage__.extractImageFromDataUrl = function(N) {
  5044. if (N == null || !(N = N.trim()).startsWith("data:")) return null;
  5045. var E = N.indexOf(",");
  5046. return E < 0 ? null : N.substring(0, E).trim().endsWith("base64") ? N.substring(E + 1) : null;
  5047. };
  5048. n.__addimage__.isArrayBuffer = function(N) {
  5049. return N instanceof ArrayBuffer;
  5050. };
  5051. var vt = n.__addimage__.isArrayBufferView = function(N) {
  5052. return N instanceof Int8Array || N instanceof Uint8Array || N instanceof Uint8ClampedArray || N instanceof Int16Array || N instanceof Uint16Array || N instanceof Int32Array || N instanceof Uint32Array || N instanceof Float32Array || N instanceof Float64Array;
  5053. }, dt = n.__addimage__.binaryStringToUint8Array = function(N) {
  5054. for (var E = N.length, z = new Uint8Array(E), U = 0; U < E; U++) z[U] = N.charCodeAt(U);
  5055. return z;
  5056. }, X = n.__addimage__.arrayBufferToBinaryString = function(N) {
  5057. for (var E = "", z = vt(N) ? N : new Uint8Array(N), U = 0; U < z.length; U += 8192) E += String.fromCharCode.apply(null, z.subarray(U, U + 8192));
  5058. return E;
  5059. };
  5060. n.addImage = function() {
  5061. var N, E, z, U, rt, ot, ht, nt, ct;
  5062. if (typeof arguments[1] == "number" ? (E = t, z = arguments[1], U = arguments[2], rt = arguments[3], ot = arguments[4], ht = arguments[5], nt = arguments[6], ct = arguments[7]) : (E = arguments[1], z = arguments[2], U = arguments[3], rt = arguments[4], ot = arguments[5], ht = arguments[6], nt = arguments[7], ct = arguments[8]), Se(N = arguments[0]) === "object" && !k(N) && "imageData" in N) {
  5063. var At = N;
  5064. N = At.imageData, E = At.format || E || t, z = At.x || z || 0, U = At.y || U || 0, rt = At.w || At.width || rt, ot = At.h || At.height || ot, ht = At.alias || ht, nt = At.compression || nt, ct = At.rotation || At.angle || ct;
  5065. }
  5066. var wt = this.internal.getFilters();
  5067. if (nt === void 0 && wt.indexOf("FlateEncode") !== -1 && (nt = "SLOW"), isNaN(z) || isNaN(U)) throw new Error("Invalid coordinates passed to jsPDF.addImage");
  5068. f.call(this);
  5069. var x = R.call(this, N, E, ht, nt);
  5070. return M.call(this, z, U, rt, ot, x, ct), this;
  5071. };
  5072. var R = function(N, E, z, U) {
  5073. var rt, ot, ht;
  5074. if (typeof N == "string" && s(N) === t) {
  5075. N = unescape(N);
  5076. var nt = tt(N, !1);
  5077. (nt !== "" || (nt = n.loadFile(N, !0)) !== void 0) && (N = nt);
  5078. }
  5079. if (k(N) && (N = p(N, E)), E = s(N, E), !_(E)) throw new Error("addImage does not support files of type '" + E + "', please ensure that a plugin for '" + E + "' support is added.");
  5080. if (((ht = z) == null || ht.length === 0) && (z = function(ct) {
  5081. return typeof ct == "string" || vt(ct) ? G(ct) : vt(ct.data) ? G(ct.data) : null;
  5082. }(N)), (rt = j.call(this, z)) || (N instanceof Uint8Array || E === "RGBA" || (ot = N, N = dt(N)), rt = this["process" + E.toUpperCase()](N, m.call(this), z, function(ct) {
  5083. return ct && typeof ct == "string" && (ct = ct.toUpperCase()), ct in n.image_compression ? ct : V.NONE;
  5084. }(U), ot)), !rt) throw new Error("An unknown error occurred whilst processing the image.");
  5085. return rt;
  5086. }, tt = n.__addimage__.convertBase64ToBinaryString = function(N, E) {
  5087. E = typeof E != "boolean" || E;
  5088. var z, U = "";
  5089. if (typeof N == "string") {
  5090. var rt;
  5091. z = (rt = it(N)) !== null && rt !== void 0 ? rt : N;
  5092. try {
  5093. U = Ns(z);
  5094. } catch (ot) {
  5095. if (E) throw q(z) ? new Error("atob-Error in jsPDF.convertBase64ToBinaryString " + ot.message) : new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ");
  5096. }
  5097. }
  5098. return U;
  5099. };
  5100. n.getImageProperties = function(N) {
  5101. var E, z, U = "";
  5102. if (k(N) && (N = p(N)), typeof N == "string" && s(N) === t && ((U = tt(N, !1)) === "" && (U = n.loadFile(N) || ""), N = U), z = s(N), !_(z)) throw new Error("addImage does not support files of type '" + z + "', please ensure that a plugin for '" + z + "' support is added.");
  5103. if (N instanceof Uint8Array || (N = dt(N)), !(E = this["process" + z.toUpperCase()](N))) throw new Error("An unknown error occurred whilst processing the image");
  5104. return E.fileType = z, E;
  5105. };
  5106. })(Tt.API), /**
  5107. * @license
  5108. * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv
  5109. *
  5110. * Licensed under the MIT License.
  5111. * http://opensource.org/licenses/mit-license
  5112. */
  5113. function(n) {
  5114. var e = function(t) {
  5115. if (t !== void 0 && t != "") return !0;
  5116. };
  5117. Tt.API.events.push(["addPage", function(t) {
  5118. this.internal.getPageInfo(t.pageNumber).pageContext.annotations = [];
  5119. }]), n.events.push(["putPage", function(t) {
  5120. for (var i, s, a, c = this.internal.getCoordinateString, l = this.internal.getVerticalCoordinateString, f = this.internal.getPageInfoByObjId(t.objId), d = t.pageContext.annotations, m = !1, _ = 0; _ < d.length && !m; _++) switch ((i = d[_]).type) {
  5121. case "link":
  5122. (e(i.options.url) || e(i.options.pageNumber)) && (m = !0);
  5123. break;
  5124. case "reference":
  5125. case "text":
  5126. case "freetext":
  5127. m = !0;
  5128. }
  5129. if (m != 0) {
  5130. this.internal.write("/Annots [");
  5131. for (var k = 0; k < d.length; k++) {
  5132. i = d[k];
  5133. var p = this.internal.pdfEscape, j = this.internal.getEncryptor(t.objId);
  5134. switch (i.type) {
  5135. case "reference":
  5136. this.internal.write(" " + i.object.objId + " 0 R ");
  5137. break;
  5138. case "text":
  5139. var O = this.internal.newAdditionalObject(), M = this.internal.newAdditionalObject(), S = this.internal.getEncryptor(O.objId), V = i.title || "Note";
  5140. a = "<</Type /Annot /Subtype /Text " + (s = "/Rect [" + c(i.bounds.x) + " " + l(i.bounds.y + i.bounds.h) + " " + c(i.bounds.x + i.bounds.w) + " " + l(i.bounds.y) + "] ") + "/Contents (" + p(S(i.contents)) + ")", a += " /Popup " + M.objId + " 0 R", a += " /P " + f.objId + " 0 R", a += " /T (" + p(S(V)) + ") >>", O.content = a;
  5141. var G = O.objId + " 0 R";
  5142. a = "<</Type /Annot /Subtype /Popup " + (s = "/Rect [" + c(i.bounds.x + 30) + " " + l(i.bounds.y + i.bounds.h) + " " + c(i.bounds.x + i.bounds.w + 30) + " " + l(i.bounds.y) + "] ") + " /Parent " + G, i.open && (a += " /Open true"), a += " >>", M.content = a, this.internal.write(O.objId, "0 R", M.objId, "0 R");
  5143. break;
  5144. case "freetext":
  5145. s = "/Rect [" + c(i.bounds.x) + " " + l(i.bounds.y) + " " + c(i.bounds.x + i.bounds.w) + " " + l(i.bounds.y + i.bounds.h) + "] ";
  5146. var q = "font: Helvetica,sans-serif 12.0pt; text-align:left; color:#" + (i.color || "#000000");
  5147. a = "<</Type /Annot /Subtype /FreeText " + s + "/Contents (" + p(j(i.contents)) + ")", a += " /DS(" + p(j(q)) + ")", a += " /Border [0 0 0]", a += " >>", this.internal.write(a);
  5148. break;
  5149. case "link":
  5150. if (i.options.name) {
  5151. var it = this.annotations._nameMap[i.options.name];
  5152. i.options.pageNumber = it.page, i.options.top = it.y;
  5153. } else i.options.top || (i.options.top = 0);
  5154. if (s = "/Rect [" + i.finalBounds.x + " " + i.finalBounds.y + " " + i.finalBounds.w + " " + i.finalBounds.h + "] ", a = "", i.options.url) a = "<</Type /Annot /Subtype /Link " + s + "/Border [0 0 0] /A <</S /URI /URI (" + p(j(i.options.url)) + ") >>";
  5155. else if (i.options.pageNumber) switch (a = "<</Type /Annot /Subtype /Link " + s + "/Border [0 0 0] /Dest [" + this.internal.getPageInfo(i.options.pageNumber).objId + " 0 R", i.options.magFactor = i.options.magFactor || "XYZ", i.options.magFactor) {
  5156. case "Fit":
  5157. a += " /Fit]";
  5158. break;
  5159. case "FitH":
  5160. a += " /FitH " + i.options.top + "]";
  5161. break;
  5162. case "FitV":
  5163. i.options.left = i.options.left || 0, a += " /FitV " + i.options.left + "]";
  5164. break;
  5165. default:
  5166. var vt = l(i.options.top);
  5167. i.options.left = i.options.left || 0, i.options.zoom === void 0 && (i.options.zoom = 0), a += " /XYZ " + i.options.left + " " + vt + " " + i.options.zoom + "]";
  5168. }
  5169. a != "" && (a += " >>", this.internal.write(a));
  5170. }
  5171. }
  5172. this.internal.write("]");
  5173. }
  5174. }]), n.createAnnotation = function(t) {
  5175. var i = this.internal.getCurrentPageInfo();
  5176. switch (t.type) {
  5177. case "link":
  5178. this.link(t.bounds.x, t.bounds.y, t.bounds.w, t.bounds.h, t);
  5179. break;
  5180. case "text":
  5181. case "freetext":
  5182. i.pageContext.annotations.push(t);
  5183. }
  5184. }, n.link = function(t, i, s, a, c) {
  5185. var l = this.internal.getCurrentPageInfo(), f = this.internal.getCoordinateString, d = this.internal.getVerticalCoordinateString;
  5186. l.pageContext.annotations.push({ finalBounds: { x: f(t), y: d(i), w: f(t + s), h: d(i + a) }, options: c, type: "link" });
  5187. }, n.textWithLink = function(t, i, s, a) {
  5188. var c, l, f = this.getTextWidth(t), d = this.internal.getLineHeight() / this.internal.scaleFactor;
  5189. if (a.maxWidth !== void 0) {
  5190. l = a.maxWidth;
  5191. var m = this.splitTextToSize(t, l).length;
  5192. c = Math.ceil(d * m);
  5193. } else l = f, c = d;
  5194. return this.text(t, i, s, a), s += 0.2 * d, a.align === "center" && (i -= f / 2), a.align === "right" && (i -= f), this.link(i, s - d, l, c, a), f;
  5195. }, n.getTextWidth = function(t) {
  5196. var i = this.internal.getFontSize();
  5197. return this.getStringUnitWidth(t) * i / this.internal.scaleFactor;
  5198. };
  5199. }(Tt.API), /**
  5200. * @license
  5201. * Copyright (c) 2017 Aras Abbasi
  5202. *
  5203. * Licensed under the MIT License.
  5204. * http://opensource.org/licenses/mit-license
  5205. */
  5206. function(n) {
  5207. var e = { 1569: [65152], 1570: [65153, 65154], 1571: [65155, 65156], 1572: [65157, 65158], 1573: [65159, 65160], 1574: [65161, 65162, 65163, 65164], 1575: [65165, 65166], 1576: [65167, 65168, 65169, 65170], 1577: [65171, 65172], 1578: [65173, 65174, 65175, 65176], 1579: [65177, 65178, 65179, 65180], 1580: [65181, 65182, 65183, 65184], 1581: [65185, 65186, 65187, 65188], 1582: [65189, 65190, 65191, 65192], 1583: [65193, 65194], 1584: [65195, 65196], 1585: [65197, 65198], 1586: [65199, 65200], 1587: [65201, 65202, 65203, 65204], 1588: [65205, 65206, 65207, 65208], 1589: [65209, 65210, 65211, 65212], 1590: [65213, 65214, 65215, 65216], 1591: [65217, 65218, 65219, 65220], 1592: [65221, 65222, 65223, 65224], 1593: [65225, 65226, 65227, 65228], 1594: [65229, 65230, 65231, 65232], 1601: [65233, 65234, 65235, 65236], 1602: [65237, 65238, 65239, 65240], 1603: [65241, 65242, 65243, 65244], 1604: [65245, 65246, 65247, 65248], 1605: [65249, 65250, 65251, 65252], 1606: [65253, 65254, 65255, 65256], 1607: [65257, 65258, 65259, 65260], 1608: [65261, 65262], 1609: [65263, 65264, 64488, 64489], 1610: [65265, 65266, 65267, 65268], 1649: [64336, 64337], 1655: [64477], 1657: [64358, 64359, 64360, 64361], 1658: [64350, 64351, 64352, 64353], 1659: [64338, 64339, 64340, 64341], 1662: [64342, 64343, 64344, 64345], 1663: [64354, 64355, 64356, 64357], 1664: [64346, 64347, 64348, 64349], 1667: [64374, 64375, 64376, 64377], 1668: [64370, 64371, 64372, 64373], 1670: [64378, 64379, 64380, 64381], 1671: [64382, 64383, 64384, 64385], 1672: [64392, 64393], 1676: [64388, 64389], 1677: [64386, 64387], 1678: [64390, 64391], 1681: [64396, 64397], 1688: [64394, 64395], 1700: [64362, 64363, 64364, 64365], 1702: [64366, 64367, 64368, 64369], 1705: [64398, 64399, 64400, 64401], 1709: [64467, 64468, 64469, 64470], 1711: [64402, 64403, 64404, 64405], 1713: [64410, 64411, 64412, 64413], 1715: [64406, 64407, 64408, 64409], 1722: [64414, 64415], 1723: [64416, 64417, 64418, 64419], 1726: [64426, 64427, 64428, 64429], 1728: [64420, 64421], 1729: [64422, 64423, 64424, 64425], 1733: [64480, 64481], 1734: [64473, 64474], 1735: [64471, 64472], 1736: [64475, 64476], 1737: [64482, 64483], 1739: [64478, 64479], 1740: [64508, 64509, 64510, 64511], 1744: [64484, 64485, 64486, 64487], 1746: [64430, 64431], 1747: [64432, 64433] }, t = { 65247: { 65154: 65269, 65156: 65271, 65160: 65273, 65166: 65275 }, 65248: { 65154: 65270, 65156: 65272, 65160: 65274, 65166: 65276 }, 65165: { 65247: { 65248: { 65258: 65010 } } }, 1617: { 1612: 64606, 1613: 64607, 1614: 64608, 1615: 64609, 1616: 64610 } }, i = { 1612: 64606, 1613: 64607, 1614: 64608, 1615: 64609, 1616: 64610 }, s = [1570, 1571, 1573, 1575];
  5208. n.__arabicParser__ = {};
  5209. var a = n.__arabicParser__.isInArabicSubstitutionA = function(O) {
  5210. return e[O.charCodeAt(0)] !== void 0;
  5211. }, c = n.__arabicParser__.isArabicLetter = function(O) {
  5212. return typeof O == "string" && /^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(O);
  5213. }, l = n.__arabicParser__.isArabicEndLetter = function(O) {
  5214. return c(O) && a(O) && e[O.charCodeAt(0)].length <= 2;
  5215. }, f = n.__arabicParser__.isArabicAlfLetter = function(O) {
  5216. return c(O) && s.indexOf(O.charCodeAt(0)) >= 0;
  5217. };
  5218. n.__arabicParser__.arabicLetterHasIsolatedForm = function(O) {
  5219. return c(O) && a(O) && e[O.charCodeAt(0)].length >= 1;
  5220. };
  5221. var d = n.__arabicParser__.arabicLetterHasFinalForm = function(O) {
  5222. return c(O) && a(O) && e[O.charCodeAt(0)].length >= 2;
  5223. };
  5224. n.__arabicParser__.arabicLetterHasInitialForm = function(O) {
  5225. return c(O) && a(O) && e[O.charCodeAt(0)].length >= 3;
  5226. };
  5227. var m = n.__arabicParser__.arabicLetterHasMedialForm = function(O) {
  5228. return c(O) && a(O) && e[O.charCodeAt(0)].length == 4;
  5229. }, _ = n.__arabicParser__.resolveLigatures = function(O) {
  5230. var M = 0, S = t, V = "", G = 0;
  5231. for (M = 0; M < O.length; M += 1) S[O.charCodeAt(M)] !== void 0 ? (G++, typeof (S = S[O.charCodeAt(M)]) == "number" && (V += String.fromCharCode(S), S = t, G = 0), M === O.length - 1 && (S = t, V += O.charAt(M - (G - 1)), M -= G - 1, G = 0)) : (S = t, V += O.charAt(M - G), M -= G, G = 0);
  5232. return V;
  5233. };
  5234. n.__arabicParser__.isArabicDiacritic = function(O) {
  5235. return O !== void 0 && i[O.charCodeAt(0)] !== void 0;
  5236. };
  5237. var k = n.__arabicParser__.getCorrectForm = function(O, M, S) {
  5238. return c(O) ? a(O) === !1 ? -1 : !d(O) || !c(M) && !c(S) || !c(S) && l(M) || l(O) && !c(M) || l(O) && f(M) || l(O) && l(M) ? 0 : m(O) && c(M) && !l(M) && c(S) && d(S) ? 3 : l(O) || !c(S) ? 1 : 2 : -1;
  5239. }, p = function(O) {
  5240. var M = 0, S = 0, V = 0, G = "", q = "", it = "", vt = (O = O || "").split("\\s+"), dt = [];
  5241. for (M = 0; M < vt.length; M += 1) {
  5242. for (dt.push(""), S = 0; S < vt[M].length; S += 1) G = vt[M][S], q = vt[M][S - 1], it = vt[M][S + 1], c(G) ? (V = k(G, q, it), dt[M] += V !== -1 ? String.fromCharCode(e[G.charCodeAt(0)][V]) : G) : dt[M] += G;
  5243. dt[M] = _(dt[M]);
  5244. }
  5245. return dt.join(" ");
  5246. }, j = n.__arabicParser__.processArabic = n.processArabic = function() {
  5247. var O, M = typeof arguments[0] == "string" ? arguments[0] : arguments[0].text, S = [];
  5248. if (Array.isArray(M)) {
  5249. var V = 0;
  5250. for (S = [], V = 0; V < M.length; V += 1) Array.isArray(M[V]) ? S.push([p(M[V][0]), M[V][1], M[V][2]]) : S.push([p(M[V])]);
  5251. O = S;
  5252. } else O = p(M);
  5253. return typeof arguments[0] == "string" ? O : (arguments[0].text = O, arguments[0]);
  5254. };
  5255. n.events.push(["preProcessText", j]);
  5256. }(Tt.API), Tt.API.autoPrint = function(n) {
  5257. var e;
  5258. return (n = n || {}).variant = n.variant || "non-conform", n.variant === "javascript" ? this.addJS("print({});") : (this.internal.events.subscribe("postPutResources", function() {
  5259. e = this.internal.newObject(), this.internal.out("<<"), this.internal.out("/S /Named"), this.internal.out("/Type /Action"), this.internal.out("/N /Print"), this.internal.out(">>"), this.internal.out("endobj");
  5260. }), this.internal.events.subscribe("putCatalog", function() {
  5261. this.internal.out("/OpenAction " + e + " 0 R");
  5262. })), this;
  5263. }, /**
  5264. * @license
  5265. * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv
  5266. *
  5267. * Licensed under the MIT License.
  5268. * http://opensource.org/licenses/mit-license
  5269. */
  5270. function(n) {
  5271. var e = function() {
  5272. var t = void 0;
  5273. Object.defineProperty(this, "pdf", { get: function() {
  5274. return t;
  5275. }, set: function(l) {
  5276. t = l;
  5277. } });
  5278. var i = 150;
  5279. Object.defineProperty(this, "width", { get: function() {
  5280. return i;
  5281. }, set: function(l) {
  5282. i = isNaN(l) || Number.isInteger(l) === !1 || l < 0 ? 150 : l, this.getContext("2d").pageWrapXEnabled && (this.getContext("2d").pageWrapX = i + 1);
  5283. } });
  5284. var s = 300;
  5285. Object.defineProperty(this, "height", { get: function() {
  5286. return s;
  5287. }, set: function(l) {
  5288. s = isNaN(l) || Number.isInteger(l) === !1 || l < 0 ? 300 : l, this.getContext("2d").pageWrapYEnabled && (this.getContext("2d").pageWrapY = s + 1);
  5289. } });
  5290. var a = [];
  5291. Object.defineProperty(this, "childNodes", { get: function() {
  5292. return a;
  5293. }, set: function(l) {
  5294. a = l;
  5295. } });
  5296. var c = {};
  5297. Object.defineProperty(this, "style", { get: function() {
  5298. return c;
  5299. }, set: function(l) {
  5300. c = l;
  5301. } }), Object.defineProperty(this, "parentNode", {});
  5302. };
  5303. e.prototype.getContext = function(t, i) {
  5304. var s;
  5305. if ((t = t || "2d") !== "2d") return null;
  5306. for (s in i) this.pdf.context2d.hasOwnProperty(s) && (this.pdf.context2d[s] = i[s]);
  5307. return this.pdf.context2d._canvas = this, this.pdf.context2d;
  5308. }, e.prototype.toDataURL = function() {
  5309. throw new Error("toDataURL is not implemented.");
  5310. }, n.events.push(["initialized", function() {
  5311. this.canvas = new e(), this.canvas.pdf = this;
  5312. }]);
  5313. }(Tt.API), function(n) {
  5314. var e = { left: 0, top: 0, bottom: 0, right: 0 }, t = !1, i = function() {
  5315. this.internal.__cell__ === void 0 && (this.internal.__cell__ = {}, this.internal.__cell__.padding = 3, this.internal.__cell__.headerFunction = void 0, this.internal.__cell__.margins = Object.assign({}, e), this.internal.__cell__.margins.width = this.getPageWidth(), s.call(this));
  5316. }, s = function() {
  5317. this.internal.__cell__.lastCell = new a(), this.internal.__cell__.pages = 1;
  5318. }, a = function() {
  5319. var f = arguments[0];
  5320. Object.defineProperty(this, "x", { enumerable: !0, get: function() {
  5321. return f;
  5322. }, set: function(O) {
  5323. f = O;
  5324. } });
  5325. var d = arguments[1];
  5326. Object.defineProperty(this, "y", { enumerable: !0, get: function() {
  5327. return d;
  5328. }, set: function(O) {
  5329. d = O;
  5330. } });
  5331. var m = arguments[2];
  5332. Object.defineProperty(this, "width", { enumerable: !0, get: function() {
  5333. return m;
  5334. }, set: function(O) {
  5335. m = O;
  5336. } });
  5337. var _ = arguments[3];
  5338. Object.defineProperty(this, "height", { enumerable: !0, get: function() {
  5339. return _;
  5340. }, set: function(O) {
  5341. _ = O;
  5342. } });
  5343. var k = arguments[4];
  5344. Object.defineProperty(this, "text", { enumerable: !0, get: function() {
  5345. return k;
  5346. }, set: function(O) {
  5347. k = O;
  5348. } });
  5349. var p = arguments[5];
  5350. Object.defineProperty(this, "lineNumber", { enumerable: !0, get: function() {
  5351. return p;
  5352. }, set: function(O) {
  5353. p = O;
  5354. } });
  5355. var j = arguments[6];
  5356. return Object.defineProperty(this, "align", { enumerable: !0, get: function() {
  5357. return j;
  5358. }, set: function(O) {
  5359. j = O;
  5360. } }), this;
  5361. };
  5362. a.prototype.clone = function() {
  5363. return new a(this.x, this.y, this.width, this.height, this.text, this.lineNumber, this.align);
  5364. }, a.prototype.toArray = function() {
  5365. return [this.x, this.y, this.width, this.height, this.text, this.lineNumber, this.align];
  5366. }, n.setHeaderFunction = function(f) {
  5367. return i.call(this), this.internal.__cell__.headerFunction = typeof f == "function" ? f : void 0, this;
  5368. }, n.getTextDimensions = function(f, d) {
  5369. i.call(this);
  5370. var m = (d = d || {}).fontSize || this.getFontSize(), _ = d.font || this.getFont(), k = d.scaleFactor || this.internal.scaleFactor, p = 0, j = 0, O = 0, M = this;
  5371. if (!Array.isArray(f) && typeof f != "string") {
  5372. if (typeof f != "number") throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");
  5373. f = String(f);
  5374. }
  5375. var S = d.maxWidth;
  5376. S > 0 ? typeof f == "string" ? f = this.splitTextToSize(f, S) : Object.prototype.toString.call(f) === "[object Array]" && (f = f.reduce(function(G, q) {
  5377. return G.concat(M.splitTextToSize(q, S));
  5378. }, [])) : f = Array.isArray(f) ? f : [f];
  5379. for (var V = 0; V < f.length; V++) p < (O = this.getStringUnitWidth(f[V], { font: _ }) * m) && (p = O);
  5380. return p !== 0 && (j = f.length), { w: p /= k, h: Math.max((j * m * this.getLineHeightFactor() - m * (this.getLineHeightFactor() - 1)) / k, 0) };
  5381. }, n.cellAddPage = function() {
  5382. i.call(this), this.addPage();
  5383. var f = this.internal.__cell__.margins || e;
  5384. return this.internal.__cell__.lastCell = new a(f.left, f.top, void 0, void 0), this.internal.__cell__.pages += 1, this;
  5385. };
  5386. var c = n.cell = function() {
  5387. var f;
  5388. f = arguments[0] instanceof a ? arguments[0] : new a(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6]), i.call(this);
  5389. var d = this.internal.__cell__.lastCell, m = this.internal.__cell__.padding, _ = this.internal.__cell__.margins || e, k = this.internal.__cell__.tableHeaderRow, p = this.internal.__cell__.printHeaders;
  5390. return d.lineNumber !== void 0 && (d.lineNumber === f.lineNumber ? (f.x = (d.x || 0) + (d.width || 0), f.y = d.y || 0) : d.y + d.height + f.height + _.bottom > this.getPageHeight() ? (this.cellAddPage(), f.y = _.top, p && k && (this.printHeaderRow(f.lineNumber, !0), f.y += k[0].height)) : f.y = d.y + d.height || f.y), f.text[0] !== void 0 && (this.rect(f.x, f.y, f.width, f.height, t === !0 ? "FD" : void 0), f.align === "right" ? this.text(f.text, f.x + f.width - m, f.y + m, { align: "right", baseline: "top" }) : f.align === "center" ? this.text(f.text, f.x + f.width / 2, f.y + m, { align: "center", baseline: "top", maxWidth: f.width - m - m }) : this.text(f.text, f.x + m, f.y + m, { align: "left", baseline: "top", maxWidth: f.width - m - m })), this.internal.__cell__.lastCell = f, this;
  5391. };
  5392. n.table = function(f, d, m, _, k) {
  5393. if (i.call(this), !m) throw new Error("No data for PDF table.");
  5394. var p, j, O, M, S = [], V = [], G = [], q = {}, it = {}, vt = [], dt = [], X = (k = k || {}).autoSize || !1, R = k.printHeaders !== !1, tt = k.css && k.css["font-size"] !== void 0 ? 16 * k.css["font-size"] : k.fontSize || 12, N = k.margins || Object.assign({ width: this.getPageWidth() }, e), E = typeof k.padding == "number" ? k.padding : 3, z = k.headerBackgroundColor || "#c8c8c8", U = k.headerTextColor || "#000";
  5395. if (s.call(this), this.internal.__cell__.printHeaders = R, this.internal.__cell__.margins = N, this.internal.__cell__.table_font_size = tt, this.internal.__cell__.padding = E, this.internal.__cell__.headerBackgroundColor = z, this.internal.__cell__.headerTextColor = U, this.setFontSize(tt), _ == null) V = S = Object.keys(m[0]), G = S.map(function() {
  5396. return "left";
  5397. });
  5398. else if (Array.isArray(_) && Se(_[0]) === "object") for (S = _.map(function(At) {
  5399. return At.name;
  5400. }), V = _.map(function(At) {
  5401. return At.prompt || At.name || "";
  5402. }), G = _.map(function(At) {
  5403. return At.align || "left";
  5404. }), p = 0; p < _.length; p += 1) it[_[p].name] = 0.7499990551181103 * _[p].width;
  5405. else Array.isArray(_) && typeof _[0] == "string" && (V = S = _, G = S.map(function() {
  5406. return "left";
  5407. }));
  5408. if (X || Array.isArray(_) && typeof _[0] == "string") for (p = 0; p < S.length; p += 1) {
  5409. for (q[M = S[p]] = m.map(function(At) {
  5410. return At[M];
  5411. }), this.setFont(void 0, "bold"), vt.push(this.getTextDimensions(V[p], { fontSize: this.internal.__cell__.table_font_size, scaleFactor: this.internal.scaleFactor }).w), j = q[M], this.setFont(void 0, "normal"), O = 0; O < j.length; O += 1) vt.push(this.getTextDimensions(j[O], { fontSize: this.internal.__cell__.table_font_size, scaleFactor: this.internal.scaleFactor }).w);
  5412. it[M] = Math.max.apply(null, vt) + E + E, vt = [];
  5413. }
  5414. if (R) {
  5415. var rt = {};
  5416. for (p = 0; p < S.length; p += 1) rt[S[p]] = {}, rt[S[p]].text = V[p], rt[S[p]].align = G[p];
  5417. var ot = l.call(this, rt, it);
  5418. dt = S.map(function(At) {
  5419. return new a(f, d, it[At], ot, rt[At].text, void 0, rt[At].align);
  5420. }), this.setTableHeaderRow(dt), this.printHeaderRow(1, !1);
  5421. }
  5422. var ht = _.reduce(function(At, wt) {
  5423. return At[wt.name] = wt.align, At;
  5424. }, {});
  5425. for (p = 0; p < m.length; p += 1) {
  5426. "rowStart" in k && k.rowStart instanceof Function && k.rowStart({ row: p, data: m[p] }, this);
  5427. var nt = l.call(this, m[p], it);
  5428. for (O = 0; O < S.length; O += 1) {
  5429. var ct = m[p][S[O]];
  5430. "cellStart" in k && k.cellStart instanceof Function && k.cellStart({ row: p, col: O, data: ct }, this), c.call(this, new a(f, d, it[S[O]], nt, ct, p + 2, ht[S[O]]));
  5431. }
  5432. }
  5433. return this.internal.__cell__.table_x = f, this.internal.__cell__.table_y = d, this;
  5434. };
  5435. var l = function(f, d) {
  5436. var m = this.internal.__cell__.padding, _ = this.internal.__cell__.table_font_size, k = this.internal.scaleFactor;
  5437. return Object.keys(f).map(function(p) {
  5438. var j = f[p];
  5439. return this.splitTextToSize(j.hasOwnProperty("text") ? j.text : j, d[p] - m - m);
  5440. }, this).map(function(p) {
  5441. return this.getLineHeightFactor() * p.length * _ / k + m + m;
  5442. }, this).reduce(function(p, j) {
  5443. return Math.max(p, j);
  5444. }, 0);
  5445. };
  5446. n.setTableHeaderRow = function(f) {
  5447. i.call(this), this.internal.__cell__.tableHeaderRow = f;
  5448. }, n.printHeaderRow = function(f, d) {
  5449. if (i.call(this), !this.internal.__cell__.tableHeaderRow) throw new Error("Property tableHeaderRow does not exist.");
  5450. var m;
  5451. if (t = !0, typeof this.internal.__cell__.headerFunction == "function") {
  5452. var _ = this.internal.__cell__.headerFunction(this, this.internal.__cell__.pages);
  5453. this.internal.__cell__.lastCell = new a(_[0], _[1], _[2], _[3], void 0, -1);
  5454. }
  5455. this.setFont(void 0, "bold");
  5456. for (var k = [], p = 0; p < this.internal.__cell__.tableHeaderRow.length; p += 1) {
  5457. m = this.internal.__cell__.tableHeaderRow[p].clone(), d && (m.y = this.internal.__cell__.margins.top || 0, k.push(m)), m.lineNumber = f;
  5458. var j = this.getTextColor();
  5459. this.setTextColor(this.internal.__cell__.headerTextColor), this.setFillColor(this.internal.__cell__.headerBackgroundColor), c.call(this, m), this.setTextColor(j);
  5460. }
  5461. k.length > 0 && this.setTableHeaderRow(k), this.setFont(void 0, "normal"), t = !1;
  5462. };
  5463. }(Tt.API);
  5464. var jh = { italic: ["italic", "oblique", "normal"], oblique: ["oblique", "italic", "normal"], normal: ["normal", "oblique", "italic"] }, Bh = ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded"], Jo = Oh(Bh), Mh = [100, 200, 300, 400, 500, 600, 700, 800, 900], V1 = Oh(Mh);
  5465. function jo(n) {
  5466. var e = n.family.replace(/"|'/g, "").toLowerCase(), t = function(a) {
  5467. return jh[a = a || "normal"] ? a : "normal";
  5468. }(n.style), i = function(a) {
  5469. return a ? typeof a == "number" ? a >= 100 && a <= 900 && a % 100 == 0 ? a : 400 : /^\d00$/.test(a) ? parseInt(a) : a === "bold" ? 700 : 400 : 400;
  5470. }(n.weight), s = function(a) {
  5471. return typeof Jo[a = a || "normal"] == "number" ? a : "normal";
  5472. }(n.stretch);
  5473. return { family: e, style: t, weight: i, stretch: s, src: n.src || [], ref: n.ref || { name: e, style: [s, t, i].join(" ") } };
  5474. }
  5475. function Ou(n, e, t, i) {
  5476. var s;
  5477. for (s = t; s >= 0 && s < e.length; s += i) if (n[e[s]]) return n[e[s]];
  5478. for (s = t; s >= 0 && s < e.length; s -= i) if (n[e[s]]) return n[e[s]];
  5479. }
  5480. var G1 = { "sans-serif": "helvetica", fixed: "courier", monospace: "courier", terminal: "courier", cursive: "times", fantasy: "times", serif: "times" }, ju = { caption: "times", icon: "times", menu: "times", "message-box": "times", "small-caption": "times", "status-bar": "times" };
  5481. function Bu(n) {
  5482. return [n.stretch, n.style, n.weight, n.family].join(" ");
  5483. }
  5484. function Mu(n) {
  5485. return n.trimLeft();
  5486. }
  5487. function Y1(n, e) {
  5488. for (var t = 0; t < n.length; ) {
  5489. if (n.charAt(t) === e) return [n.substring(0, t), n.substring(t + 1)];
  5490. t += 1;
  5491. }
  5492. return null;
  5493. }
  5494. function J1(n) {
  5495. var e = n.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);
  5496. return e === null ? null : [e[0], n.substring(e[0].length)];
  5497. }
  5498. var Xi, _s, Ru, Tu, Du, Bo = ["times"];
  5499. function qu(n, e, t, i, s) {
  5500. var a = 4, c = zu;
  5501. switch (s) {
  5502. case Tt.API.image_compression.FAST:
  5503. a = 1, c = Uu;
  5504. break;
  5505. case Tt.API.image_compression.MEDIUM:
  5506. a = 6, c = Hu;
  5507. break;
  5508. case Tt.API.image_compression.SLOW:
  5509. a = 9, c = Wu;
  5510. }
  5511. n = function(f, d, m, _) {
  5512. for (var k, p = f.length / d, j = new Uint8Array(f.length + p), O = [K1, Uu, zu, Hu, Wu], M = 0; M < p; M += 1) {
  5513. var S = M * d, V = f.subarray(S, S + d);
  5514. if (_) j.set(_(V, m, k), S + M);
  5515. else {
  5516. for (var G = O.length, q = [], it = 0; it < G; it += 1) q[it] = O[it](V, m, k);
  5517. var vt = $1(q.concat());
  5518. j.set(q[vt], S + M);
  5519. }
  5520. k = V;
  5521. }
  5522. return j;
  5523. }(n, e, Math.ceil(t * i / 8), c);
  5524. var l = Uo(n, { level: a });
  5525. return Tt.API.__addimage__.arrayBufferToBinaryString(l);
  5526. }
  5527. function K1(n) {
  5528. var e = Array.apply([], n);
  5529. return e.unshift(0), e;
  5530. }
  5531. function Uu(n, e) {
  5532. var t = n.length, i = [];
  5533. i[0] = 1;
  5534. for (var s = 0; s < t; s += 1) {
  5535. var a = n[s - e] || 0;
  5536. i[s + 1] = n[s] - a + 256 & 255;
  5537. }
  5538. return i;
  5539. }
  5540. function zu(n, e, t) {
  5541. var i = n.length, s = [];
  5542. s[0] = 2;
  5543. for (var a = 0; a < i; a += 1) {
  5544. var c = t && t[a] || 0;
  5545. s[a + 1] = n[a] - c + 256 & 255;
  5546. }
  5547. return s;
  5548. }
  5549. function Hu(n, e, t) {
  5550. var i = n.length, s = [];
  5551. s[0] = 3;
  5552. for (var a = 0; a < i; a += 1) {
  5553. var c = n[a - e] || 0, l = t && t[a] || 0;
  5554. s[a + 1] = n[a] + 256 - (c + l >>> 1) & 255;
  5555. }
  5556. return s;
  5557. }
  5558. function Wu(n, e, t) {
  5559. var i = n.length, s = [];
  5560. s[0] = 4;
  5561. for (var a = 0; a < i; a += 1) {
  5562. var c = X1(n[a - e] || 0, t && t[a] || 0, t && t[a - e] || 0);
  5563. s[a + 1] = n[a] - c + 256 & 255;
  5564. }
  5565. return s;
  5566. }
  5567. function X1(n, e, t) {
  5568. if (n === e && e === t) return n;
  5569. var i = Math.abs(e - t), s = Math.abs(n - t), a = Math.abs(n + e - t - t);
  5570. return i <= s && i <= a ? n : s <= a ? e : t;
  5571. }
  5572. function $1(n) {
  5573. var e = n.map(function(t) {
  5574. return t.reduce(function(i, s) {
  5575. return i + Math.abs(s);
  5576. }, 0);
  5577. });
  5578. return e.indexOf(Math.min.apply(null, e));
  5579. }
  5580. function Mo(n, e, t) {
  5581. var i = e * t, s = Math.floor(i / 8), a = 16 - (i - 8 * s + t), c = (1 << t) - 1;
  5582. return Rh(n, s) >> a & c;
  5583. }
  5584. function Vu(n, e, t, i) {
  5585. var s = t * i, a = Math.floor(s / 8), c = 16 - (s - 8 * a + i), l = (1 << i) - 1, f = (e & l) << c;
  5586. (function(d, m, _) {
  5587. if (m + 1 < d.byteLength) d.setUint16(m, _, !1);
  5588. else {
  5589. var k = _ >> 8 & 255;
  5590. d.setUint8(m, k);
  5591. }
  5592. })(n, a, Rh(n, a) & ~(l << c) & 65535 | f);
  5593. }
  5594. function Rh(n, e) {
  5595. return e + 1 < n.byteLength ? n.getUint16(e, !1) : n.getUint8(e) << 8;
  5596. }
  5597. function Z1(n) {
  5598. var e = 0;
  5599. if (n[e++] !== 71 || n[e++] !== 73 || n[e++] !== 70 || n[e++] !== 56 || (n[e++] + 1 & 253) != 56 || n[e++] !== 97) throw new Error("Invalid GIF 87a/89a header.");
  5600. var t = n[e++] | n[e++] << 8, i = n[e++] | n[e++] << 8, s = n[e++], a = s >> 7, c = 1 << 1 + (7 & s);
  5601. n[e++], n[e++];
  5602. var l = null, f = null;
  5603. a && (l = e, f = c, e += 3 * c);
  5604. var d = !0, m = [], _ = 0, k = null, p = 0, j = null;
  5605. for (this.width = t, this.height = i; d && e < n.length; ) switch (n[e++]) {
  5606. case 33:
  5607. switch (n[e++]) {
  5608. case 255:
  5609. if (n[e] !== 11 || n[e + 1] == 78 && n[e + 2] == 69 && n[e + 3] == 84 && n[e + 4] == 83 && n[e + 5] == 67 && n[e + 6] == 65 && n[e + 7] == 80 && n[e + 8] == 69 && n[e + 9] == 50 && n[e + 10] == 46 && n[e + 11] == 48 && n[e + 12] == 3 && n[e + 13] == 1 && n[e + 16] == 0) e += 14, j = n[e++] | n[e++] << 8, e++;
  5610. else for (e += 12; ; ) {
  5611. if (!((N = n[e++]) >= 0)) throw Error("Invalid block size");
  5612. if (N === 0) break;
  5613. e += N;
  5614. }
  5615. break;
  5616. case 249:
  5617. if (n[e++] !== 4 || n[e + 4] !== 0) throw new Error("Invalid graphics extension block.");
  5618. var O = n[e++];
  5619. _ = n[e++] | n[e++] << 8, k = n[e++], 1 & O || (k = null), p = O >> 2 & 7, e++;
  5620. break;
  5621. case 254:
  5622. for (; ; ) {
  5623. if (!((N = n[e++]) >= 0)) throw Error("Invalid block size");
  5624. if (N === 0) break;
  5625. e += N;
  5626. }
  5627. break;
  5628. default:
  5629. throw new Error("Unknown graphic control label: 0x" + n[e - 1].toString(16));
  5630. }
  5631. break;
  5632. case 44:
  5633. var M = n[e++] | n[e++] << 8, S = n[e++] | n[e++] << 8, V = n[e++] | n[e++] << 8, G = n[e++] | n[e++] << 8, q = n[e++], it = q >> 6 & 1, vt = 1 << 1 + (7 & q), dt = l, X = f, R = !1;
  5634. q >> 7 && (R = !0, dt = e, X = vt, e += 3 * vt);
  5635. var tt = e;
  5636. for (e++; ; ) {
  5637. var N;
  5638. if (!((N = n[e++]) >= 0)) throw Error("Invalid block size");
  5639. if (N === 0) break;
  5640. e += N;
  5641. }
  5642. m.push({ x: M, y: S, width: V, height: G, has_local_palette: R, palette_offset: dt, palette_size: X, data_offset: tt, data_length: e - tt, transparent_index: k, interlaced: !!it, delay: _, disposal: p });
  5643. break;
  5644. case 59:
  5645. d = !1;
  5646. break;
  5647. default:
  5648. throw new Error("Unknown gif block: 0x" + n[e - 1].toString(16));
  5649. }
  5650. this.numFrames = function() {
  5651. return m.length;
  5652. }, this.loopCount = function() {
  5653. return j;
  5654. }, this.frameInfo = function(E) {
  5655. if (E < 0 || E >= m.length) throw new Error("Frame index out of range.");
  5656. return m[E];
  5657. }, this.decodeAndBlitFrameBGRA = function(E, z) {
  5658. var U = this.frameInfo(E), rt = U.width * U.height;
  5659. if (rt > 536870912) throw new Error("Image dimensions exceed 512MB, which is too large.");
  5660. var ot = new Uint8Array(rt);
  5661. Gu(n, U.data_offset, ot, rt);
  5662. var ht = U.palette_offset, nt = U.transparent_index;
  5663. nt === null && (nt = 256);
  5664. var ct = U.width, At = t - ct, wt = ct, x = 4 * (U.y * t + U.x), B = 4 * ((U.y + U.height) * t + U.x), T = x, H = 4 * At;
  5665. U.interlaced === !0 && (H += 4 * t * 7);
  5666. for (var J = 8, Z = 0, at = ot.length; Z < at; ++Z) {
  5667. var st = ot[Z];
  5668. if (wt === 0 && (wt = ct, (T += H) >= B && (H = 4 * At + 4 * t * (J - 1), T = x + (ct + At) * (J << 1), J >>= 1)), st === nt) T += 4;
  5669. else {
  5670. var gt = n[ht + 3 * st], _t = n[ht + 3 * st + 1], kt = n[ht + 3 * st + 2];
  5671. z[T++] = kt, z[T++] = _t, z[T++] = gt, z[T++] = 255;
  5672. }
  5673. --wt;
  5674. }
  5675. }, this.decodeAndBlitFrameRGBA = function(E, z) {
  5676. var U = this.frameInfo(E), rt = U.width * U.height;
  5677. if (rt > 536870912) throw new Error("Image dimensions exceed 512MB, which is too large.");
  5678. var ot = new Uint8Array(rt);
  5679. Gu(n, U.data_offset, ot, rt);
  5680. var ht = U.palette_offset, nt = U.transparent_index;
  5681. nt === null && (nt = 256);
  5682. var ct = U.width, At = t - ct, wt = ct, x = 4 * (U.y * t + U.x), B = 4 * ((U.y + U.height) * t + U.x), T = x, H = 4 * At;
  5683. U.interlaced === !0 && (H += 4 * t * 7);
  5684. for (var J = 8, Z = 0, at = ot.length; Z < at; ++Z) {
  5685. var st = ot[Z];
  5686. if (wt === 0 && (wt = ct, (T += H) >= B && (H = 4 * At + 4 * t * (J - 1), T = x + (ct + At) * (J << 1), J >>= 1)), st === nt) T += 4;
  5687. else {
  5688. var gt = n[ht + 3 * st], _t = n[ht + 3 * st + 1], kt = n[ht + 3 * st + 2];
  5689. z[T++] = gt, z[T++] = _t, z[T++] = kt, z[T++] = 255;
  5690. }
  5691. --wt;
  5692. }
  5693. };
  5694. }
  5695. function Gu(n, e, t, i) {
  5696. for (var s = n[e++], a = 1 << s, c = a + 1, l = c + 1, f = s + 1, d = (1 << f) - 1, m = 0, _ = 0, k = 0, p = n[e++], j = new Int32Array(4096), O = null; ; ) {
  5697. for (; m < 16 && p !== 0; ) _ |= n[e++] << m, m += 8, p === 1 ? p = n[e++] : --p;
  5698. if (m < f) break;
  5699. var M = _ & d;
  5700. if (_ >>= f, m -= f, M !== a) {
  5701. if (M === c) break;
  5702. for (var S = M < l ? M : O, V = 0, G = S; G > a; ) G = j[G] >> 8, ++V;
  5703. var q = G;
  5704. if (k + V + (S !== M ? 1 : 0) > i) return void Le.log("Warning, gif stream longer than expected.");
  5705. t[k++] = q;
  5706. var it = k += V;
  5707. for (S !== M && (t[k++] = q), G = S; V--; ) G = j[G], t[--it] = 255 & G, G >>= 8;
  5708. O !== null && l < 4096 && (j[l++] = O << 8 | q, l >= d + 1 && f < 12 && (++f, d = d << 1 | 1)), O = M;
  5709. } else l = c + 1, d = (1 << (f = s + 1)) - 1, O = null;
  5710. }
  5711. return k !== i && Le.log("Warning, gif stream shorter than expected."), t;
  5712. }
  5713. /**
  5714. * @license
  5715. Copyright (c) 2008, Adobe Systems Incorporated
  5716. All rights reserved.
  5717. Redistribution and use in source and binary forms, with or without
  5718. modification, are permitted provided that the following conditions are
  5719. met:
  5720. * Redistributions of source code must retain the above copyright notice,
  5721. this list of conditions and the following disclaimer.
  5722. * Redistributions in binary form must reproduce the above copyright
  5723. notice, this list of conditions and the following disclaimer in the
  5724. documentation and/or other materials provided with the distribution.
  5725. * Neither the name of Adobe Systems Incorporated nor the names of its
  5726. contributors may be used to endorse or promote products derived from
  5727. this software without specific prior written permission.
  5728. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
  5729. IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
  5730. THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  5731. PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  5732. CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  5733. EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  5734. PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  5735. PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  5736. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  5737. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  5738. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  5739. */
  5740. function Ro(n) {
  5741. var e, t, i, s, a, c = Math.floor, l = new Array(64), f = new Array(64), d = new Array(64), m = new Array(64), _ = new Array(65535), k = new Array(65535), p = new Array(64), j = new Array(64), O = [], M = 0, S = 7, V = new Array(64), G = new Array(64), q = new Array(64), it = new Array(256), vt = new Array(2048), dt = [0, 1, 5, 6, 14, 15, 27, 28, 2, 4, 7, 13, 16, 26, 29, 42, 3, 8, 12, 17, 25, 30, 41, 43, 9, 11, 18, 24, 31, 40, 44, 53, 10, 19, 23, 32, 39, 45, 52, 54, 20, 22, 33, 38, 46, 51, 55, 60, 21, 34, 37, 47, 50, 56, 59, 61, 35, 36, 48, 49, 57, 58, 62, 63], X = [0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0], R = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], tt = [0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 125], N = [1, 2, 3, 0, 4, 17, 5, 18, 33, 49, 65, 6, 19, 81, 97, 7, 34, 113, 20, 50, 129, 145, 161, 8, 35, 66, 177, 193, 21, 82, 209, 240, 36, 51, 98, 114, 130, 9, 10, 22, 23, 24, 25, 26, 37, 38, 39, 40, 41, 42, 52, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, 131, 132, 133, 134, 135, 136, 137, 138, 146, 147, 148, 149, 150, 151, 152, 153, 154, 162, 163, 164, 165, 166, 167, 168, 169, 170, 178, 179, 180, 181, 182, 183, 184, 185, 186, 194, 195, 196, 197, 198, 199, 200, 201, 202, 210, 211, 212, 213, 214, 215, 216, 217, 218, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250], E = [0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0], z = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], U = [0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 119], rt = [0, 1, 2, 3, 17, 4, 5, 33, 49, 6, 18, 65, 81, 7, 97, 113, 19, 34, 50, 129, 8, 20, 66, 145, 161, 177, 193, 9, 35, 51, 82, 240, 21, 98, 114, 209, 10, 22, 36, 52, 225, 37, 241, 23, 24, 25, 26, 38, 39, 40, 41, 42, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, 130, 131, 132, 133, 134, 135, 136, 137, 138, 146, 147, 148, 149, 150, 151, 152, 153, 154, 162, 163, 164, 165, 166, 167, 168, 169, 170, 178, 179, 180, 181, 182, 183, 184, 185, 186, 194, 195, 196, 197, 198, 199, 200, 201, 202, 210, 211, 212, 213, 214, 215, 216, 217, 218, 226, 227, 228, 229, 230, 231, 232, 233, 234, 242, 243, 244, 245, 246, 247, 248, 249, 250];
  5742. function ot(x, B) {
  5743. for (var T = 0, H = 0, J = new Array(), Z = 1; Z <= 16; Z++) {
  5744. for (var at = 1; at <= x[Z]; at++) J[B[H]] = [], J[B[H]][0] = T, J[B[H]][1] = Z, H++, T++;
  5745. T *= 2;
  5746. }
  5747. return J;
  5748. }
  5749. function ht(x) {
  5750. for (var B = x[0], T = x[1] - 1; T >= 0; ) B & 1 << T && (M |= 1 << S), T--, --S < 0 && (M == 255 ? (nt(255), nt(0)) : nt(M), S = 7, M = 0);
  5751. }
  5752. function nt(x) {
  5753. O.push(x);
  5754. }
  5755. function ct(x) {
  5756. nt(x >> 8 & 255), nt(255 & x);
  5757. }
  5758. function At(x, B, T, H, J) {
  5759. for (var Z, at = J[0], st = J[240], gt = function(yt, Wt) {
  5760. var It, zt, qt, ve, ue, Zt, fe, he, Bt, ne, Rt = 0;
  5761. for (Bt = 0; Bt < 8; ++Bt) {
  5762. It = yt[Rt], zt = yt[Rt + 1], qt = yt[Rt + 2], ve = yt[Rt + 3], ue = yt[Rt + 4], Zt = yt[Rt + 5], fe = yt[Rt + 6];
  5763. var He = It + (he = yt[Rt + 7]), ge = It - he, se = zt + fe, oe = zt - fe, je = qt + Zt, Ut = qt - Zt, ke = ve + ue, Yt = ve - ue, Qt = He + ke, Be = He - ke, le = se + je, Vt = se - je;
  5764. yt[Rt] = Qt + le, yt[Rt + 4] = Qt - le;
  5765. var be = 0.707106781 * (Vt + Be);
  5766. yt[Rt + 2] = Be + be, yt[Rt + 6] = Be - be;
  5767. var Qr = 0.382683433 * ((Qt = Yt + Ut) - (Vt = oe + ge)), fn = 0.5411961 * Qt + Qr, br = 1.306562965 * Vt + Qr, rr = 0.707106781 * (le = Ut + oe), Gt = ge + rr, wr = ge - rr;
  5768. yt[Rt + 5] = wr + fn, yt[Rt + 3] = wr - fn, yt[Rt + 1] = Gt + br, yt[Rt + 7] = Gt - br, Rt += 8;
  5769. }
  5770. for (Rt = 0, Bt = 0; Bt < 8; ++Bt) {
  5771. It = yt[Rt], zt = yt[Rt + 8], qt = yt[Rt + 16], ve = yt[Rt + 24], ue = yt[Rt + 32], Zt = yt[Rt + 40], fe = yt[Rt + 48];
  5772. var yr = It + (he = yt[Rt + 56]), Tn = It - he, Dn = zt + fe, De = zt - fe, rn = qt + Zt, sn = qt - Zt, ti = ve + ue, jr = ve - ue, Gn = yr + ti, ir = yr - ti, Yn = Dn + rn, Jn = Dn - rn;
  5773. yt[Rt] = Gn + Yn, yt[Rt + 32] = Gn - Yn;
  5774. var qn = 0.707106781 * (Jn + ir);
  5775. yt[Rt + 16] = ir + qn, yt[Rt + 48] = ir - qn;
  5776. var ei = 0.382683433 * ((Gn = jr + sn) - (Jn = De + Tn)), ar = 0.5411961 * Gn + ei, ni = 1.306562965 * Jn + ei, Si = 0.707106781 * (Yn = sn + De), ki = Tn + Si, Pi = Tn - Si;
  5777. yt[Rt + 40] = Pi + ar, yt[Rt + 24] = Pi - ar, yt[Rt + 8] = ki + ni, yt[Rt + 56] = ki - ni, Rt++;
  5778. }
  5779. for (Bt = 0; Bt < 64; ++Bt) ne = yt[Bt] * Wt[Bt], p[Bt] = ne > 0 ? ne + 0.5 | 0 : ne - 0.5 | 0;
  5780. return p;
  5781. }(x, B), _t = 0; _t < 64; ++_t) j[dt[_t]] = gt[_t];
  5782. var kt = j[0] - T;
  5783. T = j[0], kt == 0 ? ht(H[0]) : (ht(H[k[Z = 32767 + kt]]), ht(_[Z]));
  5784. for (var St = 63; St > 0 && j[St] == 0; ) St--;
  5785. if (St == 0) return ht(at), T;
  5786. for (var Dt, P = 1; P <= St; ) {
  5787. for (var Lt = P; j[P] == 0 && P <= St; ) ++P;
  5788. var ae = P - Lt;
  5789. if (ae >= 16) {
  5790. Dt = ae >> 4;
  5791. for (var Ht = 1; Ht <= Dt; ++Ht) ht(st);
  5792. ae &= 15;
  5793. }
  5794. Z = 32767 + j[P], ht(J[(ae << 4) + k[Z]]), ht(_[Z]), P++;
  5795. }
  5796. return St != 63 && ht(at), T;
  5797. }
  5798. function wt(x) {
  5799. x = Math.min(Math.max(x, 1), 100), a != x && (function(B) {
  5800. for (var T = [16, 11, 10, 16, 24, 40, 51, 61, 12, 12, 14, 19, 26, 58, 60, 55, 14, 13, 16, 24, 40, 57, 69, 56, 14, 17, 22, 29, 51, 87, 80, 62, 18, 22, 37, 56, 68, 109, 103, 77, 24, 35, 55, 64, 81, 104, 113, 92, 49, 64, 78, 87, 103, 121, 120, 101, 72, 92, 95, 98, 112, 100, 103, 99], H = 0; H < 64; H++) {
  5801. var J = c((T[H] * B + 50) / 100);
  5802. J = Math.min(Math.max(J, 1), 255), l[dt[H]] = J;
  5803. }
  5804. for (var Z = [17, 18, 24, 47, 99, 99, 99, 99, 18, 21, 26, 66, 99, 99, 99, 99, 24, 26, 56, 99, 99, 99, 99, 99, 47, 66, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99], at = 0; at < 64; at++) {
  5805. var st = c((Z[at] * B + 50) / 100);
  5806. st = Math.min(Math.max(st, 1), 255), f[dt[at]] = st;
  5807. }
  5808. for (var gt = [1, 1.387039845, 1.306562965, 1.175875602, 1, 0.785694958, 0.5411961, 0.275899379], _t = 0, kt = 0; kt < 8; kt++) for (var St = 0; St < 8; St++) d[_t] = 1 / (l[dt[_t]] * gt[kt] * gt[St] * 8), m[_t] = 1 / (f[dt[_t]] * gt[kt] * gt[St] * 8), _t++;
  5809. }(x < 50 ? Math.floor(5e3 / x) : Math.floor(200 - 2 * x)), a = x);
  5810. }
  5811. this.encode = function(x, B) {
  5812. B && wt(B), O = new Array(), M = 0, S = 7, ct(65496), ct(65504), ct(16), nt(74), nt(70), nt(73), nt(70), nt(0), nt(1), nt(1), nt(0), ct(1), ct(1), nt(0), nt(0), function() {
  5813. ct(65499), ct(132), nt(0);
  5814. for (var zt = 0; zt < 64; zt++) nt(l[zt]);
  5815. nt(1);
  5816. for (var qt = 0; qt < 64; qt++) nt(f[qt]);
  5817. }(), function(zt, qt) {
  5818. ct(65472), ct(17), nt(8), ct(qt), ct(zt), nt(3), nt(1), nt(17), nt(0), nt(2), nt(17), nt(1), nt(3), nt(17), nt(1);
  5819. }(x.width, x.height), function() {
  5820. ct(65476), ct(418), nt(0);
  5821. for (var zt = 0; zt < 16; zt++) nt(X[zt + 1]);
  5822. for (var qt = 0; qt <= 11; qt++) nt(R[qt]);
  5823. nt(16);
  5824. for (var ve = 0; ve < 16; ve++) nt(tt[ve + 1]);
  5825. for (var ue = 0; ue <= 161; ue++) nt(N[ue]);
  5826. nt(1);
  5827. for (var Zt = 0; Zt < 16; Zt++) nt(E[Zt + 1]);
  5828. for (var fe = 0; fe <= 11; fe++) nt(z[fe]);
  5829. nt(17);
  5830. for (var he = 0; he < 16; he++) nt(U[he + 1]);
  5831. for (var Bt = 0; Bt <= 161; Bt++) nt(rt[Bt]);
  5832. }(), ct(65498), ct(12), nt(3), nt(1), nt(0), nt(2), nt(17), nt(3), nt(17), nt(0), nt(63), nt(0);
  5833. var T = 0, H = 0, J = 0;
  5834. M = 0, S = 7, this.encode.displayName = "_encode_";
  5835. for (var Z, at, st, gt, _t, kt, St, Dt, P, Lt = x.data, ae = x.width, Ht = x.height, yt = 4 * ae, Wt = 0; Wt < Ht; ) {
  5836. for (Z = 0; Z < yt; ) {
  5837. for (_t = yt * Wt + Z, St = -1, Dt = 0, P = 0; P < 64; P++) kt = _t + (Dt = P >> 3) * yt + (St = 4 * (7 & P)), Wt + Dt >= Ht && (kt -= yt * (Wt + 1 + Dt - Ht)), Z + St >= yt && (kt -= Z + St - yt + 4), at = Lt[kt++], st = Lt[kt++], gt = Lt[kt++], V[P] = (vt[at] + vt[st + 256 | 0] + vt[gt + 512 | 0] >> 16) - 128, G[P] = (vt[at + 768 | 0] + vt[st + 1024 | 0] + vt[gt + 1280 | 0] >> 16) - 128, q[P] = (vt[at + 1280 | 0] + vt[st + 1536 | 0] + vt[gt + 1792 | 0] >> 16) - 128;
  5838. T = At(V, d, T, e, i), H = At(G, m, H, t, s), J = At(q, m, J, t, s), Z += 32;
  5839. }
  5840. Wt += 8;
  5841. }
  5842. if (S >= 0) {
  5843. var It = [];
  5844. It[1] = S + 1, It[0] = (1 << S + 1) - 1, ht(It);
  5845. }
  5846. return ct(65497), new Uint8Array(O);
  5847. }, n = n || 50, function() {
  5848. for (var x = String.fromCharCode, B = 0; B < 256; B++) it[B] = x(B);
  5849. }(), e = ot(X, R), t = ot(E, z), i = ot(tt, N), s = ot(U, rt), function() {
  5850. for (var x = 1, B = 2, T = 1; T <= 15; T++) {
  5851. for (var H = x; H < B; H++) k[32767 + H] = T, _[32767 + H] = [], _[32767 + H][1] = T, _[32767 + H][0] = H;
  5852. for (var J = -(B - 1); J <= -x; J++) k[32767 + J] = T, _[32767 + J] = [], _[32767 + J][1] = T, _[32767 + J][0] = B - 1 + J;
  5853. x <<= 1, B <<= 1;
  5854. }
  5855. }(), function() {
  5856. for (var x = 0; x < 256; x++) vt[x] = 19595 * x, vt[x + 256 | 0] = 38470 * x, vt[x + 512 | 0] = 7471 * x + 32768, vt[x + 768 | 0] = -11059 * x, vt[x + 1024 | 0] = -21709 * x, vt[x + 1280 | 0] = 32768 * x + 8421375, vt[x + 1536 | 0] = -27439 * x, vt[x + 1792 | 0] = -5329 * x;
  5857. }(), wt(n);
  5858. }
  5859. /**
  5860. * @license
  5861. * Copyright (c) 2017 Aras Abbasi
  5862. *
  5863. * Licensed under the MIT License.
  5864. * http://opensource.org/licenses/mit-license
  5865. */
  5866. function Qn(n, e) {
  5867. if (this.pos = 0, this.buffer = n, this.datav = new DataView(n.buffer), this.is_with_alpha = !!e, this.bottom_up = !0, this.flag = String.fromCharCode(this.buffer[0]) + String.fromCharCode(this.buffer[1]), this.pos += 2, ["BM", "BA", "CI", "CP", "IC", "PT"].indexOf(this.flag) === -1) throw new Error("Invalid BMP File");
  5868. this.parseHeader(), this.parseBGR();
  5869. }
  5870. function Yu(n) {
  5871. function e(R) {
  5872. if (!R) throw Error("assert :P");
  5873. }
  5874. function t(R, tt, N) {
  5875. for (var E = 0; 4 > E; E++) if (R[tt + E] != N.charCodeAt(E)) return !0;
  5876. return !1;
  5877. }
  5878. function i(R, tt, N, E, z) {
  5879. for (var U = 0; U < z; U++) R[tt + U] = N[E + U];
  5880. }
  5881. function s(R, tt, N, E) {
  5882. for (var z = 0; z < E; z++) R[tt + z] = N;
  5883. }
  5884. function a(R) {
  5885. return new Int32Array(R);
  5886. }
  5887. function c(R, tt) {
  5888. for (var N = [], E = 0; E < R; E++) N.push(new tt());
  5889. return N;
  5890. }
  5891. function l(R, tt) {
  5892. var N = [];
  5893. return function E(z, U, rt) {
  5894. for (var ot = rt[U], ht = 0; ht < ot && (z.push(rt.length > U + 1 ? [] : new tt()), !(rt.length < U + 1)); ht++) E(z[ht], U + 1, rt);
  5895. }(N, 0, R), N;
  5896. }
  5897. var f = function() {
  5898. var R = this;
  5899. function tt(r, o) {
  5900. for (var h = 1 << o - 1 >>> 0; r & h; ) h >>>= 1;
  5901. return h ? (r & h - 1) + h : r;
  5902. }
  5903. function N(r, o, h, g, b) {
  5904. e(!(g % h));
  5905. do
  5906. r[o + (g -= h)] = b;
  5907. while (0 < g);
  5908. }
  5909. function E(r, o, h, g, b) {
  5910. if (e(2328 >= b), 512 >= b) var w = a(512);
  5911. else if ((w = a(b)) == null) return 0;
  5912. return function(y, A, L, F, W, et) {
  5913. var C, Y, $ = A, ut = 1 << L, Q = a(16), ft = a(16);
  5914. for (e(W != 0), e(F != null), e(y != null), e(0 < L), Y = 0; Y < W; ++Y) {
  5915. if (15 < F[Y]) return 0;
  5916. ++Q[F[Y]];
  5917. }
  5918. if (Q[0] == W) return 0;
  5919. for (ft[1] = 0, C = 1; 15 > C; ++C) {
  5920. if (Q[C] > 1 << C) return 0;
  5921. ft[C + 1] = ft[C] + Q[C];
  5922. }
  5923. for (Y = 0; Y < W; ++Y) C = F[Y], 0 < F[Y] && (et[ft[C]++] = Y);
  5924. if (ft[15] == 1) return (F = new z()).g = 0, F.value = et[0], N(y, $, 1, ut, F), ut;
  5925. var pt, xt = -1, bt = ut - 1, Mt = 0, Pt = 1, re = 1, Ot = 1 << L;
  5926. for (Y = 0, C = 1, W = 2; C <= L; ++C, W <<= 1) {
  5927. if (Pt += re <<= 1, 0 > (re -= Q[C])) return 0;
  5928. for (; 0 < Q[C]; --Q[C]) (F = new z()).g = C, F.value = et[Y++], N(y, $ + Mt, W, Ot, F), Mt = tt(Mt, C);
  5929. }
  5930. for (C = L + 1, W = 2; 15 >= C; ++C, W <<= 1) {
  5931. if (Pt += re <<= 1, 0 > (re -= Q[C])) return 0;
  5932. for (; 0 < Q[C]; --Q[C]) {
  5933. if (F = new z(), (Mt & bt) != xt) {
  5934. for ($ += Ot, pt = 1 << (xt = C) - L; 15 > xt && !(0 >= (pt -= Q[xt])); ) ++xt, pt <<= 1;
  5935. ut += Ot = 1 << (pt = xt - L), y[A + (xt = Mt & bt)].g = pt + L, y[A + xt].value = $ - A - xt;
  5936. }
  5937. F.g = C - L, F.value = et[Y++], N(y, $ + (Mt >> L), W, Ot, F), Mt = tt(Mt, C);
  5938. }
  5939. }
  5940. return Pt != 2 * ft[15] - 1 ? 0 : ut;
  5941. }(r, o, h, g, b, w);
  5942. }
  5943. function z() {
  5944. this.value = this.g = 0;
  5945. }
  5946. function U() {
  5947. this.value = this.g = 0;
  5948. }
  5949. function rt() {
  5950. this.G = c(5, z), this.H = a(5), this.jc = this.Qb = this.qb = this.nd = 0, this.pd = c(Ui, U);
  5951. }
  5952. function ot(r, o, h, g) {
  5953. e(r != null), e(o != null), e(2147483648 > g), r.Ca = 254, r.I = 0, r.b = -8, r.Ka = 0, r.oa = o, r.pa = h, r.Jd = o, r.Yc = h + g, r.Zc = 4 <= g ? h + g - 4 + 1 : h, at(r);
  5954. }
  5955. function ht(r, o) {
  5956. for (var h = 0; 0 < o--; ) h |= gt(r, 128) << o;
  5957. return h;
  5958. }
  5959. function nt(r, o) {
  5960. var h = ht(r, o);
  5961. return st(r) ? -h : h;
  5962. }
  5963. function ct(r, o, h, g) {
  5964. var b, w = 0;
  5965. for (e(r != null), e(o != null), e(4294967288 > g), r.Sb = g, r.Ra = 0, r.u = 0, r.h = 0, 4 < g && (g = 4), b = 0; b < g; ++b) w += o[h + b] << 8 * b;
  5966. r.Ra = w, r.bb = g, r.oa = o, r.pa = h;
  5967. }
  5968. function At(r) {
  5969. for (; 8 <= r.u && r.bb < r.Sb; ) r.Ra >>>= 8, r.Ra += r.oa[r.pa + r.bb] << xn - 8 >>> 0, ++r.bb, r.u -= 8;
  5970. H(r) && (r.h = 1, r.u = 0);
  5971. }
  5972. function wt(r, o) {
  5973. if (e(0 <= o), !r.h && o <= wa) {
  5974. var h = T(r) & ci[o];
  5975. return r.u += o, At(r), h;
  5976. }
  5977. return r.h = 1, r.u = 0;
  5978. }
  5979. function x() {
  5980. this.b = this.Ca = this.I = 0, this.oa = [], this.pa = 0, this.Jd = [], this.Yc = 0, this.Zc = [], this.Ka = 0;
  5981. }
  5982. function B() {
  5983. this.Ra = 0, this.oa = [], this.h = this.u = this.bb = this.Sb = this.pa = 0;
  5984. }
  5985. function T(r) {
  5986. return r.Ra >>> (r.u & xn - 1) >>> 0;
  5987. }
  5988. function H(r) {
  5989. return e(r.bb <= r.Sb), r.h || r.bb == r.Sb && r.u > xn;
  5990. }
  5991. function J(r, o) {
  5992. r.u = o, r.h = H(r);
  5993. }
  5994. function Z(r) {
  5995. r.u >= Ln && (e(r.u >= Ln), At(r));
  5996. }
  5997. function at(r) {
  5998. e(r != null && r.oa != null), r.pa < r.Zc ? (r.I = (r.oa[r.pa++] | r.I << 8) >>> 0, r.b += 8) : (e(r != null && r.oa != null), r.pa < r.Yc ? (r.b += 8, r.I = r.oa[r.pa++] | r.I << 8) : r.Ka ? r.b = 0 : (r.I <<= 8, r.b += 8, r.Ka = 1));
  5999. }
  6000. function st(r) {
  6001. return ht(r, 1);
  6002. }
  6003. function gt(r, o) {
  6004. var h = r.Ca;
  6005. 0 > r.b && at(r);
  6006. var g = r.b, b = h * o >>> 8, w = (r.I >>> g > b) + 0;
  6007. for (w ? (h -= b, r.I -= b + 1 << g >>> 0) : h = b + 1, g = h, b = 0; 256 <= g; ) b += 8, g >>= 8;
  6008. return g = 7 ^ b + zi[g], r.b -= g, r.Ca = (h << g) - 1, w;
  6009. }
  6010. function _t(r, o, h) {
  6011. r[o + 0] = h >> 24 & 255, r[o + 1] = h >> 16 & 255, r[o + 2] = h >> 8 & 255, r[o + 3] = 255 & h;
  6012. }
  6013. function kt(r, o) {
  6014. return r[o + 0] | r[o + 1] << 8;
  6015. }
  6016. function St(r, o) {
  6017. return kt(r, o) | r[o + 2] << 16;
  6018. }
  6019. function Dt(r, o) {
  6020. return kt(r, o) | kt(r, o + 2) << 16;
  6021. }
  6022. function P(r, o) {
  6023. var h = 1 << o;
  6024. return e(r != null), e(0 < o), r.X = a(h), r.X == null ? 0 : (r.Mb = 32 - o, r.Xa = o, 1);
  6025. }
  6026. function Lt(r, o) {
  6027. e(r != null), e(o != null), e(r.Xa == o.Xa), i(o.X, 0, r.X, 0, 1 << o.Xa);
  6028. }
  6029. function ae() {
  6030. this.X = [], this.Xa = this.Mb = 0;
  6031. }
  6032. function Ht(r, o, h, g) {
  6033. e(h != null), e(g != null);
  6034. var b = h[0], w = g[0];
  6035. return b == 0 && (b = (r * w + o / 2) / o), w == 0 && (w = (o * b + r / 2) / r), 0 >= b || 0 >= w ? 0 : (h[0] = b, g[0] = w, 1);
  6036. }
  6037. function yt(r, o) {
  6038. return r + (1 << o) - 1 >>> o;
  6039. }
  6040. function Wt(r, o) {
  6041. return ((4278255360 & r) + (4278255360 & o) >>> 0 & 4278255360) + ((16711935 & r) + (16711935 & o) >>> 0 & 16711935) >>> 0;
  6042. }
  6043. function It(r, o) {
  6044. R[o] = function(h, g, b, w, y, A, L) {
  6045. var F;
  6046. for (F = 0; F < y; ++F) {
  6047. var W = R[r](A[L + F - 1], b, w + F);
  6048. A[L + F] = Wt(h[g + F], W);
  6049. }
  6050. };
  6051. }
  6052. function zt() {
  6053. this.ud = this.hd = this.jd = 0;
  6054. }
  6055. function qt(r, o) {
  6056. return ((4278124286 & (r ^ o)) >>> 1) + (r & o) >>> 0;
  6057. }
  6058. function ve(r) {
  6059. return 0 <= r && 256 > r ? r : 0 > r ? 0 : 255 < r ? 255 : void 0;
  6060. }
  6061. function ue(r, o) {
  6062. return ve(r + (r - o + 0.5 >> 1));
  6063. }
  6064. function Zt(r, o, h) {
  6065. return Math.abs(o - h) - Math.abs(r - h);
  6066. }
  6067. function fe(r, o, h, g, b, w, y) {
  6068. for (g = w[y - 1], h = 0; h < b; ++h) w[y + h] = g = Wt(r[o + h], g);
  6069. }
  6070. function he(r, o, h, g, b) {
  6071. var w;
  6072. for (w = 0; w < h; ++w) {
  6073. var y = r[o + w], A = y >> 8 & 255, L = 16711935 & (L = (L = 16711935 & y) + ((A << 16) + A));
  6074. g[b + w] = (4278255360 & y) + L >>> 0;
  6075. }
  6076. }
  6077. function Bt(r, o) {
  6078. o.jd = 255 & r, o.hd = r >> 8 & 255, o.ud = r >> 16 & 255;
  6079. }
  6080. function ne(r, o, h, g, b, w) {
  6081. var y;
  6082. for (y = 0; y < g; ++y) {
  6083. var A = o[h + y], L = A >>> 8, F = A, W = 255 & (W = (W = A >>> 16) + ((r.jd << 24 >> 24) * (L << 24 >> 24) >>> 5));
  6084. F = 255 & (F = (F += (r.hd << 24 >> 24) * (L << 24 >> 24) >>> 5) + ((r.ud << 24 >> 24) * (W << 24 >> 24) >>> 5)), b[w + y] = (4278255360 & A) + (W << 16) + F;
  6085. }
  6086. }
  6087. function Rt(r, o, h, g, b) {
  6088. R[o] = function(w, y, A, L, F, W, et, C, Y) {
  6089. for (L = et; L < C; ++L) for (et = 0; et < Y; ++et) F[W++] = b(A[g(w[y++])]);
  6090. }, R[r] = function(w, y, A, L, F, W, et) {
  6091. var C = 8 >> w.b, Y = w.Ea, $ = w.K[0], ut = w.w;
  6092. if (8 > C) for (w = (1 << w.b) - 1, ut = (1 << C) - 1; y < A; ++y) {
  6093. var Q, ft = 0;
  6094. for (Q = 0; Q < Y; ++Q) Q & w || (ft = g(L[F++])), W[et++] = b($[ft & ut]), ft >>= C;
  6095. }
  6096. else R["VP8LMapColor" + h](L, F, $, ut, W, et, y, A, Y);
  6097. };
  6098. }
  6099. function He(r, o, h, g, b) {
  6100. for (h = o + h; o < h; ) {
  6101. var w = r[o++];
  6102. g[b++] = w >> 16 & 255, g[b++] = w >> 8 & 255, g[b++] = 255 & w;
  6103. }
  6104. }
  6105. function ge(r, o, h, g, b) {
  6106. for (h = o + h; o < h; ) {
  6107. var w = r[o++];
  6108. g[b++] = w >> 16 & 255, g[b++] = w >> 8 & 255, g[b++] = 255 & w, g[b++] = w >> 24 & 255;
  6109. }
  6110. }
  6111. function se(r, o, h, g, b) {
  6112. for (h = o + h; o < h; ) {
  6113. var w = (y = r[o++]) >> 16 & 240 | y >> 12 & 15, y = 240 & y | y >> 28 & 15;
  6114. g[b++] = w, g[b++] = y;
  6115. }
  6116. }
  6117. function oe(r, o, h, g, b) {
  6118. for (h = o + h; o < h; ) {
  6119. var w = (y = r[o++]) >> 16 & 248 | y >> 13 & 7, y = y >> 5 & 224 | y >> 3 & 31;
  6120. g[b++] = w, g[b++] = y;
  6121. }
  6122. }
  6123. function je(r, o, h, g, b) {
  6124. for (h = o + h; o < h; ) {
  6125. var w = r[o++];
  6126. g[b++] = 255 & w, g[b++] = w >> 8 & 255, g[b++] = w >> 16 & 255;
  6127. }
  6128. }
  6129. function Ut(r, o, h, g, b, w) {
  6130. if (w == 0) for (h = o + h; o < h; ) _t(g, ((w = r[o++])[0] >> 24 | w[1] >> 8 & 65280 | w[2] << 8 & 16711680 | w[3] << 24) >>> 0), b += 32;
  6131. else i(g, b, r, o, h);
  6132. }
  6133. function ke(r, o) {
  6134. R[o][0] = R[r + "0"], R[o][1] = R[r + "1"], R[o][2] = R[r + "2"], R[o][3] = R[r + "3"], R[o][4] = R[r + "4"], R[o][5] = R[r + "5"], R[o][6] = R[r + "6"], R[o][7] = R[r + "7"], R[o][8] = R[r + "8"], R[o][9] = R[r + "9"], R[o][10] = R[r + "10"], R[o][11] = R[r + "11"], R[o][12] = R[r + "12"], R[o][13] = R[r + "13"], R[o][14] = R[r + "0"], R[o][15] = R[r + "0"];
  6135. }
  6136. function Yt(r) {
  6137. return r == no || r == ro || r == is || r == io;
  6138. }
  6139. function Qt() {
  6140. this.eb = [], this.size = this.A = this.fb = 0;
  6141. }
  6142. function Be() {
  6143. this.y = [], this.f = [], this.ea = [], this.F = [], this.Tc = this.Ed = this.Cd = this.Fd = this.lb = this.Db = this.Ab = this.fa = this.J = this.W = this.N = this.O = 0;
  6144. }
  6145. function le() {
  6146. this.Rd = this.height = this.width = this.S = 0, this.f = {}, this.f.RGBA = new Qt(), this.f.kb = new Be(), this.sd = null;
  6147. }
  6148. function Vt() {
  6149. this.width = [0], this.height = [0], this.Pd = [0], this.Qd = [0], this.format = [0];
  6150. }
  6151. function be() {
  6152. this.Id = this.fd = this.Md = this.hb = this.ib = this.da = this.bd = this.cd = this.j = this.v = this.Da = this.Sd = this.ob = 0;
  6153. }
  6154. function Qr(r) {
  6155. return alert("todo:WebPSamplerProcessPlane"), r.T;
  6156. }
  6157. function fn(r, o) {
  6158. var h = r.T, g = o.ba.f.RGBA, b = g.eb, w = g.fb + r.ka * g.A, y = Wn[o.ba.S], A = r.y, L = r.O, F = r.f, W = r.N, et = r.ea, C = r.W, Y = o.cc, $ = o.dc, ut = o.Mc, Q = o.Nc, ft = r.ka, pt = r.ka + r.T, xt = r.U, bt = xt + 1 >> 1;
  6159. for (ft == 0 ? y(A, L, null, null, F, W, et, C, F, W, et, C, b, w, null, null, xt) : (y(o.ec, o.fc, A, L, Y, $, ut, Q, F, W, et, C, b, w - g.A, b, w, xt), ++h); ft + 2 < pt; ft += 2) Y = F, $ = W, ut = et, Q = C, W += r.Rc, C += r.Rc, w += 2 * g.A, y(A, (L += 2 * r.fa) - r.fa, A, L, Y, $, ut, Q, F, W, et, C, b, w - g.A, b, w, xt);
  6160. return L += r.fa, r.j + pt < r.o ? (i(o.ec, o.fc, A, L, xt), i(o.cc, o.dc, F, W, bt), i(o.Mc, o.Nc, et, C, bt), h--) : 1 & pt || y(A, L, null, null, F, W, et, C, F, W, et, C, b, w + g.A, null, null, xt), h;
  6161. }
  6162. function br(r, o, h) {
  6163. var g = r.F, b = [r.J];
  6164. if (g != null) {
  6165. var w = r.U, y = o.ba.S, A = y == rs || y == is;
  6166. o = o.ba.f.RGBA;
  6167. var L = [0], F = r.ka;
  6168. L[0] = r.T, r.Kb && (F == 0 ? --L[0] : (--F, b[0] -= r.width), r.j + r.ka + r.T == r.o && (L[0] = r.o - r.j - F));
  6169. var W = o.eb;
  6170. F = o.fb + F * o.A, r = al(g, b[0], r.width, w, L, W, F + (A ? 0 : 3), o.A), e(h == L), r && Yt(y) && Aa(W, F, A, w, L, o.A);
  6171. }
  6172. return 0;
  6173. }
  6174. function rr(r) {
  6175. var o = r.ma, h = o.ba.S, g = 11 > h, b = h == es || h == ns || h == rs || h == eo || h == 12 || Yt(h);
  6176. if (o.memory = null, o.Ib = null, o.Jb = null, o.Nd = null, !zn(o.Oa, r, b ? 11 : 12)) return 0;
  6177. if (b && Yt(h) && Sr(), r.da) alert("todo:use_scaling");
  6178. else {
  6179. if (g) {
  6180. if (o.Ib = Qr, r.Kb) {
  6181. if (h = r.U + 1 >> 1, o.memory = a(r.U + 2 * h), o.memory == null) return 0;
  6182. o.ec = o.memory, o.fc = 0, o.cc = o.ec, o.dc = o.fc + r.U, o.Mc = o.cc, o.Nc = o.dc + h, o.Ib = fn, Sr();
  6183. }
  6184. } else alert("todo:EmitYUV");
  6185. b && (o.Jb = br, g && Te());
  6186. }
  6187. if (g && !xl) {
  6188. for (r = 0; 256 > r; ++r) af[r] = 89858 * (r - 128) + ss >> as, lf[r] = -22014 * (r - 128) + ss, of[r] = -45773 * (r - 128), sf[r] = 113618 * (r - 128) + ss >> as;
  6189. for (r = La; r < oo; ++r) o = 76283 * (r - 16) + ss >> as, uf[r - La] = sr(o, 255), hf[r - La] = sr(o + 8 >> 4, 15);
  6190. xl = 1;
  6191. }
  6192. return 1;
  6193. }
  6194. function Gt(r) {
  6195. var o = r.ma, h = r.U, g = r.T;
  6196. return e(!(1 & r.ka)), 0 >= h || 0 >= g ? 0 : (h = o.Ib(r, o), o.Jb != null && o.Jb(r, o, h), o.Dc += h, 1);
  6197. }
  6198. function wr(r) {
  6199. r.ma.memory = null;
  6200. }
  6201. function yr(r, o, h, g) {
  6202. return wt(r, 8) != 47 ? 0 : (o[0] = wt(r, 14) + 1, h[0] = wt(r, 14) + 1, g[0] = wt(r, 1), wt(r, 3) != 0 ? 0 : !r.h);
  6203. }
  6204. function Tn(r, o) {
  6205. if (4 > r) return r + 1;
  6206. var h = r - 2 >> 1;
  6207. return (2 + (1 & r) << h) + wt(o, h) + 1;
  6208. }
  6209. function Dn(r, o) {
  6210. return 120 < o ? o - 120 : 1 <= (h = ((h = Wh[o - 1]) >> 4) * r + (8 - (15 & h))) ? h : 1;
  6211. var h;
  6212. }
  6213. function De(r, o, h) {
  6214. var g = T(h), b = r[o += 255 & g].g - 8;
  6215. return 0 < b && (J(h, h.u + 8), g = T(h), o += r[o].value, o += g & (1 << b) - 1), J(h, h.u + r[o].g), r[o].value;
  6216. }
  6217. function rn(r, o, h) {
  6218. return h.g += r.g, h.value += r.value << o >>> 0, e(8 >= h.g), r.g;
  6219. }
  6220. function sn(r, o, h) {
  6221. var g = r.xc;
  6222. return e((o = g == 0 ? 0 : r.vc[r.md * (h >> g) + (o >> g)]) < r.Wb), r.Ya[o];
  6223. }
  6224. function ti(r, o, h, g) {
  6225. var b = r.ab, w = r.c * o, y = r.C;
  6226. o = y + o;
  6227. var A = h, L = g;
  6228. for (g = r.Ta, h = r.Ua; 0 < b--; ) {
  6229. var F = r.gc[b], W = y, et = o, C = A, Y = L, $ = (L = g, A = h, F.Ea);
  6230. switch (e(W < et), e(et <= F.nc), F.hc) {
  6231. case 2:
  6232. Hi(C, Y, (et - W) * $, L, A);
  6233. break;
  6234. case 0:
  6235. var ut = W, Q = et, ft = L, pt = A, xt = (Ot = F).Ea;
  6236. ut == 0 && (Dr(C, Y, null, null, 1, ft, pt), fe(C, Y + 1, 0, 0, xt - 1, ft, pt + 1), Y += xt, pt += xt, ++ut);
  6237. for (var bt = 1 << Ot.b, Mt = bt - 1, Pt = yt(xt, Ot.b), re = Ot.K, Ot = Ot.w + (ut >> Ot.b) * Pt; ut < Q; ) {
  6238. var ce = re, tn = Ot, ie = 1;
  6239. for (qr(C, Y, ft, pt - xt, 1, ft, pt); ie < xt; ) {
  6240. var jt = (ie & ~Mt) + bt;
  6241. jt > xt && (jt = xt), (0, Kn[ce[tn++] >> 8 & 15])(C, Y + +ie, ft, pt + ie - xt, jt - ie, ft, pt + ie), ie = jt;
  6242. }
  6243. Y += xt, pt += xt, ++ut & Mt || (Ot += Pt);
  6244. }
  6245. et != F.nc && i(L, A - $, L, A + (et - W - 1) * $, $);
  6246. break;
  6247. case 1:
  6248. for ($ = C, Q = Y, xt = (C = F.Ea) - (pt = C & ~(ft = (Y = 1 << F.b) - 1)), ut = yt(C, F.b), bt = F.K, F = F.w + (W >> F.b) * ut; W < et; ) {
  6249. for (Mt = bt, Pt = F, re = new zt(), Ot = Q + pt, ce = Q + C; Q < Ot; ) Bt(Mt[Pt++], re), pi(re, $, Q, Y, L, A), Q += Y, A += Y;
  6250. Q < ce && (Bt(Mt[Pt++], re), pi(re, $, Q, xt, L, A), Q += xt, A += xt), ++W & ft || (F += ut);
  6251. }
  6252. break;
  6253. case 3:
  6254. if (C == L && Y == A && 0 < F.b) {
  6255. for (Q = L, C = $ = A + (et - W) * $ - (pt = (et - W) * yt(F.Ea, F.b)), Y = L, ft = A, ut = [], pt = (xt = pt) - 1; 0 <= pt; --pt) ut[pt] = Y[ft + pt];
  6256. for (pt = xt - 1; 0 <= pt; --pt) Q[C + pt] = ut[pt];
  6257. di(F, W, et, L, $, L, A);
  6258. } else di(F, W, et, C, Y, L, A);
  6259. }
  6260. A = g, L = h;
  6261. }
  6262. L != h && i(g, h, A, L, w);
  6263. }
  6264. function jr(r, o) {
  6265. var h = r.V, g = r.Ba + r.c * r.C, b = o - r.C;
  6266. if (e(o <= r.l.o), e(16 >= b), 0 < b) {
  6267. var w = r.l, y = r.Ta, A = r.Ua, L = w.width;
  6268. if (ti(r, b, h, g), b = A = [A], e((h = r.C) < (g = o)), e(w.v < w.va), g > w.o && (g = w.o), h < w.j) {
  6269. var F = w.j - h;
  6270. h = w.j, b[0] += F * L;
  6271. }
  6272. if (h >= g ? h = 0 : (b[0] += 4 * w.v, w.ka = h - w.j, w.U = w.va - w.v, w.T = g - h, h = 1), h) {
  6273. if (A = A[0], 11 > (h = r.ca).S) {
  6274. var W = h.f.RGBA, et = (g = h.S, b = w.U, w = w.T, F = W.eb, W.A), C = w;
  6275. for (W = W.fb + r.Ma * W.A; 0 < C--; ) {
  6276. var Y = y, $ = A, ut = b, Q = F, ft = W;
  6277. switch (g) {
  6278. case ts:
  6279. ya(Y, $, ut, Q, ft);
  6280. break;
  6281. case es:
  6282. xa(Y, $, ut, Q, ft);
  6283. break;
  6284. case no:
  6285. xa(Y, $, ut, Q, ft), Aa(Q, ft, 0, ut, 1, 0);
  6286. break;
  6287. case cl:
  6288. mi(Y, $, ut, Q, ft);
  6289. break;
  6290. case ns:
  6291. Ut(Y, $, ut, Q, ft, 1);
  6292. break;
  6293. case ro:
  6294. Ut(Y, $, ut, Q, ft, 1), Aa(Q, ft, 0, ut, 1, 0);
  6295. break;
  6296. case rs:
  6297. Ut(Y, $, ut, Q, ft, 0);
  6298. break;
  6299. case is:
  6300. Ut(Y, $, ut, Q, ft, 0), Aa(Q, ft, 1, ut, 1, 0);
  6301. break;
  6302. case eo:
  6303. Wi(Y, $, ut, Q, ft);
  6304. break;
  6305. case io:
  6306. Wi(Y, $, ut, Q, ft), il(Q, ft, ut, 1, 0);
  6307. break;
  6308. case dl:
  6309. gi(Y, $, ut, Q, ft);
  6310. break;
  6311. default:
  6312. e(0);
  6313. }
  6314. A += L, W += et;
  6315. }
  6316. r.Ma += w;
  6317. } else alert("todo:EmitRescaledRowsYUVA");
  6318. e(r.Ma <= h.height);
  6319. }
  6320. }
  6321. r.C = o, e(r.C <= r.i);
  6322. }
  6323. function Gn(r) {
  6324. var o;
  6325. if (0 < r.ua) return 0;
  6326. for (o = 0; o < r.Wb; ++o) {
  6327. var h = r.Ya[o].G, g = r.Ya[o].H;
  6328. if (0 < h[1][g[1] + 0].g || 0 < h[2][g[2] + 0].g || 0 < h[3][g[3] + 0].g) return 0;
  6329. }
  6330. return 1;
  6331. }
  6332. function ir(r, o, h, g, b, w) {
  6333. if (r.Z != 0) {
  6334. var y = r.qd, A = r.rd;
  6335. for (e(Wr[r.Z] != null); o < h; ++o) Wr[r.Z](y, A, g, b, g, b, w), y = g, A = b, b += w;
  6336. r.qd = y, r.rd = A;
  6337. }
  6338. }
  6339. function Yn(r, o) {
  6340. var h = r.l.ma, g = h.Z == 0 || h.Z == 1 ? r.l.j : r.C;
  6341. if (g = r.C < g ? g : r.C, e(o <= r.l.o), o > g) {
  6342. var b = r.l.width, w = h.ca, y = h.tb + b * g, A = r.V, L = r.Ba + r.c * g, F = r.gc;
  6343. e(r.ab == 1), e(F[0].hc == 3), Qs(F[0], g, o, A, L, w, y), ir(h, g, o, w, y, b);
  6344. }
  6345. r.C = r.Ma = o;
  6346. }
  6347. function Jn(r, o, h, g, b, w, y) {
  6348. var A = r.$ / g, L = r.$ % g, F = r.m, W = r.s, et = h + r.$, C = et;
  6349. b = h + g * b;
  6350. var Y = h + g * w, $ = 280 + W.ua, ut = r.Pb ? A : 16777216, Q = 0 < W.ua ? W.Wa : null, ft = W.wc, pt = et < Y ? sn(W, L, A) : null;
  6351. e(r.C < w), e(Y <= b);
  6352. var xt = !1;
  6353. t: for (; ; ) {
  6354. for (; xt || et < Y; ) {
  6355. var bt = 0;
  6356. if (A >= ut) {
  6357. var Mt = et - h;
  6358. e((ut = r).Pb), ut.wd = ut.m, ut.xd = Mt, 0 < ut.s.ua && Lt(ut.s.Wa, ut.s.vb), ut = A + Gh;
  6359. }
  6360. if (L & ft || (pt = sn(W, L, A)), e(pt != null), pt.Qb && (o[et] = pt.qb, xt = !0), !xt) if (Z(F), pt.jc) {
  6361. bt = F, Mt = o;
  6362. var Pt = et, re = pt.pd[T(bt) & Ui - 1];
  6363. e(pt.jc), 256 > re.g ? (J(bt, bt.u + re.g), Mt[Pt] = re.value, bt = 0) : (J(bt, bt.u + re.g - 256), e(256 <= re.value), bt = re.value), bt == 0 && (xt = !0);
  6364. } else bt = De(pt.G[0], pt.H[0], F);
  6365. if (F.h) break;
  6366. if (xt || 256 > bt) {
  6367. if (!xt) if (pt.nd) o[et] = (pt.qb | bt << 8) >>> 0;
  6368. else {
  6369. if (Z(F), xt = De(pt.G[1], pt.H[1], F), Z(F), Mt = De(pt.G[2], pt.H[2], F), Pt = De(pt.G[3], pt.H[3], F), F.h) break;
  6370. o[et] = (Pt << 24 | xt << 16 | bt << 8 | Mt) >>> 0;
  6371. }
  6372. if (xt = !1, ++et, ++L >= g && (L = 0, ++A, y != null && A <= w && !(A % 16) && y(r, A), Q != null)) for (; C < et; ) bt = o[C++], Q.X[(506832829 * bt & 4294967295) >>> Q.Mb] = bt;
  6373. } else if (280 > bt) {
  6374. if (bt = Tn(bt - 256, F), Mt = De(pt.G[4], pt.H[4], F), Z(F), Mt = Dn(g, Mt = Tn(Mt, F)), F.h) break;
  6375. if (et - h < Mt || b - et < bt) break t;
  6376. for (Pt = 0; Pt < bt; ++Pt) o[et + Pt] = o[et + Pt - Mt];
  6377. for (et += bt, L += bt; L >= g; ) L -= g, ++A, y != null && A <= w && !(A % 16) && y(r, A);
  6378. if (e(et <= b), L & ft && (pt = sn(W, L, A)), Q != null) for (; C < et; ) bt = o[C++], Q.X[(506832829 * bt & 4294967295) >>> Q.Mb] = bt;
  6379. } else {
  6380. if (!(bt < $)) break t;
  6381. for (xt = bt - 280, e(Q != null); C < et; ) bt = o[C++], Q.X[(506832829 * bt & 4294967295) >>> Q.Mb] = bt;
  6382. bt = et, e(!(xt >>> (Mt = Q).Xa)), o[bt] = Mt.X[xt], xt = !0;
  6383. }
  6384. xt || e(F.h == H(F));
  6385. }
  6386. if (r.Pb && F.h && et < b) e(r.m.h), r.a = 5, r.m = r.wd, r.$ = r.xd, 0 < r.s.ua && Lt(r.s.vb, r.s.Wa);
  6387. else {
  6388. if (F.h) break t;
  6389. y != null && y(r, A > w ? w : A), r.a = 0, r.$ = et - h;
  6390. }
  6391. return 1;
  6392. }
  6393. return r.a = 3, 0;
  6394. }
  6395. function qn(r) {
  6396. e(r != null), r.vc = null, r.yc = null, r.Ya = null;
  6397. var o = r.Wa;
  6398. o != null && (o.X = null), r.vb = null, e(r != null);
  6399. }
  6400. function ei() {
  6401. var r = new Et();
  6402. return r == null ? null : (r.a = 0, r.xb = ml, ke("Predictor", "VP8LPredictors"), ke("Predictor", "VP8LPredictors_C"), ke("PredictorAdd", "VP8LPredictorsAdd"), ke("PredictorAdd", "VP8LPredictorsAdd_C"), Hi = he, pi = ne, ya = He, xa = ge, Wi = se, gi = oe, mi = je, R.VP8LMapColor32b = Ze, R.VP8LMapColor8b = fr, r);
  6403. }
  6404. function ar(r, o, h, g, b) {
  6405. var w = 1, y = [r], A = [o], L = g.m, F = g.s, W = null, et = 0;
  6406. t: for (; ; ) {
  6407. if (h) for (; w && wt(L, 1); ) {
  6408. var C = y, Y = A, $ = g, ut = 1, Q = $.m, ft = $.gc[$.ab], pt = wt(Q, 2);
  6409. if ($.Oc & 1 << pt) w = 0;
  6410. else {
  6411. switch ($.Oc |= 1 << pt, ft.hc = pt, ft.Ea = C[0], ft.nc = Y[0], ft.K = [null], ++$.ab, e(4 >= $.ab), pt) {
  6412. case 0:
  6413. case 1:
  6414. ft.b = wt(Q, 3) + 2, ut = ar(yt(ft.Ea, ft.b), yt(ft.nc, ft.b), 0, $, ft.K), ft.K = ft.K[0];
  6415. break;
  6416. case 3:
  6417. var xt, bt = wt(Q, 8) + 1, Mt = 16 < bt ? 0 : 4 < bt ? 1 : 2 < bt ? 2 : 3;
  6418. if (C[0] = yt(ft.Ea, Mt), ft.b = Mt, xt = ut = ar(bt, 1, 0, $, ft.K)) {
  6419. var Pt, re = bt, Ot = ft, ce = 1 << (8 >> Ot.b), tn = a(ce);
  6420. if (tn == null) xt = 0;
  6421. else {
  6422. var ie = Ot.K[0], jt = Ot.w;
  6423. for (tn[0] = Ot.K[0][0], Pt = 1; Pt < 1 * re; ++Pt) tn[Pt] = Wt(ie[jt + Pt], tn[Pt - 1]);
  6424. for (; Pt < 4 * ce; ++Pt) tn[Pt] = 0;
  6425. Ot.K[0] = null, Ot.K[0] = tn, xt = 1;
  6426. }
  6427. }
  6428. ut = xt;
  6429. break;
  6430. case 2:
  6431. break;
  6432. default:
  6433. e(0);
  6434. }
  6435. w = ut;
  6436. }
  6437. }
  6438. if (y = y[0], A = A[0], w && wt(L, 1) && !(w = 1 <= (et = wt(L, 4)) && 11 >= et)) {
  6439. g.a = 3;
  6440. break t;
  6441. }
  6442. var Nt;
  6443. if (Nt = w) e: {
  6444. var Ve, ee, pe, Ee = g, ln = y, _n = A, qe = et, gn = h, An = Ee.m, en = Ee.s, me = [null], we = 1, Ue = 0, ye = Vh[qe];
  6445. n: for (; ; ) {
  6446. if (gn && wt(An, 1)) {
  6447. var un = wt(An, 3) + 2, $n = yt(ln, un), Ge = yt(_n, un), Sn = $n * Ge;
  6448. if (!ar($n, Ge, 0, Ee, me)) break n;
  6449. for (me = me[0], en.xc = un, Ve = 0; Ve < Sn; ++Ve) {
  6450. var Ne = me[Ve] >> 8 & 65535;
  6451. me[Ve] = Ne, Ne >= we && (we = Ne + 1);
  6452. }
  6453. }
  6454. if (An.h) break n;
  6455. for (ee = 0; 5 > ee; ++ee) {
  6456. var nn = pl[ee];
  6457. !ee && 0 < qe && (nn += 1 << qe), Ue < nn && (Ue = nn);
  6458. }
  6459. var Cn = c(we * ye, z), Nn = we, En = c(Nn, rt);
  6460. if (En == null) var On = null;
  6461. else e(65536 >= Nn), On = En;
  6462. var kn = a(Ue);
  6463. if (On == null || kn == null || Cn == null) {
  6464. Ee.a = 1;
  6465. break n;
  6466. }
  6467. var jn = Cn;
  6468. for (Ve = pe = 0; Ve < we; ++Ve) {
  6469. var Fe = On[Ve], Bn = Fe.G, Zn = Fe.H, vi = 0, Fr = 1, hn = 0;
  6470. for (ee = 0; 5 > ee; ++ee) {
  6471. nn = pl[ee], Bn[ee] = jn, Zn[ee] = pe, !ee && 0 < qe && (nn += 1 << qe);
  6472. i: {
  6473. var ls, lo = nn, us = Ee, Sa = kn, df = jn, pf = pe, uo = 0, Vr = us.m, gf = wt(Vr, 1);
  6474. if (s(Sa, 0, 0, lo), gf) {
  6475. var mf = wt(Vr, 1) + 1, vf = wt(Vr, 1), Nl = wt(Vr, vf == 0 ? 1 : 8);
  6476. Sa[Nl] = 1, mf == 2 && (Sa[Nl = wt(Vr, 8)] = 1);
  6477. var hs = 1;
  6478. } else {
  6479. var Ll = a(19), Sl = wt(Vr, 4) + 4;
  6480. if (19 < Sl) {
  6481. us.a = 3;
  6482. var fs = 0;
  6483. break i;
  6484. }
  6485. for (ls = 0; ls < Sl; ++ls) Ll[Hh[ls]] = wt(Vr, 3);
  6486. var ho = void 0, ka = void 0, kl = us, bf = Ll, cs = lo, Pl = Sa, fo = 0, Gr = kl.m, Il = 8, Fl = c(128, z);
  6487. r: for (; E(Fl, 0, 7, bf, 19); ) {
  6488. if (wt(Gr, 1)) {
  6489. var wf = 2 + 2 * wt(Gr, 3);
  6490. if ((ho = 2 + wt(Gr, wf)) > cs) break r;
  6491. } else ho = cs;
  6492. for (ka = 0; ka < cs && ho--; ) {
  6493. Z(Gr);
  6494. var Cl = Fl[0 + (127 & T(Gr))];
  6495. J(Gr, Gr.u + Cl.g);
  6496. var Yi = Cl.value;
  6497. if (16 > Yi) Pl[ka++] = Yi, Yi != 0 && (Il = Yi);
  6498. else {
  6499. var yf = Yi == 16, El = Yi - 16, xf = Uh[El], Ol = wt(Gr, qh[El]) + xf;
  6500. if (ka + Ol > cs) break r;
  6501. for (var _f = yf ? Il : 0; 0 < Ol--; ) Pl[ka++] = _f;
  6502. }
  6503. }
  6504. fo = 1;
  6505. break r;
  6506. }
  6507. fo || (kl.a = 3), hs = fo;
  6508. }
  6509. (hs = hs && !Vr.h) && (uo = E(df, pf, 8, Sa, lo)), hs && uo != 0 ? fs = uo : (us.a = 3, fs = 0);
  6510. }
  6511. if (fs == 0) break n;
  6512. if (Fr && zh[ee] == 1 && (Fr = jn[pe].g == 0), vi += jn[pe].g, pe += fs, 3 >= ee) {
  6513. var Pa, co = kn[0];
  6514. for (Pa = 1; Pa < nn; ++Pa) kn[Pa] > co && (co = kn[Pa]);
  6515. hn += co;
  6516. }
  6517. }
  6518. if (Fe.nd = Fr, Fe.Qb = 0, Fr && (Fe.qb = (Bn[3][Zn[3] + 0].value << 24 | Bn[1][Zn[1] + 0].value << 16 | Bn[2][Zn[2] + 0].value) >>> 0, vi == 0 && 256 > Bn[0][Zn[0] + 0].value && (Fe.Qb = 1, Fe.qb += Bn[0][Zn[0] + 0].value << 8)), Fe.jc = !Fe.Qb && 6 > hn, Fe.jc) {
  6519. var ds, Cr = Fe;
  6520. for (ds = 0; ds < Ui; ++ds) {
  6521. var Yr = ds, Jr = Cr.pd[Yr], ps = Cr.G[0][Cr.H[0] + Yr];
  6522. 256 <= ps.value ? (Jr.g = ps.g + 256, Jr.value = ps.value) : (Jr.g = 0, Jr.value = 0, Yr >>= rn(ps, 8, Jr), Yr >>= rn(Cr.G[1][Cr.H[1] + Yr], 16, Jr), Yr >>= rn(Cr.G[2][Cr.H[2] + Yr], 0, Jr), rn(Cr.G[3][Cr.H[3] + Yr], 24, Jr));
  6523. }
  6524. }
  6525. }
  6526. en.vc = me, en.Wb = we, en.Ya = On, en.yc = Cn, Nt = 1;
  6527. break e;
  6528. }
  6529. Nt = 0;
  6530. }
  6531. if (!(w = Nt)) {
  6532. g.a = 3;
  6533. break t;
  6534. }
  6535. if (0 < et) {
  6536. if (F.ua = 1 << et, !P(F.Wa, et)) {
  6537. g.a = 1, w = 0;
  6538. break t;
  6539. }
  6540. } else F.ua = 0;
  6541. var po = g, jl = y, Af = A, go = po.s, mo = go.xc;
  6542. if (po.c = jl, po.i = Af, go.md = yt(jl, mo), go.wc = mo == 0 ? -1 : (1 << mo) - 1, h) {
  6543. g.xb = Qh;
  6544. break t;
  6545. }
  6546. if ((W = a(y * A)) == null) {
  6547. g.a = 1, w = 0;
  6548. break t;
  6549. }
  6550. w = (w = Jn(g, W, 0, y, A, A, null)) && !L.h;
  6551. break t;
  6552. }
  6553. return w ? (b != null ? b[0] = W : (e(W == null), e(h)), g.$ = 0, h || qn(F)) : qn(F), w;
  6554. }
  6555. function ni(r, o) {
  6556. var h = r.c * r.i, g = h + o + 16 * o;
  6557. return e(r.c <= o), r.V = a(g), r.V == null ? (r.Ta = null, r.Ua = 0, r.a = 1, 0) : (r.Ta = r.V, r.Ua = r.Ba + h + o, 1);
  6558. }
  6559. function Si(r, o) {
  6560. var h = r.C, g = o - h, b = r.V, w = r.Ba + r.c * h;
  6561. for (e(o <= r.l.o); 0 < g; ) {
  6562. var y = 16 < g ? 16 : g, A = r.l.ma, L = r.l.width, F = L * y, W = A.ca, et = A.tb + L * h, C = r.Ta, Y = r.Ua;
  6563. ti(r, y, b, w), sl(C, Y, W, et, F), ir(A, h, h + y, W, et, L), g -= y, b += y * r.c, h += y;
  6564. }
  6565. e(h == o), r.C = r.Ma = o;
  6566. }
  6567. function ki() {
  6568. this.ub = this.yd = this.td = this.Rb = 0;
  6569. }
  6570. function Pi() {
  6571. this.Kd = this.Ld = this.Ud = this.Td = this.i = this.c = 0;
  6572. }
  6573. function Bs() {
  6574. this.Fb = this.Bb = this.Cb = 0, this.Zb = a(4), this.Lb = a(4);
  6575. }
  6576. function sa() {
  6577. this.Yb = function() {
  6578. var r = [];
  6579. return function o(h, g, b) {
  6580. for (var w = b[g], y = 0; y < w && (h.push(b.length > g + 1 ? [] : 0), !(b.length < g + 1)); y++) o(h[y], g + 1, b);
  6581. }(r, 0, [3, 11]), r;
  6582. }();
  6583. }
  6584. function Ba() {
  6585. this.jb = a(3), this.Wc = l([4, 8], sa), this.Xc = l([4, 17], sa);
  6586. }
  6587. function Ma() {
  6588. this.Pc = this.wb = this.Tb = this.zd = 0, this.vd = new a(4), this.od = new a(4);
  6589. }
  6590. function Un() {
  6591. this.ld = this.La = this.dd = this.tc = 0;
  6592. }
  6593. function oa() {
  6594. this.Na = this.la = 0;
  6595. }
  6596. function Ra() {
  6597. this.Sc = [0, 0], this.Eb = [0, 0], this.Qc = [0, 0], this.ia = this.lc = 0;
  6598. }
  6599. function la() {
  6600. this.ad = a(384), this.Za = 0, this.Ob = a(16), this.$b = this.Ad = this.ia = this.Gc = this.Hc = this.Dd = 0;
  6601. }
  6602. function Ta() {
  6603. this.uc = this.M = this.Nb = 0, this.wa = Array(new Un()), this.Y = 0, this.ya = Array(new la()), this.aa = 0, this.l = new Ii();
  6604. }
  6605. function Da() {
  6606. this.y = a(16), this.f = a(8), this.ea = a(8);
  6607. }
  6608. function qa() {
  6609. this.cb = this.a = 0, this.sc = "", this.m = new x(), this.Od = new ki(), this.Kc = new Pi(), this.ed = new Ma(), this.Qa = new Bs(), this.Ic = this.$c = this.Aa = 0, this.D = new Ta(), this.Xb = this.Va = this.Hb = this.zb = this.yb = this.Ub = this.za = 0, this.Jc = c(8, x), this.ia = 0, this.pb = c(4, Ra), this.Pa = new Ba(), this.Bd = this.kc = 0, this.Ac = [], this.Bc = 0, this.zc = [0, 0, 0, 0], this.Gd = Array(new Da()), this.Hd = 0, this.rb = Array(new oa()), this.sb = 0, this.wa = Array(new Un()), this.Y = 0, this.oc = [], this.pc = 0, this.sa = [], this.ta = 0, this.qa = [], this.ra = 0, this.Ha = [], this.B = this.R = this.Ia = 0, this.Ec = [], this.M = this.ja = this.Vb = this.Fc = 0, this.ya = Array(new la()), this.L = this.aa = 0, this.gd = l([4, 2], Un), this.ga = null, this.Fa = [], this.Cc = this.qc = this.P = 0, this.Gb = [], this.Uc = 0, this.mb = [], this.nb = 0, this.rc = [], this.Ga = this.Vc = 0;
  6610. }
  6611. function sr(r, o) {
  6612. return 0 > r ? 0 : r > o ? o : r;
  6613. }
  6614. function Ii() {
  6615. this.T = this.U = this.ka = this.height = this.width = 0, this.y = [], this.f = [], this.ea = [], this.Rc = this.fa = this.W = this.N = this.O = 0, this.ma = "void", this.put = "VP8IoPutHook", this.ac = "VP8IoSetupHook", this.bc = "VP8IoTeardownHook", this.ha = this.Kb = 0, this.data = [], this.hb = this.ib = this.da = this.o = this.j = this.va = this.v = this.Da = this.ob = this.w = 0, this.F = [], this.J = 0;
  6616. }
  6617. function Ms() {
  6618. var r = new qa();
  6619. return r != null && (r.a = 0, r.sc = "OK", r.cb = 0, r.Xb = 0, Na || (Na = Fi)), r;
  6620. }
  6621. function Xe(r, o, h) {
  6622. return r.a == 0 && (r.a = o, r.sc = h, r.cb = 0), 0;
  6623. }
  6624. function Ua(r, o, h) {
  6625. return 3 <= h && r[o + 0] == 157 && r[o + 1] == 1 && r[o + 2] == 42;
  6626. }
  6627. function or(r, o) {
  6628. if (r == null) return 0;
  6629. if (r.a = 0, r.sc = "OK", o == null) return Xe(r, 2, "null VP8Io passed to VP8GetHeaders()");
  6630. var h = o.data, g = o.w, b = o.ha;
  6631. if (4 > b) return Xe(r, 7, "Truncated header.");
  6632. var w = h[g + 0] | h[g + 1] << 8 | h[g + 2] << 16, y = r.Od;
  6633. if (y.Rb = !(1 & w), y.td = w >> 1 & 7, y.yd = w >> 4 & 1, y.ub = w >> 5, 3 < y.td) return Xe(r, 3, "Incorrect keyframe parameters.");
  6634. if (!y.yd) return Xe(r, 4, "Frame not displayable.");
  6635. g += 3, b -= 3;
  6636. var A = r.Kc;
  6637. if (y.Rb) {
  6638. if (7 > b) return Xe(r, 7, "cannot parse picture header");
  6639. if (!Ua(h, g, b)) return Xe(r, 3, "Bad code word");
  6640. A.c = 16383 & (h[g + 4] << 8 | h[g + 3]), A.Td = h[g + 4] >> 6, A.i = 16383 & (h[g + 6] << 8 | h[g + 5]), A.Ud = h[g + 6] >> 6, g += 7, b -= 7, r.za = A.c + 15 >> 4, r.Ub = A.i + 15 >> 4, o.width = A.c, o.height = A.i, o.Da = 0, o.j = 0, o.v = 0, o.va = o.width, o.o = o.height, o.da = 0, o.ib = o.width, o.hb = o.height, o.U = o.width, o.T = o.height, s((w = r.Pa).jb, 0, 255, w.jb.length), e((w = r.Qa) != null), w.Cb = 0, w.Bb = 0, w.Fb = 1, s(w.Zb, 0, 0, w.Zb.length), s(w.Lb, 0, 0, w.Lb);
  6641. }
  6642. if (y.ub > b) return Xe(r, 7, "bad partition length");
  6643. ot(w = r.m, h, g, y.ub), g += y.ub, b -= y.ub, y.Rb && (A.Ld = st(w), A.Kd = st(w)), A = r.Qa;
  6644. var L, F = r.Pa;
  6645. if (e(w != null), e(A != null), A.Cb = st(w), A.Cb) {
  6646. if (A.Bb = st(w), st(w)) {
  6647. for (A.Fb = st(w), L = 0; 4 > L; ++L) A.Zb[L] = st(w) ? nt(w, 7) : 0;
  6648. for (L = 0; 4 > L; ++L) A.Lb[L] = st(w) ? nt(w, 6) : 0;
  6649. }
  6650. if (A.Bb) for (L = 0; 3 > L; ++L) F.jb[L] = st(w) ? ht(w, 8) : 255;
  6651. } else A.Bb = 0;
  6652. if (w.Ka) return Xe(r, 3, "cannot parse segment header");
  6653. if ((A = r.ed).zd = st(w), A.Tb = ht(w, 6), A.wb = ht(w, 3), A.Pc = st(w), A.Pc && st(w)) {
  6654. for (F = 0; 4 > F; ++F) st(w) && (A.vd[F] = nt(w, 6));
  6655. for (F = 0; 4 > F; ++F) st(w) && (A.od[F] = nt(w, 6));
  6656. }
  6657. if (r.L = A.Tb == 0 ? 0 : A.zd ? 1 : 2, w.Ka) return Xe(r, 3, "cannot parse filter header");
  6658. var W = b;
  6659. if (b = L = g, g = L + W, A = W, r.Xb = (1 << ht(r.m, 2)) - 1, W < 3 * (F = r.Xb)) h = 7;
  6660. else {
  6661. for (L += 3 * F, A -= 3 * F, W = 0; W < F; ++W) {
  6662. var et = h[b + 0] | h[b + 1] << 8 | h[b + 2] << 16;
  6663. et > A && (et = A), ot(r.Jc[+W], h, L, et), L += et, A -= et, b += 3;
  6664. }
  6665. ot(r.Jc[+F], h, L, A), h = L < g ? 0 : 5;
  6666. }
  6667. if (h != 0) return Xe(r, h, "cannot parse partitions");
  6668. for (h = ht(L = r.m, 7), b = st(L) ? nt(L, 4) : 0, g = st(L) ? nt(L, 4) : 0, A = st(L) ? nt(L, 4) : 0, F = st(L) ? nt(L, 4) : 0, L = st(L) ? nt(L, 4) : 0, W = r.Qa, et = 0; 4 > et; ++et) {
  6669. if (W.Cb) {
  6670. var C = W.Zb[et];
  6671. W.Fb || (C += h);
  6672. } else {
  6673. if (0 < et) {
  6674. r.pb[et] = r.pb[0];
  6675. continue;
  6676. }
  6677. C = h;
  6678. }
  6679. var Y = r.pb[et];
  6680. Y.Sc[0] = ao[sr(C + b, 127)], Y.Sc[1] = so[sr(C + 0, 127)], Y.Eb[0] = 2 * ao[sr(C + g, 127)], Y.Eb[1] = 101581 * so[sr(C + A, 127)] >> 16, 8 > Y.Eb[1] && (Y.Eb[1] = 8), Y.Qc[0] = ao[sr(C + F, 117)], Y.Qc[1] = so[sr(C + L, 127)], Y.lc = C + L;
  6681. }
  6682. if (!y.Rb) return Xe(r, 4, "Not a key frame.");
  6683. for (st(w), y = r.Pa, h = 0; 4 > h; ++h) {
  6684. for (b = 0; 8 > b; ++b) for (g = 0; 3 > g; ++g) for (A = 0; 11 > A; ++A) F = gt(w, $h[h][b][g][A]) ? ht(w, 8) : Kh[h][b][g][A], y.Wc[h][b].Yb[g][A] = F;
  6685. for (b = 0; 17 > b; ++b) y.Xc[h][b] = y.Wc[h][Zh[b]];
  6686. }
  6687. return r.kc = st(w), r.kc && (r.Bd = ht(w, 8)), r.cb = 1;
  6688. }
  6689. function Fi(r, o, h, g, b, w, y) {
  6690. var A = o[b].Yb[h];
  6691. for (h = 0; 16 > b; ++b) {
  6692. if (!gt(r, A[h + 0])) return b;
  6693. for (; !gt(r, A[h + 1]); ) if (A = o[++b].Yb[0], h = 0, b == 16) return 16;
  6694. var L = o[b + 1].Yb;
  6695. if (gt(r, A[h + 2])) {
  6696. var F = r, W = 0;
  6697. if (gt(F, (C = A)[(et = h) + 3])) if (gt(F, C[et + 6])) {
  6698. for (A = 0, et = 2 * (W = gt(F, C[et + 8])) + (C = gt(F, C[et + 9 + W])), W = 0, C = Yh[et]; C[A]; ++A) W += W + gt(F, C[A]);
  6699. W += 3 + (8 << et);
  6700. } else gt(F, C[et + 7]) ? (W = 7 + 2 * gt(F, 165), W += gt(F, 145)) : W = 5 + gt(F, 159);
  6701. else W = gt(F, C[et + 4]) ? 3 + gt(F, C[et + 5]) : 2;
  6702. A = L[2];
  6703. } else W = 1, A = L[1];
  6704. L = y + Jh[b], 0 > (F = r).b && at(F);
  6705. var et, C = F.b, Y = (et = F.Ca >> 1) - (F.I >> C) >> 31;
  6706. --F.b, F.Ca += Y, F.Ca |= 1, F.I -= (et + 1 & Y) << C, w[L] = ((W ^ Y) - Y) * g[(0 < b) + 0];
  6707. }
  6708. return 16;
  6709. }
  6710. function ua(r) {
  6711. var o = r.rb[r.sb - 1];
  6712. o.la = 0, o.Na = 0, s(r.zc, 0, 0, r.zc.length), r.ja = 0;
  6713. }
  6714. function In(r, o, h, g, b) {
  6715. b = r[o + h + 32 * g] + (b >> 3), r[o + h + 32 * g] = -256 & b ? 0 > b ? 0 : 255 : b;
  6716. }
  6717. function Ci(r, o, h, g, b, w) {
  6718. In(r, o, 0, h, g + b), In(r, o, 1, h, g + w), In(r, o, 2, h, g - w), In(r, o, 3, h, g - b);
  6719. }
  6720. function xr(r) {
  6721. return (20091 * r >> 16) + r;
  6722. }
  6723. function on(r, o, h, g) {
  6724. var b, w = 0, y = a(16);
  6725. for (b = 0; 4 > b; ++b) {
  6726. var A = r[o + 0] + r[o + 8], L = r[o + 0] - r[o + 8], F = (35468 * r[o + 4] >> 16) - xr(r[o + 12]), W = xr(r[o + 4]) + (35468 * r[o + 12] >> 16);
  6727. y[w + 0] = A + W, y[w + 1] = L + F, y[w + 2] = L - F, y[w + 3] = A - W, w += 4, o++;
  6728. }
  6729. for (b = w = 0; 4 > b; ++b) A = (r = y[w + 0] + 4) + y[w + 8], L = r - y[w + 8], F = (35468 * y[w + 4] >> 16) - xr(y[w + 12]), In(h, g, 0, 0, A + (W = xr(y[w + 4]) + (35468 * y[w + 12] >> 16))), In(h, g, 1, 0, L + F), In(h, g, 2, 0, L - F), In(h, g, 3, 0, A - W), w++, g += 32;
  6730. }
  6731. function za(r, o, h, g) {
  6732. var b = r[o + 0] + 4, w = 35468 * r[o + 4] >> 16, y = xr(r[o + 4]), A = 35468 * r[o + 1] >> 16;
  6733. Ci(h, g, 0, b + y, r = xr(r[o + 1]), A), Ci(h, g, 1, b + w, r, A), Ci(h, g, 2, b - w, r, A), Ci(h, g, 3, b - y, r, A);
  6734. }
  6735. function Rs(r, o, h, g, b) {
  6736. on(r, o, h, g), b && on(r, o + 16, h, g + 4);
  6737. }
  6738. function Ts(r, o, h, g) {
  6739. kr(r, o + 0, h, g, 1), kr(r, o + 32, h, g + 128, 1);
  6740. }
  6741. function Ds(r, o, h, g) {
  6742. var b;
  6743. for (r = r[o + 0] + 4, b = 0; 4 > b; ++b) for (o = 0; 4 > o; ++o) In(h, g, o, b, r);
  6744. }
  6745. function lr(r, o, h, g) {
  6746. r[o + 0] && pn(r, o + 0, h, g), r[o + 16] && pn(r, o + 16, h, g + 4), r[o + 32] && pn(r, o + 32, h, g + 128), r[o + 48] && pn(r, o + 48, h, g + 128 + 4);
  6747. }
  6748. function Ha(r, o, h, g) {
  6749. var b, w = a(16);
  6750. for (b = 0; 4 > b; ++b) {
  6751. var y = r[o + 0 + b] + r[o + 12 + b], A = r[o + 4 + b] + r[o + 8 + b], L = r[o + 4 + b] - r[o + 8 + b], F = r[o + 0 + b] - r[o + 12 + b];
  6752. w[0 + b] = y + A, w[8 + b] = y - A, w[4 + b] = F + L, w[12 + b] = F - L;
  6753. }
  6754. for (b = 0; 4 > b; ++b) y = (r = w[0 + 4 * b] + 3) + w[3 + 4 * b], A = w[1 + 4 * b] + w[2 + 4 * b], L = w[1 + 4 * b] - w[2 + 4 * b], F = r - w[3 + 4 * b], h[g + 0] = y + A >> 3, h[g + 16] = F + L >> 3, h[g + 32] = y - A >> 3, h[g + 48] = F - L >> 3, g += 64;
  6755. }
  6756. function Ei(r, o, h) {
  6757. var g, b = o - 32, w = Fn, y = 255 - r[b - 1];
  6758. for (g = 0; g < h; ++g) {
  6759. var A, L = w, F = y + r[o - 1];
  6760. for (A = 0; A < h; ++A) r[o + A] = L[F + r[b + A]];
  6761. o += 32;
  6762. }
  6763. }
  6764. function Oi(r, o) {
  6765. Ei(r, o, 4);
  6766. }
  6767. function ha(r, o) {
  6768. Ei(r, o, 8);
  6769. }
  6770. function qs(r, o) {
  6771. Ei(r, o, 16);
  6772. }
  6773. function Us(r, o) {
  6774. var h;
  6775. for (h = 0; 16 > h; ++h) i(r, o + 32 * h, r, o - 32, 16);
  6776. }
  6777. function zs(r, o) {
  6778. var h;
  6779. for (h = 16; 0 < h; --h) s(r, o, r[o - 1], 16), o += 32;
  6780. }
  6781. function Br(r, o, h) {
  6782. var g;
  6783. for (g = 0; 16 > g; ++g) s(o, h + 32 * g, r, 16);
  6784. }
  6785. function Wa(r, o) {
  6786. var h, g = 16;
  6787. for (h = 0; 16 > h; ++h) g += r[o - 1 + 32 * h] + r[o + h - 32];
  6788. Br(g >> 5, r, o);
  6789. }
  6790. function Mr(r, o) {
  6791. var h, g = 8;
  6792. for (h = 0; 16 > h; ++h) g += r[o - 1 + 32 * h];
  6793. Br(g >> 4, r, o);
  6794. }
  6795. function Hs(r, o) {
  6796. var h, g = 8;
  6797. for (h = 0; 16 > h; ++h) g += r[o + h - 32];
  6798. Br(g >> 4, r, o);
  6799. }
  6800. function ri(r, o) {
  6801. Br(128, r, o);
  6802. }
  6803. function Jt(r, o, h) {
  6804. return r + 2 * o + h + 2 >> 2;
  6805. }
  6806. function Ws(r, o) {
  6807. var h, g = o - 32;
  6808. for (g = new Uint8Array([Jt(r[g - 1], r[g + 0], r[g + 1]), Jt(r[g + 0], r[g + 1], r[g + 2]), Jt(r[g + 1], r[g + 2], r[g + 3]), Jt(r[g + 2], r[g + 3], r[g + 4])]), h = 0; 4 > h; ++h) i(r, o + 32 * h, g, 0, g.length);
  6809. }
  6810. function Vs(r, o) {
  6811. var h = r[o - 1], g = r[o - 1 + 32], b = r[o - 1 + 64], w = r[o - 1 + 96];
  6812. _t(r, o + 0, 16843009 * Jt(r[o - 1 - 32], h, g)), _t(r, o + 32, 16843009 * Jt(h, g, b)), _t(r, o + 64, 16843009 * Jt(g, b, w)), _t(r, o + 96, 16843009 * Jt(b, w, w));
  6813. }
  6814. function Gs(r, o) {
  6815. var h, g = 4;
  6816. for (h = 0; 4 > h; ++h) g += r[o + h - 32] + r[o - 1 + 32 * h];
  6817. for (g >>= 3, h = 0; 4 > h; ++h) s(r, o + 32 * h, g, 4);
  6818. }
  6819. function Ys(r, o) {
  6820. var h = r[o - 1 + 0], g = r[o - 1 + 32], b = r[o - 1 + 64], w = r[o - 1 - 32], y = r[o + 0 - 32], A = r[o + 1 - 32], L = r[o + 2 - 32], F = r[o + 3 - 32];
  6821. r[o + 0 + 96] = Jt(g, b, r[o - 1 + 96]), r[o + 1 + 96] = r[o + 0 + 64] = Jt(h, g, b), r[o + 2 + 96] = r[o + 1 + 64] = r[o + 0 + 32] = Jt(w, h, g), r[o + 3 + 96] = r[o + 2 + 64] = r[o + 1 + 32] = r[o + 0 + 0] = Jt(y, w, h), r[o + 3 + 64] = r[o + 2 + 32] = r[o + 1 + 0] = Jt(A, y, w), r[o + 3 + 32] = r[o + 2 + 0] = Jt(L, A, y), r[o + 3 + 0] = Jt(F, L, A);
  6822. }
  6823. function Js(r, o) {
  6824. var h = r[o + 1 - 32], g = r[o + 2 - 32], b = r[o + 3 - 32], w = r[o + 4 - 32], y = r[o + 5 - 32], A = r[o + 6 - 32], L = r[o + 7 - 32];
  6825. r[o + 0 + 0] = Jt(r[o + 0 - 32], h, g), r[o + 1 + 0] = r[o + 0 + 32] = Jt(h, g, b), r[o + 2 + 0] = r[o + 1 + 32] = r[o + 0 + 64] = Jt(g, b, w), r[o + 3 + 0] = r[o + 2 + 32] = r[o + 1 + 64] = r[o + 0 + 96] = Jt(b, w, y), r[o + 3 + 32] = r[o + 2 + 64] = r[o + 1 + 96] = Jt(w, y, A), r[o + 3 + 64] = r[o + 2 + 96] = Jt(y, A, L), r[o + 3 + 96] = Jt(A, L, L);
  6826. }
  6827. function _r(r, o) {
  6828. var h = r[o - 1 + 0], g = r[o - 1 + 32], b = r[o - 1 + 64], w = r[o - 1 - 32], y = r[o + 0 - 32], A = r[o + 1 - 32], L = r[o + 2 - 32], F = r[o + 3 - 32];
  6829. r[o + 0 + 0] = r[o + 1 + 64] = w + y + 1 >> 1, r[o + 1 + 0] = r[o + 2 + 64] = y + A + 1 >> 1, r[o + 2 + 0] = r[o + 3 + 64] = A + L + 1 >> 1, r[o + 3 + 0] = L + F + 1 >> 1, r[o + 0 + 96] = Jt(b, g, h), r[o + 0 + 64] = Jt(g, h, w), r[o + 0 + 32] = r[o + 1 + 96] = Jt(h, w, y), r[o + 1 + 32] = r[o + 2 + 96] = Jt(w, y, A), r[o + 2 + 32] = r[o + 3 + 96] = Jt(y, A, L), r[o + 3 + 32] = Jt(A, L, F);
  6830. }
  6831. function Ar(r, o) {
  6832. var h = r[o + 0 - 32], g = r[o + 1 - 32], b = r[o + 2 - 32], w = r[o + 3 - 32], y = r[o + 4 - 32], A = r[o + 5 - 32], L = r[o + 6 - 32], F = r[o + 7 - 32];
  6833. r[o + 0 + 0] = h + g + 1 >> 1, r[o + 1 + 0] = r[o + 0 + 64] = g + b + 1 >> 1, r[o + 2 + 0] = r[o + 1 + 64] = b + w + 1 >> 1, r[o + 3 + 0] = r[o + 2 + 64] = w + y + 1 >> 1, r[o + 0 + 32] = Jt(h, g, b), r[o + 1 + 32] = r[o + 0 + 96] = Jt(g, b, w), r[o + 2 + 32] = r[o + 1 + 96] = Jt(b, w, y), r[o + 3 + 32] = r[o + 2 + 96] = Jt(w, y, A), r[o + 3 + 64] = Jt(y, A, L), r[o + 3 + 96] = Jt(A, L, F);
  6834. }
  6835. function Ks(r, o) {
  6836. var h = r[o - 1 + 0], g = r[o - 1 + 32], b = r[o - 1 + 64], w = r[o - 1 + 96];
  6837. r[o + 0 + 0] = h + g + 1 >> 1, r[o + 2 + 0] = r[o + 0 + 32] = g + b + 1 >> 1, r[o + 2 + 32] = r[o + 0 + 64] = b + w + 1 >> 1, r[o + 1 + 0] = Jt(h, g, b), r[o + 3 + 0] = r[o + 1 + 32] = Jt(g, b, w), r[o + 3 + 32] = r[o + 1 + 64] = Jt(b, w, w), r[o + 3 + 64] = r[o + 2 + 64] = r[o + 0 + 96] = r[o + 1 + 96] = r[o + 2 + 96] = r[o + 3 + 96] = w;
  6838. }
  6839. function Xs(r, o) {
  6840. var h = r[o - 1 + 0], g = r[o - 1 + 32], b = r[o - 1 + 64], w = r[o - 1 + 96], y = r[o - 1 - 32], A = r[o + 0 - 32], L = r[o + 1 - 32], F = r[o + 2 - 32];
  6841. r[o + 0 + 0] = r[o + 2 + 32] = h + y + 1 >> 1, r[o + 0 + 32] = r[o + 2 + 64] = g + h + 1 >> 1, r[o + 0 + 64] = r[o + 2 + 96] = b + g + 1 >> 1, r[o + 0 + 96] = w + b + 1 >> 1, r[o + 3 + 0] = Jt(A, L, F), r[o + 2 + 0] = Jt(y, A, L), r[o + 1 + 0] = r[o + 3 + 32] = Jt(h, y, A), r[o + 1 + 32] = r[o + 3 + 64] = Jt(g, h, y), r[o + 1 + 64] = r[o + 3 + 96] = Jt(b, g, h), r[o + 1 + 96] = Jt(w, b, g);
  6842. }
  6843. function ji(r, o) {
  6844. var h;
  6845. for (h = 0; 8 > h; ++h) i(r, o + 32 * h, r, o - 32, 8);
  6846. }
  6847. function fa(r, o) {
  6848. var h;
  6849. for (h = 0; 8 > h; ++h) s(r, o, r[o - 1], 8), o += 32;
  6850. }
  6851. function ur(r, o, h) {
  6852. var g;
  6853. for (g = 0; 8 > g; ++g) s(o, h + 32 * g, r, 8);
  6854. }
  6855. function $s(r, o) {
  6856. var h, g = 8;
  6857. for (h = 0; 8 > h; ++h) g += r[o + h - 32] + r[o - 1 + 32 * h];
  6858. ur(g >> 4, r, o);
  6859. }
  6860. function Bi(r, o) {
  6861. var h, g = 4;
  6862. for (h = 0; 8 > h; ++h) g += r[o + h - 32];
  6863. ur(g >> 3, r, o);
  6864. }
  6865. function Zs(r, o) {
  6866. var h, g = 4;
  6867. for (h = 0; 8 > h; ++h) g += r[o - 1 + 32 * h];
  6868. ur(g >> 3, r, o);
  6869. }
  6870. function ca(r, o) {
  6871. ur(128, r, o);
  6872. }
  6873. function Rr(r, o, h) {
  6874. var g = r[o - h], b = r[o + 0], w = 3 * (b - g) + to[1020 + r[o - 2 * h] - r[o + h]], y = Qa[112 + (w + 4 >> 3)];
  6875. r[o - h] = Fn[255 + g + Qa[112 + (w + 3 >> 3)]], r[o + 0] = Fn[255 + b - y];
  6876. }
  6877. function da(r, o, h, g) {
  6878. var b = r[o + 0], w = r[o + h];
  6879. return Hn[255 + r[o - 2 * h] - r[o - h]] > g || Hn[255 + w - b] > g;
  6880. }
  6881. function ii(r, o, h, g) {
  6882. return 4 * Hn[255 + r[o - h] - r[o + 0]] + Hn[255 + r[o - 2 * h] - r[o + h]] <= g;
  6883. }
  6884. function pa(r, o, h, g, b) {
  6885. var w = r[o - 3 * h], y = r[o - 2 * h], A = r[o - h], L = r[o + 0], F = r[o + h], W = r[o + 2 * h], et = r[o + 3 * h];
  6886. return 4 * Hn[255 + A - L] + Hn[255 + y - F] > g ? 0 : Hn[255 + r[o - 4 * h] - w] <= b && Hn[255 + w - y] <= b && Hn[255 + y - A] <= b && Hn[255 + et - W] <= b && Hn[255 + W - F] <= b && Hn[255 + F - L] <= b;
  6887. }
  6888. function Mi(r, o, h, g) {
  6889. var b = 2 * g + 1;
  6890. for (g = 0; 16 > g; ++g) ii(r, o + g, h, b) && Rr(r, o + g, h);
  6891. }
  6892. function ga(r, o, h, g) {
  6893. var b = 2 * g + 1;
  6894. for (g = 0; 16 > g; ++g) ii(r, o + g * h, 1, b) && Rr(r, o + g * h, 1);
  6895. }
  6896. function Ri(r, o, h, g) {
  6897. var b;
  6898. for (b = 3; 0 < b; --b) Mi(r, o += 4 * h, h, g);
  6899. }
  6900. function Va(r, o, h, g) {
  6901. var b;
  6902. for (b = 3; 0 < b; --b) ga(r, o += 4, h, g);
  6903. }
  6904. function Nr(r, o, h, g, b, w, y, A) {
  6905. for (w = 2 * w + 1; 0 < b--; ) {
  6906. if (pa(r, o, h, w, y)) if (da(r, o, h, A)) Rr(r, o, h);
  6907. else {
  6908. var L = r, F = o, W = h, et = L[F - 2 * W], C = L[F - W], Y = L[F + 0], $ = L[F + W], ut = L[F + 2 * W], Q = 27 * (pt = to[1020 + 3 * (Y - C) + to[1020 + et - $]]) + 63 >> 7, ft = 18 * pt + 63 >> 7, pt = 9 * pt + 63 >> 7;
  6909. L[F - 3 * W] = Fn[255 + L[F - 3 * W] + pt], L[F - 2 * W] = Fn[255 + et + ft], L[F - W] = Fn[255 + C + Q], L[F + 0] = Fn[255 + Y - Q], L[F + W] = Fn[255 + $ - ft], L[F + 2 * W] = Fn[255 + ut - pt];
  6910. }
  6911. o += g;
  6912. }
  6913. }
  6914. function Lr(r, o, h, g, b, w, y, A) {
  6915. for (w = 2 * w + 1; 0 < b--; ) {
  6916. if (pa(r, o, h, w, y)) if (da(r, o, h, A)) Rr(r, o, h);
  6917. else {
  6918. var L = r, F = o, W = h, et = L[F - W], C = L[F + 0], Y = L[F + W], $ = Qa[112 + (4 + (ut = 3 * (C - et)) >> 3)], ut = Qa[112 + (ut + 3 >> 3)], Q = $ + 1 >> 1;
  6919. L[F - 2 * W] = Fn[255 + L[F - 2 * W] + Q], L[F - W] = Fn[255 + et + ut], L[F + 0] = Fn[255 + C - $], L[F + W] = Fn[255 + Y - Q];
  6920. }
  6921. o += g;
  6922. }
  6923. }
  6924. function Ga(r, o, h, g, b, w) {
  6925. Nr(r, o, h, 1, 16, g, b, w);
  6926. }
  6927. function Ya(r, o, h, g, b, w) {
  6928. Nr(r, o, 1, h, 16, g, b, w);
  6929. }
  6930. function Ja(r, o, h, g, b, w) {
  6931. var y;
  6932. for (y = 3; 0 < y; --y) Lr(r, o += 4 * h, h, 1, 16, g, b, w);
  6933. }
  6934. function ai(r, o, h, g, b, w) {
  6935. var y;
  6936. for (y = 3; 0 < y; --y) Lr(r, o += 4, 1, h, 16, g, b, w);
  6937. }
  6938. function Ka(r, o, h, g, b, w, y, A) {
  6939. Nr(r, o, b, 1, 8, w, y, A), Nr(h, g, b, 1, 8, w, y, A);
  6940. }
  6941. function u(r, o, h, g, b, w, y, A) {
  6942. Nr(r, o, 1, b, 8, w, y, A), Nr(h, g, 1, b, 8, w, y, A);
  6943. }
  6944. function v(r, o, h, g, b, w, y, A) {
  6945. Lr(r, o + 4 * b, b, 1, 8, w, y, A), Lr(h, g + 4 * b, b, 1, 8, w, y, A);
  6946. }
  6947. function I(r, o, h, g, b, w, y, A) {
  6948. Lr(r, o + 4, 1, b, 8, w, y, A), Lr(h, g + 4, 1, b, 8, w, y, A);
  6949. }
  6950. function D() {
  6951. this.ba = new le(), this.ec = [], this.cc = [], this.Mc = [], this.Dc = this.Nc = this.dc = this.fc = 0, this.Oa = new be(), this.memory = 0, this.Ib = "OutputFunc", this.Jb = "OutputAlphaFunc", this.Nd = "OutputRowFunc";
  6952. }
  6953. function K() {
  6954. this.data = [], this.offset = this.kd = this.ha = this.w = 0, this.na = [], this.xa = this.gb = this.Ja = this.Sa = this.P = 0;
  6955. }
  6956. function lt() {
  6957. this.nc = this.Ea = this.b = this.hc = 0, this.K = [], this.w = 0;
  6958. }
  6959. function mt() {
  6960. this.ua = 0, this.Wa = new ae(), this.vb = new ae(), this.md = this.xc = this.wc = 0, this.vc = [], this.Wb = 0, this.Ya = new rt(), this.yc = new z();
  6961. }
  6962. function Et() {
  6963. this.xb = this.a = 0, this.l = new Ii(), this.ca = new le(), this.V = [], this.Ba = 0, this.Ta = [], this.Ua = 0, this.m = new B(), this.Pb = 0, this.wd = new B(), this.Ma = this.$ = this.C = this.i = this.c = this.xd = 0, this.s = new mt(), this.ab = 0, this.gc = c(4, lt), this.Oc = 0;
  6964. }
  6965. function Ct() {
  6966. this.Lc = this.Z = this.$a = this.i = this.c = 0, this.l = new Ii(), this.ic = 0, this.ca = [], this.tb = 0, this.qd = null, this.rd = 0;
  6967. }
  6968. function Xt(r, o, h, g, b, w, y) {
  6969. for (r = r == null ? 0 : r[o + 0], o = 0; o < y; ++o) b[w + o] = r + h[g + o] & 255, r = b[w + o];
  6970. }
  6971. function te(r, o, h, g, b, w, y) {
  6972. var A;
  6973. if (r == null) Xt(null, null, h, g, b, w, y);
  6974. else for (A = 0; A < y; ++A) b[w + A] = r[o + A] + h[g + A] & 255;
  6975. }
  6976. function de(r, o, h, g, b, w, y) {
  6977. if (r == null) Xt(null, null, h, g, b, w, y);
  6978. else {
  6979. var A, L = r[o + 0], F = L, W = L;
  6980. for (A = 0; A < y; ++A) F = W + (L = r[o + A]) - F, W = h[g + A] + (-256 & F ? 0 > F ? 0 : 255 : F) & 255, F = L, b[w + A] = W;
  6981. }
  6982. }
  6983. function $e(r, o, h, g) {
  6984. var b = o.width, w = o.o;
  6985. if (e(r != null && o != null), 0 > h || 0 >= g || h + g > w) return null;
  6986. if (!r.Cc) {
  6987. if (r.ga == null) {
  6988. var y;
  6989. if (r.ga = new Ct(), (y = r.ga == null) || (y = o.width * o.o, e(r.Gb.length == 0), r.Gb = a(y), r.Uc = 0, r.Gb == null ? y = 0 : (r.mb = r.Gb, r.nb = r.Uc, r.rc = null, y = 1), y = !y), !y) {
  6990. y = r.ga;
  6991. var A = r.Fa, L = r.P, F = r.qc, W = r.mb, et = r.nb, C = L + 1, Y = F - 1, $ = y.l;
  6992. if (e(A != null && W != null && o != null), Wr[0] = null, Wr[1] = Xt, Wr[2] = te, Wr[3] = de, y.ca = W, y.tb = et, y.c = o.width, y.i = o.height, e(0 < y.c && 0 < y.i), 1 >= F) o = 0;
  6993. else if (y.$a = 3 & A[L + 0], y.Z = A[L + 0] >> 2 & 3, y.Lc = A[L + 0] >> 4 & 3, L = A[L + 0] >> 6 & 3, 0 > y.$a || 1 < y.$a || 4 <= y.Z || 1 < y.Lc || L) o = 0;
  6994. else if ($.put = Gt, $.ac = rr, $.bc = wr, $.ma = y, $.width = o.width, $.height = o.height, $.Da = o.Da, $.v = o.v, $.va = o.va, $.j = o.j, $.o = o.o, y.$a) t: {
  6995. e(y.$a == 1), o = ei();
  6996. e: for (; ; ) {
  6997. if (o == null) {
  6998. o = 0;
  6999. break t;
  7000. }
  7001. if (e(y != null), y.mc = o, o.c = y.c, o.i = y.i, o.l = y.l, o.l.ma = y, o.l.width = y.c, o.l.height = y.i, o.a = 0, ct(o.m, A, C, Y), !ar(y.c, y.i, 1, o, null) || (o.ab == 1 && o.gc[0].hc == 3 && Gn(o.s) ? (y.ic = 1, A = o.c * o.i, o.Ta = null, o.Ua = 0, o.V = a(A), o.Ba = 0, o.V == null ? (o.a = 1, o = 0) : o = 1) : (y.ic = 0, o = ni(o, y.c)), !o)) break e;
  7002. o = 1;
  7003. break t;
  7004. }
  7005. y.mc = null, o = 0;
  7006. }
  7007. else o = Y >= y.c * y.i;
  7008. y = !o;
  7009. }
  7010. if (y) return null;
  7011. r.ga.Lc != 1 ? r.Ga = 0 : g = w - h;
  7012. }
  7013. e(r.ga != null), e(h + g <= w);
  7014. t: {
  7015. if (o = (A = r.ga).c, w = A.l.o, A.$a == 0) {
  7016. if (C = r.rc, Y = r.Vc, $ = r.Fa, L = r.P + 1 + h * o, F = r.mb, W = r.nb + h * o, e(L <= r.P + r.qc), A.Z != 0) for (e(Wr[A.Z] != null), y = 0; y < g; ++y) Wr[A.Z](C, Y, $, L, F, W, o), C = F, Y = W, W += o, L += o;
  7017. else for (y = 0; y < g; ++y) i(F, W, $, L, o), C = F, Y = W, W += o, L += o;
  7018. r.rc = C, r.Vc = Y;
  7019. } else {
  7020. if (e(A.mc != null), o = h + g, e((y = A.mc) != null), e(o <= y.i), y.C >= o) o = 1;
  7021. else if (A.ic || Te(), A.ic) {
  7022. A = y.V, C = y.Ba, Y = y.c;
  7023. var ut = y.i, Q = ($ = 1, L = y.$ / Y, F = y.$ % Y, W = y.m, et = y.s, y.$), ft = Y * ut, pt = Y * o, xt = et.wc, bt = Q < pt ? sn(et, F, L) : null;
  7024. e(Q <= ft), e(o <= ut), e(Gn(et));
  7025. e: for (; ; ) {
  7026. for (; !W.h && Q < pt; ) {
  7027. if (F & xt || (bt = sn(et, F, L)), e(bt != null), Z(W), 256 > (ut = De(bt.G[0], bt.H[0], W))) A[C + Q] = ut, ++Q, ++F >= Y && (F = 0, ++L <= o && !(L % 16) && Yn(y, L));
  7028. else {
  7029. if (!(280 > ut)) {
  7030. $ = 0;
  7031. break e;
  7032. }
  7033. ut = Tn(ut - 256, W);
  7034. var Mt, Pt = De(bt.G[4], bt.H[4], W);
  7035. if (Z(W), !(Q >= (Pt = Dn(Y, Pt = Tn(Pt, W))) && ft - Q >= ut)) {
  7036. $ = 0;
  7037. break e;
  7038. }
  7039. for (Mt = 0; Mt < ut; ++Mt) A[C + Q + Mt] = A[C + Q + Mt - Pt];
  7040. for (Q += ut, F += ut; F >= Y; ) F -= Y, ++L <= o && !(L % 16) && Yn(y, L);
  7041. Q < pt && F & xt && (bt = sn(et, F, L));
  7042. }
  7043. e(W.h == H(W));
  7044. }
  7045. Yn(y, L > o ? o : L);
  7046. break e;
  7047. }
  7048. !$ || W.h && Q < ft ? ($ = 0, y.a = W.h ? 5 : 3) : y.$ = Q, o = $;
  7049. } else o = Jn(y, y.V, y.Ba, y.c, y.i, o, Si);
  7050. if (!o) {
  7051. g = 0;
  7052. break t;
  7053. }
  7054. }
  7055. h + g >= w && (r.Cc = 1), g = 1;
  7056. }
  7057. if (!g) return null;
  7058. if (r.Cc && ((g = r.ga) != null && (g.mc = null), r.ga = null, 0 < r.Ga)) return alert("todo:WebPDequantizeLevels"), null;
  7059. }
  7060. return r.nb + h * b;
  7061. }
  7062. function Ae(r, o, h, g, b, w) {
  7063. for (; 0 < b--; ) {
  7064. var y, A = r, L = o + (h ? 1 : 0), F = r, W = o + (h ? 0 : 3);
  7065. for (y = 0; y < g; ++y) {
  7066. var et = F[W + 4 * y];
  7067. et != 255 && (et *= 32897, A[L + 4 * y + 0] = A[L + 4 * y + 0] * et >> 23, A[L + 4 * y + 1] = A[L + 4 * y + 1] * et >> 23, A[L + 4 * y + 2] = A[L + 4 * y + 2] * et >> 23);
  7068. }
  7069. o += w;
  7070. }
  7071. }
  7072. function _e(r, o, h, g, b) {
  7073. for (; 0 < g--; ) {
  7074. var w;
  7075. for (w = 0; w < h; ++w) {
  7076. var y = r[o + 2 * w + 0], A = 15 & (F = r[o + 2 * w + 1]), L = 4369 * A, F = (240 & F | F >> 4) * L >> 16;
  7077. r[o + 2 * w + 0] = (240 & y | y >> 4) * L >> 16 & 240 | (15 & y | y << 4) * L >> 16 >> 4 & 15, r[o + 2 * w + 1] = 240 & F | A;
  7078. }
  7079. o += b;
  7080. }
  7081. }
  7082. function Ce(r, o, h, g, b, w, y, A) {
  7083. var L, F, W = 255;
  7084. for (F = 0; F < b; ++F) {
  7085. for (L = 0; L < g; ++L) {
  7086. var et = r[o + L];
  7087. w[y + 4 * L] = et, W &= et;
  7088. }
  7089. o += h, y += A;
  7090. }
  7091. return W != 255;
  7092. }
  7093. function Re(r, o, h, g, b) {
  7094. var w;
  7095. for (w = 0; w < b; ++w) h[g + w] = r[o + w] >> 8;
  7096. }
  7097. function Te() {
  7098. Aa = Ae, il = _e, al = Ce, sl = Re;
  7099. }
  7100. function cn(r, o, h) {
  7101. R[r] = function(g, b, w, y, A, L, F, W, et, C, Y, $, ut, Q, ft, pt, xt) {
  7102. var bt, Mt = xt - 1 >> 1, Pt = A[L + 0] | F[W + 0] << 16, re = et[C + 0] | Y[$ + 0] << 16;
  7103. e(g != null);
  7104. var Ot = 3 * Pt + re + 131074 >> 2;
  7105. for (o(g[b + 0], 255 & Ot, Ot >> 16, ut, Q), w != null && (Ot = 3 * re + Pt + 131074 >> 2, o(w[y + 0], 255 & Ot, Ot >> 16, ft, pt)), bt = 1; bt <= Mt; ++bt) {
  7106. var ce = A[L + bt] | F[W + bt] << 16, tn = et[C + bt] | Y[$ + bt] << 16, ie = Pt + ce + re + tn + 524296, jt = ie + 2 * (ce + re) >> 3;
  7107. Ot = jt + Pt >> 1, Pt = (ie = ie + 2 * (Pt + tn) >> 3) + ce >> 1, o(g[b + 2 * bt - 1], 255 & Ot, Ot >> 16, ut, Q + (2 * bt - 1) * h), o(g[b + 2 * bt - 0], 255 & Pt, Pt >> 16, ut, Q + (2 * bt - 0) * h), w != null && (Ot = ie + re >> 1, Pt = jt + tn >> 1, o(w[y + 2 * bt - 1], 255 & Ot, Ot >> 16, ft, pt + (2 * bt - 1) * h), o(w[y + 2 * bt + 0], 255 & Pt, Pt >> 16, ft, pt + (2 * bt + 0) * h)), Pt = ce, re = tn;
  7108. }
  7109. 1 & xt || (Ot = 3 * Pt + re + 131074 >> 2, o(g[b + xt - 1], 255 & Ot, Ot >> 16, ut, Q + (xt - 1) * h), w != null && (Ot = 3 * re + Pt + 131074 >> 2, o(w[y + xt - 1], 255 & Ot, Ot >> 16, ft, pt + (xt - 1) * h)));
  7110. };
  7111. }
  7112. function Sr() {
  7113. Wn[ts] = tf, Wn[es] = vl, Wn[cl] = ef, Wn[ns] = bl, Wn[rs] = wl, Wn[eo] = yl, Wn[dl] = nf, Wn[no] = vl, Wn[ro] = bl, Wn[is] = wl, Wn[io] = yl;
  7114. }
  7115. function ma(r) {
  7116. return r & -16384 ? 0 > r ? 0 : 255 : r >> rf;
  7117. }
  7118. function si(r, o) {
  7119. return ma((19077 * r >> 8) + (26149 * o >> 8) - 14234);
  7120. }
  7121. function oi(r, o, h) {
  7122. return ma((19077 * r >> 8) - (6419 * o >> 8) - (13320 * h >> 8) + 8708);
  7123. }
  7124. function Tr(r, o) {
  7125. return ma((19077 * r >> 8) + (33050 * o >> 8) - 17685);
  7126. }
  7127. function li(r, o, h, g, b) {
  7128. g[b + 0] = si(r, h), g[b + 1] = oi(r, o, h), g[b + 2] = Tr(r, o);
  7129. }
  7130. function Ti(r, o, h, g, b) {
  7131. g[b + 0] = Tr(r, o), g[b + 1] = oi(r, o, h), g[b + 2] = si(r, h);
  7132. }
  7133. function Di(r, o, h, g, b) {
  7134. var w = oi(r, o, h);
  7135. o = w << 3 & 224 | Tr(r, o) >> 3, g[b + 0] = 248 & si(r, h) | w >> 5, g[b + 1] = o;
  7136. }
  7137. function dn(r, o, h, g, b) {
  7138. var w = 240 & Tr(r, o) | 15;
  7139. g[b + 0] = 240 & si(r, h) | oi(r, o, h) >> 4, g[b + 1] = w;
  7140. }
  7141. function ui(r, o, h, g, b) {
  7142. g[b + 0] = 255, li(r, o, h, g, b + 1);
  7143. }
  7144. function hi(r, o, h, g, b) {
  7145. Ti(r, o, h, g, b), g[b + 3] = 255;
  7146. }
  7147. function va(r, o, h, g, b) {
  7148. li(r, o, h, g, b), g[b + 3] = 255;
  7149. }
  7150. function hr(r, o, h) {
  7151. R[r] = function(g, b, w, y, A, L, F, W, et) {
  7152. for (var C = W + (-2 & et) * h; W != C; ) o(g[b + 0], w[y + 0], A[L + 0], F, W), o(g[b + 1], w[y + 0], A[L + 0], F, W + h), b += 2, ++y, ++L, W += 2 * h;
  7153. 1 & et && o(g[b + 0], w[y + 0], A[L + 0], F, W);
  7154. };
  7155. }
  7156. function yn(r, o, h) {
  7157. return h == 0 ? r == 0 ? o == 0 ? 6 : 5 : o == 0 ? 4 : 0 : h;
  7158. }
  7159. function Xa(r, o, h, g, b) {
  7160. switch (r >>> 30) {
  7161. case 3:
  7162. kr(o, h, g, b, 0);
  7163. break;
  7164. case 2:
  7165. zr(o, h, g, b);
  7166. break;
  7167. case 1:
  7168. pn(o, h, g, b);
  7169. }
  7170. }
  7171. function qi(r, o) {
  7172. var h, g, b = o.M, w = o.Nb, y = r.oc, A = r.pc + 40, L = r.oc, F = r.pc + 584, W = r.oc, et = r.pc + 600;
  7173. for (h = 0; 16 > h; ++h) y[A + 32 * h - 1] = 129;
  7174. for (h = 0; 8 > h; ++h) L[F + 32 * h - 1] = 129, W[et + 32 * h - 1] = 129;
  7175. for (0 < b ? y[A - 1 - 32] = L[F - 1 - 32] = W[et - 1 - 32] = 129 : (s(y, A - 32 - 1, 127, 21), s(L, F - 32 - 1, 127, 9), s(W, et - 32 - 1, 127, 9)), g = 0; g < r.za; ++g) {
  7176. var C = o.ya[o.aa + g];
  7177. if (0 < g) {
  7178. for (h = -1; 16 > h; ++h) i(y, A + 32 * h - 4, y, A + 32 * h + 12, 4);
  7179. for (h = -1; 8 > h; ++h) i(L, F + 32 * h - 4, L, F + 32 * h + 4, 4), i(W, et + 32 * h - 4, W, et + 32 * h + 4, 4);
  7180. }
  7181. var Y = r.Gd, $ = r.Hd + g, ut = C.ad, Q = C.Hc;
  7182. if (0 < b && (i(y, A - 32, Y[$].y, 0, 16), i(L, F - 32, Y[$].f, 0, 8), i(W, et - 32, Y[$].ea, 0, 8)), C.Za) {
  7183. var ft = y, pt = A - 32 + 16;
  7184. for (0 < b && (g >= r.za - 1 ? s(ft, pt, Y[$].y[15], 4) : i(ft, pt, Y[$ + 1].y, 0, 4)), h = 0; 4 > h; h++) ft[pt + 128 + h] = ft[pt + 256 + h] = ft[pt + 384 + h] = ft[pt + 0 + h];
  7185. for (h = 0; 16 > h; ++h, Q <<= 2) ft = y, pt = A + _l[h], Xn[C.Ob[h]](ft, pt), Xa(Q, ut, 16 * +h, ft, pt);
  7186. } else if (ft = yn(g, b, C.Ob[0]), Hr[ft](y, A), Q != 0) for (h = 0; 16 > h; ++h, Q <<= 2) Xa(Q, ut, 16 * +h, y, A + _l[h]);
  7187. for (h = C.Gc, ft = yn(g, b, C.Dd), Ir[ft](L, F), Ir[ft](W, et), Q = ut, ft = L, pt = F, 255 & (C = 0 | h) && (170 & C ? Vi(Q, 256, ft, pt) : cr(Q, 256, ft, pt)), C = W, Q = et, 255 & (h >>= 8) && (170 & h ? Vi(ut, 320, C, Q) : cr(ut, 320, C, Q)), b < r.Ub - 1 && (i(Y[$].y, 0, y, A + 480, 16), i(Y[$].f, 0, L, F + 224, 8), i(Y[$].ea, 0, W, et + 224, 8)), h = 8 * w * r.B, Y = r.sa, $ = r.ta + 16 * g + 16 * w * r.R, ut = r.qa, C = r.ra + 8 * g + h, Q = r.Ha, ft = r.Ia + 8 * g + h, h = 0; 16 > h; ++h) i(Y, $ + h * r.R, y, A + 32 * h, 16);
  7188. for (h = 0; 8 > h; ++h) i(ut, C + h * r.B, L, F + 32 * h, 8), i(Q, ft + h * r.B, W, et + 32 * h, 8);
  7189. }
  7190. }
  7191. function $a(r, o, h, g, b, w, y, A, L) {
  7192. var F = [0], W = [0], et = 0, C = L != null ? L.kd : 0, Y = L != null ? L : new K();
  7193. if (r == null || 12 > h) return 7;
  7194. Y.data = r, Y.w = o, Y.ha = h, o = [o], h = [h], Y.gb = [Y.gb];
  7195. t: {
  7196. var $ = o, ut = h, Q = Y.gb;
  7197. if (e(r != null), e(ut != null), e(Q != null), Q[0] = 0, 12 <= ut[0] && !t(r, $[0], "RIFF")) {
  7198. if (t(r, $[0] + 8, "WEBP")) {
  7199. Q = 3;
  7200. break t;
  7201. }
  7202. var ft = Dt(r, $[0] + 4);
  7203. if (12 > ft || 4294967286 < ft) {
  7204. Q = 3;
  7205. break t;
  7206. }
  7207. if (C && ft > ut[0] - 8) {
  7208. Q = 7;
  7209. break t;
  7210. }
  7211. Q[0] = ft, $[0] += 12, ut[0] -= 12;
  7212. }
  7213. Q = 0;
  7214. }
  7215. if (Q != 0) return Q;
  7216. for (ft = 0 < Y.gb[0], h = h[0]; ; ) {
  7217. t: {
  7218. var pt = r;
  7219. ut = o, Q = h;
  7220. var xt = F, bt = W, Mt = $ = [0];
  7221. if ((Ot = et = [et])[0] = 0, 8 > Q[0]) Q = 7;
  7222. else {
  7223. if (!t(pt, ut[0], "VP8X")) {
  7224. if (Dt(pt, ut[0] + 4) != 10) {
  7225. Q = 3;
  7226. break t;
  7227. }
  7228. if (18 > Q[0]) {
  7229. Q = 7;
  7230. break t;
  7231. }
  7232. var Pt = Dt(pt, ut[0] + 8), re = 1 + St(pt, ut[0] + 12);
  7233. if (2147483648 <= re * (pt = 1 + St(pt, ut[0] + 15))) {
  7234. Q = 3;
  7235. break t;
  7236. }
  7237. Mt != null && (Mt[0] = Pt), xt != null && (xt[0] = re), bt != null && (bt[0] = pt), ut[0] += 18, Q[0] -= 18, Ot[0] = 1;
  7238. }
  7239. Q = 0;
  7240. }
  7241. }
  7242. if (et = et[0], $ = $[0], Q != 0) return Q;
  7243. if (ut = !!(2 & $), !ft && et) return 3;
  7244. if (w != null && (w[0] = !!(16 & $)), y != null && (y[0] = ut), A != null && (A[0] = 0), y = F[0], $ = W[0], et && ut && L == null) {
  7245. Q = 0;
  7246. break;
  7247. }
  7248. if (4 > h) {
  7249. Q = 7;
  7250. break;
  7251. }
  7252. if (ft && et || !ft && !et && !t(r, o[0], "ALPH")) {
  7253. h = [h], Y.na = [Y.na], Y.P = [Y.P], Y.Sa = [Y.Sa];
  7254. t: {
  7255. Pt = r, Q = o, ft = h;
  7256. var Ot = Y.gb;
  7257. xt = Y.na, bt = Y.P, Mt = Y.Sa, re = 22, e(Pt != null), e(ft != null), pt = Q[0];
  7258. var ce = ft[0];
  7259. for (e(xt != null), e(Mt != null), xt[0] = null, bt[0] = null, Mt[0] = 0; ; ) {
  7260. if (Q[0] = pt, ft[0] = ce, 8 > ce) {
  7261. Q = 7;
  7262. break t;
  7263. }
  7264. var tn = Dt(Pt, pt + 4);
  7265. if (4294967286 < tn) {
  7266. Q = 3;
  7267. break t;
  7268. }
  7269. var ie = 8 + tn + 1 & -2;
  7270. if (re += ie, 0 < Ot && re > Ot) {
  7271. Q = 3;
  7272. break t;
  7273. }
  7274. if (!t(Pt, pt, "VP8 ") || !t(Pt, pt, "VP8L")) {
  7275. Q = 0;
  7276. break t;
  7277. }
  7278. if (ce[0] < ie) {
  7279. Q = 7;
  7280. break t;
  7281. }
  7282. t(Pt, pt, "ALPH") || (xt[0] = Pt, bt[0] = pt + 8, Mt[0] = tn), pt += ie, ce -= ie;
  7283. }
  7284. }
  7285. if (h = h[0], Y.na = Y.na[0], Y.P = Y.P[0], Y.Sa = Y.Sa[0], Q != 0) break;
  7286. }
  7287. h = [h], Y.Ja = [Y.Ja], Y.xa = [Y.xa];
  7288. t: if (Ot = r, Q = o, ft = h, xt = Y.gb[0], bt = Y.Ja, Mt = Y.xa, Pt = Q[0], pt = !t(Ot, Pt, "VP8 "), re = !t(Ot, Pt, "VP8L"), e(Ot != null), e(ft != null), e(bt != null), e(Mt != null), 8 > ft[0]) Q = 7;
  7289. else {
  7290. if (pt || re) {
  7291. if (Ot = Dt(Ot, Pt + 4), 12 <= xt && Ot > xt - 12) {
  7292. Q = 3;
  7293. break t;
  7294. }
  7295. if (C && Ot > ft[0] - 8) {
  7296. Q = 7;
  7297. break t;
  7298. }
  7299. bt[0] = Ot, Q[0] += 8, ft[0] -= 8, Mt[0] = re;
  7300. } else Mt[0] = 5 <= ft[0] && Ot[Pt + 0] == 47 && !(Ot[Pt + 4] >> 5), bt[0] = ft[0];
  7301. Q = 0;
  7302. }
  7303. if (h = h[0], Y.Ja = Y.Ja[0], Y.xa = Y.xa[0], o = o[0], Q != 0) break;
  7304. if (4294967286 < Y.Ja) return 3;
  7305. if (A == null || ut || (A[0] = Y.xa ? 2 : 1), y = [y], $ = [$], Y.xa) {
  7306. if (5 > h) {
  7307. Q = 7;
  7308. break;
  7309. }
  7310. A = y, C = $, ut = w, r == null || 5 > h ? r = 0 : 5 <= h && r[o + 0] == 47 && !(r[o + 4] >> 5) ? (ft = [0], Ot = [0], xt = [0], ct(bt = new B(), r, o, h), yr(bt, ft, Ot, xt) ? (A != null && (A[0] = ft[0]), C != null && (C[0] = Ot[0]), ut != null && (ut[0] = xt[0]), r = 1) : r = 0) : r = 0;
  7311. } else {
  7312. if (10 > h) {
  7313. Q = 7;
  7314. break;
  7315. }
  7316. A = $, r == null || 10 > h || !Ua(r, o + 3, h - 3) ? r = 0 : (C = r[o + 0] | r[o + 1] << 8 | r[o + 2] << 16, ut = 16383 & (r[o + 7] << 8 | r[o + 6]), r = 16383 & (r[o + 9] << 8 | r[o + 8]), 1 & C || 3 < (C >> 1 & 7) || !(C >> 4 & 1) || C >> 5 >= Y.Ja || !ut || !r ? r = 0 : (y && (y[0] = ut), A && (A[0] = r), r = 1));
  7317. }
  7318. if (!r || (y = y[0], $ = $[0], et && (F[0] != y || W[0] != $))) return 3;
  7319. L != null && (L[0] = Y, L.offset = o - L.w, e(4294967286 > o - L.w), e(L.offset == L.ha - h));
  7320. break;
  7321. }
  7322. return Q == 0 || Q == 7 && et && L == null ? (w != null && (w[0] |= Y.na != null && 0 < Y.na.length), g != null && (g[0] = y), b != null && (b[0] = $), 0) : Q;
  7323. }
  7324. function zn(r, o, h) {
  7325. var g = o.width, b = o.height, w = 0, y = 0, A = g, L = b;
  7326. if (o.Da = r != null && 0 < r.Da, o.Da && (A = r.cd, L = r.bd, w = r.v, y = r.j, 11 > h || (w &= -2, y &= -2), 0 > w || 0 > y || 0 >= A || 0 >= L || w + A > g || y + L > b)) return 0;
  7327. if (o.v = w, o.j = y, o.va = w + A, o.o = y + L, o.U = A, o.T = L, o.da = r != null && 0 < r.da, o.da) {
  7328. if (!Ht(A, L, h = [r.ib], w = [r.hb])) return 0;
  7329. o.ib = h[0], o.hb = w[0];
  7330. }
  7331. return o.ob = r != null && r.ob, o.Kb = r == null || !r.Sd, o.da && (o.ob = o.ib < 3 * g / 4 && o.hb < 3 * b / 4, o.Kb = 0), 1;
  7332. }
  7333. function fi(r) {
  7334. if (r == null) return 2;
  7335. if (11 > r.S) {
  7336. var o = r.f.RGBA;
  7337. o.fb += (r.height - 1) * o.A, o.A = -o.A;
  7338. } else o = r.f.kb, r = r.height, o.O += (r - 1) * o.fa, o.fa = -o.fa, o.N += (r - 1 >> 1) * o.Ab, o.Ab = -o.Ab, o.W += (r - 1 >> 1) * o.Db, o.Db = -o.Db, o.F != null && (o.J += (r - 1) * o.lb, o.lb = -o.lb);
  7339. return 0;
  7340. }
  7341. function ba(r, o, h, g) {
  7342. if (g == null || 0 >= r || 0 >= o) return 2;
  7343. if (h != null) {
  7344. if (h.Da) {
  7345. var b = h.cd, w = h.bd, y = -2 & h.v, A = -2 & h.j;
  7346. if (0 > y || 0 > A || 0 >= b || 0 >= w || y + b > r || A + w > o) return 2;
  7347. r = b, o = w;
  7348. }
  7349. if (h.da) {
  7350. if (!Ht(r, o, b = [h.ib], w = [h.hb])) return 2;
  7351. r = b[0], o = w[0];
  7352. }
  7353. }
  7354. g.width = r, g.height = o;
  7355. t: {
  7356. var L = g.width, F = g.height;
  7357. if (r = g.S, 0 >= L || 0 >= F || !(r >= ts && 13 > r)) r = 2;
  7358. else {
  7359. if (0 >= g.Rd && g.sd == null) {
  7360. y = w = b = o = 0;
  7361. var W = (A = L * Al[r]) * F;
  7362. if (11 > r || (w = (F + 1) / 2 * (o = (L + 1) / 2), r == 12 && (y = (b = L) * F)), (F = a(W + 2 * w + y)) == null) {
  7363. r = 1;
  7364. break t;
  7365. }
  7366. g.sd = F, 11 > r ? ((L = g.f.RGBA).eb = F, L.fb = 0, L.A = A, L.size = W) : ((L = g.f.kb).y = F, L.O = 0, L.fa = A, L.Fd = W, L.f = F, L.N = 0 + W, L.Ab = o, L.Cd = w, L.ea = F, L.W = 0 + W + w, L.Db = o, L.Ed = w, r == 12 && (L.F = F, L.J = 0 + W + 2 * w), L.Tc = y, L.lb = b);
  7367. }
  7368. if (o = 1, b = g.S, w = g.width, y = g.height, b >= ts && 13 > b) if (11 > b) r = g.f.RGBA, o &= (A = Math.abs(r.A)) * (y - 1) + w <= r.size, o &= A >= w * Al[b], o &= r.eb != null;
  7369. else {
  7370. r = g.f.kb, A = (w + 1) / 2, W = (y + 1) / 2, L = Math.abs(r.fa), F = Math.abs(r.Ab);
  7371. var et = Math.abs(r.Db), C = Math.abs(r.lb), Y = C * (y - 1) + w;
  7372. o &= L * (y - 1) + w <= r.Fd, o &= F * (W - 1) + A <= r.Cd, o = (o &= et * (W - 1) + A <= r.Ed) & L >= w & F >= A & et >= A, o &= r.y != null, o &= r.f != null, o &= r.ea != null, b == 12 && (o &= C >= w, o &= Y <= r.Tc, o &= r.F != null);
  7373. }
  7374. else o = 0;
  7375. r = o ? 0 : 2;
  7376. }
  7377. }
  7378. return r != 0 || h != null && h.fd && (r = fi(g)), r;
  7379. }
  7380. var Ui = 64, ci = [0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535, 131071, 262143, 524287, 1048575, 2097151, 4194303, 8388607, 16777215], wa = 24, xn = 32, Ln = 8, zi = [0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7];
  7381. It("Predictor0", "PredictorAdd0"), R.Predictor0 = function() {
  7382. return 4278190080;
  7383. }, R.Predictor1 = function(r) {
  7384. return r;
  7385. }, R.Predictor2 = function(r, o, h) {
  7386. return o[h + 0];
  7387. }, R.Predictor3 = function(r, o, h) {
  7388. return o[h + 1];
  7389. }, R.Predictor4 = function(r, o, h) {
  7390. return o[h - 1];
  7391. }, R.Predictor5 = function(r, o, h) {
  7392. return qt(qt(r, o[h + 1]), o[h + 0]);
  7393. }, R.Predictor6 = function(r, o, h) {
  7394. return qt(r, o[h - 1]);
  7395. }, R.Predictor7 = function(r, o, h) {
  7396. return qt(r, o[h + 0]);
  7397. }, R.Predictor8 = function(r, o, h) {
  7398. return qt(o[h - 1], o[h + 0]);
  7399. }, R.Predictor9 = function(r, o, h) {
  7400. return qt(o[h + 0], o[h + 1]);
  7401. }, R.Predictor10 = function(r, o, h) {
  7402. return qt(qt(r, o[h - 1]), qt(o[h + 0], o[h + 1]));
  7403. }, R.Predictor11 = function(r, o, h) {
  7404. var g = o[h + 0];
  7405. return 0 >= Zt(g >> 24 & 255, r >> 24 & 255, (o = o[h - 1]) >> 24 & 255) + Zt(g >> 16 & 255, r >> 16 & 255, o >> 16 & 255) + Zt(g >> 8 & 255, r >> 8 & 255, o >> 8 & 255) + Zt(255 & g, 255 & r, 255 & o) ? g : r;
  7406. }, R.Predictor12 = function(r, o, h) {
  7407. var g = o[h + 0];
  7408. return (ve((r >> 24 & 255) + (g >> 24 & 255) - ((o = o[h - 1]) >> 24 & 255)) << 24 | ve((r >> 16 & 255) + (g >> 16 & 255) - (o >> 16 & 255)) << 16 | ve((r >> 8 & 255) + (g >> 8 & 255) - (o >> 8 & 255)) << 8 | ve((255 & r) + (255 & g) - (255 & o))) >>> 0;
  7409. }, R.Predictor13 = function(r, o, h) {
  7410. var g = o[h - 1];
  7411. return (ue((r = qt(r, o[h + 0])) >> 24 & 255, g >> 24 & 255) << 24 | ue(r >> 16 & 255, g >> 16 & 255) << 16 | ue(r >> 8 & 255, g >> 8 & 255) << 8 | ue(255 & r, 255 & g)) >>> 0;
  7412. };
  7413. var Dr = R.PredictorAdd0;
  7414. R.PredictorAdd1 = fe, It("Predictor2", "PredictorAdd2"), It("Predictor3", "PredictorAdd3"), It("Predictor4", "PredictorAdd4"), It("Predictor5", "PredictorAdd5"), It("Predictor6", "PredictorAdd6"), It("Predictor7", "PredictorAdd7"), It("Predictor8", "PredictorAdd8"), It("Predictor9", "PredictorAdd9"), It("Predictor10", "PredictorAdd10"), It("Predictor11", "PredictorAdd11"), It("Predictor12", "PredictorAdd12"), It("Predictor13", "PredictorAdd13");
  7415. var qr = R.PredictorAdd2;
  7416. Rt("ColorIndexInverseTransform", "MapARGB", "32b", function(r) {
  7417. return r >> 8 & 255;
  7418. }, function(r) {
  7419. return r;
  7420. }), Rt("VP8LColorIndexInverseTransformAlpha", "MapAlpha", "8b", function(r) {
  7421. return r;
  7422. }, function(r) {
  7423. return r >> 8 & 255;
  7424. });
  7425. var Hi, di = R.ColorIndexInverseTransform, Ze = R.MapARGB, Qs = R.VP8LColorIndexInverseTransformAlpha, fr = R.MapAlpha, Kn = R.VP8LPredictorsAdd = [];
  7426. Kn.length = 16, (R.VP8LPredictors = []).length = 16, (R.VP8LPredictorsAdd_C = []).length = 16, (R.VP8LPredictors_C = []).length = 16;
  7427. var pi, ya, xa, Wi, gi, mi, Ur, kr, zr, Vi, pn, cr, Pe, Ie, We, Qe, Pr, _a, Gi, Za, tl, el, nl, rl, Aa, il, al, sl, ol = a(511), ll = a(2041), ul = a(225), hl = a(767), fl = 0, to = ll, Qa = ul, Fn = hl, Hn = ol, ts = 0, es = 1, cl = 2, ns = 3, rs = 4, eo = 5, dl = 6, no = 7, ro = 8, is = 9, io = 10, qh = [2, 3, 7], Uh = [3, 3, 11], pl = [280, 256, 256, 256, 40], zh = [0, 1, 1, 1, 0], Hh = [17, 18, 0, 1, 2, 3, 4, 5, 16, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], Wh = [24, 7, 23, 25, 40, 6, 39, 41, 22, 26, 38, 42, 56, 5, 55, 57, 21, 27, 54, 58, 37, 43, 72, 4, 71, 73, 20, 28, 53, 59, 70, 74, 36, 44, 88, 69, 75, 52, 60, 3, 87, 89, 19, 29, 86, 90, 35, 45, 68, 76, 85, 91, 51, 61, 104, 2, 103, 105, 18, 30, 102, 106, 34, 46, 84, 92, 67, 77, 101, 107, 50, 62, 120, 1, 119, 121, 83, 93, 17, 31, 100, 108, 66, 78, 118, 122, 33, 47, 117, 123, 49, 63, 99, 109, 82, 94, 0, 116, 124, 65, 79, 16, 32, 98, 110, 48, 115, 125, 81, 95, 64, 114, 126, 97, 111, 80, 113, 127, 96, 112], Vh = [2954, 2956, 2958, 2962, 2970, 2986, 3018, 3082, 3212, 3468, 3980, 5004], Gh = 8, ao = [4, 5, 6, 7, 8, 9, 10, 10, 11, 12, 13, 14, 15, 16, 17, 17, 18, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 25, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 91, 93, 95, 96, 98, 100, 101, 102, 104, 106, 108, 110, 112, 114, 116, 118, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 143, 145, 148, 151, 154, 157], so = [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 119, 122, 125, 128, 131, 134, 137, 140, 143, 146, 149, 152, 155, 158, 161, 164, 167, 170, 173, 177, 181, 185, 189, 193, 197, 201, 205, 209, 213, 217, 221, 225, 229, 234, 239, 245, 249, 254, 259, 264, 269, 274, 279, 284], Na = null, Yh = [[173, 148, 140, 0], [176, 155, 140, 135, 0], [180, 157, 141, 134, 130, 0], [254, 254, 243, 230, 196, 177, 153, 140, 133, 130, 129, 0]], Jh = [0, 1, 4, 8, 5, 2, 3, 6, 9, 12, 13, 10, 7, 11, 14, 15], gl = [-0, 1, -1, 2, -2, 3, 4, 6, -3, 5, -4, -5, -6, 7, -7, 8, -8, -9], Kh = [[[[128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128], [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128], [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]], [[253, 136, 254, 255, 228, 219, 128, 128, 128, 128, 128], [189, 129, 242, 255, 227, 213, 255, 219, 128, 128, 128], [106, 126, 227, 252, 214, 209, 255, 255, 128, 128, 128]], [[1, 98, 248, 255, 236, 226, 255, 255, 128, 128, 128], [181, 133, 238, 254, 221, 234, 255, 154, 128, 128, 128], [78, 134, 202, 247, 198, 180, 255, 219, 128, 128, 128]], [[1, 185, 249, 255, 243, 255, 128, 128, 128, 128, 128], [184, 150, 247, 255, 236, 224, 128, 128, 128, 128, 128], [77, 110, 216, 255, 236, 230, 128, 128, 128, 128, 128]], [[1, 101, 251, 255, 241, 255, 128, 128, 128, 128, 128], [170, 139, 241, 252, 236, 209, 255, 255, 128, 128, 128], [37, 116, 196, 243, 228, 255, 255, 255, 128, 128, 128]], [[1, 204, 254, 255, 245, 255, 128, 128, 128, 128, 128], [207, 160, 250, 255, 238, 128, 128, 128, 128, 128, 128], [102, 103, 231, 255, 211, 171, 128, 128, 128, 128, 128]], [[1, 152, 252, 255, 240, 255, 128, 128, 128, 128, 128], [177, 135, 243, 255, 234, 225, 128, 128, 128, 128, 128], [80, 129, 211, 255, 194, 224, 128, 128, 128, 128, 128]], [[1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128], [246, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128], [255, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]]], [[[198, 35, 237, 223, 193, 187, 162, 160, 145, 155, 62], [131, 45, 198, 221, 172, 176, 220, 157, 252, 221, 1], [68, 47, 146, 208, 149, 167, 221, 162, 255, 223, 128]], [[1, 149, 241, 255, 221, 224, 255, 255, 128, 128, 128], [184, 141, 234, 253, 222, 220, 255, 199, 128, 128, 128], [81, 99, 181, 242, 176, 190, 249, 202, 255, 255, 128]], [[1, 129, 232, 253, 214, 197, 242, 196, 255, 255, 128], [99, 121, 210, 250, 201, 198, 255, 202, 128, 128, 128], [23, 91, 163, 242, 170, 187, 247, 210, 255, 255, 128]], [[1, 200, 246, 255, 234, 255, 128, 128, 128, 128, 128], [109, 178, 241, 255, 231, 245, 255, 255, 128, 128, 128], [44, 130, 201, 253, 205, 192, 255, 255, 128, 128, 128]], [[1, 132, 239, 251, 219, 209, 255, 165, 128, 128, 128], [94, 136, 225, 251, 218, 190, 255, 255, 128, 128, 128], [22, 100, 174, 245, 186, 161, 255, 199, 128, 128, 128]], [[1, 182, 249, 255, 232, 235, 128, 128, 128, 128, 128], [124, 143, 241, 255, 227, 234, 128, 128, 128, 128, 128], [35, 77, 181, 251, 193, 211, 255, 205, 128, 128, 128]], [[1, 157, 247, 255, 236, 231, 255, 255, 128, 128, 128], [121, 141, 235, 255, 225, 227, 255, 255, 128, 128, 128], [45, 99, 188, 251, 195, 217, 255, 224, 128, 128, 128]], [[1, 1, 251, 255, 213, 255, 128, 128, 128, 128, 128], [203, 1, 248, 255, 255, 128, 128, 128, 128, 128, 128], [137, 1, 177, 255, 224, 255, 128, 128, 128, 128, 128]]], [[[253, 9, 248, 251, 207, 208, 255, 192, 128, 128, 128], [175, 13, 224, 243, 193, 185, 249, 198, 255, 255, 128], [73, 17, 171, 221, 161, 179, 236, 167, 255, 234, 128]], [[1, 95, 247, 253, 212, 183, 255, 255, 128, 128, 128], [239, 90, 244, 250, 211, 209, 255, 255, 128, 128, 128], [155, 77, 195, 248, 188, 195, 255, 255, 128, 128, 128]], [[1, 24, 239, 251, 218, 219, 255, 205, 128, 128, 128], [201, 51, 219, 255, 196, 186, 128, 128, 128, 128, 128], [69, 46, 190, 239, 201, 218, 255, 228, 128, 128, 128]], [[1, 191, 251, 255, 255, 128, 128, 128, 128, 128, 128], [223, 165, 249, 255, 213, 255, 128, 128, 128, 128, 128], [141, 124, 248, 255, 255, 128, 128, 128, 128, 128, 128]], [[1, 16, 248, 255, 255, 128, 128, 128, 128, 128, 128], [190, 36, 230, 255, 236, 255, 128, 128, 128, 128, 128], [149, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128]], [[1, 226, 255, 128, 128, 128, 128, 128, 128, 128, 128], [247, 192, 255, 128, 128, 128, 128, 128, 128, 128, 128], [240, 128, 255, 128, 128, 128, 128, 128, 128, 128, 128]], [[1, 134, 252, 255, 255, 128, 128, 128, 128, 128, 128], [213, 62, 250, 255, 255, 128, 128, 128, 128, 128, 128], [55, 93, 255, 128, 128, 128, 128, 128, 128, 128, 128]], [[128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128], [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128], [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]]], [[[202, 24, 213, 235, 186, 191, 220, 160, 240, 175, 255], [126, 38, 182, 232, 169, 184, 228, 174, 255, 187, 128], [61, 46, 138, 219, 151, 178, 240, 170, 255, 216, 128]], [[1, 112, 230, 250, 199, 191, 247, 159, 255, 255, 128], [166, 109, 228, 252, 211, 215, 255, 174, 128, 128, 128], [39, 77, 162, 232, 172, 180, 245, 178, 255, 255, 128]], [[1, 52, 220, 246, 198, 199, 249, 220, 255, 255, 128], [124, 74, 191, 243, 183, 193, 250, 221, 255, 255, 128], [24, 71, 130, 219, 154, 170, 243, 182, 255, 255, 128]], [[1, 182, 225, 249, 219, 240, 255, 224, 128, 128, 128], [149, 150, 226, 252, 216, 205, 255, 171, 128, 128, 128], [28, 108, 170, 242, 183, 194, 254, 223, 255, 255, 128]], [[1, 81, 230, 252, 204, 203, 255, 192, 128, 128, 128], [123, 102, 209, 247, 188, 196, 255, 233, 128, 128, 128], [20, 95, 153, 243, 164, 173, 255, 203, 128, 128, 128]], [[1, 222, 248, 255, 216, 213, 128, 128, 128, 128, 128], [168, 175, 246, 252, 235, 205, 255, 255, 128, 128, 128], [47, 116, 215, 255, 211, 212, 255, 255, 128, 128, 128]], [[1, 121, 236, 253, 212, 214, 255, 255, 128, 128, 128], [141, 84, 213, 252, 201, 202, 255, 219, 128, 128, 128], [42, 80, 160, 240, 162, 185, 255, 205, 128, 128, 128]], [[1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128], [244, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128], [238, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128]]]], Xh = [[[231, 120, 48, 89, 115, 113, 120, 152, 112], [152, 179, 64, 126, 170, 118, 46, 70, 95], [175, 69, 143, 80, 85, 82, 72, 155, 103], [56, 58, 10, 171, 218, 189, 17, 13, 152], [114, 26, 17, 163, 44, 195, 21, 10, 173], [121, 24, 80, 195, 26, 62, 44, 64, 85], [144, 71, 10, 38, 171, 213, 144, 34, 26], [170, 46, 55, 19, 136, 160, 33, 206, 71], [63, 20, 8, 114, 114, 208, 12, 9, 226], [81, 40, 11, 96, 182, 84, 29, 16, 36]], [[134, 183, 89, 137, 98, 101, 106, 165, 148], [72, 187, 100, 130, 157, 111, 32, 75, 80], [66, 102, 167, 99, 74, 62, 40, 234, 128], [41, 53, 9, 178, 241, 141, 26, 8, 107], [74, 43, 26, 146, 73, 166, 49, 23, 157], [65, 38, 105, 160, 51, 52, 31, 115, 128], [104, 79, 12, 27, 217, 255, 87, 17, 7], [87, 68, 71, 44, 114, 51, 15, 186, 23], [47, 41, 14, 110, 182, 183, 21, 17, 194], [66, 45, 25, 102, 197, 189, 23, 18, 22]], [[88, 88, 147, 150, 42, 46, 45, 196, 205], [43, 97, 183, 117, 85, 38, 35, 179, 61], [39, 53, 200, 87, 26, 21, 43, 232, 171], [56, 34, 51, 104, 114, 102, 29, 93, 77], [39, 28, 85, 171, 58, 165, 90, 98, 64], [34, 22, 116, 206, 23, 34, 43, 166, 73], [107, 54, 32, 26, 51, 1, 81, 43, 31], [68, 25, 106, 22, 64, 171, 36, 225, 114], [34, 19, 21, 102, 132, 188, 16, 76, 124], [62, 18, 78, 95, 85, 57, 50, 48, 51]], [[193, 101, 35, 159, 215, 111, 89, 46, 111], [60, 148, 31, 172, 219, 228, 21, 18, 111], [112, 113, 77, 85, 179, 255, 38, 120, 114], [40, 42, 1, 196, 245, 209, 10, 25, 109], [88, 43, 29, 140, 166, 213, 37, 43, 154], [61, 63, 30, 155, 67, 45, 68, 1, 209], [100, 80, 8, 43, 154, 1, 51, 26, 71], [142, 78, 78, 16, 255, 128, 34, 197, 171], [41, 40, 5, 102, 211, 183, 4, 1, 221], [51, 50, 17, 168, 209, 192, 23, 25, 82]], [[138, 31, 36, 171, 27, 166, 38, 44, 229], [67, 87, 58, 169, 82, 115, 26, 59, 179], [63, 59, 90, 180, 59, 166, 93, 73, 154], [40, 40, 21, 116, 143, 209, 34, 39, 175], [47, 15, 16, 183, 34, 223, 49, 45, 183], [46, 17, 33, 183, 6, 98, 15, 32, 183], [57, 46, 22, 24, 128, 1, 54, 17, 37], [65, 32, 73, 115, 28, 128, 23, 128, 205], [40, 3, 9, 115, 51, 192, 18, 6, 223], [87, 37, 9, 115, 59, 77, 64, 21, 47]], [[104, 55, 44, 218, 9, 54, 53, 130, 226], [64, 90, 70, 205, 40, 41, 23, 26, 57], [54, 57, 112, 184, 5, 41, 38, 166, 213], [30, 34, 26, 133, 152, 116, 10, 32, 134], [39, 19, 53, 221, 26, 114, 32, 73, 255], [31, 9, 65, 234, 2, 15, 1, 118, 73], [75, 32, 12, 51, 192, 255, 160, 43, 51], [88, 31, 35, 67, 102, 85, 55, 186, 85], [56, 21, 23, 111, 59, 205, 45, 37, 192], [55, 38, 70, 124, 73, 102, 1, 34, 98]], [[125, 98, 42, 88, 104, 85, 117, 175, 82], [95, 84, 53, 89, 128, 100, 113, 101, 45], [75, 79, 123, 47, 51, 128, 81, 171, 1], [57, 17, 5, 71, 102, 57, 53, 41, 49], [38, 33, 13, 121, 57, 73, 26, 1, 85], [41, 10, 67, 138, 77, 110, 90, 47, 114], [115, 21, 2, 10, 102, 255, 166, 23, 6], [101, 29, 16, 10, 85, 128, 101, 196, 26], [57, 18, 10, 102, 102, 213, 34, 20, 43], [117, 20, 15, 36, 163, 128, 68, 1, 26]], [[102, 61, 71, 37, 34, 53, 31, 243, 192], [69, 60, 71, 38, 73, 119, 28, 222, 37], [68, 45, 128, 34, 1, 47, 11, 245, 171], [62, 17, 19, 70, 146, 85, 55, 62, 70], [37, 43, 37, 154, 100, 163, 85, 160, 1], [63, 9, 92, 136, 28, 64, 32, 201, 85], [75, 15, 9, 9, 64, 255, 184, 119, 16], [86, 6, 28, 5, 64, 255, 25, 248, 1], [56, 8, 17, 132, 137, 255, 55, 116, 128], [58, 15, 20, 82, 135, 57, 26, 121, 40]], [[164, 50, 31, 137, 154, 133, 25, 35, 218], [51, 103, 44, 131, 131, 123, 31, 6, 158], [86, 40, 64, 135, 148, 224, 45, 183, 128], [22, 26, 17, 131, 240, 154, 14, 1, 209], [45, 16, 21, 91, 64, 222, 7, 1, 197], [56, 21, 39, 155, 60, 138, 23, 102, 213], [83, 12, 13, 54, 192, 255, 68, 47, 28], [85, 26, 85, 85, 128, 128, 32, 146, 171], [18, 11, 7, 63, 144, 171, 4, 4, 246], [35, 27, 10, 146, 174, 171, 12, 26, 128]], [[190, 80, 35, 99, 180, 80, 126, 54, 45], [85, 126, 47, 87, 176, 51, 41, 20, 32], [101, 75, 128, 139, 118, 146, 116, 128, 85], [56, 41, 15, 176, 236, 85, 37, 9, 62], [71, 30, 17, 119, 118, 255, 17, 18, 138], [101, 38, 60, 138, 55, 70, 43, 26, 142], [146, 36, 19, 30, 171, 255, 97, 27, 20], [138, 45, 61, 62, 219, 1, 81, 188, 64], [32, 41, 20, 117, 151, 142, 20, 21, 163], [112, 19, 12, 61, 195, 128, 48, 4, 24]]], $h = [[[[255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[176, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255], [223, 241, 252, 255, 255, 255, 255, 255, 255, 255, 255], [249, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 244, 252, 255, 255, 255, 255, 255, 255, 255, 255], [234, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255], [253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 246, 254, 255, 255, 255, 255, 255, 255, 255, 255], [239, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255], [254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255], [251, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255], [251, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255], [254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 254, 253, 255, 254, 255, 255, 255, 255, 255, 255], [250, 255, 254, 255, 254, 255, 255, 255, 255, 255, 255], [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]]], [[[217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [225, 252, 241, 253, 255, 255, 254, 255, 255, 255, 255], [234, 250, 241, 250, 253, 255, 253, 254, 255, 255, 255]], [[255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255], [223, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255], [238, 253, 254, 254, 255, 255, 255, 255, 255, 255, 255]], [[255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255], [249, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255], [247, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255], [252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255], [253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255], [250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]]], [[[186, 251, 250, 255, 255, 255, 255, 255, 255, 255, 255], [234, 251, 244, 254, 255, 255, 255, 255, 255, 255, 255], [251, 251, 243, 253, 254, 255, 254, 255, 255, 255, 255]], [[255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255], [236, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255], [251, 253, 253, 254, 254, 255, 255, 255, 255, 255, 255]], [[255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255], [254, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255], [254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255], [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]]], [[[248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [250, 254, 252, 254, 255, 255, 255, 255, 255, 255, 255], [248, 254, 249, 253, 255, 255, 255, 255, 255, 255, 255]], [[255, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255], [246, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255], [252, 254, 251, 254, 254, 255, 255, 255, 255, 255, 255]], [[255, 254, 252, 255, 255, 255, 255, 255, 255, 255, 255], [248, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255], [253, 255, 254, 254, 255, 255, 255, 255, 255, 255, 255]], [[255, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255], [245, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255], [253, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 251, 253, 255, 255, 255, 255, 255, 255, 255, 255], [252, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255], [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255], [249, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 255, 253, 255, 255, 255, 255, 255, 255, 255, 255], [250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]]]], Zh = [0, 1, 2, 3, 6, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 0], Hr = [], Xn = [], Ir = [], Qh = 1, ml = 2, Wr = [], Wn = [];
  7428. cn("UpsampleRgbLinePair", li, 3), cn("UpsampleBgrLinePair", Ti, 3), cn("UpsampleRgbaLinePair", va, 4), cn("UpsampleBgraLinePair", hi, 4), cn("UpsampleArgbLinePair", ui, 4), cn("UpsampleRgba4444LinePair", dn, 2), cn("UpsampleRgb565LinePair", Di, 2);
  7429. var tf = R.UpsampleRgbLinePair, ef = R.UpsampleBgrLinePair, vl = R.UpsampleRgbaLinePair, bl = R.UpsampleBgraLinePair, wl = R.UpsampleArgbLinePair, yl = R.UpsampleRgba4444LinePair, nf = R.UpsampleRgb565LinePair, as = 16, ss = 1 << as - 1, La = -227, oo = 482, rf = 6, xl = 0, af = a(256), sf = a(256), of = a(256), lf = a(256), uf = a(oo - La), hf = a(oo - La);
  7430. hr("YuvToRgbRow", li, 3), hr("YuvToBgrRow", Ti, 3), hr("YuvToRgbaRow", va, 4), hr("YuvToBgraRow", hi, 4), hr("YuvToArgbRow", ui, 4), hr("YuvToRgba4444Row", dn, 2), hr("YuvToRgb565Row", Di, 2);
  7431. var _l = [0, 4, 8, 12, 128, 132, 136, 140, 256, 260, 264, 268, 384, 388, 392, 396], os = [0, 2, 8], ff = [8, 7, 6, 4, 4, 2, 2, 2, 1, 1, 1, 1], cf = 1;
  7432. this.WebPDecodeRGBA = function(r, o, h, g, b) {
  7433. var w = es, y = new D(), A = new le();
  7434. y.ba = A, A.S = w, A.width = [A.width], A.height = [A.height];
  7435. var L = A.width, F = A.height, W = new Vt();
  7436. if (W == null || r == null) var et = 2;
  7437. else e(W != null), et = $a(r, o, h, W.width, W.height, W.Pd, W.Qd, W.format, null);
  7438. if (et != 0 ? L = 0 : (L != null && (L[0] = W.width[0]), F != null && (F[0] = W.height[0]), L = 1), L) {
  7439. A.width = A.width[0], A.height = A.height[0], g != null && (g[0] = A.width), b != null && (b[0] = A.height);
  7440. t: {
  7441. if (g = new Ii(), (b = new K()).data = r, b.w = o, b.ha = h, b.kd = 1, o = [0], e(b != null), ((r = $a(b.data, b.w, b.ha, null, null, null, o, null, b)) == 0 || r == 7) && o[0] && (r = 4), (o = r) == 0) {
  7442. if (e(y != null), g.data = b.data, g.w = b.w + b.offset, g.ha = b.ha - b.offset, g.put = Gt, g.ac = rr, g.bc = wr, g.ma = y, b.xa) {
  7443. if ((r = ei()) == null) {
  7444. y = 1;
  7445. break t;
  7446. }
  7447. if (function(C, Y) {
  7448. var $ = [0], ut = [0], Q = [0];
  7449. e: for (; ; ) {
  7450. if (C == null) return 0;
  7451. if (Y == null) return C.a = 2, 0;
  7452. if (C.l = Y, C.a = 0, ct(C.m, Y.data, Y.w, Y.ha), !yr(C.m, $, ut, Q)) {
  7453. C.a = 3;
  7454. break e;
  7455. }
  7456. if (C.xb = ml, Y.width = $[0], Y.height = ut[0], !ar($[0], ut[0], 1, C, null)) break e;
  7457. return 1;
  7458. }
  7459. return e(C.a != 0), 0;
  7460. }(r, g)) {
  7461. if (g = (o = ba(g.width, g.height, y.Oa, y.ba)) == 0) {
  7462. e: {
  7463. g = r;
  7464. n: for (; ; ) {
  7465. if (g == null) {
  7466. g = 0;
  7467. break e;
  7468. }
  7469. if (e(g.s.yc != null), e(g.s.Ya != null), e(0 < g.s.Wb), e((h = g.l) != null), e((b = h.ma) != null), g.xb != 0) {
  7470. if (g.ca = b.ba, g.tb = b.tb, e(g.ca != null), !zn(b.Oa, h, ns)) {
  7471. g.a = 2;
  7472. break n;
  7473. }
  7474. if (!ni(g, h.width) || h.da) break n;
  7475. if ((h.da || Yt(g.ca.S)) && Te(), 11 > g.ca.S || (alert("todo:WebPInitConvertARGBToYUV"), g.ca.f.kb.F != null && Te()), g.Pb && 0 < g.s.ua && g.s.vb.X == null && !P(g.s.vb, g.s.Wa.Xa)) {
  7476. g.a = 1;
  7477. break n;
  7478. }
  7479. g.xb = 0;
  7480. }
  7481. if (!Jn(g, g.V, g.Ba, g.c, g.i, h.o, jr)) break n;
  7482. b.Dc = g.Ma, g = 1;
  7483. break e;
  7484. }
  7485. e(g.a != 0), g = 0;
  7486. }
  7487. g = !g;
  7488. }
  7489. g && (o = r.a);
  7490. } else o = r.a;
  7491. } else {
  7492. if ((r = new Ms()) == null) {
  7493. y = 1;
  7494. break t;
  7495. }
  7496. if (r.Fa = b.na, r.P = b.P, r.qc = b.Sa, or(r, g)) {
  7497. if ((o = ba(g.width, g.height, y.Oa, y.ba)) == 0) {
  7498. if (r.Aa = 0, h = y.Oa, e((b = r) != null), h != null) {
  7499. if (0 < (L = 0 > (L = h.Md) ? 0 : 100 < L ? 255 : 255 * L / 100)) {
  7500. for (F = W = 0; 4 > F; ++F) 12 > (et = b.pb[F]).lc && (et.ia = L * ff[0 > et.lc ? 0 : et.lc] >> 3), W |= et.ia;
  7501. W && (alert("todo:VP8InitRandom"), b.ia = 1);
  7502. }
  7503. b.Ga = h.Id, 100 < b.Ga ? b.Ga = 100 : 0 > b.Ga && (b.Ga = 0);
  7504. }
  7505. (function(C, Y) {
  7506. if (C == null) return 0;
  7507. if (Y == null) return Xe(C, 2, "NULL VP8Io parameter in VP8Decode().");
  7508. if (!C.cb && !or(C, Y)) return 0;
  7509. if (e(C.cb), Y.ac == null || Y.ac(Y)) {
  7510. Y.ob && (C.L = 0);
  7511. var $ = os[C.L];
  7512. if (C.L == 2 ? (C.yb = 0, C.zb = 0) : (C.yb = Y.v - $ >> 4, C.zb = Y.j - $ >> 4, 0 > C.yb && (C.yb = 0), 0 > C.zb && (C.zb = 0)), C.Va = Y.o + 15 + $ >> 4, C.Hb = Y.va + 15 + $ >> 4, C.Hb > C.za && (C.Hb = C.za), C.Va > C.Ub && (C.Va = C.Ub), 0 < C.L) {
  7513. var ut = C.ed;
  7514. for ($ = 0; 4 > $; ++$) {
  7515. var Q;
  7516. if (C.Qa.Cb) {
  7517. var ft = C.Qa.Lb[$];
  7518. C.Qa.Fb || (ft += ut.Tb);
  7519. } else ft = ut.Tb;
  7520. for (Q = 0; 1 >= Q; ++Q) {
  7521. var pt = C.gd[$][Q], xt = ft;
  7522. if (ut.Pc && (xt += ut.vd[0], Q && (xt += ut.od[0])), 0 < (xt = 0 > xt ? 0 : 63 < xt ? 63 : xt)) {
  7523. var bt = xt;
  7524. 0 < ut.wb && (bt = 4 < ut.wb ? bt >> 2 : bt >> 1) > 9 - ut.wb && (bt = 9 - ut.wb), 1 > bt && (bt = 1), pt.dd = bt, pt.tc = 2 * xt + bt, pt.ld = 40 <= xt ? 2 : 15 <= xt ? 1 : 0;
  7525. } else pt.tc = 0;
  7526. pt.La = Q;
  7527. }
  7528. }
  7529. }
  7530. $ = 0;
  7531. } else Xe(C, 6, "Frame setup failed"), $ = C.a;
  7532. if ($ = $ == 0) {
  7533. if ($) {
  7534. C.$c = 0, 0 < C.Aa || (C.Ic = cf);
  7535. e: {
  7536. $ = C.Ic, ut = 4 * (bt = C.za);
  7537. var Mt = 32 * bt, Pt = bt + 1, re = 0 < C.L ? bt * (0 < C.Aa ? 2 : 1) : 0, Ot = (C.Aa == 2 ? 2 : 1) * bt;
  7538. if ((pt = ut + 832 + (Q = 3 * (16 * $ + os[C.L]) / 2 * Mt) + (ft = C.Fa != null && 0 < C.Fa.length ? C.Kc.c * C.Kc.i : 0)) != pt) $ = 0;
  7539. else {
  7540. if (pt > C.Vb) {
  7541. if (C.Vb = 0, C.Ec = a(pt), C.Fc = 0, C.Ec == null) {
  7542. $ = Xe(C, 1, "no memory during frame initialization.");
  7543. break e;
  7544. }
  7545. C.Vb = pt;
  7546. }
  7547. pt = C.Ec, xt = C.Fc, C.Ac = pt, C.Bc = xt, xt += ut, C.Gd = c(Mt, Da), C.Hd = 0, C.rb = c(Pt + 1, oa), C.sb = 1, C.wa = re ? c(re, Un) : null, C.Y = 0, C.D.Nb = 0, C.D.wa = C.wa, C.D.Y = C.Y, 0 < C.Aa && (C.D.Y += bt), e(!0), C.oc = pt, C.pc = xt, xt += 832, C.ya = c(Ot, la), C.aa = 0, C.D.ya = C.ya, C.D.aa = C.aa, C.Aa == 2 && (C.D.aa += bt), C.R = 16 * bt, C.B = 8 * bt, bt = (Mt = os[C.L]) * C.R, Mt = Mt / 2 * C.B, C.sa = pt, C.ta = xt + bt, C.qa = C.sa, C.ra = C.ta + 16 * $ * C.R + Mt, C.Ha = C.qa, C.Ia = C.ra + 8 * $ * C.B + Mt, C.$c = 0, xt += Q, C.mb = ft ? pt : null, C.nb = ft ? xt : null, e(xt + ft <= C.Fc + C.Vb), ua(C), s(C.Ac, C.Bc, 0, ut), $ = 1;
  7548. }
  7549. }
  7550. if ($) {
  7551. if (Y.ka = 0, Y.y = C.sa, Y.O = C.ta, Y.f = C.qa, Y.N = C.ra, Y.ea = C.Ha, Y.Vd = C.Ia, Y.fa = C.R, Y.Rc = C.B, Y.F = null, Y.J = 0, !fl) {
  7552. for ($ = -255; 255 >= $; ++$) ol[255 + $] = 0 > $ ? -$ : $;
  7553. for ($ = -1020; 1020 >= $; ++$) ll[1020 + $] = -128 > $ ? -128 : 127 < $ ? 127 : $;
  7554. for ($ = -112; 112 >= $; ++$) ul[112 + $] = -16 > $ ? -16 : 15 < $ ? 15 : $;
  7555. for ($ = -255; 510 >= $; ++$) hl[255 + $] = 0 > $ ? 0 : 255 < $ ? 255 : $;
  7556. fl = 1;
  7557. }
  7558. Ur = Ha, kr = Rs, Vi = Ts, pn = Ds, cr = lr, zr = za, Pe = Ga, Ie = Ya, We = Ka, Qe = u, Pr = Ja, _a = ai, Gi = v, Za = I, tl = Mi, el = ga, nl = Ri, rl = Va, Xn[0] = Gs, Xn[1] = Oi, Xn[2] = Ws, Xn[3] = Vs, Xn[4] = Ys, Xn[5] = _r, Xn[6] = Js, Xn[7] = Ar, Xn[8] = Xs, Xn[9] = Ks, Hr[0] = Wa, Hr[1] = qs, Hr[2] = Us, Hr[3] = zs, Hr[4] = Mr, Hr[5] = Hs, Hr[6] = ri, Ir[0] = $s, Ir[1] = ha, Ir[2] = ji, Ir[3] = fa, Ir[4] = Zs, Ir[5] = Bi, Ir[6] = ca, $ = 1;
  7559. } else $ = 0;
  7560. }
  7561. $ && ($ = function(ce, tn) {
  7562. for (ce.M = 0; ce.M < ce.Va; ++ce.M) {
  7563. var ie, jt = ce.Jc[ce.M & ce.Xb], Nt = ce.m, Ve = ce;
  7564. for (ie = 0; ie < Ve.za; ++ie) {
  7565. var ee = Nt, pe = Ve, Ee = pe.Ac, ln = pe.Bc + 4 * ie, _n = pe.zc, qe = pe.ya[pe.aa + ie];
  7566. if (pe.Qa.Bb ? qe.$b = gt(ee, pe.Pa.jb[0]) ? 2 + gt(ee, pe.Pa.jb[2]) : gt(ee, pe.Pa.jb[1]) : qe.$b = 0, pe.kc && (qe.Ad = gt(ee, pe.Bd)), qe.Za = !gt(ee, 145) + 0, qe.Za) {
  7567. var gn = qe.Ob, An = 0;
  7568. for (pe = 0; 4 > pe; ++pe) {
  7569. var en, me = _n[0 + pe];
  7570. for (en = 0; 4 > en; ++en) {
  7571. me = Xh[Ee[ln + en]][me];
  7572. for (var we = gl[gt(ee, me[0])]; 0 < we; ) we = gl[2 * we + gt(ee, me[we])];
  7573. me = -we, Ee[ln + en] = me;
  7574. }
  7575. i(gn, An, Ee, ln, 4), An += 4, _n[0 + pe] = me;
  7576. }
  7577. } else me = gt(ee, 156) ? gt(ee, 128) ? 1 : 3 : gt(ee, 163) ? 2 : 0, qe.Ob[0] = me, s(Ee, ln, me, 4), s(_n, 0, me, 4);
  7578. qe.Dd = gt(ee, 142) ? gt(ee, 114) ? gt(ee, 183) ? 1 : 3 : 2 : 0;
  7579. }
  7580. if (Ve.m.Ka) return Xe(ce, 7, "Premature end-of-partition0 encountered.");
  7581. for (; ce.ja < ce.za; ++ce.ja) {
  7582. if (Ve = jt, ee = (Nt = ce).rb[Nt.sb - 1], Ee = Nt.rb[Nt.sb + Nt.ja], ie = Nt.ya[Nt.aa + Nt.ja], ln = Nt.kc ? ie.Ad : 0) ee.la = Ee.la = 0, ie.Za || (ee.Na = Ee.Na = 0), ie.Hc = 0, ie.Gc = 0, ie.ia = 0;
  7583. else {
  7584. var Ue, ye;
  7585. if (ee = Ee, Ee = Ve, ln = Nt.Pa.Xc, _n = Nt.ya[Nt.aa + Nt.ja], qe = Nt.pb[_n.$b], pe = _n.ad, gn = 0, An = Nt.rb[Nt.sb - 1], me = en = 0, s(pe, gn, 0, 384), _n.Za) var un = 0, $n = ln[3];
  7586. else {
  7587. we = a(16);
  7588. var Ge = ee.Na + An.Na;
  7589. if (Ge = Na(Ee, ln[1], Ge, qe.Eb, 0, we, 0), ee.Na = An.Na = (0 < Ge) + 0, 1 < Ge) Ur(we, 0, pe, gn);
  7590. else {
  7591. var Sn = we[0] + 3 >> 3;
  7592. for (we = 0; 256 > we; we += 16) pe[gn + we] = Sn;
  7593. }
  7594. un = 1, $n = ln[0];
  7595. }
  7596. var Ne = 15 & ee.la, nn = 15 & An.la;
  7597. for (we = 0; 4 > we; ++we) {
  7598. var Cn = 1 & nn;
  7599. for (Sn = ye = 0; 4 > Sn; ++Sn) Ne = Ne >> 1 | (Cn = (Ge = Na(Ee, $n, Ge = Cn + (1 & Ne), qe.Sc, un, pe, gn)) > un) << 7, ye = ye << 2 | (3 < Ge ? 3 : 1 < Ge ? 2 : pe[gn + 0] != 0), gn += 16;
  7600. Ne >>= 4, nn = nn >> 1 | Cn << 7, en = (en << 8 | ye) >>> 0;
  7601. }
  7602. for ($n = Ne, un = nn >> 4, Ue = 0; 4 > Ue; Ue += 2) {
  7603. for (ye = 0, Ne = ee.la >> 4 + Ue, nn = An.la >> 4 + Ue, we = 0; 2 > we; ++we) {
  7604. for (Cn = 1 & nn, Sn = 0; 2 > Sn; ++Sn) Ge = Cn + (1 & Ne), Ne = Ne >> 1 | (Cn = 0 < (Ge = Na(Ee, ln[2], Ge, qe.Qc, 0, pe, gn))) << 3, ye = ye << 2 | (3 < Ge ? 3 : 1 < Ge ? 2 : pe[gn + 0] != 0), gn += 16;
  7605. Ne >>= 2, nn = nn >> 1 | Cn << 5;
  7606. }
  7607. me |= ye << 4 * Ue, $n |= Ne << 4 << Ue, un |= (240 & nn) << Ue;
  7608. }
  7609. ee.la = $n, An.la = un, _n.Hc = en, _n.Gc = me, _n.ia = 43690 & me ? 0 : qe.ia, ln = !(en | me);
  7610. }
  7611. if (0 < Nt.L && (Nt.wa[Nt.Y + Nt.ja] = Nt.gd[ie.$b][ie.Za], Nt.wa[Nt.Y + Nt.ja].La |= !ln), Ve.Ka) return Xe(ce, 7, "Premature end-of-file encountered.");
  7612. }
  7613. if (ua(ce), Nt = tn, Ve = 1, ie = (jt = ce).D, ee = 0 < jt.L && jt.M >= jt.zb && jt.M <= jt.Va, jt.Aa == 0) e: {
  7614. if (ie.M = jt.M, ie.uc = ee, qi(jt, ie), Ve = 1, ie = (ye = jt.D).Nb, ee = (me = os[jt.L]) * jt.R, Ee = me / 2 * jt.B, we = 16 * ie * jt.R, Sn = 8 * ie * jt.B, ln = jt.sa, _n = jt.ta - ee + we, qe = jt.qa, pe = jt.ra - Ee + Sn, gn = jt.Ha, An = jt.Ia - Ee + Sn, nn = (Ne = ye.M) == 0, en = Ne >= jt.Va - 1, jt.Aa == 2 && qi(jt, ye), ye.uc) for (Cn = (Ge = jt).D.M, e(Ge.D.uc), ye = Ge.yb; ye < Ge.Hb; ++ye) {
  7615. un = ye, $n = Cn;
  7616. var Nn = (En = (hn = Ge).D).Nb;
  7617. Ue = hn.R;
  7618. var En = En.wa[En.Y + un], On = hn.sa, kn = hn.ta + 16 * Nn * Ue + 16 * un, jn = En.dd, Fe = En.tc;
  7619. if (Fe != 0) if (e(3 <= Fe), hn.L == 1) 0 < un && el(On, kn, Ue, Fe + 4), En.La && rl(On, kn, Ue, Fe), 0 < $n && tl(On, kn, Ue, Fe + 4), En.La && nl(On, kn, Ue, Fe);
  7620. else {
  7621. var Bn = hn.B, Zn = hn.qa, vi = hn.ra + 8 * Nn * Bn + 8 * un, Fr = hn.Ha, hn = hn.Ia + 8 * Nn * Bn + 8 * un;
  7622. Nn = En.ld, 0 < un && (Ie(On, kn, Ue, Fe + 4, jn, Nn), Qe(Zn, vi, Fr, hn, Bn, Fe + 4, jn, Nn)), En.La && (_a(On, kn, Ue, Fe, jn, Nn), Za(Zn, vi, Fr, hn, Bn, Fe, jn, Nn)), 0 < $n && (Pe(On, kn, Ue, Fe + 4, jn, Nn), We(Zn, vi, Fr, hn, Bn, Fe + 4, jn, Nn)), En.La && (Pr(On, kn, Ue, Fe, jn, Nn), Gi(Zn, vi, Fr, hn, Bn, Fe, jn, Nn));
  7623. }
  7624. }
  7625. if (jt.ia && alert("todo:DitherRow"), Nt.put != null) {
  7626. if (ye = 16 * Ne, Ne = 16 * (Ne + 1), nn ? (Nt.y = jt.sa, Nt.O = jt.ta + we, Nt.f = jt.qa, Nt.N = jt.ra + Sn, Nt.ea = jt.Ha, Nt.W = jt.Ia + Sn) : (ye -= me, Nt.y = ln, Nt.O = _n, Nt.f = qe, Nt.N = pe, Nt.ea = gn, Nt.W = An), en || (Ne -= me), Ne > Nt.o && (Ne = Nt.o), Nt.F = null, Nt.J = null, jt.Fa != null && 0 < jt.Fa.length && ye < Ne && (Nt.J = $e(jt, Nt, ye, Ne - ye), Nt.F = jt.mb, Nt.F == null && Nt.F.length == 0)) {
  7627. Ve = Xe(jt, 3, "Could not decode alpha data.");
  7628. break e;
  7629. }
  7630. ye < Nt.j && (me = Nt.j - ye, ye = Nt.j, e(!(1 & me)), Nt.O += jt.R * me, Nt.N += jt.B * (me >> 1), Nt.W += jt.B * (me >> 1), Nt.F != null && (Nt.J += Nt.width * me)), ye < Ne && (Nt.O += Nt.v, Nt.N += Nt.v >> 1, Nt.W += Nt.v >> 1, Nt.F != null && (Nt.J += Nt.v), Nt.ka = ye - Nt.j, Nt.U = Nt.va - Nt.v, Nt.T = Ne - ye, Ve = Nt.put(Nt));
  7631. }
  7632. ie + 1 != jt.Ic || en || (i(jt.sa, jt.ta - ee, ln, _n + 16 * jt.R, ee), i(jt.qa, jt.ra - Ee, qe, pe + 8 * jt.B, Ee), i(jt.Ha, jt.Ia - Ee, gn, An + 8 * jt.B, Ee));
  7633. }
  7634. if (!Ve) return Xe(ce, 6, "Output aborted.");
  7635. }
  7636. return 1;
  7637. }(C, Y)), Y.bc != null && Y.bc(Y), $ &= 1;
  7638. }
  7639. return $ ? (C.cb = 0, $) : 0;
  7640. })(r, g) || (o = r.a);
  7641. }
  7642. } else o = r.a;
  7643. }
  7644. o == 0 && y.Oa != null && y.Oa.fd && (o = fi(y.ba));
  7645. }
  7646. y = o;
  7647. }
  7648. w = y != 0 ? null : 11 > w ? A.f.RGBA.eb : A.f.kb.y;
  7649. } else w = null;
  7650. return w;
  7651. };
  7652. var Al = [3, 4, 3, 4, 4, 2, 2, 4, 4, 4, 2, 1, 1];
  7653. };
  7654. function d(R, tt) {
  7655. for (var N = "", E = 0; E < 4; E++) N += String.fromCharCode(R[tt++]);
  7656. return N;
  7657. }
  7658. function m(R, tt) {
  7659. return R[tt + 0] | R[tt + 1] << 8;
  7660. }
  7661. function _(R, tt) {
  7662. return (R[tt + 0] | R[tt + 1] << 8 | R[tt + 2] << 16) >>> 0;
  7663. }
  7664. function k(R, tt) {
  7665. return (R[tt + 0] | R[tt + 1] << 8 | R[tt + 2] << 16 | R[tt + 3] << 24) >>> 0;
  7666. }
  7667. new f();
  7668. var p = [0], j = [0], O = [], M = new f(), S = n, V = function(R, tt) {
  7669. var N = {}, E = 0, z = !1, U = 0, rt = 0;
  7670. if (N.frames = [], !/** @license
  7671. * Copyright (c) 2017 Dominik Homberger
  7672. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
  7673. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
  7674. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  7675. https://webpjs.appspot.com
  7676. WebPRiffParser dominikhlbg@gmail.com
  7677. */
  7678. function(x, B) {
  7679. for (var T = 0; T < 4; T++) if (x[B + T] != "RIFF".charCodeAt(T)) return !0;
  7680. return !1;
  7681. }(R, tt)) {
  7682. for (k(R, tt += 4), tt += 8; tt < R.length; ) {
  7683. var ot = d(R, tt), ht = k(R, tt += 4);
  7684. tt += 4;
  7685. var nt = ht + (1 & ht);
  7686. switch (ot) {
  7687. case "VP8 ":
  7688. case "VP8L":
  7689. N.frames[E] === void 0 && (N.frames[E] = {}), (wt = N.frames[E]).src_off = z ? rt : tt - 8, wt.src_size = U + ht + 8, E++, z && (z = !1, U = 0, rt = 0);
  7690. break;
  7691. case "VP8X":
  7692. (wt = N.header = {}).feature_flags = R[tt];
  7693. var ct = tt + 4;
  7694. wt.canvas_width = 1 + _(R, ct), ct += 3, wt.canvas_height = 1 + _(R, ct), ct += 3;
  7695. break;
  7696. case "ALPH":
  7697. z = !0, U = nt + 8, rt = tt - 8;
  7698. break;
  7699. case "ANIM":
  7700. (wt = N.header).bgcolor = k(R, tt), ct = tt + 4, wt.loop_count = m(R, ct), ct += 2;
  7701. break;
  7702. case "ANMF":
  7703. var At, wt;
  7704. (wt = N.frames[E] = {}).offset_x = 2 * _(R, tt), tt += 3, wt.offset_y = 2 * _(R, tt), tt += 3, wt.width = 1 + _(R, tt), tt += 3, wt.height = 1 + _(R, tt), tt += 3, wt.duration = _(R, tt), tt += 3, At = R[tt++], wt.dispose = 1 & At, wt.blend = At >> 1 & 1;
  7705. }
  7706. ot != "ANMF" && (tt += nt);
  7707. }
  7708. return N;
  7709. }
  7710. }(S, 0);
  7711. V.response = S, V.rgbaoutput = !0, V.dataurl = !1;
  7712. var G = V.header ? V.header : null, q = V.frames ? V.frames : null;
  7713. if (G) {
  7714. G.loop_counter = G.loop_count, p = [G.canvas_height], j = [G.canvas_width];
  7715. for (var it = 0; it < q.length && q[it].blend != 0; it++) ;
  7716. }
  7717. var vt = q[0], dt = M.WebPDecodeRGBA(S, vt.src_off, vt.src_size, j, p);
  7718. vt.rgba = dt, vt.imgwidth = j[0], vt.imgheight = p[0];
  7719. for (var X = 0; X < j[0] * p[0] * 4; X++) O[X] = dt[X];
  7720. return this.width = j, this.height = p, this.data = O, this;
  7721. }
  7722. /** ====================================================================
  7723. * @license
  7724. * jsPDF XMP metadata plugin
  7725. * Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi
  7726. *
  7727. * Permission is hereby granted, free of charge, to any person obtaining
  7728. * a copy of this software and associated documentation files (the
  7729. * "Software"), to deal in the Software without restriction, including
  7730. * without limitation the rights to use, copy, modify, merge, publish,
  7731. * distribute, sublicense, and/or sell copies of the Software, and to
  7732. * permit persons to whom the Software is furnished to do so, subject to
  7733. * the following conditions:
  7734. *
  7735. * The above copyright notice and this permission notice shall be
  7736. * included in all copies or substantial portions of the Software.
  7737. *
  7738. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  7739. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  7740. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  7741. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  7742. * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  7743. * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  7744. * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  7745. * ====================================================================
  7746. */
  7747. function Q1() {
  7748. var n, e = this.internal.__metadata__.metadata, t = unescape(encodeURIComponent(e));
  7749. n = this.internal.__metadata__.rawXml ? t : '<x:xmpmeta xmlns:x="adobe:ns:meta/"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="' + this.internal.__metadata__.namespaceUri + '"><jspdf:metadata>' + t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;") + "</jspdf:metadata></rdf:Description></rdf:RDF></x:xmpmeta>", this.internal.__metadata__.metadataObjectNumber = this.internal.newObject(), this.internal.write("<< /Type /Metadata /Subtype /XML /Length " + n.length + " >>"), this.internal.write("stream"), this.internal.write(n), this.internal.write("endstream"), this.internal.write("endobj");
  7750. }
  7751. function t2() {
  7752. this.internal.__metadata__.metadataObjectNumber && this.internal.write("/Metadata " + this.internal.__metadata__.metadataObjectNumber + " 0 R");
  7753. }
  7754. (function(n) {
  7755. var e, t, i, s, a, c, l, f, d, m = function(x) {
  7756. return x = x || {}, this.isStrokeTransparent = x.isStrokeTransparent || !1, this.strokeOpacity = x.strokeOpacity || 1, this.strokeStyle = x.strokeStyle || "#000000", this.fillStyle = x.fillStyle || "#000000", this.isFillTransparent = x.isFillTransparent || !1, this.fillOpacity = x.fillOpacity || 1, this.font = x.font || "10px sans-serif", this.textBaseline = x.textBaseline || "alphabetic", this.textAlign = x.textAlign || "left", this.lineWidth = x.lineWidth || 1, this.lineJoin = x.lineJoin || "miter", this.lineCap = x.lineCap || "butt", this.path = x.path || [], this.transform = x.transform !== void 0 ? x.transform.clone() : new f(), this.globalCompositeOperation = x.globalCompositeOperation || "normal", this.globalAlpha = x.globalAlpha || 1, this.clip_path = x.clip_path || [], this.currentPoint = x.currentPoint || new c(), this.miterLimit = x.miterLimit || 10, this.lastPoint = x.lastPoint || new c(), this.lineDashOffset = x.lineDashOffset || 0, this.lineDash = x.lineDash || [], this.margin = x.margin || [0, 0, 0, 0], this.prevPageLastElemOffset = x.prevPageLastElemOffset || 0, this.ignoreClearRect = typeof x.ignoreClearRect != "boolean" || x.ignoreClearRect, this;
  7757. };
  7758. n.events.push(["initialized", function() {
  7759. this.context2d = new _(this), e = this.internal.f2, t = this.internal.getCoordinateString, i = this.internal.getVerticalCoordinateString, s = this.internal.getHorizontalCoordinate, a = this.internal.getVerticalCoordinate, c = this.internal.Point, l = this.internal.Rectangle, f = this.internal.Matrix, d = new m();
  7760. }]);
  7761. var _ = function(x) {
  7762. Object.defineProperty(this, "canvas", { get: function() {
  7763. return { parentNode: !1, style: !1 };
  7764. } });
  7765. var B = x;
  7766. Object.defineProperty(this, "pdf", { get: function() {
  7767. return B;
  7768. } });
  7769. var T = !1;
  7770. Object.defineProperty(this, "pageWrapXEnabled", { get: function() {
  7771. return T;
  7772. }, set: function(P) {
  7773. T = !!P;
  7774. } });
  7775. var H = !1;
  7776. Object.defineProperty(this, "pageWrapYEnabled", { get: function() {
  7777. return H;
  7778. }, set: function(P) {
  7779. H = !!P;
  7780. } });
  7781. var J = 0;
  7782. Object.defineProperty(this, "posX", { get: function() {
  7783. return J;
  7784. }, set: function(P) {
  7785. isNaN(P) || (J = P);
  7786. } });
  7787. var Z = 0;
  7788. Object.defineProperty(this, "posY", { get: function() {
  7789. return Z;
  7790. }, set: function(P) {
  7791. isNaN(P) || (Z = P);
  7792. } }), Object.defineProperty(this, "margin", { get: function() {
  7793. return d.margin;
  7794. }, set: function(P) {
  7795. var Lt;
  7796. typeof P == "number" ? Lt = [P, P, P, P] : ((Lt = new Array(4))[0] = P[0], Lt[1] = P.length >= 2 ? P[1] : Lt[0], Lt[2] = P.length >= 3 ? P[2] : Lt[0], Lt[3] = P.length >= 4 ? P[3] : Lt[1]), d.margin = Lt;
  7797. } });
  7798. var at = !1;
  7799. Object.defineProperty(this, "autoPaging", { get: function() {
  7800. return at;
  7801. }, set: function(P) {
  7802. at = P;
  7803. } });
  7804. var st = 0;
  7805. Object.defineProperty(this, "lastBreak", { get: function() {
  7806. return st;
  7807. }, set: function(P) {
  7808. st = P;
  7809. } });
  7810. var gt = [];
  7811. Object.defineProperty(this, "pageBreaks", { get: function() {
  7812. return gt;
  7813. }, set: function(P) {
  7814. gt = P;
  7815. } }), Object.defineProperty(this, "ctx", { get: function() {
  7816. return d;
  7817. }, set: function(P) {
  7818. P instanceof m && (d = P);
  7819. } }), Object.defineProperty(this, "path", { get: function() {
  7820. return d.path;
  7821. }, set: function(P) {
  7822. d.path = P;
  7823. } });
  7824. var _t = [];
  7825. Object.defineProperty(this, "ctxStack", { get: function() {
  7826. return _t;
  7827. }, set: function(P) {
  7828. _t = P;
  7829. } }), Object.defineProperty(this, "fillStyle", { get: function() {
  7830. return this.ctx.fillStyle;
  7831. }, set: function(P) {
  7832. var Lt;
  7833. Lt = k(P), this.ctx.fillStyle = Lt.style, this.ctx.isFillTransparent = Lt.a === 0, this.ctx.fillOpacity = Lt.a, this.pdf.setFillColor(Lt.r, Lt.g, Lt.b, { a: Lt.a }), this.pdf.setTextColor(Lt.r, Lt.g, Lt.b, { a: Lt.a });
  7834. } }), Object.defineProperty(this, "strokeStyle", { get: function() {
  7835. return this.ctx.strokeStyle;
  7836. }, set: function(P) {
  7837. var Lt = k(P);
  7838. this.ctx.strokeStyle = Lt.style, this.ctx.isStrokeTransparent = Lt.a === 0, this.ctx.strokeOpacity = Lt.a, Lt.a === 0 ? this.pdf.setDrawColor(255, 255, 255) : (Lt.a, this.pdf.setDrawColor(Lt.r, Lt.g, Lt.b));
  7839. } }), Object.defineProperty(this, "lineCap", { get: function() {
  7840. return this.ctx.lineCap;
  7841. }, set: function(P) {
  7842. ["butt", "round", "square"].indexOf(P) !== -1 && (this.ctx.lineCap = P, this.pdf.setLineCap(P));
  7843. } }), Object.defineProperty(this, "lineWidth", { get: function() {
  7844. return this.ctx.lineWidth;
  7845. }, set: function(P) {
  7846. isNaN(P) || (this.ctx.lineWidth = P, this.pdf.setLineWidth(P));
  7847. } }), Object.defineProperty(this, "lineJoin", { get: function() {
  7848. return this.ctx.lineJoin;
  7849. }, set: function(P) {
  7850. ["bevel", "round", "miter"].indexOf(P) !== -1 && (this.ctx.lineJoin = P, this.pdf.setLineJoin(P));
  7851. } }), Object.defineProperty(this, "miterLimit", { get: function() {
  7852. return this.ctx.miterLimit;
  7853. }, set: function(P) {
  7854. isNaN(P) || (this.ctx.miterLimit = P, this.pdf.setMiterLimit(P));
  7855. } }), Object.defineProperty(this, "textBaseline", { get: function() {
  7856. return this.ctx.textBaseline;
  7857. }, set: function(P) {
  7858. this.ctx.textBaseline = P;
  7859. } }), Object.defineProperty(this, "textAlign", { get: function() {
  7860. return this.ctx.textAlign;
  7861. }, set: function(P) {
  7862. ["right", "end", "center", "left", "start"].indexOf(P) !== -1 && (this.ctx.textAlign = P);
  7863. } });
  7864. var kt = null, St = null, Dt = null;
  7865. Object.defineProperty(this, "fontFaces", { get: function() {
  7866. return Dt;
  7867. }, set: function(P) {
  7868. kt = null, St = null, Dt = P;
  7869. } }), Object.defineProperty(this, "font", { get: function() {
  7870. return this.ctx.font;
  7871. }, set: function(P) {
  7872. var Lt;
  7873. if (this.ctx.font = P, (Lt = /^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z0-9]+?)\s*$/i.exec(P)) !== null) {
  7874. var ae = Lt[1];
  7875. Lt[2];
  7876. var Ht = Lt[3], yt = Lt[4];
  7877. Lt[5];
  7878. var Wt = Lt[6], It = /^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(yt)[2];
  7879. yt = Math.floor(It === "px" ? parseFloat(yt) * this.pdf.internal.scaleFactor : It === "em" ? parseFloat(yt) * this.pdf.getFontSize() : parseFloat(yt) * this.pdf.internal.scaleFactor), this.pdf.setFontSize(yt);
  7880. var zt = function(Rt) {
  7881. var He, ge, se = [], oe = Rt.trim();
  7882. if (oe === "") return Bo;
  7883. if (oe in ju) return [ju[oe]];
  7884. for (; oe !== ""; ) {
  7885. switch (ge = null, He = (oe = Mu(oe)).charAt(0)) {
  7886. case '"':
  7887. case "'":
  7888. ge = Y1(oe.substring(1), He);
  7889. break;
  7890. default:
  7891. ge = J1(oe);
  7892. }
  7893. if (ge === null || (se.push(ge[0]), (oe = Mu(ge[1])) !== "" && oe.charAt(0) !== ",")) return Bo;
  7894. oe = oe.replace(/^,/, "");
  7895. }
  7896. return se;
  7897. }(Wt);
  7898. if (this.fontFaces) {
  7899. var qt = function(Rt, He) {
  7900. var ge = Rt.getFontList(), se = JSON.stringify(ge);
  7901. if (kt === null || St !== se) {
  7902. var oe = function(je) {
  7903. var Ut = [];
  7904. return Object.keys(je).forEach(function(ke) {
  7905. je[ke].forEach(function(Yt) {
  7906. var Qt = null;
  7907. switch (Yt) {
  7908. case "bold":
  7909. Qt = { family: ke, weight: "bold" };
  7910. break;
  7911. case "italic":
  7912. Qt = { family: ke, style: "italic" };
  7913. break;
  7914. case "bolditalic":
  7915. Qt = { family: ke, weight: "bold", style: "italic" };
  7916. break;
  7917. case "":
  7918. case "normal":
  7919. Qt = { family: ke };
  7920. }
  7921. Qt !== null && (Qt.ref = { name: ke, style: Yt }, Ut.push(Qt));
  7922. });
  7923. }), Ut;
  7924. }(ge);
  7925. kt = function(je) {
  7926. for (var Ut = {}, ke = 0; ke < je.length; ++ke) {
  7927. var Yt = jo(je[ke]), Qt = Yt.family, Be = Yt.stretch, le = Yt.style, Vt = Yt.weight;
  7928. Ut[Qt] = Ut[Qt] || {}, Ut[Qt][Be] = Ut[Qt][Be] || {}, Ut[Qt][Be][le] = Ut[Qt][Be][le] || {}, Ut[Qt][Be][le][Vt] = Yt;
  7929. }
  7930. return Ut;
  7931. }(oe.concat(He)), St = se;
  7932. }
  7933. return kt;
  7934. }(this.pdf, this.fontFaces), ve = zt.map(function(Rt) {
  7935. return { family: Rt, stretch: "normal", weight: Ht, style: ae };
  7936. }), ue = function(Rt, He, ge) {
  7937. for (var se = (ge = ge || {}).defaultFontFamily || "times", oe = Object.assign({}, G1, ge.genericFontFamilies || {}), je = null, Ut = null, ke = 0; ke < He.length; ++ke) if (oe[(je = jo(He[ke])).family] && (je.family = oe[je.family]), Rt.hasOwnProperty(je.family)) {
  7938. Ut = Rt[je.family];
  7939. break;
  7940. }
  7941. if (!(Ut = Ut || Rt[se])) throw new Error("Could not find a font-family for the rule '" + Bu(je) + "' and default family '" + se + "'.");
  7942. if (Ut = function(Yt, Qt) {
  7943. if (Qt[Yt]) return Qt[Yt];
  7944. var Be = Jo[Yt], le = Be <= Jo.normal ? -1 : 1, Vt = Ou(Qt, Bh, Be, le);
  7945. if (!Vt) throw new Error("Could not find a matching font-stretch value for " + Yt);
  7946. return Vt;
  7947. }(je.stretch, Ut), Ut = function(Yt, Qt) {
  7948. if (Qt[Yt]) return Qt[Yt];
  7949. for (var Be = jh[Yt], le = 0; le < Be.length; ++le) if (Qt[Be[le]]) return Qt[Be[le]];
  7950. throw new Error("Could not find a matching font-style for " + Yt);
  7951. }(je.style, Ut), !(Ut = function(Yt, Qt) {
  7952. if (Qt[Yt]) return Qt[Yt];
  7953. if (Yt === 400 && Qt[500]) return Qt[500];
  7954. if (Yt === 500 && Qt[400]) return Qt[400];
  7955. var Be = V1[Yt], le = Ou(Qt, Mh, Be, Yt < 400 ? -1 : 1);
  7956. if (!le) throw new Error("Could not find a matching font-weight for value " + Yt);
  7957. return le;
  7958. }(je.weight, Ut))) throw new Error("Failed to resolve a font for the rule '" + Bu(je) + "'.");
  7959. return Ut;
  7960. }(qt, ve);
  7961. this.pdf.setFont(ue.ref.name, ue.ref.style);
  7962. } else {
  7963. var Zt = "";
  7964. (Ht === "bold" || parseInt(Ht, 10) >= 700 || ae === "bold") && (Zt = "bold"), ae === "italic" && (Zt += "italic"), Zt.length === 0 && (Zt = "normal");
  7965. for (var fe = "", he = { arial: "Helvetica", Arial: "Helvetica", verdana: "Helvetica", Verdana: "Helvetica", helvetica: "Helvetica", Helvetica: "Helvetica", "sans-serif": "Helvetica", fixed: "Courier", monospace: "Courier", terminal: "Courier", cursive: "Times", fantasy: "Times", serif: "Times" }, Bt = 0; Bt < zt.length; Bt++) {
  7966. if (this.pdf.internal.getFont(zt[Bt], Zt, { noFallback: !0, disableWarning: !0 }) !== void 0) {
  7967. fe = zt[Bt];
  7968. break;
  7969. }
  7970. if (Zt === "bolditalic" && this.pdf.internal.getFont(zt[Bt], "bold", { noFallback: !0, disableWarning: !0 }) !== void 0) fe = zt[Bt], Zt = "bold";
  7971. else if (this.pdf.internal.getFont(zt[Bt], "normal", { noFallback: !0, disableWarning: !0 }) !== void 0) {
  7972. fe = zt[Bt], Zt = "normal";
  7973. break;
  7974. }
  7975. }
  7976. if (fe === "") {
  7977. for (var ne = 0; ne < zt.length; ne++) if (he[zt[ne]]) {
  7978. fe = he[zt[ne]];
  7979. break;
  7980. }
  7981. }
  7982. fe = fe === "" ? "Times" : fe, this.pdf.setFont(fe, Zt);
  7983. }
  7984. }
  7985. } }), Object.defineProperty(this, "globalCompositeOperation", { get: function() {
  7986. return this.ctx.globalCompositeOperation;
  7987. }, set: function(P) {
  7988. this.ctx.globalCompositeOperation = P;
  7989. } }), Object.defineProperty(this, "globalAlpha", { get: function() {
  7990. return this.ctx.globalAlpha;
  7991. }, set: function(P) {
  7992. this.ctx.globalAlpha = P;
  7993. } }), Object.defineProperty(this, "lineDashOffset", { get: function() {
  7994. return this.ctx.lineDashOffset;
  7995. }, set: function(P) {
  7996. this.ctx.lineDashOffset = P, wt.call(this);
  7997. } }), Object.defineProperty(this, "lineDash", { get: function() {
  7998. return this.ctx.lineDash;
  7999. }, set: function(P) {
  8000. this.ctx.lineDash = P, wt.call(this);
  8001. } }), Object.defineProperty(this, "ignoreClearRect", { get: function() {
  8002. return this.ctx.ignoreClearRect;
  8003. }, set: function(P) {
  8004. this.ctx.ignoreClearRect = !!P;
  8005. } });
  8006. };
  8007. _.prototype.setLineDash = function(x) {
  8008. this.lineDash = x;
  8009. }, _.prototype.getLineDash = function() {
  8010. return this.lineDash.length % 2 ? this.lineDash.concat(this.lineDash) : this.lineDash.slice();
  8011. }, _.prototype.fill = function() {
  8012. q.call(this, "fill", !1);
  8013. }, _.prototype.stroke = function() {
  8014. q.call(this, "stroke", !1);
  8015. }, _.prototype.beginPath = function() {
  8016. this.path = [{ type: "begin" }];
  8017. }, _.prototype.moveTo = function(x, B) {
  8018. if (isNaN(x) || isNaN(B)) throw Le.error("jsPDF.context2d.moveTo: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.moveTo");
  8019. var T = this.ctx.transform.applyToPoint(new c(x, B));
  8020. this.path.push({ type: "mt", x: T.x, y: T.y }), this.ctx.lastPoint = new c(x, B);
  8021. }, _.prototype.closePath = function() {
  8022. var x = new c(0, 0), B = 0;
  8023. for (B = this.path.length - 1; B !== -1; B--) if (this.path[B].type === "begin" && Se(this.path[B + 1]) === "object" && typeof this.path[B + 1].x == "number") {
  8024. x = new c(this.path[B + 1].x, this.path[B + 1].y);
  8025. break;
  8026. }
  8027. this.path.push({ type: "close" }), this.ctx.lastPoint = new c(x.x, x.y);
  8028. }, _.prototype.lineTo = function(x, B) {
  8029. if (isNaN(x) || isNaN(B)) throw Le.error("jsPDF.context2d.lineTo: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.lineTo");
  8030. var T = this.ctx.transform.applyToPoint(new c(x, B));
  8031. this.path.push({ type: "lt", x: T.x, y: T.y }), this.ctx.lastPoint = new c(T.x, T.y);
  8032. }, _.prototype.clip = function() {
  8033. this.ctx.clip_path = JSON.parse(JSON.stringify(this.path)), q.call(this, null, !0);
  8034. }, _.prototype.quadraticCurveTo = function(x, B, T, H) {
  8035. if (isNaN(T) || isNaN(H) || isNaN(x) || isNaN(B)) throw Le.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");
  8036. var J = this.ctx.transform.applyToPoint(new c(T, H)), Z = this.ctx.transform.applyToPoint(new c(x, B));
  8037. this.path.push({ type: "qct", x1: Z.x, y1: Z.y, x: J.x, y: J.y }), this.ctx.lastPoint = new c(J.x, J.y);
  8038. }, _.prototype.bezierCurveTo = function(x, B, T, H, J, Z) {
  8039. if (isNaN(J) || isNaN(Z) || isNaN(x) || isNaN(B) || isNaN(T) || isNaN(H)) throw Le.error("jsPDF.context2d.bezierCurveTo: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");
  8040. var at = this.ctx.transform.applyToPoint(new c(J, Z)), st = this.ctx.transform.applyToPoint(new c(x, B)), gt = this.ctx.transform.applyToPoint(new c(T, H));
  8041. this.path.push({ type: "bct", x1: st.x, y1: st.y, x2: gt.x, y2: gt.y, x: at.x, y: at.y }), this.ctx.lastPoint = new c(at.x, at.y);
  8042. }, _.prototype.arc = function(x, B, T, H, J, Z) {
  8043. if (isNaN(x) || isNaN(B) || isNaN(T) || isNaN(H) || isNaN(J)) throw Le.error("jsPDF.context2d.arc: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.arc");
  8044. if (Z = !!Z, !this.ctx.transform.isIdentity) {
  8045. var at = this.ctx.transform.applyToPoint(new c(x, B));
  8046. x = at.x, B = at.y;
  8047. var st = this.ctx.transform.applyToPoint(new c(0, T)), gt = this.ctx.transform.applyToPoint(new c(0, 0));
  8048. T = Math.sqrt(Math.pow(st.x - gt.x, 2) + Math.pow(st.y - gt.y, 2));
  8049. }
  8050. Math.abs(J - H) >= 2 * Math.PI && (H = 0, J = 2 * Math.PI), this.path.push({ type: "arc", x, y: B, radius: T, startAngle: H, endAngle: J, counterclockwise: Z });
  8051. }, _.prototype.arcTo = function(x, B, T, H, J) {
  8052. throw new Error("arcTo not implemented.");
  8053. }, _.prototype.rect = function(x, B, T, H) {
  8054. if (isNaN(x) || isNaN(B) || isNaN(T) || isNaN(H)) throw Le.error("jsPDF.context2d.rect: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.rect");
  8055. this.moveTo(x, B), this.lineTo(x + T, B), this.lineTo(x + T, B + H), this.lineTo(x, B + H), this.lineTo(x, B), this.lineTo(x + T, B), this.lineTo(x, B);
  8056. }, _.prototype.fillRect = function(x, B, T, H) {
  8057. if (isNaN(x) || isNaN(B) || isNaN(T) || isNaN(H)) throw Le.error("jsPDF.context2d.fillRect: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.fillRect");
  8058. if (!p.call(this)) {
  8059. var J = {};
  8060. this.lineCap !== "butt" && (J.lineCap = this.lineCap, this.lineCap = "butt"), this.lineJoin !== "miter" && (J.lineJoin = this.lineJoin, this.lineJoin = "miter"), this.beginPath(), this.rect(x, B, T, H), this.fill(), J.hasOwnProperty("lineCap") && (this.lineCap = J.lineCap), J.hasOwnProperty("lineJoin") && (this.lineJoin = J.lineJoin);
  8061. }
  8062. }, _.prototype.strokeRect = function(x, B, T, H) {
  8063. if (isNaN(x) || isNaN(B) || isNaN(T) || isNaN(H)) throw Le.error("jsPDF.context2d.strokeRect: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");
  8064. j.call(this) || (this.beginPath(), this.rect(x, B, T, H), this.stroke());
  8065. }, _.prototype.clearRect = function(x, B, T, H) {
  8066. if (isNaN(x) || isNaN(B) || isNaN(T) || isNaN(H)) throw Le.error("jsPDF.context2d.clearRect: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.clearRect");
  8067. this.ignoreClearRect || (this.fillStyle = "#ffffff", this.fillRect(x, B, T, H));
  8068. }, _.prototype.save = function(x) {
  8069. x = typeof x != "boolean" || x;
  8070. for (var B = this.pdf.internal.getCurrentPageInfo().pageNumber, T = 0; T < this.pdf.internal.getNumberOfPages(); T++) this.pdf.setPage(T + 1), this.pdf.internal.out("q");
  8071. if (this.pdf.setPage(B), x) {
  8072. this.ctx.fontSize = this.pdf.internal.getFontSize();
  8073. var H = new m(this.ctx);
  8074. this.ctxStack.push(this.ctx), this.ctx = H;
  8075. }
  8076. }, _.prototype.restore = function(x) {
  8077. x = typeof x != "boolean" || x;
  8078. for (var B = this.pdf.internal.getCurrentPageInfo().pageNumber, T = 0; T < this.pdf.internal.getNumberOfPages(); T++) this.pdf.setPage(T + 1), this.pdf.internal.out("Q");
  8079. this.pdf.setPage(B), x && this.ctxStack.length !== 0 && (this.ctx = this.ctxStack.pop(), this.fillStyle = this.ctx.fillStyle, this.strokeStyle = this.ctx.strokeStyle, this.font = this.ctx.font, this.lineCap = this.ctx.lineCap, this.lineWidth = this.ctx.lineWidth, this.lineJoin = this.ctx.lineJoin, this.lineDash = this.ctx.lineDash, this.lineDashOffset = this.ctx.lineDashOffset);
  8080. }, _.prototype.toDataURL = function() {
  8081. throw new Error("toDataUrl not implemented.");
  8082. };
  8083. var k = function(x) {
  8084. var B, T, H, J;
  8085. if (x.isCanvasGradient === !0 && (x = x.getColor()), !x) return { r: 0, g: 0, b: 0, a: 0, style: x };
  8086. if (/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(x)) B = 0, T = 0, H = 0, J = 0;
  8087. else {
  8088. var Z = /rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(x);
  8089. if (Z !== null) B = parseInt(Z[1]), T = parseInt(Z[2]), H = parseInt(Z[3]), J = 1;
  8090. else if ((Z = /rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(x)) !== null) B = parseInt(Z[1]), T = parseInt(Z[2]), H = parseInt(Z[3]), J = parseFloat(Z[4]);
  8091. else {
  8092. if (J = 1, typeof x == "string" && x.charAt(0) !== "#") {
  8093. var at = new kh(x);
  8094. x = at.ok ? at.toHex() : "#000000";
  8095. }
  8096. x.length === 4 ? (B = x.substring(1, 2), B += B, T = x.substring(2, 3), T += T, H = x.substring(3, 4), H += H) : (B = x.substring(1, 3), T = x.substring(3, 5), H = x.substring(5, 7)), B = parseInt(B, 16), T = parseInt(T, 16), H = parseInt(H, 16);
  8097. }
  8098. }
  8099. return { r: B, g: T, b: H, a: J, style: x };
  8100. }, p = function() {
  8101. return this.ctx.isFillTransparent || this.globalAlpha == 0;
  8102. }, j = function() {
  8103. return !!(this.ctx.isStrokeTransparent || this.globalAlpha == 0);
  8104. };
  8105. _.prototype.fillText = function(x, B, T, H) {
  8106. if (isNaN(B) || isNaN(T) || typeof x != "string") throw Le.error("jsPDF.context2d.fillText: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.fillText");
  8107. if (H = isNaN(H) ? void 0 : H, !p.call(this)) {
  8108. var J = nt(this.ctx.transform.rotation), Z = this.ctx.transform.scaleX;
  8109. E.call(this, { text: x, x: B, y: T, scale: Z, angle: J, align: this.textAlign, maxWidth: H });
  8110. }
  8111. }, _.prototype.strokeText = function(x, B, T, H) {
  8112. if (isNaN(B) || isNaN(T) || typeof x != "string") throw Le.error("jsPDF.context2d.strokeText: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.strokeText");
  8113. if (!j.call(this)) {
  8114. H = isNaN(H) ? void 0 : H;
  8115. var J = nt(this.ctx.transform.rotation), Z = this.ctx.transform.scaleX;
  8116. E.call(this, { text: x, x: B, y: T, scale: Z, renderingMode: "stroke", angle: J, align: this.textAlign, maxWidth: H });
  8117. }
  8118. }, _.prototype.measureText = function(x) {
  8119. if (typeof x != "string") throw Le.error("jsPDF.context2d.measureText: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.measureText");
  8120. var B = this.pdf, T = this.pdf.internal.scaleFactor, H = B.internal.getFontSize(), J = B.getStringUnitWidth(x) * H / B.internal.scaleFactor;
  8121. return new function(Z) {
  8122. var at = (Z = Z || {}).width || 0;
  8123. return Object.defineProperty(this, "width", { get: function() {
  8124. return at;
  8125. } }), this;
  8126. }({ width: J *= Math.round(96 * T / 72 * 1e4) / 1e4 });
  8127. }, _.prototype.scale = function(x, B) {
  8128. if (isNaN(x) || isNaN(B)) throw Le.error("jsPDF.context2d.scale: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.scale");
  8129. var T = new f(x, 0, 0, B, 0, 0);
  8130. this.ctx.transform = this.ctx.transform.multiply(T);
  8131. }, _.prototype.rotate = function(x) {
  8132. if (isNaN(x)) throw Le.error("jsPDF.context2d.rotate: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.rotate");
  8133. var B = new f(Math.cos(x), Math.sin(x), -Math.sin(x), Math.cos(x), 0, 0);
  8134. this.ctx.transform = this.ctx.transform.multiply(B);
  8135. }, _.prototype.translate = function(x, B) {
  8136. if (isNaN(x) || isNaN(B)) throw Le.error("jsPDF.context2d.translate: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.translate");
  8137. var T = new f(1, 0, 0, 1, x, B);
  8138. this.ctx.transform = this.ctx.transform.multiply(T);
  8139. }, _.prototype.transform = function(x, B, T, H, J, Z) {
  8140. if (isNaN(x) || isNaN(B) || isNaN(T) || isNaN(H) || isNaN(J) || isNaN(Z)) throw Le.error("jsPDF.context2d.transform: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.transform");
  8141. var at = new f(x, B, T, H, J, Z);
  8142. this.ctx.transform = this.ctx.transform.multiply(at);
  8143. }, _.prototype.setTransform = function(x, B, T, H, J, Z) {
  8144. x = isNaN(x) ? 1 : x, B = isNaN(B) ? 0 : B, T = isNaN(T) ? 0 : T, H = isNaN(H) ? 1 : H, J = isNaN(J) ? 0 : J, Z = isNaN(Z) ? 0 : Z, this.ctx.transform = new f(x, B, T, H, J, Z);
  8145. };
  8146. var O = function() {
  8147. return this.margin[0] > 0 || this.margin[1] > 0 || this.margin[2] > 0 || this.margin[3] > 0;
  8148. };
  8149. _.prototype.drawImage = function(x, B, T, H, J, Z, at, st, gt) {
  8150. var _t = this.pdf.getImageProperties(x), kt = 1, St = 1, Dt = 1, P = 1;
  8151. H !== void 0 && st !== void 0 && (Dt = st / H, P = gt / J, kt = _t.width / H * st / H, St = _t.height / J * gt / J), Z === void 0 && (Z = B, at = T, B = 0, T = 0), H !== void 0 && st === void 0 && (st = H, gt = J), H === void 0 && st === void 0 && (st = _t.width, gt = _t.height);
  8152. var Lt = this.ctx.transform.decompose(), ae = nt(Lt.rotate.shx), Ht = new f(), yt = (Ht = (Ht = (Ht = Ht.multiply(Lt.translate)).multiply(Lt.skew)).multiply(Lt.scale)).applyToRectangle(new l(Z - B * Dt, at - T * P, H * kt, J * St));
  8153. if (this.autoPaging) {
  8154. for (var Wt, It = M.call(this, yt), zt = [], qt = 0; qt < It.length; qt += 1) zt.indexOf(It[qt]) === -1 && zt.push(It[qt]);
  8155. G(zt);
  8156. for (var ve = zt[0], ue = zt[zt.length - 1], Zt = ve; Zt < ue + 1; Zt++) {
  8157. this.pdf.setPage(Zt);
  8158. var fe = this.pdf.internal.pageSize.width - this.margin[3] - this.margin[1], he = Zt === 1 ? this.posY + this.margin[0] : this.margin[0], Bt = this.pdf.internal.pageSize.height - this.posY - this.margin[0] - this.margin[2], ne = this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2], Rt = Zt === 1 ? 0 : Bt + (Zt - 2) * ne;
  8159. if (this.ctx.clip_path.length !== 0) {
  8160. var He = this.path;
  8161. Wt = JSON.parse(JSON.stringify(this.ctx.clip_path)), this.path = V(Wt, this.posX + this.margin[3], -Rt + he + this.ctx.prevPageLastElemOffset), it.call(this, "fill", !0), this.path = He;
  8162. }
  8163. var ge = JSON.parse(JSON.stringify(yt));
  8164. ge = V([ge], this.posX + this.margin[3], -Rt + he + this.ctx.prevPageLastElemOffset)[0];
  8165. var se = (Zt > ve || Zt < ue) && O.call(this);
  8166. se && (this.pdf.saveGraphicsState(), this.pdf.rect(this.margin[3], this.margin[0], fe, ne, null).clip().discardPath()), this.pdf.addImage(x, "JPEG", ge.x, ge.y, ge.w, ge.h, null, null, ae), se && this.pdf.restoreGraphicsState();
  8167. }
  8168. } else this.pdf.addImage(x, "JPEG", yt.x, yt.y, yt.w, yt.h, null, null, ae);
  8169. };
  8170. var M = function(x, B, T) {
  8171. var H = [];
  8172. B = B || this.pdf.internal.pageSize.width, T = T || this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];
  8173. var J = this.posY + this.ctx.prevPageLastElemOffset;
  8174. switch (x.type) {
  8175. default:
  8176. case "mt":
  8177. case "lt":
  8178. H.push(Math.floor((x.y + J) / T) + 1);
  8179. break;
  8180. case "arc":
  8181. H.push(Math.floor((x.y + J - x.radius) / T) + 1), H.push(Math.floor((x.y + J + x.radius) / T) + 1);
  8182. break;
  8183. case "qct":
  8184. var Z = ct(this.ctx.lastPoint.x, this.ctx.lastPoint.y, x.x1, x.y1, x.x, x.y);
  8185. H.push(Math.floor((Z.y + J) / T) + 1), H.push(Math.floor((Z.y + Z.h + J) / T) + 1);
  8186. break;
  8187. case "bct":
  8188. var at = At(this.ctx.lastPoint.x, this.ctx.lastPoint.y, x.x1, x.y1, x.x2, x.y2, x.x, x.y);
  8189. H.push(Math.floor((at.y + J) / T) + 1), H.push(Math.floor((at.y + at.h + J) / T) + 1);
  8190. break;
  8191. case "rect":
  8192. H.push(Math.floor((x.y + J) / T) + 1), H.push(Math.floor((x.y + x.h + J) / T) + 1);
  8193. }
  8194. for (var st = 0; st < H.length; st += 1) for (; this.pdf.internal.getNumberOfPages() < H[st]; ) S.call(this);
  8195. return H;
  8196. }, S = function() {
  8197. var x = this.fillStyle, B = this.strokeStyle, T = this.font, H = this.lineCap, J = this.lineWidth, Z = this.lineJoin;
  8198. this.pdf.addPage(), this.fillStyle = x, this.strokeStyle = B, this.font = T, this.lineCap = H, this.lineWidth = J, this.lineJoin = Z;
  8199. }, V = function(x, B, T) {
  8200. for (var H = 0; H < x.length; H++) switch (x[H].type) {
  8201. case "bct":
  8202. x[H].x2 += B, x[H].y2 += T;
  8203. case "qct":
  8204. x[H].x1 += B, x[H].y1 += T;
  8205. default:
  8206. x[H].x += B, x[H].y += T;
  8207. }
  8208. return x;
  8209. }, G = function(x) {
  8210. return x.sort(function(B, T) {
  8211. return B - T;
  8212. });
  8213. }, q = function(x, B) {
  8214. var T = this.fillStyle, H = this.strokeStyle, J = this.lineCap, Z = this.lineWidth, at = Math.abs(Z * this.ctx.transform.scaleX), st = this.lineJoin;
  8215. if (this.autoPaging) {
  8216. for (var gt, _t, kt = JSON.parse(JSON.stringify(this.path)), St = JSON.parse(JSON.stringify(this.path)), Dt = [], P = 0; P < St.length; P++) if (St[P].x !== void 0) for (var Lt = M.call(this, St[P]), ae = 0; ae < Lt.length; ae += 1) Dt.indexOf(Lt[ae]) === -1 && Dt.push(Lt[ae]);
  8217. for (var Ht = 0; Ht < Dt.length; Ht++) for (; this.pdf.internal.getNumberOfPages() < Dt[Ht]; ) S.call(this);
  8218. G(Dt);
  8219. for (var yt = Dt[0], Wt = Dt[Dt.length - 1], It = yt; It < Wt + 1; It++) {
  8220. this.pdf.setPage(It), this.fillStyle = T, this.strokeStyle = H, this.lineCap = J, this.lineWidth = at, this.lineJoin = st;
  8221. var zt = this.pdf.internal.pageSize.width - this.margin[3] - this.margin[1], qt = It === 1 ? this.posY + this.margin[0] : this.margin[0], ve = this.pdf.internal.pageSize.height - this.posY - this.margin[0] - this.margin[2], ue = this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2], Zt = It === 1 ? 0 : ve + (It - 2) * ue;
  8222. if (this.ctx.clip_path.length !== 0) {
  8223. var fe = this.path;
  8224. gt = JSON.parse(JSON.stringify(this.ctx.clip_path)), this.path = V(gt, this.posX + this.margin[3], -Zt + qt + this.ctx.prevPageLastElemOffset), it.call(this, x, !0), this.path = fe;
  8225. }
  8226. if (_t = JSON.parse(JSON.stringify(kt)), this.path = V(_t, this.posX + this.margin[3], -Zt + qt + this.ctx.prevPageLastElemOffset), B === !1 || It === 0) {
  8227. var he = (It > yt || It < Wt) && O.call(this);
  8228. he && (this.pdf.saveGraphicsState(), this.pdf.rect(this.margin[3], this.margin[0], zt, ue, null).clip().discardPath()), it.call(this, x, B), he && this.pdf.restoreGraphicsState();
  8229. }
  8230. this.lineWidth = Z;
  8231. }
  8232. this.path = kt;
  8233. } else this.lineWidth = at, it.call(this, x, B), this.lineWidth = Z;
  8234. }, it = function(x, B) {
  8235. if ((x !== "stroke" || B || !j.call(this)) && (x === "stroke" || B || !p.call(this))) {
  8236. for (var T, H, J = [], Z = this.path, at = 0; at < Z.length; at++) {
  8237. var st = Z[at];
  8238. switch (st.type) {
  8239. case "begin":
  8240. J.push({ begin: !0 });
  8241. break;
  8242. case "close":
  8243. J.push({ close: !0 });
  8244. break;
  8245. case "mt":
  8246. J.push({ start: st, deltas: [], abs: [] });
  8247. break;
  8248. case "lt":
  8249. var gt = J.length;
  8250. if (Z[at - 1] && !isNaN(Z[at - 1].x) && (T = [st.x - Z[at - 1].x, st.y - Z[at - 1].y], gt > 0)) {
  8251. for (; gt >= 0; gt--) if (J[gt - 1].close !== !0 && J[gt - 1].begin !== !0) {
  8252. J[gt - 1].deltas.push(T), J[gt - 1].abs.push(st);
  8253. break;
  8254. }
  8255. }
  8256. break;
  8257. case "bct":
  8258. T = [st.x1 - Z[at - 1].x, st.y1 - Z[at - 1].y, st.x2 - Z[at - 1].x, st.y2 - Z[at - 1].y, st.x - Z[at - 1].x, st.y - Z[at - 1].y], J[J.length - 1].deltas.push(T);
  8259. break;
  8260. case "qct":
  8261. var _t = Z[at - 1].x + 2 / 3 * (st.x1 - Z[at - 1].x), kt = Z[at - 1].y + 2 / 3 * (st.y1 - Z[at - 1].y), St = st.x + 2 / 3 * (st.x1 - st.x), Dt = st.y + 2 / 3 * (st.y1 - st.y), P = st.x, Lt = st.y;
  8262. T = [_t - Z[at - 1].x, kt - Z[at - 1].y, St - Z[at - 1].x, Dt - Z[at - 1].y, P - Z[at - 1].x, Lt - Z[at - 1].y], J[J.length - 1].deltas.push(T);
  8263. break;
  8264. case "arc":
  8265. J.push({ deltas: [], abs: [], arc: !0 }), Array.isArray(J[J.length - 1].abs) && J[J.length - 1].abs.push(st);
  8266. }
  8267. }
  8268. H = B ? null : x === "stroke" ? "stroke" : "fill";
  8269. for (var ae = !1, Ht = 0; Ht < J.length; Ht++) if (J[Ht].arc) for (var yt = J[Ht].abs, Wt = 0; Wt < yt.length; Wt++) {
  8270. var It = yt[Wt];
  8271. It.type === "arc" ? X.call(this, It.x, It.y, It.radius, It.startAngle, It.endAngle, It.counterclockwise, void 0, B, !ae) : z.call(this, It.x, It.y), ae = !0;
  8272. }
  8273. else if (J[Ht].close === !0) this.pdf.internal.out("h"), ae = !1;
  8274. else if (J[Ht].begin !== !0) {
  8275. var zt = J[Ht].start.x, qt = J[Ht].start.y;
  8276. U.call(this, J[Ht].deltas, zt, qt), ae = !0;
  8277. }
  8278. H && R.call(this, H), B && tt.call(this);
  8279. }
  8280. }, vt = function(x) {
  8281. var B = this.pdf.internal.getFontSize() / this.pdf.internal.scaleFactor, T = B * (this.pdf.internal.getLineHeightFactor() - 1);
  8282. switch (this.ctx.textBaseline) {
  8283. case "bottom":
  8284. return x - T;
  8285. case "top":
  8286. return x + B - T;
  8287. case "hanging":
  8288. return x + B - 2 * T;
  8289. case "middle":
  8290. return x + B / 2 - T;
  8291. default:
  8292. return x;
  8293. }
  8294. }, dt = function(x) {
  8295. return x + this.pdf.internal.getFontSize() / this.pdf.internal.scaleFactor * (this.pdf.internal.getLineHeightFactor() - 1);
  8296. };
  8297. _.prototype.createLinearGradient = function() {
  8298. var x = function() {
  8299. };
  8300. return x.colorStops = [], x.addColorStop = function(B, T) {
  8301. this.colorStops.push([B, T]);
  8302. }, x.getColor = function() {
  8303. return this.colorStops.length === 0 ? "#000000" : this.colorStops[0][1];
  8304. }, x.isCanvasGradient = !0, x;
  8305. }, _.prototype.createPattern = function() {
  8306. return this.createLinearGradient();
  8307. }, _.prototype.createRadialGradient = function() {
  8308. return this.createLinearGradient();
  8309. };
  8310. var X = function(x, B, T, H, J, Z, at, st, gt) {
  8311. for (var _t = ot.call(this, T, H, J, Z), kt = 0; kt < _t.length; kt++) {
  8312. var St = _t[kt];
  8313. kt === 0 && (gt ? N.call(this, St.x1 + x, St.y1 + B) : z.call(this, St.x1 + x, St.y1 + B)), rt.call(this, x, B, St.x2, St.y2, St.x3, St.y3, St.x4, St.y4);
  8314. }
  8315. st ? tt.call(this) : R.call(this, at);
  8316. }, R = function(x) {
  8317. switch (x) {
  8318. case "stroke":
  8319. this.pdf.internal.out("S");
  8320. break;
  8321. case "fill":
  8322. this.pdf.internal.out("f");
  8323. }
  8324. }, tt = function() {
  8325. this.pdf.clip(), this.pdf.discardPath();
  8326. }, N = function(x, B) {
  8327. this.pdf.internal.out(t(x) + " " + i(B) + " m");
  8328. }, E = function(x) {
  8329. var B;
  8330. switch (x.align) {
  8331. case "right":
  8332. case "end":
  8333. B = "right";
  8334. break;
  8335. case "center":
  8336. B = "center";
  8337. break;
  8338. default:
  8339. B = "left";
  8340. }
  8341. var T, H, J, Z = this.pdf.getTextDimensions(x.text), at = vt.call(this, x.y), st = dt.call(this, at) - Z.h, gt = this.ctx.transform.applyToPoint(new c(x.x, at));
  8342. if (this.autoPaging) {
  8343. var _t = this.ctx.transform.decompose(), kt = new f();
  8344. kt = (kt = (kt = kt.multiply(_t.translate)).multiply(_t.skew)).multiply(_t.scale);
  8345. for (var St = this.ctx.transform.applyToRectangle(new l(x.x, at, Z.w, Z.h)), Dt = kt.applyToRectangle(new l(x.x, st, Z.w, Z.h)), P = M.call(this, Dt), Lt = [], ae = 0; ae < P.length; ae += 1) Lt.indexOf(P[ae]) === -1 && Lt.push(P[ae]);
  8346. G(Lt);
  8347. for (var Ht = Lt[0], yt = Lt[Lt.length - 1], Wt = Ht; Wt < yt + 1; Wt++) {
  8348. this.pdf.setPage(Wt);
  8349. var It = Wt === 1 ? this.posY + this.margin[0] : this.margin[0], zt = this.pdf.internal.pageSize.height - this.posY - this.margin[0] - this.margin[2], qt = this.pdf.internal.pageSize.height - this.margin[2], ve = qt - this.margin[0], ue = this.pdf.internal.pageSize.width - this.margin[1], Zt = ue - this.margin[3], fe = Wt === 1 ? 0 : zt + (Wt - 2) * ve;
  8350. if (this.ctx.clip_path.length !== 0) {
  8351. var he = this.path;
  8352. T = JSON.parse(JSON.stringify(this.ctx.clip_path)), this.path = V(T, this.posX + this.margin[3], -1 * fe + It), it.call(this, "fill", !0), this.path = he;
  8353. }
  8354. var Bt = V([JSON.parse(JSON.stringify(Dt))], this.posX + this.margin[3], -fe + It + this.ctx.prevPageLastElemOffset)[0];
  8355. x.scale >= 0.01 && (H = this.pdf.internal.getFontSize(), this.pdf.setFontSize(H * x.scale), J = this.lineWidth, this.lineWidth = J * x.scale);
  8356. var ne = this.autoPaging !== "text";
  8357. if (ne || Bt.y + Bt.h <= qt) {
  8358. if (ne || Bt.y >= It && Bt.x <= ue) {
  8359. var Rt = ne ? x.text : this.pdf.splitTextToSize(x.text, x.maxWidth || ue - Bt.x)[0], He = V([JSON.parse(JSON.stringify(St))], this.posX + this.margin[3], -fe + It + this.ctx.prevPageLastElemOffset)[0], ge = ne && (Wt > Ht || Wt < yt) && O.call(this);
  8360. ge && (this.pdf.saveGraphicsState(), this.pdf.rect(this.margin[3], this.margin[0], Zt, ve, null).clip().discardPath()), this.pdf.text(Rt, He.x, He.y, { angle: x.angle, align: B, renderingMode: x.renderingMode }), ge && this.pdf.restoreGraphicsState();
  8361. }
  8362. } else Bt.y < qt && (this.ctx.prevPageLastElemOffset += qt - Bt.y);
  8363. x.scale >= 0.01 && (this.pdf.setFontSize(H), this.lineWidth = J);
  8364. }
  8365. } else x.scale >= 0.01 && (H = this.pdf.internal.getFontSize(), this.pdf.setFontSize(H * x.scale), J = this.lineWidth, this.lineWidth = J * x.scale), this.pdf.text(x.text, gt.x + this.posX, gt.y + this.posY, { angle: x.angle, align: B, renderingMode: x.renderingMode, maxWidth: x.maxWidth }), x.scale >= 0.01 && (this.pdf.setFontSize(H), this.lineWidth = J);
  8366. }, z = function(x, B, T, H) {
  8367. T = T || 0, H = H || 0, this.pdf.internal.out(t(x + T) + " " + i(B + H) + " l");
  8368. }, U = function(x, B, T) {
  8369. return this.pdf.lines(x, B, T, null, null);
  8370. }, rt = function(x, B, T, H, J, Z, at, st) {
  8371. this.pdf.internal.out([e(s(T + x)), e(a(H + B)), e(s(J + x)), e(a(Z + B)), e(s(at + x)), e(a(st + B)), "c"].join(" "));
  8372. }, ot = function(x, B, T, H) {
  8373. for (var J = 2 * Math.PI, Z = Math.PI / 2; B > T; ) B -= J;
  8374. var at = Math.abs(T - B);
  8375. at < J && H && (at = J - at);
  8376. for (var st = [], gt = H ? -1 : 1, _t = B; at > 1e-5; ) {
  8377. var kt = _t + gt * Math.min(at, Z);
  8378. st.push(ht.call(this, x, _t, kt)), at -= Math.abs(kt - _t), _t = kt;
  8379. }
  8380. return st;
  8381. }, ht = function(x, B, T) {
  8382. var H = (T - B) / 2, J = x * Math.cos(H), Z = x * Math.sin(H), at = J, st = -Z, gt = at * at + st * st, _t = gt + at * J + st * Z, kt = 4 / 3 * (Math.sqrt(2 * gt * _t) - _t) / (at * Z - st * J), St = at - kt * st, Dt = st + kt * at, P = St, Lt = -Dt, ae = H + B, Ht = Math.cos(ae), yt = Math.sin(ae);
  8383. return { x1: x * Math.cos(B), y1: x * Math.sin(B), x2: St * Ht - Dt * yt, y2: St * yt + Dt * Ht, x3: P * Ht - Lt * yt, y3: P * yt + Lt * Ht, x4: x * Math.cos(T), y4: x * Math.sin(T) };
  8384. }, nt = function(x) {
  8385. return 180 * x / Math.PI;
  8386. }, ct = function(x, B, T, H, J, Z) {
  8387. var at = x + 0.5 * (T - x), st = B + 0.5 * (H - B), gt = J + 0.5 * (T - J), _t = Z + 0.5 * (H - Z), kt = Math.min(x, J, at, gt), St = Math.max(x, J, at, gt), Dt = Math.min(B, Z, st, _t), P = Math.max(B, Z, st, _t);
  8388. return new l(kt, Dt, St - kt, P - Dt);
  8389. }, At = function(x, B, T, H, J, Z, at, st) {
  8390. var gt, _t, kt, St, Dt, P, Lt, ae, Ht, yt, Wt, It, zt, qt, ve = T - x, ue = H - B, Zt = J - T, fe = Z - H, he = at - J, Bt = st - Z;
  8391. for (_t = 0; _t < 41; _t++) Ht = (Lt = (kt = x + (gt = _t / 40) * ve) + gt * ((Dt = T + gt * Zt) - kt)) + gt * (Dt + gt * (J + gt * he - Dt) - Lt), yt = (ae = (St = B + gt * ue) + gt * ((P = H + gt * fe) - St)) + gt * (P + gt * (Z + gt * Bt - P) - ae), _t == 0 ? (Wt = Ht, It = yt, zt = Ht, qt = yt) : (Wt = Math.min(Wt, Ht), It = Math.min(It, yt), zt = Math.max(zt, Ht), qt = Math.max(qt, yt));
  8392. return new l(Math.round(Wt), Math.round(It), Math.round(zt - Wt), Math.round(qt - It));
  8393. }, wt = function() {
  8394. if (this.prevLineDash || this.ctx.lineDash.length || this.ctx.lineDashOffset) {
  8395. var x, B, T = (x = this.ctx.lineDash, B = this.ctx.lineDashOffset, JSON.stringify({ lineDash: x, lineDashOffset: B }));
  8396. this.prevLineDash !== T && (this.pdf.setLineDash(this.ctx.lineDash, this.ctx.lineDashOffset), this.prevLineDash = T);
  8397. }
  8398. };
  8399. })(Tt.API), /**
  8400. * @license
  8401. * jsPDF filters PlugIn
  8402. * Copyright (c) 2014 Aras Abbasi
  8403. *
  8404. * Licensed under the MIT License.
  8405. * http://opensource.org/licenses/mit-license
  8406. */
  8407. function(n) {
  8408. var e = function(c) {
  8409. var l, f, d, m, _, k, p, j, O, M;
  8410. for (f = [], d = 0, m = (c += l = "\0\0\0\0".slice(c.length % 4 || 4)).length; m > d; d += 4) (_ = (c.charCodeAt(d) << 24) + (c.charCodeAt(d + 1) << 16) + (c.charCodeAt(d + 2) << 8) + c.charCodeAt(d + 3)) !== 0 ? (k = (_ = ((_ = ((_ = ((_ = (_ - (M = _ % 85)) / 85) - (O = _ % 85)) / 85) - (j = _ % 85)) / 85) - (p = _ % 85)) / 85) % 85, f.push(k + 33, p + 33, j + 33, O + 33, M + 33)) : f.push(122);
  8411. return function(S, V) {
  8412. for (var G = V; G > 0; G--) S.pop();
  8413. }(f, l.length), String.fromCharCode.apply(String, f) + "~>";
  8414. }, t = function(c) {
  8415. var l, f, d, m, _, k = String, p = "length", j = 255, O = "charCodeAt", M = "slice", S = "replace";
  8416. for (c[M](-2), c = c[M](0, -2)[S](/\s/g, "")[S]("z", "!!!!!"), d = [], m = 0, _ = (c += l = "uuuuu"[M](c[p] % 5 || 5))[p]; _ > m; m += 5) f = 52200625 * (c[O](m) - 33) + 614125 * (c[O](m + 1) - 33) + 7225 * (c[O](m + 2) - 33) + 85 * (c[O](m + 3) - 33) + (c[O](m + 4) - 33), d.push(j & f >> 24, j & f >> 16, j & f >> 8, j & f);
  8417. return function(V, G) {
  8418. for (var q = G; q > 0; q--) V.pop();
  8419. }(d, l[p]), k.fromCharCode.apply(k, d);
  8420. }, i = function(c) {
  8421. return c.split("").map(function(l) {
  8422. return ("0" + l.charCodeAt().toString(16)).slice(-2);
  8423. }).join("") + ">";
  8424. }, s = function(c) {
  8425. var l = new RegExp(/^([0-9A-Fa-f]{2})+$/);
  8426. if ((c = c.replace(/\s/g, "")).indexOf(">") !== -1 && (c = c.substr(0, c.indexOf(">"))), c.length % 2 && (c += "0"), l.test(c) === !1) return "";
  8427. for (var f = "", d = 0; d < c.length; d += 2) f += String.fromCharCode("0x" + (c[d] + c[d + 1]));
  8428. return f;
  8429. }, a = function(c) {
  8430. for (var l = new Uint8Array(c.length), f = c.length; f--; ) l[f] = c.charCodeAt(f);
  8431. return (l = Uo(l)).reduce(function(d, m) {
  8432. return d + String.fromCharCode(m);
  8433. }, "");
  8434. };
  8435. n.processDataByFilters = function(c, l) {
  8436. var f = 0, d = c || "", m = [];
  8437. for (typeof (l = l || []) == "string" && (l = [l]), f = 0; f < l.length; f += 1) switch (l[f]) {
  8438. case "ASCII85Decode":
  8439. case "/ASCII85Decode":
  8440. d = t(d), m.push("/ASCII85Encode");
  8441. break;
  8442. case "ASCII85Encode":
  8443. case "/ASCII85Encode":
  8444. d = e(d), m.push("/ASCII85Decode");
  8445. break;
  8446. case "ASCIIHexDecode":
  8447. case "/ASCIIHexDecode":
  8448. d = s(d), m.push("/ASCIIHexEncode");
  8449. break;
  8450. case "ASCIIHexEncode":
  8451. case "/ASCIIHexEncode":
  8452. d = i(d), m.push("/ASCIIHexDecode");
  8453. break;
  8454. case "FlateEncode":
  8455. case "/FlateEncode":
  8456. d = a(d), m.push("/FlateDecode");
  8457. break;
  8458. default:
  8459. throw new Error('The filter: "' + l[f] + '" is not implemented');
  8460. }
  8461. return { data: d, reverseChain: m.reverse().join(" ") };
  8462. };
  8463. }(Tt.API), /**
  8464. * @license
  8465. * jsPDF fileloading PlugIn
  8466. * Copyright (c) 2018 Aras Abbasi (aras.abbasi@gmail.com)
  8467. *
  8468. * Licensed under the MIT License.
  8469. * http://opensource.org/licenses/mit-license
  8470. */
  8471. function(n) {
  8472. n.loadFile = function(e, t, i) {
  8473. return function(s, a, c) {
  8474. a = a !== !1, c = typeof c == "function" ? c : function() {
  8475. };
  8476. var l = void 0;
  8477. try {
  8478. l = function(f, d, m) {
  8479. var _ = new XMLHttpRequest(), k = 0, p = function(j) {
  8480. var O = j.length, M = [], S = String.fromCharCode;
  8481. for (k = 0; k < O; k += 1) M.push(S(255 & j.charCodeAt(k)));
  8482. return M.join("");
  8483. };
  8484. if (_.open("GET", f, !d), _.overrideMimeType("text/plain; charset=x-user-defined"), d === !1 && (_.onload = function() {
  8485. _.status === 200 ? m(p(this.responseText)) : m(void 0);
  8486. }), _.send(null), d && _.status === 200) return p(_.responseText);
  8487. }(s, a, c);
  8488. } catch (f) {
  8489. }
  8490. return l;
  8491. }(e, t, i);
  8492. }, n.allowFsRead = void 0, n.loadImageFile = n.loadFile;
  8493. }(Tt.API), function(n) {
  8494. function e() {
  8495. return (Kt.html2canvas ? Promise.resolve(Kt.html2canvas) : import("./html2canvas.esm.js")).catch(function(l) {
  8496. return Promise.reject(new Error("Could not load html2canvas: " + l));
  8497. }).then(function(l) {
  8498. return l.default ? l.default : l;
  8499. });
  8500. }
  8501. function t() {
  8502. return (Kt.DOMPurify ? Promise.resolve(Kt.DOMPurify) : import("./purify.es.js")).catch(function(l) {
  8503. return Promise.reject(new Error("Could not load dompurify: " + l));
  8504. }).then(function(l) {
  8505. return l.default ? l.default : l;
  8506. });
  8507. }
  8508. var i = function(l) {
  8509. var f = Se(l);
  8510. return f === "undefined" ? "undefined" : f === "string" || l instanceof String ? "string" : f === "number" || l instanceof Number ? "number" : f === "function" || l instanceof Function ? "function" : l && l.constructor === Array ? "array" : l && l.nodeType === 1 ? "element" : f === "object" ? "object" : "unknown";
  8511. }, s = function(l, f) {
  8512. var d = document.createElement(l);
  8513. for (var m in f.className && (d.className = f.className), f.innerHTML && f.dompurify && (d.innerHTML = f.dompurify.sanitize(f.innerHTML)), f.style) d.style[m] = f.style[m];
  8514. return d;
  8515. }, a = function l(f, d) {
  8516. for (var m = f.nodeType === 3 ? document.createTextNode(f.nodeValue) : f.cloneNode(!1), _ = f.firstChild; _; _ = _.nextSibling) d !== !0 && _.nodeType === 1 && _.nodeName === "SCRIPT" || m.appendChild(l(_, d));
  8517. return f.nodeType === 1 && (f.nodeName === "CANVAS" ? (m.width = f.width, m.height = f.height, m.getContext("2d").drawImage(f, 0, 0)) : f.nodeName !== "TEXTAREA" && f.nodeName !== "SELECT" || (m.value = f.value), m.addEventListener("load", function() {
  8518. m.scrollTop = f.scrollTop, m.scrollLeft = f.scrollLeft;
  8519. }, !0)), m;
  8520. }, c = function l(f) {
  8521. var d = Object.assign(l.convert(Promise.resolve()), JSON.parse(JSON.stringify(l.template))), m = l.convert(Promise.resolve(), d);
  8522. return (m = m.setProgress(1, l, 1, [l])).set(f);
  8523. };
  8524. (c.prototype = Object.create(Promise.prototype)).constructor = c, c.convert = function(l, f) {
  8525. return l.__proto__ = f || c.prototype, l;
  8526. }, c.template = { prop: { src: null, container: null, overlay: null, canvas: null, img: null, pdf: null, pageSize: null, callback: function() {
  8527. } }, progress: { val: 0, state: null, n: 0, stack: [] }, opt: { filename: "file.pdf", margin: [0, 0, 0, 0], enableLinks: !0, x: 0, y: 0, html2canvas: {}, jsPDF: {}, backgroundColor: "transparent" } }, c.prototype.from = function(l, f) {
  8528. return this.then(function() {
  8529. switch (f = f || function(d) {
  8530. switch (i(d)) {
  8531. case "string":
  8532. return "string";
  8533. case "element":
  8534. return d.nodeName.toLowerCase() === "canvas" ? "canvas" : "element";
  8535. default:
  8536. return "unknown";
  8537. }
  8538. }(l), f) {
  8539. case "string":
  8540. return this.then(t).then(function(d) {
  8541. return this.set({ src: s("div", { innerHTML: l, dompurify: d }) });
  8542. });
  8543. case "element":
  8544. return this.set({ src: l });
  8545. case "canvas":
  8546. return this.set({ canvas: l });
  8547. case "img":
  8548. return this.set({ img: l });
  8549. default:
  8550. return this.error("Unknown source type.");
  8551. }
  8552. });
  8553. }, c.prototype.to = function(l) {
  8554. switch (l) {
  8555. case "container":
  8556. return this.toContainer();
  8557. case "canvas":
  8558. return this.toCanvas();
  8559. case "img":
  8560. return this.toImg();
  8561. case "pdf":
  8562. return this.toPdf();
  8563. default:
  8564. return this.error("Invalid target.");
  8565. }
  8566. }, c.prototype.toContainer = function() {
  8567. return this.thenList([function() {
  8568. return this.prop.src || this.error("Cannot duplicate - no source HTML.");
  8569. }, function() {
  8570. return this.prop.pageSize || this.setPageSize();
  8571. }]).then(function() {
  8572. var l = { position: "relative", display: "inline-block", width: (typeof this.opt.width != "number" || isNaN(this.opt.width) || typeof this.opt.windowWidth != "number" || isNaN(this.opt.windowWidth) ? Math.max(this.prop.src.clientWidth, this.prop.src.scrollWidth, this.prop.src.offsetWidth) : this.opt.windowWidth) + "px", left: 0, right: 0, top: 0, margin: "auto", backgroundColor: this.opt.backgroundColor }, f = a(this.prop.src, this.opt.html2canvas.javascriptEnabled);
  8573. f.tagName === "BODY" && (l.height = Math.max(document.body.scrollHeight, document.body.offsetHeight, document.documentElement.clientHeight, document.documentElement.scrollHeight, document.documentElement.offsetHeight) + "px"), this.prop.overlay = s("div", { className: "html2pdf__overlay", style: { position: "fixed", overflow: "hidden", zIndex: 1e3, left: "-100000px", right: 0, bottom: 0, top: 0 } }), this.prop.container = s("div", { className: "html2pdf__container", style: l }), this.prop.container.appendChild(f), this.prop.container.firstChild.appendChild(s("div", { style: { clear: "both", border: "0 none transparent", margin: 0, padding: 0, height: 0 } })), this.prop.container.style.float = "none", this.prop.overlay.appendChild(this.prop.container), document.body.appendChild(this.prop.overlay), this.prop.container.firstChild.style.position = "relative", this.prop.container.height = Math.max(this.prop.container.firstChild.clientHeight, this.prop.container.firstChild.scrollHeight, this.prop.container.firstChild.offsetHeight) + "px";
  8574. });
  8575. }, c.prototype.toCanvas = function() {
  8576. var l = [function() {
  8577. return document.body.contains(this.prop.container) || this.toContainer();
  8578. }];
  8579. return this.thenList(l).then(e).then(function(f) {
  8580. var d = Object.assign({}, this.opt.html2canvas);
  8581. return delete d.onrendered, f(this.prop.container, d);
  8582. }).then(function(f) {
  8583. (this.opt.html2canvas.onrendered || function() {
  8584. })(f), this.prop.canvas = f, document.body.removeChild(this.prop.overlay);
  8585. });
  8586. }, c.prototype.toContext2d = function() {
  8587. var l = [function() {
  8588. return document.body.contains(this.prop.container) || this.toContainer();
  8589. }];
  8590. return this.thenList(l).then(e).then(function(f) {
  8591. var d = this.opt.jsPDF, m = this.opt.fontFaces, _ = typeof this.opt.width != "number" || isNaN(this.opt.width) || typeof this.opt.windowWidth != "number" || isNaN(this.opt.windowWidth) ? 1 : this.opt.width / this.opt.windowWidth, k = Object.assign({ async: !0, allowTaint: !0, scale: _, scrollX: this.opt.scrollX || 0, scrollY: this.opt.scrollY || 0, backgroundColor: "#ffffff", imageTimeout: 15e3, logging: !0, proxy: null, removeContainer: !0, foreignObjectRendering: !1, useCORS: !1 }, this.opt.html2canvas);
  8592. if (delete k.onrendered, d.context2d.autoPaging = this.opt.autoPaging === void 0 || this.opt.autoPaging, d.context2d.posX = this.opt.x, d.context2d.posY = this.opt.y, d.context2d.margin = this.opt.margin, d.context2d.fontFaces = m, m) for (var p = 0; p < m.length; ++p) {
  8593. var j = m[p], O = j.src.find(function(M) {
  8594. return M.format === "truetype";
  8595. });
  8596. O && d.addFont(O.url, j.ref.name, j.ref.style);
  8597. }
  8598. return k.windowHeight = k.windowHeight || 0, k.windowHeight = k.windowHeight == 0 ? Math.max(this.prop.container.clientHeight, this.prop.container.scrollHeight, this.prop.container.offsetHeight) : k.windowHeight, d.context2d.save(!0), f(this.prop.container, k);
  8599. }).then(function(f) {
  8600. this.opt.jsPDF.context2d.restore(!0), (this.opt.html2canvas.onrendered || function() {
  8601. })(f), this.prop.canvas = f, document.body.removeChild(this.prop.overlay);
  8602. });
  8603. }, c.prototype.toImg = function() {
  8604. return this.thenList([function() {
  8605. return this.prop.canvas || this.toCanvas();
  8606. }]).then(function() {
  8607. var l = this.prop.canvas.toDataURL("image/" + this.opt.image.type, this.opt.image.quality);
  8608. this.prop.img = document.createElement("img"), this.prop.img.src = l;
  8609. });
  8610. }, c.prototype.toPdf = function() {
  8611. return this.thenList([function() {
  8612. return this.toContext2d();
  8613. }]).then(function() {
  8614. this.prop.pdf = this.prop.pdf || this.opt.jsPDF;
  8615. });
  8616. }, c.prototype.output = function(l, f, d) {
  8617. return (d = d || "pdf").toLowerCase() === "img" || d.toLowerCase() === "image" ? this.outputImg(l, f) : this.outputPdf(l, f);
  8618. }, c.prototype.outputPdf = function(l, f) {
  8619. return this.thenList([function() {
  8620. return this.prop.pdf || this.toPdf();
  8621. }]).then(function() {
  8622. return this.prop.pdf.output(l, f);
  8623. });
  8624. }, c.prototype.outputImg = function(l) {
  8625. return this.thenList([function() {
  8626. return this.prop.img || this.toImg();
  8627. }]).then(function() {
  8628. switch (l) {
  8629. case void 0:
  8630. case "img":
  8631. return this.prop.img;
  8632. case "datauristring":
  8633. case "dataurlstring":
  8634. return this.prop.img.src;
  8635. case "datauri":
  8636. case "dataurl":
  8637. return document.location.href = this.prop.img.src;
  8638. default:
  8639. throw 'Image output type "' + l + '" is not supported.';
  8640. }
  8641. });
  8642. }, c.prototype.save = function(l) {
  8643. return this.thenList([function() {
  8644. return this.prop.pdf || this.toPdf();
  8645. }]).set(l ? { filename: l } : null).then(function() {
  8646. this.prop.pdf.save(this.opt.filename);
  8647. });
  8648. }, c.prototype.doCallback = function() {
  8649. return this.thenList([function() {
  8650. return this.prop.pdf || this.toPdf();
  8651. }]).then(function() {
  8652. this.prop.callback(this.prop.pdf);
  8653. });
  8654. }, c.prototype.set = function(l) {
  8655. if (i(l) !== "object") return this;
  8656. var f = Object.keys(l || {}).map(function(d) {
  8657. if (d in c.template.prop) return function() {
  8658. this.prop[d] = l[d];
  8659. };
  8660. switch (d) {
  8661. case "margin":
  8662. return this.setMargin.bind(this, l.margin);
  8663. case "jsPDF":
  8664. return function() {
  8665. return this.opt.jsPDF = l.jsPDF, this.setPageSize();
  8666. };
  8667. case "pageSize":
  8668. return this.setPageSize.bind(this, l.pageSize);
  8669. default:
  8670. return function() {
  8671. this.opt[d] = l[d];
  8672. };
  8673. }
  8674. }, this);
  8675. return this.then(function() {
  8676. return this.thenList(f);
  8677. });
  8678. }, c.prototype.get = function(l, f) {
  8679. return this.then(function() {
  8680. var d = l in c.template.prop ? this.prop[l] : this.opt[l];
  8681. return f ? f(d) : d;
  8682. });
  8683. }, c.prototype.setMargin = function(l) {
  8684. return this.then(function() {
  8685. switch (i(l)) {
  8686. case "number":
  8687. l = [l, l, l, l];
  8688. case "array":
  8689. if (l.length === 2 && (l = [l[0], l[1], l[0], l[1]]), l.length === 4) break;
  8690. default:
  8691. return this.error("Invalid margin array.");
  8692. }
  8693. this.opt.margin = l;
  8694. }).then(this.setPageSize);
  8695. }, c.prototype.setPageSize = function(l) {
  8696. function f(d, m) {
  8697. return Math.floor(d * m / 72 * 96);
  8698. }
  8699. return this.then(function() {
  8700. (l = l || Tt.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner") || (l.inner = { width: l.width - this.opt.margin[1] - this.opt.margin[3], height: l.height - this.opt.margin[0] - this.opt.margin[2] }, l.inner.px = { width: f(l.inner.width, l.k), height: f(l.inner.height, l.k) }, l.inner.ratio = l.inner.height / l.inner.width), this.prop.pageSize = l;
  8701. });
  8702. }, c.prototype.setProgress = function(l, f, d, m) {
  8703. return l != null && (this.progress.val = l), f != null && (this.progress.state = f), d != null && (this.progress.n = d), m != null && (this.progress.stack = m), this.progress.ratio = this.progress.val / this.progress.state, this;
  8704. }, c.prototype.updateProgress = function(l, f, d, m) {
  8705. return this.setProgress(l ? this.progress.val + l : null, f || null, d ? this.progress.n + d : null, m ? this.progress.stack.concat(m) : null);
  8706. }, c.prototype.then = function(l, f) {
  8707. var d = this;
  8708. return this.thenCore(l, f, function(m, _) {
  8709. return d.updateProgress(null, null, 1, [m]), Promise.prototype.then.call(this, function(k) {
  8710. return d.updateProgress(null, m), k;
  8711. }).then(m, _).then(function(k) {
  8712. return d.updateProgress(1), k;
  8713. });
  8714. });
  8715. }, c.prototype.thenCore = function(l, f, d) {
  8716. d = d || Promise.prototype.then;
  8717. var m = this;
  8718. l && (l = l.bind(m)), f && (f = f.bind(m));
  8719. var _ = Promise.toString().indexOf("[native code]") !== -1 && Promise.name === "Promise" ? m : c.convert(Object.assign({}, m), Promise.prototype), k = d.call(_, l, f);
  8720. return c.convert(k, m.__proto__);
  8721. }, c.prototype.thenExternal = function(l, f) {
  8722. return Promise.prototype.then.call(this, l, f);
  8723. }, c.prototype.thenList = function(l) {
  8724. var f = this;
  8725. return l.forEach(function(d) {
  8726. f = f.thenCore(d);
  8727. }), f;
  8728. }, c.prototype.catch = function(l) {
  8729. l && (l = l.bind(this));
  8730. var f = Promise.prototype.catch.call(this, l);
  8731. return c.convert(f, this);
  8732. }, c.prototype.catchExternal = function(l) {
  8733. return Promise.prototype.catch.call(this, l);
  8734. }, c.prototype.error = function(l) {
  8735. return this.then(function() {
  8736. throw new Error(l);
  8737. });
  8738. }, c.prototype.using = c.prototype.set, c.prototype.saveAs = c.prototype.save, c.prototype.export = c.prototype.output, c.prototype.run = c.prototype.then, Tt.getPageSize = function(l, f, d) {
  8739. if (Se(l) === "object") {
  8740. var m = l;
  8741. l = m.orientation, f = m.unit || f, d = m.format || d;
  8742. }
  8743. f = f || "mm", d = d || "a4", l = ("" + (l || "P")).toLowerCase();
  8744. var _, k = ("" + d).toLowerCase(), p = { a0: [2383.94, 3370.39], a1: [1683.78, 2383.94], a2: [1190.55, 1683.78], a3: [841.89, 1190.55], a4: [595.28, 841.89], a5: [419.53, 595.28], a6: [297.64, 419.53], a7: [209.76, 297.64], a8: [147.4, 209.76], a9: [104.88, 147.4], a10: [73.7, 104.88], b0: [2834.65, 4008.19], b1: [2004.09, 2834.65], b2: [1417.32, 2004.09], b3: [1000.63, 1417.32], b4: [708.66, 1000.63], b5: [498.9, 708.66], b6: [354.33, 498.9], b7: [249.45, 354.33], b8: [175.75, 249.45], b9: [124.72, 175.75], b10: [87.87, 124.72], c0: [2599.37, 3676.54], c1: [1836.85, 2599.37], c2: [1298.27, 1836.85], c3: [918.43, 1298.27], c4: [649.13, 918.43], c5: [459.21, 649.13], c6: [323.15, 459.21], c7: [229.61, 323.15], c8: [161.57, 229.61], c9: [113.39, 161.57], c10: [79.37, 113.39], dl: [311.81, 623.62], letter: [612, 792], "government-letter": [576, 756], legal: [612, 1008], "junior-legal": [576, 360], ledger: [1224, 792], tabloid: [792, 1224], "credit-card": [153, 243] };
  8745. switch (f) {
  8746. case "pt":
  8747. _ = 1;
  8748. break;
  8749. case "mm":
  8750. _ = 72 / 25.4;
  8751. break;
  8752. case "cm":
  8753. _ = 72 / 2.54;
  8754. break;
  8755. case "in":
  8756. _ = 72;
  8757. break;
  8758. case "px":
  8759. _ = 0.75;
  8760. break;
  8761. case "pc":
  8762. case "em":
  8763. _ = 12;
  8764. break;
  8765. case "ex":
  8766. _ = 6;
  8767. break;
  8768. default:
  8769. throw "Invalid unit: " + f;
  8770. }
  8771. var j, O = 0, M = 0;
  8772. if (p.hasOwnProperty(k)) O = p[k][1] / _, M = p[k][0] / _;
  8773. else try {
  8774. O = d[1], M = d[0];
  8775. } catch (S) {
  8776. throw new Error("Invalid format: " + d);
  8777. }
  8778. if (l === "p" || l === "portrait") l = "p", M > O && (j = M, M = O, O = j);
  8779. else {
  8780. if (l !== "l" && l !== "landscape") throw "Invalid orientation: " + l;
  8781. l = "l", O > M && (j = M, M = O, O = j);
  8782. }
  8783. return { width: M, height: O, unit: f, k: _, orientation: l };
  8784. }, n.html = function(l, f) {
  8785. (f = f || {}).callback = f.callback || function() {
  8786. }, f.html2canvas = f.html2canvas || {}, f.html2canvas.canvas = f.html2canvas.canvas || this.canvas, f.jsPDF = f.jsPDF || this, f.fontFaces = f.fontFaces ? f.fontFaces.map(jo) : null;
  8787. var d = new c(f);
  8788. return f.worker ? d : d.from(l).doCallback();
  8789. };
  8790. }(Tt.API), Tt.API.addJS = function(n) {
  8791. var e, t, i = function(s) {
  8792. for (var a = "", c = 0; c < s.length; c++) {
  8793. var l = s[c];
  8794. if (l === "(" || l === ")") {
  8795. for (var f = 0, d = c - 1; d >= 0 && s[d] === "\\"; d--) f++;
  8796. a += f % 2 == 0 ? "\\" + l : l;
  8797. } else a += l;
  8798. }
  8799. return a;
  8800. }(n);
  8801. return this.internal.events.subscribe("postPutResources", function() {
  8802. e = this.internal.newObject(), this.internal.out("<<"), this.internal.out("/Names [(EmbeddedJS) " + (e + 1) + " 0 R]"), this.internal.out(">>"), this.internal.out("endobj"), t = this.internal.newObject(), this.internal.out("<<"), this.internal.out("/S /JavaScript"), this.internal.out("/JS (" + i + ")"), this.internal.out(">>"), this.internal.out("endobj");
  8803. }), this.internal.events.subscribe("putCatalog", function() {
  8804. e !== void 0 && t !== void 0 && this.internal.out("/Names <</JavaScript " + e + " 0 R>>");
  8805. }), this;
  8806. }, /**
  8807. * @license
  8808. * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv
  8809. *
  8810. * Licensed under the MIT License.
  8811. * http://opensource.org/licenses/mit-license
  8812. */
  8813. function(n) {
  8814. var e;
  8815. n.events.push(["postPutResources", function() {
  8816. var t = this, i = /^(\d+) 0 obj$/;
  8817. if (this.outline.root.children.length > 0) for (var s = t.outline.render().split(/\r\n/), a = 0; a < s.length; a++) {
  8818. var c = s[a], l = i.exec(c);
  8819. if (l != null) {
  8820. var f = l[1];
  8821. t.internal.newObjectDeferredBegin(f, !1);
  8822. }
  8823. t.internal.write(c);
  8824. }
  8825. if (this.outline.createNamedDestinations) {
  8826. var d = this.internal.pages.length, m = [];
  8827. for (a = 0; a < d; a++) {
  8828. var _ = t.internal.newObject();
  8829. m.push(_);
  8830. var k = t.internal.getPageInfo(a + 1);
  8831. t.internal.write("<< /D[" + k.objId + " 0 R /XYZ null null null]>> endobj");
  8832. }
  8833. var p = t.internal.newObject();
  8834. for (t.internal.write("<< /Names [ "), a = 0; a < m.length; a++) t.internal.write("(page_" + (a + 1) + ")" + m[a] + " 0 R");
  8835. t.internal.write(" ] >>", "endobj"), e = t.internal.newObject(), t.internal.write("<< /Dests " + p + " 0 R"), t.internal.write(">>", "endobj");
  8836. }
  8837. }]), n.events.push(["putCatalog", function() {
  8838. var t = this;
  8839. t.outline.root.children.length > 0 && (t.internal.write("/Outlines", this.outline.makeRef(this.outline.root)), this.outline.createNamedDestinations && t.internal.write("/Names " + e + " 0 R"));
  8840. }]), n.events.push(["initialized", function() {
  8841. var t = this;
  8842. t.outline = { createNamedDestinations: !1, root: { children: [] } }, t.outline.add = function(i, s, a) {
  8843. var c = { title: s, options: a, children: [] };
  8844. return i == null && (i = this.root), i.children.push(c), c;
  8845. }, t.outline.render = function() {
  8846. return this.ctx = {}, this.ctx.val = "", this.ctx.pdf = t, this.genIds_r(this.root), this.renderRoot(this.root), this.renderItems(this.root), this.ctx.val;
  8847. }, t.outline.genIds_r = function(i) {
  8848. i.id = t.internal.newObjectDeferred();
  8849. for (var s = 0; s < i.children.length; s++) this.genIds_r(i.children[s]);
  8850. }, t.outline.renderRoot = function(i) {
  8851. this.objStart(i), this.line("/Type /Outlines"), i.children.length > 0 && (this.line("/First " + this.makeRef(i.children[0])), this.line("/Last " + this.makeRef(i.children[i.children.length - 1]))), this.line("/Count " + this.count_r({ count: 0 }, i)), this.objEnd();
  8852. }, t.outline.renderItems = function(i) {
  8853. for (var s = this.ctx.pdf.internal.getVerticalCoordinateString, a = 0; a < i.children.length; a++) {
  8854. var c = i.children[a];
  8855. this.objStart(c), this.line("/Title " + this.makeString(c.title)), this.line("/Parent " + this.makeRef(i)), a > 0 && this.line("/Prev " + this.makeRef(i.children[a - 1])), a < i.children.length - 1 && this.line("/Next " + this.makeRef(i.children[a + 1])), c.children.length > 0 && (this.line("/First " + this.makeRef(c.children[0])), this.line("/Last " + this.makeRef(c.children[c.children.length - 1])));
  8856. var l = this.count = this.count_r({ count: 0 }, c);
  8857. if (l > 0 && this.line("/Count " + l), c.options && c.options.pageNumber) {
  8858. var f = t.internal.getPageInfo(c.options.pageNumber);
  8859. this.line("/Dest [" + f.objId + " 0 R /XYZ 0 " + s(0) + " 0]");
  8860. }
  8861. this.objEnd();
  8862. }
  8863. for (var d = 0; d < i.children.length; d++) this.renderItems(i.children[d]);
  8864. }, t.outline.line = function(i) {
  8865. this.ctx.val += i + `\r
  8866. `;
  8867. }, t.outline.makeRef = function(i) {
  8868. return i.id + " 0 R";
  8869. }, t.outline.makeString = function(i) {
  8870. return "(" + t.internal.pdfEscape(i) + ")";
  8871. }, t.outline.objStart = function(i) {
  8872. this.ctx.val += `\r
  8873. ` + i.id + ` 0 obj\r
  8874. <<\r
  8875. `;
  8876. }, t.outline.objEnd = function() {
  8877. this.ctx.val += `>> \r
  8878. endobj\r
  8879. `;
  8880. }, t.outline.count_r = function(i, s) {
  8881. for (var a = 0; a < s.children.length; a++) i.count++, this.count_r(i, s.children[a]);
  8882. return i.count;
  8883. };
  8884. }]);
  8885. }(Tt.API), /**
  8886. * @license
  8887. *
  8888. * Licensed under the MIT License.
  8889. * http://opensource.org/licenses/mit-license
  8890. */
  8891. function(n) {
  8892. var e = [192, 193, 194, 195, 196, 197, 198, 199];
  8893. n.processJPEG = function(t, i, s, a, c, l) {
  8894. var f, d = this.decode.DCT_DECODE, m = null;
  8895. if (typeof t == "string" || this.__addimage__.isArrayBuffer(t) || this.__addimage__.isArrayBufferView(t)) {
  8896. switch (t = c || t, t = this.__addimage__.isArrayBuffer(t) ? new Uint8Array(t) : t, f = function(_) {
  8897. for (var k, p = 256 * _.charCodeAt(4) + _.charCodeAt(5), j = _.length, O = { width: 0, height: 0, numcomponents: 1 }, M = 4; M < j; M += 2) {
  8898. if (M += p, e.indexOf(_.charCodeAt(M + 1)) !== -1) {
  8899. k = 256 * _.charCodeAt(M + 5) + _.charCodeAt(M + 6), O = { width: 256 * _.charCodeAt(M + 7) + _.charCodeAt(M + 8), height: k, numcomponents: _.charCodeAt(M + 9) };
  8900. break;
  8901. }
  8902. p = 256 * _.charCodeAt(M + 2) + _.charCodeAt(M + 3);
  8903. }
  8904. return O;
  8905. }(t = this.__addimage__.isArrayBufferView(t) ? this.__addimage__.arrayBufferToBinaryString(t) : t), f.numcomponents) {
  8906. case 1:
  8907. l = this.color_spaces.DEVICE_GRAY;
  8908. break;
  8909. case 4:
  8910. l = this.color_spaces.DEVICE_CMYK;
  8911. break;
  8912. case 3:
  8913. l = this.color_spaces.DEVICE_RGB;
  8914. }
  8915. m = { data: t, width: f.width, height: f.height, colorSpace: l, bitsPerComponent: 8, filter: d, index: i, alias: s };
  8916. }
  8917. return m;
  8918. };
  8919. }(Tt.API), Tt.API.processPNG = function(n, e, t, i) {
  8920. if (this.__addimage__.isArrayBuffer(n) && (n = new Uint8Array(n)), this.__addimage__.isArrayBufferView(n)) {
  8921. var s, a = C1(n, { checkCrc: !0 }), c = a.width, l = a.height, f = a.channels, d = a.palette, m = a.depth;
  8922. s = d && f === 1 ? function(X) {
  8923. for (var R = X.width, tt = X.height, N = X.data, E = X.palette, z = X.depth, U = !1, rt = [], ot = [], ht = void 0, nt = !1, ct = 0, At = 0; At < E.length; At++) {
  8924. var wt = ql(E[At], 4), x = wt[0], B = wt[1], T = wt[2], H = wt[3];
  8925. rt.push(x, B, T), H != null && (H === 0 ? (ct++, ot.length < 1 && ot.push(At)) : H < 255 && (nt = !0));
  8926. }
  8927. if (nt || ct > 1) {
  8928. U = !0, ot = void 0;
  8929. var J = R * tt;
  8930. ht = new Uint8Array(J);
  8931. for (var Z = new DataView(N.buffer), at = 0; at < J; at++) {
  8932. var st = Mo(Z, at, z), gt = ql(E[st], 4)[3];
  8933. ht[at] = gt;
  8934. }
  8935. } else ct === 0 && (ot = void 0);
  8936. return { colorSpace: "Indexed", colorsPerPixel: 1, sMaskBitsPerComponent: U ? 8 : void 0, colorBytes: N, alphaBytes: ht, needSMask: U, palette: rt, mask: ot };
  8937. }(a) : f === 2 || f === 4 ? function(X) {
  8938. for (var R = X.data, tt = X.width, N = X.height, E = X.channels, z = X.depth, U = E === 2 ? "DeviceGray" : "DeviceRGB", rt = E - 1, ot = tt * N, ht = rt, nt = ot * ht, ct = 1 * ot, At = Math.ceil(nt * z / 8), wt = Math.ceil(ct * z / 8), x = new Uint8Array(At), B = new Uint8Array(wt), T = new DataView(R.buffer), H = new DataView(x.buffer), J = new DataView(B.buffer), Z = !1, at = 0; at < ot; at++) {
  8939. for (var st = at * E, gt = 0; gt < ht; gt++) Vu(H, Mo(T, st + gt, z), at * ht + gt, z);
  8940. var _t = Mo(T, st + ht, z);
  8941. _t < (1 << z) - 1 && (Z = !0), Vu(J, _t, 1 * at, z);
  8942. }
  8943. return { colorSpace: U, colorsPerPixel: rt, sMaskBitsPerComponent: Z ? z : void 0, colorBytes: x, alphaBytes: B, needSMask: Z };
  8944. }(a) : function(X) {
  8945. var R = X.data, tt = X.channels === 1 ? "DeviceGray" : "DeviceRGB";
  8946. return { colorSpace: tt, colorsPerPixel: tt === "DeviceGray" ? 1 : 3, colorBytes: R instanceof Uint16Array ? function(N) {
  8947. for (var E = N.length, z = new Uint8Array(2 * E), U = new DataView(z.buffer, z.byteOffset, z.byteLength), rt = 0; rt < E; rt++) U.setUint16(2 * rt, N[rt], !1);
  8948. return z;
  8949. }(R) : R, needSMask: !1 };
  8950. }(a);
  8951. var _, k, p, j = s, O = j.colorSpace, M = j.colorsPerPixel, S = j.sMaskBitsPerComponent, V = j.colorBytes, G = j.alphaBytes, q = j.needSMask, it = j.palette, vt = j.mask, dt = null;
  8952. return i !== Tt.API.image_compression.NONE && typeof Uo == "function" ? (dt = function(X) {
  8953. var R;
  8954. switch (X) {
  8955. case Tt.API.image_compression.FAST:
  8956. R = 11;
  8957. break;
  8958. case Tt.API.image_compression.MEDIUM:
  8959. R = 13;
  8960. break;
  8961. case Tt.API.image_compression.SLOW:
  8962. R = 14;
  8963. break;
  8964. default:
  8965. R = 12;
  8966. }
  8967. return R;
  8968. }(i), _ = this.decode.FLATE_DECODE, k = "/Predictor ".concat(dt, " /Colors ").concat(M, " /BitsPerComponent ").concat(m, " /Columns ").concat(c), n = qu(V, Math.ceil(c * M * m / 8), M, m, i), q && (p = qu(G, Math.ceil(c * S / 8), 1, S, i))) : (_ = void 0, k = void 0, n = V, q && (p = G)), (this.__addimage__.isArrayBuffer(n) || this.__addimage__.isArrayBufferView(n)) && (n = this.__addimage__.arrayBufferToBinaryString(n)), (p && this.__addimage__.isArrayBuffer(p) || this.__addimage__.isArrayBufferView(p)) && (p = this.__addimage__.arrayBufferToBinaryString(p)), { alias: t, data: n, index: e, filter: _, decodeParameters: k, transparency: vt, palette: it, sMask: p, predictor: dt, width: c, height: l, bitsPerComponent: m, sMaskBitsPerComponent: S, colorSpace: O };
  8969. }
  8970. }, function(n) {
  8971. n.processGIF89A = function(e, t, i, s) {
  8972. var a = new Z1(e), c = a.width, l = a.height, f = [];
  8973. a.decodeAndBlitFrameRGBA(0, f);
  8974. var d = { data: f, width: c, height: l }, m = new Ro(100).encode(d, 100);
  8975. return n.processJPEG.call(this, m, t, i, s);
  8976. }, n.processGIF87A = n.processGIF89A;
  8977. }(Tt.API), Qn.prototype.parseHeader = function() {
  8978. if (this.fileSize = this.datav.getUint32(this.pos, !0), this.pos += 4, this.reserved = this.datav.getUint32(this.pos, !0), this.pos += 4, this.offset = this.datav.getUint32(this.pos, !0), this.pos += 4, this.headerSize = this.datav.getUint32(this.pos, !0), this.pos += 4, this.width = this.datav.getUint32(this.pos, !0), this.pos += 4, this.height = this.datav.getInt32(this.pos, !0), this.pos += 4, this.planes = this.datav.getUint16(this.pos, !0), this.pos += 2, this.bitPP = this.datav.getUint16(this.pos, !0), this.pos += 2, this.compress = this.datav.getUint32(this.pos, !0), this.pos += 4, this.rawSize = this.datav.getUint32(this.pos, !0), this.pos += 4, this.hr = this.datav.getUint32(this.pos, !0), this.pos += 4, this.vr = this.datav.getUint32(this.pos, !0), this.pos += 4, this.colors = this.datav.getUint32(this.pos, !0), this.pos += 4, this.importantColors = this.datav.getUint32(this.pos, !0), this.pos += 4, this.bitPP === 16 && this.is_with_alpha && (this.bitPP = 15), this.bitPP < 15) {
  8979. var n = this.colors === 0 ? 1 << this.bitPP : this.colors;
  8980. this.palette = new Array(n);
  8981. for (var e = 0; e < n; e++) {
  8982. var t = this.datav.getUint8(this.pos++, !0), i = this.datav.getUint8(this.pos++, !0), s = this.datav.getUint8(this.pos++, !0), a = this.datav.getUint8(this.pos++, !0);
  8983. this.palette[e] = { red: s, green: i, blue: t, quad: a };
  8984. }
  8985. }
  8986. this.height < 0 && (this.height *= -1, this.bottom_up = !1);
  8987. }, Qn.prototype.parseBGR = function() {
  8988. this.pos = this.offset;
  8989. var n = "bit" + this.bitPP, e = this.width * this.height * 4;
  8990. if (e > 536870912) throw new Error("Image dimensions exceed 512MB, which is too large.");
  8991. this.data = new Uint8Array(e);
  8992. try {
  8993. this[n]();
  8994. } catch (t) {
  8995. Le.log("bit decode error:" + t);
  8996. }
  8997. }, Qn.prototype.bit1 = function() {
  8998. var n, e = Math.ceil(this.width / 8), t = e % 4;
  8999. for (n = this.height - 1; n >= 0; n--) {
  9000. for (var i = this.bottom_up ? n : this.height - 1 - n, s = 0; s < e; s++) for (var a = this.datav.getUint8(this.pos++, !0), c = i * this.width * 4 + 8 * s * 4, l = 0; l < 8 && 8 * s + l < this.width; l++) {
  9001. var f = this.palette[a >> 7 - l & 1];
  9002. this.data[c + 4 * l] = f.blue, this.data[c + 4 * l + 1] = f.green, this.data[c + 4 * l + 2] = f.red, this.data[c + 4 * l + 3] = 255;
  9003. }
  9004. t !== 0 && (this.pos += 4 - t);
  9005. }
  9006. }, Qn.prototype.bit4 = function() {
  9007. for (var n = Math.ceil(this.width / 2), e = n % 4, t = this.height - 1; t >= 0; t--) {
  9008. for (var i = this.bottom_up ? t : this.height - 1 - t, s = 0; s < n; s++) {
  9009. var a = this.datav.getUint8(this.pos++, !0), c = i * this.width * 4 + 2 * s * 4, l = a >> 4, f = 15 & a, d = this.palette[l];
  9010. if (this.data[c] = d.blue, this.data[c + 1] = d.green, this.data[c + 2] = d.red, this.data[c + 3] = 255, 2 * s + 1 >= this.width) break;
  9011. d = this.palette[f], this.data[c + 4] = d.blue, this.data[c + 4 + 1] = d.green, this.data[c + 4 + 2] = d.red, this.data[c + 4 + 3] = 255;
  9012. }
  9013. e !== 0 && (this.pos += 4 - e);
  9014. }
  9015. }, Qn.prototype.bit8 = function() {
  9016. for (var n = this.width % 4, e = this.height - 1; e >= 0; e--) {
  9017. for (var t = this.bottom_up ? e : this.height - 1 - e, i = 0; i < this.width; i++) {
  9018. var s = this.datav.getUint8(this.pos++, !0), a = t * this.width * 4 + 4 * i;
  9019. if (s < this.palette.length) {
  9020. var c = this.palette[s];
  9021. this.data[a] = c.red, this.data[a + 1] = c.green, this.data[a + 2] = c.blue, this.data[a + 3] = 255;
  9022. } else this.data[a] = 255, this.data[a + 1] = 255, this.data[a + 2] = 255, this.data[a + 3] = 255;
  9023. }
  9024. n !== 0 && (this.pos += 4 - n);
  9025. }
  9026. }, Qn.prototype.bit15 = function() {
  9027. for (var n = this.width % 3, e = parseInt("11111", 2), t = this.height - 1; t >= 0; t--) {
  9028. for (var i = this.bottom_up ? t : this.height - 1 - t, s = 0; s < this.width; s++) {
  9029. var a = this.datav.getUint16(this.pos, !0);
  9030. this.pos += 2;
  9031. var c = (a & e) / e * 255 | 0, l = (a >> 5 & e) / e * 255 | 0, f = (a >> 10 & e) / e * 255 | 0, d = a >> 15 ? 255 : 0, m = i * this.width * 4 + 4 * s;
  9032. this.data[m] = f, this.data[m + 1] = l, this.data[m + 2] = c, this.data[m + 3] = d;
  9033. }
  9034. this.pos += n;
  9035. }
  9036. }, Qn.prototype.bit16 = function() {
  9037. for (var n = this.width % 3, e = parseInt("11111", 2), t = parseInt("111111", 2), i = this.height - 1; i >= 0; i--) {
  9038. for (var s = this.bottom_up ? i : this.height - 1 - i, a = 0; a < this.width; a++) {
  9039. var c = this.datav.getUint16(this.pos, !0);
  9040. this.pos += 2;
  9041. var l = (c & e) / e * 255 | 0, f = (c >> 5 & t) / t * 255 | 0, d = (c >> 11) / e * 255 | 0, m = s * this.width * 4 + 4 * a;
  9042. this.data[m] = d, this.data[m + 1] = f, this.data[m + 2] = l, this.data[m + 3] = 255;
  9043. }
  9044. this.pos += n;
  9045. }
  9046. }, Qn.prototype.bit24 = function() {
  9047. for (var n = this.height - 1; n >= 0; n--) {
  9048. for (var e = this.bottom_up ? n : this.height - 1 - n, t = 0; t < this.width; t++) {
  9049. var i = this.datav.getUint8(this.pos++, !0), s = this.datav.getUint8(this.pos++, !0), a = this.datav.getUint8(this.pos++, !0), c = e * this.width * 4 + 4 * t;
  9050. this.data[c] = a, this.data[c + 1] = s, this.data[c + 2] = i, this.data[c + 3] = 255;
  9051. }
  9052. this.pos += this.width % 4;
  9053. }
  9054. }, Qn.prototype.bit32 = function() {
  9055. for (var n = this.height - 1; n >= 0; n--) for (var e = this.bottom_up ? n : this.height - 1 - n, t = 0; t < this.width; t++) {
  9056. var i = this.datav.getUint8(this.pos++, !0), s = this.datav.getUint8(this.pos++, !0), a = this.datav.getUint8(this.pos++, !0), c = this.datav.getUint8(this.pos++, !0), l = e * this.width * 4 + 4 * t;
  9057. this.data[l] = a, this.data[l + 1] = s, this.data[l + 2] = i, this.data[l + 3] = c;
  9058. }
  9059. }, Qn.prototype.getData = function() {
  9060. return this.data;
  9061. }, /**
  9062. * @license
  9063. * Copyright (c) 2018 Aras Abbasi
  9064. *
  9065. * Licensed under the MIT License.
  9066. * http://opensource.org/licenses/mit-license
  9067. */
  9068. function(n) {
  9069. n.processBMP = function(e, t, i, s) {
  9070. var a = new Qn(e, !1), c = a.width, l = a.height, f = { data: a.getData(), width: c, height: l }, d = new Ro(100).encode(f, 100);
  9071. return n.processJPEG.call(this, d, t, i, s);
  9072. };
  9073. }(Tt.API), Yu.prototype.getData = function() {
  9074. return this.data;
  9075. }, /**
  9076. * @license
  9077. * Copyright (c) 2019 Aras Abbasi
  9078. *
  9079. * Licensed under the MIT License.
  9080. * http://opensource.org/licenses/mit-license
  9081. */
  9082. function(n) {
  9083. n.processWEBP = function(e, t, i, s) {
  9084. var a = new Yu(e), c = a.width, l = a.height, f = { data: a.getData(), width: c, height: l }, d = new Ro(100).encode(f, 100);
  9085. return n.processJPEG.call(this, d, t, i, s);
  9086. };
  9087. }(Tt.API), Tt.API.processRGBA = function(n, e, t) {
  9088. for (var i = n.data, s = i.length, a = new Uint8Array(s / 4 * 3), c = new Uint8Array(s / 4), l = 0, f = 0, d = 0; d < s; d += 4) {
  9089. var m = i[d], _ = i[d + 1], k = i[d + 2], p = i[d + 3];
  9090. a[l++] = m, a[l++] = _, a[l++] = k, c[f++] = p;
  9091. }
  9092. var j = this.__addimage__.arrayBufferToBinaryString(a);
  9093. return { alpha: this.__addimage__.arrayBufferToBinaryString(c), data: j, index: e, alias: t, colorSpace: "DeviceRGB", bitsPerComponent: 8, width: n.width, height: n.height };
  9094. }, Tt.API.setLanguage = function(n) {
  9095. return this.internal.languageSettings === void 0 && (this.internal.languageSettings = {}, this.internal.languageSettings.isSubscribed = !1), { af: "Afrikaans", sq: "Albanian", ar: "Arabic (Standard)", "ar-DZ": "Arabic (Algeria)", "ar-BH": "Arabic (Bahrain)", "ar-EG": "Arabic (Egypt)", "ar-IQ": "Arabic (Iraq)", "ar-JO": "Arabic (Jordan)", "ar-KW": "Arabic (Kuwait)", "ar-LB": "Arabic (Lebanon)", "ar-LY": "Arabic (Libya)", "ar-MA": "Arabic (Morocco)", "ar-OM": "Arabic (Oman)", "ar-QA": "Arabic (Qatar)", "ar-SA": "Arabic (Saudi Arabia)", "ar-SY": "Arabic (Syria)", "ar-TN": "Arabic (Tunisia)", "ar-AE": "Arabic (U.A.E.)", "ar-YE": "Arabic (Yemen)", an: "Aragonese", hy: "Armenian", as: "Assamese", ast: "Asturian", az: "Azerbaijani", eu: "Basque", be: "Belarusian", bn: "Bengali", bs: "Bosnian", br: "Breton", bg: "Bulgarian", my: "Burmese", ca: "Catalan", ch: "Chamorro", ce: "Chechen", zh: "Chinese", "zh-HK": "Chinese (Hong Kong)", "zh-CN": "Chinese (PRC)", "zh-SG": "Chinese (Singapore)", "zh-TW": "Chinese (Taiwan)", cv: "Chuvash", co: "Corsican", cr: "Cree", hr: "Croatian", cs: "Czech", da: "Danish", nl: "Dutch (Standard)", "nl-BE": "Dutch (Belgian)", en: "English", "en-AU": "English (Australia)", "en-BZ": "English (Belize)", "en-CA": "English (Canada)", "en-IE": "English (Ireland)", "en-JM": "English (Jamaica)", "en-NZ": "English (New Zealand)", "en-PH": "English (Philippines)", "en-ZA": "English (South Africa)", "en-TT": "English (Trinidad & Tobago)", "en-GB": "English (United Kingdom)", "en-US": "English (United States)", "en-ZW": "English (Zimbabwe)", eo: "Esperanto", et: "Estonian", fo: "Faeroese", fj: "Fijian", fi: "Finnish", fr: "French (Standard)", "fr-BE": "French (Belgium)", "fr-CA": "French (Canada)", "fr-FR": "French (France)", "fr-LU": "French (Luxembourg)", "fr-MC": "French (Monaco)", "fr-CH": "French (Switzerland)", fy: "Frisian", fur: "Friulian", gd: "Gaelic (Scots)", "gd-IE": "Gaelic (Irish)", gl: "Galacian", ka: "Georgian", de: "German (Standard)", "de-AT": "German (Austria)", "de-DE": "German (Germany)", "de-LI": "German (Liechtenstein)", "de-LU": "German (Luxembourg)", "de-CH": "German (Switzerland)", el: "Greek", gu: "Gujurati", ht: "Haitian", he: "Hebrew", hi: "Hindi", hu: "Hungarian", is: "Icelandic", id: "Indonesian", iu: "Inuktitut", ga: "Irish", it: "Italian (Standard)", "it-CH": "Italian (Switzerland)", ja: "Japanese", kn: "Kannada", ks: "Kashmiri", kk: "Kazakh", km: "Khmer", ky: "Kirghiz", tlh: "Klingon", ko: "Korean", "ko-KP": "Korean (North Korea)", "ko-KR": "Korean (South Korea)", la: "Latin", lv: "Latvian", lt: "Lithuanian", lb: "Luxembourgish", mk: "North Macedonia", ms: "Malay", ml: "Malayalam", mt: "Maltese", mi: "Maori", mr: "Marathi", mo: "Moldavian", nv: "Navajo", ng: "Ndonga", ne: "Nepali", no: "Norwegian", nb: "Norwegian (Bokmal)", nn: "Norwegian (Nynorsk)", oc: "Occitan", or: "Oriya", om: "Oromo", fa: "Persian", "fa-IR": "Persian/Iran", pl: "Polish", pt: "Portuguese", "pt-BR": "Portuguese (Brazil)", pa: "Punjabi", "pa-IN": "Punjabi (India)", "pa-PK": "Punjabi (Pakistan)", qu: "Quechua", rm: "Rhaeto-Romanic", ro: "Romanian", "ro-MO": "Romanian (Moldavia)", ru: "Russian", "ru-MO": "Russian (Moldavia)", sz: "Sami (Lappish)", sg: "Sango", sa: "Sanskrit", sc: "Sardinian", sd: "Sindhi", si: "Singhalese", sr: "Serbian", sk: "Slovak", sl: "Slovenian", so: "Somani", sb: "Sorbian", es: "Spanish", "es-AR": "Spanish (Argentina)", "es-BO": "Spanish (Bolivia)", "es-CL": "Spanish (Chile)", "es-CO": "Spanish (Colombia)", "es-CR": "Spanish (Costa Rica)", "es-DO": "Spanish (Dominican Republic)", "es-EC": "Spanish (Ecuador)", "es-SV": "Spanish (El Salvador)", "es-GT": "Spanish (Guatemala)", "es-HN": "Spanish (Honduras)", "es-MX": "Spanish (Mexico)", "es-NI": "Spanish (Nicaragua)", "es-PA": "Spanish (Panama)", "es-PY": "Spanish (Paraguay)", "es-PE": "Spanish (Peru)", "es-PR": "Spanish (Puerto Rico)", "es-ES": "Spanish (Spain)", "es-UY": "Spanish (Uruguay)", "es-VE": "Spanish (Venezuela)", sx: "Sutu", sw: "Swahili", sv: "Swedish", "sv-FI": "Swedish (Finland)", "sv-SV": "Swedish (Sweden)", ta: "Tamil", tt: "Tatar", te: "Teluga", th: "Thai", tig: "Tigre", ts: "Tsonga", tn: "Tswana", tr: "Turkish", tk: "Turkmen", uk: "Ukrainian", hsb: "Upper Sorbian", ur: "Urdu", ve: "Venda", vi: "Vietnamese", vo: "Volapuk", wa: "Walloon", cy: "Welsh", xh: "Xhosa", ji: "Yiddish", zu: "Zulu" }[n] !== void 0 && (this.internal.languageSettings.languageCode = n, this.internal.languageSettings.isSubscribed === !1 && (this.internal.events.subscribe("putCatalog", function() {
  9096. this.internal.write("/Lang (" + this.internal.languageSettings.languageCode + ")");
  9097. }), this.internal.languageSettings.isSubscribed = !0)), this;
  9098. }, Xi = Tt.API, _s = Xi.getCharWidthsArray = function(n, e) {
  9099. var t, i, s = (e = e || {}).font || this.internal.getFont(), a = e.fontSize || this.internal.getFontSize(), c = e.charSpace || this.internal.getCharSpace(), l = e.widths ? e.widths : s.metadata.Unicode.widths, f = l.fof ? l.fof : 1, d = e.kerning ? e.kerning : s.metadata.Unicode.kerning, m = d.fof ? d.fof : 1, _ = e.doKerning !== !1, k = 0, p = n.length, j = 0, O = l[0] || f, M = [];
  9100. for (t = 0; t < p; t++) i = n.charCodeAt(t), typeof s.metadata.widthOfString == "function" ? M.push((s.metadata.widthOfGlyph(s.metadata.characterToGlyph(i)) + c * (1e3 / a) || 0) / 1e3) : (k = _ && Se(d[i]) === "object" && !isNaN(parseInt(d[i][j], 10)) ? d[i][j] / m : 0, M.push((l[i] || O) / f + k)), j = i;
  9101. return M;
  9102. }, Ru = Xi.getStringUnitWidth = function(n, e) {
  9103. var t = (e = e || {}).fontSize || this.internal.getFontSize(), i = e.font || this.internal.getFont(), s = e.charSpace || this.internal.getCharSpace();
  9104. return Xi.processArabic && (n = Xi.processArabic(n)), typeof i.metadata.widthOfString == "function" ? i.metadata.widthOfString(n, t, s) / t : _s.apply(this, arguments).reduce(function(a, c) {
  9105. return a + c;
  9106. }, 0);
  9107. }, Tu = function(n, e, t, i) {
  9108. for (var s = [], a = 0, c = n.length, l = 0; a !== c && l + e[a] < t; ) l += e[a], a++;
  9109. s.push(n.slice(0, a));
  9110. var f = a;
  9111. for (l = 0; a !== c; ) l + e[a] > i && (s.push(n.slice(f, a)), l = 0, f = a), l += e[a], a++;
  9112. return f !== a && s.push(n.slice(f, a)), s;
  9113. }, Du = function(n, e, t) {
  9114. t || (t = {});
  9115. var i, s, a, c, l, f, d, m = [], _ = [m], k = t.textIndent || 0, p = 0, j = 0, O = n.split(" "), M = _s.apply(this, [" ", t])[0];
  9116. if (f = t.lineIndent === -1 ? O[0].length + 2 : t.lineIndent || 0) {
  9117. var S = Array(f).join(" "), V = [];
  9118. O.map(function(q) {
  9119. (q = q.split(/\s*\n/)).length > 1 ? V = V.concat(q.map(function(it, vt) {
  9120. return (vt && it.length ? `
  9121. ` : "") + it;
  9122. })) : V.push(q[0]);
  9123. }), O = V, f = Ru.apply(this, [S, t]);
  9124. }
  9125. for (a = 0, c = O.length; a < c; a++) {
  9126. var G = 0;
  9127. if (i = O[a], f && i[0] == `
  9128. ` && (i = i.substr(1), G = 1), k + p + (j = (s = _s.apply(this, [i, t])).reduce(function(q, it) {
  9129. return q + it;
  9130. }, 0)) > e || G) {
  9131. if (j > e) {
  9132. for (l = Tu.apply(this, [i, s, e - (k + p), e]), m.push(l.shift()), m = [l.pop()]; l.length; ) _.push([l.shift()]);
  9133. j = s.slice(i.length - (m[0] ? m[0].length : 0)).reduce(function(q, it) {
  9134. return q + it;
  9135. }, 0);
  9136. } else m = [i];
  9137. _.push(m), k = j + f, p = M;
  9138. } else m.push(i), k += p + j, p = M;
  9139. }
  9140. return d = f ? function(q, it) {
  9141. return (it ? S : "") + q.join(" ");
  9142. } : function(q) {
  9143. return q.join(" ");
  9144. }, _.map(d);
  9145. }, Xi.splitTextToSize = function(n, e, t) {
  9146. var i, s = (t = t || {}).fontSize || this.internal.getFontSize(), a = function(m) {
  9147. if (m.widths && m.kerning) return { widths: m.widths, kerning: m.kerning };
  9148. var _ = this.internal.getFont(m.fontName, m.fontStyle), k = "Unicode";
  9149. return _.metadata[k] ? { widths: _.metadata[k].widths || { 0: 1 }, kerning: _.metadata[k].kerning || {} } : { font: _.metadata, fontSize: this.internal.getFontSize(), charSpace: this.internal.getCharSpace() };
  9150. }.call(this, t);
  9151. i = Array.isArray(n) ? n : String(n).split(/\r?\n/);
  9152. var c = 1 * this.internal.scaleFactor * e / s;
  9153. a.textIndent = t.textIndent ? 1 * t.textIndent * this.internal.scaleFactor / s : 0, a.lineIndent = t.lineIndent;
  9154. var l, f, d = [];
  9155. for (l = 0, f = i.length; l < f; l++) d = d.concat(Du.apply(this, [i[l], c, a]));
  9156. return d;
  9157. }, function(n) {
  9158. n.__fontmetrics__ = n.__fontmetrics__ || {};
  9159. for (var e = "0123456789abcdef", t = "klmnopqrstuvwxyz", i = {}, s = {}, a = 0; a < 16; a++) i[t[a]] = e[a], s[e[a]] = t[a];
  9160. var c = function(k) {
  9161. return "0x" + parseInt(k, 10).toString(16);
  9162. }, l = n.__fontmetrics__.compress = function(k) {
  9163. var p, j, O, M, S = ["{"];
  9164. for (var V in k) {
  9165. if (p = k[V], isNaN(parseInt(V, 10)) ? j = "'" + V + "'" : (V = parseInt(V, 10), j = (j = c(V).slice(2)).slice(0, -1) + s[j.slice(-1)]), typeof p == "number") p < 0 ? (O = c(p).slice(3), M = "-") : (O = c(p).slice(2), M = ""), O = M + O.slice(0, -1) + s[O.slice(-1)];
  9166. else {
  9167. if (Se(p) !== "object") throw new Error("Don't know what to do with value type " + Se(p) + ".");
  9168. O = l(p);
  9169. }
  9170. S.push(j + O);
  9171. }
  9172. return S.push("}"), S.join("");
  9173. }, f = n.__fontmetrics__.uncompress = function(k) {
  9174. if (typeof k != "string") throw new Error("Invalid argument passed to uncompress.");
  9175. for (var p, j, O, M, S = {}, V = 1, G = S, q = [], it = "", vt = "", dt = k.length - 1, X = 1; X < dt; X += 1) (M = k[X]) == "'" ? p ? (O = p.join(""), p = void 0) : p = [] : p ? p.push(M) : M == "{" ? (q.push([G, O]), G = {}, O = void 0) : M == "}" ? ((j = q.pop())[0][j[1]] = G, O = void 0, G = j[0]) : M == "-" ? V = -1 : O === void 0 ? i.hasOwnProperty(M) ? (it += i[M], O = parseInt(it, 16) * V, V = 1, it = "") : it += M : i.hasOwnProperty(M) ? (vt += i[M], G[O] = parseInt(vt, 16) * V, V = 1, O = void 0, vt = "") : vt += M;
  9176. return S;
  9177. }, d = { codePages: ["WinAnsiEncoding"], WinAnsiEncoding: f("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}") }, m = { Unicode: { Courier: d, "Courier-Bold": d, "Courier-BoldOblique": d, "Courier-Oblique": d, Helvetica: d, "Helvetica-Bold": d, "Helvetica-BoldOblique": d, "Helvetica-Oblique": d, "Times-Roman": d, "Times-Bold": d, "Times-BoldItalic": d, "Times-Italic": d } }, _ = { Unicode: { "Courier-Oblique": f("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"), "Times-BoldItalic": f("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"), "Helvetica-Bold": f("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"), Courier: f("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"), "Courier-BoldOblique": f("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"), "Times-Bold": f("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"), Symbol: f("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"), Helvetica: f("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"), "Helvetica-BoldOblique": f("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"), ZapfDingbats: f("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"), "Courier-Bold": f("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"), "Times-Italic": f("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"), "Times-Roman": f("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"), "Helvetica-Oblique": f("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}") } };
  9178. n.events.push(["addFont", function(k) {
  9179. var p = k.font, j = _.Unicode[p.postScriptName];
  9180. j && (p.metadata.Unicode = {}, p.metadata.Unicode.widths = j.widths, p.metadata.Unicode.kerning = j.kerning);
  9181. var O = m.Unicode[p.postScriptName];
  9182. O && (p.metadata.Unicode.encoding = O, p.encoding = O.codePages[0]);
  9183. }]);
  9184. }(Tt.API), /**
  9185. * @license
  9186. * Licensed under the MIT License.
  9187. * http://opensource.org/licenses/mit-license
  9188. */
  9189. function(n) {
  9190. var e = function(t) {
  9191. for (var i = t.length, s = new Uint8Array(i), a = 0; a < i; a++) s[a] = t.charCodeAt(a);
  9192. return s;
  9193. };
  9194. n.API.events.push(["addFont", function(t) {
  9195. var i = void 0, s = t.font, a = t.instance;
  9196. if (!s.isStandardFont) {
  9197. if (a === void 0) throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('" + s.postScriptName + "').");
  9198. if (typeof (i = a.existsFileInVFS(s.postScriptName) === !1 ? a.loadFile(s.postScriptName) : a.getFileFromVFS(s.postScriptName)) != "string") throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('" + s.postScriptName + "').");
  9199. (function(c, l) {
  9200. l = /^\x00\x01\x00\x00/.test(l) ? e(l) : e(Ns(l)), c.metadata = n.API.TTFFont.open(l), c.metadata.Unicode = c.metadata.Unicode || { encoding: {}, kerning: {}, widths: [] }, c.metadata.glyIdsUsed = [0];
  9201. })(s, i);
  9202. }
  9203. }]);
  9204. }(Tt), Tt.API.addSvgAsImage = function(n, e, t, i, s, a, c, l) {
  9205. if (isNaN(e) || isNaN(t)) throw Le.error("jsPDF.addSvgAsImage: Invalid coordinates", arguments), new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");
  9206. if (isNaN(i) || isNaN(s)) throw Le.error("jsPDF.addSvgAsImage: Invalid measurements", arguments), new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");
  9207. var f = document.createElement("canvas");
  9208. f.width = i, f.height = s;
  9209. var d = f.getContext("2d");
  9210. d.fillStyle = "#fff", d.fillRect(0, 0, f.width, f.height);
  9211. var m = { ignoreMouse: !0, ignoreAnimation: !0, ignoreDimensions: !0 }, _ = this;
  9212. return (Kt.canvg ? Promise.resolve(Kt.canvg) : import("./index.es.js")).catch(function(k) {
  9213. return Promise.reject(new Error("Could not load canvg: " + k));
  9214. }).then(function(k) {
  9215. return k.default ? k.default : k;
  9216. }).then(function(k) {
  9217. return k.fromString(d, n, m);
  9218. }, function() {
  9219. return Promise.reject(new Error("Could not load canvg."));
  9220. }).then(function(k) {
  9221. return k.render(m);
  9222. }).then(function() {
  9223. _.addImage(f.toDataURL("image/jpeg", 1), e, t, i, s, c, l);
  9224. });
  9225. }, Tt.API.putTotalPages = function(n) {
  9226. var e, t = 0;
  9227. parseInt(this.internal.getFont().id.substr(1), 10) < 15 ? (e = new RegExp(n, "g"), t = this.internal.getNumberOfPages()) : (e = new RegExp(this.pdfEscape16(n, this.internal.getFont()), "g"), t = this.pdfEscape16(this.internal.getNumberOfPages() + "", this.internal.getFont()));
  9228. for (var i = 1; i <= this.internal.getNumberOfPages(); i++) for (var s = 0; s < this.internal.pages[i].length; s++) this.internal.pages[i][s] = this.internal.pages[i][s].replace(e, t);
  9229. return this;
  9230. }, Tt.API.viewerPreferences = function(n, e) {
  9231. var t;
  9232. n = n || {}, e = e || !1;
  9233. var i, s, a, c = { HideToolbar: { defaultValue: !1, value: !1, type: "boolean", explicitSet: !1, valueSet: [!0, !1], pdfVersion: 1.3 }, HideMenubar: { defaultValue: !1, value: !1, type: "boolean", explicitSet: !1, valueSet: [!0, !1], pdfVersion: 1.3 }, HideWindowUI: { defaultValue: !1, value: !1, type: "boolean", explicitSet: !1, valueSet: [!0, !1], pdfVersion: 1.3 }, FitWindow: { defaultValue: !1, value: !1, type: "boolean", explicitSet: !1, valueSet: [!0, !1], pdfVersion: 1.3 }, CenterWindow: { defaultValue: !1, value: !1, type: "boolean", explicitSet: !1, valueSet: [!0, !1], pdfVersion: 1.3 }, DisplayDocTitle: { defaultValue: !1, value: !1, type: "boolean", explicitSet: !1, valueSet: [!0, !1], pdfVersion: 1.4 }, NonFullScreenPageMode: { defaultValue: "UseNone", value: "UseNone", type: "name", explicitSet: !1, valueSet: ["UseNone", "UseOutlines", "UseThumbs", "UseOC"], pdfVersion: 1.3 }, Direction: { defaultValue: "L2R", value: "L2R", type: "name", explicitSet: !1, valueSet: ["L2R", "R2L"], pdfVersion: 1.3 }, ViewArea: { defaultValue: "CropBox", value: "CropBox", type: "name", explicitSet: !1, valueSet: ["MediaBox", "CropBox", "TrimBox", "BleedBox", "ArtBox"], pdfVersion: 1.4 }, ViewClip: { defaultValue: "CropBox", value: "CropBox", type: "name", explicitSet: !1, valueSet: ["MediaBox", "CropBox", "TrimBox", "BleedBox", "ArtBox"], pdfVersion: 1.4 }, PrintArea: { defaultValue: "CropBox", value: "CropBox", type: "name", explicitSet: !1, valueSet: ["MediaBox", "CropBox", "TrimBox", "BleedBox", "ArtBox"], pdfVersion: 1.4 }, PrintClip: { defaultValue: "CropBox", value: "CropBox", type: "name", explicitSet: !1, valueSet: ["MediaBox", "CropBox", "TrimBox", "BleedBox", "ArtBox"], pdfVersion: 1.4 }, PrintScaling: { defaultValue: "AppDefault", value: "AppDefault", type: "name", explicitSet: !1, valueSet: ["AppDefault", "None"], pdfVersion: 1.6 }, Duplex: { defaultValue: "", value: "none", type: "name", explicitSet: !1, valueSet: ["Simplex", "DuplexFlipShortEdge", "DuplexFlipLongEdge", "none"], pdfVersion: 1.7 }, PickTrayByPDFSize: { defaultValue: !1, value: !1, type: "boolean", explicitSet: !1, valueSet: [!0, !1], pdfVersion: 1.7 }, PrintPageRange: { defaultValue: "", value: "", type: "array", explicitSet: !1, valueSet: null, pdfVersion: 1.7 }, NumCopies: { defaultValue: 1, value: 1, type: "integer", explicitSet: !1, valueSet: null, pdfVersion: 1.7 } }, l = Object.keys(c), f = [], d = 0, m = 0, _ = 0;
  9234. function k(j, O) {
  9235. var M, S = !1;
  9236. for (M = 0; M < j.length; M += 1) j[M] === O && (S = !0);
  9237. return S;
  9238. }
  9239. if (this.internal.viewerpreferences === void 0 && (this.internal.viewerpreferences = {}, this.internal.viewerpreferences.configuration = JSON.parse(JSON.stringify(c)), this.internal.viewerpreferences.isSubscribed = !1), t = this.internal.viewerpreferences.configuration, n === "reset" || e === !0) {
  9240. var p = l.length;
  9241. for (_ = 0; _ < p; _ += 1) t[l[_]].value = t[l[_]].defaultValue, t[l[_]].explicitSet = !1;
  9242. }
  9243. if (Se(n) === "object") {
  9244. for (s in n) if (a = n[s], k(l, s) && a !== void 0) {
  9245. if (t[s].type === "boolean" && typeof a == "boolean") t[s].value = a;
  9246. else if (t[s].type === "name" && k(t[s].valueSet, a)) t[s].value = a;
  9247. else if (t[s].type === "integer" && Number.isInteger(a)) t[s].value = a;
  9248. else if (t[s].type === "array") {
  9249. for (d = 0; d < a.length; d += 1) if (i = !0, a[d].length === 1 && typeof a[d][0] == "number") f.push(String(a[d] - 1));
  9250. else if (a[d].length > 1) {
  9251. for (m = 0; m < a[d].length; m += 1) typeof a[d][m] != "number" && (i = !1);
  9252. i === !0 && f.push([a[d][0] - 1, a[d][1] - 1].join(" "));
  9253. }
  9254. t[s].value = "[" + f.join(" ") + "]";
  9255. } else t[s].value = t[s].defaultValue;
  9256. t[s].explicitSet = !0;
  9257. }
  9258. }
  9259. return this.internal.viewerpreferences.isSubscribed === !1 && (this.internal.events.subscribe("putCatalog", function() {
  9260. var j, O = [];
  9261. for (j in t) t[j].explicitSet === !0 && (t[j].type === "name" ? O.push("/" + j + " /" + t[j].value) : O.push("/" + j + " " + t[j].value));
  9262. O.length !== 0 && this.internal.write(`/ViewerPreferences
  9263. <<
  9264. ` + O.join(`
  9265. `) + `
  9266. >>`);
  9267. }), this.internal.viewerpreferences.isSubscribed = !0), this.internal.viewerpreferences.configuration = t, this;
  9268. }, Tt.API.addMetadata = function(n, e) {
  9269. return this.internal.__metadata__ === void 0 && (this.internal.__metadata__ = { metadata: n, namespaceUri: e != null ? e : "http://jspdf.default.namespaceuri/", rawXml: typeof e == "boolean" && e }, this.internal.events.subscribe("putCatalog", t2), this.internal.events.subscribe("postPutResources", Q1)), this;
  9270. }, function(n) {
  9271. var e = n.API, t = e.pdfEscape16 = function(a, c) {
  9272. for (var l, f = c.metadata.Unicode.widths, d = ["", "0", "00", "000", "0000"], m = [""], _ = 0, k = a.length; _ < k; ++_) {
  9273. if (l = c.metadata.characterToGlyph(a.charCodeAt(_)), c.metadata.glyIdsUsed.push(l), c.metadata.toUnicode[l] = a.charCodeAt(_), f.indexOf(l) == -1 && (f.push(l), f.push([parseInt(c.metadata.widthOfGlyph(l), 10)])), l == "0") return m.join("");
  9274. l = l.toString(16), m.push(d[4 - l.length], l);
  9275. }
  9276. return m.join("");
  9277. }, i = function(a) {
  9278. var c, l, f, d, m, _, k;
  9279. for (m = `/CIDInit /ProcSet findresource begin
  9280. 12 dict begin
  9281. begincmap
  9282. /CIDSystemInfo <<
  9283. /Registry (Adobe)
  9284. /Ordering (UCS)
  9285. /Supplement 0
  9286. >> def
  9287. /CMapName /Adobe-Identity-UCS def
  9288. /CMapType 2 def
  9289. 1 begincodespacerange
  9290. <0000><ffff>
  9291. endcodespacerange`, f = [], _ = 0, k = (l = Object.keys(a).sort(function(p, j) {
  9292. return p - j;
  9293. })).length; _ < k; _++) c = l[_], f.length >= 100 && (m += `
  9294. ` + f.length + ` beginbfchar
  9295. ` + f.join(`
  9296. `) + `
  9297. endbfchar`, f = []), a[c] !== void 0 && a[c] !== null && typeof a[c].toString == "function" && (d = ("0000" + a[c].toString(16)).slice(-4), c = ("0000" + (+c).toString(16)).slice(-4), f.push("<" + c + "><" + d + ">"));
  9298. return f.length && (m += `
  9299. ` + f.length + ` beginbfchar
  9300. ` + f.join(`
  9301. `) + `
  9302. endbfchar
  9303. `), m + `endcmap
  9304. CMapName currentdict /CMap defineresource pop
  9305. end
  9306. end`;
  9307. };
  9308. e.events.push(["putFont", function(a) {
  9309. (function(c) {
  9310. var l = c.font, f = c.out, d = c.newObject, m = c.putStream;
  9311. if (l.metadata instanceof n.API.TTFFont && l.encoding === "Identity-H") {
  9312. for (var _ = l.metadata.Unicode.widths, k = l.metadata.subset.encode(l.metadata.glyIdsUsed, 1), p = "", j = 0; j < k.length; j++) p += String.fromCharCode(k[j]);
  9313. var O = d();
  9314. m({ data: p, addLength1: !0, objectId: O }), f("endobj");
  9315. var M = d();
  9316. m({ data: i(l.metadata.toUnicode), addLength1: !0, objectId: M }), f("endobj");
  9317. var S = d();
  9318. f("<<"), f("/Type /FontDescriptor"), f("/FontName /" + Zi(l.fontName)), f("/FontFile2 " + O + " 0 R"), f("/FontBBox " + n.API.PDFObject.convert(l.metadata.bbox)), f("/Flags " + l.metadata.flags), f("/StemV " + l.metadata.stemV), f("/ItalicAngle " + l.metadata.italicAngle), f("/Ascent " + l.metadata.ascender), f("/Descent " + l.metadata.decender), f("/CapHeight " + l.metadata.capHeight), f(">>"), f("endobj");
  9319. var V = d();
  9320. f("<<"), f("/Type /Font"), f("/BaseFont /" + Zi(l.fontName)), f("/FontDescriptor " + S + " 0 R"), f("/W " + n.API.PDFObject.convert(_)), f("/CIDToGIDMap /Identity"), f("/DW 1000"), f("/Subtype /CIDFontType2"), f("/CIDSystemInfo"), f("<<"), f("/Supplement 0"), f("/Registry (Adobe)"), f("/Ordering (" + l.encoding + ")"), f(">>"), f(">>"), f("endobj"), l.objectNumber = d(), f("<<"), f("/Type /Font"), f("/Subtype /Type0"), f("/ToUnicode " + M + " 0 R"), f("/BaseFont /" + Zi(l.fontName)), f("/Encoding /" + l.encoding), f("/DescendantFonts [" + V + " 0 R]"), f(">>"), f("endobj"), l.isAlreadyPutted = !0;
  9321. }
  9322. })(a);
  9323. }]), e.events.push(["putFont", function(a) {
  9324. (function(c) {
  9325. var l = c.font, f = c.out, d = c.newObject, m = c.putStream;
  9326. if (l.metadata instanceof n.API.TTFFont && l.encoding === "WinAnsiEncoding") {
  9327. for (var _ = l.metadata.rawData, k = "", p = 0; p < _.length; p++) k += String.fromCharCode(_[p]);
  9328. var j = d();
  9329. m({ data: k, addLength1: !0, objectId: j }), f("endobj");
  9330. var O = d();
  9331. m({ data: i(l.metadata.toUnicode), addLength1: !0, objectId: O }), f("endobj");
  9332. var M = d();
  9333. f("<<"), f("/Descent " + l.metadata.decender), f("/CapHeight " + l.metadata.capHeight), f("/StemV " + l.metadata.stemV), f("/Type /FontDescriptor"), f("/FontFile2 " + j + " 0 R"), f("/Flags 96"), f("/FontBBox " + n.API.PDFObject.convert(l.metadata.bbox)), f("/FontName /" + Zi(l.fontName)), f("/ItalicAngle " + l.metadata.italicAngle), f("/Ascent " + l.metadata.ascender), f(">>"), f("endobj"), l.objectNumber = d();
  9334. for (var S = 0; S < l.metadata.hmtx.widths.length; S++) l.metadata.hmtx.widths[S] = parseInt(l.metadata.hmtx.widths[S] * (1e3 / l.metadata.head.unitsPerEm));
  9335. f("<</Subtype/TrueType/Type/Font/ToUnicode " + O + " 0 R/BaseFont/" + Zi(l.fontName) + "/FontDescriptor " + M + " 0 R/Encoding/" + l.encoding + " /FirstChar 29 /LastChar 255 /Widths " + n.API.PDFObject.convert(l.metadata.hmtx.widths) + ">>"), f("endobj"), l.isAlreadyPutted = !0;
  9336. }
  9337. })(a);
  9338. }]);
  9339. var s = function(a) {
  9340. var c, l = a.text || "", f = a.x, d = a.y, m = a.options || {}, _ = a.mutex || {}, k = _.pdfEscape, p = _.activeFontKey, j = _.fonts, O = p, M = "", S = 0, V = "", G = j[O].encoding;
  9341. if (j[O].encoding !== "Identity-H") return { text: l, x: f, y: d, options: m, mutex: _ };
  9342. for (V = l, O = p, Array.isArray(l) && (V = l[0]), S = 0; S < V.length; S += 1) j[O].metadata.hasOwnProperty("cmap") && (c = j[O].metadata.cmap.unicode.codeMap[V[S].charCodeAt(0)]), c || V[S].charCodeAt(0) < 256 && j[O].metadata.hasOwnProperty("Unicode") ? M += V[S] : M += "";
  9343. var q = "";
  9344. return parseInt(O.slice(1)) < 14 || G === "WinAnsiEncoding" ? q = k(M, O).split("").map(function(it) {
  9345. return it.charCodeAt(0).toString(16);
  9346. }).join("") : G === "Identity-H" && (q = t(M, j[O])), _.isHex = !0, { text: q, x: f, y: d, options: m, mutex: _ };
  9347. };
  9348. e.events.push(["postProcessText", function(a) {
  9349. var c = a.text || "", l = [], f = { text: c, x: a.x, y: a.y, options: a.options, mutex: a.mutex };
  9350. if (Array.isArray(c)) {
  9351. var d = 0;
  9352. for (d = 0; d < c.length; d += 1) Array.isArray(c[d]) && c[d].length === 3 ? l.push([s(Object.assign({}, f, { text: c[d][0] })).text, c[d][1], c[d][2]]) : l.push(s(Object.assign({}, f, { text: c[d] })).text);
  9353. a.text = l;
  9354. } else a.text = s(Object.assign({}, f, { text: c })).text;
  9355. }]);
  9356. }(Tt), /**
  9357. * @license
  9358. * jsPDF virtual FileSystem functionality
  9359. *
  9360. * Licensed under the MIT License.
  9361. * http://opensource.org/licenses/mit-license
  9362. */
  9363. function(n) {
  9364. var e = function() {
  9365. return this.internal.vFS === void 0 && (this.internal.vFS = {}), !0;
  9366. };
  9367. n.existsFileInVFS = function(t) {
  9368. return e.call(this), this.internal.vFS[t] !== void 0;
  9369. }, n.addFileToVFS = function(t, i) {
  9370. return e.call(this), this.internal.vFS[t] = i, this;
  9371. }, n.getFileFromVFS = function(t) {
  9372. return e.call(this), this.internal.vFS[t] !== void 0 ? this.internal.vFS[t] : null;
  9373. };
  9374. }(Tt.API), /**
  9375. * @license
  9376. * Unicode Bidi Engine based on the work of Alex Shensis (@asthensis)
  9377. * MIT License
  9378. */
  9379. function(n) {
  9380. n.__bidiEngine__ = n.prototype.__bidiEngine__ = function(i) {
  9381. var s, a, c, l, f, d, m, _ = e, k = [[0, 3, 0, 1, 0, 0, 0], [0, 3, 0, 1, 2, 2, 0], [0, 3, 0, 17, 2, 0, 1], [0, 3, 5, 5, 4, 1, 0], [0, 3, 21, 21, 4, 0, 1], [0, 3, 5, 5, 4, 2, 0]], p = [[2, 0, 1, 1, 0, 1, 0], [2, 0, 1, 1, 0, 2, 0], [2, 0, 2, 1, 3, 2, 0], [2, 0, 2, 33, 3, 1, 1]], j = { L: 0, R: 1, EN: 2, AN: 3, N: 4, B: 5, S: 6 }, O = { 0: 0, 5: 1, 6: 2, 7: 3, 32: 4, 251: 5, 254: 6, 255: 7 }, M = ["(", ")", "(", "<", ">", "<", "[", "]", "[", "{", "}", "{", "«", "»", "«", "‹", "›", "‹", "⁅", "⁆", "⁅", "⁽", "⁾", "⁽", "₍", "₎", "₍", "≤", "≥", "≤", "〈", "〉", "〈", "﹙", "﹚", "﹙", "﹛", "﹜", "﹛", "﹝", "﹞", "﹝", "﹤", "﹥", "﹤"], S = new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/), V = !1, G = 0;
  9382. this.__bidiEngine__ = {};
  9383. var q = function(N) {
  9384. var E = N.charCodeAt(), z = E >> 8, U = O[z];
  9385. return U !== void 0 ? _[256 * U + (255 & E)] : z === 252 || z === 253 ? "AL" : S.test(z) ? "L" : z === 8 ? "R" : "N";
  9386. }, it = function(N) {
  9387. for (var E, z = 0; z < N.length; z++) {
  9388. if ((E = q(N.charAt(z))) === "L") return !1;
  9389. if (E === "R") return !0;
  9390. }
  9391. return !1;
  9392. }, vt = function(N, E, z, U) {
  9393. var rt, ot, ht, nt, ct = E[U];
  9394. switch (ct) {
  9395. case "L":
  9396. case "R":
  9397. case "LRE":
  9398. case "RLE":
  9399. case "LRO":
  9400. case "RLO":
  9401. case "PDF":
  9402. V = !1;
  9403. break;
  9404. case "N":
  9405. case "AN":
  9406. break;
  9407. case "EN":
  9408. V && (ct = "AN");
  9409. break;
  9410. case "AL":
  9411. V = !0, ct = "R";
  9412. break;
  9413. case "WS":
  9414. case "BN":
  9415. ct = "N";
  9416. break;
  9417. case "CS":
  9418. U < 1 || U + 1 >= E.length || (rt = z[U - 1]) !== "EN" && rt !== "AN" || (ot = E[U + 1]) !== "EN" && ot !== "AN" ? ct = "N" : V && (ot = "AN"), ct = ot === rt ? ot : "N";
  9419. break;
  9420. case "ES":
  9421. ct = (rt = U > 0 ? z[U - 1] : "B") === "EN" && U + 1 < E.length && E[U + 1] === "EN" ? "EN" : "N";
  9422. break;
  9423. case "ET":
  9424. if (U > 0 && z[U - 1] === "EN") {
  9425. ct = "EN";
  9426. break;
  9427. }
  9428. if (V) {
  9429. ct = "N";
  9430. break;
  9431. }
  9432. for (ht = U + 1, nt = E.length; ht < nt && E[ht] === "ET"; ) ht++;
  9433. ct = ht < nt && E[ht] === "EN" ? "EN" : "N";
  9434. break;
  9435. case "NSM":
  9436. if (c && !l) {
  9437. for (nt = E.length, ht = U + 1; ht < nt && E[ht] === "NSM"; ) ht++;
  9438. if (ht < nt) {
  9439. var At = N[U], wt = At >= 1425 && At <= 2303 || At === 64286;
  9440. if (rt = E[ht], wt && (rt === "R" || rt === "AL")) {
  9441. ct = "R";
  9442. break;
  9443. }
  9444. }
  9445. }
  9446. ct = U < 1 || (rt = E[U - 1]) === "B" ? "N" : z[U - 1];
  9447. break;
  9448. case "B":
  9449. V = !1, s = !0, ct = G;
  9450. break;
  9451. case "S":
  9452. a = !0, ct = "N";
  9453. }
  9454. return ct;
  9455. }, dt = function(N, E, z) {
  9456. var U = N.split("");
  9457. return z && X(U, z, { hiLevel: G }), U.reverse(), E && E.reverse(), U.join("");
  9458. }, X = function(N, E, z) {
  9459. var U, rt, ot, ht, nt, ct = -1, At = N.length, wt = 0, x = [], B = G ? p : k, T = [];
  9460. for (V = !1, s = !1, a = !1, rt = 0; rt < At; rt++) T[rt] = q(N[rt]);
  9461. for (ot = 0; ot < At; ot++) {
  9462. if (nt = wt, x[ot] = vt(N, T, x, ot), U = 240 & (wt = B[nt][j[x[ot]]]), wt &= 15, E[ot] = ht = B[wt][5], U > 0) if (U === 16) {
  9463. for (rt = ct; rt < ot; rt++) E[rt] = 1;
  9464. ct = -1;
  9465. } else ct = -1;
  9466. if (B[wt][6]) ct === -1 && (ct = ot);
  9467. else if (ct > -1) {
  9468. for (rt = ct; rt < ot; rt++) E[rt] = ht;
  9469. ct = -1;
  9470. }
  9471. T[ot] === "B" && (E[ot] = 0), z.hiLevel |= ht;
  9472. }
  9473. a && function(H, J, Z) {
  9474. for (var at = 0; at < Z; at++) if (H[at] === "S") {
  9475. J[at] = G;
  9476. for (var st = at - 1; st >= 0 && H[st] === "WS"; st--) J[st] = G;
  9477. }
  9478. }(T, E, At);
  9479. }, R = function(N, E, z, U, rt) {
  9480. if (!(rt.hiLevel < N)) {
  9481. if (N === 1 && G === 1 && !s) return E.reverse(), void (z && z.reverse());
  9482. for (var ot, ht, nt, ct, At = E.length, wt = 0; wt < At; ) {
  9483. if (U[wt] >= N) {
  9484. for (nt = wt + 1; nt < At && U[nt] >= N; ) nt++;
  9485. for (ct = wt, ht = nt - 1; ct < ht; ct++, ht--) ot = E[ct], E[ct] = E[ht], E[ht] = ot, z && (ot = z[ct], z[ct] = z[ht], z[ht] = ot);
  9486. wt = nt;
  9487. }
  9488. wt++;
  9489. }
  9490. }
  9491. }, tt = function(N, E, z) {
  9492. var U = N.split(""), rt = { hiLevel: G };
  9493. return z || (z = []), X(U, z, rt), function(ot, ht, nt) {
  9494. if (nt.hiLevel !== 0 && m) for (var ct, At = 0; At < ot.length; At++) ht[At] === 1 && (ct = M.indexOf(ot[At])) >= 0 && (ot[At] = M[ct + 1]);
  9495. }(U, z, rt), R(2, U, E, z, rt), R(1, U, E, z, rt), U.join("");
  9496. };
  9497. return this.__bidiEngine__.doBidiReorder = function(N, E, z) {
  9498. if (function(rt, ot) {
  9499. if (ot) for (var ht = 0; ht < rt.length; ht++) ot[ht] = ht;
  9500. l === void 0 && (l = it(rt)), d === void 0 && (d = it(rt));
  9501. }(N, E), c || !f || d) if (c && f && l ^ d) G = l ? 1 : 0, N = dt(N, E, z);
  9502. else if (!c && f && d) G = l ? 1 : 0, N = tt(N, E, z), N = dt(N, E);
  9503. else if (!c || l || f || d) {
  9504. if (c && !f && l ^ d) N = dt(N, E), l ? (G = 0, N = tt(N, E, z)) : (G = 1, N = tt(N, E, z), N = dt(N, E));
  9505. else if (c && l && !f && d) G = 1, N = tt(N, E, z), N = dt(N, E);
  9506. else if (!c && !f && l ^ d) {
  9507. var U = m;
  9508. l ? (G = 1, N = tt(N, E, z), G = 0, m = !1, N = tt(N, E, z), m = U) : (G = 0, N = tt(N, E, z), N = dt(N, E), G = 1, m = !1, N = tt(N, E, z), m = U, N = dt(N, E));
  9509. }
  9510. } else G = 0, N = tt(N, E, z);
  9511. else G = l ? 1 : 0, N = tt(N, E, z);
  9512. return N;
  9513. }, this.__bidiEngine__.setOptions = function(N) {
  9514. N && (c = N.isInputVisual, f = N.isOutputVisual, l = N.isInputRtl, d = N.isOutputRtl, m = N.isSymmetricSwapping);
  9515. }, this.__bidiEngine__.setOptions(i), this.__bidiEngine__;
  9516. };
  9517. var e = ["BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "S", "B", "S", "WS", "B", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "B", "B", "B", "S", "WS", "N", "N", "ET", "ET", "ET", "N", "N", "N", "N", "N", "ES", "CS", "ES", "CS", "CS", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "CS", "N", "N", "N", "N", "N", "N", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "N", "N", "N", "N", "N", "N", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "N", "N", "N", "N", "BN", "BN", "BN", "BN", "BN", "BN", "B", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "CS", "N", "ET", "ET", "ET", "ET", "N", "N", "N", "N", "L", "N", "N", "BN", "N", "N", "ET", "ET", "EN", "EN", "N", "L", "N", "N", "N", "EN", "L", "N", "N", "N", "N", "N", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "N", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "N", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "N", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "N", "N", "L", "L", "L", "L", "L", "L", "L", "N", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "N", "L", "N", "N", "N", "N", "N", "ET", "N", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "R", "NSM", "R", "NSM", "NSM", "R", "NSM", "NSM", "R", "NSM", "N", "N", "N", "N", "N", "N", "N", "N", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "N", "N", "N", "N", "N", "R", "R", "R", "R", "R", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "AN", "AN", "AN", "AN", "AN", "AN", "N", "N", "AL", "ET", "ET", "AL", "CS", "AL", "N", "N", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "AL", "AL", "N", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "AN", "AN", "AN", "AN", "AN", "AN", "AN", "AN", "AN", "AN", "ET", "AN", "AN", "AL", "AL", "AL", "NSM", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "AN", "N", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "AL", "AL", "NSM", "NSM", "N", "NSM", "NSM", "NSM", "NSM", "AL", "AL", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "N", "AL", "AL", "NSM", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "N", "N", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "AL", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "R", "R", "N", "N", "N", "N", "R", "N", "N", "N", "N", "N", "WS", "WS", "WS", "WS", "WS", "WS", "WS", "WS", "WS", "WS", "WS", "BN", "BN", "BN", "L", "R", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "WS", "B", "LRE", "RLE", "PDF", "LRO", "RLO", "CS", "ET", "ET", "ET", "ET", "ET", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "CS", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "WS", "BN", "BN", "BN", "BN", "BN", "N", "LRI", "RLI", "FSI", "PDI", "BN", "BN", "BN", "BN", "BN", "BN", "EN", "L", "N", "N", "EN", "EN", "EN", "EN", "EN", "EN", "ES", "ES", "N", "N", "N", "L", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "ES", "ES", "N", "N", "N", "N", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "N", "N", "N", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "L", "L", "L", "L", "L", "L", "L", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "L", "L", "L", "L", "L", "N", "N", "N", "N", "N", "R", "NSM", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "ES", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "N", "R", "R", "R", "R", "R", "N", "R", "N", "R", "R", "N", "R", "R", "N", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "CS", "N", "CS", "N", "N", "CS", "N", "N", "N", "N", "N", "N", "N", "N", "N", "ET", "N", "N", "ES", "ES", "N", "N", "N", "N", "N", "ET", "ET", "N", "N", "N", "N", "N", "AL", "AL", "AL", "AL", "AL", "N", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "N", "N", "BN", "N", "N", "N", "ET", "ET", "ET", "N", "N", "N", "N", "N", "ES", "CS", "ES", "CS", "CS", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "CS", "N", "N", "N", "N", "N", "N", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "N", "N", "N", "N", "N", "N", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "N", "N", "N", "L", "L", "L", "L", "L", "L", "N", "N", "L", "L", "L", "L", "L", "L", "N", "N", "L", "L", "L", "L", "L", "L", "N", "N", "L", "L", "L", "N", "N", "N", "ET", "ET", "N", "N", "N", "ET", "ET", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N"], t = new n.__bidiEngine__({ isInputVisual: !0 });
  9518. n.API.events.push(["postProcessText", function(i) {
  9519. var s = i.text;
  9520. i.x, i.y;
  9521. var a = i.options || {};
  9522. i.mutex, a.lang;
  9523. var c = [];
  9524. if (a.isInputVisual = typeof a.isInputVisual != "boolean" || a.isInputVisual, t.setOptions(a), Object.prototype.toString.call(s) === "[object Array]") {
  9525. var l = 0;
  9526. for (c = [], l = 0; l < s.length; l += 1) Object.prototype.toString.call(s[l]) === "[object Array]" ? c.push([t.doBidiReorder(s[l][0]), s[l][1], s[l][2]]) : c.push([t.doBidiReorder(s[l])]);
  9527. i.text = c;
  9528. } else i.text = t.doBidiReorder(s);
  9529. t.setOptions({ isInputVisual: !0 });
  9530. }]);
  9531. }(Tt), Tt.API.TTFFont = function() {
  9532. function n(e) {
  9533. var t;
  9534. if (this.rawData = e, t = this.contents = new Zr(e), this.contents.pos = 4, t.readString(4) === "ttcf") throw new Error("TTCF not supported.");
  9535. t.pos = 0, this.parse(), this.subset = new g2(this), this.registerTTF();
  9536. }
  9537. return n.open = function(e) {
  9538. return new n(e);
  9539. }, n.prototype.parse = function() {
  9540. return this.directory = new e2(this.contents), this.head = new r2(this), this.name = new l2(this), this.cmap = new Th(this), this.toUnicode = {}, this.hhea = new i2(this), this.maxp = new u2(this), this.hmtx = new h2(this), this.post = new s2(this), this.os2 = new a2(this), this.loca = new p2(this), this.glyf = new f2(this), this.ascender = this.os2.exists && this.os2.ascender || this.hhea.ascender, this.decender = this.os2.exists && this.os2.decender || this.hhea.decender, this.lineGap = this.os2.exists && this.os2.lineGap || this.hhea.lineGap, this.bbox = [this.head.xMin, this.head.yMin, this.head.xMax, this.head.yMax];
  9541. }, n.prototype.registerTTF = function() {
  9542. var e, t, i, s, a;
  9543. if (this.scaleFactor = 1e3 / this.head.unitsPerEm, this.bbox = function() {
  9544. var c, l, f, d;
  9545. for (d = [], c = 0, l = (f = this.bbox).length; c < l; c++) e = f[c], d.push(Math.round(e * this.scaleFactor));
  9546. return d;
  9547. }.call(this), this.stemV = 0, this.post.exists ? (i = 255 & (s = this.post.italic_angle), 32768 & (t = s >> 16) && (t = -(1 + (65535 ^ t))), this.italicAngle = +(t + "." + i)) : this.italicAngle = 0, this.ascender = Math.round(this.ascender * this.scaleFactor), this.decender = Math.round(this.decender * this.scaleFactor), this.lineGap = Math.round(this.lineGap * this.scaleFactor), this.capHeight = this.os2.exists && this.os2.capHeight || this.ascender, this.xHeight = this.os2.exists && this.os2.xHeight || 0, this.familyClass = (this.os2.exists && this.os2.familyClass || 0) >> 8, this.isSerif = (a = this.familyClass) === 1 || a === 2 || a === 3 || a === 4 || a === 5 || a === 7, this.isScript = this.familyClass === 10, this.flags = 0, this.post.isFixedPitch && (this.flags |= 1), this.isSerif && (this.flags |= 2), this.isScript && (this.flags |= 8), this.italicAngle !== 0 && (this.flags |= 64), this.flags |= 32, !this.cmap.unicode) throw new Error("No unicode cmap for font");
  9548. }, n.prototype.characterToGlyph = function(e) {
  9549. var t;
  9550. return ((t = this.cmap.unicode) != null ? t.codeMap[e] : void 0) || 0;
  9551. }, n.prototype.widthOfGlyph = function(e) {
  9552. var t;
  9553. return t = 1e3 / this.head.unitsPerEm, this.hmtx.forGlyph(e).advance * t;
  9554. }, n.prototype.widthOfString = function(e, t, i) {
  9555. var s, a, c, l;
  9556. for (c = 0, a = 0, l = (e = "" + e).length; 0 <= l ? a < l : a > l; a = 0 <= l ? ++a : --a) s = e.charCodeAt(a), c += this.widthOfGlyph(this.characterToGlyph(s)) + i * (1e3 / t) || 0;
  9557. return c * (t / 1e3);
  9558. }, n.prototype.lineHeight = function(e, t) {
  9559. var i;
  9560. return t == null && (t = !1), i = t ? this.lineGap : 0, (this.ascender + i - this.decender) / 1e3 * e;
  9561. }, n;
  9562. }();
  9563. var nr, Zr = function() {
  9564. function n(e) {
  9565. this.data = e != null ? e : [], this.pos = 0, this.length = this.data.length;
  9566. }
  9567. return n.prototype.readByte = function() {
  9568. return this.data[this.pos++];
  9569. }, n.prototype.writeByte = function(e) {
  9570. return this.data[this.pos++] = e;
  9571. }, n.prototype.readUInt32 = function() {
  9572. return 16777216 * this.readByte() + (this.readByte() << 16) + (this.readByte() << 8) + this.readByte();
  9573. }, n.prototype.writeUInt32 = function(e) {
  9574. return this.writeByte(e >>> 24 & 255), this.writeByte(e >> 16 & 255), this.writeByte(e >> 8 & 255), this.writeByte(255 & e);
  9575. }, n.prototype.readInt32 = function() {
  9576. var e;
  9577. return (e = this.readUInt32()) >= 2147483648 ? e - 4294967296 : e;
  9578. }, n.prototype.writeInt32 = function(e) {
  9579. return e < 0 && (e += 4294967296), this.writeUInt32(e);
  9580. }, n.prototype.readUInt16 = function() {
  9581. return this.readByte() << 8 | this.readByte();
  9582. }, n.prototype.writeUInt16 = function(e) {
  9583. return this.writeByte(e >> 8 & 255), this.writeByte(255 & e);
  9584. }, n.prototype.readInt16 = function() {
  9585. var e;
  9586. return (e = this.readUInt16()) >= 32768 ? e - 65536 : e;
  9587. }, n.prototype.writeInt16 = function(e) {
  9588. return e < 0 && (e += 65536), this.writeUInt16(e);
  9589. }, n.prototype.readString = function(e) {
  9590. var t, i;
  9591. for (i = [], t = 0; 0 <= e ? t < e : t > e; t = 0 <= e ? ++t : --t) i[t] = String.fromCharCode(this.readByte());
  9592. return i.join("");
  9593. }, n.prototype.writeString = function(e) {
  9594. var t, i, s;
  9595. for (s = [], t = 0, i = e.length; 0 <= i ? t < i : t > i; t = 0 <= i ? ++t : --t) s.push(this.writeByte(e.charCodeAt(t)));
  9596. return s;
  9597. }, n.prototype.readShort = function() {
  9598. return this.readInt16();
  9599. }, n.prototype.writeShort = function(e) {
  9600. return this.writeInt16(e);
  9601. }, n.prototype.readLongLong = function() {
  9602. var e, t, i, s, a, c, l, f;
  9603. return e = this.readByte(), t = this.readByte(), i = this.readByte(), s = this.readByte(), a = this.readByte(), c = this.readByte(), l = this.readByte(), f = this.readByte(), 128 & e ? -1 * (72057594037927940 * (255 ^ e) + 281474976710656 * (255 ^ t) + 1099511627776 * (255 ^ i) + 4294967296 * (255 ^ s) + 16777216 * (255 ^ a) + 65536 * (255 ^ c) + 256 * (255 ^ l) + (255 ^ f) + 1) : 72057594037927940 * e + 281474976710656 * t + 1099511627776 * i + 4294967296 * s + 16777216 * a + 65536 * c + 256 * l + f;
  9604. }, n.prototype.writeLongLong = function(e) {
  9605. var t, i;
  9606. return t = Math.floor(e / 4294967296), i = 4294967295 & e, this.writeByte(t >> 24 & 255), this.writeByte(t >> 16 & 255), this.writeByte(t >> 8 & 255), this.writeByte(255 & t), this.writeByte(i >> 24 & 255), this.writeByte(i >> 16 & 255), this.writeByte(i >> 8 & 255), this.writeByte(255 & i);
  9607. }, n.prototype.readInt = function() {
  9608. return this.readInt32();
  9609. }, n.prototype.writeInt = function(e) {
  9610. return this.writeInt32(e);
  9611. }, n.prototype.read = function(e) {
  9612. var t, i;
  9613. for (t = [], i = 0; 0 <= e ? i < e : i > e; i = 0 <= e ? ++i : --i) t.push(this.readByte());
  9614. return t;
  9615. }, n.prototype.write = function(e) {
  9616. var t, i, s, a;
  9617. for (a = [], i = 0, s = e.length; i < s; i++) t = e[i], a.push(this.writeByte(t));
  9618. return a;
  9619. }, n;
  9620. }(), e2 = function() {
  9621. var n;
  9622. function e(t) {
  9623. var i, s, a;
  9624. for (this.scalarType = t.readInt(), this.tableCount = t.readShort(), this.searchRange = t.readShort(), this.entrySelector = t.readShort(), this.rangeShift = t.readShort(), this.tables = {}, s = 0, a = this.tableCount; 0 <= a ? s < a : s > a; s = 0 <= a ? ++s : --s) i = { tag: t.readString(4), checksum: t.readInt(), offset: t.readInt(), length: t.readInt() }, this.tables[i.tag] = i;
  9625. }
  9626. return e.prototype.encode = function(t) {
  9627. var i, s, a, c, l, f, d, m, _, k, p, j, O;
  9628. for (O in p = Object.keys(t).length, f = Math.log(2), _ = 16 * Math.floor(Math.log(p) / f), c = Math.floor(_ / f), m = 16 * p - _, (s = new Zr()).writeInt(this.scalarType), s.writeShort(p), s.writeShort(_), s.writeShort(c), s.writeShort(m), a = 16 * p, d = s.pos + a, l = null, j = [], t) for (k = t[O], s.writeString(O), s.writeInt(n(k)), s.writeInt(d), s.writeInt(k.length), j = j.concat(k), O === "head" && (l = d), d += k.length; d % 4; ) j.push(0), d++;
  9629. return s.write(j), i = 2981146554 - n(s.data), s.pos = l + 8, s.writeUInt32(i), s.data;
  9630. }, n = function(t) {
  9631. var i, s, a, c;
  9632. for (t = Dh.call(t); t.length % 4; ) t.push(0);
  9633. for (a = new Zr(t), s = 0, i = 0, c = t.length; i < c; i = i += 4) s += a.readUInt32();
  9634. return 4294967295 & s;
  9635. }, e;
  9636. }(), n2 = {}.hasOwnProperty, vr = function(n, e) {
  9637. for (var t in e) n2.call(e, t) && (n[t] = e[t]);
  9638. function i() {
  9639. this.constructor = n;
  9640. }
  9641. return i.prototype = e.prototype, n.prototype = new i(), n.__super__ = e.prototype, n;
  9642. };
  9643. nr = function() {
  9644. function n(e) {
  9645. var t;
  9646. this.file = e, t = this.file.directory.tables[this.tag], this.exists = !!t, t && (this.offset = t.offset, this.length = t.length, this.parse(this.file.contents));
  9647. }
  9648. return n.prototype.parse = function() {
  9649. }, n.prototype.encode = function() {
  9650. }, n.prototype.raw = function() {
  9651. return this.exists ? (this.file.contents.pos = this.offset, this.file.contents.read(this.length)) : null;
  9652. }, n;
  9653. }();
  9654. var r2 = function() {
  9655. function n() {
  9656. return n.__super__.constructor.apply(this, arguments);
  9657. }
  9658. return vr(n, nr), n.prototype.tag = "head", n.prototype.parse = function(e) {
  9659. return e.pos = this.offset, this.version = e.readInt(), this.revision = e.readInt(), this.checkSumAdjustment = e.readInt(), this.magicNumber = e.readInt(), this.flags = e.readShort(), this.unitsPerEm = e.readShort(), this.created = e.readLongLong(), this.modified = e.readLongLong(), this.xMin = e.readShort(), this.yMin = e.readShort(), this.xMax = e.readShort(), this.yMax = e.readShort(), this.macStyle = e.readShort(), this.lowestRecPPEM = e.readShort(), this.fontDirectionHint = e.readShort(), this.indexToLocFormat = e.readShort(), this.glyphDataFormat = e.readShort();
  9660. }, n.prototype.encode = function(e) {
  9661. var t;
  9662. return (t = new Zr()).writeInt(this.version), t.writeInt(this.revision), t.writeInt(this.checkSumAdjustment), t.writeInt(this.magicNumber), t.writeShort(this.flags), t.writeShort(this.unitsPerEm), t.writeLongLong(this.created), t.writeLongLong(this.modified), t.writeShort(this.xMin), t.writeShort(this.yMin), t.writeShort(this.xMax), t.writeShort(this.yMax), t.writeShort(this.macStyle), t.writeShort(this.lowestRecPPEM), t.writeShort(this.fontDirectionHint), t.writeShort(e), t.writeShort(this.glyphDataFormat), t.data;
  9663. }, n;
  9664. }(), Ju = function() {
  9665. function n(e, t) {
  9666. var i, s, a, c, l, f, d, m, _, k, p, j, O, M, S, V, G;
  9667. switch (this.platformID = e.readUInt16(), this.encodingID = e.readShort(), this.offset = t + e.readInt(), _ = e.pos, e.pos = this.offset, this.format = e.readUInt16(), this.length = e.readUInt16(), this.language = e.readUInt16(), this.isUnicode = this.platformID === 3 && this.encodingID === 1 && this.format === 4 || this.platformID === 0 && this.format === 4, this.codeMap = {}, this.format) {
  9668. case 0:
  9669. for (f = 0; f < 256; ++f) this.codeMap[f] = e.readByte();
  9670. break;
  9671. case 4:
  9672. for (p = e.readUInt16(), k = p / 2, e.pos += 6, a = function() {
  9673. var q, it;
  9674. for (it = [], f = q = 0; 0 <= k ? q < k : q > k; f = 0 <= k ? ++q : --q) it.push(e.readUInt16());
  9675. return it;
  9676. }(), e.pos += 2, O = function() {
  9677. var q, it;
  9678. for (it = [], f = q = 0; 0 <= k ? q < k : q > k; f = 0 <= k ? ++q : --q) it.push(e.readUInt16());
  9679. return it;
  9680. }(), d = function() {
  9681. var q, it;
  9682. for (it = [], f = q = 0; 0 <= k ? q < k : q > k; f = 0 <= k ? ++q : --q) it.push(e.readUInt16());
  9683. return it;
  9684. }(), m = function() {
  9685. var q, it;
  9686. for (it = [], f = q = 0; 0 <= k ? q < k : q > k; f = 0 <= k ? ++q : --q) it.push(e.readUInt16());
  9687. return it;
  9688. }(), s = (this.length - e.pos + this.offset) / 2, l = function() {
  9689. var q, it;
  9690. for (it = [], f = q = 0; 0 <= s ? q < s : q > s; f = 0 <= s ? ++q : --q) it.push(e.readUInt16());
  9691. return it;
  9692. }(), f = S = 0, G = a.length; S < G; f = ++S) for (M = a[f], i = V = j = O[f]; j <= M ? V <= M : V >= M; i = j <= M ? ++V : --V) m[f] === 0 ? c = i + d[f] : (c = l[m[f] / 2 + (i - j) - (k - f)] || 0) !== 0 && (c += d[f]), this.codeMap[i] = 65535 & c;
  9693. }
  9694. e.pos = _;
  9695. }
  9696. return n.encode = function(e, t) {
  9697. var i, s, a, c, l, f, d, m, _, k, p, j, O, M, S, V, G, q, it, vt, dt, X, R, tt, N, E, z, U, rt, ot, ht, nt, ct, At, wt, x, B, T, H, J, Z, at, st, gt, _t, kt;
  9698. switch (U = new Zr(), c = Object.keys(e).sort(function(St, Dt) {
  9699. return St - Dt;
  9700. }), t) {
  9701. case "macroman":
  9702. for (O = 0, M = function() {
  9703. var St = [];
  9704. for (j = 0; j < 256; ++j) St.push(0);
  9705. return St;
  9706. }(), V = { 0: 0 }, a = {}, rt = 0, ct = c.length; rt < ct; rt++) V[st = e[s = c[rt]]] == null && (V[st] = ++O), a[s] = { old: e[s], new: V[e[s]] }, M[s] = V[e[s]];
  9707. return U.writeUInt16(1), U.writeUInt16(0), U.writeUInt32(12), U.writeUInt16(0), U.writeUInt16(262), U.writeUInt16(0), U.write(M), { charMap: a, subtable: U.data, maxGlyphID: O + 1 };
  9708. case "unicode":
  9709. for (E = [], _ = [], G = 0, V = {}, i = {}, S = d = null, ot = 0, At = c.length; ot < At; ot++) V[it = e[s = c[ot]]] == null && (V[it] = ++G), i[s] = { old: it, new: V[it] }, l = V[it] - s, S != null && l === d || (S && _.push(S), E.push(s), d = l), S = s;
  9710. for (S && _.push(S), _.push(65535), E.push(65535), tt = 2 * (R = E.length), X = 2 * Math.pow(Math.log(R) / Math.LN2, 2), k = Math.log(X / 2) / Math.LN2, dt = 2 * R - X, f = [], vt = [], p = [], j = ht = 0, wt = E.length; ht < wt; j = ++ht) {
  9711. if (N = E[j], m = _[j], N === 65535) {
  9712. f.push(0), vt.push(0);
  9713. break;
  9714. }
  9715. if (N - (z = i[N].new) >= 32768) for (f.push(0), vt.push(2 * (p.length + R - j)), s = nt = N; N <= m ? nt <= m : nt >= m; s = N <= m ? ++nt : --nt) p.push(i[s].new);
  9716. else f.push(z - N), vt.push(0);
  9717. }
  9718. for (U.writeUInt16(3), U.writeUInt16(1), U.writeUInt32(12), U.writeUInt16(4), U.writeUInt16(16 + 8 * R + 2 * p.length), U.writeUInt16(0), U.writeUInt16(tt), U.writeUInt16(X), U.writeUInt16(k), U.writeUInt16(dt), Z = 0, x = _.length; Z < x; Z++) s = _[Z], U.writeUInt16(s);
  9719. for (U.writeUInt16(0), at = 0, B = E.length; at < B; at++) s = E[at], U.writeUInt16(s);
  9720. for (gt = 0, T = f.length; gt < T; gt++) l = f[gt], U.writeUInt16(l);
  9721. for (_t = 0, H = vt.length; _t < H; _t++) q = vt[_t], U.writeUInt16(q);
  9722. for (kt = 0, J = p.length; kt < J; kt++) O = p[kt], U.writeUInt16(O);
  9723. return { charMap: i, subtable: U.data, maxGlyphID: G + 1 };
  9724. }
  9725. }, n;
  9726. }(), Th = function() {
  9727. function n() {
  9728. return n.__super__.constructor.apply(this, arguments);
  9729. }
  9730. return vr(n, nr), n.prototype.tag = "cmap", n.prototype.parse = function(e) {
  9731. var t, i, s;
  9732. for (e.pos = this.offset, this.version = e.readUInt16(), s = e.readUInt16(), this.tables = [], this.unicode = null, i = 0; 0 <= s ? i < s : i > s; i = 0 <= s ? ++i : --i) t = new Ju(e, this.offset), this.tables.push(t), t.isUnicode && this.unicode == null && (this.unicode = t);
  9733. return !0;
  9734. }, n.encode = function(e, t) {
  9735. var i, s;
  9736. return t == null && (t = "macroman"), i = Ju.encode(e, t), (s = new Zr()).writeUInt16(0), s.writeUInt16(1), i.table = s.data.concat(i.subtable), i;
  9737. }, n;
  9738. }(), i2 = function() {
  9739. function n() {
  9740. return n.__super__.constructor.apply(this, arguments);
  9741. }
  9742. return vr(n, nr), n.prototype.tag = "hhea", n.prototype.parse = function(e) {
  9743. return e.pos = this.offset, this.version = e.readInt(), this.ascender = e.readShort(), this.decender = e.readShort(), this.lineGap = e.readShort(), this.advanceWidthMax = e.readShort(), this.minLeftSideBearing = e.readShort(), this.minRightSideBearing = e.readShort(), this.xMaxExtent = e.readShort(), this.caretSlopeRise = e.readShort(), this.caretSlopeRun = e.readShort(), this.caretOffset = e.readShort(), e.pos += 8, this.metricDataFormat = e.readShort(), this.numberOfMetrics = e.readUInt16();
  9744. }, n;
  9745. }(), a2 = function() {
  9746. function n() {
  9747. return n.__super__.constructor.apply(this, arguments);
  9748. }
  9749. return vr(n, nr), n.prototype.tag = "OS/2", n.prototype.parse = function(e) {
  9750. if (e.pos = this.offset, this.version = e.readUInt16(), this.averageCharWidth = e.readShort(), this.weightClass = e.readUInt16(), this.widthClass = e.readUInt16(), this.type = e.readShort(), this.ySubscriptXSize = e.readShort(), this.ySubscriptYSize = e.readShort(), this.ySubscriptXOffset = e.readShort(), this.ySubscriptYOffset = e.readShort(), this.ySuperscriptXSize = e.readShort(), this.ySuperscriptYSize = e.readShort(), this.ySuperscriptXOffset = e.readShort(), this.ySuperscriptYOffset = e.readShort(), this.yStrikeoutSize = e.readShort(), this.yStrikeoutPosition = e.readShort(), this.familyClass = e.readShort(), this.panose = function() {
  9751. var t, i;
  9752. for (i = [], t = 0; t < 10; ++t) i.push(e.readByte());
  9753. return i;
  9754. }(), this.charRange = function() {
  9755. var t, i;
  9756. for (i = [], t = 0; t < 4; ++t) i.push(e.readInt());
  9757. return i;
  9758. }(), this.vendorID = e.readString(4), this.selection = e.readShort(), this.firstCharIndex = e.readShort(), this.lastCharIndex = e.readShort(), this.version > 0 && (this.ascent = e.readShort(), this.descent = e.readShort(), this.lineGap = e.readShort(), this.winAscent = e.readShort(), this.winDescent = e.readShort(), this.codePageRange = function() {
  9759. var t, i;
  9760. for (i = [], t = 0; t < 2; t = ++t) i.push(e.readInt());
  9761. return i;
  9762. }(), this.version > 1)) return this.xHeight = e.readShort(), this.capHeight = e.readShort(), this.defaultChar = e.readShort(), this.breakChar = e.readShort(), this.maxContext = e.readShort();
  9763. }, n;
  9764. }(), s2 = function() {
  9765. function n() {
  9766. return n.__super__.constructor.apply(this, arguments);
  9767. }
  9768. return vr(n, nr), n.prototype.tag = "post", n.prototype.parse = function(e) {
  9769. var t, i, s;
  9770. switch (e.pos = this.offset, this.format = e.readInt(), this.italicAngle = e.readInt(), this.underlinePosition = e.readShort(), this.underlineThickness = e.readShort(), this.isFixedPitch = e.readInt(), this.minMemType42 = e.readInt(), this.maxMemType42 = e.readInt(), this.minMemType1 = e.readInt(), this.maxMemType1 = e.readInt(), this.format) {
  9771. case 65536:
  9772. case 196608:
  9773. break;
  9774. case 131072:
  9775. var a;
  9776. for (i = e.readUInt16(), this.glyphNameIndex = [], a = 0; 0 <= i ? a < i : a > i; a = 0 <= i ? ++a : --a) this.glyphNameIndex.push(e.readUInt16());
  9777. for (this.names = [], s = []; e.pos < this.offset + this.length; ) t = e.readByte(), s.push(this.names.push(e.readString(t)));
  9778. return s;
  9779. case 151552:
  9780. return i = e.readUInt16(), this.offsets = e.read(i);
  9781. case 262144:
  9782. return this.map = function() {
  9783. var c, l, f;
  9784. for (f = [], a = c = 0, l = this.file.maxp.numGlyphs; 0 <= l ? c < l : c > l; a = 0 <= l ? ++c : --c) f.push(e.readUInt32());
  9785. return f;
  9786. }.call(this);
  9787. }
  9788. }, n;
  9789. }(), o2 = function(n, e) {
  9790. this.raw = n, this.length = n.length, this.platformID = e.platformID, this.encodingID = e.encodingID, this.languageID = e.languageID;
  9791. }, l2 = function() {
  9792. function n() {
  9793. return n.__super__.constructor.apply(this, arguments);
  9794. }
  9795. return vr(n, nr), n.prototype.tag = "name", n.prototype.parse = function(e) {
  9796. var t, i, s, a, c, l, f, d, m, _, k;
  9797. for (e.pos = this.offset, e.readShort(), t = e.readShort(), l = e.readShort(), i = [], a = 0; 0 <= t ? a < t : a > t; a = 0 <= t ? ++a : --a) i.push({ platformID: e.readShort(), encodingID: e.readShort(), languageID: e.readShort(), nameID: e.readShort(), length: e.readShort(), offset: this.offset + l + e.readShort() });
  9798. for (f = {}, a = m = 0, _ = i.length; m < _; a = ++m) s = i[a], e.pos = s.offset, d = e.readString(s.length), c = new o2(d, s), f[k = s.nameID] == null && (f[k] = []), f[s.nameID].push(c);
  9799. this.strings = f, this.copyright = f[0], this.fontFamily = f[1], this.fontSubfamily = f[2], this.uniqueSubfamily = f[3], this.fontName = f[4], this.version = f[5];
  9800. try {
  9801. this.postscriptName = f[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g, "");
  9802. } catch (p) {
  9803. this.postscriptName = f[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g, "");
  9804. }
  9805. return this.trademark = f[7], this.manufacturer = f[8], this.designer = f[9], this.description = f[10], this.vendorUrl = f[11], this.designerUrl = f[12], this.license = f[13], this.licenseUrl = f[14], this.preferredFamily = f[15], this.preferredSubfamily = f[17], this.compatibleFull = f[18], this.sampleText = f[19];
  9806. }, n;
  9807. }(), u2 = function() {
  9808. function n() {
  9809. return n.__super__.constructor.apply(this, arguments);
  9810. }
  9811. return vr(n, nr), n.prototype.tag = "maxp", n.prototype.parse = function(e) {
  9812. return e.pos = this.offset, this.version = e.readInt(), this.numGlyphs = e.readUInt16(), this.maxPoints = e.readUInt16(), this.maxContours = e.readUInt16(), this.maxCompositePoints = e.readUInt16(), this.maxComponentContours = e.readUInt16(), this.maxZones = e.readUInt16(), this.maxTwilightPoints = e.readUInt16(), this.maxStorage = e.readUInt16(), this.maxFunctionDefs = e.readUInt16(), this.maxInstructionDefs = e.readUInt16(), this.maxStackElements = e.readUInt16(), this.maxSizeOfInstructions = e.readUInt16(), this.maxComponentElements = e.readUInt16(), this.maxComponentDepth = e.readUInt16();
  9813. }, n;
  9814. }(), h2 = function() {
  9815. function n() {
  9816. return n.__super__.constructor.apply(this, arguments);
  9817. }
  9818. return vr(n, nr), n.prototype.tag = "hmtx", n.prototype.parse = function(e) {
  9819. var t, i, s, a, c, l, f;
  9820. for (e.pos = this.offset, this.metrics = [], t = 0, l = this.file.hhea.numberOfMetrics; 0 <= l ? t < l : t > l; t = 0 <= l ? ++t : --t) this.metrics.push({ advance: e.readUInt16(), lsb: e.readInt16() });
  9821. for (s = this.file.maxp.numGlyphs - this.file.hhea.numberOfMetrics, this.leftSideBearings = function() {
  9822. var d, m;
  9823. for (m = [], t = d = 0; 0 <= s ? d < s : d > s; t = 0 <= s ? ++d : --d) m.push(e.readInt16());
  9824. return m;
  9825. }(), this.widths = function() {
  9826. var d, m, _, k;
  9827. for (k = [], d = 0, m = (_ = this.metrics).length; d < m; d++) a = _[d], k.push(a.advance);
  9828. return k;
  9829. }.call(this), i = this.widths[this.widths.length - 1], f = [], t = c = 0; 0 <= s ? c < s : c > s; t = 0 <= s ? ++c : --c) f.push(this.widths.push(i));
  9830. return f;
  9831. }, n.prototype.forGlyph = function(e) {
  9832. return e in this.metrics ? this.metrics[e] : { advance: this.metrics[this.metrics.length - 1].advance, lsb: this.leftSideBearings[e - this.metrics.length] };
  9833. }, n;
  9834. }(), Dh = [].slice, f2 = function() {
  9835. function n() {
  9836. return n.__super__.constructor.apply(this, arguments);
  9837. }
  9838. return vr(n, nr), n.prototype.tag = "glyf", n.prototype.parse = function() {
  9839. return this.cache = {};
  9840. }, n.prototype.glyphFor = function(e) {
  9841. var t, i, s, a, c, l, f, d, m, _;
  9842. return e in this.cache ? this.cache[e] : (a = this.file.loca, t = this.file.contents, i = a.indexOf(e), (s = a.lengthOf(e)) === 0 ? this.cache[e] = null : (t.pos = this.offset + i, c = (l = new Zr(t.read(s))).readShort(), d = l.readShort(), _ = l.readShort(), f = l.readShort(), m = l.readShort(), this.cache[e] = c === -1 ? new d2(l, d, _, f, m) : new c2(l, c, d, _, f, m), this.cache[e]));
  9843. }, n.prototype.encode = function(e, t, i) {
  9844. var s, a, c, l, f;
  9845. for (c = [], a = [], l = 0, f = t.length; l < f; l++) s = e[t[l]], a.push(c.length), s && (c = c.concat(s.encode(i)));
  9846. return a.push(c.length), { table: c, offsets: a };
  9847. }, n;
  9848. }(), c2 = function() {
  9849. function n(e, t, i, s, a, c) {
  9850. this.raw = e, this.numberOfContours = t, this.xMin = i, this.yMin = s, this.xMax = a, this.yMax = c, this.compound = !1;
  9851. }
  9852. return n.prototype.encode = function() {
  9853. return this.raw.data;
  9854. }, n;
  9855. }(), d2 = function() {
  9856. function n(e, t, i, s, a) {
  9857. var c, l;
  9858. for (this.raw = e, this.xMin = t, this.yMin = i, this.xMax = s, this.yMax = a, this.compound = !0, this.glyphIDs = [], this.glyphOffsets = [], c = this.raw; l = c.readShort(), this.glyphOffsets.push(c.pos), this.glyphIDs.push(c.readUInt16()), 32 & l; ) c.pos += 1 & l ? 4 : 2, 128 & l ? c.pos += 8 : 64 & l ? c.pos += 4 : 8 & l && (c.pos += 2);
  9859. }
  9860. return n.prototype.encode = function() {
  9861. var e, t, i;
  9862. for (t = new Zr(Dh.call(this.raw.data)), e = 0, i = this.glyphIDs.length; e < i; ++e) t.pos = this.glyphOffsets[e];
  9863. return t.data;
  9864. }, n;
  9865. }(), p2 = function() {
  9866. function n() {
  9867. return n.__super__.constructor.apply(this, arguments);
  9868. }
  9869. return vr(n, nr), n.prototype.tag = "loca", n.prototype.parse = function(e) {
  9870. var t, i;
  9871. return e.pos = this.offset, t = this.file.head.indexToLocFormat, this.offsets = t === 0 ? function() {
  9872. var s, a;
  9873. for (a = [], i = 0, s = this.length; i < s; i += 2) a.push(2 * e.readUInt16());
  9874. return a;
  9875. }.call(this) : function() {
  9876. var s, a;
  9877. for (a = [], i = 0, s = this.length; i < s; i += 4) a.push(e.readUInt32());
  9878. return a;
  9879. }.call(this);
  9880. }, n.prototype.indexOf = function(e) {
  9881. return this.offsets[e];
  9882. }, n.prototype.lengthOf = function(e) {
  9883. return this.offsets[e + 1] - this.offsets[e];
  9884. }, n.prototype.encode = function(e, t) {
  9885. for (var i = new Uint32Array(this.offsets.length), s = 0, a = 0, c = 0; c < i.length; ++c) if (i[c] = s, a < t.length && t[a] == c) {
  9886. ++a, i[c] = s;
  9887. var l = this.offsets[c], f = this.offsets[c + 1] - l;
  9888. f > 0 && (s += f);
  9889. }
  9890. for (var d = new Array(4 * i.length), m = 0; m < i.length; ++m) d[4 * m + 3] = 255 & i[m], d[4 * m + 2] = (65280 & i[m]) >> 8, d[4 * m + 1] = (16711680 & i[m]) >> 16, d[4 * m] = (4278190080 & i[m]) >> 24;
  9891. return d;
  9892. }, n;
  9893. }(), g2 = function() {
  9894. function n(e) {
  9895. this.font = e, this.subset = {}, this.unicodes = {}, this.next = 33;
  9896. }
  9897. return n.prototype.generateCmap = function() {
  9898. var e, t, i, s, a;
  9899. for (t in s = this.font.cmap.tables[0].codeMap, e = {}, a = this.subset) i = a[t], e[t] = s[i];
  9900. return e;
  9901. }, n.prototype.glyphsFor = function(e) {
  9902. var t, i, s, a, c, l, f;
  9903. for (s = {}, c = 0, l = e.length; c < l; c++) s[a = e[c]] = this.font.glyf.glyphFor(a);
  9904. for (a in t = [], s) (i = s[a]) != null && i.compound && t.push.apply(t, i.glyphIDs);
  9905. if (t.length > 0) for (a in f = this.glyphsFor(t)) i = f[a], s[a] = i;
  9906. return s;
  9907. }, n.prototype.encode = function(e, t) {
  9908. var i, s, a, c, l, f, d, m, _, k, p, j, O, M, S;
  9909. for (s in i = Th.encode(this.generateCmap(), "unicode"), c = this.glyphsFor(e), p = { 0: 0 }, S = i.charMap) p[(f = S[s]).old] = f.new;
  9910. for (j in k = i.maxGlyphID, c) j in p || (p[j] = k++);
  9911. return m = function(V) {
  9912. var G, q;
  9913. for (G in q = {}, V) q[V[G]] = G;
  9914. return q;
  9915. }(p), _ = Object.keys(m).sort(function(V, G) {
  9916. return V - G;
  9917. }), O = function() {
  9918. var V, G, q;
  9919. for (q = [], V = 0, G = _.length; V < G; V++) l = _[V], q.push(m[l]);
  9920. return q;
  9921. }(), a = this.font.glyf.encode(c, O, p), d = this.font.loca.encode(a.offsets, O), M = { cmap: this.font.cmap.raw(), glyf: a.table, loca: d, hmtx: this.font.hmtx.raw(), hhea: this.font.hhea.raw(), maxp: this.font.maxp.raw(), post: this.font.post.raw(), name: this.font.name.raw(), head: this.font.head.encode(t) }, this.font.os2.exists && (M["OS/2"] = this.font.os2.raw()), this.font.directory.encode(M);
  9922. }, n;
  9923. }();
  9924. Tt.API.PDFObject = function() {
  9925. var n;
  9926. function e() {
  9927. }
  9928. return n = function(t, i) {
  9929. return (Array(i + 1).join("0") + t).slice(-i);
  9930. }, e.convert = function(t) {
  9931. var i, s, a, c;
  9932. if (Array.isArray(t)) return "[" + function() {
  9933. var l, f, d;
  9934. for (d = [], l = 0, f = t.length; l < f; l++) i = t[l], d.push(e.convert(i));
  9935. return d;
  9936. }().join(" ") + "]";
  9937. if (typeof t == "string") return "/" + t;
  9938. if (t != null && t.isString) return "(" + t + ")";
  9939. if (t instanceof Date) return "(D:" + n(t.getUTCFullYear(), 4) + n(t.getUTCMonth(), 2) + n(t.getUTCDate(), 2) + n(t.getUTCHours(), 2) + n(t.getUTCMinutes(), 2) + n(t.getUTCSeconds(), 2) + "Z)";
  9940. if ({}.toString.call(t) === "[object Object]") {
  9941. for (s in a = ["<<"], t) c = t[s], a.push("/" + s + " " + e.convert(c));
  9942. return a.push(">>"), a.join(`
  9943. `);
  9944. }
  9945. return "" + t;
  9946. }, e;
  9947. }();
  9948. export {
  9949. b2 as AcroForm,
  9950. Ft as AcroFormAppearance,
  9951. an as AcroFormButton,
  9952. ks as AcroFormCheckBox,
  9953. ea as AcroFormChoiceField,
  9954. ra as AcroFormComboBox,
  9955. Ls as AcroFormEditBox,
  9956. na as AcroFormListBox,
  9957. Ps as AcroFormPasswordField,
  9958. Ss as AcroFormPushButton,
  9959. ia as AcroFormRadioButton,
  9960. yi as AcroFormTextField,
  9961. Cs as GState,
  9962. wi as ShadingPattern,
  9963. Qi as TilingPattern,
  9964. Tt as default,
  9965. Tt as jsPDF
  9966. };