| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416 |
- /**
- * Skipped minification because the original files appears to be already minified.
- * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
- */
- !(function(t, e) {
- 'object' == typeof exports && 'undefined' != typeof module
- ? e(exports)
- : 'function' == typeof define && define.amd
- ? define(['exports'], e)
- : e(((t = t || self).canvg = {}));
- })(this, function(t) {
- 'use strict';
- var e =
- 'undefined' != typeof globalThis
- ? globalThis
- : 'undefined' != typeof window
- ? window
- : 'undefined' != typeof global
- ? global
- : 'undefined' != typeof self
- ? self
- : {};
- function r(t, e) {
- return t((e = { exports: {} }), e.exports), e.exports;
- }
- var n = function(t) {
- return t && t.Math == Math && t;
- },
- i =
- n('object' == typeof globalThis && globalThis) ||
- n('object' == typeof window && window) ||
- n('object' == typeof self && self) ||
- n('object' == typeof e && e) ||
- Function('return this')(),
- o = function(t) {
- try {
- return !!t();
- } catch (t) {
- return !0;
- }
- },
- a = !o(function() {
- return (
- 7 !=
- Object.defineProperty({}, 1, {
- get: function() {
- return 7;
- }
- })[1]
- );
- }),
- u = {}.propertyIsEnumerable,
- s = Object.getOwnPropertyDescriptor,
- c = {
- f:
- s && !u.call({ 1: 2 }, 1)
- ? function(t) {
- var e = s(this, t);
- return !!e && e.enumerable;
- }
- : u
- },
- l = function(t, e) {
- return { enumerable: !(1 & t), configurable: !(2 & t), writable: !(4 & t), value: e };
- },
- f = {}.toString,
- h = function(t) {
- return f.call(t).slice(8, -1);
- },
- p = ''.split,
- g = o(function() {
- return !Object('z').propertyIsEnumerable(0);
- })
- ? function(t) {
- return 'String' == h(t) ? p.call(t, '') : Object(t);
- }
- : Object,
- y = function(t) {
- if (null == t) throw TypeError("Can't call method on " + t);
- return t;
- },
- v = function(t) {
- return g(y(t));
- },
- d = function(t) {
- return 'object' == typeof t ? null !== t : 'function' == typeof t;
- },
- m = function(t, e) {
- if (!d(t)) return t;
- var r, n;
- if (e && 'function' == typeof (r = t.toString) && !d((n = r.call(t)))) return n;
- if ('function' == typeof (r = t.valueOf) && !d((n = r.call(t)))) return n;
- if (!e && 'function' == typeof (r = t.toString) && !d((n = r.call(t)))) return n;
- throw TypeError("Can't convert object to primitive value");
- },
- x = {}.hasOwnProperty,
- b = function(t, e) {
- return x.call(t, e);
- },
- w = i.document,
- S = d(w) && d(w.createElement),
- k = function(t) {
- return S ? w.createElement(t) : {};
- },
- P =
- !a &&
- !o(function() {
- return (
- 7 !=
- Object.defineProperty(k('div'), 'a', {
- get: function() {
- return 7;
- }
- }).a
- );
- }),
- R = Object.getOwnPropertyDescriptor,
- A = {
- f: a
- ? R
- : function(t, e) {
- if (((t = v(t)), (e = m(e, !0)), P))
- try {
- return R(t, e);
- } catch (t) {}
- if (b(t, e)) return l(!c.f.call(t, e), t[e]);
- }
- },
- E = function(t) {
- if (!d(t)) throw TypeError(String(t) + ' is not an object');
- return t;
- },
- C = Object.defineProperty,
- T = {
- f: a
- ? C
- : function(t, e, r) {
- if ((E(t), (e = m(e, !0)), E(r), P))
- try {
- return C(t, e, r);
- } catch (t) {}
- if ('get' in r || 'set' in r) throw TypeError('Accessors not supported');
- return 'value' in r && (t[e] = r.value), t;
- }
- },
- O = a
- ? function(t, e, r) {
- return T.f(t, e, l(1, r));
- }
- : function(t, e, r) {
- return (t[e] = r), t;
- },
- M = function(t, e) {
- try {
- O(i, t, e);
- } catch (r) {
- i[t] = e;
- }
- return e;
- },
- D = i['__core-js_shared__'] || M('__core-js_shared__', {}),
- V = Function.toString;
- 'function' != typeof D.inspectSource &&
- (D.inspectSource = function(t) {
- return V.call(t);
- });
- var N,
- I,
- L,
- j = D.inspectSource,
- z = i.WeakMap,
- B = 'function' == typeof z && /native code/.test(j(z)),
- F = r(function(t) {
- (t.exports = function(t, e) {
- return D[t] || (D[t] = void 0 !== e ? e : {});
- })('versions', []).push({
- version: '3.6.4',
- mode: 'global',
- copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
- });
- }),
- _ = 0,
- $ = Math.random(),
- G = function(t) {
- return 'Symbol(' + String(void 0 === t ? '' : t) + ')_' + (++_ + $).toString(36);
- },
- q = F('keys'),
- U = function(t) {
- return q[t] || (q[t] = G(t));
- },
- W = {},
- H = i.WeakMap;
- if (B) {
- var X = new H(),
- Y = X.get,
- Q = X.has,
- Z = X.set;
- (N = function(t, e) {
- return Z.call(X, t, e), e;
- }),
- (I = function(t) {
- return Y.call(X, t) || {};
- }),
- (L = function(t) {
- return Q.call(X, t);
- });
- } else {
- var K = U('state');
- (W[K] = !0),
- (N = function(t, e) {
- return O(t, K, e), e;
- }),
- (I = function(t) {
- return b(t, K) ? t[K] : {};
- }),
- (L = function(t) {
- return b(t, K);
- });
- }
- var J,
- tt,
- et = {
- set: N,
- get: I,
- has: L,
- enforce: function(t) {
- return L(t) ? I(t) : N(t, {});
- },
- getterFor: function(t) {
- return function(e) {
- var r;
- if (!d(e) || (r = I(e)).type !== t) throw TypeError('Incompatible receiver, ' + t + ' required');
- return r;
- };
- }
- },
- rt = r(function(t) {
- var e = et.get,
- r = et.enforce,
- n = String(String).split('String');
- (t.exports = function(t, e, o, a) {
- var u = !!a && !!a.unsafe,
- s = !!a && !!a.enumerable,
- c = !!a && !!a.noTargetGet;
- 'function' == typeof o &&
- ('string' != typeof e || b(o, 'name') || O(o, 'name', e),
- (r(o).source = n.join('string' == typeof e ? e : ''))),
- t !== i
- ? (u ? !c && t[e] && (s = !0) : delete t[e], s ? (t[e] = o) : O(t, e, o))
- : s
- ? (t[e] = o)
- : M(e, o);
- })(Function.prototype, 'toString', function() {
- return ('function' == typeof this && e(this).source) || j(this);
- });
- }),
- nt = i,
- it = function(t) {
- return 'function' == typeof t ? t : void 0;
- },
- ot = function(t, e) {
- return arguments.length < 2 ? it(nt[t]) || it(i[t]) : (nt[t] && nt[t][e]) || (i[t] && i[t][e]);
- },
- at = Math.ceil,
- ut = Math.floor,
- st = function(t) {
- return isNaN((t = +t)) ? 0 : (t > 0 ? ut : at)(t);
- },
- ct = Math.min,
- lt = function(t) {
- return t > 0 ? ct(st(t), 9007199254740991) : 0;
- },
- ft = Math.max,
- ht = Math.min,
- pt = function(t, e) {
- var r = st(t);
- return r < 0 ? ft(r + e, 0) : ht(r, e);
- },
- gt = function(t) {
- return function(e, r, n) {
- var i,
- o = v(e),
- a = lt(o.length),
- u = pt(n, a);
- if (t && r != r) {
- for (; a > u; ) if ((i = o[u++]) != i) return !0;
- } else for (; a > u; u++) if ((t || u in o) && o[u] === r) return t || u || 0;
- return !t && -1;
- };
- },
- yt = { includes: gt(!0), indexOf: gt(!1) },
- vt = yt.indexOf,
- dt = function(t, e) {
- var r,
- n = v(t),
- i = 0,
- o = [];
- for (r in n) !b(W, r) && b(n, r) && o.push(r);
- for (; e.length > i; ) b(n, (r = e[i++])) && (~vt(o, r) || o.push(r));
- return o;
- },
- mt = [
- 'constructor',
- 'hasOwnProperty',
- 'isPrototypeOf',
- 'propertyIsEnumerable',
- 'toLocaleString',
- 'toString',
- 'valueOf'
- ],
- xt = mt.concat('length', 'prototype'),
- bt = {
- f:
- Object.getOwnPropertyNames ||
- function(t) {
- return dt(t, xt);
- }
- },
- wt = { f: Object.getOwnPropertySymbols },
- St =
- ot('Reflect', 'ownKeys') ||
- function(t) {
- var e = bt.f(E(t)),
- r = wt.f;
- return r ? e.concat(r(t)) : e;
- },
- kt = function(t, e) {
- for (var r = St(e), n = T.f, i = A.f, o = 0; o < r.length; o++) {
- var a = r[o];
- b(t, a) || n(t, a, i(e, a));
- }
- },
- Pt = /#|\.prototype\./,
- Rt = function(t, e) {
- var r = Et[At(t)];
- return r == Tt || (r != Ct && ('function' == typeof e ? o(e) : !!e));
- },
- At = (Rt.normalize = function(t) {
- return String(t)
- .replace(Pt, '.')
- .toLowerCase();
- }),
- Et = (Rt.data = {}),
- Ct = (Rt.NATIVE = 'N'),
- Tt = (Rt.POLYFILL = 'P'),
- Ot = Rt,
- Mt = A.f,
- Dt = function(t, e) {
- var r,
- n,
- o,
- a,
- u,
- s = t.target,
- c = t.global,
- l = t.stat;
- if ((r = c ? i : l ? i[s] || M(s, {}) : (i[s] || {}).prototype))
- for (n in e) {
- if (
- ((a = e[n]),
- (o = t.noTargetGet ? (u = Mt(r, n)) && u.value : r[n]),
- !Ot(c ? n : s + (l ? '.' : '#') + n, t.forced) && void 0 !== o)
- ) {
- if (typeof a == typeof o) continue;
- kt(a, o);
- }
- (t.sham || (o && o.sham)) && O(a, 'sham', !0), rt(r, n, a, t);
- }
- },
- Vt = function(t) {
- if ('function' != typeof t) throw TypeError(String(t) + ' is not a function');
- return t;
- },
- Nt = function(t, e, r) {
- if ((Vt(t), void 0 === e)) return t;
- switch (r) {
- case 0:
- return function() {
- return t.call(e);
- };
- case 1:
- return function(r) {
- return t.call(e, r);
- };
- case 2:
- return function(r, n) {
- return t.call(e, r, n);
- };
- case 3:
- return function(r, n, i) {
- return t.call(e, r, n, i);
- };
- }
- return function() {
- return t.apply(e, arguments);
- };
- },
- It = function(t) {
- return Object(y(t));
- },
- Lt =
- Array.isArray ||
- function(t) {
- return 'Array' == h(t);
- },
- jt =
- !!Object.getOwnPropertySymbols &&
- !o(function() {
- return !String(Symbol());
- }),
- zt = jt && !Symbol.sham && 'symbol' == typeof Symbol.iterator,
- Bt = F('wks'),
- Ft = i.Symbol,
- _t = zt ? Ft : (Ft && Ft.withoutSetter) || G,
- $t = function(t) {
- return b(Bt, t) || (jt && b(Ft, t) ? (Bt[t] = Ft[t]) : (Bt[t] = _t('Symbol.' + t))), Bt[t];
- },
- Gt = $t('species'),
- qt = function(t, e) {
- var r;
- return (
- Lt(t) &&
- ('function' != typeof (r = t.constructor) || (r !== Array && !Lt(r.prototype))
- ? d(r) && null === (r = r[Gt]) && (r = void 0)
- : (r = void 0)),
- new (void 0 === r ? Array : r)(0 === e ? 0 : e)
- );
- },
- Ut = [].push,
- Wt = function(t) {
- var e = 1 == t,
- r = 2 == t,
- n = 3 == t,
- i = 4 == t,
- o = 6 == t,
- a = 5 == t || o;
- return function(u, s, c, l) {
- for (
- var f,
- h,
- p = It(u),
- y = g(p),
- v = Nt(s, c, 3),
- d = lt(y.length),
- m = 0,
- x = l || qt,
- b = e ? x(u, d) : r ? x(u, 0) : void 0;
- d > m;
- m++
- )
- if ((a || m in y) && ((h = v((f = y[m]), m, p)), t))
- if (e) b[m] = h;
- else if (h)
- switch (t) {
- case 3:
- return !0;
- case 5:
- return f;
- case 6:
- return m;
- case 2:
- Ut.call(b, f);
- }
- else if (i) return !1;
- return o ? -1 : n || i ? i : b;
- };
- },
- Ht = { forEach: Wt(0), map: Wt(1), filter: Wt(2), some: Wt(3), every: Wt(4), find: Wt(5), findIndex: Wt(6) },
- Xt = ot('navigator', 'userAgent') || '',
- Yt = i.process,
- Qt = Yt && Yt.versions,
- Zt = Qt && Qt.v8;
- Zt
- ? (tt = (J = Zt.split('.'))[0] + J[1])
- : Xt && (!(J = Xt.match(/Edge\/(\d+)/)) || J[1] >= 74) && (J = Xt.match(/Chrome\/(\d+)/)) && (tt = J[1]);
- var Kt = tt && +tt,
- Jt = $t('species'),
- te = function(t) {
- return (
- Kt >= 51 ||
- !o(function() {
- var e = [];
- return (
- ((e.constructor = {})[Jt] = function() {
- return { foo: 1 };
- }),
- 1 !== e[t](Boolean).foo
- );
- })
- );
- },
- ee = Object.defineProperty,
- re = {},
- ne = function(t) {
- throw t;
- },
- ie = function(t, e) {
- if (b(re, t)) return re[t];
- e || (e = {});
- var r = [][t],
- n = !!b(e, 'ACCESSORS') && e.ACCESSORS,
- i = b(e, 0) ? e[0] : ne,
- u = b(e, 1) ? e[1] : void 0;
- return (re[t] =
- !!r &&
- !o(function() {
- if (n && !a) return !0;
- var t = { length: -1 };
- n ? ee(t, 1, { enumerable: !0, get: ne }) : (t[1] = 1), r.call(t, i, u);
- }));
- },
- oe = Ht.map,
- ae = te('map'),
- ue = ie('map');
- Dt(
- { target: 'Array', proto: !0, forced: !ae || !ue },
- {
- map: function(t) {
- return oe(this, t, arguments.length > 1 ? arguments[1] : void 0);
- }
- }
- );
- var se = function() {
- var t = E(this),
- e = '';
- return (
- t.global && (e += 'g'),
- t.ignoreCase && (e += 'i'),
- t.multiline && (e += 'm'),
- t.dotAll && (e += 's'),
- t.unicode && (e += 'u'),
- t.sticky && (e += 'y'),
- e
- );
- };
- function ce(t, e) {
- return RegExp(t, e);
- }
- var le,
- fe,
- he = {
- UNSUPPORTED_Y: o(function() {
- var t = ce('a', 'y');
- return (t.lastIndex = 2), null != t.exec('abcd');
- }),
- BROKEN_CARET: o(function() {
- var t = ce('^r', 'gy');
- return (t.lastIndex = 2), null != t.exec('str');
- })
- },
- pe = RegExp.prototype.exec,
- ge = String.prototype.replace,
- ye = pe,
- ve = ((le = /a/), (fe = /b*/g), pe.call(le, 'a'), pe.call(fe, 'a'), 0 !== le.lastIndex || 0 !== fe.lastIndex),
- de = he.UNSUPPORTED_Y || he.BROKEN_CARET,
- me = void 0 !== /()??/.exec('')[1];
- (ve || me || de) &&
- (ye = function(t) {
- var e,
- r,
- n,
- i,
- o = this,
- a = de && o.sticky,
- u = se.call(o),
- s = o.source,
- c = 0,
- l = t;
- return (
- a &&
- (-1 === (u = u.replace('y', '')).indexOf('g') && (u += 'g'),
- (l = String(t).slice(o.lastIndex)),
- o.lastIndex > 0 &&
- (!o.multiline || (o.multiline && '\n' !== t[o.lastIndex - 1])) &&
- ((s = '(?: ' + s + ')'), (l = ' ' + l), c++),
- (r = new RegExp('^(?:' + s + ')', u))),
- me && (r = new RegExp('^' + s + '$(?!\\s)', u)),
- ve && (e = o.lastIndex),
- (n = pe.call(a ? r : o, l)),
- a
- ? n
- ? ((n.input = n.input.slice(c)),
- (n[0] = n[0].slice(c)),
- (n.index = o.lastIndex),
- (o.lastIndex += n[0].length))
- : (o.lastIndex = 0)
- : ve && n && (o.lastIndex = o.global ? n.index + n[0].length : e),
- me &&
- n &&
- n.length > 1 &&
- ge.call(n[0], r, function() {
- for (i = 1; i < arguments.length - 2; i++) void 0 === arguments[i] && (n[i] = void 0);
- }),
- n
- );
- });
- var xe = ye;
- Dt({ target: 'RegExp', proto: !0, forced: /./.exec !== xe }, { exec: xe });
- var be = $t('species'),
- we = !o(function() {
- var t = /./;
- return (
- (t.exec = function() {
- var t = [];
- return (t.groups = { a: '7' }), t;
- }),
- '7' !== ''.replace(t, '$<a>')
- );
- }),
- Se = '$0' === 'a'.replace(/./, '$0'),
- ke = $t('replace'),
- Pe = !!/./[ke] && '' === /./[ke]('a', '$0'),
- Re = !o(function() {
- var t = /(?:)/,
- e = t.exec;
- t.exec = function() {
- return e.apply(this, arguments);
- };
- var r = 'ab'.split(t);
- return 2 !== r.length || 'a' !== r[0] || 'b' !== r[1];
- }),
- Ae = function(t, e, r, n) {
- var i = $t(t),
- a = !o(function() {
- var e = {};
- return (
- (e[i] = function() {
- return 7;
- }),
- 7 != ''[t](e)
- );
- }),
- u =
- a &&
- !o(function() {
- var e = !1,
- r = /a/;
- return (
- 'split' === t &&
- (((r = {}).constructor = {}),
- (r.constructor[be] = function() {
- return r;
- }),
- (r.flags = ''),
- (r[i] = /./[i])),
- (r.exec = function() {
- return (e = !0), null;
- }),
- r[i](''),
- !e
- );
- });
- if (!a || !u || ('replace' === t && (!we || !Se || Pe)) || ('split' === t && !Re)) {
- var s = /./[i],
- c = r(
- i,
- ''[t],
- function(t, e, r, n, i) {
- return e.exec === xe
- ? a && !i
- ? { done: !0, value: s.call(e, r, n) }
- : { done: !0, value: t.call(r, e, n) }
- : { done: !1 };
- },
- { REPLACE_KEEPS_$0: Se, REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: Pe }
- ),
- l = c[0],
- f = c[1];
- rt(String.prototype, t, l),
- rt(
- RegExp.prototype,
- i,
- 2 == e
- ? function(t, e) {
- return f.call(t, this, e);
- }
- : function(t) {
- return f.call(t, this);
- }
- );
- }
- n && O(RegExp.prototype[i], 'sham', !0);
- },
- Ee = function(t) {
- return function(e, r) {
- var n,
- i,
- o = String(y(e)),
- a = st(r),
- u = o.length;
- return a < 0 || a >= u
- ? t
- ? ''
- : void 0
- : (n = o.charCodeAt(a)) < 55296 ||
- n > 56319 ||
- a + 1 === u ||
- (i = o.charCodeAt(a + 1)) < 56320 ||
- i > 57343
- ? t
- ? o.charAt(a)
- : n
- : t
- ? o.slice(a, a + 2)
- : i - 56320 + ((n - 55296) << 10) + 65536;
- };
- },
- Ce = { codeAt: Ee(!1), charAt: Ee(!0) },
- Te = Ce.charAt,
- Oe = function(t, e, r) {
- return e + (r ? Te(t, e).length : 1);
- },
- Me = function(t, e) {
- var r = t.exec;
- if ('function' == typeof r) {
- var n = r.call(t, e);
- if ('object' != typeof n)
- throw TypeError('RegExp exec method returned something other than an Object or null');
- return n;
- }
- if ('RegExp' !== h(t)) throw TypeError('RegExp#exec called on incompatible receiver');
- return xe.call(t, e);
- };
- Ae('match', 1, function(t, e, r) {
- return [
- function(e) {
- var r = y(this),
- n = null == e ? void 0 : e[t];
- return void 0 !== n ? n.call(e, r) : new RegExp(e)[t](String(r));
- },
- function(t) {
- var n = r(e, t, this);
- if (n.done) return n.value;
- var i = E(t),
- o = String(this);
- if (!i.global) return Me(i, o);
- var a = i.unicode;
- i.lastIndex = 0;
- for (var u, s = [], c = 0; null !== (u = Me(i, o)); ) {
- var l = String(u[0]);
- (s[c] = l), '' === l && (i.lastIndex = Oe(o, lt(i.lastIndex), a)), c++;
- }
- return 0 === c ? null : s;
- }
- ];
- });
- var De = Math.max,
- Ve = Math.min,
- Ne = Math.floor,
- Ie = /\$([$&'`]|\d\d?|<[^>]*>)/g,
- Le = /\$([$&'`]|\d\d?)/g;
- Ae('replace', 2, function(t, e, r, n) {
- var i = n.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,
- o = n.REPLACE_KEEPS_$0,
- a = i ? '$' : '$0';
- return [
- function(r, n) {
- var i = y(this),
- o = null == r ? void 0 : r[t];
- return void 0 !== o ? o.call(r, i, n) : e.call(String(i), r, n);
- },
- function(t, n) {
- if ((!i && o) || ('string' == typeof n && -1 === n.indexOf(a))) {
- var s = r(e, t, this, n);
- if (s.done) return s.value;
- }
- var c = E(t),
- l = String(this),
- f = 'function' == typeof n;
- f || (n = String(n));
- var h = c.global;
- if (h) {
- var p = c.unicode;
- c.lastIndex = 0;
- }
- for (var g = []; ; ) {
- var y = Me(c, l);
- if (null === y) break;
- if ((g.push(y), !h)) break;
- '' === String(y[0]) && (c.lastIndex = Oe(l, lt(c.lastIndex), p));
- }
- for (var v, d = '', m = 0, x = 0; x < g.length; x++) {
- y = g[x];
- for (var b = String(y[0]), w = De(Ve(st(y.index), l.length), 0), S = [], k = 1; k < y.length; k++)
- S.push(void 0 === (v = y[k]) ? v : String(v));
- var P = y.groups;
- if (f) {
- var R = [b].concat(S, w, l);
- void 0 !== P && R.push(P);
- var A = String(n.apply(void 0, R));
- } else A = u(b, l, w, S, P, n);
- w >= m && ((d += l.slice(m, w) + A), (m = w + b.length));
- }
- return d + l.slice(m);
- }
- ];
- function u(t, r, n, i, o, a) {
- var u = n + t.length,
- s = i.length,
- c = Le;
- return (
- void 0 !== o && ((o = It(o)), (c = Ie)),
- e.call(a, c, function(e, a) {
- var c;
- switch (a.charAt(0)) {
- case '$':
- return '$';
- case '&':
- return t;
- case '`':
- return r.slice(0, n);
- case "'":
- return r.slice(u);
- case '<':
- c = o[a.slice(1, -1)];
- break;
- default:
- var l = +a;
- if (0 === l) return e;
- if (l > s) {
- var f = Ne(l / 10);
- return 0 === f
- ? e
- : f <= s
- ? void 0 === i[f - 1]
- ? a.charAt(1)
- : i[f - 1] + a.charAt(1)
- : e;
- }
- c = i[l - 1];
- }
- return void 0 === c ? '' : c;
- })
- );
- }
- });
- var je,
- ze = $t('match'),
- Be = function(t) {
- var e;
- return d(t) && (void 0 !== (e = t[ze]) ? !!e : 'RegExp' == h(t));
- },
- Fe = function(t) {
- if (Be(t)) throw TypeError("The method doesn't accept regular expressions");
- return t;
- },
- _e = $t('match'),
- $e = function(t) {
- var e = /./;
- try {
- '/./'[t](e);
- } catch (r) {
- try {
- return (e[_e] = !1), '/./'[t](e);
- } catch (t) {}
- }
- return !1;
- },
- Ge = A.f,
- qe = ''.startsWith,
- Ue = Math.min,
- We = $e('startsWith'),
- He = !(We || ((je = Ge(String.prototype, 'startsWith')), !je || je.writable));
- function Xe(t) {
- return t.replace(/(?!\u3000)\s+/gm, ' ');
- }
- function Ye(t) {
- return t.replace(/^[\n \t]+/, '');
- }
- function Qe(t) {
- return t.replace(/[\n \t]+$/, '');
- }
- function Ze(t) {
- return ((t || '').match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm) || []).map(parseFloat);
- }
- Dt(
- { target: 'String', proto: !0, forced: !He && !We },
- {
- startsWith: function(t) {
- var e = String(y(this));
- Fe(t);
- var r = lt(Ue(arguments.length > 1 ? arguments[1] : void 0, e.length)),
- n = String(t);
- return qe ? qe.call(e, n, r) : e.slice(r, r + n.length) === n;
- }
- }
- );
- var Ke = /^[A-Z-]+$/;
- function Je(t) {
- return Ke.test(t) ? t.toLowerCase() : t;
- }
- function tr(t) {
- var e = t.match(/url\(('([^']+)'|"([^"]+)"|([^'"\)]+))\)/) || [];
- return e[2] || e[3] || e[4];
- }
- function er(t) {
- if (!t.startsWith('rgb')) return t;
- var e = 3;
- return t.replace(/\d+(\.\d+)?/g, function(t, r) {
- return e-- && r ? String(Math.round(parseFloat(t))) : t;
- });
- }
- var rr = function(t, e) {
- var r = [][t];
- return (
- !!r &&
- o(function() {
- r.call(
- null,
- e ||
- function() {
- throw 1;
- },
- 1
- );
- })
- );
- },
- nr = [].join,
- ir = g != Object,
- or = rr('join', ',');
- Dt(
- { target: 'Array', proto: !0, forced: ir || !or },
- {
- join: function(t) {
- return nr.call(v(this), void 0 === t ? ',' : t);
- }
- }
- );
- var ar = function(t) {
- if (Array.isArray(t)) return t;
- };
- var ur = function(t, e) {
- if ('undefined' != typeof Symbol && Symbol.iterator in Object(t)) {
- var r = [],
- n = !0,
- i = !1,
- o = void 0;
- try {
- for (
- var a, u = t[Symbol.iterator]();
- !(n = (a = u.next()).done) && (r.push(a.value), !e || r.length !== e);
- n = !0
- );
- } catch (t) {
- (i = !0), (o = t);
- } finally {
- try {
- n || null == u.return || u.return();
- } finally {
- if (i) throw o;
- }
- }
- return r;
- }
- };
- var sr = function(t, e) {
- (null == e || e > t.length) && (e = t.length);
- for (var r = 0, n = new Array(e); r < e; r++) n[r] = t[r];
- return n;
- };
- var cr = function(t, e) {
- if (t) {
- if ('string' == typeof t) return sr(t, e);
- var r = Object.prototype.toString.call(t).slice(8, -1);
- return (
- 'Object' === r && t.constructor && (r = t.constructor.name),
- 'Map' === r || 'Set' === r
- ? Array.from(r)
- : 'Arguments' === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)
- ? sr(t, e)
- : void 0
- );
- }
- };
- var lr = function() {
- throw new TypeError(
- 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.'
- );
- };
- var fr = function(t, e) {
- return ar(t) || ur(t, e) || cr(t, e) || lr();
- },
- hr = /(\[[^\]]+\])/g,
- pr = /(#[^\s\+>~\.\[:]+)/g,
- gr = /(\.[^\s\+>~\.\[:]+)/g,
- yr = /(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,
- vr = /(:[\w-]+\([^\)]*\))/gi,
- dr = /(:[^\s\+>~\.\[:]+)/g,
- mr = /([^\s\+>~\.\[:]+)/g;
- function xr(t, e) {
- var r = t.match(e);
- return r ? [t.replace(e, ' '), r.length] : [t, 0];
- }
- function br(t) {
- var e = [0, 0, 0],
- r = t.replace(/:not\(([^\)]*)\)/g, ' $1 ').replace(/{[\s\S]*/gm, ' '),
- n = 0,
- i = xr(r, hr),
- o = fr(i, 2);
- (r = o[0]), (n = o[1]), (e[1] += n);
- var a = xr(r, pr),
- u = fr(a, 2);
- (r = u[0]), (n = u[1]), (e[0] += n);
- var s = xr(r, gr),
- c = fr(s, 2);
- (r = c[0]), (n = c[1]), (e[1] += n);
- var l = xr(r, yr),
- f = fr(l, 2);
- (r = f[0]), (n = f[1]), (e[2] += n);
- var h = xr(r, vr),
- p = fr(h, 2);
- (r = p[0]), (n = p[1]), (e[1] += n);
- var g = xr(r, dr),
- y = fr(g, 2);
- (r = y[0]), (n = y[1]), (e[1] += n);
- var v = xr((r = r.replace(/[\*\s\+>~]/g, ' ').replace(/[#\.]/g, ' ')), mr),
- d = fr(v, 2);
- return (r = d[0]), (n = d[1]), (e[2] += n), e.join('');
- }
- function wr(t) {
- return Math.sqrt(Math.pow(t[0], 2) + Math.pow(t[1], 2));
- }
- function Sr(t, e) {
- return (t[0] * e[0] + t[1] * e[1]) / (wr(t) * wr(e));
- }
- function kr(t, e) {
- return (t[0] * e[1] < t[1] * e[0] ? -1 : 1) * Math.acos(Sr(t, e));
- }
- function Pr(t) {
- return t * t * t;
- }
- function Rr(t) {
- return 3 * t * t * (1 - t);
- }
- function Ar(t) {
- return 3 * t * (1 - t) * (1 - t);
- }
- function Er(t) {
- return (1 - t) * (1 - t) * (1 - t);
- }
- function Cr(t) {
- return t * t;
- }
- function Tr(t) {
- return 2 * t * (1 - t);
- }
- function Or(t) {
- return (1 - t) * (1 - t);
- }
- var Mr,
- Dr =
- Object.keys ||
- function(t) {
- return dt(t, mt);
- },
- Vr = a
- ? Object.defineProperties
- : function(t, e) {
- E(t);
- for (var r, n = Dr(e), i = n.length, o = 0; i > o; ) T.f(t, (r = n[o++]), e[r]);
- return t;
- },
- Nr = ot('document', 'documentElement'),
- Ir = U('IE_PROTO'),
- Lr = function() {},
- jr = function(t) {
- return '<script>' + t + '</script>';
- },
- zr = function() {
- try {
- Mr = document.domain && new ActiveXObject('htmlfile');
- } catch (t) {}
- var t, e;
- zr = Mr
- ? (function(t) {
- t.write(jr('')), t.close();
- var e = t.parentWindow.Object;
- return (t = null), e;
- })(Mr)
- : (((e = k('iframe')).style.display = 'none'),
- Nr.appendChild(e),
- (e.src = String('javascript:')),
- (t = e.contentWindow.document).open(),
- t.write(jr('document.F=Object')),
- t.close(),
- t.F);
- for (var r = mt.length; r--; ) delete zr.prototype[mt[r]];
- return zr();
- };
- W[Ir] = !0;
- var Br =
- Object.create ||
- function(t, e) {
- var r;
- return (
- null !== t
- ? ((Lr.prototype = E(t)), (r = new Lr()), (Lr.prototype = null), (r[Ir] = t))
- : (r = zr()),
- void 0 === e ? r : Vr(r, e)
- );
- },
- Fr = bt.f,
- _r = {}.toString,
- $r =
- 'object' == typeof window && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [],
- Gr = {
- f: function(t) {
- return $r && '[object Window]' == _r.call(t)
- ? (function(t) {
- try {
- return Fr(t);
- } catch (t) {
- return $r.slice();
- }
- })(t)
- : Fr(v(t));
- }
- },
- qr = { f: $t },
- Ur = T.f,
- Wr = function(t) {
- var e = nt.Symbol || (nt.Symbol = {});
- b(e, t) || Ur(e, t, { value: qr.f(t) });
- },
- Hr = T.f,
- Xr = $t('toStringTag'),
- Yr = function(t, e, r) {
- t && !b((t = r ? t : t.prototype), Xr) && Hr(t, Xr, { configurable: !0, value: e });
- },
- Qr = Ht.forEach,
- Zr = U('hidden'),
- Kr = $t('toPrimitive'),
- Jr = et.set,
- tn = et.getterFor('Symbol'),
- en = Object.prototype,
- rn = i.Symbol,
- nn = ot('JSON', 'stringify'),
- on = A.f,
- an = T.f,
- un = Gr.f,
- sn = c.f,
- cn = F('symbols'),
- ln = F('op-symbols'),
- fn = F('string-to-symbol-registry'),
- hn = F('symbol-to-string-registry'),
- pn = F('wks'),
- gn = i.QObject,
- yn = !gn || !gn.prototype || !gn.prototype.findChild,
- vn =
- a &&
- o(function() {
- return (
- 7 !=
- Br(
- an({}, 'a', {
- get: function() {
- return an(this, 'a', { value: 7 }).a;
- }
- })
- ).a
- );
- })
- ? function(t, e, r) {
- var n = on(en, e);
- n && delete en[e], an(t, e, r), n && t !== en && an(en, e, n);
- }
- : an,
- dn = function(t, e) {
- var r = (cn[t] = Br(rn.prototype));
- return Jr(r, { type: 'Symbol', tag: t, description: e }), a || (r.description = e), r;
- },
- mn = zt
- ? function(t) {
- return 'symbol' == typeof t;
- }
- : function(t) {
- return Object(t) instanceof rn;
- },
- xn = function(t, e, r) {
- t === en && xn(ln, e, r), E(t);
- var n = m(e, !0);
- return (
- E(r),
- b(cn, n)
- ? (r.enumerable
- ? (b(t, Zr) && t[Zr][n] && (t[Zr][n] = !1), (r = Br(r, { enumerable: l(0, !1) })))
- : (b(t, Zr) || an(t, Zr, l(1, {})), (t[Zr][n] = !0)),
- vn(t, n, r))
- : an(t, n, r)
- );
- },
- bn = function(t, e) {
- E(t);
- var r = v(e),
- n = Dr(r).concat(Pn(r));
- return (
- Qr(n, function(e) {
- (a && !wn.call(r, e)) || xn(t, e, r[e]);
- }),
- t
- );
- },
- wn = function(t) {
- var e = m(t, !0),
- r = sn.call(this, e);
- return (
- !(this === en && b(cn, e) && !b(ln, e)) &&
- (!(r || !b(this, e) || !b(cn, e) || (b(this, Zr) && this[Zr][e])) || r)
- );
- },
- Sn = function(t, e) {
- var r = v(t),
- n = m(e, !0);
- if (r !== en || !b(cn, n) || b(ln, n)) {
- var i = on(r, n);
- return !i || !b(cn, n) || (b(r, Zr) && r[Zr][n]) || (i.enumerable = !0), i;
- }
- },
- kn = function(t) {
- var e = un(v(t)),
- r = [];
- return (
- Qr(e, function(t) {
- b(cn, t) || b(W, t) || r.push(t);
- }),
- r
- );
- },
- Pn = function(t) {
- var e = t === en,
- r = un(e ? ln : v(t)),
- n = [];
- return (
- Qr(r, function(t) {
- !b(cn, t) || (e && !b(en, t)) || n.push(cn[t]);
- }),
- n
- );
- };
- if (
- (jt ||
- (rt(
- (rn = function() {
- if (this instanceof rn) throw TypeError('Symbol is not a constructor');
- var t = arguments.length && void 0 !== arguments[0] ? String(arguments[0]) : void 0,
- e = G(t),
- r = function(t) {
- this === en && r.call(ln, t),
- b(this, Zr) && b(this[Zr], e) && (this[Zr][e] = !1),
- vn(this, e, l(1, t));
- };
- return a && yn && vn(en, e, { configurable: !0, set: r }), dn(e, t);
- }).prototype,
- 'toString',
- function() {
- return tn(this).tag;
- }
- ),
- rt(rn, 'withoutSetter', function(t) {
- return dn(G(t), t);
- }),
- (c.f = wn),
- (T.f = xn),
- (A.f = Sn),
- (bt.f = Gr.f = kn),
- (wt.f = Pn),
- (qr.f = function(t) {
- return dn($t(t), t);
- }),
- a &&
- (an(rn.prototype, 'description', {
- configurable: !0,
- get: function() {
- return tn(this).description;
- }
- }),
- rt(en, 'propertyIsEnumerable', wn, { unsafe: !0 }))),
- Dt({ global: !0, wrap: !0, forced: !jt, sham: !jt }, { Symbol: rn }),
- Qr(Dr(pn), function(t) {
- Wr(t);
- }),
- Dt(
- { target: 'Symbol', stat: !0, forced: !jt },
- {
- for: function(t) {
- var e = String(t);
- if (b(fn, e)) return fn[e];
- var r = rn(e);
- return (fn[e] = r), (hn[r] = e), r;
- },
- keyFor: function(t) {
- if (!mn(t)) throw TypeError(t + ' is not a symbol');
- if (b(hn, t)) return hn[t];
- },
- useSetter: function() {
- yn = !0;
- },
- useSimple: function() {
- yn = !1;
- }
- }
- ),
- Dt(
- { target: 'Object', stat: !0, forced: !jt, sham: !a },
- {
- create: function(t, e) {
- return void 0 === e ? Br(t) : bn(Br(t), e);
- },
- defineProperty: xn,
- defineProperties: bn,
- getOwnPropertyDescriptor: Sn
- }
- ),
- Dt({ target: 'Object', stat: !0, forced: !jt }, { getOwnPropertyNames: kn, getOwnPropertySymbols: Pn }),
- Dt(
- {
- target: 'Object',
- stat: !0,
- forced: o(function() {
- wt.f(1);
- })
- },
- {
- getOwnPropertySymbols: function(t) {
- return wt.f(It(t));
- }
- }
- ),
- nn)
- ) {
- var Rn =
- !jt ||
- o(function() {
- var t = rn();
- return '[null]' != nn([t]) || '{}' != nn({ a: t }) || '{}' != nn(Object(t));
- });
- Dt(
- { target: 'JSON', stat: !0, forced: Rn },
- {
- stringify: function(t, e, r) {
- for (var n, i = [t], o = 1; arguments.length > o; ) i.push(arguments[o++]);
- if (((n = e), (d(e) || void 0 !== t) && !mn(t)))
- return (
- Lt(e) ||
- (e = function(t, e) {
- if (('function' == typeof n && (e = n.call(this, t, e)), !mn(e))) return e;
- }),
- (i[1] = e),
- nn.apply(null, i)
- );
- }
- }
- );
- }
- rn.prototype[Kr] || O(rn.prototype, Kr, rn.prototype.valueOf), Yr(rn, 'Symbol'), (W[Zr] = !0);
- var An = Ht.filter,
- En = te('filter'),
- Cn = ie('filter');
- Dt(
- { target: 'Array', proto: !0, forced: !En || !Cn },
- {
- filter: function(t) {
- return An(this, t, arguments.length > 1 ? arguments[1] : void 0);
- }
- }
- );
- var Tn = Ht.forEach,
- On = rr('forEach'),
- Mn = ie('forEach'),
- Dn =
- On && Mn
- ? [].forEach
- : function(t) {
- return Tn(this, t, arguments.length > 1 ? arguments[1] : void 0);
- };
- Dt({ target: 'Array', proto: !0, forced: [].forEach != Dn }, { forEach: Dn });
- var Vn = A.f,
- Nn = o(function() {
- Vn(1);
- });
- Dt(
- { target: 'Object', stat: !0, forced: !a || Nn, sham: !a },
- {
- getOwnPropertyDescriptor: function(t, e) {
- return Vn(v(t), e);
- }
- }
- );
- var In = function(t, e, r) {
- var n = m(e);
- n in t ? T.f(t, n, l(0, r)) : (t[n] = r);
- };
- Dt(
- { target: 'Object', stat: !0, sham: !a },
- {
- getOwnPropertyDescriptors: function(t) {
- for (var e, r, n = v(t), i = A.f, o = St(n), a = {}, u = 0; o.length > u; )
- void 0 !== (r = i(n, (e = o[u++]))) && In(a, e, r);
- return a;
- }
- }
- );
- var Ln = o(function() {
- Dr(1);
- });
- Dt(
- { target: 'Object', stat: !0, forced: Ln },
- {
- keys: function(t) {
- return Dr(It(t));
- }
- }
- );
- var jn = {
- CSSRuleList: 0,
- CSSStyleDeclaration: 0,
- CSSValueList: 0,
- ClientRectList: 0,
- DOMRectList: 0,
- DOMStringList: 0,
- DOMTokenList: 1,
- DataTransferItemList: 0,
- FileList: 0,
- HTMLAllCollection: 0,
- HTMLCollection: 0,
- HTMLFormElement: 0,
- HTMLSelectElement: 0,
- MediaList: 0,
- MimeTypeArray: 0,
- NamedNodeMap: 0,
- NodeList: 1,
- PaintRequestList: 0,
- Plugin: 0,
- PluginArray: 0,
- SVGLengthList: 0,
- SVGNumberList: 0,
- SVGPathSegList: 0,
- SVGPointList: 0,
- SVGStringList: 0,
- SVGTransformList: 0,
- SourceBufferList: 0,
- StyleSheetList: 0,
- TextTrackCueList: 0,
- TextTrackList: 0,
- TouchList: 0
- };
- for (var zn in jn) {
- var Bn = i[zn],
- Fn = Bn && Bn.prototype;
- if (Fn && Fn.forEach !== Dn)
- try {
- O(Fn, 'forEach', Dn);
- } catch (t) {
- Fn.forEach = Dn;
- }
- }
- var _n = r(function(t) {
- var e = (function(t) {
- var e = Object.prototype,
- r = e.hasOwnProperty,
- n = 'function' == typeof Symbol ? Symbol : {},
- i = n.iterator || '@@iterator',
- o = n.asyncIterator || '@@asyncIterator',
- a = n.toStringTag || '@@toStringTag';
- function u(t, e, r, n) {
- var i = e && e.prototype instanceof l ? e : l,
- o = Object.create(i.prototype),
- a = new S(n || []);
- return (
- (o._invoke = (function(t, e, r) {
- var n = 'suspendedStart';
- return function(i, o) {
- if ('executing' === n) throw new Error('Generator is already running');
- if ('completed' === n) {
- if ('throw' === i) throw o;
- return P();
- }
- for (r.method = i, r.arg = o; ; ) {
- var a = r.delegate;
- if (a) {
- var u = x(a, r);
- if (u) {
- if (u === c) continue;
- return u;
- }
- }
- if ('next' === r.method) r.sent = r._sent = r.arg;
- else if ('throw' === r.method) {
- if ('suspendedStart' === n) throw ((n = 'completed'), r.arg);
- r.dispatchException(r.arg);
- } else 'return' === r.method && r.abrupt('return', r.arg);
- n = 'executing';
- var l = s(t, e, r);
- if ('normal' === l.type) {
- if (((n = r.done ? 'completed' : 'suspendedYield'), l.arg === c)) continue;
- return { value: l.arg, done: r.done };
- }
- 'throw' === l.type && ((n = 'completed'), (r.method = 'throw'), (r.arg = l.arg));
- }
- };
- })(t, r, a)),
- o
- );
- }
- function s(t, e, r) {
- try {
- return { type: 'normal', arg: t.call(e, r) };
- } catch (t) {
- return { type: 'throw', arg: t };
- }
- }
- t.wrap = u;
- var c = {};
- function l() {}
- function f() {}
- function h() {}
- var p = {};
- p[i] = function() {
- return this;
- };
- var g = Object.getPrototypeOf,
- y = g && g(g(k([])));
- y && y !== e && r.call(y, i) && (p = y);
- var v = (h.prototype = l.prototype = Object.create(p));
- function d(t) {
- ['next', 'throw', 'return'].forEach(function(e) {
- t[e] = function(t) {
- return this._invoke(e, t);
- };
- });
- }
- function m(t, e) {
- var n;
- this._invoke = function(i, o) {
- function a() {
- return new e(function(n, a) {
- !(function n(i, o, a, u) {
- var c = s(t[i], t, o);
- if ('throw' !== c.type) {
- var l = c.arg,
- f = l.value;
- return f && 'object' == typeof f && r.call(f, '__await')
- ? e.resolve(f.__await).then(
- function(t) {
- n('next', t, a, u);
- },
- function(t) {
- n('throw', t, a, u);
- }
- )
- : e.resolve(f).then(
- function(t) {
- (l.value = t), a(l);
- },
- function(t) {
- return n('throw', t, a, u);
- }
- );
- }
- u(c.arg);
- })(i, o, n, a);
- });
- }
- return (n = n ? n.then(a, a) : a());
- };
- }
- function x(t, e) {
- var r = t.iterator[e.method];
- if (void 0 === r) {
- if (((e.delegate = null), 'throw' === e.method)) {
- if (
- t.iterator.return &&
- ((e.method = 'return'), (e.arg = void 0), x(t, e), 'throw' === e.method)
- )
- return c;
- (e.method = 'throw'), (e.arg = new TypeError("The iterator does not provide a 'throw' method"));
- }
- return c;
- }
- var n = s(r, t.iterator, e.arg);
- if ('throw' === n.type) return (e.method = 'throw'), (e.arg = n.arg), (e.delegate = null), c;
- var i = n.arg;
- return i
- ? i.done
- ? ((e[t.resultName] = i.value),
- (e.next = t.nextLoc),
- 'return' !== e.method && ((e.method = 'next'), (e.arg = void 0)),
- (e.delegate = null),
- c)
- : i
- : ((e.method = 'throw'),
- (e.arg = new TypeError('iterator result is not an object')),
- (e.delegate = null),
- c);
- }
- function b(t) {
- var e = { tryLoc: t[0] };
- 1 in t && (e.catchLoc = t[1]),
- 2 in t && ((e.finallyLoc = t[2]), (e.afterLoc = t[3])),
- this.tryEntries.push(e);
- }
- function w(t) {
- var e = t.completion || {};
- (e.type = 'normal'), delete e.arg, (t.completion = e);
- }
- function S(t) {
- (this.tryEntries = [{ tryLoc: 'root' }]), t.forEach(b, this), this.reset(!0);
- }
- function k(t) {
- if (t) {
- var e = t[i];
- if (e) return e.call(t);
- if ('function' == typeof t.next) return t;
- if (!isNaN(t.length)) {
- var n = -1,
- o = function e() {
- for (; ++n < t.length; ) if (r.call(t, n)) return (e.value = t[n]), (e.done = !1), e;
- return (e.value = void 0), (e.done = !0), e;
- };
- return (o.next = o);
- }
- }
- return { next: P };
- }
- function P() {
- return { value: void 0, done: !0 };
- }
- return (
- (f.prototype = v.constructor = h),
- (h.constructor = f),
- (h[a] = f.displayName = 'GeneratorFunction'),
- (t.isGeneratorFunction = function(t) {
- var e = 'function' == typeof t && t.constructor;
- return !!e && (e === f || 'GeneratorFunction' === (e.displayName || e.name));
- }),
- (t.mark = function(t) {
- return (
- Object.setPrototypeOf
- ? Object.setPrototypeOf(t, h)
- : ((t.__proto__ = h), a in t || (t[a] = 'GeneratorFunction')),
- (t.prototype = Object.create(v)),
- t
- );
- }),
- (t.awrap = function(t) {
- return { __await: t };
- }),
- d(m.prototype),
- (m.prototype[o] = function() {
- return this;
- }),
- (t.AsyncIterator = m),
- (t.async = function(e, r, n, i, o) {
- void 0 === o && (o = Promise);
- var a = new m(u(e, r, n, i), o);
- return t.isGeneratorFunction(r)
- ? a
- : a.next().then(function(t) {
- return t.done ? t.value : a.next();
- });
- }),
- d(v),
- (v[a] = 'Generator'),
- (v[i] = function() {
- return this;
- }),
- (v.toString = function() {
- return '[object Generator]';
- }),
- (t.keys = function(t) {
- var e = [];
- for (var r in t) e.push(r);
- return (
- e.reverse(),
- function r() {
- for (; e.length; ) {
- var n = e.pop();
- if (n in t) return (r.value = n), (r.done = !1), r;
- }
- return (r.done = !0), r;
- }
- );
- }),
- (t.values = k),
- (S.prototype = {
- constructor: S,
- reset: function(t) {
- if (
- ((this.prev = 0),
- (this.next = 0),
- (this.sent = this._sent = void 0),
- (this.done = !1),
- (this.delegate = null),
- (this.method = 'next'),
- (this.arg = void 0),
- this.tryEntries.forEach(w),
- !t)
- )
- for (var e in this)
- 't' === e.charAt(0) && r.call(this, e) && !isNaN(+e.slice(1)) && (this[e] = void 0);
- },
- stop: function() {
- this.done = !0;
- var t = this.tryEntries[0].completion;
- if ('throw' === t.type) throw t.arg;
- return this.rval;
- },
- dispatchException: function(t) {
- if (this.done) throw t;
- var e = this;
- function n(r, n) {
- return (
- (a.type = 'throw'),
- (a.arg = t),
- (e.next = r),
- n && ((e.method = 'next'), (e.arg = void 0)),
- !!n
- );
- }
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
- var o = this.tryEntries[i],
- a = o.completion;
- if ('root' === o.tryLoc) return n('end');
- if (o.tryLoc <= this.prev) {
- var u = r.call(o, 'catchLoc'),
- s = r.call(o, 'finallyLoc');
- if (u && s) {
- if (this.prev < o.catchLoc) return n(o.catchLoc, !0);
- if (this.prev < o.finallyLoc) return n(o.finallyLoc);
- } else if (u) {
- if (this.prev < o.catchLoc) return n(o.catchLoc, !0);
- } else {
- if (!s) throw new Error('try statement without catch or finally');
- if (this.prev < o.finallyLoc) return n(o.finallyLoc);
- }
- }
- }
- },
- abrupt: function(t, e) {
- for (var n = this.tryEntries.length - 1; n >= 0; --n) {
- var i = this.tryEntries[n];
- if (i.tryLoc <= this.prev && r.call(i, 'finallyLoc') && this.prev < i.finallyLoc) {
- var o = i;
- break;
- }
- }
- o && ('break' === t || 'continue' === t) && o.tryLoc <= e && e <= o.finallyLoc && (o = null);
- var a = o ? o.completion : {};
- return (
- (a.type = t),
- (a.arg = e),
- o ? ((this.method = 'next'), (this.next = o.finallyLoc), c) : this.complete(a)
- );
- },
- complete: function(t, e) {
- if ('throw' === t.type) throw t.arg;
- return (
- 'break' === t.type || 'continue' === t.type
- ? (this.next = t.arg)
- : 'return' === t.type
- ? ((this.rval = this.arg = t.arg), (this.method = 'return'), (this.next = 'end'))
- : 'normal' === t.type && e && (this.next = e),
- c
- );
- },
- finish: function(t) {
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
- var r = this.tryEntries[e];
- if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), w(r), c;
- }
- },
- catch: function(t) {
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
- var r = this.tryEntries[e];
- if (r.tryLoc === t) {
- var n = r.completion;
- if ('throw' === n.type) {
- var i = n.arg;
- w(r);
- }
- return i;
- }
- }
- throw new Error('illegal catch attempt');
- },
- delegateYield: function(t, e, r) {
- return (
- (this.delegate = { iterator: k(t), resultName: e, nextLoc: r }),
- 'next' === this.method && (this.arg = void 0),
- c
- );
- }
- }),
- t
- );
- })(t.exports);
- try {
- regeneratorRuntime = e;
- } catch (t) {
- Function('r', 'regeneratorRuntime = r')(e);
- }
- });
- function $n(t, e, r, n, i, o, a) {
- try {
- var u = t[o](a),
- s = u.value;
- } catch (t) {
- return void r(t);
- }
- u.done ? e(s) : Promise.resolve(s).then(n, i);
- }
- var Gn = function(t) {
- return function() {
- var e = this,
- r = arguments;
- return new Promise(function(n, i) {
- var o = t.apply(e, r);
- function a(t) {
- $n(o, n, i, a, u, 'next', t);
- }
- function u(t) {
- $n(o, n, i, a, u, 'throw', t);
- }
- a(void 0);
- });
- };
- };
- var qn = function(t, e, r) {
- return (
- e in t
- ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 })
- : (t[e] = r),
- t
- );
- };
- var Un = function(t, e) {
- if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function');
- };
- function Wn(t, e) {
- for (var r = 0; r < e.length; r++) {
- var n = e[r];
- (n.enumerable = n.enumerable || !1),
- (n.configurable = !0),
- 'value' in n && (n.writable = !0),
- Object.defineProperty(t, n.key, n);
- }
- }
- var Hn = function(t, e, r) {
- return e && Wn(t.prototype, e), r && Wn(t, r), t;
- },
- Xn = $t('isConcatSpreadable'),
- Yn =
- Kt >= 51 ||
- !o(function() {
- var t = [];
- return (t[Xn] = !1), t.concat()[0] !== t;
- }),
- Qn = te('concat'),
- Zn = function(t) {
- if (!d(t)) return !1;
- var e = t[Xn];
- return void 0 !== e ? !!e : Lt(t);
- };
- Dt(
- { target: 'Array', proto: !0, forced: !Yn || !Qn },
- {
- concat: function(t) {
- var e,
- r,
- n,
- i,
- o,
- a = It(this),
- u = qt(a, 0),
- s = 0;
- for (e = -1, n = arguments.length; e < n; e++)
- if (((o = -1 === e ? a : arguments[e]), Zn(o))) {
- if (s + (i = lt(o.length)) > 9007199254740991)
- throw TypeError('Maximum allowed index exceeded');
- for (r = 0; r < i; r++, s++) r in o && In(u, s, o[r]);
- } else {
- if (s >= 9007199254740991) throw TypeError('Maximum allowed index exceeded');
- In(u, s++, o);
- }
- return (u.length = s), u;
- }
- }
- );
- var Kn = Ht.every,
- Jn = rr('every'),
- ti = ie('every');
- Dt(
- { target: 'Array', proto: !0, forced: !Jn || !ti },
- {
- every: function(t) {
- return Kn(this, t, arguments.length > 1 ? arguments[1] : void 0);
- }
- }
- );
- var ei = function(t) {
- return function(e, r, n, i) {
- Vt(r);
- var o = It(e),
- a = g(o),
- u = lt(o.length),
- s = t ? u - 1 : 0,
- c = t ? -1 : 1;
- if (n < 2)
- for (;;) {
- if (s in a) {
- (i = a[s]), (s += c);
- break;
- }
- if (((s += c), t ? s < 0 : u <= s))
- throw TypeError('Reduce of empty array with no initial value');
- }
- for (; t ? s >= 0 : u > s; s += c) s in a && (i = r(i, a[s], s, o));
- return i;
- };
- },
- ri = { left: ei(!1), right: ei(!0) }.left,
- ni = rr('reduce'),
- ii = ie('reduce', { 1: 0 });
- Dt(
- { target: 'Array', proto: !0, forced: !ni || !ii },
- {
- reduce: function(t) {
- return ri(this, t, arguments.length, arguments.length > 1 ? arguments[1] : void 0);
- }
- }
- );
- var oi = {};
- oi[$t('toStringTag')] = 'z';
- var ai = '[object z]' === String(oi),
- ui = $t('toStringTag'),
- si =
- 'Arguments' ==
- h(
- (function() {
- return arguments;
- })()
- ),
- ci = ai
- ? h
- : function(t) {
- var e, r, n;
- return void 0 === t
- ? 'Undefined'
- : null === t
- ? 'Null'
- : 'string' ==
- typeof (r = (function(t, e) {
- try {
- return t[e];
- } catch (t) {}
- })((e = Object(t)), ui))
- ? r
- : si
- ? h(e)
- : 'Object' == (n = h(e)) && 'function' == typeof e.callee
- ? 'Arguments'
- : n;
- },
- li = ai
- ? {}.toString
- : function() {
- return '[object ' + ci(this) + ']';
- };
- ai || rt(Object.prototype, 'toString', li, { unsafe: !0 });
- var fi = i.Promise,
- hi = function(t, e, r) {
- for (var n in e) rt(t, n, e[n], r);
- return t;
- },
- pi = $t('species'),
- gi = function(t) {
- var e = ot(t),
- r = T.f;
- a &&
- e &&
- !e[pi] &&
- r(e, pi, {
- configurable: !0,
- get: function() {
- return this;
- }
- });
- },
- yi = function(t, e, r) {
- if (!(t instanceof e)) throw TypeError('Incorrect ' + (r ? r + ' ' : '') + 'invocation');
- return t;
- },
- vi = {},
- di = $t('iterator'),
- mi = Array.prototype,
- xi = function(t) {
- return void 0 !== t && (vi.Array === t || mi[di] === t);
- },
- bi = $t('iterator'),
- wi = function(t) {
- if (null != t) return t[bi] || t['@@iterator'] || vi[ci(t)];
- },
- Si = function(t, e, r, n) {
- try {
- return n ? e(E(r)[0], r[1]) : e(r);
- } catch (e) {
- var i = t.return;
- throw (void 0 !== i && E(i.call(t)), e);
- }
- },
- ki = r(function(t) {
- var e = function(t, e) {
- (this.stopped = t), (this.result = e);
- };
- (t.exports = function(t, r, n, i, o) {
- var a,
- u,
- s,
- c,
- l,
- f,
- h,
- p = Nt(r, n, i ? 2 : 1);
- if (o) a = t;
- else {
- if ('function' != typeof (u = wi(t))) throw TypeError('Target is not iterable');
- if (xi(u)) {
- for (s = 0, c = lt(t.length); c > s; s++)
- if ((l = i ? p(E((h = t[s]))[0], h[1]) : p(t[s])) && l instanceof e) return l;
- return new e(!1);
- }
- a = u.call(t);
- }
- for (f = a.next; !(h = f.call(a)).done; )
- if ('object' == typeof (l = Si(a, p, h.value, i)) && l && l instanceof e) return l;
- return new e(!1);
- }).stop = function(t) {
- return new e(!0, t);
- };
- }),
- Pi = $t('iterator'),
- Ri = !1;
- try {
- var Ai = 0,
- Ei = {
- next: function() {
- return { done: !!Ai++ };
- },
- return: function() {
- Ri = !0;
- }
- };
- (Ei[Pi] = function() {
- return this;
- }),
- Array.from(Ei, function() {
- throw 2;
- });
- } catch (t) {}
- var Ci,
- Ti,
- Oi,
- Mi = function(t, e) {
- if (!e && !Ri) return !1;
- var r = !1;
- try {
- var n = {};
- (n[Pi] = function() {
- return {
- next: function() {
- return { done: (r = !0) };
- }
- };
- }),
- t(n);
- } catch (t) {}
- return r;
- },
- Di = $t('species'),
- Vi = function(t, e) {
- var r,
- n = E(t).constructor;
- return void 0 === n || null == (r = E(n)[Di]) ? e : Vt(r);
- },
- Ni = /(iphone|ipod|ipad).*applewebkit/i.test(Xt),
- Ii = i.location,
- Li = i.setImmediate,
- ji = i.clearImmediate,
- zi = i.process,
- Bi = i.MessageChannel,
- Fi = i.Dispatch,
- _i = 0,
- $i = {},
- Gi = function(t) {
- if ($i.hasOwnProperty(t)) {
- var e = $i[t];
- delete $i[t], e();
- }
- },
- qi = function(t) {
- return function() {
- Gi(t);
- };
- },
- Ui = function(t) {
- Gi(t.data);
- },
- Wi = function(t) {
- i.postMessage(t + '', Ii.protocol + '//' + Ii.host);
- };
- (Li && ji) ||
- ((Li = function(t) {
- for (var e = [], r = 1; arguments.length > r; ) e.push(arguments[r++]);
- return (
- ($i[++_i] = function() {
- ('function' == typeof t ? t : Function(t)).apply(void 0, e);
- }),
- Ci(_i),
- _i
- );
- }),
- (ji = function(t) {
- delete $i[t];
- }),
- 'process' == h(zi)
- ? (Ci = function(t) {
- zi.nextTick(qi(t));
- })
- : Fi && Fi.now
- ? (Ci = function(t) {
- Fi.now(qi(t));
- })
- : Bi && !Ni
- ? ((Oi = (Ti = new Bi()).port2), (Ti.port1.onmessage = Ui), (Ci = Nt(Oi.postMessage, Oi, 1)))
- : !i.addEventListener || 'function' != typeof postMessage || i.importScripts || o(Wi)
- ? (Ci =
- 'onreadystatechange' in k('script')
- ? function(t) {
- Nr.appendChild(k('script')).onreadystatechange = function() {
- Nr.removeChild(this), Gi(t);
- };
- }
- : function(t) {
- setTimeout(qi(t), 0);
- })
- : ((Ci = Wi), i.addEventListener('message', Ui, !1)));
- var Hi,
- Xi,
- Yi,
- Qi,
- Zi,
- Ki,
- Ji,
- to,
- eo = { set: Li, clear: ji },
- ro = A.f,
- no = eo.set,
- io = i.MutationObserver || i.WebKitMutationObserver,
- oo = i.process,
- ao = i.Promise,
- uo = 'process' == h(oo),
- so = ro(i, 'queueMicrotask'),
- co = so && so.value;
- co ||
- ((Hi = function() {
- var t, e;
- for (uo && (t = oo.domain) && t.exit(); Xi; ) {
- (e = Xi.fn), (Xi = Xi.next);
- try {
- e();
- } catch (t) {
- throw (Xi ? Qi() : (Yi = void 0), t);
- }
- }
- (Yi = void 0), t && t.enter();
- }),
- uo
- ? (Qi = function() {
- oo.nextTick(Hi);
- })
- : io && !Ni
- ? ((Zi = !0),
- (Ki = document.createTextNode('')),
- new io(Hi).observe(Ki, { characterData: !0 }),
- (Qi = function() {
- Ki.data = Zi = !Zi;
- }))
- : ao && ao.resolve
- ? ((Ji = ao.resolve(void 0)),
- (to = Ji.then),
- (Qi = function() {
- to.call(Ji, Hi);
- }))
- : (Qi = function() {
- no.call(i, Hi);
- }));
- var lo,
- fo,
- ho,
- po,
- go =
- co ||
- function(t) {
- var e = { fn: t, next: void 0 };
- Yi && (Yi.next = e), Xi || ((Xi = e), Qi()), (Yi = e);
- },
- yo = function(t) {
- var e, r;
- (this.promise = new t(function(t, n) {
- if (void 0 !== e || void 0 !== r) throw TypeError('Bad Promise constructor');
- (e = t), (r = n);
- })),
- (this.resolve = Vt(e)),
- (this.reject = Vt(r));
- },
- vo = {
- f: function(t) {
- return new yo(t);
- }
- },
- mo = function(t, e) {
- if ((E(t), d(e) && e.constructor === t)) return e;
- var r = vo.f(t);
- return (0, r.resolve)(e), r.promise;
- },
- xo = function(t) {
- try {
- return { error: !1, value: t() };
- } catch (t) {
- return { error: !0, value: t };
- }
- },
- bo = eo.set,
- wo = $t('species'),
- So = 'Promise',
- ko = et.get,
- Po = et.set,
- Ro = et.getterFor(So),
- Ao = fi,
- Eo = i.TypeError,
- Co = i.document,
- To = i.process,
- Oo = ot('fetch'),
- Mo = vo.f,
- Do = Mo,
- Vo = 'process' == h(To),
- No = !!(Co && Co.createEvent && i.dispatchEvent),
- Io = Ot(So, function() {
- if (!(j(Ao) !== String(Ao))) {
- if (66 === Kt) return !0;
- if (!Vo && 'function' != typeof PromiseRejectionEvent) return !0;
- }
- if (Kt >= 51 && /native code/.test(Ao)) return !1;
- var t = Ao.resolve(1),
- e = function(t) {
- t(
- function() {},
- function() {}
- );
- };
- return ((t.constructor = {})[wo] = e), !(t.then(function() {}) instanceof e);
- }),
- Lo =
- Io ||
- !Mi(function(t) {
- Ao.all(t).catch(function() {});
- }),
- jo = function(t) {
- var e;
- return !(!d(t) || 'function' != typeof (e = t.then)) && e;
- },
- zo = function(t, e, r) {
- if (!e.notified) {
- e.notified = !0;
- var n = e.reactions;
- go(function() {
- for (var i = e.value, o = 1 == e.state, a = 0; n.length > a; ) {
- var u,
- s,
- c,
- l = n[a++],
- f = o ? l.ok : l.fail,
- h = l.resolve,
- p = l.reject,
- g = l.domain;
- try {
- f
- ? (o || (2 === e.rejection && $o(t, e), (e.rejection = 1)),
- !0 === f ? (u = i) : (g && g.enter(), (u = f(i)), g && (g.exit(), (c = !0))),
- u === l.promise ? p(Eo('Promise-chain cycle')) : (s = jo(u)) ? s.call(u, h, p) : h(u))
- : p(i);
- } catch (t) {
- g && !c && g.exit(), p(t);
- }
- }
- (e.reactions = []), (e.notified = !1), r && !e.rejection && Fo(t, e);
- });
- }
- },
- Bo = function(t, e, r) {
- var n, o;
- No
- ? (((n = Co.createEvent('Event')).promise = e),
- (n.reason = r),
- n.initEvent(t, !1, !0),
- i.dispatchEvent(n))
- : (n = { promise: e, reason: r }),
- (o = i['on' + t])
- ? o(n)
- : 'unhandledrejection' === t &&
- (function(t, e) {
- var r = i.console;
- r && r.error && (1 === arguments.length ? r.error(t) : r.error(t, e));
- })('Unhandled promise rejection', r);
- },
- Fo = function(t, e) {
- bo.call(i, function() {
- var r,
- n = e.value;
- if (
- _o(e) &&
- ((r = xo(function() {
- Vo ? To.emit('unhandledRejection', n, t) : Bo('unhandledrejection', t, n);
- })),
- (e.rejection = Vo || _o(e) ? 2 : 1),
- r.error)
- )
- throw r.value;
- });
- },
- _o = function(t) {
- return 1 !== t.rejection && !t.parent;
- },
- $o = function(t, e) {
- bo.call(i, function() {
- Vo ? To.emit('rejectionHandled', t) : Bo('rejectionhandled', t, e.value);
- });
- },
- Go = function(t, e, r, n) {
- return function(i) {
- t(e, r, i, n);
- };
- },
- qo = function(t, e, r, n) {
- e.done || ((e.done = !0), n && (e = n), (e.value = r), (e.state = 2), zo(t, e, !0));
- },
- Uo = function(t, e, r, n) {
- if (!e.done) {
- (e.done = !0), n && (e = n);
- try {
- if (t === r) throw Eo("Promise can't be resolved itself");
- var i = jo(r);
- i
- ? go(function() {
- var n = { done: !1 };
- try {
- i.call(r, Go(Uo, t, n, e), Go(qo, t, n, e));
- } catch (r) {
- qo(t, n, r, e);
- }
- })
- : ((e.value = r), (e.state = 1), zo(t, e, !1));
- } catch (r) {
- qo(t, { done: !1 }, r, e);
- }
- }
- };
- Io &&
- ((Ao = function(t) {
- yi(this, Ao, So), Vt(t), lo.call(this);
- var e = ko(this);
- try {
- t(Go(Uo, this, e), Go(qo, this, e));
- } catch (t) {
- qo(this, e, t);
- }
- }),
- ((lo = function(t) {
- Po(this, {
- type: So,
- done: !1,
- notified: !1,
- parent: !1,
- reactions: [],
- rejection: !1,
- state: 0,
- value: void 0
- });
- }).prototype = hi(Ao.prototype, {
- then: function(t, e) {
- var r = Ro(this),
- n = Mo(Vi(this, Ao));
- return (
- (n.ok = 'function' != typeof t || t),
- (n.fail = 'function' == typeof e && e),
- (n.domain = Vo ? To.domain : void 0),
- (r.parent = !0),
- r.reactions.push(n),
- 0 != r.state && zo(this, r, !1),
- n.promise
- );
- },
- catch: function(t) {
- return this.then(void 0, t);
- }
- })),
- (fo = function() {
- var t = new lo(),
- e = ko(t);
- (this.promise = t), (this.resolve = Go(Uo, t, e)), (this.reject = Go(qo, t, e));
- }),
- (vo.f = Mo = function(t) {
- return t === Ao || t === ho ? new fo(t) : Do(t);
- }),
- 'function' == typeof fi &&
- ((po = fi.prototype.then),
- rt(
- fi.prototype,
- 'then',
- function(t, e) {
- var r = this;
- return new Ao(function(t, e) {
- po.call(r, t, e);
- }).then(t, e);
- },
- { unsafe: !0 }
- ),
- 'function' == typeof Oo &&
- Dt(
- { global: !0, enumerable: !0, forced: !0 },
- {
- fetch: function(t) {
- return mo(Ao, Oo.apply(i, arguments));
- }
- }
- ))),
- Dt({ global: !0, wrap: !0, forced: Io }, { Promise: Ao }),
- Yr(Ao, So, !1),
- gi(So),
- (ho = ot(So)),
- Dt(
- { target: So, stat: !0, forced: Io },
- {
- reject: function(t) {
- var e = Mo(this);
- return e.reject.call(void 0, t), e.promise;
- }
- }
- ),
- Dt(
- { target: So, stat: !0, forced: Io },
- {
- resolve: function(t) {
- return mo(this, t);
- }
- }
- ),
- Dt(
- { target: So, stat: !0, forced: Lo },
- {
- all: function(t) {
- var e = this,
- r = Mo(e),
- n = r.resolve,
- i = r.reject,
- o = xo(function() {
- var r = Vt(e.resolve),
- o = [],
- a = 0,
- u = 1;
- ki(t, function(t) {
- var s = a++,
- c = !1;
- o.push(void 0),
- u++,
- r.call(e, t).then(function(t) {
- c || ((c = !0), (o[s] = t), --u || n(o));
- }, i);
- }),
- --u || n(o);
- });
- return o.error && i(o.value), r.promise;
- },
- race: function(t) {
- var e = this,
- r = Mo(e),
- n = r.reject,
- i = xo(function() {
- var i = Vt(e.resolve);
- ki(t, function(t) {
- i.call(e, t).then(r.resolve, n);
- });
- });
- return i.error && n(i.value), r.promise;
- }
- }
- );
- var Wo = [].push,
- Ho = Math.min,
- Xo = !o(function() {
- return !RegExp(4294967295, 'y');
- });
- Ae(
- 'split',
- 2,
- function(t, e, r) {
- var n;
- return (
- (n =
- 'c' == 'abbc'.split(/(b)*/)[1] ||
- 4 != 'test'.split(/(?:)/, -1).length ||
- 2 != 'ab'.split(/(?:ab)*/).length ||
- 4 != '.'.split(/(.?)(.?)/).length ||
- '.'.split(/()()/).length > 1 ||
- ''.split(/.?/).length
- ? function(t, r) {
- var n = String(y(this)),
- i = void 0 === r ? 4294967295 : r >>> 0;
- if (0 === i) return [];
- if (void 0 === t) return [n];
- if (!Be(t)) return e.call(n, t, i);
- for (
- var o,
- a,
- u,
- s = [],
- c =
- (t.ignoreCase ? 'i' : '') +
- (t.multiline ? 'm' : '') +
- (t.unicode ? 'u' : '') +
- (t.sticky ? 'y' : ''),
- l = 0,
- f = new RegExp(t.source, c + 'g');
- (o = xe.call(f, n)) &&
- !(
- (a = f.lastIndex) > l &&
- (s.push(n.slice(l, o.index)),
- o.length > 1 && o.index < n.length && Wo.apply(s, o.slice(1)),
- (u = o[0].length),
- (l = a),
- s.length >= i)
- );
- )
- f.lastIndex === o.index && f.lastIndex++;
- return (
- l === n.length ? (!u && f.test('')) || s.push('') : s.push(n.slice(l)),
- s.length > i ? s.slice(0, i) : s
- );
- }
- : '0'.split(void 0, 0).length
- ? function(t, r) {
- return void 0 === t && 0 === r ? [] : e.call(this, t, r);
- }
- : e),
- [
- function(e, r) {
- var i = y(this),
- o = null == e ? void 0 : e[t];
- return void 0 !== o ? o.call(e, i, r) : n.call(String(i), e, r);
- },
- function(t, i) {
- var o = r(n, t, this, i, n !== e);
- if (o.done) return o.value;
- var a = E(t),
- u = String(this),
- s = Vi(a, RegExp),
- c = a.unicode,
- l =
- (a.ignoreCase ? 'i' : '') +
- (a.multiline ? 'm' : '') +
- (a.unicode ? 'u' : '') +
- (Xo ? 'y' : 'g'),
- f = new s(Xo ? a : '^(?:' + a.source + ')', l),
- h = void 0 === i ? 4294967295 : i >>> 0;
- if (0 === h) return [];
- if (0 === u.length) return null === Me(f, u) ? [u] : [];
- for (var p = 0, g = 0, y = []; g < u.length; ) {
- f.lastIndex = Xo ? g : 0;
- var v,
- d = Me(f, Xo ? u : u.slice(g));
- if (null === d || (v = Ho(lt(f.lastIndex + (Xo ? 0 : g)), u.length)) === p) g = Oe(u, g, c);
- else {
- if ((y.push(u.slice(p, g)), y.length === h)) return y;
- for (var m = 1; m <= d.length - 1; m++) if ((y.push(d[m]), y.length === h)) return y;
- g = p = v;
- }
- }
- return y.push(u.slice(p)), y;
- }
- ]
- );
- },
- !Xo
- );
- var Yo =
- 'undefined' != typeof global
- ? global
- : 'undefined' != typeof self
- ? self
- : 'undefined' != typeof window
- ? window
- : {};
- function Qo() {
- throw new Error('setTimeout has not been defined');
- }
- function Zo() {
- throw new Error('clearTimeout has not been defined');
- }
- var Ko = Qo,
- Jo = Zo;
- function ta(t) {
- if (Ko === setTimeout) return setTimeout(t, 0);
- if ((Ko === Qo || !Ko) && setTimeout) return (Ko = setTimeout), setTimeout(t, 0);
- try {
- return Ko(t, 0);
- } catch (e) {
- try {
- return Ko.call(null, t, 0);
- } catch (e) {
- return Ko.call(this, t, 0);
- }
- }
- }
- 'function' == typeof Yo.setTimeout && (Ko = setTimeout),
- 'function' == typeof Yo.clearTimeout && (Jo = clearTimeout);
- var ea,
- ra = [],
- na = !1,
- ia = -1;
- function oa() {
- na && ea && ((na = !1), ea.length ? (ra = ea.concat(ra)) : (ia = -1), ra.length && aa());
- }
- function aa() {
- if (!na) {
- var t = ta(oa);
- na = !0;
- for (var e = ra.length; e; ) {
- for (ea = ra, ra = []; ++ia < e; ) ea && ea[ia].run();
- (ia = -1), (e = ra.length);
- }
- (ea = null),
- (na = !1),
- (function(t) {
- if (Jo === clearTimeout) return clearTimeout(t);
- if ((Jo === Zo || !Jo) && clearTimeout) return (Jo = clearTimeout), clearTimeout(t);
- try {
- Jo(t);
- } catch (e) {
- try {
- return Jo.call(null, t);
- } catch (e) {
- return Jo.call(this, t);
- }
- }
- })(t);
- }
- }
- function ua(t, e) {
- (this.fun = t), (this.array = e);
- }
- ua.prototype.run = function() {
- this.fun.apply(null, this.array);
- };
- function sa() {}
- var ca = sa,
- la = sa,
- fa = sa,
- ha = sa,
- pa = sa,
- ga = sa,
- ya = sa;
- var va = Yo.performance || {},
- da =
- va.now ||
- va.mozNow ||
- va.msNow ||
- va.oNow ||
- va.webkitNow ||
- function() {
- return new Date().getTime();
- };
- var ma = new Date();
- for (
- var xa = {
- nextTick: function(t) {
- var e = new Array(arguments.length - 1);
- if (arguments.length > 1) for (var r = 1; r < arguments.length; r++) e[r - 1] = arguments[r];
- ra.push(new ua(t, e)), 1 !== ra.length || na || ta(aa);
- },
- title: 'browser',
- browser: !0,
- env: {},
- argv: [],
- version: '',
- versions: {},
- on: ca,
- addListener: la,
- once: fa,
- off: ha,
- removeListener: pa,
- removeAllListeners: ga,
- emit: ya,
- binding: function(t) {
- throw new Error('process.binding is not supported');
- },
- cwd: function() {
- return '/';
- },
- chdir: function(t) {
- throw new Error('process.chdir is not supported');
- },
- umask: function() {
- return 0;
- },
- hrtime: function(t) {
- var e = 0.001 * da.call(va),
- r = Math.floor(e),
- n = Math.floor((e % 1) * 1e9);
- return t && ((r -= t[0]), (n -= t[1]) < 0 && (r--, (n += 1e9))), [r, n];
- },
- platform: 'browser',
- release: {},
- config: {},
- uptime: function() {
- return (new Date() - ma) / 1e3;
- }
- },
- ba = r(function(t) {
- (function() {
- var e, r, n, i, o, a;
- 'undefined' != typeof performance && null !== performance && performance.now
- ? (t.exports = function() {
- return performance.now();
- })
- : null != xa && xa.hrtime
- ? ((t.exports = function() {
- return (e() - o) / 1e6;
- }),
- (r = xa.hrtime),
- (i = (e = function() {
- var t;
- return 1e9 * (t = r())[0] + t[1];
- })()),
- (a = 1e9 * xa.uptime()),
- (o = i - a))
- : Date.now
- ? ((t.exports = function() {
- return Date.now() - n;
- }),
- (n = Date.now()))
- : ((t.exports = function() {
- return new Date().getTime() - n;
- }),
- (n = new Date().getTime()));
- }.call(e));
- }),
- wa = 'undefined' == typeof window ? e : window,
- Sa = ['moz', 'webkit'],
- ka = 'AnimationFrame',
- Pa = wa['request' + ka],
- Ra = wa['cancel' + ka] || wa['cancelRequest' + ka],
- Aa = 0;
- !Pa && Aa < Sa.length;
- Aa++
- )
- (Pa = wa[Sa[Aa] + 'Request' + ka]), (Ra = wa[Sa[Aa] + 'Cancel' + ka] || wa[Sa[Aa] + 'CancelRequest' + ka]);
- if (!Pa || !Ra) {
- var Ea = 0,
- Ca = 0,
- Ta = [];
- (Pa = function(t) {
- if (0 === Ta.length) {
- var e = ba(),
- r = Math.max(0, 1e3 / 60 - (e - Ea));
- (Ea = r + e),
- setTimeout(function() {
- var t = Ta.slice(0);
- Ta.length = 0;
- for (var e = 0; e < t.length; e++)
- if (!t[e].cancelled)
- try {
- t[e].callback(Ea);
- } catch (t) {
- setTimeout(function() {
- throw t;
- }, 0);
- }
- }, Math.round(r));
- }
- return Ta.push({ handle: ++Ca, callback: t, cancelled: !1 }), Ca;
- }),
- (Ra = function(t) {
- for (var e = 0; e < Ta.length; e++) Ta[e].handle === t && (Ta[e].cancelled = !0);
- });
- }
- var Oa = function(t) {
- return Pa.call(wa, t);
- };
- (Oa.cancel = function() {
- Ra.apply(wa, arguments);
- }),
- (Oa.polyfill = function(t) {
- t || (t = wa), (t.requestAnimationFrame = Pa), (t.cancelAnimationFrame = Ra);
- });
- var Ma = T.f,
- Da = Function.prototype,
- Va = Da.toString,
- Na = /^\s*function ([^ (]*)/;
- a &&
- !('name' in Da) &&
- Ma(Da, 'name', {
- configurable: !0,
- get: function() {
- try {
- return Va.call(this).match(Na)[1];
- } catch (t) {
- return '';
- }
- }
- });
- var Ia = function(t) {
- (this.ok = !1),
- (this.alpha = 1),
- '#' == t.charAt(0) && (t = t.substr(1, 6)),
- (t = (t = t.replace(/ /g, '')).toLowerCase());
- var e = {
- 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',
- rebeccapurple: '663399',
- 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'
- };
- t = e[t] || t;
- for (
- var r = [
- {
- re: /^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,
- example: ['rgba(123, 234, 45, 0.8)', 'rgba(255,234,245,1.0)'],
- process: function(t) {
- return [parseInt(t[1]), parseInt(t[2]), parseInt(t[3]), parseFloat(t[4])];
- }
- },
- {
- re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,
- example: ['rgb(123, 234, 45)', 'rgb(255,234,245)'],
- process: function(t) {
- return [parseInt(t[1]), parseInt(t[2]), parseInt(t[3])];
- }
- },
- {
- re: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
- example: ['#00ff00', '336699'],
- process: function(t) {
- return [parseInt(t[1], 16), parseInt(t[2], 16), parseInt(t[3], 16)];
- }
- },
- {
- re: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
- example: ['#fb0', 'f0f'],
- process: function(t) {
- return [
- parseInt(t[1] + t[1], 16),
- parseInt(t[2] + t[2], 16),
- parseInt(t[3] + t[3], 16)
- ];
- }
- }
- ],
- n = 0;
- n < r.length;
- n++
- ) {
- var i = r[n].re,
- o = r[n].process,
- a = i.exec(t);
- if (a) {
- var u = o(a);
- (this.r = u[0]),
- (this.g = u[1]),
- (this.b = u[2]),
- u.length > 3 && (this.alpha = u[3]),
- (this.ok = !0);
- }
- }
- (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.alpha = this.alpha < 0 ? 0 : this.alpha > 1 || isNaN(this.alpha) ? 1 : this.alpha),
- (this.toRGB = function() {
- return 'rgb(' + this.r + ', ' + this.g + ', ' + this.b + ')';
- }),
- (this.toRGBA = function() {
- return 'rgba(' + this.r + ', ' + this.g + ', ' + this.b + ', ' + this.alpha + ')';
- }),
- (this.toHex = function() {
- var t = this.r.toString(16),
- e = this.g.toString(16),
- r = this.b.toString(16);
- return (
- 1 == t.length && (t = '0' + t),
- 1 == e.length && (e = '0' + e),
- 1 == r.length && (r = '0' + r),
- '#' + t + e + r
- );
- }),
- (this.getHelpXML = function() {
- for (var t = new Array(), n = 0; n < r.length; n++)
- for (var i = r[n].example, o = 0; o < i.length; o++) t[t.length] = i[o];
- for (var a in e) t[t.length] = a;
- var u = document.createElement('ul');
- u.setAttribute('id', 'rgbcolor-examples');
- for (n = 0; n < t.length; n++)
- try {
- var s = document.createElement('li'),
- c = new RGBColor(t[n]),
- l = document.createElement('div');
- (l.style.cssText =
- 'margin: 3px; border: 1px solid black; background:' +
- c.toHex() +
- '; color:' +
- c.toHex()),
- l.appendChild(document.createTextNode('test'));
- var f = document.createTextNode(' ' + t[n] + ' -> ' + c.toRGB() + ' -> ' + c.toHex());
- s.appendChild(l), s.appendChild(f), u.appendChild(s);
- } catch (t) {}
- return u;
- });
- },
- La = (function() {
- function t(e, r, n) {
- Un(this, t), (this.document = e), (this.name = r), (this.value = n), (this.isNormalizedColor = !1);
- }
- return (
- Hn(
- t,
- [
- {
- key: 'hasValue',
- value: function() {
- var t = this.value;
- return null !== t && '' !== t && 0 !== t && void 0 !== t;
- }
- },
- {
- key: 'isString',
- value: function(t) {
- var e = this.value,
- r = 'string' == typeof e;
- return r && t ? t.test(e) : r;
- }
- },
- {
- key: 'isUrlDefinition',
- value: function() {
- return this.isString(/^url\(/);
- }
- },
- {
- key: 'isPixels',
- value: function() {
- if (!this.hasValue()) return !1;
- var t = this.getString();
- switch (!0) {
- case /px$/.test(t):
- case /^[0-9]+$/.test(t):
- return !0;
- default:
- return !1;
- }
- }
- },
- {
- key: 'setValue',
- value: function(t) {
- return (this.value = t), this;
- }
- },
- {
- key: 'getValue',
- value: function(t) {
- return void 0 === t || this.hasValue() ? this.value : t;
- }
- },
- {
- key: 'getNumber',
- value: function(t) {
- if (!this.hasValue()) return void 0 === t ? 0 : parseFloat(t);
- var e = this.value,
- r = parseFloat(e);
- return this.isString(/%$/) && (r /= 100), r;
- }
- },
- {
- key: 'getString',
- value: function(t) {
- return void 0 === t || this.hasValue()
- ? void 0 === this.value
- ? ''
- : String(this.value)
- : String(t);
- }
- },
- {
- key: 'getColor',
- value: function(t) {
- var e = this.getString(t);
- return (
- this.isNormalizedColor ||
- ((this.isNormalizedColor = !0), (e = er(e)), (this.value = e)),
- e
- );
- }
- },
- {
- key: 'getDpi',
- value: function() {
- return 96;
- }
- },
- {
- key: 'getRem',
- value: function() {
- return this.document.rootEmSize;
- }
- },
- {
- key: 'getEm',
- value: function() {
- return this.document.emSize;
- }
- },
- {
- key: 'getUnits',
- value: function() {
- return this.getString().replace(/[0-9\.\-]/g, '');
- }
- },
- {
- key: 'getPixels',
- value: function(t) {
- var e = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
- if (!this.hasValue()) return 0;
- var r = 'boolean' == typeof t ? [void 0, t] : [t],
- n = fr(r, 2),
- i = n[0],
- o = n[1],
- a = this.document.screen.viewPort;
- switch (!0) {
- case this.isString(/vmin$/):
- return (
- (this.getNumber() / 100) * Math.min(a.computeSize('x'), a.computeSize('y'))
- );
- case this.isString(/vmax$/):
- return (
- (this.getNumber() / 100) * Math.max(a.computeSize('x'), a.computeSize('y'))
- );
- case this.isString(/vw$/):
- return (this.getNumber() / 100) * a.computeSize('x');
- case this.isString(/vh$/):
- return (this.getNumber() / 100) * a.computeSize('y');
- case this.isString(/rem$/):
- return this.getNumber() * this.getRem();
- case this.isString(/em$/):
- return this.getNumber() * this.getEm();
- case this.isString(/ex$/):
- return (this.getNumber() * this.getEm()) / 2;
- case this.isString(/px$/):
- return this.getNumber();
- case this.isString(/pt$/):
- return this.getNumber() * this.getDpi() * (1 / 72);
- case this.isString(/pc$/):
- return 15 * this.getNumber();
- case this.isString(/cm$/):
- return (this.getNumber() * this.getDpi()) / 2.54;
- case this.isString(/mm$/):
- return (this.getNumber() * this.getDpi()) / 25.4;
- case this.isString(/in$/):
- return this.getNumber() * this.getDpi();
- case this.isString(/%$/) && o:
- return this.getNumber() * this.getEm();
- case this.isString(/%$/):
- return this.getNumber() * a.computeSize(i);
- default:
- var u = this.getNumber();
- return e && u < 1 ? u * a.computeSize(i) : u;
- }
- }
- },
- {
- key: 'getMilliseconds',
- value: function() {
- return this.hasValue()
- ? this.isString(/ms$/)
- ? this.getNumber()
- : 1e3 * this.getNumber()
- : 0;
- }
- },
- {
- key: 'getRadians',
- value: function() {
- if (!this.hasValue()) return 0;
- switch (!0) {
- case this.isString(/deg$/):
- return this.getNumber() * (Math.PI / 180);
- case this.isString(/grad$/):
- return this.getNumber() * (Math.PI / 200);
- case this.isString(/rad$/):
- return this.getNumber();
- default:
- return this.getNumber() * (Math.PI / 180);
- }
- }
- },
- {
- key: 'getDefinition',
- value: function() {
- var t = this.getString(),
- e = t.match(/#([^\)'"]+)/);
- return e && (e = e[1]), e || (e = t), this.document.definitions[e];
- }
- },
- {
- key: 'getFillStyleDefinition',
- value: function(t, e) {
- var r = this.getDefinition();
- if (!r) return null;
- if ('function' == typeof r.createGradient)
- return r.createGradient(this.document.ctx, t, e);
- if ('function' == typeof r.createPattern) {
- if (r.getHrefAttribute().hasValue()) {
- var n = r.getAttribute('patternTransform');
- (r = r.getHrefAttribute().getDefinition()),
- n.hasValue() && r.getAttribute('patternTransform', !0).setValue(n.value);
- }
- return r.createPattern(this.document.ctx, t, e);
- }
- return null;
- }
- },
- {
- key: 'getTextBaseline',
- value: function() {
- return this.hasValue() ? t.textBaselineMapping[this.getString()] : null;
- }
- },
- {
- key: 'addOpacity',
- value: function(e) {
- for (
- var r = this.getColor(), n = r.length, i = 0, o = 0;
- o < n && (',' === r[o] && i++, 3 !== i);
- o++
- );
- if (e.hasValue() && this.isString() && 3 !== i) {
- var a = new Ia(r);
- a.ok && ((a.alpha = e.getNumber()), (r = a.toRGBA()));
- }
- return new t(this.document, this.name, r);
- }
- }
- ],
- [
- {
- key: 'empty',
- value: function(e) {
- return new t(e, 'EMPTY', '');
- }
- }
- ]
- ),
- t
- );
- })();
- La.textBaselineMapping = {
- baseline: 'alphabetic',
- 'before-edge': 'top',
- 'text-before-edge': 'top',
- middle: 'middle',
- central: 'middle',
- 'after-edge': 'bottom',
- 'text-after-edge': 'bottom',
- ideographic: 'ideographic',
- alphabetic: 'alphabetic',
- hanging: 'hanging',
- mathematical: 'alphabetic'
- };
- var ja = (function() {
- function t() {
- Un(this, t), (this.viewPorts = []);
- }
- return (
- Hn(t, [
- {
- key: 'clear',
- value: function() {
- this.viewPorts = [];
- }
- },
- {
- key: 'setCurrent',
- value: function(t, e) {
- this.viewPorts.push({ width: t, height: e });
- }
- },
- {
- key: 'removeCurrent',
- value: function() {
- this.viewPorts.pop();
- }
- },
- {
- key: 'getCurrent',
- value: function() {
- var t = this.viewPorts;
- return t[t.length - 1];
- }
- },
- {
- key: 'computeSize',
- value: function(t) {
- return 'number' == typeof t
- ? t
- : 'x' === t
- ? this.width
- : 'y' === t
- ? this.height
- : Math.sqrt(Math.pow(this.width, 2) + Math.pow(this.height, 2)) / Math.sqrt(2);
- }
- },
- {
- key: 'width',
- get: function() {
- return this.getCurrent().width;
- }
- },
- {
- key: 'height',
- get: function() {
- return this.getCurrent().height;
- }
- }
- ]),
- t
- );
- })(),
- za = (function() {
- function t(e, r) {
- Un(this, t), (this.x = e), (this.y = r);
- }
- return (
- Hn(
- t,
- [
- {
- key: 'angleTo',
- value: function(t) {
- return Math.atan2(t.y - this.y, t.x - this.x);
- }
- },
- {
- key: 'applyTransform',
- value: function(t) {
- var e = this.x,
- r = this.y,
- n = e * t[0] + r * t[2] + t[4],
- i = e * t[1] + r * t[3] + t[5];
- (this.x = n), (this.y = i);
- }
- }
- ],
- [
- {
- key: 'parse',
- value: function(e) {
- var r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0,
- n = Ze(e),
- i = fr(n, 2),
- o = i[0],
- a = void 0 === o ? r : o,
- u = i[1],
- s = void 0 === u ? r : u;
- return new t(a, s);
- }
- },
- {
- key: 'parseScale',
- value: function(e) {
- var r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1,
- n = Ze(e),
- i = fr(n, 2),
- o = i[0],
- a = void 0 === o ? r : o,
- u = i[1],
- s = void 0 === u ? a : u;
- return new t(a, s);
- }
- },
- {
- key: 'parsePath',
- value: function(e) {
- for (var r = Ze(e), n = r.length, i = [], o = 0; o < n; o += 2)
- i.push(new t(r[o], r[o + 1]));
- return i;
- }
- }
- ]
- ),
- t
- );
- })(),
- Ba = (function() {
- function t(e) {
- Un(this, t),
- (this.screen = e),
- (this.working = !1),
- (this.events = []),
- (this.eventElements = []),
- (this.onClick = this.onClick.bind(this)),
- (this.onMouseMove = this.onMouseMove.bind(this));
- }
- return (
- Hn(t, [
- {
- key: 'isWorking',
- value: function() {
- return this.working;
- }
- },
- {
- key: 'start',
- value: function() {
- if (!this.working) {
- var t = this.screen,
- e = this.onClick,
- r = this.onMouseMove,
- n = t.ctx.canvas;
- (n.onclick = e), (n.onmousemove = r), (this.working = !0);
- }
- }
- },
- {
- key: 'stop',
- value: function() {
- if (this.working) {
- var t = this.screen.ctx.canvas;
- (this.working = !1), (t.onclick = null), (t.onmousemove = null);
- }
- }
- },
- {
- key: 'hasEvents',
- value: function() {
- return this.working && this.events.length > 0;
- }
- },
- {
- key: 'runEvents',
- value: function() {
- if (this.working) {
- var t = this.screen,
- e = this.events,
- r = this.eventElements,
- n = t.ctx.canvas.style;
- n && (n.cursor = ''),
- e.forEach(function(t, e) {
- for (var n = t.run, i = r[e]; i; ) n(i), (i = i.parent);
- }),
- (this.events = []),
- (this.eventElements = []);
- }
- }
- },
- {
- key: 'checkPath',
- value: function(t, e) {
- if (this.working && e) {
- var r = this.events,
- n = this.eventElements;
- r.forEach(function(r, i) {
- var o = r.x,
- a = r.y;
- !n[i] && e.isPointInPath && e.isPointInPath(o, a) && (n[i] = t);
- });
- }
- }
- },
- {
- key: 'checkBoundingBox',
- value: function(t, e) {
- if (this.working && e) {
- var r = this.events,
- n = this.eventElements;
- r.forEach(function(r, i) {
- var o = r.x,
- a = r.y;
- !n[i] && e.isPointInBox(o, a) && (n[i] = t);
- });
- }
- }
- },
- {
- key: 'mapXY',
- value: function(t, e) {
- for (var r = this.screen, n = r.window, i = r.ctx, o = new za(t, e), a = i.canvas; a; )
- (o.x -= a.offsetLeft), (o.y -= a.offsetTop), (a = a.offsetParent);
- return n.scrollX && (o.x += n.scrollX), n.scrollY && (o.y += n.scrollY), o;
- }
- },
- {
- key: 'onClick',
- value: function(t) {
- var e = this.mapXY((t || event).clientX, (t || event).clientY),
- r = e.x,
- n = e.y;
- this.events.push({
- type: 'onclick',
- x: r,
- y: n,
- run: function(t) {
- t.onClick && t.onClick();
- }
- });
- }
- },
- {
- key: 'onMouseMove',
- value: function(t) {
- var e = this.mapXY((t || event).clientX, (t || event).clientY),
- r = e.x,
- n = e.y;
- this.events.push({
- type: 'onmousemove',
- x: r,
- y: n,
- run: function(t) {
- t.onMouseMove && t.onMouseMove();
- }
- });
- }
- }
- ]),
- t
- );
- })(),
- Fa = 'undefined' != typeof window ? window : null,
- _a = 'undefined' != typeof fetch ? fetch.bind(void 0) : null,
- $a = (function() {
- function t(e) {
- var r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},
- n = r.fetch,
- i = void 0 === n ? _a : n,
- o = r.window,
- a = void 0 === o ? Fa : o;
- Un(this, t),
- (this.ctx = e),
- (this.FRAMERATE = 30),
- (this.MAX_VIRTUAL_PIXELS = 3e4),
- (this.CLIENT_WIDTH = 800),
- (this.CLIENT_HEIGHT = 600),
- (this.viewPort = new ja()),
- (this.mouse = new Ba(this)),
- (this.animations = []),
- (this.waits = []),
- (this.frameDuration = 0),
- (this.isReadyLock = !1),
- (this.isFirstRender = !0),
- (this.intervalId = null),
- (this.window = a),
- (this.fetch = i);
- }
- return (
- Hn(t, [
- {
- key: 'wait',
- value: function(t) {
- this.waits.push(t);
- }
- },
- {
- key: 'ready',
- value: function() {
- return this.readyPromise ? this.readyPromise : Promise.resolve();
- }
- },
- {
- key: 'isReady',
- value: function() {
- if (this.isReadyLock) return !0;
- var t = this.waits.every(function(t) {
- return t();
- });
- return (
- t && ((this.waits = []), this.resolveReady && this.resolveReady()),
- (this.isReadyLock = t),
- t
- );
- }
- },
- {
- key: 'setDefaults',
- value: function(t) {
- (t.strokeStyle = 'rgba(0,0,0,0)'),
- (t.lineCap = 'butt'),
- (t.lineJoin = 'miter'),
- (t.miterLimit = 4);
- }
- },
- {
- key: 'setViewBox',
- value: function(t) {
- var e = t.document,
- r = t.ctx,
- n = t.aspectRatio,
- i = t.width,
- o = t.desiredWidth,
- a = t.height,
- u = t.desiredHeight,
- s = t.minX,
- c = void 0 === s ? 0 : s,
- l = t.minY,
- f = void 0 === l ? 0 : l,
- h = t.refX,
- p = t.refY,
- g = t.clip,
- y = void 0 !== g && g,
- v = t.clipX,
- d = void 0 === v ? 0 : v,
- m = t.clipY,
- x = void 0 === m ? 0 : m,
- b = Xe(n)
- .replace(/^defer\s/, '')
- .split(' '),
- w = fr(b, 2),
- S = w[0] || 'xMidYMid',
- k = w[1] || 'meet',
- P = i / o,
- R = a / u,
- A = Math.min(P, R),
- E = Math.max(P, R),
- C = o,
- T = u;
- 'meet' === k && ((C *= A), (T *= A)), 'slice' === k && ((C *= E), (T *= E));
- var O = new La(e, 'refX', h),
- M = new La(e, 'refY', p),
- D = O.hasValue() && M.hasValue();
- if ((D && r.translate(-A * O.getPixels('x'), -A * M.getPixels('y')), y)) {
- var V = A * d,
- N = A * x;
- r.beginPath(),
- r.moveTo(V, N),
- r.lineTo(i, N),
- r.lineTo(i, a),
- r.lineTo(V, a),
- r.closePath(),
- r.clip();
- }
- if (!D) {
- var I = 'meet' === k && A === R,
- L = 'slice' === k && E === R,
- j = 'meet' === k && A === P,
- z = 'slice' === k && E === P;
- /^xMid/.test(S) && (I || L) && r.translate(i / 2 - C / 2, 0),
- /YMid$/.test(S) && (j || z) && r.translate(0, a / 2 - T / 2),
- /^xMax/.test(S) && (I || L) && r.translate(i - C, 0),
- /YMax$/.test(S) && (j || z) && r.translate(0, a - T);
- }
- switch (!0) {
- case 'none' === S:
- r.scale(P, R);
- break;
- case 'meet' === k:
- r.scale(A, A);
- break;
- case 'slice' === k:
- r.scale(E, E);
- }
- r.translate(-c, -f);
- }
- },
- {
- key: 'start',
- value: function(t) {
- var e = this,
- r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},
- n = r.enableRedraw,
- i = void 0 !== n && n,
- o = r.ignoreMouse,
- a = void 0 !== o && o,
- u = r.ignoreAnimation,
- s = void 0 !== u && u,
- c = r.ignoreDimensions,
- l = void 0 !== c && c,
- f = r.ignoreClear,
- h = void 0 !== f && f,
- p = r.forceRedraw,
- g = r.scaleWidth,
- y = r.scaleHeight,
- v = r.offsetX,
- d = r.offsetY,
- m = this.FRAMERATE,
- x = this.mouse,
- b = 1e3 / m;
- if (
- ((this.frameDuration = b),
- (this.readyPromise = new Promise(function(t) {
- e.resolveReady = t;
- })),
- this.isReady() && this.render(t, l, h, g, y, v, d),
- i)
- ) {
- var w = Date.now(),
- S = w,
- k = 0,
- P = function r() {
- (w = Date.now()),
- (k = w - S) >= b &&
- ((S = w - (k % b)),
- e.shouldUpdate(s, p) && (e.render(t, l, h, g, y, v, d), x.runEvents())),
- (e.intervalId = Oa(r));
- };
- a || x.start(), (this.intervalId = Oa(P));
- }
- }
- },
- {
- key: 'stop',
- value: function() {
- this.intervalId && (Oa.cancel(this.intervalId), (this.intervalId = null)),
- this.mouse.stop();
- }
- },
- {
- key: 'shouldUpdate',
- value: function(t, e) {
- if (!t) {
- var r = this.frameDuration,
- n = this.animations.reduce(function(t, e) {
- return e.update(r) || t;
- }, !1);
- if (n) return !0;
- }
- return (
- !('function' != typeof e || !e()) ||
- !(this.isReadyLock || !this.isReady()) || !!this.mouse.hasEvents()
- );
- }
- },
- {
- key: 'render',
- value: function(t, e, r, n, i, o, a) {
- var u = this.CLIENT_WIDTH,
- s = this.CLIENT_HEIGHT,
- c = this.viewPort,
- l = this.ctx,
- f = this.isFirstRender,
- h = l.canvas;
- c.clear(), h.width && h.height ? c.setCurrent(h.width, h.height) : c.setCurrent(u, s);
- var p = t.getStyle('width'),
- g = t.getStyle('height');
- !e &&
- (f || ('number' != typeof n && 'number' != typeof i)) &&
- (p.hasValue() &&
- ((h.width = p.getPixels('x')),
- h.style && (h.style.width = ''.concat(h.width, 'px'))),
- g.hasValue() &&
- ((h.height = g.getPixels('y')),
- h.style && (h.style.height = ''.concat(h.height, 'px'))));
- var y = h.clientWidth || h.width,
- v = h.clientHeight || h.height;
- if (
- (e && p.hasValue() && g.hasValue() && ((y = p.getPixels('x')), (v = g.getPixels('y'))),
- c.setCurrent(y, v),
- 'number' == typeof o && t.getAttribute('x', !0).setValue(o),
- 'number' == typeof a && t.getAttribute('y', !0).setValue(a),
- 'number' == typeof n || 'number' == typeof i)
- ) {
- var d = Ze(t.getAttribute('viewBox').getString()),
- m = 0,
- x = 0;
- if ('number' == typeof n) {
- var b = t.getStyle('width');
- b.hasValue() ? (m = b.getPixels('x') / n) : isNaN(d[2]) || (m = d[2] / n);
- }
- if ('number' == typeof i) {
- var w = t.getStyle('height');
- w.hasValue() ? (x = w.getPixels('y') / i) : isNaN(d[3]) || (x = d[3] / i);
- }
- m || (m = x),
- x || (x = m),
- t.getAttribute('width', !0).setValue(n),
- t.getAttribute('height', !0).setValue(i);
- var S = t.getStyle('transform', !0, !0);
- S.setValue(
- ''
- .concat(S.getString(), ' scale(')
- .concat(1 / m, ', ')
- .concat(1 / x, ')')
- );
- }
- r || l.clearRect(0, 0, y, v), t.render(l), f && (this.isFirstRender = !1);
- }
- }
- ]),
- t
- );
- })();
- ($a.defaultWindow = Fa), ($a.defaultFetch = _a);
- var Ga = $a.defaultFetch,
- qa = 'undefined' != typeof DOMParser ? DOMParser : null,
- Ua = (function() {
- function t() {
- var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
- r = e.fetch,
- n = void 0 === r ? Ga : r,
- i = e.DOMParser,
- o = void 0 === i ? qa : i;
- Un(this, t), (this.fetch = n), (this.DOMParser = o);
- }
- var e, r;
- return (
- Hn(t, [
- {
- key: 'parse',
- value:
- ((r = Gn(
- _n.mark(function t(e) {
- return _n.wrap(
- function(t) {
- for (;;)
- switch ((t.prev = t.next)) {
- case 0:
- if (!/^</.test(e)) {
- t.next = 2;
- break;
- }
- return t.abrupt('return', this.parseFromString(e));
- case 2:
- return t.abrupt('return', this.load(e));
- case 3:
- case 'end':
- return t.stop();
- }
- },
- t,
- this
- );
- })
- )),
- function(t) {
- return r.apply(this, arguments);
- })
- },
- {
- key: 'parseFromString',
- value: function(t) {
- var e = new this.DOMParser();
- try {
- return this.checkDocument(e.parseFromString(t, 'image/svg+xml'));
- } catch (r) {
- return this.checkDocument(e.parseFromString(t, 'text/xml'));
- }
- }
- },
- {
- key: 'checkDocument',
- value: function(t) {
- var e = t.getElementsByTagName('parsererror')[0];
- if (e) throw new Error(e.textContent);
- return t;
- }
- },
- {
- key: 'load',
- value:
- ((e = Gn(
- _n.mark(function t(e) {
- var r, n;
- return _n.wrap(
- function(t) {
- for (;;)
- switch ((t.prev = t.next)) {
- case 0:
- return (t.next = 2), this.fetch(e);
- case 2:
- return (r = t.sent), (t.next = 5), r.text();
- case 5:
- return (
- (n = t.sent), t.abrupt('return', this.parseFromString(n))
- );
- case 7:
- case 'end':
- return t.stop();
- }
- },
- t,
- this
- );
- })
- )),
- function(t) {
- return e.apply(this, arguments);
- })
- }
- ]),
- t
- );
- })(),
- Wa = [].slice,
- Ha = {},
- Xa = function(t, e, r) {
- if (!(e in Ha)) {
- for (var n = [], i = 0; i < e; i++) n[i] = 'a[' + i + ']';
- Ha[e] = Function('C,a', 'return new C(' + n.join(',') + ')');
- }
- return Ha[e](t, r);
- },
- Ya =
- Function.bind ||
- function(t) {
- var e = Vt(this),
- r = Wa.call(arguments, 1),
- n = function() {
- var i = r.concat(Wa.call(arguments));
- return this instanceof n ? Xa(e, i.length, i) : e.apply(t, i);
- };
- return d(e.prototype) && (n.prototype = e.prototype), n;
- },
- Qa = ot('Reflect', 'construct'),
- Za = o(function() {
- function t() {}
- return !(Qa(function() {}, [], t) instanceof t);
- }),
- Ka = !o(function() {
- Qa(function() {});
- }),
- Ja = Za || Ka;
- Dt(
- { target: 'Reflect', stat: !0, forced: Ja, sham: Ja },
- {
- construct: function(t, e) {
- Vt(t), E(e);
- var r = arguments.length < 3 ? t : Vt(arguments[2]);
- if (Ka && !Za) return Qa(t, e, r);
- if (t == r) {
- switch (e.length) {
- case 0:
- return new t();
- case 1:
- return new t(e[0]);
- case 2:
- return new t(e[0], e[1]);
- case 3:
- return new t(e[0], e[1], e[2]);
- case 4:
- return new t(e[0], e[1], e[2], e[3]);
- }
- var n = [null];
- return n.push.apply(n, e), new (Ya.apply(t, n))();
- }
- var i = r.prototype,
- o = Br(d(i) ? i : Object.prototype),
- a = Function.apply.call(t, o, e);
- return d(a) ? a : o;
- }
- }
- );
- var tu = RegExp.prototype,
- eu = tu.toString,
- ru = o(function() {
- return '/a/b' != eu.call({ source: 'a', flags: 'b' });
- }),
- nu = 'toString' != eu.name;
- (ru || nu) &&
- rt(
- RegExp.prototype,
- 'toString',
- function() {
- var t = E(this),
- e = String(t.source),
- r = t.flags;
- return '/' + e + '/' + String(void 0 === r && t instanceof RegExp && !('flags' in tu) ? se.call(t) : r);
- },
- { unsafe: !0 }
- );
- var iu = r(function(t) {
- function e(r) {
- return (
- 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator
- ? (t.exports = e = function(t) {
- return typeof t;
- })
- : (t.exports = e = function(t) {
- return t && 'function' == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype
- ? 'symbol'
- : typeof t;
- }),
- e(r)
- );
- }
- t.exports = e;
- });
- var ou = function(t) {
- if (void 0 === t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
- return t;
- };
- var au = function(t, e) {
- return !e || ('object' !== iu(e) && 'function' != typeof e) ? ou(t) : e;
- },
- uu = r(function(t) {
- function e(r) {
- return (
- (t.exports = e = Object.setPrototypeOf
- ? Object.getPrototypeOf
- : function(t) {
- return t.__proto__ || Object.getPrototypeOf(t);
- }),
- e(r)
- );
- }
- t.exports = e;
- }),
- su = r(function(t) {
- function e(r, n) {
- return (
- (t.exports = e =
- Object.setPrototypeOf ||
- function(t, e) {
- return (t.__proto__ = e), t;
- }),
- e(r, n)
- );
- }
- t.exports = e;
- });
- var cu = function(t, e) {
- if ('function' != typeof e && null !== e)
- throw new TypeError('Super expression must either be null or a function');
- (t.prototype = Object.create(e && e.prototype, {
- constructor: { value: t, writable: !0, configurable: !0 }
- })),
- e && su(t, e);
- },
- lu = !Mi(function(t) {
- Array.from(t);
- });
- Dt(
- { target: 'Array', stat: !0, forced: lu },
- {
- from: function(t) {
- var e,
- r,
- n,
- i,
- o,
- a,
- u = It(t),
- s = 'function' == typeof this ? this : Array,
- c = arguments.length,
- l = c > 1 ? arguments[1] : void 0,
- f = void 0 !== l,
- h = wi(u),
- p = 0;
- if ((f && (l = Nt(l, c > 2 ? arguments[2] : void 0, 2)), null == h || (s == Array && xi(h))))
- for (r = new s((e = lt(u.length))); e > p; p++) (a = f ? l(u[p], p) : u[p]), In(r, p, a);
- else
- for (o = (i = h.call(u)).next, r = new s(); !(n = o.call(i)).done; p++)
- (a = f ? Si(i, l, [n.value, p], !0) : n.value), In(r, p, a);
- return (r.length = p), r;
- }
- }
- );
- var fu = $t('unscopables'),
- hu = Array.prototype;
- null == hu[fu] && T.f(hu, fu, { configurable: !0, value: Br(null) });
- var pu = function(t) {
- hu[fu][t] = !0;
- },
- gu = yt.includes,
- yu = ie('indexOf', { ACCESSORS: !0, 1: 0 });
- Dt(
- { target: 'Array', proto: !0, forced: !yu },
- {
- includes: function(t) {
- return gu(this, t, arguments.length > 1 ? arguments[1] : void 0);
- }
- }
- ),
- pu('includes');
- var vu = Ht.some,
- du = rr('some'),
- mu = ie('some');
- Dt(
- { target: 'Array', proto: !0, forced: !du || !mu },
- {
- some: function(t) {
- return vu(this, t, arguments.length > 1 ? arguments[1] : void 0);
- }
- }
- ),
- Dt(
- { target: 'String', proto: !0, forced: !$e('includes') },
- {
- includes: function(t) {
- return !!~String(y(this)).indexOf(Fe(t), arguments.length > 1 ? arguments[1] : void 0);
- }
- }
- );
- var xu,
- bu,
- wu,
- Su = !o(function() {
- function t() {}
- return (t.prototype.constructor = null), Object.getPrototypeOf(new t()) !== t.prototype;
- }),
- ku = U('IE_PROTO'),
- Pu = Object.prototype,
- Ru = Su
- ? Object.getPrototypeOf
- : function(t) {
- return (
- (t = It(t)),
- b(t, ku)
- ? t[ku]
- : 'function' == typeof t.constructor && t instanceof t.constructor
- ? t.constructor.prototype
- : t instanceof Object
- ? Pu
- : null
- );
- },
- Au = $t('iterator'),
- Eu = !1;
- [].keys && ('next' in (wu = [].keys()) ? (bu = Ru(Ru(wu))) !== Object.prototype && (xu = bu) : (Eu = !0)),
- null == xu && (xu = {}),
- b(xu, Au) ||
- O(xu, Au, function() {
- return this;
- });
- var Cu = { IteratorPrototype: xu, BUGGY_SAFARI_ITERATORS: Eu },
- Tu = Cu.IteratorPrototype,
- Ou = function() {
- return this;
- },
- Mu =
- Object.setPrototypeOf ||
- ('__proto__' in {}
- ? (function() {
- var t,
- e = !1,
- r = {};
- try {
- (t = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set).call(r, []),
- (e = r instanceof Array);
- } catch (t) {}
- return function(r, n) {
- return (
- E(r),
- (function(t) {
- if (!d(t) && null !== t)
- throw TypeError("Can't set " + String(t) + ' as a prototype');
- })(n),
- e ? t.call(r, n) : (r.__proto__ = n),
- r
- );
- };
- })()
- : void 0),
- Du = Cu.IteratorPrototype,
- Vu = Cu.BUGGY_SAFARI_ITERATORS,
- Nu = $t('iterator'),
- Iu = function() {
- return this;
- },
- Lu = function(t, e, r, n, i, o, a) {
- !(function(t, e, r) {
- var n = e + ' Iterator';
- (t.prototype = Br(Tu, { next: l(1, r) })), Yr(t, n, !1), (vi[n] = Ou);
- })(r, e, n);
- var u,
- s,
- c,
- f = function(t) {
- if (t === i && v) return v;
- if (!Vu && t in g) return g[t];
- switch (t) {
- case 'keys':
- case 'values':
- case 'entries':
- return function() {
- return new r(this, t);
- };
- }
- return function() {
- return new r(this);
- };
- },
- h = e + ' Iterator',
- p = !1,
- g = t.prototype,
- y = g[Nu] || g['@@iterator'] || (i && g[i]),
- v = (!Vu && y) || f(i),
- d = ('Array' == e && g.entries) || y;
- if (
- (d &&
- ((u = Ru(d.call(new t()))),
- Du !== Object.prototype &&
- u.next &&
- (Ru(u) !== Du && (Mu ? Mu(u, Du) : 'function' != typeof u[Nu] && O(u, Nu, Iu)), Yr(u, h, !0))),
- 'values' == i &&
- y &&
- 'values' !== y.name &&
- ((p = !0),
- (v = function() {
- return y.call(this);
- })),
- g[Nu] !== v && O(g, Nu, v),
- (vi[e] = v),
- i)
- )
- if (((s = { values: f('values'), keys: o ? v : f('keys'), entries: f('entries') }), a))
- for (c in s) (Vu || p || !(c in g)) && rt(g, c, s[c]);
- else Dt({ target: e, proto: !0, forced: Vu || p }, s);
- return s;
- },
- ju = Ce.charAt,
- zu = et.set,
- Bu = et.getterFor('String Iterator');
- Lu(
- String,
- 'String',
- function(t) {
- zu(this, { type: 'String Iterator', string: String(t), index: 0 });
- },
- function() {
- var t,
- e = Bu(this),
- r = e.string,
- n = e.index;
- return n >= r.length
- ? { value: void 0, done: !0 }
- : ((t = ju(r, n)), (e.index += t.length), { value: t, done: !1 });
- }
- );
- var Fu = '\t\n\v\f\r \u2028\u2029\ufeff',
- _u = '[' + Fu + ']',
- $u = RegExp('^' + _u + _u + '*'),
- Gu = RegExp(_u + _u + '*$'),
- qu = function(t) {
- return function(e) {
- var r = String(y(e));
- return 1 & t && (r = r.replace($u, '')), 2 & t && (r = r.replace(Gu, '')), r;
- };
- },
- Uu = { start: qu(1), end: qu(2), trim: qu(3) },
- Wu = Uu.trim;
- Dt(
- {
- target: 'String',
- proto: !0,
- forced: (function(t) {
- return o(function() {
- return !!Fu[t]() || '
' != '
'[t]() || Fu[t].name !== t;
- });
- })('trim')
- },
- {
- trim: function() {
- return Wu(this);
- }
- }
- );
- var Hu = function(t) {
- if (Array.isArray(t)) return sr(t);
- };
- var Xu = function(t) {
- if ('undefined' != typeof Symbol && Symbol.iterator in Object(t)) return Array.from(t);
- };
- var Yu = function() {
- throw new TypeError(
- 'Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.'
- );
- };
- var Qu = function(t) {
- return Hu(t) || Xu(t) || cr(t) || Yu();
- },
- Zu = (function() {
- function t(e, r) {
- Un(this, t), (this.type = 'translate'), (this.point = null), (this.point = za.parse(r));
- }
- return (
- Hn(t, [
- {
- key: 'apply',
- value: function(t) {
- var e = this.point,
- r = e.x,
- n = e.y;
- t.translate(r || 0, n || 0);
- }
- },
- {
- key: 'unapply',
- value: function(t) {
- var e = this.point,
- r = e.x,
- n = e.y;
- t.translate(-1 * r || 0, -1 * n || 0);
- }
- },
- {
- key: 'applyToPoint',
- value: function(t) {
- var e = this.point,
- r = e.x,
- n = e.y;
- t.applyTransform([1, 0, 0, 1, r || 0, n || 0]);
- }
- }
- ]),
- t
- );
- })(),
- Ku = (function() {
- function t(e, r) {
- var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : [];
- Un(this, t), (this.type = 'rotate'), (this.angle = null), (this.cx = 0), (this.cy = 0);
- var i = Ze(r);
- (this.angle = new La(e, 'angle', i[0])),
- (this.cx = (i[1] || 0) + (n[0] || 0)),
- (this.cy = (i[2] || 0) + (n[1] || 0));
- }
- return (
- Hn(t, [
- {
- key: 'apply',
- value: function(t) {
- var e = this.cx,
- r = this.cy,
- n = this.angle;
- t.translate(e, r), t.rotate(n.getRadians()), t.translate(-e, -r);
- }
- },
- {
- key: 'unapply',
- value: function(t) {
- var e = this.cx,
- r = this.cy,
- n = this.angle;
- t.translate(e, r), t.rotate(-1 * n.getRadians()), t.translate(-e, -r);
- }
- },
- {
- key: 'applyToPoint',
- value: function(t) {
- var e = this.cx,
- r = this.cy,
- n = this.angle.getRadians();
- t.applyTransform([1, 0, 0, 1, e || 0, r || 0]),
- t.applyTransform([Math.cos(n), Math.sin(n), -Math.sin(n), Math.cos(n), 0, 0]),
- t.applyTransform([1, 0, 0, 1, -e || 0, -r || 0]);
- }
- }
- ]),
- t
- );
- })(),
- Ju = (function() {
- function t(e, r) {
- Un(this, t), (this.type = 'scale'), (this.scale = null);
- var n = za.parseScale(r);
- (0 !== n.x && 0 !== n.y) || ((n.x = 1e-8), (n.y = 1e-8)), (this.scale = n);
- }
- return (
- Hn(t, [
- {
- key: 'apply',
- value: function(t) {
- var e = this.scale,
- r = e.x,
- n = e.y;
- t.scale(r, n || r);
- }
- },
- {
- key: 'unapply',
- value: function(t) {
- var e = this.scale,
- r = e.x,
- n = e.y;
- t.scale(1 / r, 1 / n || r);
- }
- },
- {
- key: 'applyToPoint',
- value: function(t) {
- var e = this.scale,
- r = e.x,
- n = e.y;
- t.applyTransform([r || 0, 0, 0, n || 0, 0, 0]);
- }
- }
- ]),
- t
- );
- })(),
- ts = (function() {
- function t(e, r) {
- Un(this, t), (this.type = 'matrix'), (this.matrix = []), (this.matrix = Ze(r));
- }
- return (
- Hn(t, [
- {
- key: 'apply',
- value: function(t) {
- var e = this.matrix;
- t.transform(e[0], e[1], e[2], e[3], e[4], e[5]);
- }
- },
- {
- key: 'unapply',
- value: function(t) {
- var e = this.matrix,
- r = e[0],
- n = e[2],
- i = e[4],
- o = e[1],
- a = e[3],
- u = e[5],
- s = 1 / (r * (1 * a - 0 * u) - n * (1 * o - 0 * u) + i * (0 * o - 0 * a));
- t.transform(
- s * (1 * a - 0 * u),
- s * (0 * u - 1 * o),
- s * (0 * i - 1 * n),
- s * (1 * r - 0 * i),
- s * (n * u - i * a),
- s * (i * o - r * u)
- );
- }
- },
- {
- key: 'applyToPoint',
- value: function(t) {
- t.applyTransform(this.matrix);
- }
- }
- ]),
- t
- );
- })();
- function es() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var rs = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (es()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n(t, e) {
- var i;
- return (
- Un(this, n),
- ((i = r.call(this, t, e)).type = 'skew'),
- (i.angle = null),
- (i.angle = new La(t, 'angle', e)),
- i
- );
- }
- return n;
- })(ts);
- function ns() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var is = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (ns()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n(t, e) {
- var i;
- return (
- Un(this, n),
- ((i = r.call(this, t, e)).type = 'skewX'),
- (i.matrix = [1, 0, Math.tan(i.angle.getRadians()), 1, 0, 0]),
- i
- );
- }
- return n;
- })(rs);
- function os() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var as = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (os()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n(t, e) {
- var i;
- return (
- Un(this, n),
- ((i = r.call(this, t, e)).type = 'skewY'),
- (i.matrix = [1, Math.tan(i.angle.getRadians()), 0, 1, 0, 0]),
- i
- );
- }
- return n;
- })(rs);
- var us = (function() {
- function t(e, r, n) {
- var i = this;
- Un(this, t), (this.document = e), (this.transforms = []);
- var o = (function(t) {
- return Xe(t)
- .trim()
- .replace(/\)([a-zA-Z])/g, ') $1')
- .replace(/\)(\s?,\s?)/g, ') ')
- .split(/\s(?=[a-z])/);
- })(r),
- a = n ? Ze(n) : [];
- o.forEach(function(e) {
- if ('none' !== e) {
- var r = (function(t) {
- var e = t.split('('),
- r = fr(e, 2),
- n = r[0],
- i = r[1];
- return [n.trim(), i.trim().replace(')', '')];
- })(e),
- n = fr(r, 2),
- o = n[0],
- u = n[1],
- s = t.transformTypes[o];
- void 0 !== s && i.transforms.push(new s(i.document, u, a));
- }
- });
- }
- return (
- Hn(
- t,
- [
- {
- key: 'apply',
- value: function(t) {
- for (var e = this.transforms, r = e.length, n = 0; n < r; n++) e[n].apply(t);
- }
- },
- {
- key: 'unapply',
- value: function(t) {
- for (var e = this.transforms, r = e.length - 1; r >= 0; r--) e[r].unapply(t);
- }
- },
- {
- key: 'applyToPoint',
- value: function(t) {
- for (var e = this.transforms, r = e.length, n = 0; n < r; n++) e[n].applyToPoint(t);
- }
- }
- ],
- [
- {
- key: 'fromElement',
- value: function(e, r) {
- var n = r.getStyle('transform', !1, !0),
- i = r.getStyle('transform-origin', !1, !0);
- return n.hasValue() ? new t(e, n.getString(), i.getString()) : null;
- }
- }
- ]
- ),
- t
- );
- })();
- us.transformTypes = { translate: Zu, rotate: Ku, scale: Ju, matrix: ts, skewX: is, skewY: as };
- var ss = (function() {
- function t(e, r) {
- var n = this,
- i = arguments.length > 2 && void 0 !== arguments[2] && arguments[2];
- if (
- (Un(this, t),
- (this.document = e),
- (this.node = r),
- (this.captureTextNodes = i),
- (this.attributes = {}),
- (this.styles = {}),
- (this.stylesSpecificity = {}),
- (this.animationFrozen = !1),
- (this.animationFrozenValue = ''),
- (this.parent = null),
- (this.children = []),
- r && 1 === r.nodeType)
- ) {
- if (
- (Array.from(r.attributes).forEach(function(t) {
- var r = Je(t.nodeName);
- n.attributes[r] = new La(e, r, t.value);
- }),
- this.addStylesFromStyleDefinition(),
- this.getAttribute('style').hasValue())
- ) {
- var o = this.getAttribute('style')
- .getString()
- .split(';')
- .map(function(t) {
- return t.trim();
- });
- o.forEach(function(t) {
- if (t) {
- var r = t.split(':').map(function(t) {
- return t.trim();
- }),
- i = fr(r, 2),
- o = i[0],
- a = i[1];
- n.styles[o] = new La(e, o, a);
- }
- });
- }
- var a = e.definitions,
- u = this.getAttribute('id');
- u.hasValue() && (a[u.getValue()] || (a[u.getValue()] = this)),
- Array.from(r.childNodes).forEach(function(t) {
- if (1 === t.nodeType) n.addChild(t);
- else if (i && (3 === t.nodeType || 4 === t.nodeType)) {
- var r = e.createTextNode(t);
- r.getText().length > 0 && n.addChild(r);
- }
- });
- }
- }
- return (
- Hn(t, [
- {
- key: 'getAttribute',
- value: function(t) {
- var e = arguments.length > 1 && void 0 !== arguments[1] && arguments[1],
- r = this.attributes[t];
- if (!r && e) {
- var n = new La(this.document, t, '');
- return (this.attributes[t] = n), n;
- }
- return r || La.empty(this.document);
- }
- },
- {
- key: 'getHrefAttribute',
- value: function() {
- for (var t in this.attributes) if ('href' === t || /:href$/.test(t)) return this.attributes[t];
- return La.empty(this.document);
- }
- },
- {
- key: 'getStyle',
- value: function(t) {
- var e = arguments.length > 1 && void 0 !== arguments[1] && arguments[1],
- r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2],
- n = this.styles[t];
- if (n) return n;
- var i = this.getAttribute(t);
- if (i && i.hasValue()) return (this.styles[t] = i), i;
- if (!r) {
- var o = this.parent;
- if (o) {
- var a = o.getStyle(t);
- if (a && a.hasValue()) return a;
- }
- }
- if (e) {
- var u = new La(this.document, t, '');
- return (this.styles[t] = u), u;
- }
- return n || La.empty(this.document);
- }
- },
- {
- key: 'render',
- value: function(t) {
- if (
- 'none' !== this.getStyle('display').getString() &&
- 'hidden' !== this.getStyle('visibility').getString()
- ) {
- if ((t.save(), this.getStyle('mask').hasValue())) {
- var e = this.getStyle('mask').getDefinition();
- e && (this.applyEffects(t), e.apply(t, this));
- } else if ('none' !== this.getStyle('filter').getValue('none')) {
- var r = this.getStyle('filter').getDefinition();
- r && (this.applyEffects(t), r.apply(t, this));
- } else this.setContext(t), this.renderChildren(t), this.clearContext(t);
- t.restore();
- }
- }
- },
- { key: 'setContext', value: function(t) {} },
- {
- key: 'applyEffects',
- value: function(t) {
- var e = us.fromElement(this.document, this);
- e && e.apply(t);
- var r = this.getStyle('clip-path', !1, !0);
- if (r.hasValue()) {
- var n = r.getDefinition();
- n && n.apply(t);
- }
- }
- },
- { key: 'clearContext', value: function(t) {} },
- {
- key: 'renderChildren',
- value: function(t) {
- this.children.forEach(function(e) {
- e.render(t);
- });
- }
- },
- {
- key: 'addChild',
- value: function(e) {
- var r = e instanceof t ? e : this.document.createElement(e);
- (r.parent = this), t.ignoreChildTypes.includes(r.type) || this.children.push(r);
- }
- },
- {
- key: 'matchesSelector',
- value: function(t) {
- var e = this.node;
- if ('function' == typeof e.matches) return e.matches(t);
- var r = e.getAttribute('class');
- return (
- !(!r || '' === r) &&
- r.split(' ').some(function(e) {
- if ('.'.concat(e) === t) return !0;
- })
- );
- }
- },
- {
- key: 'addStylesFromStyleDefinition',
- value: function() {
- var t = this.document,
- e = t.styles,
- r = t.stylesSpecificity;
- for (var n in e)
- if ('@' !== n[0] && this.matchesSelector(n)) {
- var i = e[n],
- o = r[n];
- if (i)
- for (var a in i) {
- var u = this.stylesSpecificity[a];
- void 0 === u && (u = '000'),
- o >= u && ((this.styles[a] = i[a]), (this.stylesSpecificity[a] = o));
- }
- }
- }
- },
- {
- key: 'removeStyles',
- value: function(t, e) {
- return e.reduce(function(e, r) {
- var n = t.getStyle(r);
- if (!n.hasValue()) return e;
- var i = n.getString();
- return n.setValue(''), [].concat(Qu(e), [[r, i]]);
- }, []);
- }
- },
- {
- key: 'restoreStyles',
- value: function(t, e) {
- e.forEach(function(e) {
- var r = fr(e, 2),
- n = r[0],
- i = r[1];
- t.getStyle(n, !0).setValue(i);
- });
- }
- }
- ]),
- t
- );
- })();
- function cs() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- ss.ignoreChildTypes = ['title'];
- var ls = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (cs()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n(t, e, i) {
- return Un(this, n), r.call(this, t, e, i);
- }
- return n;
- })(ss),
- fs = yt.indexOf,
- hs = [].indexOf,
- ps = !!hs && 1 / [1].indexOf(1, -0) < 0,
- gs = rr('indexOf'),
- ys = ie('indexOf', { ACCESSORS: !0, 1: 0 });
- Dt(
- { target: 'Array', proto: !0, forced: ps || !gs || !ys },
- {
- indexOf: function(t) {
- return ps ? hs.apply(this, arguments) || 0 : fs(this, t, arguments.length > 1 ? arguments[1] : void 0);
- }
- }
- );
- var vs = [].reverse,
- ds = [1, 2];
- Dt(
- { target: 'Array', proto: !0, forced: String(ds) === String(ds.reverse()) },
- {
- reverse: function() {
- return Lt(this) && (this.length = this.length), vs.call(this);
- }
- }
- );
- var ms = function(t, e) {
- for (; !Object.prototype.hasOwnProperty.call(t, e) && null !== (t = uu(t)); );
- return t;
- },
- xs = r(function(t) {
- function e(r, n, i) {
- return (
- 'undefined' != typeof Reflect && Reflect.get
- ? (t.exports = e = Reflect.get)
- : (t.exports = e = function(t, e, r) {
- var n = ms(t, e);
- if (n) {
- var i = Object.getOwnPropertyDescriptor(n, e);
- return i.get ? i.get.call(r) : i.value;
- }
- }),
- e(r, n, i || r)
- );
- }
- t.exports = e;
- });
- function bs(t) {
- var e = t.trim();
- return /^('|")/.test(e) ? e : '"'.concat(e, '"');
- }
- function ws(t) {
- if (!t) return '';
- var e = t.trim().toLowerCase();
- switch (e) {
- case 'normal':
- case 'italic':
- case 'oblique':
- case 'inherit':
- case 'initial':
- case 'unset':
- return e;
- default:
- return /^oblique\s+(-|)\d+deg$/.test(e) ? e : '';
- }
- }
- function Ss(t) {
- if (!t) return '';
- var e = t.trim().toLowerCase();
- switch (e) {
- case 'normal':
- case 'bold':
- case 'lighter':
- case 'bolder':
- case 'inherit':
- case 'initial':
- case 'unset':
- return e;
- default:
- return /^[\d.]+$/.test(e) ? e : '';
- }
- }
- var ks = (function() {
- function t(e, r, n, i, o, a) {
- Un(this, t);
- var u = a ? ('string' == typeof a ? t.parse(a) : a) : {};
- (this.fontFamily = o || u.fontFamily),
- (this.fontSize = i || u.fontSize),
- (this.fontStyle = e || u.fontStyle),
- (this.fontWeight = n || u.fontWeight),
- (this.fontVariant = r || u.fontVariant);
- }
- return (
- Hn(
- t,
- [
- {
- key: 'toString',
- value: function() {
- return [
- ws(this.fontStyle),
- this.fontVariant,
- Ss(this.fontWeight),
- this.fontSize,
- ((t = this.fontFamily),
- 'undefined' == typeof process
- ? t
- : t
- .trim()
- .split(',')
- .map(bs)
- .join(','))
- ]
- .join(' ')
- .trim();
- var t;
- }
- }
- ],
- [
- {
- key: 'parse',
- value: function() {
- var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : '',
- r = arguments.length > 1 ? arguments[1] : void 0,
- n = '',
- i = '',
- o = '',
- a = '',
- u = '',
- s = Xe(e)
- .trim()
- .split(' '),
- c = { fontSize: !1, fontStyle: !1, fontWeight: !1, fontVariant: !1 };
- return (
- s.forEach(function(e) {
- switch (!0) {
- case !c.fontStyle && t.styles.includes(e):
- 'inherit' !== e && (n = e), (c.fontStyle = !0);
- break;
- case !c.fontVariant && t.variants.includes(e):
- 'inherit' !== e && (i = e), (c.fontStyle = !0), (c.fontVariant = !0);
- break;
- case !c.fontWeight && t.weights.includes(e):
- 'inherit' !== e && (o = e),
- (c.fontStyle = !0),
- (c.fontVariant = !0),
- (c.fontWeight = !0);
- break;
- case !c.fontSize:
- if ('inherit' !== e) {
- var r = e.split('/'),
- s = fr(r, 1);
- a = s[0];
- }
- (c.fontStyle = !0),
- (c.fontVariant = !0),
- (c.fontWeight = !0),
- (c.fontSize = !0);
- break;
- default:
- 'inherit' !== e && (u += e);
- }
- }),
- new t(n, i, o, a, u, r)
- );
- }
- }
- ]
- ),
- t
- );
- })();
- (ks.styles = 'normal|italic|oblique|inherit'),
- (ks.variants = 'normal|small-caps|inherit'),
- (ks.weights = 'normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit');
- var Ps = function(t, e, r) {
- var n, i;
- return (
- Mu &&
- 'function' == typeof (n = e.constructor) &&
- n !== r &&
- d((i = n.prototype)) &&
- i !== r.prototype &&
- Mu(t, i),
- t
- );
- },
- Rs = bt.f,
- As = A.f,
- Es = T.f,
- Cs = Uu.trim,
- Ts = i.Number,
- Os = Ts.prototype,
- Ms = 'Number' == h(Br(Os)),
- Ds = function(t) {
- var e,
- r,
- n,
- i,
- o,
- a,
- u,
- s,
- c = m(t, !1);
- if ('string' == typeof c && c.length > 2)
- if (43 === (e = (c = Cs(c)).charCodeAt(0)) || 45 === e) {
- if (88 === (r = c.charCodeAt(2)) || 120 === r) return NaN;
- } else if (48 === e) {
- switch (c.charCodeAt(1)) {
- case 66:
- case 98:
- (n = 2), (i = 49);
- break;
- case 79:
- case 111:
- (n = 8), (i = 55);
- break;
- default:
- return +c;
- }
- for (a = (o = c.slice(2)).length, u = 0; u < a; u++)
- if ((s = o.charCodeAt(u)) < 48 || s > i) return NaN;
- return parseInt(o, n);
- }
- return +c;
- };
- if (Ot('Number', !Ts(' 0o1') || !Ts('0b1') || Ts('+0x1'))) {
- for (
- var Vs,
- Ns = function(t) {
- var e = arguments.length < 1 ? 0 : t,
- r = this;
- return r instanceof Ns &&
- (Ms
- ? o(function() {
- Os.valueOf.call(r);
- })
- : 'Number' != h(r))
- ? Ps(new Ts(Ds(e)), r, Ns)
- : Ds(e);
- },
- Is = a
- ? Rs(Ts)
- : 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'.split(
- ','
- ),
- Ls = 0;
- Is.length > Ls;
- Ls++
- )
- b(Ts, (Vs = Is[Ls])) && !b(Ns, Vs) && Es(Ns, Vs, As(Ts, Vs));
- (Ns.prototype = Os), (Os.constructor = Ns), rt(i, 'Number', Ns);
- }
- var js = (function() {
- function t() {
- var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Number.NaN,
- r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : Number.NaN,
- n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : Number.NaN,
- i = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : Number.NaN;
- Un(this, t),
- (this.x1 = e),
- (this.y1 = r),
- (this.x2 = n),
- (this.y2 = i),
- this.addPoint(e, r),
- this.addPoint(n, i);
- }
- return (
- Hn(t, [
- {
- key: 'addPoint',
- value: function(t, e) {
- void 0 !== t &&
- ((isNaN(this.x1) || isNaN(this.x2)) && ((this.x1 = t), (this.x2 = t)),
- t < this.x1 && (this.x1 = t),
- t > this.x2 && (this.x2 = t)),
- void 0 !== e &&
- ((isNaN(this.y1) || isNaN(this.y2)) && ((this.y1 = e), (this.y2 = e)),
- e < this.y1 && (this.y1 = e),
- e > this.y2 && (this.y2 = e));
- }
- },
- {
- key: 'addX',
- value: function(t) {
- this.addPoint(t, null);
- }
- },
- {
- key: 'addY',
- value: function(t) {
- this.addPoint(null, t);
- }
- },
- {
- key: 'addBoundingBox',
- value: function(t) {
- if (t) {
- var e = t.x1,
- r = t.y1,
- n = t.x2,
- i = t.y2;
- this.addPoint(e, r), this.addPoint(n, i);
- }
- }
- },
- {
- key: 'sumCubic',
- value: function(t, e, r, n, i) {
- return (
- Math.pow(1 - t, 3) * e +
- 3 * Math.pow(1 - t, 2) * t * r +
- 3 * (1 - t) * Math.pow(t, 2) * n +
- Math.pow(t, 3) * i
- );
- }
- },
- {
- key: 'bezierCurveAdd',
- value: function(t, e, r, n, i) {
- var o = 6 * e - 12 * r + 6 * n,
- a = -3 * e + 9 * r - 9 * n + 3 * i,
- u = 3 * r - 3 * e;
- if (0 !== a) {
- var s = Math.pow(o, 2) - 4 * u * a;
- if (!(s < 0)) {
- var c = (-o + Math.sqrt(s)) / (2 * a);
- 0 < c &&
- c < 1 &&
- (t
- ? this.addX(this.sumCubic(c, e, r, n, i))
- : this.addY(this.sumCubic(c, e, r, n, i)));
- var l = (-o - Math.sqrt(s)) / (2 * a);
- 0 < l &&
- l < 1 &&
- (t
- ? this.addX(this.sumCubic(l, e, r, n, i))
- : this.addY(this.sumCubic(l, e, r, n, i)));
- }
- } else {
- if (0 === o) return;
- var f = -u / o;
- 0 < f &&
- f < 1 &&
- (t ? this.addX(this.sumCubic(f, e, r, n, i)) : this.addY(this.sumCubic(f, e, r, n, i)));
- }
- }
- },
- {
- key: 'addBezierCurve',
- value: function(t, e, r, n, i, o, a, u) {
- this.addPoint(t, e),
- this.addPoint(a, u),
- this.bezierCurveAdd(!0, t, r, i, a),
- this.bezierCurveAdd(!1, e, n, o, u);
- }
- },
- {
- key: 'addQuadraticCurve',
- value: function(t, e, r, n, i, o) {
- var a = t + (2 / 3) * (r - t),
- u = e + (2 / 3) * (n - e),
- s = a + (1 / 3) * (i - t),
- c = u + (1 / 3) * (o - e);
- this.addBezierCurve(t, e, a, s, u, c, i, o);
- }
- },
- {
- key: 'isPointInBox',
- value: function(t, e) {
- var r = this.x1,
- n = this.y1,
- i = this.x2,
- o = this.y2;
- return r <= t && t <= i && n <= e && e <= o;
- }
- },
- {
- key: 'x',
- get: function() {
- return this.x1;
- }
- },
- {
- key: 'y',
- get: function() {
- return this.y1;
- }
- },
- {
- key: 'width',
- get: function() {
- return this.x2 - this.x1;
- }
- },
- {
- key: 'height',
- get: function() {
- return this.y2 - this.y1;
- }
- }
- ]),
- t
- );
- })();
- function zs() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var Bs = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (zs()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n() {
- var t;
- return Un(this, n), ((t = r.apply(this, arguments)).modifiedEmSizeStack = !1), t;
- }
- return (
- Hn(n, [
- {
- key: 'calculateOpacity',
- value: function() {
- for (var t = 1, e = this; e; ) {
- var r = e.getStyle('opacity', !1, !0);
- r.hasValue() && (t *= r.getNumber()), (e = e.parent);
- }
- return t;
- }
- },
- {
- key: 'setContext',
- value: function(t) {
- var e = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
- if (!e) {
- var r = this.getStyle('fill'),
- n = this.getStyle('fill-opacity'),
- i = this.getStyle('stroke'),
- o = this.getStyle('stroke-opacity');
- if (r.isUrlDefinition()) {
- var a = r.getFillStyleDefinition(this, n);
- a && (t.fillStyle = a);
- } else if (r.hasValue()) {
- 'currentColor' === r.getString() && r.setValue(this.getStyle('color').getColor());
- var u = r.getColor();
- 'inherit' !== u && (t.fillStyle = 'none' === u ? 'rgba(0,0,0,0)' : u);
- }
- if (n.hasValue()) {
- var s = new La(this.document, 'fill', t.fillStyle).addOpacity(n).getColor();
- t.fillStyle = s;
- }
- if (i.isUrlDefinition()) {
- var c = i.getFillStyleDefinition(this, o);
- c && (t.strokeStyle = c);
- } else if (i.hasValue()) {
- 'currentColor' === i.getString() && i.setValue(this.getStyle('color').getColor());
- var l = i.getString();
- 'inherit' !== l && (t.strokeStyle = 'none' === l ? 'rgba(0,0,0,0)' : l);
- }
- if (o.hasValue()) {
- var f = new La(this.document, 'stroke', t.strokeStyle).addOpacity(o).getString();
- t.strokeStyle = f;
- }
- var h = this.getStyle('stroke-width');
- if (h.hasValue()) {
- var p = h.getPixels();
- t.lineWidth = p || 1e-8;
- }
- var g = this.getStyle('stroke-linecap'),
- y = this.getStyle('stroke-linejoin'),
- v = this.getStyle('stroke-miterlimit'),
- d = this.getStyle('paint-order'),
- m = this.getStyle('stroke-dasharray'),
- x = this.getStyle('stroke-dashoffset');
- if (
- (g.hasValue() && (t.lineCap = g.getString()),
- y.hasValue() && (t.lineJoin = y.getString()),
- v.hasValue() && (t.miterLimit = v.getNumber()),
- d.hasValue() && (t.paintOrder = d.getValue()),
- m.hasValue() && 'none' !== m.getString())
- ) {
- var b = Ze(m.getString());
- void 0 !== t.setLineDash
- ? t.setLineDash(b)
- : void 0 !== t.webkitLineDash
- ? (t.webkitLineDash = b)
- : void 0 === t.mozDash || (1 === b.length && 0 === b[0]) || (t.mozDash = b);
- var w = x.getPixels();
- void 0 !== t.lineDashOffset
- ? (t.lineDashOffset = w)
- : void 0 !== t.webkitLineDashOffset
- ? (t.webkitLineDashOffset = w)
- : void 0 !== t.mozDashOffset && (t.mozDashOffset = w);
- }
- }
- if (((this.modifiedEmSizeStack = !1), void 0 !== t.font)) {
- var S = this.getStyle('font'),
- k = this.getStyle('font-style'),
- P = this.getStyle('font-variant'),
- R = this.getStyle('font-weight'),
- A = this.getStyle('font-size'),
- E = this.getStyle('font-family'),
- C = new ks(
- k.getString(),
- P.getString(),
- R.getString(),
- A.hasValue() ? ''.concat(A.getPixels(!0), 'px') : '',
- E.getString(),
- ks.parse(S.getString(), t.font)
- );
- k.setValue(C.fontStyle),
- P.setValue(C.fontVariant),
- R.setValue(C.fontWeight),
- A.setValue(C.fontSize),
- E.setValue(C.fontFamily),
- (t.font = C.toString()),
- A.isPixels() &&
- ((this.document.emSize = A.getPixels()), (this.modifiedEmSizeStack = !0));
- }
- e || (this.applyEffects(t), (t.globalAlpha = this.calculateOpacity()));
- }
- },
- {
- key: 'clearContext',
- value: function(t) {
- xs(uu(n.prototype), 'clearContext', this).call(this, t),
- this.modifiedEmSizeStack && this.document.popEmSize();
- }
- }
- ]),
- n
- );
- })(ss);
- function Fs() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var _s = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (Fs()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n(t, e, i) {
- var o;
- return (
- Un(this, n),
- ((o = r.call(this, t, e, (this instanceof n ? this.constructor : void 0) === n || i)).type = 'text'),
- (o.x = 0),
- (o.y = 0),
- (o.measureCache = -1),
- o
- );
- }
- return (
- Hn(n, [
- {
- key: 'setContext',
- value: function(t) {
- var e = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
- xs(uu(n.prototype), 'setContext', this).call(this, t, e);
- var r =
- this.getStyle('dominant-baseline').getTextBaseline() ||
- this.getStyle('alignment-baseline').getTextBaseline();
- r && (t.textBaseline = r);
- }
- },
- {
- key: 'initializeCoordinates',
- value: function(t) {
- (this.x = this.getAttribute('x').getPixels('x')),
- (this.y = this.getAttribute('y').getPixels('y'));
- var e = this.getAttribute('dx'),
- r = this.getAttribute('dy');
- e.hasValue() && (this.x += e.getPixels('x')),
- r.hasValue() && (this.y += r.getPixels('y')),
- (this.x += this.getAnchorDelta(t, this, 0));
- }
- },
- {
- key: 'getBoundingBox',
- value: function(t) {
- var e = this;
- if ('text' !== this.type) return this.getTElementBoundingBox(t);
- this.initializeCoordinates(t);
- var r = null;
- return (
- this.children.forEach(function(n, i) {
- var o = e.getChildBoundingBox(t, e, e, i);
- r ? r.addBoundingBox(o) : (r = o);
- }),
- r
- );
- }
- },
- {
- key: 'getFontSize',
- value: function() {
- var t = this.document,
- e = this.parent,
- r = ks.parse(t.ctx.font).fontSize;
- return e.getStyle('font-size').getNumber(r);
- }
- },
- {
- key: 'getTElementBoundingBox',
- value: function(t) {
- var e = this.getFontSize();
- return new js(this.x, this.y - e, this.x + this.measureText(t), this.y);
- }
- },
- {
- key: 'getGlyph',
- value: function(t, e, r) {
- var n = e[r],
- i = null;
- if (t.isArabic) {
- var o = e.length,
- a = e[r - 1],
- u = e[r + 1],
- s = 'isolated';
- (0 === r || ' ' === a) && r < o - 2 && ' ' !== u && (s = 'terminal'),
- r > 0 && ' ' !== a && r < o - 2 && ' ' !== u && (s = 'medial'),
- r > 0 && ' ' !== a && (r === o - 1 || ' ' === u) && (s = 'initial'),
- void 0 !== t.glyphs[n] &&
- ((i = t.glyphs[n][s]) || 'glyph' !== t.glyphs[n].type || (i = t.glyphs[n]));
- } else i = t.glyphs[n];
- return i || (i = t.missingGlyph), i;
- }
- },
- {
- key: 'getText',
- value: function() {
- return '';
- }
- },
- {
- key: 'getTextFromNode',
- value: function(t) {
- var e = t || this.node,
- r = Array.from(e.parentNode.childNodes),
- n = r.indexOf(e),
- i = r.length - 1,
- o = Xe(e.value || e.text || e.textContent || '');
- return 0 === n && (o = Ye(o)), n === i && (o = Qe(o)), o;
- }
- },
- {
- key: 'renderChildren',
- value: function(t) {
- var e = this;
- if ('text' === this.type) {
- this.initializeCoordinates(t),
- this.children.forEach(function(r, n) {
- e.renderChild(t, e, e, n);
- });
- var r = this.document.screen.mouse;
- r.isWorking() && r.checkBoundingBox(this, this.getBoundingBox(t));
- } else this.renderTElementChildren(t);
- }
- },
- {
- key: 'renderTElementChildren',
- value: function(t) {
- var e = this.document,
- r = this.parent,
- n = this.getText(),
- i = r.getStyle('font-family').getDefinition();
- if (i)
- for (
- var o = i.fontFace.unitsPerEm,
- a = ks.parse(e.ctx.font),
- u = r.getStyle('font-size').getNumber(a.fontSize),
- s = r.getStyle('font-style').getString(a.fontStyle),
- c = u / o,
- l = i.isRTL
- ? n
- .split('')
- .reverse()
- .join('')
- : n,
- f = Ze(r.getAttribute('dx').getString()),
- h = l.length,
- p = 0;
- p < h;
- p++
- ) {
- var g = this.getGlyph(i, l, p);
- t.translate(this.x, this.y), t.scale(c, -c);
- var y = t.lineWidth;
- (t.lineWidth = (t.lineWidth * o) / u),
- 'italic' === s && t.transform(1, 0, 0.4, 1, 0, 0),
- g.render(t),
- 'italic' === s && t.transform(1, 0, -0.4, 1, 0, 0),
- (t.lineWidth = y),
- t.scale(1 / c, -1 / c),
- t.translate(-this.x, -this.y),
- (this.x += (u * (g.horizAdvX || i.horizAdvX)) / o),
- void 0 === f[p] || isNaN(f[p]) || (this.x += f[p]);
- }
- else {
- var v = this.x,
- d = this.y;
- 'stroke' === t.paintOrder
- ? (t.strokeStyle && t.strokeText(n, v, d), t.fillStyle && t.fillText(n, v, d))
- : (t.fillStyle && t.fillText(n, v, d), t.strokeStyle && t.strokeText(n, v, d));
- }
- }
- },
- {
- key: 'getAnchorDelta',
- value: function(t, e, r) {
- var n = this.getStyle('text-anchor').getString('start');
- if ('start' !== n) {
- for (
- var i = e.children, o = i.length, a = null, u = 0, s = r;
- s < o &&
- ((a = i[s]),
- !(
- (s > r && a.getAttribute('x').hasValue()) ||
- a.getAttribute('text-anchor').hasValue()
- ));
- s++
- )
- u += a.measureTextRecursive(t);
- return -1 * ('end' === n ? u : u / 2);
- }
- return 0;
- }
- },
- {
- key: 'adjustChildCoordinates',
- value: function(t, e, r, n) {
- var i = r.children[n];
- if ('function' != typeof i.measureText) return i;
- t.save(), i.setContext(t, !0);
- var o = i.getAttribute('x'),
- a = i.getAttribute('y'),
- u = i.getAttribute('dx'),
- s = i.getAttribute('dy'),
- c = i.getAttribute('text-anchor').getString('start');
- if (
- (0 === n &&
- 'textNode' !== i.type &&
- (o.hasValue() || o.setValue(e.getAttribute('x').getValue('0')),
- a.hasValue() || a.setValue(e.getAttribute('y').getValue('0')),
- u.hasValue() || u.setValue(e.getAttribute('dx').getValue('0')),
- s.hasValue() || s.setValue(e.getAttribute('dy').getValue('0'))),
- o.hasValue())
- ) {
- if (((i.x = o.getPixels('x') + e.getAnchorDelta(t, r, n)), 'start' !== c)) {
- var l = i.measureTextRecursive(t);
- i.x += -1 * ('end' === c ? l : l / 2);
- }
- u.hasValue() && (i.x += u.getPixels('x'));
- } else {
- if ('start' !== c) {
- var f = i.measureTextRecursive(t);
- e.x += -1 * ('end' === c ? f : f / 2);
- }
- u.hasValue() && (e.x += u.getPixels('x')), (i.x = e.x);
- }
- return (
- (e.x = i.x + i.measureText(t)),
- a.hasValue()
- ? ((i.y = a.getPixels('y')), s.hasValue() && (i.y += s.getPixels('y')))
- : (s.hasValue() && (e.y += s.getPixels('y')), (i.y = e.y)),
- (e.y = i.y),
- i.clearContext(t),
- t.restore(),
- i
- );
- }
- },
- {
- key: 'getChildBoundingBox',
- value: function(t, e, r, n) {
- var i = this.adjustChildCoordinates(t, e, r, n),
- o = i.getBoundingBox(t);
- return o
- ? (i.children.forEach(function(r, n) {
- var a = e.getChildBoundingBox(t, e, i, n);
- o.addBoundingBox(a);
- }),
- o)
- : null;
- }
- },
- {
- key: 'renderChild',
- value: function(t, e, r, n) {
- var i = this.adjustChildCoordinates(t, e, r, n);
- i.render(t),
- i.children.forEach(function(r, n) {
- e.renderChild(t, e, i, n);
- });
- }
- },
- {
- key: 'measureTextRecursive',
- value: function(t) {
- return this.children.reduce(function(e, r) {
- return e + r.measureTextRecursive(t);
- }, this.measureText(t));
- }
- },
- {
- key: 'measureText',
- value: function(t) {
- var e = this.measureCache;
- if (~e) return e;
- var r = this.getText(),
- n = this.measureTargetText(t, r);
- return (this.measureCache = n), n;
- }
- },
- {
- key: 'measureTargetText',
- value: function(t, e) {
- if (!e.length) return 0;
- var r = this.parent,
- n = r.getStyle('font-family').getDefinition();
- if (n) {
- for (
- var i = this.getFontSize(),
- o = n.isRTL
- ? e
- .split('')
- .reverse()
- .join('')
- : e,
- a = Ze(r.getAttribute('dx').getString()),
- u = o.length,
- s = 0,
- c = 0;
- c < u;
- c++
- ) {
- (s += ((this.getGlyph(n, o, c).horizAdvX || n.horizAdvX) * i) / n.fontFace.unitsPerEm),
- void 0 === a[c] || isNaN(a[c]) || (s += a[c]);
- }
- return s;
- }
- if (!t.measureText) return 10 * e.length;
- t.save(), this.setContext(t, !0);
- var l = t.measureText(e).width;
- return this.clearContext(t), t.restore(), l;
- }
- }
- ]),
- n
- );
- })(Bs);
- function $s() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var Gs = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if ($s()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n(t, e, i) {
- var o;
- return (
- Un(this, n),
- ((o = r.call(this, t, e, (this instanceof n ? this.constructor : void 0) === n || i)).type = 'tspan'),
- (o.text = o.children.length > 0 ? '' : o.getTextFromNode()),
- o
- );
- }
- return (
- Hn(n, [
- {
- key: 'getText',
- value: function() {
- return this.text;
- }
- }
- ]),
- n
- );
- })(_s);
- function qs() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var Us = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (qs()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n() {
- var t;
- return Un(this, n), ((t = r.apply(this, arguments)).type = 'textNode'), t;
- }
- return n;
- })(Gs);
- Dt(
- { target: 'Array', proto: !0 },
- {
- fill: function(t) {
- for (
- var e = It(this),
- r = lt(e.length),
- n = arguments.length,
- i = pt(n > 1 ? arguments[1] : void 0, r),
- o = n > 2 ? arguments[2] : void 0,
- a = void 0 === o ? r : pt(o, r);
- a > i;
- )
- e[i++] = t;
- return e;
- }
- }
- ),
- pu('fill');
- var Ws = (function() {
- function t(e) {
- Un(this, t),
- (this.control = null),
- (this.start = null),
- (this.current = null),
- (this.command = ''),
- (this.tokens = []),
- (this.i = -1),
- (this.previousCommand = ''),
- (this.points = []),
- (this.angles = []),
- (this.tokens = (function(t) {
- return Xe(
- t
- .replace(/,/gm, ' ')
- .replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm, '$1 $2')
- .replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm, '$1 $2')
- .replace(/([^\s])([MmZzLlHhVvCcSsQqTtAa])/gm, '$1 $2')
- .replace(/([0-9])([+\-])/gm, '$1 $2')
- .replace(/(\.[0-9]*)(\.)/gm, '$1 $2')
- .replace(/(\.[0-9]*)(\.)/gm, '$1 $2')
- .replace(/([Aa](?:\s+(?:[0-9]*\.)?[0-9]+){3})\s+([01])\s*([01])/gm, '$1 $2 $3 ')
- ).trim();
- })(e).split(' '));
- }
- return (
- Hn(t, [
- {
- key: 'reset',
- value: function() {
- (this.i = -1),
- (this.command = ''),
- (this.previousCommand = ''),
- (this.start = new za(0, 0)),
- (this.control = new za(0, 0)),
- (this.current = new za(0, 0)),
- (this.points = []),
- (this.angles = []);
- }
- },
- {
- key: 'isEnd',
- value: function() {
- return this.i >= this.tokens.length - 1;
- }
- },
- {
- key: 'isCommandOrEnd',
- value: function() {
- if (this.isEnd()) return !0;
- var t = this.i,
- e = this.tokens;
- return /^[A-Za-z]$/.test(e[t + 1]);
- }
- },
- {
- key: 'isRelativeCommand',
- value: function() {
- switch (this.command) {
- case 'm':
- case 'l':
- case 'h':
- case 'v':
- case 'c':
- case 's':
- case 'q':
- case 't':
- case 'a':
- case 'z':
- return !0;
- default:
- return !1;
- }
- }
- },
- {
- key: 'getToken',
- value: function() {
- return this.i++, this.tokens[this.i];
- }
- },
- {
- key: 'getScalar',
- value: function() {
- return parseFloat(this.getToken());
- }
- },
- {
- key: 'nextCommand',
- value: function() {
- (this.previousCommand = this.command), (this.command = this.getToken());
- }
- },
- {
- key: 'getPoint',
- value: function() {
- var t = new za(this.getScalar(), this.getScalar());
- return this.makeAbsolute(t);
- }
- },
- {
- key: 'getAsControlPoint',
- value: function() {
- var t = this.getPoint();
- return (this.control = t), t;
- }
- },
- {
- key: 'getAsCurrentPoint',
- value: function() {
- var t = this.getPoint();
- return (this.current = t), t;
- }
- },
- {
- key: 'getReflectedControlPoint',
- value: function() {
- var t = this.previousCommand.toLowerCase();
- if ('c' !== t && 's' !== t && 'q' !== t && 't' !== t) return this.current;
- var e = this.current,
- r = e.x,
- n = e.y,
- i = this.control,
- o = i.x,
- a = i.y;
- return new za(2 * r - o, 2 * n - a);
- }
- },
- {
- key: 'makeAbsolute',
- value: function(t) {
- if (this.isRelativeCommand()) {
- var e = this.current,
- r = e.x,
- n = e.y;
- (t.x += r), (t.y += n);
- }
- return t;
- }
- },
- {
- key: 'addMarker',
- value: function(t, e, r) {
- var n = this.points,
- i = this.angles;
- r && i.length > 0 && !i[i.length - 1] && (i[i.length - 1] = n[n.length - 1].angleTo(r)),
- this.addMarkerAngle(t, e ? e.angleTo(t) : null);
- }
- },
- {
- key: 'addMarkerAngle',
- value: function(t, e) {
- this.points.push(t), this.angles.push(e);
- }
- },
- {
- key: 'getMarkerPoints',
- value: function() {
- return this.points;
- }
- },
- {
- key: 'getMarkerAngles',
- value: function() {
- for (var t = this.angles, e = t.length, r = 0; r < e; r++)
- if (!t[r])
- for (var n = r + 1; n < e; n++)
- if (t[n]) {
- t[r] = t[n];
- break;
- }
- return t;
- }
- }
- ]),
- t
- );
- })();
- function Hs() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var Xs = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (Hs()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n(t, e, i) {
- var o;
- return (
- Un(this, n),
- ((o = r.call(this, t, e, i)).type = 'path'),
- (o.pathParser = null),
- (o.pathParser = new Ws(o.getAttribute('d').getString())),
- o
- );
- }
- return (
- Hn(n, [
- {
- key: 'path',
- value: function(t) {
- var e = this.pathParser,
- r = new js();
- for (e.reset(), t && t.beginPath(); !e.isEnd(); )
- switch ((e.nextCommand(), e.command)) {
- case 'M':
- case 'm':
- this.pathM(t, r);
- break;
- case 'L':
- case 'l':
- this.pathL(t, r);
- break;
- case 'H':
- case 'h':
- this.pathH(t, r);
- break;
- case 'V':
- case 'v':
- this.pathV(t, r);
- break;
- case 'C':
- case 'c':
- this.pathC(t, r);
- break;
- case 'S':
- case 's':
- this.pathS(t, r);
- break;
- case 'Q':
- case 'q':
- this.pathQ(t, r);
- break;
- case 'T':
- case 't':
- this.pathT(t, r);
- break;
- case 'A':
- case 'a':
- this.pathA(t, r);
- break;
- case 'Z':
- case 'z':
- this.pathZ(t, r);
- }
- return r;
- }
- },
- {
- key: 'getBoundingBox',
- value: function(t) {
- return this.path();
- }
- },
- {
- key: 'getMarkers',
- value: function() {
- var t = this.pathParser,
- e = t.getMarkerPoints(),
- r = t.getMarkerAngles();
- return e.map(function(t, e) {
- return [t, r[e]];
- });
- }
- },
- {
- key: 'renderChildren',
- value: function(t) {
- this.path(t), this.document.screen.mouse.checkPath(this, t);
- var e = this.getStyle('fill-rule');
- '' !== t.fillStyle && ('inherit' !== e.getString('inherit') ? t.fill(e.getString()) : t.fill()),
- '' !== t.strokeStyle && t.stroke();
- var r = this.getMarkers();
- if (r) {
- var n = r.length - 1,
- i = this.getStyle('marker-start'),
- o = this.getStyle('marker-mid'),
- a = this.getStyle('marker-end');
- if (i.isUrlDefinition()) {
- var u = i.getDefinition(),
- s = fr(r[0], 2),
- c = s[0],
- l = s[1];
- u.render(t, c, l);
- }
- if (o.isUrlDefinition())
- for (var f = o.getDefinition(), h = 1; h < n; h++) {
- var p = fr(r[h], 2),
- g = p[0],
- y = p[1];
- f.render(t, g, y);
- }
- if (a.isUrlDefinition()) {
- var v = a.getDefinition(),
- d = fr(r[n], 2),
- m = d[0],
- x = d[1];
- v.render(t, m, x);
- }
- }
- }
- },
- {
- key: 'pathM',
- value: function(t, e) {
- var r = this.pathParser,
- n = r.getAsCurrentPoint(),
- i = n.x,
- o = n.y;
- for (
- r.addMarker(n), e.addPoint(i, o), t && t.moveTo(i, o), r.start = r.current;
- !r.isCommandOrEnd();
- ) {
- var a = r.getAsCurrentPoint(),
- u = a.x,
- s = a.y;
- r.addMarker(a, r.start), e.addPoint(u, s), t && t.lineTo(u, s);
- }
- }
- },
- {
- key: 'pathL',
- value: function(t, e) {
- for (var r = this.pathParser; !r.isCommandOrEnd(); ) {
- var n = r.current,
- i = r.getAsCurrentPoint(),
- o = i.x,
- a = i.y;
- r.addMarker(i, n), e.addPoint(o, a), t && t.lineTo(o, a);
- }
- }
- },
- {
- key: 'pathH',
- value: function(t, e) {
- for (var r = this.pathParser; !r.isCommandOrEnd(); ) {
- var n = r.current,
- i = new za((r.isRelativeCommand() ? n.x : 0) + r.getScalar(), n.y);
- r.addMarker(i, n), (r.current = i), e.addPoint(i.x, i.y), t && t.lineTo(i.x, i.y);
- }
- }
- },
- {
- key: 'pathV',
- value: function(t, e) {
- for (var r = this.pathParser; !r.isCommandOrEnd(); ) {
- var n = r.current,
- i = new za(n.x, (r.isRelativeCommand() ? n.y : 0) + r.getScalar());
- r.addMarker(i, n), (r.current = i), e.addPoint(i.x, i.y), t && t.lineTo(i.x, i.y);
- }
- }
- },
- {
- key: 'pathC',
- value: function(t, e) {
- for (var r = this.pathParser; !r.isCommandOrEnd(); ) {
- var n = r.current,
- i = r.getPoint(),
- o = r.getAsControlPoint(),
- a = r.getAsCurrentPoint();
- r.addMarker(a, o, i),
- e.addBezierCurve(n.x, n.y, i.x, i.y, o.x, o.y, a.x, a.y),
- t && t.bezierCurveTo(i.x, i.y, o.x, o.y, a.x, a.y);
- }
- }
- },
- {
- key: 'pathS',
- value: function(t, e) {
- for (var r = this.pathParser; !r.isCommandOrEnd(); ) {
- var n = r.current,
- i = r.getReflectedControlPoint(),
- o = r.getAsControlPoint(),
- a = r.getAsCurrentPoint();
- r.addMarker(a, o, i),
- e.addBezierCurve(n.x, n.y, i.x, i.y, o.x, o.y, a.x, a.y),
- t && t.bezierCurveTo(i.x, i.y, o.x, o.y, a.x, a.y);
- }
- }
- },
- {
- key: 'pathQ',
- value: function(t, e) {
- for (var r = this.pathParser; !r.isCommandOrEnd(); ) {
- var n = r.current,
- i = r.getAsControlPoint(),
- o = r.getAsCurrentPoint();
- r.addMarker(o, i, i),
- e.addQuadraticCurve(n.x, n.y, i.x, i.y, o.x, o.y),
- t && t.quadraticCurveTo(i.x, i.y, o.x, o.y);
- }
- }
- },
- {
- key: 'pathT',
- value: function(t, e) {
- for (var r = this.pathParser; !r.isCommandOrEnd(); ) {
- var n = r.current,
- i = r.getReflectedControlPoint();
- r.control = i;
- var o = r.getAsCurrentPoint();
- r.addMarker(o, i, i),
- e.addQuadraticCurve(n.x, n.y, i.x, i.y, o.x, o.y),
- t && t.quadraticCurveTo(i.x, i.y, o.x, o.y);
- }
- }
- },
- {
- key: 'pathA',
- value: function(t, e) {
- for (var r = this.pathParser; !r.isCommandOrEnd(); ) {
- var n = r.current,
- i = r.getScalar(),
- o = r.getScalar(),
- a = r.getScalar() * (Math.PI / 180),
- u = r.getScalar(),
- s = r.getScalar(),
- c = r.getAsCurrentPoint(),
- l = new za(
- (Math.cos(a) * (n.x - c.x)) / 2 + (Math.sin(a) * (n.y - c.y)) / 2,
- (-Math.sin(a) * (n.x - c.x)) / 2 + (Math.cos(a) * (n.y - c.y)) / 2
- ),
- f = Math.pow(l.x, 2) / Math.pow(i, 2) + Math.pow(l.y, 2) / Math.pow(o, 2);
- f > 1 && ((i *= Math.sqrt(f)), (o *= Math.sqrt(f)));
- var h =
- (u === s ? -1 : 1) *
- Math.sqrt(
- (Math.pow(i, 2) * Math.pow(o, 2) -
- Math.pow(i, 2) * Math.pow(l.y, 2) -
- Math.pow(o, 2) * Math.pow(l.x, 2)) /
- (Math.pow(i, 2) * Math.pow(l.y, 2) + Math.pow(o, 2) * Math.pow(l.x, 2))
- );
- isNaN(h) && (h = 0);
- var p = new za((h * i * l.y) / o, (h * -o * l.x) / i),
- g = new za(
- (n.x + c.x) / 2 + Math.cos(a) * p.x - Math.sin(a) * p.y,
- (n.y + c.y) / 2 + Math.sin(a) * p.x + Math.cos(a) * p.y
- ),
- y = kr([1, 0], [(l.x - p.x) / i, (l.y - p.y) / o]),
- v = [(l.x - p.x) / i, (l.y - p.y) / o],
- d = [(-l.x - p.x) / i, (-l.y - p.y) / o],
- m = kr(v, d);
- Sr(v, d) <= -1 && (m = Math.PI), Sr(v, d) >= 1 && (m = 0);
- var x = 1 - s ? 1 : -1,
- b = y + x * (m / 2),
- w = new za(g.x + i * Math.cos(b), g.y + o * Math.sin(b));
- if (
- (r.addMarkerAngle(w, b - (x * Math.PI) / 2),
- r.addMarkerAngle(c, b - x * Math.PI),
- e.addPoint(c.x, c.y),
- t && !isNaN(y) && !isNaN(m))
- ) {
- var S = i > o ? i : o,
- k = i > o ? 1 : i / o,
- P = i > o ? o / i : 1;
- t.translate(g.x, g.y),
- t.rotate(a),
- t.scale(k, P),
- t.arc(0, 0, S, y, y + m, Boolean(1 - s)),
- t.scale(1 / k, 1 / P),
- t.rotate(-a),
- t.translate(-g.x, -g.y);
- }
- }
- }
- },
- {
- key: 'pathZ',
- value: function(t, e) {
- var r = this.pathParser;
- t && e.x1 !== e.x2 && e.y1 !== e.y2 && t.closePath(), (r.current = r.start);
- }
- }
- ]),
- n
- );
- })(Bs);
- function Ys() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var Qs = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (Ys()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n() {
- var t;
- return Un(this, n), ((t = r.apply(this, arguments)).type = 'svg'), (t.root = !1), t;
- }
- return (
- Hn(n, [
- {
- key: 'clearContext',
- value: function(t) {
- xs(uu(n.prototype), 'clearContext', this).call(this, t),
- this.document.screen.viewPort.removeCurrent();
- }
- },
- {
- key: 'setContext',
- value: function(t) {
- var e = this.document,
- r = e.screen,
- i = e.window,
- o = t.canvas;
- if ((r.setDefaults(t), o.style && void 0 !== t.font && i && void 0 !== i.getComputedStyle)) {
- t.font = i.getComputedStyle(o).getPropertyValue('font');
- var a = new La(e, 'fontSize', ks.parse(t.font).fontSize);
- a.hasValue() && ((e.rootEmSize = a.getPixels('y')), (e.emSize = e.rootEmSize));
- }
- xs(uu(n.prototype), 'setContext', this).call(this, t),
- this.getAttribute('x').hasValue() || this.getAttribute('x', !0).setValue(0),
- this.getAttribute('y').hasValue() || this.getAttribute('y', !0).setValue(0),
- t.translate(this.getAttribute('x').getPixels('x'), this.getAttribute('y').getPixels('y'));
- var u = r.viewPort,
- s = u.width,
- c = u.height;
- this.getStyle('width').hasValue() || this.getStyle('width', !0).setValue('100%'),
- this.getStyle('height').hasValue() || this.getStyle('height', !0).setValue('100%'),
- this.getStyle('color').hasValue() || this.getStyle('color', !0).setValue('black');
- var l = this.getAttribute('refX'),
- f = this.getAttribute('refY'),
- h = this.getAttribute('viewBox'),
- p = h.hasValue() ? Ze(h.getString()) : null,
- g = !this.root && 'visible' !== this.getAttribute('overflow').getValue('hidden'),
- y = 0,
- v = 0,
- d = 0,
- m = 0;
- p && ((y = p[0]), (v = p[1])),
- this.root ||
- ((s = this.getStyle('width').getPixels('x')),
- (c = this.getStyle('height').getPixels('y')),
- 'marker' === this.type && ((d = y), (m = v), (y = 0), (v = 0))),
- r.viewPort.setCurrent(s, c),
- p && ((s = p[2]), (c = p[3])),
- e.setViewBox({
- ctx: t,
- aspectRatio: this.getAttribute('preserveAspectRatio').getString(),
- width: r.viewPort.width,
- desiredWidth: s,
- height: r.viewPort.height,
- desiredHeight: c,
- minX: y,
- minY: v,
- refX: l.getValue(),
- refY: f.getValue(),
- clip: g,
- clipX: d,
- clipY: m
- }),
- p && (r.viewPort.removeCurrent(), r.viewPort.setCurrent(s, c));
- }
- },
- {
- key: 'resize',
- value: function(t) {
- var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : t,
- r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2],
- n = this.getAttribute('width', !0),
- i = this.getAttribute('height', !0),
- o = this.getAttribute('viewBox'),
- a = this.getAttribute('style'),
- u = n.getNumber(0),
- s = i.getNumber(0);
- if (r)
- if ('string' == typeof r) this.getAttribute('preserveAspectRatio', !0).setValue(r);
- else {
- var c = this.getAttribute('preserveAspectRatio');
- c.hasValue() && c.setValue(c.getString().replace(/^\s*(\S.*\S)\s*$/, '$1'));
- }
- if (
- (n.setValue(t),
- i.setValue(e),
- o.hasValue() || o.setValue('0 0 '.concat(u || t, ' ').concat(s || e)),
- a.hasValue())
- ) {
- var l = this.getStyle('width'),
- f = this.getStyle('height');
- l.hasValue() && l.setValue(''.concat(t, 'px')),
- f.hasValue() && f.setValue(''.concat(e, 'px'));
- }
- }
- }
- ]),
- n
- );
- })(Bs);
- function Zs() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var Ks = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (Zs()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n() {
- var t;
- return Un(this, n), ((t = r.apply(this, arguments)).type = 'rect'), t;
- }
- return (
- Hn(n, [
- {
- key: 'path',
- value: function(t) {
- var e = this.getAttribute('x').getPixels('x'),
- r = this.getAttribute('y').getPixels('y'),
- n = this.getStyle('width').getPixels('x'),
- i = this.getStyle('height').getPixels('y'),
- o = this.getAttribute('rx'),
- a = this.getAttribute('ry'),
- u = o.getPixels('x'),
- s = a.getPixels('y');
- if (
- (o.hasValue() && !a.hasValue() && (s = u),
- a.hasValue() && !o.hasValue() && (u = s),
- (u = Math.min(u, n / 2)),
- (s = Math.min(s, i / 2)),
- t)
- ) {
- var c = ((Math.sqrt(2) - 1) / 3) * 4;
- t.beginPath(),
- i > 0 &&
- n > 0 &&
- (t.moveTo(e + u, r),
- t.lineTo(e + n - u, r),
- t.bezierCurveTo(e + n - u + c * u, r, e + n, r + s - c * s, e + n, r + s),
- t.lineTo(e + n, r + i - s),
- t.bezierCurveTo(
- e + n,
- r + i - s + c * s,
- e + n - u + c * u,
- r + i,
- e + n - u,
- r + i
- ),
- t.lineTo(e + u, r + i),
- t.bezierCurveTo(e + u - c * u, r + i, e, r + i - s + c * s, e, r + i - s),
- t.lineTo(e, r + s),
- t.bezierCurveTo(e, r + s - c * s, e + u - c * u, r, e + u, r),
- t.closePath());
- }
- return new js(e, r, e + n, r + i);
- }
- },
- {
- key: 'getMarkers',
- value: function() {
- return null;
- }
- }
- ]),
- n
- );
- })(Xs);
- function Js() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var tc = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (Js()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n() {
- var t;
- return Un(this, n), ((t = r.apply(this, arguments)).type = 'circle'), t;
- }
- return (
- Hn(n, [
- {
- key: 'path',
- value: function(t) {
- var e = this.getAttribute('cx').getPixels('x'),
- r = this.getAttribute('cy').getPixels('y'),
- n = this.getAttribute('r').getPixels();
- return (
- t && n > 0 && (t.beginPath(), t.arc(e, r, n, 0, 2 * Math.PI, !1), t.closePath()),
- new js(e - n, r - n, e + n, r + n)
- );
- }
- },
- {
- key: 'getMarkers',
- value: function() {
- return null;
- }
- }
- ]),
- n
- );
- })(Xs);
- function ec() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var rc = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (ec()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n() {
- var t;
- return Un(this, n), ((t = r.apply(this, arguments)).type = 'ellipse'), t;
- }
- return (
- Hn(n, [
- {
- key: 'path',
- value: function(t) {
- var e = ((Math.sqrt(2) - 1) / 3) * 4,
- r = this.getAttribute('rx').getPixels('x'),
- n = this.getAttribute('ry').getPixels('y'),
- i = this.getAttribute('cx').getPixels('x'),
- o = this.getAttribute('cy').getPixels('y');
- return (
- t &&
- r > 0 &&
- n > 0 &&
- (t.beginPath(),
- t.moveTo(i + r, o),
- t.bezierCurveTo(i + r, o + e * n, i + e * r, o + n, i, o + n),
- t.bezierCurveTo(i - e * r, o + n, i - r, o + e * n, i - r, o),
- t.bezierCurveTo(i - r, o - e * n, i - e * r, o - n, i, o - n),
- t.bezierCurveTo(i + e * r, o - n, i + r, o - e * n, i + r, o),
- t.closePath()),
- new js(i - r, o - n, i + r, o + n)
- );
- }
- },
- {
- key: 'getMarkers',
- value: function() {
- return null;
- }
- }
- ]),
- n
- );
- })(Xs);
- function nc() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var ic = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (nc()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n() {
- var t;
- return Un(this, n), ((t = r.apply(this, arguments)).type = 'line'), t;
- }
- return (
- Hn(n, [
- {
- key: 'getPoints',
- value: function() {
- return [
- new za(this.getAttribute('x1').getPixels('x'), this.getAttribute('y1').getPixels('y')),
- new za(this.getAttribute('x2').getPixels('x'), this.getAttribute('y2').getPixels('y'))
- ];
- }
- },
- {
- key: 'path',
- value: function(t) {
- var e = this.getPoints(),
- r = fr(e, 2),
- n = r[0],
- i = n.x,
- o = n.y,
- a = r[1],
- u = a.x,
- s = a.y;
- return t && (t.beginPath(), t.moveTo(i, o), t.lineTo(u, s)), new js(i, o, u, s);
- }
- },
- {
- key: 'getMarkers',
- value: function() {
- var t = this.getPoints(),
- e = fr(t, 2),
- r = e[0],
- n = e[1],
- i = r.angleTo(n);
- return [
- [r, i],
- [n, i]
- ];
- }
- }
- ]),
- n
- );
- })(Xs);
- function oc() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var ac = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (oc()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n(t, e, i) {
- var o;
- return (
- Un(this, n),
- ((o = r.call(this, t, e, i)).type = 'polyline'),
- (o.points = []),
- (o.points = za.parsePath(o.getAttribute('points').getString())),
- o
- );
- }
- return (
- Hn(n, [
- {
- key: 'path',
- value: function(t) {
- var e = this.points,
- r = fr(e, 1)[0],
- n = r.x,
- i = r.y,
- o = new js(n, i);
- return (
- t && (t.beginPath(), t.moveTo(n, i)),
- e.forEach(function(e) {
- var r = e.x,
- n = e.y;
- o.addPoint(r, n), t && t.lineTo(r, n);
- }),
- o
- );
- }
- },
- {
- key: 'getMarkers',
- value: function() {
- var t = this.points,
- e = t.length - 1,
- r = [];
- return (
- t.forEach(function(n, i) {
- i !== e && r.push([n, n.angleTo(t[i + 1])]);
- }),
- r.length > 0 && r.push([t[t.length - 1], r[r.length - 1][1]]),
- r
- );
- }
- }
- ]),
- n
- );
- })(Xs);
- function uc() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var sc = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (uc()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n() {
- var t;
- return Un(this, n), ((t = r.apply(this, arguments)).type = 'polygon'), t;
- }
- return (
- Hn(n, [
- {
- key: 'path',
- value: function(t) {
- var e = xs(uu(n.prototype), 'path', this).call(this, t),
- r = fr(this.points, 1)[0],
- i = r.x,
- o = r.y;
- return t && (t.lineTo(i, o), t.closePath()), e;
- }
- }
- ]),
- n
- );
- })(ac),
- cc = A.f;
- function lc() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- Dt(
- { target: 'Reflect', stat: !0 },
- {
- deleteProperty: function(t, e) {
- var r = cc(E(t), e);
- return !(r && !r.configurable) && delete t[e];
- }
- }
- );
- var fc = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (lc()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n() {
- var t;
- return Un(this, n), ((t = r.apply(this, arguments)).type = 'pattern'), t;
- }
- return (
- Hn(n, [
- {
- key: 'createPattern',
- value: function(t, e, r) {
- var n = this.getStyle('width').getPixels('x', !0),
- i = this.getStyle('height').getPixels('y', !0),
- o = new Qs(this.document, null);
- (o.attributes.viewBox = new La(
- this.document,
- 'viewBox',
- this.getAttribute('viewBox').getValue()
- )),
- (o.attributes.width = new La(this.document, 'width', ''.concat(n, 'px'))),
- (o.attributes.height = new La(this.document, 'height', ''.concat(i, 'px'))),
- (o.attributes.transform = new La(
- this.document,
- 'transform',
- this.getAttribute('patternTransform').getValue()
- )),
- (o.children = this.children);
- var a = this.document.createCanvas(n, i),
- u = a.getContext('2d'),
- s = this.getAttribute('x'),
- c = this.getAttribute('y');
- s.hasValue() && c.hasValue() && u.translate(s.getPixels('x', !0), c.getPixels('y', !0)),
- r.hasValue()
- ? (this.styles['fill-opacity'] = r)
- : Reflect.deleteProperty(this.styles, 'fill-opacity');
- for (var l = -1; l <= 1; l++)
- for (var f = -1; f <= 1; f++)
- u.save(),
- (o.attributes.x = new La(this.document, 'x', l * a.width)),
- (o.attributes.y = new La(this.document, 'y', f * a.height)),
- o.render(u),
- u.restore();
- return t.createPattern(a, 'repeat');
- }
- }
- ]),
- n
- );
- })(ss);
- function hc() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var pc = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (hc()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n() {
- var t;
- return Un(this, n), ((t = r.apply(this, arguments)).type = 'marker'), t;
- }
- return (
- Hn(n, [
- {
- key: 'render',
- value: function(t, e, r) {
- if (e) {
- var n = e.x,
- i = e.y,
- o = this.getAttribute('orient').getValue('auto'),
- a = this.getAttribute('markerUnits').getValue('strokeWidth');
- t.translate(n, i),
- 'auto' === o && t.rotate(r),
- 'strokeWidth' === a && t.scale(t.lineWidth, t.lineWidth),
- t.save();
- var u = new Qs(this.document, null);
- (u.type = this.type),
- (u.attributes.viewBox = new La(
- this.document,
- 'viewBox',
- this.getAttribute('viewBox').getValue()
- )),
- (u.attributes.refX = new La(
- this.document,
- 'refX',
- this.getAttribute('refX').getValue()
- )),
- (u.attributes.refY = new La(
- this.document,
- 'refY',
- this.getAttribute('refY').getValue()
- )),
- (u.attributes.width = new La(
- this.document,
- 'width',
- this.getAttribute('markerWidth').getValue()
- )),
- (u.attributes.height = new La(
- this.document,
- 'height',
- this.getAttribute('markerHeight').getValue()
- )),
- (u.attributes.overflow = new La(
- this.document,
- 'overflow',
- this.getAttribute('overflow').getValue()
- )),
- (u.attributes.fill = new La(
- this.document,
- 'fill',
- this.getAttribute('fill').getColor('black')
- )),
- (u.attributes.stroke = new La(
- this.document,
- 'stroke',
- this.getAttribute('stroke').getValue('none')
- )),
- (u.children = this.children),
- u.render(t),
- t.restore(),
- 'strokeWidth' === a && t.scale(1 / t.lineWidth, 1 / t.lineWidth),
- 'auto' === o && t.rotate(-r),
- t.translate(-n, -i);
- }
- }
- }
- ]),
- n
- );
- })(ss);
- function gc() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var yc = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (gc()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n() {
- var t;
- return Un(this, n), ((t = r.apply(this, arguments)).type = 'defs'), t;
- }
- return Hn(n, [{ key: 'render', value: function() {} }]), n;
- })(ss);
- function vc() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var dc = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (vc()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n() {
- var t;
- return Un(this, n), ((t = r.apply(this, arguments)).type = 'g'), t;
- }
- return (
- Hn(n, [
- {
- key: 'getBoundingBox',
- value: function(t) {
- var e = new js();
- return (
- this.children.forEach(function(r) {
- e.addBoundingBox(r.getBoundingBox(t));
- }),
- e
- );
- }
- }
- ]),
- n
- );
- })(Bs);
- function mc() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var xc = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (mc()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n(t, e, i) {
- var o;
- Un(this, n), ((o = r.call(this, t, e, i)).attributesToInherit = ['gradientUnits']), (o.stops = []);
- var a = ou(o),
- u = a.stops;
- return (
- a.children.forEach(function(t) {
- 'stop' === t.type && u.push(t);
- }),
- o
- );
- }
- return (
- Hn(n, [
- {
- key: 'getGradientUnits',
- value: function() {
- return this.getAttribute('gradientUnits').getString('objectBoundingBox');
- }
- },
- {
- key: 'createGradient',
- value: function(t, e, r) {
- var n = this,
- i = this;
- this.getHrefAttribute().hasValue() &&
- ((i = this.getHrefAttribute().getDefinition()), this.inheritStopContainer(i));
- var o = i.stops,
- a = this.getGradient(t, e);
- if (!a) return this.addParentOpacity(r, o[o.length - 1].color);
- if (
- (o.forEach(function(t) {
- a.addColorStop(t.offset, n.addParentOpacity(r, t.color));
- }),
- this.getAttribute('gradientTransform').hasValue())
- ) {
- var u = this.document,
- s = u.screen,
- c = s.MAX_VIRTUAL_PIXELS,
- l = s.viewPort,
- f = fr(l.viewPorts, 1)[0],
- h = new Ks(u, null);
- (h.attributes.x = new La(u, 'x', -c / 3)),
- (h.attributes.y = new La(u, 'y', -c / 3)),
- (h.attributes.width = new La(u, 'width', c)),
- (h.attributes.height = new La(u, 'height', c));
- var p = new dc(u, null);
- (p.attributes.transform = new La(
- u,
- 'transform',
- this.getAttribute('gradientTransform').getValue()
- )),
- (p.children = [h]);
- var g = new Qs(u, null);
- (g.attributes.x = new La(u, 'x', 0)),
- (g.attributes.y = new La(u, 'y', 0)),
- (g.attributes.width = new La(u, 'width', f.width)),
- (g.attributes.height = new La(u, 'height', f.height)),
- (g.children = [p]);
- var y = u.createCanvas(f.width, f.height),
- v = y.getContext('2d');
- return (v.fillStyle = a), g.render(v), v.createPattern(y, 'no-repeat');
- }
- return a;
- }
- },
- {
- key: 'inheritStopContainer',
- value: function(t) {
- var e = this;
- this.attributesToInherit.forEach(function(r) {
- !e.getAttribute(r).hasValue() &&
- t.getAttribute(r).hasValue() &&
- e.getAttribute(r, !0).setValue(t.getAttribute(r).getValue());
- });
- }
- },
- {
- key: 'addParentOpacity',
- value: function(t, e) {
- return t.hasValue() ? new La(this.document, 'color', e).addOpacity(t).getColor() : e;
- }
- }
- ]),
- n
- );
- })(ss);
- function bc() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var wc = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (bc()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n(t, e, i) {
- var o;
- return (
- Un(this, n),
- ((o = r.call(this, t, e, i)).type = 'linearGradient'),
- o.attributesToInherit.push('x1', 'y1', 'x2', 'y2'),
- o
- );
- }
- return (
- Hn(n, [
- {
- key: 'getGradient',
- value: function(t, e) {
- var r = 'objectBoundingBox' === this.getGradientUnits(),
- n = r ? e.getBoundingBox(t) : null;
- if (r && !n) return null;
- this.getAttribute('x1').hasValue() ||
- this.getAttribute('y1').hasValue() ||
- this.getAttribute('x2').hasValue() ||
- this.getAttribute('y2').hasValue() ||
- (this.getAttribute('x1', !0).setValue(0),
- this.getAttribute('y1', !0).setValue(0),
- this.getAttribute('x2', !0).setValue(1),
- this.getAttribute('y2', !0).setValue(0));
- var i = r
- ? n.x + n.width * this.getAttribute('x1').getNumber()
- : this.getAttribute('x1').getPixels('x'),
- o = r
- ? n.y + n.height * this.getAttribute('y1').getNumber()
- : this.getAttribute('y1').getPixels('y'),
- a = r
- ? n.x + n.width * this.getAttribute('x2').getNumber()
- : this.getAttribute('x2').getPixels('x'),
- u = r
- ? n.y + n.height * this.getAttribute('y2').getNumber()
- : this.getAttribute('y2').getPixels('y');
- return i === a && o === u ? null : t.createLinearGradient(i, o, a, u);
- }
- }
- ]),
- n
- );
- })(xc);
- function Sc() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var kc = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (Sc()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n(t, e, i) {
- var o;
- return (
- Un(this, n),
- ((o = r.call(this, t, e, i)).type = 'radialGradient'),
- o.attributesToInherit.push('cx', 'cy', 'r', 'fx', 'fy', 'fr'),
- o
- );
- }
- return (
- Hn(n, [
- {
- key: 'getGradient',
- value: function(t, e) {
- var r = 'objectBoundingBox' === this.getGradientUnits(),
- n = e.getBoundingBox(t);
- if (r && !n) return null;
- this.getAttribute('cx').hasValue() || this.getAttribute('cx', !0).setValue('50%'),
- this.getAttribute('cy').hasValue() || this.getAttribute('cy', !0).setValue('50%'),
- this.getAttribute('r').hasValue() || this.getAttribute('r', !0).setValue('50%');
- var i = r
- ? n.x + n.width * this.getAttribute('cx').getNumber()
- : this.getAttribute('cx').getPixels('x'),
- o = r
- ? n.y + n.height * this.getAttribute('cy').getNumber()
- : this.getAttribute('cy').getPixels('y'),
- a = i,
- u = o;
- this.getAttribute('fx').hasValue() &&
- (a = r
- ? n.x + n.width * this.getAttribute('fx').getNumber()
- : this.getAttribute('fx').getPixels('x')),
- this.getAttribute('fy').hasValue() &&
- (u = r
- ? n.y + n.height * this.getAttribute('fy').getNumber()
- : this.getAttribute('fy').getPixels('y'));
- var s = r
- ? ((n.width + n.height) / 2) * this.getAttribute('r').getNumber()
- : this.getAttribute('r').getPixels(),
- c = this.getAttribute('fr').getPixels();
- return t.createRadialGradient(a, u, c, i, o, s);
- }
- }
- ]),
- n
- );
- })(xc);
- function Pc() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var Rc = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (Pc()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n(t, e, i) {
- var o;
- Un(this, n), ((o = r.call(this, t, e, i)).type = 'stop');
- var a = Math.max(0, Math.min(1, o.getAttribute('offset').getNumber())),
- u = o.getStyle('stop-opacity'),
- s = o.getStyle('stop-color', !0);
- return (
- '' === s.getString() && s.setValue('#000'),
- u.hasValue() && (s = s.addOpacity(u)),
- (o.offset = a),
- (o.color = s.getColor()),
- o
- );
- }
- return n;
- })(ss),
- Ac = et.set,
- Ec = et.getterFor('Array Iterator'),
- Cc = Lu(
- Array,
- 'Array',
- function(t, e) {
- Ac(this, { type: 'Array Iterator', target: v(t), index: 0, kind: e });
- },
- function() {
- var t = Ec(this),
- e = t.target,
- r = t.kind,
- n = t.index++;
- return !e || n >= e.length
- ? ((t.target = void 0), { value: void 0, done: !0 })
- : 'keys' == r
- ? { value: n, done: !1 }
- : 'values' == r
- ? { value: e[n], done: !1 }
- : { value: [n, e[n]], done: !1 };
- },
- 'values'
- );
- (vi.Arguments = vi.Array), pu('keys'), pu('values'), pu('entries');
- var Tc = $t('iterator'),
- Oc = $t('toStringTag'),
- Mc = Cc.values;
- for (var Dc in jn) {
- var Vc = i[Dc],
- Nc = Vc && Vc.prototype;
- if (Nc) {
- if (Nc[Tc] !== Mc)
- try {
- O(Nc, Tc, Mc);
- } catch (t) {
- Nc[Tc] = Mc;
- }
- if ((Nc[Oc] || O(Nc, Oc, Dc), jn[Dc]))
- for (var Ic in Cc)
- if (Nc[Ic] !== Cc[Ic])
- try {
- O(Nc, Ic, Cc[Ic]);
- } catch (t) {
- Nc[Ic] = Cc[Ic];
- }
- }
- }
- function Lc() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var jc = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (Lc()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n(t, e, i) {
- var o;
- return (
- Un(this, n),
- ((o = r.call(this, t, e, i)).type = 'animate'),
- (o.duration = 0),
- (o.initialValue = null),
- (o.initialUnits = ''),
- (o.removed = !1),
- (o.frozen = !1),
- t.screen.animations.push(ou(o)),
- (o.begin = o.getAttribute('begin').getMilliseconds()),
- (o.maxDuration = o.begin + o.getAttribute('dur').getMilliseconds()),
- (o.from = o.getAttribute('from')),
- (o.to = o.getAttribute('to')),
- (o.values = o.getAttribute('values')),
- o.values.hasValue() && o.values.setValue(o.values.getString().split(';')),
- o
- );
- }
- return (
- Hn(n, [
- {
- key: 'getProperty',
- value: function() {
- var t = this.getAttribute('attributeType').getString(),
- e = this.getAttribute('attributeName').getString();
- return 'CSS' === t ? this.parent.getStyle(e, !0) : this.parent.getAttribute(e, !0);
- }
- },
- {
- key: 'calcValue',
- value: function() {
- var t = this.initialUnits,
- e = this.getProgress(),
- r = e.progress,
- n = e.from,
- i = e.to,
- o = n.getNumber() + (i.getNumber() - n.getNumber()) * r;
- return '%' === t && (o *= 100), ''.concat(o).concat(t);
- }
- },
- {
- key: 'update',
- value: function(t) {
- var e = this.parent,
- r = this.getProperty();
- if (
- (this.initialValue ||
- ((this.initialValue = r.getString()), (this.initialUnits = r.getUnits())),
- this.duration > this.maxDuration)
- ) {
- var n = this.getAttribute('fill').getString('remove');
- if (
- 'indefinite' === this.getAttribute('repeatCount').getString() ||
- 'indefinite' === this.getAttribute('repeatDur').getString()
- )
- this.duration = 0;
- else if ('freeze' !== n || this.frozen) {
- if ('remove' === n && !this.removed)
- return (
- (this.removed = !0),
- r.setValue(e.animationFrozen ? e.animationFrozenValue : this.initialValue),
- !0
- );
- } else
- (this.frozen = !0), (e.animationFrozen = !0), (e.animationFrozenValue = r.getString());
- return !1;
- }
- this.duration += t;
- var i = !1;
- if (this.begin < this.duration) {
- var o = this.calcValue(),
- a = this.getAttribute('type');
- if (a.hasValue()) {
- var u = a.getString();
- o = ''.concat(u, '(').concat(o, ')');
- }
- r.setValue(o), (i = !0);
- }
- return i;
- }
- },
- {
- key: 'getProgress',
- value: function() {
- var t = this.document,
- e = this.values,
- r = { progress: (this.duration - this.begin) / (this.maxDuration - this.begin) };
- if (e.hasValue()) {
- var n = r.progress * (e.getValue().length - 1),
- i = Math.floor(n),
- o = Math.ceil(n);
- (r.from = new La(t, 'from', parseFloat(e.getValue()[i]))),
- (r.to = new La(t, 'to', parseFloat(e.getValue()[o]))),
- (r.progress = (n - i) / (o - i));
- } else (r.from = this.from), (r.to = this.to);
- return r;
- }
- }
- ]),
- n
- );
- })(ss);
- function zc() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var Bc = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (zc()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n() {
- var t;
- return Un(this, n), ((t = r.apply(this, arguments)).type = 'animateColor'), t;
- }
- return (
- Hn(n, [
- {
- key: 'calcValue',
- value: function() {
- var t = this.getProgress(),
- e = t.progress,
- r = t.from,
- n = t.to,
- i = new Ia(r.getColor()),
- o = new Ia(n.getColor());
- if (i.ok && o.ok) {
- var a = i.r + (o.r - i.r) * e,
- u = i.g + (o.g - i.g) * e,
- s = i.b + (o.b - i.b) * e;
- return 'rgb('
- .concat(parseInt(a, 10), ', ')
- .concat(parseInt(u, 10), ', ')
- .concat(parseInt(s, 10), ')');
- }
- return this.getAttribute('from').getColor();
- }
- }
- ]),
- n
- );
- })(jc);
- function Fc() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var _c = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (Fc()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n() {
- var t;
- return Un(this, n), ((t = r.apply(this, arguments)).type = 'animateTransform'), t;
- }
- return (
- Hn(n, [
- {
- key: 'calcValue',
- value: function() {
- var t = this.getProgress(),
- e = t.progress,
- r = t.from,
- n = t.to,
- i = Ze(r.getString()),
- o = Ze(n.getString());
- return i
- .map(function(t, r) {
- return t + (o[r] - t) * e;
- })
- .join(' ');
- }
- }
- ]),
- n
- );
- })(jc),
- $c = T.f,
- Gc = i.Symbol;
- if (a && 'function' == typeof Gc && (!('description' in Gc.prototype) || void 0 !== Gc().description)) {
- var qc = {},
- Uc = function() {
- var t = arguments.length < 1 || void 0 === arguments[0] ? void 0 : String(arguments[0]),
- e = this instanceof Uc ? new Gc(t) : void 0 === t ? Gc() : Gc(t);
- return '' === t && (qc[e] = !0), e;
- };
- kt(Uc, Gc);
- var Wc = (Uc.prototype = Gc.prototype);
- Wc.constructor = Uc;
- var Hc = Wc.toString,
- Xc = 'Symbol(test)' == String(Gc('test')),
- Yc = /^Symbol\((.*)\)[^)]+$/;
- $c(Wc, 'description', {
- configurable: !0,
- get: function() {
- var t = d(this) ? this.valueOf() : this,
- e = Hc.call(t);
- if (b(qc, t)) return '';
- var r = Xc ? e.slice(7, -1) : e.replace(Yc, '$1');
- return '' === r ? void 0 : r;
- }
- }),
- Dt({ global: !0, forced: !0 }, { Symbol: Uc });
- }
- Wr('iterator');
- var Qc = te('slice'),
- Zc = ie('slice', { ACCESSORS: !0, 0: 0, 1: 2 }),
- Kc = $t('species'),
- Jc = [].slice,
- tl = Math.max;
- function el(t) {
- if ('undefined' == typeof Symbol || null == t[Symbol.iterator]) {
- if (
- Array.isArray(t) ||
- (t = (function(t, e) {
- if (!t) return;
- if ('string' == typeof t) return rl(t, e);
- var r = Object.prototype.toString.call(t).slice(8, -1);
- 'Object' === r && t.constructor && (r = t.constructor.name);
- if ('Map' === r || 'Set' === r) return Array.from(r);
- if ('Arguments' === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return rl(t, e);
- })(t))
- ) {
- var e = 0,
- r = function() {};
- return {
- s: r,
- n: function() {
- return e >= t.length ? { done: !0 } : { done: !1, value: t[e++] };
- },
- e: function(t) {
- throw t;
- },
- f: r
- };
- }
- throw new TypeError(
- 'Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.'
- );
- }
- var n,
- i,
- o = !0,
- a = !1;
- return {
- s: function() {
- n = t[Symbol.iterator]();
- },
- n: function() {
- var t = n.next();
- return (o = t.done), t;
- },
- e: function(t) {
- (a = !0), (i = t);
- },
- f: function() {
- try {
- o || null == n.return || n.return();
- } finally {
- if (a) throw i;
- }
- }
- };
- }
- function rl(t, e) {
- (null == e || e > t.length) && (e = t.length);
- for (var r = 0, n = new Array(e); r < e; r++) n[r] = t[r];
- return n;
- }
- function nl() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- Dt(
- { target: 'Array', proto: !0, forced: !Qc || !Zc },
- {
- slice: function(t, e) {
- var r,
- n,
- i,
- o = v(this),
- a = lt(o.length),
- u = pt(t, a),
- s = pt(void 0 === e ? a : e, a);
- if (
- Lt(o) &&
- ('function' != typeof (r = o.constructor) || (r !== Array && !Lt(r.prototype))
- ? d(r) && null === (r = r[Kc]) && (r = void 0)
- : (r = void 0),
- r === Array || void 0 === r)
- )
- return Jc.call(o, u, s);
- for (n = new (void 0 === r ? Array : r)(tl(s - u, 0)), i = 0; u < s; u++, i++) u in o && In(n, i, o[u]);
- return (n.length = i), n;
- }
- }
- );
- var il = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (nl()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n(t, e, i) {
- var o;
- Un(this, n),
- ((o = r.call(this, t, e, i)).type = 'font'),
- (o.glyphs = {}),
- (o.horizAdvX = o.getAttribute('horiz-adv-x').getNumber());
- var a,
- u = t.definitions,
- s = el(ou(o).children);
- try {
- for (s.s(); !(a = s.n()).done; ) {
- var c = a.value;
- switch (c.type) {
- case 'font-face':
- o.fontFace = c;
- var l = c.getStyle('font-family');
- l.hasValue() && (u[l.getString()] = ou(o));
- break;
- case 'missing-glyph':
- o.missingGlyph = c;
- break;
- case 'glyph':
- var f = c;
- f.arabicForm
- ? ((o.isRTL = !0),
- (o.isArabic = !0),
- void 0 === o.glyphs[f.unicode] && (o.glyphs[f.unicode] = {}),
- (o.glyphs[f.unicode][f.arabicForm] = f))
- : (o.glyphs[f.unicode] = f);
- }
- }
- } catch (t) {
- s.e(t);
- } finally {
- s.f();
- }
- return o;
- }
- return Hn(n, [{ key: 'render', value: function() {} }]), n;
- })(ss);
- function ol() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var al = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (ol()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n(t, e, i) {
- var o;
- return (
- Un(this, n),
- ((o = r.call(this, t, e, i)).type = 'font-face'),
- (o.ascent = o.getAttribute('ascent').getNumber()),
- (o.descent = o.getAttribute('descent').getNumber()),
- (o.unitsPerEm = o.getAttribute('units-per-em').getNumber()),
- o
- );
- }
- return n;
- })(ss);
- function ul() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var sl = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (ul()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n() {
- var t;
- return Un(this, n), ((t = r.apply(this, arguments)).type = 'missing-glyph'), (t.horizAdvX = 0), t;
- }
- return n;
- })(Xs);
- function cl() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var ll = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (cl()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n(t, e, i) {
- var o;
- return (
- Un(this, n),
- ((o = r.call(this, t, e, i)).type = 'glyph'),
- (o.horizAdvX = o.getAttribute('horiz-adv-x').getNumber()),
- (o.unicode = o.getAttribute('unicode').getString()),
- (o.arabicForm = o.getAttribute('arabic-form').getString()),
- o
- );
- }
- return n;
- })(Xs);
- function fl() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var hl = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (fl()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n() {
- var t;
- return Un(this, n), ((t = r.apply(this, arguments)).type = 'tref'), t;
- }
- return (
- Hn(n, [
- {
- key: 'getText',
- value: function() {
- var t = this.getHrefAttribute().getDefinition();
- if (t) {
- var e = t.children[0];
- if (e) return e.getText();
- }
- return '';
- }
- }
- ]),
- n
- );
- })(_s);
- function pl() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var gl = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (pl()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n(t, e, i) {
- var o;
- Un(this, n), ((o = r.call(this, t, e, i)).type = 'a');
- var a = e.childNodes,
- u = a[0],
- s =
- a.length > 0 &&
- Array.from(a).every(function(t) {
- return 3 === t.nodeType;
- });
- return (o.hasText = s), (o.text = s ? o.getTextFromNode(u) : ''), o;
- }
- return (
- Hn(n, [
- {
- key: 'getText',
- value: function() {
- return this.text;
- }
- },
- {
- key: 'renderChildren',
- value: function(t) {
- if (this.hasText) {
- xs(uu(n.prototype), 'renderChildren', this).call(this, t);
- var e = this.document,
- r = this.x,
- i = this.y,
- o = e.screen.mouse,
- a = new La(e, 'fontSize', ks.parse(e.ctx.font).fontSize);
- o.isWorking() &&
- o.checkBoundingBox(
- this,
- new js(r, i - a.getPixels('y'), r + this.measureText(t), i)
- );
- } else if (this.children.length > 0) {
- var u = new dc(this.document, null);
- (u.children = this.children), (u.parent = this), u.render(t);
- }
- }
- },
- {
- key: 'onClick',
- value: function() {
- var t = this.document.window;
- t && t.open(this.getHrefAttribute().getString());
- }
- },
- {
- key: 'onMouseMove',
- value: function() {
- this.document.ctx.canvas.style.cursor = 'pointer';
- }
- }
- ]),
- n
- );
- })(_s),
- yl = !o(function() {
- return Object.isExtensible(Object.preventExtensions({}));
- }),
- vl = r(function(t) {
- var e = T.f,
- r = G('meta'),
- n = 0,
- i =
- Object.isExtensible ||
- function() {
- return !0;
- },
- o = function(t) {
- e(t, r, { value: { objectID: 'O' + ++n, weakData: {} } });
- },
- a = (t.exports = {
- REQUIRED: !1,
- fastKey: function(t, e) {
- if (!d(t)) return 'symbol' == typeof t ? t : ('string' == typeof t ? 'S' : 'P') + t;
- if (!b(t, r)) {
- if (!i(t)) return 'F';
- if (!e) return 'E';
- o(t);
- }
- return t[r].objectID;
- },
- getWeakData: function(t, e) {
- if (!b(t, r)) {
- if (!i(t)) return !0;
- if (!e) return !1;
- o(t);
- }
- return t[r].weakData;
- },
- onFreeze: function(t) {
- return yl && a.REQUIRED && i(t) && !b(t, r) && o(t), t;
- }
- });
- W[r] = !0;
- }),
- dl = (vl.REQUIRED, vl.fastKey, vl.getWeakData, vl.onFreeze, T.f),
- ml = vl.fastKey,
- xl = et.set,
- bl = et.getterFor;
- !(function(t, e, r) {
- var n = -1 !== t.indexOf('Map'),
- a = -1 !== t.indexOf('Weak'),
- u = n ? 'set' : 'add',
- s = i[t],
- c = s && s.prototype,
- l = s,
- f = {},
- h = function(t) {
- var e = c[t];
- rt(
- c,
- t,
- 'add' == t
- ? function(t) {
- return e.call(this, 0 === t ? 0 : t), this;
- }
- : 'delete' == t
- ? function(t) {
- return !(a && !d(t)) && e.call(this, 0 === t ? 0 : t);
- }
- : 'get' == t
- ? function(t) {
- return a && !d(t) ? void 0 : e.call(this, 0 === t ? 0 : t);
- }
- : 'has' == t
- ? function(t) {
- return !(a && !d(t)) && e.call(this, 0 === t ? 0 : t);
- }
- : function(t, r) {
- return e.call(this, 0 === t ? 0 : t, r), this;
- }
- );
- };
- if (
- Ot(
- t,
- 'function' != typeof s ||
- !(
- a ||
- (c.forEach &&
- !o(function() {
- new s().entries().next();
- }))
- )
- )
- )
- (l = r.getConstructor(e, t, n, u)), (vl.REQUIRED = !0);
- else if (Ot(t, !0)) {
- var p = new l(),
- g = p[u](a ? {} : -0, 1) != p,
- y = o(function() {
- p.has(1);
- }),
- v = Mi(function(t) {
- new s(t);
- }),
- m =
- !a &&
- o(function() {
- for (var t = new s(), e = 5; e--; ) t[u](e, e);
- return !t.has(-0);
- });
- v ||
- (((l = e(function(e, r) {
- yi(e, l, t);
- var i = Ps(new s(), e, l);
- return null != r && ki(r, i[u], i, n), i;
- })).prototype = c),
- (c.constructor = l)),
- (y || m) && (h('delete'), h('has'), n && h('get')),
- (m || g) && h(u),
- a && c.clear && delete c.clear;
- }
- (f[t] = l), Dt({ global: !0, forced: l != s }, f), Yr(l, t), a || r.setStrong(l, t, n);
- })(
- 'Map',
- function(t) {
- return function() {
- return t(this, arguments.length ? arguments[0] : void 0);
- };
- },
- {
- getConstructor: function(t, e, r, n) {
- var i = t(function(t, o) {
- yi(t, i, e),
- xl(t, { type: e, index: Br(null), first: void 0, last: void 0, size: 0 }),
- a || (t.size = 0),
- null != o && ki(o, t[n], t, r);
- }),
- o = bl(e),
- u = function(t, e, r) {
- var n,
- i,
- u = o(t),
- c = s(t, e);
- return (
- c
- ? (c.value = r)
- : ((u.last = c = {
- index: (i = ml(e, !0)),
- key: e,
- value: r,
- previous: (n = u.last),
- next: void 0,
- removed: !1
- }),
- u.first || (u.first = c),
- n && (n.next = c),
- a ? u.size++ : t.size++,
- 'F' !== i && (u.index[i] = c)),
- t
- );
- },
- s = function(t, e) {
- var r,
- n = o(t),
- i = ml(e);
- if ('F' !== i) return n.index[i];
- for (r = n.first; r; r = r.next) if (r.key == e) return r;
- };
- return (
- hi(i.prototype, {
- clear: function() {
- for (var t = o(this), e = t.index, r = t.first; r; )
- (r.removed = !0),
- r.previous && (r.previous = r.previous.next = void 0),
- delete e[r.index],
- (r = r.next);
- (t.first = t.last = void 0), a ? (t.size = 0) : (this.size = 0);
- },
- delete: function(t) {
- var e = o(this),
- r = s(this, t);
- if (r) {
- var n = r.next,
- i = r.previous;
- delete e.index[r.index],
- (r.removed = !0),
- i && (i.next = n),
- n && (n.previous = i),
- e.first == r && (e.first = n),
- e.last == r && (e.last = i),
- a ? e.size-- : this.size--;
- }
- return !!r;
- },
- forEach: function(t) {
- for (
- var e, r = o(this), n = Nt(t, arguments.length > 1 ? arguments[1] : void 0, 3);
- (e = e ? e.next : r.first);
- )
- for (n(e.value, e.key, this); e && e.removed; ) e = e.previous;
- },
- has: function(t) {
- return !!s(this, t);
- }
- }),
- hi(
- i.prototype,
- r
- ? {
- get: function(t) {
- var e = s(this, t);
- return e && e.value;
- },
- set: function(t, e) {
- return u(this, 0 === t ? 0 : t, e);
- }
- }
- : {
- add: function(t) {
- return u(this, (t = 0 === t ? 0 : t), t);
- }
- }
- ),
- a &&
- dl(i.prototype, 'size', {
- get: function() {
- return o(this).size;
- }
- }),
- i
- );
- },
- setStrong: function(t, e, r) {
- var n = e + ' Iterator',
- i = bl(e),
- o = bl(n);
- Lu(
- t,
- e,
- function(t, e) {
- xl(this, { type: n, target: t, state: i(t), kind: e, last: void 0 });
- },
- function() {
- for (var t = o(this), e = t.kind, r = t.last; r && r.removed; ) r = r.previous;
- return t.target && (t.last = r = r ? r.next : t.state.first)
- ? 'keys' == e
- ? { value: r.key, done: !1 }
- : 'values' == e
- ? { value: r.value, done: !1 }
- : { value: [r.key, r.value], done: !1 }
- : ((t.target = void 0), { value: void 0, done: !0 });
- },
- r ? 'entries' : 'values',
- !r,
- !0
- ),
- gi(e);
- }
- }
- );
- function wl(t) {
- if ('undefined' == typeof Symbol || null == t[Symbol.iterator]) {
- if (
- Array.isArray(t) ||
- (t = (function(t, e) {
- if (!t) return;
- if ('string' == typeof t) return Sl(t, e);
- var r = Object.prototype.toString.call(t).slice(8, -1);
- 'Object' === r && t.constructor && (r = t.constructor.name);
- if ('Map' === r || 'Set' === r) return Array.from(r);
- if ('Arguments' === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return Sl(t, e);
- })(t))
- ) {
- var e = 0,
- r = function() {};
- return {
- s: r,
- n: function() {
- return e >= t.length ? { done: !0 } : { done: !1, value: t[e++] };
- },
- e: function(t) {
- throw t;
- },
- f: r
- };
- }
- throw new TypeError(
- 'Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.'
- );
- }
- var n,
- i,
- o = !0,
- a = !1;
- return {
- s: function() {
- n = t[Symbol.iterator]();
- },
- n: function() {
- var t = n.next();
- return (o = t.done), t;
- },
- e: function(t) {
- (a = !0), (i = t);
- },
- f: function() {
- try {
- o || null == n.return || n.return();
- } finally {
- if (a) throw i;
- }
- }
- };
- }
- function Sl(t, e) {
- (null == e || e > t.length) && (e = t.length);
- for (var r = 0, n = new Array(e); r < e; r++) n[r] = t[r];
- return n;
- }
- function kl() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var Pl = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (kl()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n(t, e, i) {
- var o;
- Un(this, n),
- ((o = r.call(this, t, e, i)).type = 'textPath'),
- (o.textWidth = 0),
- (o.textHeight = 0),
- (o.pathLength = -1),
- (o.glyphInfo = null),
- (o.letterSpacingCache = []),
- (o.measuresCache = new Map([['', 0]]));
- var a = o.getHrefAttribute().getDefinition();
- return (o.text = o.getTextFromNode()), (o.dataArray = o.parsePathData(a)), o;
- }
- return (
- Hn(n, [
- {
- key: 'getText',
- value: function() {
- return this.text;
- }
- },
- {
- key: 'path',
- value: function(t) {
- var e = this.dataArray;
- t && t.beginPath(),
- e.forEach(function(e) {
- var r = e.command,
- n = e.points;
- switch (r) {
- case 'L':
- t && t.lineTo(n[0], n[1]);
- break;
- case 'M':
- t && t.moveTo(n[0], n[1]);
- break;
- case 'C':
- t && t.bezierCurveTo(n[0], n[1], n[2], n[3], n[4], n[5]);
- break;
- case 'Q':
- t && t.quadraticCurveTo(n[0], n[1], n[2], n[3]);
- break;
- case 'A':
- var i = n[0],
- o = n[1],
- a = n[2],
- u = n[3],
- s = n[4],
- c = n[5],
- l = n[6],
- f = n[7],
- h = a > u ? a : u,
- p = a > u ? 1 : a / u,
- g = a > u ? u / a : 1;
- t &&
- (t.translate(i, o),
- t.rotate(l),
- t.scale(p, g),
- t.arc(0, 0, h, s, s + c, Boolean(1 - f)),
- t.scale(1 / p, 1 / g),
- t.rotate(-l),
- t.translate(-i, -o));
- break;
- case 'z':
- t && t.closePath();
- }
- });
- }
- },
- {
- key: 'renderChildren',
- value: function(t) {
- this.setTextData(t), t.save();
- var e = this.parent.getStyle('text-decoration').getString(),
- r = this.getFontSize(),
- n = this.glyphInfo,
- i = t.fillStyle;
- 'underline' === e && t.beginPath(),
- n.forEach(function(i, o) {
- var a = i.p0,
- u = i.p1,
- s = i.text;
- t.save(),
- t.translate(a.x, a.y),
- t.rotate(n[o].rotation),
- t.fillStyle && t.fillText(s, 0, 0),
- t.strokeStyle && t.strokeText(s, 0, 0),
- t.restore(),
- 'underline' === e &&
- (0 === o && t.moveTo(a.x, a.y + r / 8), t.lineTo(u.x, u.y + r / 5));
- }),
- 'underline' === e &&
- ((t.lineWidth = r / 20), (t.strokeStyle = i), t.stroke(), t.closePath()),
- t.restore();
- }
- },
- {
- key: 'getLetterSpacingAt',
- value: function() {
- var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0;
- return this.letterSpacingCache[t] || 0;
- }
- },
- {
- key: 'findSegmentToFitChar',
- value: function(t, e, r, n, i, o, a, u) {
- var s = o,
- c = this.measureText(t, a);
- ' ' === a && 'justify' === e && r < n && (c += (n - r) / i),
- u > -1 && (s += this.getLetterSpacingAt(u));
- var l = this.textHeight / 20,
- f = {
- p0: this.getEquidistantPointOnPath(s, l),
- p1: this.getEquidistantPointOnPath(s + c, l)
- };
- return { offset: (s += c), segment: f };
- }
- },
- {
- key: 'measureText',
- value: function(t, e) {
- var r = this.measuresCache,
- n = e || this.getText();
- if (r.has(n)) return r.get(n);
- var i = this.measureTargetText(t, n);
- return r.set(n, i), i;
- }
- },
- {
- key: 'setTextData',
- value: function(t) {
- var e = this;
- if (!this.glyphInfo) {
- var r = this.getText(),
- n = r.split(''),
- i = r.split(' ').length - 1,
- o = Ze(this.parent.getAttribute('dx').getString('0')),
- a = this.parent.getStyle('text-anchor').getString('start'),
- u = this.getStyle('letter-spacing'),
- s = this.parent.getStyle('letter-spacing'),
- c = 0;
- u.hasValue() && 'inherit' !== u.getValue()
- ? u.hasValue() &&
- 'initial' !== u.getValue() &&
- 'unset' !== u.getValue() &&
- (c = u.getPixels())
- : (c = s.getPixels());
- var l = [],
- f = r.length;
- this.letterSpacingCache = l;
- for (var h = 0; h < f; h++) l.push(void 0 !== o[h] ? o[h] : c);
- var p = l.reduce(function(t, e) {
- return t + e || 0;
- }, 0);
- (this.textWidth = this.measureText(t)), (this.textHeight = this.getFontSize());
- var g = Math.max(this.textWidth + p, 0);
- this.glyphInfo = [];
- var y = this.getPathLength(),
- v = this.getStyle('startOffset').getNumber(0) * y,
- d = 0;
- ('middle' !== a && 'center' !== a) || (d = -g / 2),
- ('end' !== a && 'right' !== a) || (d = -g),
- (d += v),
- n.forEach(function(r, o) {
- var u = e.findSegmentToFitChar(t, a, g, y, i, d, r, o),
- s = u.offset,
- c = u.segment;
- if (((d = s), c.p0 && c.p1)) {
- var l = e.getLineLength(c.p0.x, c.p0.y, c.p1.x, c.p1.y),
- f = e.getPointOnLine(0 + l / 2, c.p0.x, c.p0.y, c.p1.x, c.p1.y),
- h = Math.atan2(c.p1.y - c.p0.y, c.p1.x - c.p0.x);
- e.glyphInfo.push({
- transposeX: f.x,
- transposeY: f.y,
- text: n[o],
- p0: c.p0,
- p1: c.p1,
- rotation: h
- });
- }
- });
- }
- }
- },
- {
- key: 'parsePathData',
- value: function(t) {
- if (((this.pathLength = -1), !t)) return [];
- var e = [],
- r = t.pathParser;
- for (r.reset(); !r.isEnd(); ) {
- var n = r.current,
- i = n ? n.x : 0,
- o = n ? n.y : 0,
- a = '',
- u = [];
- r.nextCommand();
- var s = r.command.toUpperCase();
- switch (r.command) {
- case 'M':
- case 'm':
- a = this.pathM(r, u);
- break;
- case 'L':
- case 'l':
- a = this.pathL(r, u);
- break;
- case 'H':
- case 'h':
- a = this.pathH(r, u);
- break;
- case 'V':
- case 'v':
- a = this.pathV(r, u);
- break;
- case 'C':
- case 'c':
- this.pathC(r, u);
- break;
- case 'S':
- case 's':
- a = this.pathS(r, u);
- break;
- case 'Q':
- case 'q':
- this.pathQ(r, u);
- break;
- case 'T':
- case 't':
- a = this.pathT(r, u);
- break;
- case 'A':
- case 'a':
- u = this.pathA(r);
- break;
- case 'Z':
- case 'z':
- r.current = r.start;
- }
- 'Z' !== s
- ? e.push({
- command: a || s,
- points: u,
- start: { x: i, y: o },
- pathLength: this.calcLength(i, o, a || s, u)
- })
- : e.push({ command: 'z', points: [], pathLength: 0 });
- }
- return e;
- }
- },
- {
- key: 'pathM',
- value: function(t, e) {
- var r = t.getAsCurrentPoint();
- for (e.push(r.x, r.y), t.start = t.current; !t.isCommandOrEnd(); ) {
- var n = t.getAsCurrentPoint();
- return e.push(n.x, n.y), 'L';
- }
- }
- },
- {
- key: 'pathL',
- value: function(t, e) {
- for (; !t.isCommandOrEnd(); ) {
- var r = t.getAsCurrentPoint();
- e.push(r.x, r.y);
- }
- return 'L';
- }
- },
- {
- key: 'pathH',
- value: function(t, e) {
- for (; !t.isCommandOrEnd(); ) {
- var r = t.current,
- n = new za((t.isRelativeCommand() ? r.x : 0) + t.getScalar(), r.y);
- e.push(n.x, n.y), (t.current = n);
- }
- return 'L';
- }
- },
- {
- key: 'pathV',
- value: function(t, e) {
- for (; !t.isCommandOrEnd(); ) {
- var r = t.current,
- n = new za(r.x, (t.isRelativeCommand() ? r.y : 0) + t.getScalar());
- e.push(n.x, n.y), (t.current = n);
- }
- return 'L';
- }
- },
- {
- key: 'pathC',
- value: function(t, e) {
- for (; !t.isCommandOrEnd(); ) {
- var r = t.getPoint(),
- n = t.getAsControlPoint(),
- i = t.getAsCurrentPoint();
- e.push(r.x, r.y, n.x, n.y, i.x, i.y);
- }
- }
- },
- {
- key: 'pathS',
- value: function(t, e) {
- for (; !t.isCommandOrEnd(); ) {
- var r = t.getReflectedControlPoint(),
- n = t.getAsControlPoint(),
- i = t.getAsCurrentPoint();
- e.push(r.x, r.y, n.x, n.y, i.x, i.y);
- }
- return 'C';
- }
- },
- {
- key: 'pathQ',
- value: function(t, e) {
- for (; !t.isCommandOrEnd(); ) {
- var r = t.getAsControlPoint(),
- n = t.getAsCurrentPoint();
- e.push(r.x, r.y, n.x, n.y);
- }
- }
- },
- {
- key: 'pathT',
- value: function(t, e) {
- for (; !t.isCommandOrEnd(); ) {
- var r = t.getReflectedControlPoint();
- t.control = r;
- var n = t.getAsCurrentPoint();
- e.push(r.x, r.y, n.x, n.y);
- }
- return 'Q';
- }
- },
- {
- key: 'pathA',
- value: function(t) {
- for (; !t.isCommandOrEnd(); ) {
- var e = t.current,
- r = t.getScalar(),
- n = t.getScalar(),
- i = t.getScalar() * (Math.PI / 180),
- o = t.getScalar(),
- a = t.getScalar(),
- u = t.getAsCurrentPoint(),
- s = new za(
- (Math.cos(i) * (e.x - u.x)) / 2 + (Math.sin(i) * (e.y - u.y)) / 2,
- (-Math.sin(i) * (e.x - u.x)) / 2 + (Math.cos(i) * (e.y - u.y)) / 2
- ),
- c = Math.pow(s.x, 2) / Math.pow(r, 2) + Math.pow(s.y, 2) / Math.pow(n, 2);
- c > 1 && ((r *= Math.sqrt(c)), (n *= Math.sqrt(c)));
- var l =
- (o === a ? -1 : 1) *
- Math.sqrt(
- (Math.pow(r, 2) * Math.pow(n, 2) -
- Math.pow(r, 2) * Math.pow(s.y, 2) -
- Math.pow(n, 2) * Math.pow(s.x, 2)) /
- (Math.pow(r, 2) * Math.pow(s.y, 2) + Math.pow(n, 2) * Math.pow(s.x, 2))
- );
- isNaN(l) && (l = 0);
- var f = new za((l * r * s.y) / n, (l * -n * s.x) / r),
- h = new za(
- (e.x + u.x) / 2 + Math.cos(i) * f.x - Math.sin(i) * f.y,
- (e.y + u.y) / 2 + Math.sin(i) * f.x + Math.cos(i) * f.y
- ),
- p = kr([1, 0], [(s.x - f.x) / r, (s.y - f.y) / n]),
- g = [(s.x - f.x) / r, (s.y - f.y) / n],
- y = [(-s.x - f.x) / r, (-s.y - f.y) / n],
- v = kr(g, y);
- return (
- Sr(g, y) <= -1 && (v = Math.PI),
- Sr(g, y) >= 1 && (v = 0),
- 0 === a && v > 0 && (v -= 2 * Math.PI),
- 1 === a && v < 0 && (v += 2 * Math.PI),
- [h.x, h.y, r, n, p, v, i, a]
- );
- }
- }
- },
- {
- key: 'calcLength',
- value: function(t, e, r, n) {
- var i = 0,
- o = null,
- a = null,
- u = 0;
- switch (r) {
- case 'L':
- return this.getLineLength(t, e, n[0], n[1]);
- case 'C':
- for (
- i = 0,
- o = this.getPointOnCubicBezier(0, t, e, n[0], n[1], n[2], n[3], n[4], n[5]),
- u = 0.01;
- u <= 1;
- u += 0.01
- )
- (a = this.getPointOnCubicBezier(u, t, e, n[0], n[1], n[2], n[3], n[4], n[5])),
- (i += this.getLineLength(o.x, o.y, a.x, a.y)),
- (o = a);
- return i;
- case 'Q':
- for (
- i = 0,
- o = this.getPointOnQuadraticBezier(0, t, e, n[0], n[1], n[2], n[3]),
- u = 0.01;
- u <= 1;
- u += 0.01
- )
- (a = this.getPointOnQuadraticBezier(u, t, e, n[0], n[1], n[2], n[3])),
- (i += this.getLineLength(o.x, o.y, a.x, a.y)),
- (o = a);
- return i;
- case 'A':
- i = 0;
- var s = n[4],
- c = n[5],
- l = n[4] + c,
- f = Math.PI / 180;
- if (
- (Math.abs(s - l) < f && (f = Math.abs(s - l)),
- (o = this.getPointOnEllipticalArc(n[0], n[1], n[2], n[3], s, 0)),
- c < 0)
- )
- for (u = s - f; u > l; u -= f)
- (a = this.getPointOnEllipticalArc(n[0], n[1], n[2], n[3], u, 0)),
- (i += this.getLineLength(o.x, o.y, a.x, a.y)),
- (o = a);
- else
- for (u = s + f; u < l; u += f)
- (a = this.getPointOnEllipticalArc(n[0], n[1], n[2], n[3], u, 0)),
- (i += this.getLineLength(o.x, o.y, a.x, a.y)),
- (o = a);
- return (
- (a = this.getPointOnEllipticalArc(n[0], n[1], n[2], n[3], l, 0)),
- (i += this.getLineLength(o.x, o.y, a.x, a.y))
- );
- }
- return 0;
- }
- },
- {
- key: 'getPointOnLine',
- value: function(t, e, r, n, i) {
- var o = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : e,
- a = arguments.length > 6 && void 0 !== arguments[6] ? arguments[6] : r,
- u = (i - r) / (n - e + 1e-8),
- s = Math.sqrt((t * t) / (1 + u * u));
- n < e && (s *= -1);
- var c = u * s,
- l = null;
- if (n === e) l = { x: o, y: a + c };
- else if ((a - r) / (o - e + 1e-8) === u) l = { x: o + s, y: a + c };
- else {
- var f = 0,
- h = 0,
- p = this.getLineLength(e, r, n, i);
- if (p < 1e-8) return null;
- var g = (o - e) * (n - e) + (a - r) * (i - r);
- (f = e + (g /= p * p) * (n - e)), (h = r + g * (i - r));
- var y = this.getLineLength(o, a, f, h),
- v = Math.sqrt(t * t - y * y);
- (s = Math.sqrt((v * v) / (1 + u * u))),
- n < e && (s *= -1),
- (l = { x: f + s, y: h + (c = u * s) });
- }
- return l;
- }
- },
- {
- key: 'getPointOnPath',
- value: function(t) {
- var e = this.getPathLength(),
- r = 0,
- n = null;
- if (t < -5e-5 || t - 5e-5 > e) return null;
- var i,
- o = wl(this.dataArray);
- try {
- for (o.s(); !(i = o.n()).done; ) {
- var a = i.value;
- if (!a || !(a.pathLength < 5e-5 || r + a.pathLength + 5e-5 < t)) {
- var u = t - r,
- s = 0;
- switch (a.command) {
- case 'L':
- n = this.getPointOnLine(
- u,
- a.start.x,
- a.start.y,
- a.points[0],
- a.points[1],
- a.start.x,
- a.start.y
- );
- break;
- case 'A':
- var c = a.points[4],
- l = a.points[5],
- f = a.points[4] + l;
- if (
- ((s = c + (u / a.pathLength) * l),
- (l < 0 && s < f) || (l >= 0 && s > f))
- )
- break;
- n = this.getPointOnEllipticalArc(
- a.points[0],
- a.points[1],
- a.points[2],
- a.points[3],
- s,
- a.points[6]
- );
- break;
- case 'C':
- (s = u / a.pathLength) > 1 && (s = 1),
- (n = this.getPointOnCubicBezier(
- s,
- a.start.x,
- a.start.y,
- a.points[0],
- a.points[1],
- a.points[2],
- a.points[3],
- a.points[4],
- a.points[5]
- ));
- break;
- case 'Q':
- (s = u / a.pathLength) > 1 && (s = 1),
- (n = this.getPointOnQuadraticBezier(
- s,
- a.start.x,
- a.start.y,
- a.points[0],
- a.points[1],
- a.points[2],
- a.points[3]
- ));
- }
- if (n) return n;
- break;
- }
- r += a.pathLength;
- }
- } catch (t) {
- o.e(t);
- } finally {
- o.f();
- }
- return null;
- }
- },
- {
- key: 'getLineLength',
- value: function(t, e, r, n) {
- return Math.sqrt((r - t) * (r - t) + (n - e) * (n - e));
- }
- },
- {
- key: 'getPathLength',
- value: function() {
- return (
- -1 === this.pathLength &&
- (this.pathLength = this.dataArray.reduce(function(t, e) {
- return e.pathLength > 0 ? t + e.pathLength : t;
- }, 0)),
- this.pathLength
- );
- }
- },
- {
- key: 'getPointOnCubicBezier',
- value: function(t, e, r, n, i, o, a, u, s) {
- return {
- x: u * Pr(t) + o * Rr(t) + n * Ar(t) + e * Er(t),
- y: s * Pr(t) + a * Rr(t) + i * Ar(t) + r * Er(t)
- };
- }
- },
- {
- key: 'getPointOnQuadraticBezier',
- value: function(t, e, r, n, i, o, a) {
- return { x: o * Cr(t) + n * Tr(t) + e * Or(t), y: a * Cr(t) + i * Tr(t) + r * Or(t) };
- }
- },
- {
- key: 'getPointOnEllipticalArc',
- value: function(t, e, r, n, i, o) {
- var a = Math.cos(o),
- u = Math.sin(o),
- s = r * Math.cos(i),
- c = n * Math.sin(i);
- return { x: t + (s * a - c * u), y: e + (s * u + c * a) };
- }
- },
- {
- key: 'buildEquidistantCache',
- value: function(t, e) {
- var r = this.getPathLength(),
- n = e || 0.25,
- i = t || r / 100;
- if (
- !this.equidistantCache ||
- this.equidistantCache.step !== i ||
- this.equidistantCache.precision !== n
- ) {
- this.equidistantCache = { step: i, precision: n, points: [] };
- for (var o = 0, a = 0; a <= r; a += n) {
- var u = this.getPointOnPath(a),
- s = this.getPointOnPath(a + n);
- u &&
- s &&
- (o += this.getLineLength(u.x, u.y, s.x, s.y)) >= i &&
- (this.equidistantCache.points.push({ x: u.x, y: u.y, distance: a }), (o -= i));
- }
- }
- }
- },
- {
- key: 'getEquidistantPointOnPath',
- value: function(t, e, r) {
- if ((this.buildEquidistantCache(e, r), t < 0 || t - this.getPathLength() > 5e-5)) return null;
- var n = Math.round((t / this.getPathLength()) * (this.equidistantCache.points.length - 1));
- return this.equidistantCache.points[n] || null;
- }
- }
- ]),
- n
- );
- })(_s);
- function Rl() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var Al = (function(t) {
- cu(o, t);
- var e,
- r,
- n,
- i =
- ((e = o),
- function() {
- var t,
- r = uu(e);
- if (Rl()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function o(t, e, r) {
- var n;
- Un(this, o), ((n = i.call(this, t, e, r)).type = 'image'), (n.loaded = !1);
- var a = n.getHrefAttribute().getString();
- if (!a) return au(n);
- var u = /\.svg$/.test(a);
- return t.images.push(ou(n)), u ? n.loadSvg(a) : n.loadImage(a), (n.isSvg = u), n;
- }
- return (
- Hn(o, [
- {
- key: 'loadImage',
- value:
- ((n = Gn(
- _n.mark(function t(e) {
- var r;
- return _n.wrap(
- function(t) {
- for (;;)
- switch ((t.prev = t.next)) {
- case 0:
- return (t.prev = 0), (t.next = 3), this.document.createImage(e);
- case 3:
- (r = t.sent), (this.image = r), (t.next = 10);
- break;
- case 7:
- (t.prev = 7),
- (t.t0 = t.catch(0)),
- console.error(
- 'Error while loading image "'.concat(e, '":'),
- t.t0
- );
- case 10:
- this.loaded = !0;
- case 11:
- case 'end':
- return t.stop();
- }
- },
- t,
- this,
- [[0, 7]]
- );
- })
- )),
- function(t) {
- return n.apply(this, arguments);
- })
- },
- {
- key: 'loadSvg',
- value:
- ((r = Gn(
- _n.mark(function t(e) {
- var r, n;
- return _n.wrap(
- function(t) {
- for (;;)
- switch ((t.prev = t.next)) {
- case 0:
- return (t.prev = 0), (t.next = 3), this.document.fetch(e);
- case 3:
- return (r = t.sent), (t.next = 6), r.text();
- case 6:
- (n = t.sent), (this.image = n), (t.next = 13);
- break;
- case 10:
- (t.prev = 10),
- (t.t0 = t.catch(0)),
- console.error(
- 'Error while loading image "'.concat(e, '":'),
- t.t0
- );
- case 13:
- this.loaded = !0;
- case 14:
- case 'end':
- return t.stop();
- }
- },
- t,
- this,
- [[0, 10]]
- );
- })
- )),
- function(t) {
- return r.apply(this, arguments);
- })
- },
- {
- key: 'renderChildren',
- value: function(t) {
- var e = this.document,
- r = this.image,
- n = this.loaded,
- i = this.getAttribute('x').getPixels('x'),
- o = this.getAttribute('y').getPixels('y'),
- a = this.getStyle('width').getPixels('x'),
- u = this.getStyle('height').getPixels('y');
- if (n && r && a && u) {
- if ((t.save(), this.isSvg))
- e.canvg
- .forkString(t, this.image, {
- ignoreMouse: !0,
- ignoreAnimation: !0,
- ignoreDimensions: !0,
- ignoreClear: !0,
- offsetX: i,
- offsetY: o,
- scaleWidth: a,
- scaleHeight: u
- })
- .render();
- else {
- var s = this.image;
- t.translate(i, o),
- e.setViewBox({
- ctx: t,
- aspectRatio: this.getAttribute('preserveAspectRatio').getString(),
- width: a,
- desiredWidth: s.width,
- height: u,
- desiredHeight: s.height
- }),
- this.loaded && (void 0 === s.complete || s.complete) && t.drawImage(s, 0, 0);
- }
- t.restore();
- }
- }
- },
- {
- key: 'getBoundingBox',
- value: function() {
- var t = this.getAttribute('x').getPixels('x'),
- e = this.getAttribute('y').getPixels('y'),
- r = this.getStyle('width').getPixels('x'),
- n = this.getStyle('height').getPixels('y');
- return new js(t, e, t + r, e + n);
- }
- }
- ]),
- o
- );
- })(Bs);
- function El() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var Cl = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (El()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n() {
- var t;
- return Un(this, n), ((t = r.apply(this, arguments)).type = 'symbol'), t;
- }
- return Hn(n, [{ key: 'render', value: function(t) {} }]), n;
- })(Bs),
- Tl = (function() {
- function t(e) {
- Un(this, t), (this.document = e), (this.loaded = !1), e.fonts.push(this);
- }
- var e;
- return (
- Hn(t, [
- {
- key: 'load',
- value:
- ((e = Gn(
- _n.mark(function t(e, r) {
- var n, i, o;
- return _n.wrap(
- function(t) {
- for (;;)
- switch ((t.prev = t.next)) {
- case 0:
- return (
- (t.prev = 0),
- (n = this.document),
- (t.next = 4),
- n.canvg.parser.load(r)
- );
- case 4:
- (i = t.sent),
- (o = i.getElementsByTagName('font')),
- Array.from(o).forEach(function(t) {
- var r = n.createElement(t);
- n.definitions[e] = r;
- }),
- (t.next = 12);
- break;
- case 9:
- (t.prev = 9),
- (t.t0 = t.catch(0)),
- console.error(
- 'Error while loading font "'.concat(r, '":'),
- t.t0
- );
- case 12:
- this.loaded = !0;
- case 13:
- case 'end':
- return t.stop();
- }
- },
- t,
- this,
- [[0, 9]]
- );
- })
- )),
- function(t, r) {
- return e.apply(this, arguments);
- })
- }
- ]),
- t
- );
- })();
- function Ol() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var Ml = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (Ol()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n(t, e, i) {
- var o;
- return (
- Un(this, n),
- ((o = r.call(this, t, e, i)).type = 'style'),
- Xe(
- Array.from(e.childNodes)
- .map(function(t) {
- return t.data;
- })
- .join('')
- .replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm, '')
- .replace(/@import.*;/g, '')
- )
- .split('}')
- .forEach(function(e) {
- var r = e.trim();
- if (r) {
- var n = r.split('{'),
- i = n[0].split(','),
- o = n[1].split(';');
- i.forEach(function(e) {
- var r = e.trim();
- if (r) {
- var n = t.styles[r] || {};
- if (
- (o.forEach(function(e) {
- var r = e.indexOf(':'),
- i = e.substr(0, r).trim(),
- o = e.substr(r + 1, e.length - r).trim();
- i && o && (n[i] = new La(t, i, o));
- }),
- (t.styles[r] = n),
- (t.stylesSpecificity[r] = br(r)),
- '@font-face' === r)
- ) {
- var i = n['font-family'].getString().replace(/"|'/g, '');
- n.src
- .getString()
- .split(',')
- .forEach(function(e) {
- if (e.indexOf('format("svg")') > 0) {
- var r = tr(e);
- r && new Tl(t).load(i, r);
- }
- });
- }
- }
- });
- }
- }),
- o
- );
- }
- return n;
- })(ss);
- function Dl() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- Ml.parseExternalUrl = tr;
- var Vl = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (Dl()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n() {
- var t;
- return Un(this, n), ((t = r.apply(this, arguments)).type = 'use'), t;
- }
- return (
- Hn(n, [
- {
- key: 'setContext',
- value: function(t) {
- xs(uu(n.prototype), 'setContext', this).call(this, t);
- var e = this.getAttribute('x'),
- r = this.getAttribute('y');
- e.hasValue() && t.translate(e.getPixels('x'), 0),
- r.hasValue() && t.translate(0, r.getPixels('y'));
- }
- },
- {
- key: 'path',
- value: function(t) {
- var e = this.element;
- e && e.path(t);
- }
- },
- {
- key: 'renderChildren',
- value: function(t) {
- var e = this.document,
- r = this.element;
- if (r) {
- var n = r;
- if (
- ('symbol' === r.type &&
- (((n = new Qs(e, null)).attributes.viewBox = new La(
- e,
- 'viewBox',
- r.getAttribute('viewBox').getString()
- )),
- (n.attributes.preserveAspectRatio = new La(
- e,
- 'preserveAspectRatio',
- r.getAttribute('preserveAspectRatio').getString()
- )),
- (n.attributes.overflow = new La(
- e,
- 'overflow',
- r.getAttribute('overflow').getString()
- )),
- (n.children = r.children)),
- 'svg' === n.type)
- ) {
- var i = this.getStyle('width', !1, !0),
- o = this.getStyle('height', !1, !0);
- i.hasValue() && (n.attributes.width = new La(e, 'width', i.getString())),
- o.hasValue() && (n.attributes.height = new La(e, 'height', o.getString()));
- }
- var a = n.parent;
- (n.parent = this), n.render(t), (n.parent = a);
- }
- }
- },
- {
- key: 'getBoundingBox',
- value: function(t) {
- var e = this.element;
- return e ? e.getBoundingBox(t) : null;
- }
- },
- {
- key: 'elementTransform',
- value: function() {
- var t = this.document,
- e = this.element;
- return us.fromElement(t, e);
- }
- },
- {
- key: 'element',
- get: function() {
- return (
- this._element || (this._element = this.getHrefAttribute().getDefinition()), this._element
- );
- }
- }
- ]),
- n
- );
- })(Bs);
- function Nl() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- function Il(t, e, r, n, i, o) {
- return t[r * n * 4 + 4 * e + o];
- }
- function Ll(t, e, r, n, i, o, a) {
- t[r * n * 4 + 4 * e + o] = a;
- }
- function jl(t, e, r) {
- var n = t[e];
- return n * (n < 0 ? r - 255 : r);
- }
- function zl(t, e, r, n) {
- return e + Math.cos(t) * r + Math.sin(t) * n;
- }
- var Bl = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (Nl()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n(t, e, i) {
- var o;
- Un(this, n), ((o = r.call(this, t, e, i)).type = 'feColorMatrix');
- var a = Ze(o.getAttribute('values').getString());
- switch (o.getAttribute('type').getString('matrix')) {
- case 'saturate':
- var u = a[0];
- a = [
- 0.213 + 0.787 * u,
- 0.715 - 0.715 * u,
- 0.072 - 0.072 * u,
- 0,
- 0,
- 0.213 - 0.213 * u,
- 0.715 + 0.285 * u,
- 0.072 - 0.072 * u,
- 0,
- 0,
- 0.213 - 0.213 * u,
- 0.715 - 0.715 * u,
- 0.072 + 0.928 * u,
- 0,
- 0,
- 0,
- 0,
- 0,
- 1,
- 0,
- 0,
- 0,
- 0,
- 0,
- 1
- ];
- break;
- case 'hueRotate':
- var s = (a[0] * Math.PI) / 180;
- a = [
- zl(s, 0.213, 0.787, -0.213),
- zl(s, 0.715, -0.715, -0.715),
- zl(s, 0.072, -0.072, 0.928),
- 0,
- 0,
- zl(s, 0.213, -0.213, 0.143),
- zl(s, 0.715, 0.285, 0.14),
- zl(s, 0.072, -0.072, -0.283),
- 0,
- 0,
- zl(s, 0.213, -0.213, -0.787),
- zl(s, 0.715, -0.715, 0.715),
- zl(s, 0.072, 0.928, 0.072),
- 0,
- 0,
- 0,
- 0,
- 0,
- 1,
- 0,
- 0,
- 0,
- 0,
- 0,
- 1
- ];
- break;
- case 'luminanceToAlpha':
- a = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.2125, 0.7154, 0.0721, 0, 0, 0, 0, 0, 0, 1];
- }
- return (o.matrix = a), (o.includeOpacity = o.getAttribute('includeOpacity').hasValue()), o;
- }
- return (
- Hn(n, [
- {
- key: 'apply',
- value: function(t, e, r, n, i) {
- for (
- var o = this.includeOpacity, a = this.matrix, u = t.getImageData(0, 0, n, i), s = 0;
- s < i;
- s++
- )
- for (var c = 0; c < n; c++) {
- var l = Il(u.data, c, s, n, 0, 0),
- f = Il(u.data, c, s, n, 0, 1),
- h = Il(u.data, c, s, n, 0, 2),
- p = Il(u.data, c, s, n, 0, 3),
- g = jl(a, 0, l) + jl(a, 1, f) + jl(a, 2, h) + jl(a, 3, p) + jl(a, 4, 1),
- y = jl(a, 5, l) + jl(a, 6, f) + jl(a, 7, h) + jl(a, 8, p) + jl(a, 9, 1),
- v = jl(a, 10, l) + jl(a, 11, f) + jl(a, 12, h) + jl(a, 13, p) + jl(a, 14, 1),
- d = jl(a, 15, l) + jl(a, 16, f) + jl(a, 17, h) + jl(a, 18, p) + jl(a, 19, 1);
- o && ((g = y = v = 0), (d *= p / 255)),
- Ll(u.data, c, s, n, 0, 0, g),
- Ll(u.data, c, s, n, 0, 1, y),
- Ll(u.data, c, s, n, 0, 2, v),
- Ll(u.data, c, s, n, 0, 3, d);
- }
- t.clearRect(0, 0, n, i), t.putImageData(u, 0, 0);
- }
- }
- ]),
- n
- );
- })(ss);
- function Fl() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var _l = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (Fl()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n() {
- var t;
- return Un(this, n), ((t = r.apply(this, arguments)).type = 'mask'), t;
- }
- return (
- Hn(n, [
- {
- key: 'apply',
- value: function(t, e) {
- var r = this.document,
- i = this.getAttribute('x').getPixels('x'),
- o = this.getAttribute('y').getPixels('y'),
- a = this.getStyle('width').getPixels('x'),
- u = this.getStyle('height').getPixels('y');
- if (!a && !u) {
- var s = new js();
- this.children.forEach(function(e) {
- s.addBoundingBox(e.getBoundingBox(t));
- }),
- (i = Math.floor(s.x1)),
- (o = Math.floor(s.y1)),
- (a = Math.floor(s.width)),
- (u = Math.floor(s.height));
- }
- var c = this.removeStyles(e, n.ignoreStyles),
- l = r.createCanvas(i + a, o + u),
- f = l.getContext('2d');
- r.screen.setDefaults(f),
- this.renderChildren(f),
- new Bl(r, {
- nodeType: 1,
- childNodes: [],
- attributes: [
- { nodeName: 'type', value: 'luminanceToAlpha' },
- { nodeName: 'includeOpacity', value: 'true' }
- ]
- }).apply(f, 0, 0, i + a, o + u);
- var h = r.createCanvas(i + a, o + u),
- p = h.getContext('2d');
- r.screen.setDefaults(p),
- e.render(p),
- (p.globalCompositeOperation = 'destination-in'),
- (p.fillStyle = f.createPattern(l, 'no-repeat')),
- p.fillRect(0, 0, i + a, o + u),
- (t.fillStyle = p.createPattern(h, 'no-repeat')),
- t.fillRect(0, 0, i + a, o + u),
- this.restoreStyles(e, c);
- }
- },
- { key: 'render', value: function(t) {} }
- ]),
- n
- );
- })(ss);
- _l.ignoreStyles = ['mask', 'transform', 'clip-path'];
- var $l = ot('Reflect', 'apply'),
- Gl = Function.apply,
- ql = !o(function() {
- $l(function() {});
- });
- function Ul() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- Dt(
- { target: 'Reflect', stat: !0, forced: ql },
- {
- apply: function(t, e, r) {
- return Vt(t), E(r), $l ? $l(t, e, r) : Gl.call(t, e, r);
- }
- }
- ),
- Dt(
- { target: 'Reflect', stat: !0, sham: !Su },
- {
- getPrototypeOf: function(t) {
- return Ru(E(t));
- }
- }
- );
- var Wl = function() {},
- Hl = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (Ul()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n() {
- var t;
- return Un(this, n), ((t = r.apply(this, arguments)).type = 'clipPath'), t;
- }
- return (
- Hn(n, [
- {
- key: 'apply',
- value: function(t) {
- var e = this.document,
- r = Reflect.getPrototypeOf(t),
- n = t.beginPath,
- i = t.closePath;
- r && ((r.beginPath = Wl), (r.closePath = Wl)),
- Reflect.apply(n, t, []),
- this.children.forEach(function(n) {
- if (void 0 !== n.path) {
- var o = void 0 !== n.elementTransform ? n.elementTransform() : null;
- o || (o = us.fromElement(e, n)),
- o && o.apply(t),
- n.path(t),
- r && (r.closePath = i),
- o && o.unapply(t);
- }
- }),
- Reflect.apply(i, t, []),
- t.clip(),
- r && ((r.beginPath = n), (r.closePath = i));
- }
- },
- { key: 'render', value: function(t) {} }
- ]),
- n
- );
- })(ss);
- function Xl() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var Yl = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (Xl()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n() {
- var t;
- return Un(this, n), ((t = r.apply(this, arguments)).type = 'filter'), t;
- }
- return (
- Hn(n, [
- {
- key: 'apply',
- value: function(t, e) {
- var r = this.document,
- i = this.children,
- o = e.getBoundingBox(t);
- if (o) {
- var a = 0,
- u = 0;
- i.forEach(function(t) {
- var e = t.extraFilterDistance || 0;
- (a = Math.max(a, e)), (u = Math.max(u, e));
- });
- var s = Math.floor(o.width),
- c = Math.floor(o.height),
- l = s + 2 * a,
- f = c + 2 * u;
- if (!(l < 1 || f < 1)) {
- var h = Math.floor(o.x),
- p = Math.floor(o.y),
- g = this.removeStyles(e, n.ignoreStyles),
- y = r.createCanvas(l, f),
- v = y.getContext('2d');
- r.screen.setDefaults(v),
- v.translate(-h + a, -p + u),
- e.render(v),
- i.forEach(function(t) {
- 'function' == typeof t.apply && t.apply(v, 0, 0, l, f);
- }),
- t.drawImage(y, 0, 0, l, f, h - a, p - u, l, f),
- this.restoreStyles(e, g);
- }
- }
- }
- },
- { key: 'render', value: function(t) {} }
- ]),
- n
- );
- })(ss);
- function Ql() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- Yl.ignoreStyles = ['filter', 'transform', 'clip-path'];
- var Zl = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (Ql()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n(t, e, i) {
- var o;
- return (
- Un(this, n), ((o = r.call(this, t, e, i)).type = 'feDropShadow'), o.addStylesFromStyleDefinition(), o
- );
- }
- return Hn(n, [{ key: 'apply', value: function(t, e, r, n, i) {} }]), n;
- })(ss);
- function Kl() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var Jl = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (Kl()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n() {
- var t;
- return Un(this, n), ((t = r.apply(this, arguments)).type = 'feMorphology'), t;
- }
- return Hn(n, [{ key: 'apply', value: function(t, e, r, n, i) {} }]), n;
- })(ss);
- function tf() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var ef = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (tf()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n() {
- var t;
- return Un(this, n), ((t = r.apply(this, arguments)).type = 'feComposite'), t;
- }
- return Hn(n, [{ key: 'apply', value: function(t, e, r, n, i) {} }]), n;
- })(ss);
- function rf(t) {
- return (rf =
- 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator
- ? function(t) {
- return typeof t;
- }
- : function(t) {
- return t && 'function' == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype
- ? 'symbol'
- : typeof t;
- })(t);
- }
- var nf = [
- 512,
- 512,
- 456,
- 512,
- 328,
- 456,
- 335,
- 512,
- 405,
- 328,
- 271,
- 456,
- 388,
- 335,
- 292,
- 512,
- 454,
- 405,
- 364,
- 328,
- 298,
- 271,
- 496,
- 456,
- 420,
- 388,
- 360,
- 335,
- 312,
- 292,
- 273,
- 512,
- 482,
- 454,
- 428,
- 405,
- 383,
- 364,
- 345,
- 328,
- 312,
- 298,
- 284,
- 271,
- 259,
- 496,
- 475,
- 456,
- 437,
- 420,
- 404,
- 388,
- 374,
- 360,
- 347,
- 335,
- 323,
- 312,
- 302,
- 292,
- 282,
- 273,
- 265,
- 512,
- 497,
- 482,
- 468,
- 454,
- 441,
- 428,
- 417,
- 405,
- 394,
- 383,
- 373,
- 364,
- 354,
- 345,
- 337,
- 328,
- 320,
- 312,
- 305,
- 298,
- 291,
- 284,
- 278,
- 271,
- 265,
- 259,
- 507,
- 496,
- 485,
- 475,
- 465,
- 456,
- 446,
- 437,
- 428,
- 420,
- 412,
- 404,
- 396,
- 388,
- 381,
- 374,
- 367,
- 360,
- 354,
- 347,
- 341,
- 335,
- 329,
- 323,
- 318,
- 312,
- 307,
- 302,
- 297,
- 292,
- 287,
- 282,
- 278,
- 273,
- 269,
- 265,
- 261,
- 512,
- 505,
- 497,
- 489,
- 482,
- 475,
- 468,
- 461,
- 454,
- 447,
- 441,
- 435,
- 428,
- 422,
- 417,
- 411,
- 405,
- 399,
- 394,
- 389,
- 383,
- 378,
- 373,
- 368,
- 364,
- 359,
- 354,
- 350,
- 345,
- 341,
- 337,
- 332,
- 328,
- 324,
- 320,
- 316,
- 312,
- 309,
- 305,
- 301,
- 298,
- 294,
- 291,
- 287,
- 284,
- 281,
- 278,
- 274,
- 271,
- 268,
- 265,
- 262,
- 259,
- 257,
- 507,
- 501,
- 496,
- 491,
- 485,
- 480,
- 475,
- 470,
- 465,
- 460,
- 456,
- 451,
- 446,
- 442,
- 437,
- 433,
- 428,
- 424,
- 420,
- 416,
- 412,
- 408,
- 404,
- 400,
- 396,
- 392,
- 388,
- 385,
- 381,
- 377,
- 374,
- 370,
- 367,
- 363,
- 360,
- 357,
- 354,
- 350,
- 347,
- 344,
- 341,
- 338,
- 335,
- 332,
- 329,
- 326,
- 323,
- 320,
- 318,
- 315,
- 312,
- 310,
- 307,
- 304,
- 302,
- 299,
- 297,
- 294,
- 292,
- 289,
- 287,
- 285,
- 282,
- 280,
- 278,
- 275,
- 273,
- 271,
- 269,
- 267,
- 265,
- 263,
- 261,
- 259
- ],
- of = [
- 9,
- 11,
- 12,
- 13,
- 13,
- 14,
- 14,
- 15,
- 15,
- 15,
- 15,
- 16,
- 16,
- 16,
- 16,
- 17,
- 17,
- 17,
- 17,
- 17,
- 17,
- 17,
- 18,
- 18,
- 18,
- 18,
- 18,
- 18,
- 18,
- 18,
- 18,
- 19,
- 19,
- 19,
- 19,
- 19,
- 19,
- 19,
- 19,
- 19,
- 19,
- 19,
- 19,
- 19,
- 19,
- 20,
- 20,
- 20,
- 20,
- 20,
- 20,
- 20,
- 20,
- 20,
- 20,
- 20,
- 20,
- 20,
- 20,
- 20,
- 20,
- 20,
- 20,
- 21,
- 21,
- 21,
- 21,
- 21,
- 21,
- 21,
- 21,
- 21,
- 21,
- 21,
- 21,
- 21,
- 21,
- 21,
- 21,
- 21,
- 21,
- 21,
- 21,
- 21,
- 21,
- 21,
- 21,
- 21,
- 21,
- 21,
- 22,
- 22,
- 22,
- 22,
- 22,
- 22,
- 22,
- 22,
- 22,
- 22,
- 22,
- 22,
- 22,
- 22,
- 22,
- 22,
- 22,
- 22,
- 22,
- 22,
- 22,
- 22,
- 22,
- 22,
- 22,
- 22,
- 22,
- 22,
- 22,
- 22,
- 22,
- 22,
- 22,
- 22,
- 22,
- 22,
- 22,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 23,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24,
- 24
- ];
- function af(t, e, r, n, i, o) {
- if (!(isNaN(o) || o < 1)) {
- o |= 0;
- var a = (function(t, e, r, n, i) {
- if (
- ('string' == typeof t && (t = document.getElementById(t)),
- !t || 'object' !== rf(t) || !('getContext' in t))
- )
- throw new TypeError('Expecting canvas with `getContext` method in processCanvasRGB(A) calls!');
- var o = t.getContext('2d');
- try {
- return o.getImageData(e, r, n, i);
- } catch (t) {
- throw new Error('unable to access image data: ' + t);
- }
- })(t, e, r, n, i);
- (a = (function(t, e, r, n, i, o) {
- var a,
- u,
- s,
- c,
- l,
- f,
- h,
- p,
- g,
- y,
- v,
- d,
- m,
- x,
- b,
- w,
- S,
- k,
- P,
- R,
- A,
- E,
- C,
- T,
- O,
- M = t.data,
- D = 2 * o + 1,
- V = n - 1,
- N = i - 1,
- I = o + 1,
- L = (I * (I + 1)) / 2,
- j = new uf(),
- z = j;
- for (s = 1; s < D; s++) (z = z.next = new uf()), s === I && (O = z);
- z.next = j;
- var B = null,
- F = null;
- h = f = 0;
- var _ = nf[o],
- $ = of[o];
- for (u = 0; u < i; u++) {
- for (
- w = S = k = P = p = g = y = v = 0,
- d = I * (R = M[f]),
- m = I * (A = M[f + 1]),
- x = I * (E = M[f + 2]),
- b = I * (C = M[f + 3]),
- p += L * R,
- g += L * A,
- y += L * E,
- v += L * C,
- z = j,
- s = 0;
- s < I;
- s++
- )
- (z.r = R), (z.g = A), (z.b = E), (z.a = C), (z = z.next);
- for (s = 1; s < I; s++)
- (c = f + ((V < s ? V : s) << 2)),
- (p += (z.r = R = M[c]) * (T = I - s)),
- (g += (z.g = A = M[c + 1]) * T),
- (y += (z.b = E = M[c + 2]) * T),
- (v += (z.a = C = M[c + 3]) * T),
- (w += R),
- (S += A),
- (k += E),
- (P += C),
- (z = z.next);
- for (B = j, F = O, a = 0; a < n; a++)
- (M[f + 3] = C = (v * _) >> $),
- 0 !== C
- ? ((C = 255 / C),
- (M[f] = ((p * _) >> $) * C),
- (M[f + 1] = ((g * _) >> $) * C),
- (M[f + 2] = ((y * _) >> $) * C))
- : (M[f] = M[f + 1] = M[f + 2] = 0),
- (p -= d),
- (g -= m),
- (y -= x),
- (v -= b),
- (d -= B.r),
- (m -= B.g),
- (x -= B.b),
- (b -= B.a),
- (c = (h + ((c = a + o + 1) < V ? c : V)) << 2),
- (w += B.r = M[c]),
- (S += B.g = M[c + 1]),
- (k += B.b = M[c + 2]),
- (P += B.a = M[c + 3]),
- (p += w),
- (g += S),
- (y += k),
- (v += P),
- (B = B.next),
- (d += R = F.r),
- (m += A = F.g),
- (x += E = F.b),
- (b += C = F.a),
- (w -= R),
- (S -= A),
- (k -= E),
- (P -= C),
- (F = F.next),
- (f += 4);
- h += n;
- }
- for (a = 0; a < n; a++) {
- for (
- S = k = P = w = g = y = v = p = 0,
- d = I * (R = M[(f = a << 2)]),
- m = I * (A = M[f + 1]),
- x = I * (E = M[f + 2]),
- b = I * (C = M[f + 3]),
- p += L * R,
- g += L * A,
- y += L * E,
- v += L * C,
- z = j,
- s = 0;
- s < I;
- s++
- )
- (z.r = R), (z.g = A), (z.b = E), (z.a = C), (z = z.next);
- for (l = n, s = 1; s <= o; s++)
- (f = (l + a) << 2),
- (p += (z.r = R = M[f]) * (T = I - s)),
- (g += (z.g = A = M[f + 1]) * T),
- (y += (z.b = E = M[f + 2]) * T),
- (v += (z.a = C = M[f + 3]) * T),
- (w += R),
- (S += A),
- (k += E),
- (P += C),
- (z = z.next),
- s < N && (l += n);
- for (f = a, B = j, F = O, u = 0; u < i; u++)
- (M[(c = f << 2) + 3] = C = (v * _) >> $),
- C > 0
- ? ((C = 255 / C),
- (M[c] = ((p * _) >> $) * C),
- (M[c + 1] = ((g * _) >> $) * C),
- (M[c + 2] = ((y * _) >> $) * C))
- : (M[c] = M[c + 1] = M[c + 2] = 0),
- (p -= d),
- (g -= m),
- (y -= x),
- (v -= b),
- (d -= B.r),
- (m -= B.g),
- (x -= B.b),
- (b -= B.a),
- (c = (a + ((c = u + I) < N ? c : N) * n) << 2),
- (p += w += B.r = M[c]),
- (g += S += B.g = M[c + 1]),
- (y += k += B.b = M[c + 2]),
- (v += P += B.a = M[c + 3]),
- (B = B.next),
- (d += R = F.r),
- (m += A = F.g),
- (x += E = F.b),
- (b += C = F.a),
- (w -= R),
- (S -= A),
- (k -= E),
- (P -= C),
- (F = F.next),
- (f += n);
- }
- return t;
- })(a, 0, 0, n, i, o)),
- t.getContext('2d').putImageData(a, e, r);
- }
- }
- var uf = function t() {
- !(function(t, e) {
- if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function');
- })(this, t),
- (this.r = 0),
- (this.g = 0),
- (this.b = 0),
- (this.a = 0),
- (this.next = null);
- };
- function sf() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var cf = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (sf()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n(t, e, i) {
- var o;
- return (
- Un(this, n),
- ((o = r.call(this, t, e, i)).type = 'feGaussianBlur'),
- (o.blurRadius = Math.floor(o.getAttribute('stdDeviation').getNumber())),
- (o.extraFilterDistance = o.blurRadius),
- o
- );
- }
- return (
- Hn(n, [
- {
- key: 'apply',
- value: function(t, e, r, n, i) {
- var o = this.document,
- a = this.blurRadius,
- u = o.window ? o.window.document.body : null,
- s = t.canvas;
- (s.id = o.getUniqueId()),
- u && ((s.style.display = 'none'), u.appendChild(s)),
- af(s, e, r, n, i, a),
- u && u.removeChild(s);
- }
- }
- ]),
- n
- );
- })(ss);
- function lf() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var ff = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (lf()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n() {
- var t;
- return Un(this, n), ((t = r.apply(this, arguments)).type = 'title'), t;
- }
- return n;
- })(ss);
- function hf() {
- if ('undefined' == typeof Reflect || !Reflect.construct) return !1;
- if (Reflect.construct.sham) return !1;
- if ('function' == typeof Proxy) return !0;
- try {
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0;
- } catch (t) {
- return !1;
- }
- }
- var pf = (function(t) {
- cu(n, t);
- var e,
- r =
- ((e = n),
- function() {
- var t,
- r = uu(e);
- if (hf()) {
- var n = uu(this).constructor;
- t = Reflect.construct(r, arguments, n);
- } else t = r.apply(this, arguments);
- return au(this, t);
- });
- function n() {
- var t;
- return Un(this, n), ((t = r.apply(this, arguments)).type = 'desc'), t;
- }
- return n;
- })(ss),
- gf = {
- svg: Qs,
- rect: Ks,
- circle: tc,
- ellipse: rc,
- line: ic,
- polyline: ac,
- polygon: sc,
- path: Xs,
- pattern: fc,
- marker: pc,
- defs: yc,
- linearGradient: wc,
- radialGradient: kc,
- stop: Rc,
- animate: jc,
- animateColor: Bc,
- animateTransform: _c,
- font: il,
- 'font-face': al,
- 'missing-glyph': sl,
- glyph: ll,
- text: _s,
- tspan: Gs,
- tref: hl,
- a: gl,
- textPath: Pl,
- image: Al,
- g: dc,
- symbol: Cl,
- style: Ml,
- use: Vl,
- mask: _l,
- clipPath: Hl,
- filter: Yl,
- feDropShadow: Zl,
- feMorphology: Jl,
- feComposite: ef,
- feColorMatrix: Bl,
- feGaussianBlur: cf,
- title: ff,
- desc: pf
- };
- function yf(t, e) {
- var r = Object.keys(t);
- if (Object.getOwnPropertySymbols) {
- var n = Object.getOwnPropertySymbols(t);
- e &&
- (n = n.filter(function(e) {
- return Object.getOwnPropertyDescriptor(t, e).enumerable;
- })),
- r.push.apply(r, n);
- }
- return r;
- }
- function vf() {
- return (vf = Gn(
- _n.mark(function t(e) {
- var r,
- n,
- i = arguments;
- return _n.wrap(function(t) {
- for (;;)
- switch ((t.prev = t.next)) {
- case 0:
- return (
- (r = i.length > 1 && void 0 !== i[1] && i[1]),
- (n = document.createElement('img')),
- r && (n.crossOrigin = 'Anonymous'),
- t.abrupt(
- 'return',
- new Promise(function(t, r) {
- (n.onload = function() {
- t(n);
- }),
- (n.onerror = function() {
- r();
- }),
- (n.src = e);
- })
- )
- );
- case 4:
- case 'end':
- return t.stop();
- }
- }, t);
- })
- )).apply(this, arguments);
- }
- var df = (function() {
- function t(e) {
- var r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},
- n = r.rootEmSize,
- i = void 0 === n ? 12 : n,
- o = r.emSize,
- a = void 0 === o ? 12 : o,
- u = r.createCanvas,
- s = void 0 === u ? t.createCanvas : u,
- c = r.createImage,
- l = void 0 === c ? t.createImage : c,
- f = r.anonymousCrossOrigin;
- Un(this, t),
- (this.canvg = e),
- (this.definitions = {}),
- (this.styles = {}),
- (this.stylesSpecificity = {}),
- (this.images = []),
- (this.fonts = []),
- (this.emSizeStack = []),
- (this.uniqueId = 0),
- (this.screen = e.screen),
- (this.rootEmSize = i),
- (this.emSize = a),
- (this.createCanvas = s),
- (this.createImage = this.bindCreateImage(l, f)),
- this.screen.wait(this.isImagesLoaded.bind(this)),
- this.screen.wait(this.isFontsLoaded.bind(this));
- }
- return (
- Hn(t, [
- {
- key: 'bindCreateImage',
- value: function(t, e) {
- return 'boolean' == typeof e
- ? function(r, n) {
- return t(r, 'boolean' == typeof n ? n : e);
- }
- : t;
- }
- },
- {
- key: 'popEmSize',
- value: function() {
- this.emSizeStack.pop();
- }
- },
- {
- key: 'getUniqueId',
- value: function() {
- return 'canvg'.concat(++this.uniqueId);
- }
- },
- {
- key: 'isImagesLoaded',
- value: function() {
- return this.images.every(function(t) {
- return t.loaded;
- });
- }
- },
- {
- key: 'isFontsLoaded',
- value: function() {
- return this.fonts.every(function(t) {
- return t.loaded;
- });
- }
- },
- {
- key: 'createDocumentElement',
- value: function(t) {
- var e = this.createElement(t.documentElement);
- return (e.root = !0), e.addStylesFromStyleDefinition(), (this.documentElement = e), e;
- }
- },
- {
- key: 'createElement',
- value: function(e) {
- var r = e.nodeName.replace(/^[^:]+:/, ''),
- n = t.elementTypes[r];
- return void 0 !== n ? new n(this, e) : new ls(this, e);
- }
- },
- {
- key: 'createTextNode',
- value: function(t) {
- return new Us(this, t);
- }
- },
- {
- key: 'setViewBox',
- value: function(t) {
- this.screen.setViewBox(
- (function(t) {
- for (var e = 1; e < arguments.length; e++) {
- var r = null != arguments[e] ? arguments[e] : {};
- e % 2
- ? yf(Object(r), !0).forEach(function(e) {
- qn(t, e, r[e]);
- })
- : Object.getOwnPropertyDescriptors
- ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r))
- : yf(Object(r)).forEach(function(e) {
- Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(r, e));
- });
- }
- return t;
- })({ document: this }, t)
- );
- }
- },
- {
- key: 'window',
- get: function() {
- return this.screen.window;
- }
- },
- {
- key: 'fetch',
- get: function() {
- return this.screen.fetch;
- }
- },
- {
- key: 'ctx',
- get: function() {
- return this.screen.ctx;
- }
- },
- {
- key: 'emSize',
- get: function() {
- var t = this.emSizeStack;
- return t[t.length - 1];
- },
- set: function(t) {
- this.emSizeStack.push(t);
- }
- }
- ]),
- t
- );
- })();
- function mf(t, e) {
- var r = Object.keys(t);
- if (Object.getOwnPropertySymbols) {
- var n = Object.getOwnPropertySymbols(t);
- e &&
- (n = n.filter(function(e) {
- return Object.getOwnPropertyDescriptor(t, e).enumerable;
- })),
- r.push.apply(r, n);
- }
- return r;
- }
- function xf(t) {
- for (var e = 1; e < arguments.length; e++) {
- var r = null != arguments[e] ? arguments[e] : {};
- e % 2
- ? mf(Object(r), !0).forEach(function(e) {
- qn(t, e, r[e]);
- })
- : Object.getOwnPropertyDescriptors
- ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r))
- : mf(Object(r)).forEach(function(e) {
- Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(r, e));
- });
- }
- return t;
- }
- (df.createCanvas = function(t, e) {
- var r = document.createElement('canvas');
- return (r.width = t), (r.height = e), r;
- }),
- (df.createImage = function(t) {
- return vf.apply(this, arguments);
- }),
- (df.elementTypes = gf);
- var bf = (function() {
- function t(e, r) {
- var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
- Un(this, t), (this.parser = new Ua(n)), (this.screen = new $a(e, n)), (this.options = n);
- var i = new df(this, n),
- o = i.createDocumentElement(r);
- (this.document = i), (this.documentElement = o);
- }
- var e, r;
- return (
- Hn(
- t,
- [
- {
- key: 'fork',
- value: function(e, r) {
- var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
- return t.from(e, r, xf({}, this.options, {}, n));
- }
- },
- {
- key: 'forkString',
- value: function(e, r) {
- var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
- return t.fromString(e, r, xf({}, this.options, {}, n));
- }
- },
- {
- key: 'ready',
- value: function() {
- return this.screen.ready();
- }
- },
- {
- key: 'isReady',
- value: function() {
- return this.screen.isReady();
- }
- },
- {
- key: 'render',
- value:
- ((r = Gn(
- _n.mark(function t() {
- var e,
- r = arguments;
- return _n.wrap(
- function(t) {
- for (;;)
- switch ((t.prev = t.next)) {
- case 0:
- return (
- (e = r.length > 0 && void 0 !== r[0] ? r[0] : {}),
- this.start(
- xf(
- {
- enableRedraw: !0,
- ignoreAnimation: !0,
- ignoreMouse: !0
- },
- e
- )
- ),
- (t.next = 4),
- this.ready()
- );
- case 4:
- this.stop();
- case 5:
- case 'end':
- return t.stop();
- }
- },
- t,
- this
- );
- })
- )),
- function() {
- return r.apply(this, arguments);
- })
- },
- {
- key: 'start',
- value: function() {
- var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
- e = this.documentElement,
- r = this.screen,
- n = this.options;
- r.start(e, xf({ enableRedraw: !0 }, n, {}, t));
- }
- },
- {
- key: 'stop',
- value: function() {
- this.screen.stop();
- }
- },
- {
- key: 'resize',
- value: function(t) {
- var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : t,
- r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2];
- this.documentElement.resize(t, e, r);
- }
- }
- ],
- [
- {
- key: 'from',
- value:
- ((e = Gn(
- _n.mark(function e(r, n) {
- var i,
- o,
- a,
- u = arguments;
- return _n.wrap(function(e) {
- for (;;)
- switch ((e.prev = e.next)) {
- case 0:
- return (
- (i = u.length > 2 && void 0 !== u[2] ? u[2] : {}),
- (o = new Ua(i)),
- (e.next = 4),
- o.parse(n)
- );
- case 4:
- return (a = e.sent), e.abrupt('return', new t(r, a, i));
- case 6:
- case 'end':
- return e.stop();
- }
- }, e);
- })
- )),
- function(t, r) {
- return e.apply(this, arguments);
- })
- },
- {
- key: 'fromString',
- value: function(e, r) {
- var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {},
- i = new Ua(n),
- o = i.parseFromString(r);
- return new t(e, o, n);
- }
- }
- ]
- ),
- t
- );
- })();
- var wf = Object.freeze({
- __proto__: null,
- offscreen: function() {
- var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
- e = t.DOMParser,
- r = {
- window: null,
- ignoreAnimation: !0,
- ignoreMouse: !0,
- DOMParser: e,
- createCanvas: function(t, e) {
- return new OffscreenCanvas(t, e);
- },
- createImage: function(t) {
- return Gn(
- _n.mark(function e() {
- var r, n, i;
- return _n.wrap(function(e) {
- for (;;)
- switch ((e.prev = e.next)) {
- case 0:
- return (e.next = 2), fetch(t);
- case 2:
- return (r = e.sent), (e.next = 5), r.blob();
- case 5:
- return (n = e.sent), (e.next = 8), createImageBitmap(n);
- case 8:
- return (i = e.sent), e.abrupt('return', i);
- case 10:
- case 'end':
- return e.stop();
- }
- }, e);
- })
- )();
- }
- };
- return ('undefined' == typeof DOMParser && void 0 !== e) || Reflect.deleteProperty(r, 'DOMParser'), r;
- },
- node: function(t) {
- var e = t.DOMParser,
- r = t.canvas;
- return {
- window: null,
- ignoreAnimation: !0,
- ignoreMouse: !0,
- DOMParser: e,
- fetch: t.fetch,
- createCanvas: r.createCanvas,
- createImage: r.loadImage
- };
- }
- });
- (t.AElement = gl),
- (t.AnimateColorElement = Bc),
- (t.AnimateElement = jc),
- (t.AnimateTransformElement = _c),
- (t.BoundingBox = js),
- (t.CB1 = Pr),
- (t.CB2 = Rr),
- (t.CB3 = Ar),
- (t.CB4 = Er),
- (t.Canvg = bf),
- (t.CircleElement = tc),
- (t.ClipPathElement = Hl),
- (t.DefsElement = yc),
- (t.DescElement = pf),
- (t.Document = df),
- (t.Element = ss),
- (t.EllipseElement = rc),
- (t.FeColorMatrixElement = Bl),
- (t.FeCompositeElement = ef),
- (t.FeDropShadowElement = Zl),
- (t.FeGaussianBlurElement = cf),
- (t.FeMorphologyElement = Jl),
- (t.FilterElement = Yl),
- (t.Font = ks),
- (t.FontElement = il),
- (t.FontFaceElement = al),
- (t.GElement = dc),
- (t.GlyphElement = ll),
- (t.GradientElement = xc),
- (t.ImageElement = Al),
- (t.LineElement = ic),
- (t.LinearGradientElement = wc),
- (t.MarkerElement = pc),
- (t.MaskElement = _l),
- (t.Matrix = ts),
- (t.MissingGlyphElement = sl),
- (t.Mouse = Ba),
- (t.PSEUDO_ZERO = 1e-8),
- (t.Parser = Ua),
- (t.PathElement = Xs),
- (t.PathParser = Ws),
- (t.PatternElement = fc),
- (t.Point = za),
- (t.PolygonElement = sc),
- (t.PolylineElement = ac),
- (t.Property = La),
- (t.QB1 = Cr),
- (t.QB2 = Tr),
- (t.QB3 = Or),
- (t.RadialGradientElement = kc),
- (t.RectElement = Ks),
- (t.RenderedElement = Bs),
- (t.Rotate = Ku),
- (t.SVGElement = Qs),
- (t.SVGFontLoader = Tl),
- (t.Scale = Ju),
- (t.Screen = $a),
- (t.Skew = rs),
- (t.SkewX = is),
- (t.SkewY = as),
- (t.StopElement = Rc),
- (t.StyleElement = Ml),
- (t.SymbolElement = Cl),
- (t.TRefElement = hl),
- (t.TSpanElement = Gs),
- (t.TextElement = _s),
- (t.TextPathElement = Pl),
- (t.TitleElement = ff),
- (t.Transform = us),
- (t.Translate = Zu),
- (t.UnknownElement = ls),
- (t.UseElement = Vl),
- (t.ViewPort = ja),
- (t.compressSpaces = Xe),
- (t.default = bf),
- (t.getSelectorSpecificity = br),
- (t.normalizeAttributeName = Je),
- (t.normalizeColor = er),
- (t.parseExternalUrl = tr),
- (t.presets = wf),
- (t.toNumbers = Ze),
- (t.trimLeft = Ye),
- (t.trimRight = Qe),
- (t.vectorMagnitude = wr),
- (t.vectorsAngle = kr),
- (t.vectorsRatio = Sr),
- Object.defineProperty(t, '__esModule', { value: !0 });
- });
- //# sourceMappingURL=umd.js.map
|