vendor.min.js 2.8 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924369253692636927369283692936930369313693236933369343693536936369373693836939369403694136942369433694436945369463694736948369493695036951369523695336954369553695636957369583695936960369613696236963369643696536966369673696836969369703697136972369733697436975369763697736978369793698036981369823698336984369853698636987369883698936990369913699236993369943699536996369973699836999370003700137002370033700437005370063700737008370093701037011370123701337014370153701637017370183701937020370213702237023370243702537026370273702837029370303703137032370333703437035370363703737038370393704037041370423704337044370453704637047370483704937050370513705237053370543705537056370573705837059370603706137062370633706437065370663706737068370693707037071370723707337074370753707637077370783707937080370813708237083370843708537086370873708837089370903709137092370933709437095370963709737098370993710037101371023710337104371053710637107371083710937110371113711237113371143711537116371173711837119371203712137122371233712437125371263712737128371293713037131371323713337134371353713637137371383713937140371413714237143371443714537146371473714837149371503715137152371533715437155371563715737158371593716037161371623716337164371653716637167371683716937170371713717237173371743717537176371773717837179371803718137182371833718437185371863718737188371893719037191371923719337194371953719637197371983719937200372013720237203372043720537206372073720837209372103721137212372133721437215372163721737218372193722037221372223722337224372253722637227372283722937230372313723237233372343723537236372373723837239372403724137242372433724437245372463724737248372493725037251372523725337254372553725637257372583725937260372613726237263372643726537266372673726837269372703727137272372733727437275372763727737278372793728037281372823728337284372853728637287372883728937290372913729237293372943729537296372973729837299373003730137302373033730437305373063730737308373093731037311373123731337314373153731637317373183731937320373213732237323373243732537326373273732837329373303733137332373333733437335373363733737338373393734037341373423734337344373453734637347373483734937350373513735237353373543735537356373573735837359373603736137362373633736437365373663736737368373693737037371373723737337374373753737637377373783737937380373813738237383373843738537386373873738837389373903739137392373933739437395373963739737398373993740037401374023740337404374053740637407374083740937410374113741237413374143741537416374173741837419374203742137422374233742437425374263742737428374293743037431374323743337434374353743637437374383743937440374413744237443374443744537446374473744837449374503745137452374533745437455374563745737458374593746037461374623746337464374653746637467374683746937470374713747237473374743747537476374773747837479374803748137482374833748437485374863748737488374893749037491374923749337494374953749637497374983749937500375013750237503375043750537506375073750837509375103751137512375133751437515375163751737518375193752037521375223752337524375253752637527375283752937530375313753237533375343753537536375373753837539375403754137542375433754437545375463754737548375493755037551375523755337554375553755637557375583755937560375613756237563375643756537566375673756837569375703757137572375733757437575375763757737578375793758037581375823758337584375853758637587375883758937590375913759237593375943759537596375973759837599376003760137602376033760437605376063760737608376093761037611376123761337614376153761637617376183761937620376213762237623376243762537626376273762837629376303763137632376333763437635376363763737638376393764037641376423764337644376453764637647376483764937650376513765237653376543765537656376573765837659376603766137662376633766437665376663766737668376693767037671376723767337674376753767637677376783767937680376813768237683376843768537686376873768837689376903769137692376933769437695376963769737698376993770037701377023770337704377053770637707377083770937710377113771237713377143771537716377173771837719377203772137722377233772437725377263772737728377293773037731377323773337734377353773637737377383773937740377413774237743377443774537746377473774837749377503775137752377533775437755377563775737758377593776037761377623776337764377653776637767377683776937770377713777237773377743777537776377773777837779377803778137782377833778437785377863778737788377893779037791377923779337794377953779637797377983779937800378013780237803378043780537806378073780837809378103781137812378133781437815378163781737818378193782037821378223782337824378253782637827378283782937830378313783237833378343783537836378373783837839378403784137842378433784437845378463784737848378493785037851378523785337854378553785637857378583785937860378613786237863378643786537866378673786837869378703787137872378733787437875378763787737878378793788037881378823788337884378853788637887378883788937890378913789237893378943789537896378973789837899379003790137902379033790437905379063790737908379093791037911379123791337914379153791637917379183791937920379213792237923379243792537926379273792837929379303793137932379333793437935379363793737938379393794037941379423794337944379453794637947379483794937950379513795237953379543795537956379573795837959379603796137962379633796437965379663796737968379693797037971379723797337974379753797637977379783797937980379813798237983379843798537986379873798837989379903799137992379933799437995379963799737998379993800038001380023800338004380053800638007380083800938010380113801238013380143801538016380173801838019380203802138022380233802438025380263802738028380293803038031380323803338034380353803638037380383803938040380413804238043380443804538046380473804838049380503805138052380533805438055380563805738058380593806038061380623806338064380653806638067380683806938070380713807238073380743807538076380773807838079380803808138082380833808438085380863808738088380893809038091380923809338094380953809638097380983809938100381013810238103381043810538106381073810838109381103811138112381133811438115381163811738118381193812038121381223812338124381253812638127381283812938130381313813238133381343813538136381373813838139381403814138142381433814438145381463814738148381493815038151381523815338154381553815638157381583815938160381613816238163381643816538166381673816838169381703817138172381733817438175381763817738178381793818038181381823818338184381853818638187381883818938190381913819238193381943819538196381973819838199382003820138202382033820438205382063820738208382093821038211382123821338214382153821638217382183821938220382213822238223382243822538226382273822838229382303823138232382333823438235382363823738238382393824038241382423824338244382453824638247382483824938250382513825238253382543825538256382573825838259382603826138262382633826438265382663826738268382693827038271382723827338274382753827638277382783827938280382813828238283382843828538286382873828838289382903829138292382933829438295382963829738298382993830038301383023830338304383053830638307383083830938310383113831238313383143831538316383173831838319383203832138322383233832438325383263832738328383293833038331383323833338334383353833638337383383833938340383413834238343383443834538346383473834838349383503835138352383533835438355383563835738358383593836038361383623836338364383653836638367383683836938370383713837238373383743837538376383773837838379383803838138382383833838438385383863838738388383893839038391383923839338394383953839638397383983839938400384013840238403384043840538406384073840838409384103841138412384133841438415384163841738418384193842038421384223842338424384253842638427384283842938430384313843238433384343843538436384373843838439384403844138442384433844438445384463844738448384493845038451384523845338454384553845638457384583845938460384613846238463384643846538466384673846838469384703847138472384733847438475384763847738478384793848038481384823848338484384853848638487384883848938490384913849238493384943849538496384973849838499385003850138502385033850438505385063850738508385093851038511385123851338514385153851638517385183851938520385213852238523385243852538526385273852838529385303853138532385333853438535385363853738538385393854038541385423854338544385453854638547385483854938550385513855238553385543855538556385573855838559385603856138562385633856438565385663856738568385693857038571385723857338574385753857638577385783857938580385813858238583385843858538586385873858838589385903859138592385933859438595385963859738598385993860038601386023860338604386053860638607386083860938610386113861238613386143861538616386173861838619386203862138622386233862438625386263862738628386293863038631386323863338634386353863638637386383863938640386413864238643386443864538646386473864838649386503865138652386533865438655386563865738658386593866038661386623866338664386653866638667386683866938670386713867238673386743867538676386773867838679386803868138682386833868438685386863868738688386893869038691386923869338694386953869638697386983869938700387013870238703387043870538706387073870838709387103871138712387133871438715387163871738718387193872038721387223872338724387253872638727387283872938730387313873238733387343873538736387373873838739387403874138742387433874438745387463874738748387493875038751387523875338754387553875638757387583875938760387613876238763387643876538766387673876838769387703877138772387733877438775387763877738778387793878038781387823878338784387853878638787387883878938790387913879238793387943879538796387973879838799388003880138802388033880438805388063880738808388093881038811388123881338814388153881638817388183881938820388213882238823388243882538826388273882838829388303883138832388333883438835388363883738838388393884038841388423884338844388453884638847388483884938850388513885238853388543885538856388573885838859388603886138862388633886438865388663886738868388693887038871388723887338874388753887638877388783887938880388813888238883388843888538886388873888838889388903889138892388933889438895388963889738898388993890038901389023890338904389053890638907389083890938910389113891238913389143891538916389173891838919389203892138922389233892438925389263892738928389293893038931389323893338934389353893638937389383893938940389413894238943389443894538946389473894838949389503895138952389533895438955389563895738958389593896038961389623896338964389653896638967389683896938970389713897238973389743897538976389773897838979389803898138982389833898438985389863898738988389893899038991389923899338994389953899638997389983899939000390013900239003390043900539006390073900839009390103901139012390133901439015390163901739018390193902039021390223902339024390253902639027390283902939030390313903239033390343903539036390373903839039390403904139042390433904439045390463904739048390493905039051390523905339054390553905639057390583905939060390613906239063390643906539066390673906839069390703907139072390733907439075390763907739078390793908039081390823908339084390853908639087390883908939090390913909239093390943909539096390973909839099391003910139102391033910439105391063910739108391093911039111391123911339114391153911639117391183911939120391213912239123391243912539126391273912839129391303913139132391333913439135391363913739138391393914039141391423914339144391453914639147391483914939150391513915239153391543915539156391573915839159391603916139162391633916439165391663916739168391693917039171391723917339174391753917639177391783917939180391813918239183391843918539186391873918839189391903919139192391933919439195391963919739198391993920039201392023920339204392053920639207392083920939210392113921239213392143921539216392173921839219392203922139222392233922439225392263922739228392293923039231392323923339234392353923639237392383923939240392413924239243392443924539246392473924839249392503925139252392533925439255392563925739258392593926039261392623926339264392653926639267392683926939270392713927239273392743927539276392773927839279392803928139282392833928439285392863928739288392893929039291392923929339294392953929639297392983929939300393013930239303393043930539306393073930839309393103931139312393133931439315393163931739318393193932039321393223932339324393253932639327393283932939330393313933239333393343933539336393373933839339393403934139342393433934439345393463934739348393493935039351393523935339354393553935639357393583935939360393613936239363393643936539366393673936839369393703937139372393733937439375393763937739378393793938039381393823938339384393853938639387393883938939390393913939239393393943939539396393973939839399394003940139402394033940439405394063940739408394093941039411394123941339414394153941639417394183941939420394213942239423394243942539426394273942839429394303943139432394333943439435394363943739438394393944039441394423944339444394453944639447394483944939450394513945239453394543945539456394573945839459394603946139462394633946439465394663946739468394693947039471394723947339474394753947639477394783947939480394813948239483394843948539486394873948839489394903949139492394933949439495394963949739498394993950039501395023950339504395053950639507395083950939510395113951239513395143951539516395173951839519395203952139522395233952439525395263952739528395293953039531395323953339534395353953639537395383953939540395413954239543395443954539546395473954839549395503955139552395533955439555395563955739558395593956039561395623956339564395653956639567395683956939570395713957239573395743957539576395773957839579395803958139582395833958439585395863958739588395893959039591395923959339594395953959639597395983959939600396013960239603396043960539606396073960839609396103961139612396133961439615396163961739618396193962039621396223962339624396253962639627396283962939630396313963239633396343963539636396373963839639396403964139642396433964439645396463964739648396493965039651396523965339654396553965639657396583965939660396613966239663396643966539666396673966839669396703967139672396733967439675396763967739678396793968039681396823968339684396853968639687396883968939690396913969239693396943969539696396973969839699397003970139702397033970439705397063970739708397093971039711397123971339714397153971639717397183971939720397213972239723397243972539726397273972839729397303973139732397333973439735397363973739738397393974039741397423974339744397453974639747397483974939750397513975239753397543975539756397573975839759397603976139762397633976439765397663976739768397693977039771397723977339774397753977639777397783977939780397813978239783397843978539786397873978839789397903979139792397933979439795397963979739798397993980039801398023980339804398053980639807398083980939810398113981239813398143981539816398173981839819398203982139822398233982439825398263982739828398293983039831398323983339834398353983639837398383983939840398413984239843398443984539846398473984839849398503985139852398533985439855398563985739858398593986039861398623986339864398653986639867398683986939870398713987239873398743987539876398773987839879398803988139882398833988439885398863988739888398893989039891398923989339894398953989639897398983989939900399013990239903399043990539906399073990839909399103991139912399133991439915399163991739918399193992039921399223992339924399253992639927399283992939930399313993239933399343993539936399373993839939399403994139942399433994439945399463994739948399493995039951399523995339954399553995639957399583995939960399613996239963399643996539966399673996839969399703997139972399733997439975399763997739978399793998039981399823998339984399853998639987399883998939990399913999239993399943999539996399973999839999400004000140002400034000440005400064000740008400094001040011400124001340014400154001640017400184001940020400214002240023400244002540026400274002840029400304003140032400334003440035400364003740038400394004040041400424004340044400454004640047400484004940050400514005240053400544005540056400574005840059400604006140062400634006440065400664006740068400694007040071400724007340074400754007640077400784007940080400814008240083400844008540086400874008840089400904009140092400934009440095400964009740098400994010040101401024010340104401054010640107401084010940110401114011240113401144011540116401174011840119401204012140122401234012440125401264012740128401294013040131401324013340134401354013640137401384013940140401414014240143401444014540146401474014840149401504015140152401534015440155401564015740158401594016040161401624016340164401654016640167401684016940170401714017240173401744017540176401774017840179401804018140182401834018440185401864018740188401894019040191401924019340194401954019640197401984019940200402014020240203402044020540206402074020840209402104021140212402134021440215402164021740218402194022040221402224022340224402254022640227402284022940230402314023240233402344023540236402374023840239402404024140242402434024440245402464024740248402494025040251402524025340254402554025640257402584025940260402614026240263402644026540266402674026840269402704027140272402734027440275402764027740278402794028040281402824028340284402854028640287402884028940290402914029240293402944029540296402974029840299403004030140302403034030440305403064030740308403094031040311403124031340314403154031640317403184031940320403214032240323403244032540326403274032840329403304033140332403334033440335403364033740338403394034040341403424034340344403454034640347403484034940350403514035240353403544035540356403574035840359403604036140362403634036440365403664036740368403694037040371403724037340374403754037640377403784037940380403814038240383403844038540386403874038840389403904039140392403934039440395403964039740398403994040040401404024040340404404054040640407404084040940410404114041240413404144041540416404174041840419404204042140422404234042440425404264042740428404294043040431404324043340434404354043640437404384043940440404414044240443404444044540446404474044840449404504045140452404534045440455404564045740458404594046040461404624046340464404654046640467404684046940470404714047240473404744047540476404774047840479404804048140482404834048440485404864048740488404894049040491404924049340494404954049640497404984049940500405014050240503405044050540506405074050840509405104051140512405134051440515405164051740518405194052040521405224052340524405254052640527405284052940530405314053240533405344053540536405374053840539405404054140542405434054440545405464054740548405494055040551405524055340554405554055640557405584055940560405614056240563405644056540566405674056840569405704057140572405734057440575405764057740578405794058040581405824058340584405854058640587405884058940590405914059240593405944059540596405974059840599406004060140602406034060440605406064060740608406094061040611406124061340614406154061640617406184061940620406214062240623406244062540626406274062840629406304063140632406334063440635406364063740638406394064040641406424064340644406454064640647406484064940650406514065240653406544065540656406574065840659406604066140662406634066440665406664066740668406694067040671406724067340674406754067640677406784067940680406814068240683406844068540686406874068840689406904069140692406934069440695406964069740698406994070040701407024070340704407054070640707407084070940710407114071240713407144071540716407174071840719407204072140722407234072440725407264072740728407294073040731407324073340734407354073640737407384073940740407414074240743407444074540746407474074840749407504075140752407534075440755407564075740758407594076040761407624076340764407654076640767407684076940770407714077240773407744077540776407774077840779407804078140782407834078440785407864078740788407894079040791407924079340794407954079640797407984079940800408014080240803408044080540806408074080840809408104081140812408134081440815408164081740818408194082040821408224082340824408254082640827408284082940830408314083240833408344083540836408374083840839408404084140842408434084440845408464084740848408494085040851408524085340854408554085640857408584085940860408614086240863408644086540866408674086840869408704087140872408734087440875408764087740878408794088040881408824088340884408854088640887408884088940890408914089240893408944089540896408974089840899409004090140902409034090440905409064090740908409094091040911409124091340914409154091640917409184091940920409214092240923409244092540926409274092840929409304093140932409334093440935409364093740938409394094040941409424094340944409454094640947409484094940950409514095240953409544095540956409574095840959409604096140962409634096440965409664096740968409694097040971409724097340974409754097640977409784097940980409814098240983409844098540986409874098840989409904099140992409934099440995409964099740998409994100041001410024100341004410054100641007410084100941010410114101241013410144101541016410174101841019410204102141022410234102441025410264102741028410294103041031410324103341034410354103641037410384103941040410414104241043410444104541046410474104841049410504105141052410534105441055410564105741058410594106041061410624106341064410654106641067410684106941070410714107241073410744107541076410774107841079410804108141082410834108441085410864108741088410894109041091410924109341094410954109641097410984109941100411014110241103411044110541106411074110841109411104111141112411134111441115411164111741118411194112041121411224112341124411254112641127411284112941130411314113241133411344113541136411374113841139411404114141142411434114441145411464114741148411494115041151411524115341154411554115641157411584115941160411614116241163411644116541166411674116841169411704117141172411734117441175411764117741178411794118041181411824118341184411854118641187411884118941190411914119241193411944119541196411974119841199412004120141202412034120441205412064120741208412094121041211412124121341214412154121641217412184121941220412214122241223412244122541226412274122841229412304123141232412334123441235412364123741238412394124041241412424124341244412454124641247412484124941250412514125241253412544125541256412574125841259412604126141262412634126441265412664126741268412694127041271412724127341274412754127641277412784127941280412814128241283412844128541286412874128841289412904129141292412934129441295412964129741298412994130041301413024130341304413054130641307413084130941310413114131241313413144131541316413174131841319413204132141322413234132441325413264132741328413294133041331413324133341334413354133641337413384133941340413414134241343413444134541346413474134841349413504135141352413534135441355413564135741358413594136041361413624136341364413654136641367413684136941370413714137241373413744137541376413774137841379413804138141382413834138441385413864138741388413894139041391413924139341394413954139641397413984139941400414014140241403414044140541406414074140841409414104141141412414134141441415414164141741418414194142041421414224142341424414254142641427414284142941430414314143241433414344143541436414374143841439414404144141442414434144441445414464144741448414494145041451414524145341454414554145641457414584145941460414614146241463414644146541466414674146841469414704147141472414734147441475414764147741478414794148041481414824148341484414854148641487414884148941490414914149241493414944149541496414974149841499415004150141502415034150441505415064150741508415094151041511415124151341514415154151641517415184151941520415214152241523415244152541526415274152841529415304153141532415334153441535415364153741538415394154041541415424154341544415454154641547415484154941550415514155241553415544155541556415574155841559415604156141562415634156441565415664156741568415694157041571415724157341574415754157641577415784157941580415814158241583415844158541586415874158841589415904159141592415934159441595415964159741598415994160041601416024160341604416054160641607416084160941610416114161241613416144161541616416174161841619416204162141622416234162441625416264162741628416294163041631416324163341634416354163641637416384163941640416414164241643416444164541646416474164841649416504165141652416534165441655416564165741658416594166041661416624166341664416654166641667416684166941670416714167241673416744167541676416774167841679416804168141682416834168441685416864168741688416894169041691416924169341694416954169641697416984169941700417014170241703417044170541706417074170841709417104171141712417134171441715417164171741718417194172041721417224172341724417254172641727417284172941730417314173241733417344173541736417374173841739417404174141742417434174441745417464174741748417494175041751417524175341754417554175641757417584175941760417614176241763417644176541766417674176841769417704177141772417734177441775417764177741778417794178041781417824178341784417854178641787417884178941790417914179241793417944179541796417974179841799418004180141802418034180441805418064180741808418094181041811418124181341814418154181641817418184181941820418214182241823418244182541826418274182841829418304183141832418334183441835418364183741838418394184041841418424184341844418454184641847418484184941850418514185241853418544185541856418574185841859418604186141862418634186441865418664186741868418694187041871418724187341874418754187641877418784187941880418814188241883418844188541886418874188841889418904189141892418934189441895418964189741898418994190041901419024190341904419054190641907419084190941910419114191241913419144191541916419174191841919419204192141922419234192441925419264192741928419294193041931419324193341934419354193641937419384193941940419414194241943419444194541946419474194841949419504195141952419534195441955419564195741958419594196041961419624196341964419654196641967419684196941970419714197241973419744197541976419774197841979419804198141982419834198441985419864198741988419894199041991419924199341994419954199641997419984199942000420014200242003420044200542006420074200842009420104201142012420134201442015420164201742018420194202042021420224202342024420254202642027420284202942030420314203242033420344203542036420374203842039420404204142042420434204442045420464204742048420494205042051420524205342054420554205642057420584205942060420614206242063420644206542066420674206842069420704207142072420734207442075420764207742078420794208042081420824208342084420854208642087420884208942090420914209242093420944209542096420974209842099421004210142102421034210442105421064210742108421094211042111421124211342114421154211642117421184211942120421214212242123421244212542126421274212842129421304213142132421334213442135421364213742138421394214042141421424214342144421454214642147421484214942150421514215242153421544215542156421574215842159421604216142162421634216442165421664216742168421694217042171421724217342174421754217642177421784217942180421814218242183421844218542186421874218842189421904219142192421934219442195421964219742198421994220042201422024220342204422054220642207422084220942210422114221242213422144221542216422174221842219422204222142222422234222442225422264222742228422294223042231422324223342234422354223642237422384223942240422414224242243422444224542246422474224842249422504225142252422534225442255422564225742258422594226042261422624226342264422654226642267422684226942270422714227242273422744227542276422774227842279422804228142282422834228442285422864228742288422894229042291422924229342294422954229642297422984229942300423014230242303423044230542306423074230842309423104231142312423134231442315423164231742318423194232042321423224232342324423254232642327423284232942330423314233242333423344233542336423374233842339423404234142342423434234442345423464234742348423494235042351423524235342354423554235642357423584235942360423614236242363423644236542366423674236842369423704237142372423734237442375423764237742378423794238042381423824238342384423854238642387423884238942390423914239242393423944239542396423974239842399424004240142402424034240442405424064240742408424094241042411424124241342414424154241642417424184241942420424214242242423424244242542426424274242842429424304243142432424334243442435424364243742438424394244042441424424244342444424454244642447424484244942450424514245242453424544245542456424574245842459424604246142462424634246442465424664246742468424694247042471424724247342474424754247642477424784247942480424814248242483424844248542486424874248842489424904249142492424934249442495424964249742498424994250042501425024250342504425054250642507425084250942510425114251242513425144251542516425174251842519425204252142522425234252442525425264252742528425294253042531425324253342534425354253642537425384253942540425414254242543425444254542546425474254842549425504255142552425534255442555425564255742558425594256042561425624256342564425654256642567425684256942570425714257242573425744257542576425774257842579425804258142582425834258442585425864258742588425894259042591425924259342594425954259642597425984259942600426014260242603426044260542606426074260842609426104261142612426134261442615426164261742618426194262042621426224262342624426254262642627426284262942630426314263242633426344263542636426374263842639426404264142642426434264442645426464264742648426494265042651426524265342654426554265642657426584265942660426614266242663426644266542666426674266842669426704267142672426734267442675426764267742678426794268042681426824268342684426854268642687426884268942690426914269242693426944269542696426974269842699427004270142702427034270442705427064270742708427094271042711427124271342714427154271642717427184271942720427214272242723427244272542726427274272842729427304273142732427334273442735427364273742738427394274042741427424274342744427454274642747427484274942750427514275242753427544275542756427574275842759427604276142762427634276442765427664276742768427694277042771427724277342774427754277642777427784277942780427814278242783427844278542786427874278842789427904279142792427934279442795427964279742798427994280042801428024280342804428054280642807428084280942810428114281242813428144281542816428174281842819428204282142822428234282442825428264282742828428294283042831428324283342834428354283642837428384283942840428414284242843428444284542846428474284842849428504285142852428534285442855428564285742858428594286042861428624286342864428654286642867428684286942870428714287242873428744287542876428774287842879428804288142882428834288442885428864288742888428894289042891428924289342894428954289642897428984289942900429014290242903429044290542906429074290842909429104291142912429134291442915429164291742918429194292042921429224292342924429254292642927429284292942930429314293242933429344293542936429374293842939429404294142942429434294442945429464294742948429494295042951429524295342954429554295642957429584295942960429614296242963429644296542966429674296842969429704297142972429734297442975429764297742978429794298042981429824298342984429854298642987429884298942990429914299242993429944299542996429974299842999430004300143002430034300443005430064300743008430094301043011430124301343014430154301643017430184301943020430214302243023430244302543026430274302843029430304303143032430334303443035430364303743038430394304043041430424304343044430454304643047430484304943050430514305243053430544305543056430574305843059430604306143062430634306443065430664306743068430694307043071430724307343074430754307643077430784307943080430814308243083430844308543086430874308843089430904309143092430934309443095430964309743098430994310043101431024310343104431054310643107431084310943110431114311243113431144311543116431174311843119431204312143122431234312443125431264312743128431294313043131431324313343134431354313643137431384313943140431414314243143431444314543146431474314843149431504315143152431534315443155431564315743158431594316043161431624316343164431654316643167431684316943170431714317243173431744317543176431774317843179431804318143182431834318443185431864318743188431894319043191431924319343194431954319643197431984319943200432014320243203432044320543206432074320843209432104321143212432134321443215432164321743218432194322043221432224322343224432254322643227432284322943230432314323243233432344323543236432374323843239432404324143242432434324443245432464324743248432494325043251432524325343254432554325643257432584325943260432614326243263432644326543266432674326843269432704327143272432734327443275432764327743278432794328043281432824328343284432854328643287432884328943290432914329243293432944329543296432974329843299433004330143302433034330443305433064330743308433094331043311433124331343314433154331643317433184331943320433214332243323433244332543326433274332843329433304333143332433334333443335433364333743338433394334043341433424334343344433454334643347433484334943350433514335243353433544335543356433574335843359433604336143362433634336443365433664336743368433694337043371433724337343374433754337643377433784337943380433814338243383433844338543386433874338843389433904339143392433934339443395433964339743398433994340043401434024340343404434054340643407434084340943410434114341243413434144341543416434174341843419434204342143422434234342443425434264342743428434294343043431434324343343434434354343643437434384343943440434414344243443434444344543446434474344843449434504345143452434534345443455434564345743458434594346043461434624346343464434654346643467434684346943470434714347243473434744347543476434774347843479434804348143482434834348443485434864348743488434894349043491434924349343494434954349643497434984349943500435014350243503435044350543506435074350843509435104351143512435134351443515435164351743518435194352043521435224352343524435254352643527435284352943530435314353243533435344353543536435374353843539435404354143542435434354443545435464354743548435494355043551435524355343554435554355643557435584355943560435614356243563435644356543566435674356843569435704357143572435734357443575435764357743578435794358043581435824358343584435854358643587435884358943590435914359243593435944359543596435974359843599436004360143602436034360443605436064360743608436094361043611436124361343614436154361643617436184361943620436214362243623436244362543626436274362843629436304363143632436334363443635436364363743638436394364043641436424364343644436454364643647436484364943650436514365243653436544365543656436574365843659436604366143662436634366443665436664366743668436694367043671436724367343674436754367643677436784367943680436814368243683436844368543686436874368843689436904369143692436934369443695436964369743698436994370043701437024370343704437054370643707437084370943710437114371243713437144371543716437174371843719437204372143722437234372443725437264372743728437294373043731437324373343734437354373643737437384373943740437414374243743437444374543746437474374843749437504375143752437534375443755437564375743758437594376043761437624376343764437654376643767437684376943770437714377243773437744377543776437774377843779437804378143782437834378443785437864378743788437894379043791437924379343794437954379643797437984379943800438014380243803438044380543806438074380843809438104381143812438134381443815438164381743818438194382043821438224382343824438254382643827438284382943830438314383243833438344383543836438374383843839438404384143842438434384443845438464384743848438494385043851438524385343854438554385643857438584385943860438614386243863438644386543866438674386843869438704387143872438734387443875438764387743878438794388043881438824388343884438854388643887438884388943890438914389243893438944389543896438974389843899439004390143902439034390443905439064390743908439094391043911439124391343914439154391643917439184391943920439214392243923439244392543926439274392843929439304393143932439334393443935439364393743938439394394043941439424394343944439454394643947439484394943950439514395243953439544395543956439574395843959439604396143962439634396443965439664396743968439694397043971439724397343974439754397643977439784397943980439814398243983439844398543986439874398843989439904399143992439934399443995439964399743998439994400044001440024400344004440054400644007440084400944010440114401244013440144401544016440174401844019440204402144022440234402444025440264402744028440294403044031440324403344034440354403644037440384403944040440414404244043440444404544046440474404844049440504405144052440534405444055440564405744058440594406044061440624406344064440654406644067440684406944070440714407244073440744407544076440774407844079440804408144082440834408444085440864408744088440894409044091440924409344094440954409644097440984409944100441014410244103441044410544106441074410844109441104411144112441134411444115441164411744118441194412044121441224412344124441254412644127441284412944130441314413244133441344413544136441374413844139441404414144142441434414444145441464414744148441494415044151441524415344154441554415644157441584415944160441614416244163441644416544166441674416844169441704417144172441734417444175441764417744178441794418044181441824418344184441854418644187441884418944190441914419244193441944419544196441974419844199442004420144202442034420444205442064420744208442094421044211442124421344214442154421644217442184421944220442214422244223442244422544226442274422844229442304423144232442334423444235442364423744238442394424044241442424424344244442454424644247442484424944250442514425244253442544425544256442574425844259442604426144262442634426444265442664426744268442694427044271442724427344274442754427644277442784427944280442814428244283442844428544286442874428844289442904429144292442934429444295442964429744298442994430044301443024430344304443054430644307443084430944310443114431244313443144431544316443174431844319443204432144322443234432444325443264432744328443294433044331443324433344334443354433644337443384433944340443414434244343443444434544346443474434844349443504435144352443534435444355443564435744358443594436044361443624436344364443654436644367443684436944370443714437244373443744437544376443774437844379443804438144382443834438444385443864438744388443894439044391443924439344394443954439644397443984439944400444014440244403444044440544406444074440844409444104441144412444134441444415444164441744418444194442044421444224442344424444254442644427444284442944430444314443244433444344443544436444374443844439444404444144442444434444444445444464444744448444494445044451444524445344454444554445644457444584445944460444614446244463444644446544466444674446844469444704447144472444734447444475444764447744478444794448044481444824448344484444854448644487444884448944490444914449244493444944449544496444974449844499445004450144502445034450444505445064450744508445094451044511445124451344514445154451644517445184451944520445214452244523445244452544526445274452844529445304453144532445334453444535445364453744538445394454044541445424454344544445454454644547445484454944550445514455244553445544455544556445574455844559445604456144562445634456444565445664456744568445694457044571445724457344574445754457644577445784457944580445814458244583445844458544586445874458844589445904459144592445934459444595445964459744598445994460044601446024460344604446054460644607446084460944610446114461244613446144461544616446174461844619446204462144622446234462444625446264462744628446294463044631446324463344634446354463644637446384463944640446414464244643446444464544646446474464844649446504465144652446534465444655446564465744658446594466044661446624466344664446654466644667446684466944670446714467244673446744467544676446774467844679446804468144682446834468444685446864468744688446894469044691446924469344694446954469644697446984469944700447014470244703447044470544706447074470844709447104471144712447134471444715447164471744718447194472044721447224472344724447254472644727447284472944730447314473244733447344473544736447374473844739447404474144742447434474444745447464474744748447494475044751447524475344754447554475644757447584475944760447614476244763447644476544766447674476844769447704477144772447734477444775447764477744778447794478044781447824478344784447854478644787447884478944790447914479244793447944479544796447974479844799448004480144802448034480444805448064480744808448094481044811448124481344814448154481644817448184481944820448214482244823448244482544826448274482844829448304483144832448334483444835448364483744838448394484044841448424484344844448454484644847448484484944850448514485244853448544485544856448574485844859448604486144862448634486444865448664486744868448694487044871448724487344874448754487644877448784487944880448814488244883448844488544886448874488844889448904489144892448934489444895448964489744898448994490044901449024490344904449054490644907449084490944910449114491244913449144491544916449174491844919449204492144922449234492444925449264492744928449294493044931449324493344934449354493644937449384493944940449414494244943449444494544946449474494844949449504495144952449534495444955449564495744958449594496044961449624496344964449654496644967449684496944970449714497244973449744497544976449774497844979449804498144982449834498444985449864498744988449894499044991449924499344994449954499644997449984499945000450014500245003450044500545006450074500845009450104501145012450134501445015450164501745018450194502045021450224502345024450254502645027450284502945030450314503245033450344503545036450374503845039450404504145042450434504445045450464504745048450494505045051450524505345054450554505645057450584505945060450614506245063450644506545066450674506845069450704507145072450734507445075450764507745078450794508045081450824508345084450854508645087450884508945090450914509245093450944509545096450974509845099451004510145102451034510445105451064510745108451094511045111451124511345114451154511645117451184511945120451214512245123451244512545126451274512845129451304513145132451334513445135451364513745138451394514045141451424514345144451454514645147451484514945150451514515245153451544515545156451574515845159451604516145162451634516445165451664516745168451694517045171451724517345174451754517645177451784517945180451814518245183451844518545186451874518845189451904519145192451934519445195451964519745198451994520045201452024520345204452054520645207452084520945210452114521245213452144521545216452174521845219452204522145222452234522445225452264522745228452294523045231452324523345234452354523645237452384523945240452414524245243452444524545246452474524845249452504525145252452534525445255452564525745258452594526045261452624526345264452654526645267452684526945270452714527245273452744527545276452774527845279452804528145282452834528445285452864528745288452894529045291452924529345294452954529645297452984529945300453014530245303453044530545306453074530845309453104531145312453134531445315453164531745318453194532045321453224532345324453254532645327453284532945330453314533245333453344533545336453374533845339453404534145342453434534445345453464534745348453494535045351453524535345354453554535645357453584535945360453614536245363453644536545366453674536845369453704537145372453734537445375453764537745378453794538045381453824538345384453854538645387453884538945390453914539245393453944539545396453974539845399454004540145402454034540445405454064540745408454094541045411454124541345414454154541645417454184541945420454214542245423454244542545426454274542845429454304543145432454334543445435454364543745438454394544045441454424544345444454454544645447454484544945450454514545245453454544545545456454574545845459454604546145462454634546445465454664546745468454694547045471454724547345474454754547645477454784547945480454814548245483454844548545486454874548845489454904549145492454934549445495454964549745498454994550045501455024550345504455054550645507455084550945510455114551245513455144551545516455174551845519455204552145522455234552445525455264552745528455294553045531455324553345534455354553645537455384553945540455414554245543455444554545546455474554845549455504555145552455534555445555455564555745558455594556045561455624556345564455654556645567455684556945570455714557245573455744557545576455774557845579455804558145582455834558445585455864558745588455894559045591455924559345594455954559645597455984559945600456014560245603456044560545606456074560845609456104561145612456134561445615456164561745618456194562045621456224562345624456254562645627456284562945630456314563245633456344563545636456374563845639456404564145642456434564445645456464564745648456494565045651456524565345654456554565645657456584565945660456614566245663456644566545666456674566845669456704567145672456734567445675456764567745678456794568045681456824568345684456854568645687456884568945690456914569245693456944569545696456974569845699457004570145702457034570445705457064570745708457094571045711457124571345714457154571645717457184571945720457214572245723457244572545726457274572845729457304573145732457334573445735457364573745738457394574045741457424574345744457454574645747457484574945750457514575245753457544575545756457574575845759457604576145762457634576445765457664576745768457694577045771457724577345774457754577645777457784577945780457814578245783457844578545786457874578845789457904579145792457934579445795457964579745798457994580045801458024580345804458054580645807458084580945810458114581245813458144581545816458174581845819458204582145822458234582445825458264582745828458294583045831458324583345834458354583645837458384583945840458414584245843458444584545846458474584845849458504585145852458534585445855458564585745858458594586045861458624586345864458654586645867458684586945870458714587245873458744587545876458774587845879458804588145882458834588445885458864588745888458894589045891458924589345894458954589645897458984589945900459014590245903459044590545906459074590845909459104591145912459134591445915459164591745918459194592045921459224592345924459254592645927459284592945930459314593245933459344593545936459374593845939459404594145942459434594445945459464594745948459494595045951459524595345954459554595645957459584595945960459614596245963459644596545966459674596845969459704597145972459734597445975459764597745978459794598045981459824598345984459854598645987459884598945990459914599245993459944599545996459974599845999460004600146002460034600446005460064600746008460094601046011460124601346014460154601646017460184601946020460214602246023460244602546026460274602846029460304603146032460334603446035460364603746038460394604046041460424604346044460454604646047460484604946050460514605246053460544605546056460574605846059460604606146062460634606446065460664606746068460694607046071460724607346074460754607646077460784607946080460814608246083460844608546086460874608846089460904609146092460934609446095460964609746098460994610046101461024610346104461054610646107461084610946110461114611246113461144611546116461174611846119461204612146122461234612446125461264612746128461294613046131461324613346134461354613646137461384613946140461414614246143461444614546146461474614846149461504615146152461534615446155461564615746158461594616046161461624616346164461654616646167461684616946170461714617246173461744617546176461774617846179461804618146182461834618446185461864618746188461894619046191461924619346194461954619646197461984619946200462014620246203462044620546206462074620846209462104621146212462134621446215462164621746218462194622046221462224622346224462254622646227462284622946230462314623246233462344623546236462374623846239462404624146242462434624446245462464624746248462494625046251462524625346254462554625646257462584625946260462614626246263462644626546266462674626846269462704627146272462734627446275462764627746278462794628046281462824628346284462854628646287462884628946290462914629246293462944629546296462974629846299463004630146302463034630446305463064630746308463094631046311463124631346314463154631646317463184631946320463214632246323463244632546326463274632846329463304633146332463334633446335463364633746338463394634046341463424634346344463454634646347463484634946350463514635246353463544635546356463574635846359463604636146362463634636446365463664636746368463694637046371463724637346374463754637646377463784637946380463814638246383463844638546386463874638846389463904639146392463934639446395463964639746398463994640046401464024640346404464054640646407464084640946410464114641246413464144641546416464174641846419464204642146422464234642446425464264642746428464294643046431464324643346434464354643646437464384643946440464414644246443464444644546446464474644846449464504645146452464534645446455464564645746458464594646046461464624646346464464654646646467464684646946470464714647246473464744647546476464774647846479464804648146482464834648446485464864648746488464894649046491464924649346494464954649646497464984649946500465014650246503465044650546506465074650846509465104651146512465134651446515465164651746518465194652046521465224652346524465254652646527465284652946530465314653246533465344653546536465374653846539465404654146542465434654446545465464654746548465494655046551465524655346554465554655646557465584655946560465614656246563465644656546566465674656846569465704657146572465734657446575465764657746578465794658046581465824658346584465854658646587465884658946590465914659246593465944659546596465974659846599466004660146602466034660446605466064660746608466094661046611466124661346614466154661646617466184661946620466214662246623466244662546626466274662846629466304663146632466334663446635466364663746638466394664046641466424664346644466454664646647466484664946650466514665246653466544665546656466574665846659466604666146662466634666446665466664666746668466694667046671466724667346674466754667646677466784667946680466814668246683466844668546686466874668846689466904669146692466934669446695466964669746698466994670046701467024670346704467054670646707467084670946710467114671246713467144671546716467174671846719467204672146722467234672446725467264672746728467294673046731467324673346734467354673646737467384673946740467414674246743467444674546746467474674846749467504675146752467534675446755467564675746758467594676046761467624676346764467654676646767467684676946770467714677246773467744677546776467774677846779467804678146782467834678446785467864678746788467894679046791467924679346794467954679646797467984679946800468014680246803468044680546806468074680846809468104681146812468134681446815468164681746818468194682046821468224682346824468254682646827468284682946830468314683246833468344683546836468374683846839468404684146842468434684446845468464684746848468494685046851468524685346854468554685646857468584685946860468614686246863468644686546866468674686846869468704687146872468734687446875468764687746878468794688046881468824688346884468854688646887468884688946890468914689246893468944689546896468974689846899469004690146902469034690446905469064690746908469094691046911469124691346914469154691646917469184691946920469214692246923469244692546926469274692846929469304693146932469334693446935469364693746938469394694046941469424694346944469454694646947469484694946950469514695246953469544695546956469574695846959469604696146962469634696446965469664696746968469694697046971469724697346974469754697646977469784697946980469814698246983469844698546986469874698846989469904699146992469934699446995469964699746998469994700047001470024700347004470054700647007470084700947010470114701247013470144701547016470174701847019470204702147022470234702447025470264702747028470294703047031470324703347034470354703647037470384703947040470414704247043470444704547046470474704847049470504705147052470534705447055470564705747058470594706047061470624706347064470654706647067470684706947070470714707247073470744707547076470774707847079470804708147082470834708447085470864708747088470894709047091470924709347094470954709647097470984709947100471014710247103471044710547106471074710847109471104711147112471134711447115471164711747118471194712047121471224712347124471254712647127471284712947130471314713247133471344713547136471374713847139471404714147142471434714447145471464714747148471494715047151471524715347154471554715647157471584715947160471614716247163471644716547166471674716847169471704717147172471734717447175471764717747178471794718047181471824718347184471854718647187471884718947190471914719247193471944719547196471974719847199472004720147202472034720447205472064720747208472094721047211472124721347214472154721647217472184721947220472214722247223472244722547226472274722847229472304723147232472334723447235472364723747238472394724047241472424724347244472454724647247472484724947250472514725247253472544725547256472574725847259472604726147262472634726447265472664726747268472694727047271472724727347274472754727647277472784727947280472814728247283472844728547286472874728847289472904729147292472934729447295472964729747298472994730047301473024730347304473054730647307473084730947310473114731247313473144731547316473174731847319473204732147322473234732447325473264732747328473294733047331473324733347334473354733647337473384733947340473414734247343473444734547346473474734847349473504735147352473534735447355473564735747358473594736047361473624736347364473654736647367473684736947370473714737247373473744737547376473774737847379473804738147382473834738447385473864738747388473894739047391473924739347394473954739647397473984739947400474014740247403474044740547406474074740847409474104741147412474134741447415474164741747418474194742047421474224742347424474254742647427474284742947430474314743247433474344743547436474374743847439474404744147442474434744447445474464744747448474494745047451474524745347454474554745647457474584745947460474614746247463474644746547466474674746847469474704747147472474734747447475474764747747478474794748047481474824748347484474854748647487474884748947490474914749247493474944749547496474974749847499475004750147502475034750447505475064750747508475094751047511475124751347514475154751647517475184751947520475214752247523475244752547526475274752847529475304753147532475334753447535475364753747538475394754047541475424754347544475454754647547475484754947550475514755247553475544755547556475574755847559475604756147562475634756447565475664756747568475694757047571475724757347574475754757647577475784757947580475814758247583475844758547586475874758847589475904759147592475934759447595475964759747598475994760047601476024760347604476054760647607476084760947610476114761247613476144761547616476174761847619476204762147622476234762447625476264762747628476294763047631476324763347634476354763647637476384763947640476414764247643476444764547646476474764847649476504765147652476534765447655476564765747658476594766047661476624766347664476654766647667476684766947670476714767247673476744767547676476774767847679476804768147682476834768447685476864768747688476894769047691476924769347694476954769647697476984769947700477014770247703477044770547706477074770847709477104771147712477134771447715477164771747718477194772047721477224772347724477254772647727477284772947730477314773247733477344773547736477374773847739477404774147742477434774447745477464774747748477494775047751477524775347754477554775647757477584775947760477614776247763477644776547766477674776847769477704777147772477734777447775477764777747778477794778047781477824778347784477854778647787477884778947790477914779247793477944779547796477974779847799478004780147802478034780447805478064780747808478094781047811478124781347814478154781647817478184781947820478214782247823478244782547826478274782847829478304783147832478334783447835478364783747838478394784047841478424784347844478454784647847478484784947850478514785247853478544785547856478574785847859478604786147862478634786447865478664786747868478694787047871478724787347874478754787647877478784787947880478814788247883478844788547886478874788847889478904789147892478934789447895478964789747898478994790047901479024790347904479054790647907479084790947910479114791247913479144791547916479174791847919479204792147922479234792447925479264792747928479294793047931479324793347934479354793647937479384793947940479414794247943479444794547946479474794847949479504795147952479534795447955479564795747958479594796047961479624796347964479654796647967479684796947970479714797247973479744797547976479774797847979479804798147982479834798447985479864798747988479894799047991479924799347994479954799647997479984799948000480014800248003480044800548006480074800848009480104801148012480134801448015480164801748018480194802048021480224802348024480254802648027480284802948030480314803248033480344803548036480374803848039480404804148042480434804448045480464804748048480494805048051480524805348054480554805648057480584805948060480614806248063480644806548066480674806848069480704807148072480734807448075480764807748078480794808048081480824808348084480854808648087480884808948090480914809248093480944809548096480974809848099481004810148102481034810448105481064810748108481094811048111481124811348114481154811648117481184811948120481214812248123481244812548126481274812848129481304813148132481334813448135481364813748138481394814048141481424814348144481454814648147481484814948150481514815248153481544815548156481574815848159481604816148162481634816448165481664816748168481694817048171481724817348174481754817648177481784817948180481814818248183481844818548186481874818848189481904819148192481934819448195481964819748198481994820048201482024820348204482054820648207482084820948210482114821248213482144821548216482174821848219482204822148222482234822448225482264822748228482294823048231482324823348234482354823648237482384823948240482414824248243482444824548246482474824848249482504825148252482534825448255482564825748258482594826048261482624826348264482654826648267482684826948270482714827248273482744827548276482774827848279482804828148282482834828448285482864828748288482894829048291482924829348294482954829648297482984829948300483014830248303483044830548306483074830848309483104831148312483134831448315483164831748318483194832048321483224832348324483254832648327483284832948330483314833248333483344833548336483374833848339483404834148342483434834448345483464834748348483494835048351483524835348354483554835648357483584835948360483614836248363483644836548366483674836848369483704837148372483734837448375483764837748378483794838048381483824838348384483854838648387483884838948390483914839248393483944839548396483974839848399484004840148402484034840448405484064840748408484094841048411484124841348414484154841648417484184841948420484214842248423484244842548426484274842848429484304843148432484334843448435484364843748438484394844048441484424844348444484454844648447484484844948450484514845248453484544845548456484574845848459484604846148462484634846448465484664846748468484694847048471484724847348474484754847648477484784847948480484814848248483484844848548486484874848848489484904849148492484934849448495484964849748498484994850048501485024850348504485054850648507485084850948510485114851248513485144851548516485174851848519485204852148522485234852448525485264852748528485294853048531485324853348534485354853648537485384853948540485414854248543485444854548546485474854848549485504855148552485534855448555485564855748558485594856048561485624856348564485654856648567485684856948570485714857248573485744857548576485774857848579485804858148582485834858448585485864858748588485894859048591485924859348594485954859648597485984859948600486014860248603486044860548606486074860848609486104861148612486134861448615486164861748618486194862048621486224862348624486254862648627486284862948630486314863248633486344863548636486374863848639486404864148642486434864448645486464864748648486494865048651486524865348654486554865648657486584865948660486614866248663486644866548666486674866848669486704867148672486734867448675486764867748678486794868048681486824868348684486854868648687486884868948690486914869248693486944869548696486974869848699487004870148702487034870448705487064870748708487094871048711487124871348714487154871648717487184871948720487214872248723487244872548726487274872848729487304873148732487334873448735487364873748738487394874048741487424874348744487454874648747487484874948750487514875248753487544875548756487574875848759487604876148762487634876448765487664876748768487694877048771487724877348774487754877648777487784877948780487814878248783487844878548786487874878848789487904879148792487934879448795487964879748798487994880048801488024880348804488054880648807488084880948810488114881248813488144881548816488174881848819488204882148822488234882448825488264882748828488294883048831488324883348834488354883648837488384883948840488414884248843488444884548846488474884848849488504885148852488534885448855488564885748858488594886048861488624886348864488654886648867488684886948870488714887248873488744887548876488774887848879488804888148882488834888448885488864888748888488894889048891488924889348894488954889648897488984889948900489014890248903489044890548906489074890848909489104891148912489134891448915489164891748918489194892048921489224892348924489254892648927489284892948930489314893248933489344893548936489374893848939489404894148942489434894448945489464894748948489494895048951489524895348954489554895648957489584895948960489614896248963489644896548966489674896848969489704897148972489734897448975489764897748978489794898048981489824898348984489854898648987489884898948990489914899248993489944899548996489974899848999490004900149002490034900449005490064900749008490094901049011490124901349014490154901649017490184901949020490214902249023490244902549026490274902849029490304903149032490334903449035490364903749038490394904049041490424904349044490454904649047490484904949050490514905249053490544905549056490574905849059490604906149062490634906449065490664906749068490694907049071490724907349074490754907649077490784907949080490814908249083490844908549086490874908849089490904909149092490934909449095490964909749098490994910049101491024910349104491054910649107491084910949110491114911249113491144911549116491174911849119491204912149122491234912449125491264912749128491294913049131491324913349134491354913649137491384913949140491414914249143491444914549146491474914849149491504915149152491534915449155491564915749158491594916049161491624916349164491654916649167491684916949170491714917249173491744917549176491774917849179491804918149182491834918449185491864918749188491894919049191491924919349194491954919649197491984919949200492014920249203492044920549206492074920849209492104921149212492134921449215492164921749218492194922049221492224922349224492254922649227492284922949230492314923249233492344923549236492374923849239492404924149242492434924449245492464924749248492494925049251492524925349254492554925649257492584925949260492614926249263492644926549266492674926849269492704927149272492734927449275492764927749278492794928049281492824928349284492854928649287492884928949290492914929249293492944929549296492974929849299493004930149302493034930449305493064930749308493094931049311493124931349314493154931649317493184931949320493214932249323493244932549326493274932849329493304933149332493334933449335493364933749338493394934049341493424934349344493454934649347493484934949350493514935249353493544935549356493574935849359493604936149362493634936449365493664936749368493694937049371493724937349374493754937649377493784937949380493814938249383493844938549386493874938849389493904939149392493934939449395493964939749398493994940049401494024940349404494054940649407494084940949410494114941249413494144941549416494174941849419494204942149422494234942449425494264942749428494294943049431494324943349434494354943649437494384943949440494414944249443494444944549446494474944849449494504945149452494534945449455494564945749458494594946049461494624946349464494654946649467494684946949470494714947249473494744947549476494774947849479494804948149482494834948449485494864948749488494894949049491494924949349494494954949649497494984949949500495014950249503495044950549506495074950849509495104951149512495134951449515495164951749518495194952049521495224952349524495254952649527495284952949530495314953249533495344953549536495374953849539495404954149542495434954449545495464954749548495494955049551495524955349554495554955649557495584955949560495614956249563495644956549566495674956849569495704957149572495734957449575495764957749578495794958049581495824958349584495854958649587495884958949590495914959249593495944959549596495974959849599496004960149602496034960449605496064960749608496094961049611496124961349614496154961649617496184961949620496214962249623496244962549626496274962849629496304963149632496334963449635496364963749638496394964049641496424964349644496454964649647496484964949650496514965249653496544965549656496574965849659496604966149662496634966449665496664966749668496694967049671496724967349674496754967649677496784967949680496814968249683496844968549686496874968849689496904969149692496934969449695496964969749698496994970049701497024970349704497054970649707497084970949710497114971249713497144971549716497174971849719497204972149722497234972449725497264972749728497294973049731497324973349734497354973649737497384973949740497414974249743497444974549746497474974849749497504975149752497534975449755497564975749758497594976049761497624976349764497654976649767497684976949770497714977249773497744977549776497774977849779497804978149782497834978449785497864978749788497894979049791497924979349794497954979649797497984979949800498014980249803498044980549806498074980849809498104981149812498134981449815498164981749818498194982049821498224982349824498254982649827498284982949830498314983249833498344983549836498374983849839498404984149842498434984449845498464984749848498494985049851498524985349854498554985649857498584985949860498614986249863498644986549866498674986849869498704987149872498734987449875498764987749878498794988049881498824988349884498854988649887498884988949890498914989249893498944989549896498974989849899499004990149902499034990449905499064990749908499094991049911499124991349914499154991649917499184991949920499214992249923499244992549926499274992849929499304993149932499334993449935499364993749938499394994049941499424994349944499454994649947499484994949950499514995249953499544995549956499574995849959499604996149962499634996449965499664996749968499694997049971499724997349974499754997649977499784997949980499814998249983499844998549986499874998849989499904999149992499934999449995499964999749998499995000050001500025000350004500055000650007500085000950010500115001250013500145001550016500175001850019500205002150022500235002450025500265002750028500295003050031500325003350034500355003650037500385003950040500415004250043500445004550046500475004850049500505005150052500535005450055500565005750058500595006050061500625006350064500655006650067500685006950070500715007250073500745007550076500775007850079500805008150082500835008450085500865008750088500895009050091500925009350094500955009650097500985009950100501015010250103501045010550106501075010850109501105011150112501135011450115501165011750118501195012050121501225012350124501255012650127501285012950130501315013250133501345013550136501375013850139501405014150142501435014450145501465014750148501495015050151501525015350154501555015650157501585015950160501615016250163501645016550166501675016850169501705017150172501735017450175501765017750178501795018050181501825018350184501855018650187501885018950190501915019250193501945019550196501975019850199502005020150202502035020450205502065020750208502095021050211502125021350214502155021650217502185021950220502215022250223502245022550226502275022850229502305023150232502335023450235502365023750238502395024050241502425024350244502455024650247502485024950250502515025250253502545025550256502575025850259502605026150262502635026450265502665026750268502695027050271502725027350274502755027650277502785027950280502815028250283502845028550286502875028850289502905029150292502935029450295502965029750298502995030050301503025030350304503055030650307503085030950310503115031250313503145031550316503175031850319503205032150322503235032450325503265032750328503295033050331503325033350334503355033650337503385033950340503415034250343503445034550346503475034850349503505035150352503535035450355503565035750358503595036050361503625036350364503655036650367503685036950370503715037250373503745037550376503775037850379503805038150382503835038450385503865038750388503895039050391503925039350394503955039650397503985039950400504015040250403504045040550406504075040850409504105041150412504135041450415504165041750418504195042050421504225042350424504255042650427504285042950430504315043250433504345043550436504375043850439504405044150442504435044450445504465044750448504495045050451504525045350454504555045650457504585045950460504615046250463504645046550466504675046850469504705047150472504735047450475504765047750478504795048050481504825048350484504855048650487504885048950490504915049250493504945049550496504975049850499505005050150502505035050450505505065050750508505095051050511505125051350514505155051650517505185051950520505215052250523505245052550526505275052850529505305053150532505335053450535505365053750538505395054050541505425054350544505455054650547505485054950550505515055250553505545055550556505575055850559505605056150562505635056450565505665056750568505695057050571505725057350574505755057650577505785057950580505815058250583505845058550586505875058850589505905059150592505935059450595505965059750598505995060050601506025060350604506055060650607506085060950610506115061250613506145061550616506175061850619506205062150622506235062450625506265062750628506295063050631506325063350634506355063650637506385063950640506415064250643506445064550646506475064850649506505065150652506535065450655506565065750658506595066050661506625066350664506655066650667506685066950670506715067250673506745067550676506775067850679506805068150682506835068450685506865068750688506895069050691506925069350694506955069650697506985069950700507015070250703507045070550706507075070850709507105071150712507135071450715507165071750718507195072050721507225072350724507255072650727507285072950730507315073250733507345073550736507375073850739507405074150742507435074450745507465074750748507495075050751507525075350754507555075650757507585075950760507615076250763507645076550766507675076850769507705077150772507735077450775507765077750778507795078050781507825078350784507855078650787507885078950790507915079250793507945079550796507975079850799508005080150802508035080450805508065080750808508095081050811508125081350814508155081650817508185081950820508215082250823508245082550826508275082850829508305083150832508335083450835508365083750838508395084050841508425084350844508455084650847508485084950850508515085250853508545085550856508575085850859508605086150862508635086450865508665086750868508695087050871508725087350874508755087650877508785087950880508815088250883508845088550886508875088850889508905089150892508935089450895508965089750898508995090050901509025090350904509055090650907509085090950910509115091250913509145091550916509175091850919509205092150922509235092450925509265092750928509295093050931509325093350934509355093650937509385093950940509415094250943509445094550946509475094850949509505095150952509535095450955509565095750958509595096050961509625096350964509655096650967509685096950970509715097250973509745097550976509775097850979509805098150982509835098450985509865098750988509895099050991509925099350994509955099650997509985099951000510015100251003510045100551006510075100851009510105101151012510135101451015510165101751018510195102051021510225102351024510255102651027510285102951030510315103251033510345103551036510375103851039510405104151042510435104451045510465104751048510495105051051510525105351054510555105651057510585105951060510615106251063510645106551066510675106851069510705107151072510735107451075510765107751078510795108051081510825108351084510855108651087510885108951090510915109251093510945109551096510975109851099511005110151102511035110451105511065110751108511095111051111511125111351114511155111651117511185111951120511215112251123511245112551126511275112851129511305113151132511335113451135511365113751138511395114051141511425114351144511455114651147511485114951150511515115251153511545115551156511575115851159511605116151162511635116451165511665116751168511695117051171511725117351174511755117651177511785117951180511815118251183511845118551186511875118851189511905119151192511935119451195511965119751198511995120051201512025120351204512055120651207512085120951210512115121251213512145121551216512175121851219512205122151222512235122451225512265122751228512295123051231512325123351234512355123651237512385123951240512415124251243512445124551246512475124851249512505125151252512535125451255512565125751258512595126051261512625126351264512655126651267512685126951270512715127251273512745127551276512775127851279512805128151282512835128451285512865128751288512895129051291512925129351294512955129651297512985129951300513015130251303513045130551306513075130851309513105131151312513135131451315513165131751318513195132051321513225132351324513255132651327513285132951330513315133251333513345133551336513375133851339513405134151342513435134451345513465134751348513495135051351513525135351354513555135651357513585135951360513615136251363513645136551366513675136851369513705137151372513735137451375513765137751378513795138051381513825138351384513855138651387513885138951390513915139251393513945139551396513975139851399514005140151402514035140451405514065140751408514095141051411514125141351414514155141651417514185141951420514215142251423514245142551426514275142851429514305143151432514335143451435514365143751438514395144051441514425144351444514455144651447514485144951450514515145251453514545145551456514575145851459514605146151462514635146451465514665146751468514695147051471514725147351474514755147651477514785147951480514815148251483514845148551486514875148851489514905149151492514935149451495514965149751498514995150051501515025150351504515055150651507515085150951510515115151251513515145151551516515175151851519515205152151522515235152451525515265152751528515295153051531515325153351534515355153651537515385153951540515415154251543515445154551546515475154851549515505155151552515535155451555515565155751558515595156051561515625156351564515655156651567515685156951570515715157251573515745157551576515775157851579515805158151582515835158451585515865158751588515895159051591515925159351594515955159651597515985159951600516015160251603516045160551606516075160851609516105161151612516135161451615516165161751618516195162051621516225162351624516255162651627516285162951630516315163251633516345163551636516375163851639516405164151642516435164451645516465164751648516495165051651516525165351654516555165651657516585165951660516615166251663516645166551666516675166851669516705167151672516735167451675516765167751678516795168051681516825168351684516855168651687516885168951690516915169251693516945169551696516975169851699517005170151702517035170451705517065170751708517095171051711517125171351714517155171651717517185171951720517215172251723517245172551726517275172851729517305173151732517335173451735517365173751738517395174051741517425174351744517455174651747517485174951750517515175251753517545175551756517575175851759517605176151762517635176451765517665176751768517695177051771517725177351774517755177651777517785177951780517815178251783517845178551786517875178851789517905179151792517935179451795517965179751798517995180051801518025180351804518055180651807518085180951810518115181251813518145181551816518175181851819518205182151822518235182451825518265182751828518295183051831518325183351834518355183651837518385183951840518415184251843518445184551846518475184851849518505185151852518535185451855518565185751858518595186051861518625186351864518655186651867518685186951870518715187251873518745187551876518775187851879518805188151882518835188451885518865188751888518895189051891518925189351894518955189651897518985189951900519015190251903519045190551906519075190851909519105191151912519135191451915519165191751918519195192051921519225192351924519255192651927519285192951930519315193251933519345193551936519375193851939519405194151942519435194451945519465194751948519495195051951519525195351954519555195651957519585195951960519615196251963519645196551966519675196851969519705197151972519735197451975519765197751978519795198051981519825198351984519855198651987519885198951990519915199251993519945199551996519975199851999520005200152002520035200452005520065200752008520095201052011520125201352014520155201652017520185201952020520215202252023520245202552026520275202852029520305203152032520335203452035520365203752038520395204052041520425204352044520455204652047520485204952050520515205252053520545205552056520575205852059520605206152062520635206452065520665206752068520695207052071520725207352074520755207652077520785207952080520815208252083520845208552086520875208852089520905209152092520935209452095520965209752098520995210052101521025210352104521055210652107521085210952110521115211252113521145211552116521175211852119521205212152122521235212452125521265212752128521295213052131521325213352134521355213652137521385213952140521415214252143521445214552146521475214852149521505215152152521535215452155521565215752158521595216052161521625216352164521655216652167521685216952170521715217252173521745217552176521775217852179521805218152182521835218452185521865218752188521895219052191521925219352194521955219652197521985219952200522015220252203522045220552206522075220852209522105221152212522135221452215522165221752218522195222052221522225222352224522255222652227522285222952230522315223252233522345223552236522375223852239522405224152242522435224452245522465224752248522495225052251522525225352254522555225652257522585225952260522615226252263522645226552266522675226852269522705227152272522735227452275522765227752278522795228052281522825228352284522855228652287522885228952290522915229252293522945229552296522975229852299523005230152302523035230452305523065230752308523095231052311523125231352314523155231652317523185231952320523215232252323523245232552326523275232852329523305233152332523335233452335523365233752338523395234052341523425234352344523455234652347523485234952350523515235252353523545235552356523575235852359523605236152362523635236452365523665236752368523695237052371523725237352374523755237652377523785237952380523815238252383523845238552386523875238852389523905239152392523935239452395523965239752398523995240052401524025240352404524055240652407524085240952410524115241252413524145241552416524175241852419524205242152422524235242452425524265242752428524295243052431524325243352434524355243652437524385243952440524415244252443524445244552446524475244852449524505245152452524535245452455524565245752458524595246052461524625246352464524655246652467524685246952470524715247252473524745247552476524775247852479524805248152482524835248452485524865248752488524895249052491524925249352494524955249652497524985249952500525015250252503525045250552506525075250852509525105251152512525135251452515525165251752518525195252052521525225252352524525255252652527525285252952530525315253252533525345253552536525375253852539525405254152542525435254452545525465254752548525495255052551525525255352554525555255652557525585255952560525615256252563525645256552566525675256852569525705257152572525735257452575525765257752578525795258052581525825258352584525855258652587525885258952590525915259252593525945259552596525975259852599526005260152602526035260452605526065260752608526095261052611526125261352614526155261652617526185261952620526215262252623526245262552626526275262852629526305263152632526335263452635526365263752638526395264052641526425264352644526455264652647526485264952650526515265252653526545265552656526575265852659526605266152662526635266452665526665266752668526695267052671526725267352674526755267652677526785267952680526815268252683526845268552686526875268852689526905269152692526935269452695526965269752698526995270052701527025270352704527055270652707527085270952710527115271252713527145271552716527175271852719527205272152722527235272452725527265272752728527295273052731527325273352734527355273652737527385273952740527415274252743527445274552746527475274852749527505275152752527535275452755527565275752758527595276052761527625276352764527655276652767527685276952770527715277252773527745277552776527775277852779527805278152782527835278452785527865278752788527895279052791527925279352794527955279652797527985279952800528015280252803528045280552806528075280852809528105281152812528135281452815528165281752818528195282052821528225282352824528255282652827528285282952830528315283252833528345283552836528375283852839528405284152842528435284452845528465284752848528495285052851528525285352854528555285652857528585285952860528615286252863528645286552866528675286852869528705287152872528735287452875528765287752878528795288052881528825288352884528855288652887528885288952890528915289252893528945289552896528975289852899529005290152902529035290452905529065290752908529095291052911529125291352914529155291652917529185291952920529215292252923529245292552926529275292852929529305293152932529335293452935529365293752938529395294052941529425294352944529455294652947529485294952950529515295252953529545295552956529575295852959529605296152962529635296452965529665296752968529695297052971529725297352974529755297652977529785297952980529815298252983529845298552986529875298852989529905299152992529935299452995529965299752998529995300053001530025300353004530055300653007530085300953010530115301253013530145301553016530175301853019530205302153022530235302453025530265302753028530295303053031530325303353034530355303653037530385303953040530415304253043530445304553046530475304853049530505305153052530535305453055530565305753058530595306053061530625306353064530655306653067530685306953070530715307253073530745307553076530775307853079530805308153082530835308453085530865308753088530895309053091530925309353094530955309653097530985309953100531015310253103531045310553106531075310853109531105311153112531135311453115531165311753118531195312053121531225312353124531255312653127531285312953130531315313253133531345313553136531375313853139531405314153142531435314453145531465314753148531495315053151531525315353154531555315653157531585315953160531615316253163531645316553166531675316853169531705317153172531735317453175531765317753178531795318053181531825318353184531855318653187531885318953190531915319253193531945319553196531975319853199532005320153202532035320453205532065320753208532095321053211532125321353214532155321653217532185321953220532215322253223532245322553226532275322853229532305323153232532335323453235532365323753238532395324053241532425324353244532455324653247532485324953250532515325253253532545325553256532575325853259532605326153262532635326453265532665326753268532695327053271532725327353274532755327653277532785327953280532815328253283532845328553286532875328853289532905329153292532935329453295532965329753298532995330053301533025330353304533055330653307533085330953310533115331253313533145331553316533175331853319533205332153322533235332453325533265332753328533295333053331533325333353334533355333653337533385333953340533415334253343533445334553346533475334853349533505335153352533535335453355533565335753358533595336053361533625336353364533655336653367533685336953370533715337253373533745337553376533775337853379533805338153382533835338453385533865338753388533895339053391533925339353394533955339653397533985339953400534015340253403534045340553406534075340853409534105341153412534135341453415534165341753418534195342053421534225342353424534255342653427534285342953430534315343253433534345343553436534375343853439534405344153442534435344453445534465344753448534495345053451534525345353454534555345653457534585345953460534615346253463534645346553466534675346853469534705347153472534735347453475534765347753478534795348053481534825348353484534855348653487534885348953490534915349253493534945349553496534975349853499535005350153502535035350453505535065350753508535095351053511535125351353514535155351653517535185351953520535215352253523535245352553526535275352853529535305353153532535335353453535535365353753538535395354053541535425354353544535455354653547535485354953550535515355253553535545355553556535575355853559535605356153562535635356453565535665356753568535695357053571535725357353574535755357653577535785357953580535815358253583535845358553586535875358853589535905359153592535935359453595535965359753598535995360053601536025360353604536055360653607536085360953610536115361253613536145361553616536175361853619536205362153622536235362453625536265362753628536295363053631536325363353634536355363653637536385363953640536415364253643536445364553646536475364853649536505365153652536535365453655536565365753658536595366053661536625366353664536655366653667536685366953670536715367253673536745367553676536775367853679536805368153682536835368453685536865368753688536895369053691536925369353694536955369653697536985369953700537015370253703537045370553706537075370853709537105371153712537135371453715537165371753718537195372053721537225372353724537255372653727537285372953730537315373253733537345373553736537375373853739537405374153742537435374453745537465374753748537495375053751537525375353754537555375653757537585375953760537615376253763537645376553766537675376853769537705377153772537735377453775537765377753778537795378053781537825378353784537855378653787537885378953790537915379253793537945379553796537975379853799538005380153802538035380453805538065380753808538095381053811538125381353814538155381653817538185381953820538215382253823538245382553826538275382853829538305383153832538335383453835538365383753838538395384053841538425384353844538455384653847538485384953850538515385253853538545385553856538575385853859538605386153862538635386453865538665386753868538695387053871538725387353874538755387653877538785387953880538815388253883538845388553886538875388853889538905389153892538935389453895538965389753898538995390053901539025390353904539055390653907539085390953910539115391253913539145391553916539175391853919539205392153922539235392453925539265392753928539295393053931539325393353934539355393653937539385393953940539415394253943539445394553946539475394853949539505395153952539535395453955539565395753958539595396053961539625396353964539655396653967539685396953970539715397253973539745397553976539775397853979539805398153982539835398453985539865398753988539895399053991539925399353994539955399653997539985399954000540015400254003540045400554006540075400854009540105401154012540135401454015540165401754018540195402054021540225402354024540255402654027540285402954030540315403254033540345403554036540375403854039540405404154042540435404454045540465404754048540495405054051540525405354054540555405654057540585405954060540615406254063540645406554066540675406854069540705407154072540735407454075540765407754078540795408054081540825408354084540855408654087540885408954090540915409254093540945409554096540975409854099541005410154102541035410454105541065410754108541095411054111541125411354114541155411654117541185411954120541215412254123541245412554126541275412854129541305413154132541335413454135541365413754138541395414054141541425414354144541455414654147541485414954150541515415254153541545415554156541575415854159541605416154162541635416454165541665416754168541695417054171541725417354174541755417654177541785417954180541815418254183541845418554186541875418854189541905419154192541935419454195541965419754198541995420054201542025420354204542055420654207542085420954210542115421254213542145421554216542175421854219542205422154222542235422454225542265422754228542295423054231542325423354234542355423654237542385423954240542415424254243542445424554246542475424854249542505425154252542535425454255542565425754258542595426054261542625426354264542655426654267542685426954270542715427254273542745427554276542775427854279542805428154282542835428454285542865428754288542895429054291542925429354294542955429654297542985429954300543015430254303543045430554306543075430854309543105431154312543135431454315543165431754318543195432054321543225432354324543255432654327543285432954330543315433254333543345433554336543375433854339543405434154342543435434454345543465434754348543495435054351543525435354354543555435654357543585435954360543615436254363543645436554366543675436854369543705437154372543735437454375543765437754378543795438054381543825438354384543855438654387543885438954390543915439254393543945439554396543975439854399544005440154402544035440454405544065440754408544095441054411544125441354414544155441654417544185441954420544215442254423544245442554426544275442854429544305443154432544335443454435544365443754438544395444054441544425444354444544455444654447544485444954450544515445254453544545445554456544575445854459544605446154462544635446454465544665446754468544695447054471544725447354474544755447654477544785447954480544815448254483544845448554486544875448854489544905449154492544935449454495544965449754498544995450054501545025450354504545055450654507545085450954510545115451254513545145451554516545175451854519545205452154522545235452454525545265452754528545295453054531545325453354534545355453654537545385453954540545415454254543545445454554546545475454854549545505455154552545535455454555545565455754558545595456054561545625456354564545655456654567545685456954570545715457254573545745457554576545775457854579545805458154582545835458454585545865458754588545895459054591545925459354594545955459654597545985459954600546015460254603546045460554606546075460854609546105461154612546135461454615546165461754618546195462054621546225462354624546255462654627546285462954630546315463254633546345463554636546375463854639546405464154642546435464454645546465464754648546495465054651546525465354654546555465654657546585465954660546615466254663546645466554666546675466854669546705467154672546735467454675546765467754678546795468054681546825468354684546855468654687546885468954690546915469254693546945469554696546975469854699547005470154702547035470454705547065470754708547095471054711547125471354714547155471654717547185471954720547215472254723547245472554726547275472854729547305473154732547335473454735547365473754738547395474054741547425474354744547455474654747547485474954750547515475254753547545475554756547575475854759547605476154762547635476454765547665476754768547695477054771547725477354774547755477654777547785477954780547815478254783547845478554786547875478854789547905479154792547935479454795547965479754798547995480054801548025480354804548055480654807548085480954810548115481254813548145481554816548175481854819548205482154822548235482454825548265482754828548295483054831548325483354834548355483654837548385483954840548415484254843548445484554846548475484854849548505485154852548535485454855548565485754858548595486054861548625486354864548655486654867548685486954870548715487254873548745487554876548775487854879548805488154882548835488454885548865488754888548895489054891548925489354894548955489654897548985489954900549015490254903549045490554906549075490854909549105491154912549135491454915549165491754918549195492054921549225492354924549255492654927549285492954930549315493254933549345493554936549375493854939549405494154942549435494454945549465494754948549495495054951549525495354954549555495654957549585495954960549615496254963549645496554966549675496854969549705497154972549735497454975549765497754978549795498054981549825498354984549855498654987549885498954990549915499254993549945499554996549975499854999550005500155002550035500455005550065500755008550095501055011550125501355014550155501655017550185501955020550215502255023550245502555026550275502855029550305503155032550335503455035550365503755038550395504055041550425504355044550455504655047550485504955050550515505255053550545505555056550575505855059550605506155062550635506455065550665506755068550695507055071550725507355074550755507655077550785507955080550815508255083550845508555086550875508855089550905509155092550935509455095550965509755098550995510055101551025510355104551055510655107551085510955110551115511255113551145511555116551175511855119551205512155122551235512455125551265512755128551295513055131551325513355134551355513655137551385513955140551415514255143551445514555146551475514855149551505515155152551535515455155551565515755158551595516055161551625516355164551655516655167551685516955170551715517255173551745517555176551775517855179551805518155182551835518455185551865518755188551895519055191551925519355194551955519655197551985519955200552015520255203552045520555206552075520855209552105521155212552135521455215552165521755218552195522055221552225522355224552255522655227552285522955230552315523255233552345523555236552375523855239552405524155242552435524455245552465524755248552495525055251552525525355254552555525655257552585525955260552615526255263552645526555266552675526855269552705527155272552735527455275552765527755278552795528055281552825528355284552855528655287552885528955290552915529255293552945529555296552975529855299553005530155302553035530455305553065530755308553095531055311553125531355314553155531655317553185531955320553215532255323553245532555326553275532855329553305533155332553335533455335553365533755338553395534055341553425534355344553455534655347553485534955350553515535255353553545535555356553575535855359553605536155362553635536455365553665536755368553695537055371553725537355374553755537655377553785537955380553815538255383553845538555386553875538855389553905539155392553935539455395553965539755398553995540055401554025540355404554055540655407554085540955410554115541255413554145541555416554175541855419554205542155422554235542455425554265542755428554295543055431554325543355434554355543655437554385543955440554415544255443554445544555446554475544855449554505545155452554535545455455554565545755458554595546055461554625546355464554655546655467554685546955470554715547255473554745547555476554775547855479554805548155482554835548455485554865548755488554895549055491554925549355494554955549655497554985549955500555015550255503555045550555506555075550855509555105551155512555135551455515555165551755518555195552055521555225552355524555255552655527555285552955530555315553255533555345553555536555375553855539555405554155542555435554455545555465554755548555495555055551555525555355554555555555655557555585555955560555615556255563555645556555566555675556855569555705557155572555735557455575555765557755578555795558055581555825558355584555855558655587555885558955590555915559255593555945559555596555975559855599556005560155602556035560455605556065560755608556095561055611556125561355614556155561655617556185561955620556215562255623556245562555626556275562855629556305563155632556335563455635556365563755638556395564055641556425564355644556455564655647556485564955650556515565255653556545565555656556575565855659556605566155662556635566455665556665566755668556695567055671556725567355674556755567655677556785567955680556815568255683556845568555686556875568855689556905569155692556935569455695556965569755698556995570055701557025570355704557055570655707557085570955710557115571255713557145571555716557175571855719557205572155722557235572455725557265572755728557295573055731557325573355734557355573655737557385573955740557415574255743557445574555746557475574855749557505575155752557535575455755557565575755758557595576055761557625576355764557655576655767557685576955770557715577255773557745577555776557775577855779557805578155782557835578455785557865578755788557895579055791557925579355794557955579655797557985579955800558015580255803558045580555806558075580855809558105581155812558135581455815558165581755818558195582055821558225582355824558255582655827558285582955830558315583255833558345583555836558375583855839558405584155842558435584455845558465584755848558495585055851558525585355854558555585655857558585585955860558615586255863558645586555866558675586855869558705587155872558735587455875558765587755878558795588055881558825588355884558855588655887558885588955890558915589255893558945589555896558975589855899559005590155902559035590455905559065590755908559095591055911559125591355914559155591655917559185591955920559215592255923559245592555926559275592855929559305593155932559335593455935559365593755938559395594055941559425594355944559455594655947559485594955950559515595255953559545595555956559575595855959559605596155962559635596455965559665596755968559695597055971559725597355974559755597655977559785597955980559815598255983559845598555986559875598855989559905599155992559935599455995559965599755998559995600056001560025600356004560055600656007560085600956010560115601256013560145601556016560175601856019560205602156022560235602456025560265602756028560295603056031560325603356034560355603656037560385603956040560415604256043560445604556046560475604856049560505605156052560535605456055560565605756058560595606056061560625606356064560655606656067560685606956070560715607256073560745607556076560775607856079560805608156082560835608456085560865608756088560895609056091560925609356094560955609656097560985609956100561015610256103561045610556106561075610856109561105611156112561135611456115561165611756118561195612056121561225612356124561255612656127561285612956130561315613256133561345613556136561375613856139561405614156142561435614456145561465614756148561495615056151561525615356154561555615656157561585615956160561615616256163561645616556166561675616856169561705617156172561735617456175561765617756178561795618056181561825618356184561855618656187561885618956190561915619256193561945619556196561975619856199562005620156202562035620456205562065620756208562095621056211562125621356214562155621656217562185621956220562215622256223562245622556226562275622856229562305623156232562335623456235562365623756238562395624056241562425624356244562455624656247562485624956250562515625256253562545625556256562575625856259562605626156262562635626456265562665626756268562695627056271562725627356274562755627656277562785627956280562815628256283562845628556286562875628856289562905629156292562935629456295562965629756298562995630056301563025630356304563055630656307563085630956310563115631256313563145631556316563175631856319563205632156322563235632456325563265632756328563295633056331563325633356334563355633656337563385633956340563415634256343563445634556346563475634856349563505635156352563535635456355563565635756358563595636056361563625636356364563655636656367563685636956370563715637256373563745637556376563775637856379563805638156382563835638456385563865638756388563895639056391563925639356394563955639656397563985639956400564015640256403564045640556406564075640856409564105641156412564135641456415564165641756418564195642056421564225642356424564255642656427564285642956430564315643256433564345643556436564375643856439564405644156442564435644456445564465644756448564495645056451564525645356454564555645656457564585645956460564615646256463564645646556466564675646856469564705647156472564735647456475564765647756478564795648056481564825648356484564855648656487564885648956490564915649256493564945649556496564975649856499565005650156502565035650456505565065650756508565095651056511565125651356514565155651656517565185651956520565215652256523565245652556526565275652856529565305653156532565335653456535565365653756538565395654056541565425654356544565455654656547565485654956550565515655256553565545655556556565575655856559565605656156562565635656456565565665656756568565695657056571565725657356574565755657656577565785657956580565815658256583565845658556586565875658856589565905659156592565935659456595565965659756598565995660056601566025660356604566055660656607566085660956610566115661256613566145661556616566175661856619566205662156622566235662456625566265662756628566295663056631566325663356634566355663656637566385663956640566415664256643566445664556646566475664856649566505665156652566535665456655566565665756658566595666056661566625666356664566655666656667566685666956670566715667256673566745667556676566775667856679566805668156682566835668456685566865668756688566895669056691566925669356694566955669656697566985669956700567015670256703567045670556706567075670856709567105671156712567135671456715567165671756718567195672056721567225672356724567255672656727567285672956730567315673256733567345673556736567375673856739567405674156742567435674456745567465674756748567495675056751567525675356754567555675656757567585675956760567615676256763567645676556766567675676856769567705677156772567735677456775567765677756778567795678056781567825678356784567855678656787567885678956790567915679256793567945679556796567975679856799568005680156802568035680456805568065680756808568095681056811568125681356814568155681656817568185681956820568215682256823568245682556826568275682856829568305683156832568335683456835568365683756838568395684056841568425684356844568455684656847568485684956850568515685256853568545685556856568575685856859568605686156862568635686456865568665686756868568695687056871568725687356874568755687656877568785687956880568815688256883568845688556886568875688856889568905689156892568935689456895568965689756898568995690056901569025690356904569055690656907569085690956910569115691256913569145691556916569175691856919569205692156922569235692456925569265692756928569295693056931569325693356934569355693656937569385693956940569415694256943569445694556946569475694856949569505695156952569535695456955569565695756958569595696056961569625696356964569655696656967569685696956970569715697256973569745697556976569775697856979569805698156982569835698456985569865698756988569895699056991569925699356994569955699656997569985699957000570015700257003570045700557006570075700857009570105701157012570135701457015570165701757018570195702057021570225702357024570255702657027570285702957030570315703257033570345703557036570375703857039570405704157042570435704457045570465704757048570495705057051570525705357054570555705657057570585705957060570615706257063570645706557066570675706857069570705707157072570735707457075570765707757078570795708057081570825708357084570855708657087570885708957090570915709257093570945709557096570975709857099571005710157102571035710457105571065710757108571095711057111571125711357114571155711657117571185711957120571215712257123571245712557126571275712857129571305713157132571335713457135571365713757138571395714057141571425714357144571455714657147571485714957150571515715257153571545715557156571575715857159571605716157162571635716457165571665716757168571695717057171571725717357174571755717657177571785717957180571815718257183571845718557186571875718857189571905719157192571935719457195571965719757198571995720057201572025720357204572055720657207572085720957210572115721257213572145721557216572175721857219572205722157222572235722457225572265722757228572295723057231572325723357234572355723657237572385723957240572415724257243572445724557246572475724857249572505725157252572535725457255572565725757258572595726057261572625726357264572655726657267572685726957270572715727257273572745727557276572775727857279572805728157282572835728457285572865728757288572895729057291572925729357294572955729657297572985729957300573015730257303573045730557306573075730857309573105731157312573135731457315573165731757318573195732057321573225732357324573255732657327573285732957330573315733257333573345733557336573375733857339573405734157342573435734457345573465734757348573495735057351573525735357354573555735657357573585735957360573615736257363573645736557366573675736857369573705737157372573735737457375573765737757378573795738057381573825738357384573855738657387573885738957390573915739257393573945739557396573975739857399574005740157402574035740457405574065740757408574095741057411574125741357414574155741657417574185741957420574215742257423574245742557426574275742857429574305743157432574335743457435574365743757438574395744057441574425744357444574455744657447574485744957450574515745257453574545745557456574575745857459574605746157462574635746457465574665746757468574695747057471574725747357474574755747657477574785747957480574815748257483574845748557486574875748857489574905749157492574935749457495574965749757498574995750057501575025750357504575055750657507575085750957510575115751257513575145751557516575175751857519575205752157522575235752457525575265752757528575295753057531575325753357534575355753657537575385753957540575415754257543575445754557546575475754857549575505755157552575535755457555575565755757558575595756057561575625756357564575655756657567575685756957570575715757257573575745757557576575775757857579575805758157582575835758457585575865758757588575895759057591575925759357594575955759657597575985759957600576015760257603576045760557606576075760857609576105761157612576135761457615576165761757618576195762057621576225762357624576255762657627576285762957630576315763257633576345763557636576375763857639576405764157642576435764457645576465764757648576495765057651576525765357654576555765657657576585765957660576615766257663576645766557666576675766857669576705767157672576735767457675576765767757678576795768057681576825768357684576855768657687576885768957690576915769257693576945769557696576975769857699577005770157702577035770457705577065770757708577095771057711577125771357714577155771657717577185771957720577215772257723577245772557726577275772857729577305773157732577335773457735577365773757738577395774057741577425774357744577455774657747577485774957750577515775257753577545775557756577575775857759577605776157762577635776457765577665776757768577695777057771577725777357774577755777657777577785777957780577815778257783577845778557786577875778857789577905779157792577935779457795577965779757798577995780057801578025780357804578055780657807578085780957810578115781257813578145781557816578175781857819578205782157822578235782457825578265782757828578295783057831578325783357834578355783657837578385783957840578415784257843578445784557846578475784857849578505785157852578535785457855578565785757858578595786057861578625786357864578655786657867578685786957870578715787257873578745787557876578775787857879578805788157882578835788457885578865788757888578895789057891578925789357894578955789657897578985789957900579015790257903579045790557906579075790857909579105791157912579135791457915579165791757918579195792057921579225792357924579255792657927579285792957930579315793257933579345793557936579375793857939579405794157942579435794457945579465794757948579495795057951579525795357954579555795657957579585795957960579615796257963579645796557966579675796857969579705797157972579735797457975579765797757978579795798057981579825798357984579855798657987579885798957990579915799257993579945799557996579975799857999580005800158002580035800458005580065800758008580095801058011580125801358014580155801658017580185801958020580215802258023580245802558026580275802858029580305803158032580335803458035580365803758038580395804058041580425804358044580455804658047580485804958050580515805258053580545805558056580575805858059580605806158062580635806458065580665806758068580695807058071580725807358074580755807658077580785807958080580815808258083580845808558086580875808858089580905809158092580935809458095580965809758098580995810058101581025810358104581055810658107581085810958110581115811258113581145811558116581175811858119581205812158122581235812458125581265812758128581295813058131581325813358134581355813658137581385813958140581415814258143581445814558146581475814858149581505815158152581535815458155581565815758158581595816058161581625816358164581655816658167581685816958170581715817258173581745817558176581775817858179581805818158182581835818458185581865818758188581895819058191581925819358194581955819658197581985819958200582015820258203582045820558206582075820858209582105821158212582135821458215582165821758218582195822058221582225822358224582255822658227582285822958230582315823258233582345823558236582375823858239582405824158242582435824458245582465824758248582495825058251582525825358254582555825658257582585825958260582615826258263582645826558266582675826858269582705827158272582735827458275582765827758278582795828058281582825828358284582855828658287582885828958290582915829258293582945829558296582975829858299583005830158302583035830458305583065830758308583095831058311583125831358314583155831658317583185831958320583215832258323583245832558326583275832858329583305833158332583335833458335583365833758338583395834058341583425834358344583455834658347583485834958350583515835258353583545835558356583575835858359583605836158362583635836458365583665836758368583695837058371583725837358374583755837658377583785837958380583815838258383583845838558386583875838858389583905839158392583935839458395583965839758398583995840058401584025840358404584055840658407584085840958410584115841258413584145841558416584175841858419584205842158422584235842458425584265842758428584295843058431584325843358434584355843658437584385843958440584415844258443584445844558446584475844858449584505845158452584535845458455584565845758458584595846058461584625846358464584655846658467584685846958470584715847258473584745847558476584775847858479584805848158482584835848458485584865848758488584895849058491584925849358494584955849658497584985849958500585015850258503585045850558506585075850858509585105851158512585135851458515585165851758518585195852058521585225852358524585255852658527585285852958530585315853258533585345853558536585375853858539585405854158542585435854458545585465854758548585495855058551585525855358554585555855658557585585855958560585615856258563585645856558566585675856858569585705857158572585735857458575585765857758578585795858058581585825858358584585855858658587585885858958590585915859258593585945859558596585975859858599586005860158602586035860458605586065860758608586095861058611586125861358614586155861658617586185861958620586215862258623586245862558626586275862858629586305863158632586335863458635586365863758638586395864058641586425864358644586455864658647586485864958650586515865258653586545865558656586575865858659586605866158662586635866458665586665866758668586695867058671586725867358674586755867658677586785867958680586815868258683586845868558686586875868858689586905869158692586935869458695586965869758698586995870058701587025870358704587055870658707587085870958710587115871258713587145871558716587175871858719587205872158722587235872458725587265872758728587295873058731587325873358734587355873658737587385873958740587415874258743587445874558746587475874858749587505875158752587535875458755587565875758758587595876058761587625876358764587655876658767587685876958770587715877258773587745877558776587775877858779587805878158782587835878458785587865878758788587895879058791587925879358794587955879658797587985879958800588015880258803588045880558806588075880858809588105881158812588135881458815588165881758818588195882058821588225882358824588255882658827588285882958830588315883258833588345883558836588375883858839588405884158842588435884458845588465884758848588495885058851588525885358854588555885658857588585885958860588615886258863588645886558866588675886858869588705887158872588735887458875588765887758878588795888058881588825888358884588855888658887588885888958890588915889258893588945889558896588975889858899589005890158902589035890458905589065890758908589095891058911589125891358914589155891658917589185891958920589215892258923589245892558926589275892858929589305893158932589335893458935589365893758938589395894058941589425894358944589455894658947589485894958950589515895258953589545895558956589575895858959589605896158962589635896458965589665896758968589695897058971589725897358974589755897658977589785897958980589815898258983589845898558986589875898858989589905899158992589935899458995589965899758998589995900059001590025900359004590055900659007590085900959010590115901259013590145901559016590175901859019590205902159022590235902459025590265902759028590295903059031590325903359034590355903659037590385903959040590415904259043590445904559046590475904859049590505905159052590535905459055590565905759058590595906059061590625906359064590655906659067590685906959070590715907259073590745907559076590775907859079590805908159082590835908459085590865908759088590895909059091590925909359094590955909659097590985909959100591015910259103591045910559106591075910859109591105911159112591135911459115591165911759118591195912059121591225912359124591255912659127591285912959130591315913259133591345913559136591375913859139591405914159142591435914459145591465914759148591495915059151591525915359154591555915659157591585915959160591615916259163591645916559166591675916859169591705917159172591735917459175591765917759178591795918059181591825918359184591855918659187591885918959190591915919259193591945919559196591975919859199592005920159202592035920459205592065920759208592095921059211592125921359214592155921659217592185921959220592215922259223592245922559226592275922859229592305923159232592335923459235592365923759238592395924059241592425924359244592455924659247592485924959250592515925259253592545925559256592575925859259592605926159262592635926459265592665926759268592695927059271592725927359274592755927659277592785927959280592815928259283592845928559286592875928859289592905929159292592935929459295592965929759298592995930059301593025930359304593055930659307593085930959310593115931259313593145931559316593175931859319593205932159322593235932459325593265932759328593295933059331593325933359334593355933659337593385933959340593415934259343593445934559346593475934859349593505935159352593535935459355593565935759358593595936059361593625936359364593655936659367593685936959370593715937259373593745937559376593775937859379593805938159382593835938459385593865938759388593895939059391593925939359394593955939659397593985939959400594015940259403594045940559406594075940859409594105941159412594135941459415594165941759418594195942059421594225942359424594255942659427594285942959430594315943259433594345943559436594375943859439594405944159442594435944459445594465944759448594495945059451594525945359454594555945659457594585945959460594615946259463594645946559466594675946859469594705947159472594735947459475594765947759478594795948059481594825948359484594855948659487594885948959490594915949259493594945949559496594975949859499595005950159502595035950459505595065950759508595095951059511595125951359514595155951659517595185951959520595215952259523595245952559526595275952859529595305953159532595335953459535595365953759538595395954059541595425954359544595455954659547595485954959550595515955259553595545955559556595575955859559595605956159562595635956459565595665956759568595695957059571595725957359574595755957659577595785957959580595815958259583595845958559586595875958859589595905959159592595935959459595595965959759598595995960059601596025960359604596055960659607596085960959610596115961259613596145961559616596175961859619596205962159622596235962459625596265962759628596295963059631596325963359634596355963659637596385963959640596415964259643596445964559646596475964859649596505965159652596535965459655596565965759658596595966059661596625966359664596655966659667596685966959670596715967259673596745967559676596775967859679596805968159682596835968459685596865968759688596895969059691596925969359694596955969659697596985969959700597015970259703597045970559706597075970859709597105971159712597135971459715597165971759718597195972059721597225972359724597255972659727597285972959730597315973259733597345973559736597375973859739597405974159742597435974459745597465974759748597495975059751597525975359754597555975659757597585975959760597615976259763597645976559766597675976859769597705977159772597735977459775597765977759778597795978059781597825978359784597855978659787597885978959790597915979259793597945979559796597975979859799598005980159802598035980459805598065980759808598095981059811598125981359814598155981659817598185981959820598215982259823598245982559826598275982859829598305983159832598335983459835598365983759838598395984059841598425984359844598455984659847598485984959850598515985259853598545985559856598575985859859598605986159862598635986459865598665986759868598695987059871598725987359874598755987659877598785987959880598815988259883598845988559886598875988859889598905989159892598935989459895598965989759898598995990059901599025990359904599055990659907599085990959910599115991259913599145991559916599175991859919599205992159922599235992459925599265992759928599295993059931599325993359934599355993659937599385993959940599415994259943599445994559946599475994859949599505995159952599535995459955599565995759958599595996059961599625996359964599655996659967599685996959970599715997259973599745997559976599775997859979599805998159982599835998459985599865998759988599895999059991599925999359994599955999659997599985999960000600016000260003600046000560006600076000860009600106001160012600136001460015600166001760018600196002060021600226002360024600256002660027600286002960030600316003260033600346003560036600376003860039600406004160042600436004460045600466004760048600496005060051600526005360054600556005660057600586005960060600616006260063600646006560066600676006860069600706007160072600736007460075600766007760078600796008060081600826008360084600856008660087600886008960090600916009260093600946009560096600976009860099601006010160102601036010460105601066010760108601096011060111601126011360114601156011660117601186011960120601216012260123601246012560126601276012860129601306013160132601336013460135601366013760138601396014060141601426014360144601456014660147601486014960150601516015260153601546015560156601576015860159601606016160162601636016460165601666016760168601696017060171601726017360174601756017660177601786017960180601816018260183601846018560186601876018860189601906019160192601936019460195601966019760198601996020060201602026020360204602056020660207602086020960210602116021260213602146021560216602176021860219602206022160222602236022460225602266022760228602296023060231602326023360234602356023660237602386023960240602416024260243602446024560246602476024860249602506025160252602536025460255602566025760258602596026060261602626026360264602656026660267602686026960270602716027260273602746027560276602776027860279602806028160282602836028460285602866028760288602896029060291602926029360294602956029660297602986029960300603016030260303603046030560306603076030860309603106031160312603136031460315603166031760318603196032060321603226032360324603256032660327603286032960330603316033260333603346033560336603376033860339603406034160342603436034460345603466034760348603496035060351603526035360354603556035660357603586035960360603616036260363603646036560366603676036860369603706037160372603736037460375603766037760378603796038060381603826038360384603856038660387603886038960390603916039260393603946039560396603976039860399604006040160402604036040460405604066040760408604096041060411604126041360414604156041660417604186041960420604216042260423604246042560426604276042860429604306043160432604336043460435604366043760438604396044060441604426044360444604456044660447604486044960450604516045260453604546045560456604576045860459604606046160462604636046460465604666046760468604696047060471604726047360474604756047660477604786047960480604816048260483604846048560486604876048860489604906049160492604936049460495604966049760498604996050060501605026050360504605056050660507605086050960510605116051260513605146051560516605176051860519605206052160522605236052460525605266052760528605296053060531605326053360534605356053660537605386053960540605416054260543605446054560546605476054860549605506055160552605536055460555605566055760558605596056060561605626056360564605656056660567605686056960570605716057260573605746057560576605776057860579605806058160582605836058460585605866058760588605896059060591605926059360594605956059660597605986059960600606016060260603606046060560606606076060860609606106061160612606136061460615606166061760618606196062060621606226062360624606256062660627606286062960630606316063260633606346063560636606376063860639606406064160642606436064460645606466064760648606496065060651606526065360654606556065660657606586065960660606616066260663606646066560666606676066860669606706067160672606736067460675606766067760678606796068060681606826068360684606856068660687606886068960690606916069260693606946069560696606976069860699607006070160702607036070460705607066070760708607096071060711607126071360714607156071660717607186071960720607216072260723607246072560726607276072860729607306073160732607336073460735607366073760738607396074060741607426074360744607456074660747607486074960750607516075260753607546075560756607576075860759607606076160762607636076460765607666076760768607696077060771607726077360774607756077660777607786077960780607816078260783607846078560786607876078860789607906079160792607936079460795607966079760798607996080060801608026080360804608056080660807608086080960810608116081260813608146081560816608176081860819608206082160822608236082460825608266082760828608296083060831608326083360834608356083660837608386083960840608416084260843608446084560846608476084860849608506085160852608536085460855608566085760858608596086060861608626086360864608656086660867608686086960870608716087260873608746087560876608776087860879608806088160882608836088460885608866088760888608896089060891608926089360894608956089660897608986089960900609016090260903609046090560906609076090860909609106091160912609136091460915609166091760918609196092060921609226092360924609256092660927609286092960930609316093260933609346093560936609376093860939609406094160942609436094460945609466094760948609496095060951609526095360954609556095660957609586095960960609616096260963609646096560966609676096860969609706097160972609736097460975609766097760978609796098060981609826098360984609856098660987609886098960990609916099260993609946099560996609976099860999610006100161002610036100461005610066100761008610096101061011610126101361014610156101661017610186101961020610216102261023610246102561026610276102861029610306103161032610336103461035610366103761038610396104061041610426104361044610456104661047610486104961050610516105261053610546105561056610576105861059610606106161062610636106461065610666106761068610696107061071610726107361074610756107661077610786107961080610816108261083610846108561086610876108861089610906109161092610936109461095610966109761098610996110061101611026110361104611056110661107611086110961110611116111261113611146111561116611176111861119611206112161122611236112461125611266112761128611296113061131611326113361134611356113661137611386113961140611416114261143611446114561146611476114861149611506115161152611536115461155611566115761158611596116061161611626116361164611656116661167611686116961170611716117261173611746117561176611776117861179611806118161182611836118461185611866118761188611896119061191611926119361194611956119661197611986119961200612016120261203612046120561206612076120861209612106121161212612136121461215612166121761218612196122061221612226122361224612256122661227612286122961230612316123261233612346123561236612376123861239612406124161242612436124461245612466124761248612496125061251612526125361254612556125661257612586125961260612616126261263612646126561266612676126861269612706127161272612736127461275612766127761278612796128061281612826128361284612856128661287612886128961290612916129261293612946129561296612976129861299613006130161302613036130461305613066130761308613096131061311613126131361314613156131661317613186131961320613216132261323613246132561326613276132861329613306133161332613336133461335613366133761338613396134061341613426134361344613456134661347613486134961350613516135261353613546135561356613576135861359613606136161362613636136461365613666136761368613696137061371613726137361374613756137661377613786137961380613816138261383613846138561386613876138861389613906139161392613936139461395613966139761398613996140061401614026140361404614056140661407614086140961410614116141261413614146141561416614176141861419614206142161422614236142461425614266142761428614296143061431614326143361434614356143661437614386143961440614416144261443614446144561446614476144861449614506145161452614536145461455614566145761458614596146061461614626146361464614656146661467614686146961470614716147261473614746147561476614776147861479614806148161482614836148461485614866148761488614896149061491614926149361494614956149661497614986149961500615016150261503615046150561506615076150861509615106151161512615136151461515615166151761518615196152061521615226152361524615256152661527615286152961530615316153261533615346153561536615376153861539615406154161542615436154461545615466154761548615496155061551615526155361554615556155661557615586155961560615616156261563615646156561566615676156861569615706157161572615736157461575615766157761578615796158061581615826158361584615856158661587615886158961590615916159261593615946159561596615976159861599616006160161602616036160461605616066160761608616096161061611616126161361614616156161661617616186161961620616216162261623616246162561626616276162861629616306163161632616336163461635616366163761638616396164061641616426164361644616456164661647616486164961650616516165261653616546165561656616576165861659616606166161662616636166461665616666166761668616696167061671616726167361674616756167661677616786167961680616816168261683616846168561686616876168861689616906169161692616936169461695616966169761698616996170061701617026170361704617056170661707617086170961710617116171261713617146171561716617176171861719617206172161722617236172461725617266172761728617296173061731617326173361734617356173661737617386173961740617416174261743617446174561746617476174861749617506175161752617536175461755617566175761758617596176061761617626176361764617656176661767617686176961770617716177261773617746177561776617776177861779617806178161782617836178461785617866178761788617896179061791617926179361794617956179661797617986179961800618016180261803618046180561806618076180861809618106181161812618136181461815618166181761818618196182061821618226182361824618256182661827618286182961830618316183261833618346183561836618376183861839618406184161842618436184461845618466184761848618496185061851618526185361854618556185661857618586185961860618616186261863618646186561866618676186861869618706187161872618736187461875618766187761878618796188061881618826188361884618856188661887618886188961890618916189261893618946189561896618976189861899619006190161902619036190461905619066190761908619096191061911619126191361914619156191661917619186191961920619216192261923619246192561926619276192861929619306193161932619336193461935619366193761938619396194061941619426194361944619456194661947619486194961950619516195261953619546195561956619576195861959619606196161962619636196461965619666196761968619696197061971619726197361974619756197661977619786197961980619816198261983619846198561986619876198861989619906199161992619936199461995619966199761998619996200062001620026200362004620056200662007620086200962010620116201262013620146201562016620176201862019620206202162022620236202462025620266202762028620296203062031620326203362034620356203662037620386203962040620416204262043620446204562046620476204862049620506205162052620536205462055620566205762058620596206062061620626206362064620656206662067620686206962070620716207262073620746207562076620776207862079620806208162082620836208462085620866208762088620896209062091620926209362094620956209662097620986209962100621016210262103621046210562106621076210862109621106211162112621136211462115621166211762118621196212062121621226212362124621256212662127621286212962130621316213262133621346213562136621376213862139621406214162142621436214462145621466214762148621496215062151621526215362154621556215662157621586215962160621616216262163621646216562166621676216862169621706217162172621736217462175621766217762178621796218062181621826218362184621856218662187621886218962190621916219262193621946219562196621976219862199622006220162202622036220462205622066220762208622096221062211622126221362214622156221662217622186221962220622216222262223622246222562226622276222862229622306223162232622336223462235622366223762238622396224062241622426224362244622456224662247622486224962250622516225262253622546225562256622576225862259622606226162262622636226462265622666226762268622696227062271622726227362274622756227662277622786227962280622816228262283622846228562286622876228862289622906229162292622936229462295622966229762298622996230062301623026230362304623056230662307623086230962310623116231262313623146231562316623176231862319623206232162322623236232462325623266232762328623296233062331623326233362334623356233662337623386233962340623416234262343623446234562346623476234862349623506235162352623536235462355623566235762358623596236062361623626236362364623656236662367623686236962370623716237262373623746237562376623776237862379623806238162382623836238462385623866238762388623896239062391623926239362394623956239662397623986239962400624016240262403624046240562406624076240862409624106241162412624136241462415624166241762418624196242062421624226242362424624256242662427624286242962430624316243262433624346243562436624376243862439624406244162442624436244462445624466244762448624496245062451624526245362454624556245662457624586245962460624616246262463624646246562466624676246862469624706247162472624736247462475624766247762478624796248062481624826248362484624856248662487624886248962490624916249262493624946249562496624976249862499625006250162502625036250462505625066250762508625096251062511625126251362514625156251662517625186251962520625216252262523625246252562526625276252862529625306253162532625336253462535625366253762538625396254062541625426254362544625456254662547625486254962550625516255262553625546255562556625576255862559625606256162562625636256462565625666256762568625696257062571625726257362574625756257662577625786257962580625816258262583625846258562586625876258862589625906259162592625936259462595625966259762598625996260062601626026260362604626056260662607626086260962610626116261262613626146261562616626176261862619626206262162622626236262462625626266262762628626296263062631626326263362634626356263662637626386263962640626416264262643626446264562646626476264862649626506265162652626536265462655626566265762658626596266062661626626266362664626656266662667626686266962670626716267262673626746267562676626776267862679626806268162682626836268462685626866268762688626896269062691626926269362694626956269662697626986269962700627016270262703627046270562706627076270862709627106271162712627136271462715627166271762718627196272062721627226272362724627256272662727627286272962730627316273262733627346273562736627376273862739627406274162742627436274462745627466274762748627496275062751627526275362754627556275662757627586275962760627616276262763627646276562766627676276862769627706277162772627736277462775627766277762778627796278062781627826278362784627856278662787627886278962790627916279262793627946279562796627976279862799628006280162802628036280462805628066280762808628096281062811628126281362814628156281662817628186281962820628216282262823628246282562826628276282862829628306283162832628336283462835628366283762838628396284062841628426284362844628456284662847628486284962850628516285262853628546285562856628576285862859628606286162862628636286462865628666286762868628696287062871628726287362874628756287662877628786287962880628816288262883628846288562886628876288862889628906289162892628936289462895628966289762898628996290062901629026290362904629056290662907629086290962910629116291262913629146291562916629176291862919629206292162922629236292462925629266292762928629296293062931629326293362934629356293662937629386293962940629416294262943629446294562946629476294862949629506295162952629536295462955629566295762958629596296062961629626296362964629656296662967629686296962970629716297262973629746297562976629776297862979629806298162982629836298462985629866298762988629896299062991629926299362994629956299662997629986299963000630016300263003630046300563006630076300863009630106301163012630136301463015630166301763018630196302063021630226302363024630256302663027630286302963030630316303263033630346303563036630376303863039630406304163042630436304463045630466304763048630496305063051630526305363054630556305663057630586305963060630616306263063630646306563066630676306863069630706307163072630736307463075630766307763078630796308063081630826308363084630856308663087630886308963090630916309263093630946309563096630976309863099631006310163102631036310463105631066310763108631096311063111631126311363114631156311663117631186311963120631216312263123631246312563126631276312863129631306313163132631336313463135631366313763138631396314063141631426314363144631456314663147631486314963150631516315263153631546315563156631576315863159631606316163162631636316463165631666316763168631696317063171631726317363174631756317663177631786317963180631816318263183631846318563186631876318863189631906319163192631936319463195631966319763198631996320063201632026320363204632056320663207632086320963210632116321263213632146321563216632176321863219632206322163222632236322463225632266322763228632296323063231632326323363234632356323663237632386323963240632416324263243632446324563246632476324863249632506325163252632536325463255632566325763258632596326063261632626326363264632656326663267632686326963270632716327263273632746327563276632776327863279632806328163282632836328463285632866328763288632896329063291632926329363294632956329663297632986329963300633016330263303633046330563306633076330863309633106331163312633136331463315633166331763318633196332063321633226332363324633256332663327633286332963330633316333263333633346333563336633376333863339633406334163342633436334463345633466334763348633496335063351633526335363354633556335663357633586335963360633616336263363633646336563366633676336863369633706337163372633736337463375633766337763378633796338063381633826338363384633856338663387633886338963390633916339263393633946339563396633976339863399634006340163402634036340463405634066340763408634096341063411634126341363414634156341663417634186341963420634216342263423634246342563426634276342863429634306343163432634336343463435634366343763438634396344063441634426344363444634456344663447634486344963450634516345263453634546345563456634576345863459634606346163462634636346463465634666346763468634696347063471634726347363474634756347663477634786347963480634816348263483634846348563486634876348863489634906349163492634936349463495634966349763498634996350063501635026350363504635056350663507635086350963510635116351263513635146351563516635176351863519635206352163522635236352463525635266352763528635296353063531635326353363534635356353663537635386353963540635416354263543635446354563546635476354863549635506355163552635536355463555635566355763558635596356063561635626356363564635656356663567635686356963570635716357263573635746357563576635776357863579635806358163582635836358463585635866358763588635896359063591635926359363594635956359663597635986359963600636016360263603636046360563606636076360863609636106361163612636136361463615636166361763618636196362063621636226362363624636256362663627636286362963630636316363263633636346363563636636376363863639636406364163642636436364463645636466364763648636496365063651636526365363654636556365663657636586365963660636616366263663636646366563666636676366863669636706367163672636736367463675636766367763678636796368063681636826368363684636856368663687636886368963690636916369263693636946369563696636976369863699637006370163702637036370463705637066370763708637096371063711637126371363714637156371663717637186371963720637216372263723637246372563726637276372863729637306373163732637336373463735637366373763738637396374063741637426374363744637456374663747637486374963750637516375263753637546375563756637576375863759637606376163762637636376463765637666376763768637696377063771637726377363774637756377663777637786377963780637816378263783637846378563786637876378863789637906379163792637936379463795637966379763798637996380063801638026380363804638056380663807638086380963810638116381263813638146381563816638176381863819638206382163822638236382463825638266382763828638296383063831638326383363834638356383663837638386383963840638416384263843638446384563846638476384863849638506385163852638536385463855638566385763858638596386063861638626386363864638656386663867638686386963870638716387263873638746387563876638776387863879638806388163882638836388463885638866388763888638896389063891638926389363894638956389663897638986389963900639016390263903639046390563906639076390863909639106391163912639136391463915639166391763918639196392063921639226392363924639256392663927639286392963930639316393263933639346393563936639376393863939639406394163942639436394463945639466394763948639496395063951639526395363954639556395663957639586395963960639616396263963639646396563966639676396863969639706397163972639736397463975639766397763978639796398063981639826398363984639856398663987639886398963990639916399263993639946399563996639976399863999640006400164002640036400464005640066400764008640096401064011640126401364014640156401664017640186401964020640216402264023640246402564026640276402864029640306403164032640336403464035640366403764038640396404064041640426404364044640456404664047640486404964050640516405264053640546405564056640576405864059640606406164062640636406464065640666406764068640696407064071640726407364074640756407664077640786407964080640816408264083640846408564086640876408864089640906409164092640936409464095640966409764098640996410064101641026410364104641056410664107641086410964110641116411264113641146411564116641176411864119641206412164122641236412464125641266412764128641296413064131641326413364134641356413664137641386413964140641416414264143641446414564146641476414864149641506415164152641536415464155641566415764158641596416064161641626416364164641656416664167641686416964170641716417264173641746417564176641776417864179641806418164182641836418464185641866418764188641896419064191641926419364194641956419664197641986419964200642016420264203642046420564206642076420864209642106421164212642136421464215642166421764218642196422064221642226422364224642256422664227642286422964230642316423264233642346423564236642376423864239642406424164242642436424464245642466424764248642496425064251642526425364254642556425664257642586425964260642616426264263642646426564266642676426864269642706427164272642736427464275642766427764278642796428064281642826428364284642856428664287642886428964290642916429264293642946429564296642976429864299643006430164302643036430464305643066430764308643096431064311643126431364314643156431664317643186431964320643216432264323643246432564326643276432864329643306433164332643336433464335643366433764338643396434064341643426434364344643456434664347643486434964350643516435264353643546435564356643576435864359643606436164362643636436464365643666436764368643696437064371643726437364374643756437664377643786437964380643816438264383643846438564386643876438864389643906439164392643936439464395643966439764398643996440064401644026440364404644056440664407644086440964410644116441264413644146441564416644176441864419644206442164422644236442464425644266442764428644296443064431644326443364434644356443664437644386443964440644416444264443644446444564446644476444864449644506445164452644536445464455644566445764458644596446064461644626446364464644656446664467644686446964470644716447264473644746447564476644776447864479644806448164482644836448464485644866448764488644896449064491644926449364494644956449664497644986449964500645016450264503645046450564506645076450864509645106451164512645136451464515645166451764518645196452064521645226452364524645256452664527645286452964530645316453264533645346453564536645376453864539645406454164542645436454464545645466454764548645496455064551645526455364554645556455664557645586455964560645616456264563645646456564566645676456864569645706457164572645736457464575645766457764578645796458064581645826458364584645856458664587645886458964590645916459264593645946459564596645976459864599646006460164602646036460464605646066460764608646096461064611646126461364614646156461664617646186461964620646216462264623646246462564626646276462864629646306463164632646336463464635646366463764638646396464064641646426464364644646456464664647646486464964650646516465264653646546465564656646576465864659646606466164662646636466464665646666466764668646696467064671646726467364674646756467664677646786467964680646816468264683646846468564686646876468864689646906469164692646936469464695646966469764698646996470064701647026470364704647056470664707647086470964710647116471264713647146471564716647176471864719647206472164722647236472464725647266472764728647296473064731647326473364734647356473664737647386473964740647416474264743647446474564746647476474864749647506475164752647536475464755647566475764758647596476064761647626476364764647656476664767647686476964770647716477264773647746477564776647776477864779647806478164782647836478464785647866478764788647896479064791647926479364794647956479664797647986479964800648016480264803648046480564806648076480864809648106481164812648136481464815648166481764818648196482064821648226482364824648256482664827648286482964830648316483264833648346483564836648376483864839648406484164842648436484464845648466484764848648496485064851648526485364854648556485664857648586485964860648616486264863648646486564866648676486864869648706487164872648736487464875648766487764878648796488064881648826488364884648856488664887648886488964890648916489264893648946489564896648976489864899649006490164902649036490464905649066490764908649096491064911649126491364914649156491664917649186491964920649216492264923649246492564926649276492864929649306493164932649336493464935649366493764938649396494064941649426494364944649456494664947649486494964950649516495264953649546495564956649576495864959649606496164962649636496464965649666496764968649696497064971649726497364974649756497664977649786497964980649816498264983649846498564986649876498864989649906499164992649936499464995649966499764998649996500065001650026500365004650056500665007650086500965010650116501265013650146501565016650176501865019650206502165022650236502465025650266502765028650296503065031650326503365034650356503665037650386503965040650416504265043650446504565046650476504865049650506505165052650536505465055650566505765058650596506065061650626506365064650656506665067650686506965070650716507265073650746507565076650776507865079650806508165082650836508465085650866508765088650896509065091650926509365094650956509665097650986509965100651016510265103651046510565106651076510865109651106511165112651136511465115651166511765118651196512065121651226512365124651256512665127651286512965130651316513265133651346513565136651376513865139651406514165142651436514465145651466514765148651496515065151651526515365154651556515665157651586515965160651616516265163651646516565166651676516865169651706517165172651736517465175651766517765178651796518065181651826518365184651856518665187651886518965190651916519265193651946519565196651976519865199652006520165202652036520465205652066520765208652096521065211652126521365214652156521665217652186521965220652216522265223652246522565226652276522865229652306523165232652336523465235652366523765238652396524065241652426524365244652456524665247652486524965250652516525265253652546525565256652576525865259652606526165262652636526465265652666526765268652696527065271652726527365274652756527665277652786527965280652816528265283652846528565286652876528865289652906529165292652936529465295652966529765298652996530065301653026530365304653056530665307653086530965310653116531265313653146531565316653176531865319653206532165322653236532465325653266532765328653296533065331653326533365334653356533665337653386533965340653416534265343653446534565346653476534865349653506535165352653536535465355653566535765358653596536065361653626536365364653656536665367653686536965370653716537265373653746537565376653776537865379653806538165382653836538465385653866538765388653896539065391653926539365394653956539665397653986539965400654016540265403654046540565406654076540865409654106541165412654136541465415654166541765418654196542065421654226542365424654256542665427654286542965430654316543265433654346543565436654376543865439654406544165442654436544465445654466544765448654496545065451654526545365454654556545665457654586545965460654616546265463654646546565466654676546865469654706547165472654736547465475654766547765478654796548065481654826548365484654856548665487654886548965490654916549265493654946549565496654976549865499655006550165502655036550465505655066550765508655096551065511655126551365514655156551665517655186551965520655216552265523655246552565526655276552865529655306553165532655336553465535655366553765538655396554065541655426554365544655456554665547655486554965550655516555265553655546555565556655576555865559655606556165562655636556465565655666556765568655696557065571655726557365574655756557665577655786557965580655816558265583655846558565586655876558865589655906559165592655936559465595655966559765598655996560065601656026560365604656056560665607656086560965610656116561265613656146561565616656176561865619656206562165622656236562465625656266562765628656296563065631656326563365634656356563665637656386563965640656416564265643656446564565646656476564865649656506565165652656536565465655656566565765658656596566065661656626566365664656656566665667656686566965670656716567265673656746567565676656776567865679656806568165682656836568465685656866568765688656896569065691656926569365694656956569665697656986569965700657016570265703657046570565706657076570865709657106571165712657136571465715657166571765718657196572065721657226572365724657256572665727657286572965730657316573265733657346573565736657376573865739657406574165742657436574465745657466574765748657496575065751657526575365754657556575665757657586575965760657616576265763657646576565766657676576865769657706577165772657736577465775657766577765778657796578065781657826578365784657856578665787657886578965790657916579265793657946579565796657976579865799658006580165802658036580465805658066580765808658096581065811658126581365814658156581665817658186581965820658216582265823658246582565826658276582865829658306583165832658336583465835658366583765838658396584065841658426584365844658456584665847658486584965850658516585265853658546585565856658576585865859658606586165862658636586465865658666586765868658696587065871658726587365874658756587665877658786587965880658816588265883658846588565886658876588865889658906589165892658936589465895658966589765898658996590065901659026590365904659056590665907659086590965910659116591265913659146591565916659176591865919659206592165922659236592465925659266592765928659296593065931659326593365934659356593665937659386593965940659416594265943659446594565946659476594865949659506595165952659536595465955659566595765958659596596065961659626596365964659656596665967659686596965970659716597265973659746597565976659776597865979659806598165982659836598465985659866598765988659896599065991659926599365994659956599665997659986599966000660016600266003660046600566006660076600866009660106601166012660136601466015660166601766018660196602066021660226602366024660256602666027660286602966030660316603266033660346603566036660376603866039660406604166042660436604466045660466604766048660496605066051660526605366054660556605666057660586605966060660616606266063660646606566066660676606866069660706607166072660736607466075660766607766078660796608066081660826608366084660856608666087660886608966090660916609266093660946609566096660976609866099661006610166102661036610466105661066610766108661096611066111661126611366114661156611666117661186611966120661216612266123661246612566126661276612866129661306613166132661336613466135661366613766138661396614066141661426614366144661456614666147661486614966150661516615266153661546615566156661576615866159661606616166162661636616466165661666616766168661696617066171661726617366174661756617666177661786617966180661816618266183661846618566186661876618866189661906619166192661936619466195661966619766198661996620066201662026620366204662056620666207662086620966210662116621266213662146621566216662176621866219662206622166222662236622466225662266622766228662296623066231662326623366234662356623666237662386623966240662416624266243662446624566246662476624866249662506625166252662536625466255662566625766258662596626066261662626626366264662656626666267662686626966270662716627266273662746627566276662776627866279662806628166282662836628466285662866628766288662896629066291662926629366294662956629666297662986629966300663016630266303663046630566306663076630866309663106631166312663136631466315663166631766318663196632066321663226632366324663256632666327663286632966330663316633266333663346633566336663376633866339663406634166342663436634466345663466634766348663496635066351663526635366354663556635666357663586635966360663616636266363663646636566366663676636866369663706637166372663736637466375663766637766378663796638066381663826638366384663856638666387663886638966390663916639266393663946639566396663976639866399664006640166402664036640466405664066640766408664096641066411664126641366414664156641666417664186641966420664216642266423664246642566426664276642866429664306643166432664336643466435664366643766438664396644066441664426644366444664456644666447664486644966450664516645266453664546645566456664576645866459664606646166462664636646466465664666646766468664696647066471664726647366474664756647666477664786647966480664816648266483664846648566486664876648866489664906649166492664936649466495664966649766498664996650066501665026650366504665056650666507665086650966510665116651266513665146651566516665176651866519665206652166522665236652466525665266652766528665296653066531665326653366534665356653666537665386653966540665416654266543665446654566546665476654866549665506655166552665536655466555665566655766558665596656066561665626656366564665656656666567665686656966570665716657266573665746657566576665776657866579665806658166582665836658466585665866658766588665896659066591665926659366594665956659666597665986659966600666016660266603666046660566606666076660866609666106661166612666136661466615666166661766618666196662066621666226662366624666256662666627666286662966630666316663266633666346663566636666376663866639666406664166642666436664466645666466664766648666496665066651666526665366654666556665666657666586665966660666616666266663666646666566666666676666866669666706667166672666736667466675666766667766678666796668066681666826668366684666856668666687666886668966690666916669266693666946669566696666976669866699667006670166702667036670466705667066670766708667096671066711667126671366714667156671666717667186671966720667216672266723667246672566726667276672866729667306673166732667336673466735667366673766738667396674066741667426674366744667456674666747667486674966750667516675266753667546675566756667576675866759667606676166762667636676466765667666676766768667696677066771667726677366774667756677666777667786677966780667816678266783667846678566786667876678866789667906679166792667936679466795667966679766798667996680066801668026680366804668056680666807668086680966810668116681266813668146681566816668176681866819668206682166822668236682466825668266682766828668296683066831668326683366834668356683666837668386683966840668416684266843668446684566846668476684866849668506685166852668536685466855668566685766858668596686066861668626686366864668656686666867668686686966870668716687266873668746687566876668776687866879668806688166882668836688466885668866688766888668896689066891668926689366894668956689666897668986689966900669016690266903669046690566906669076690866909669106691166912669136691466915669166691766918669196692066921669226692366924669256692666927669286692966930669316693266933669346693566936669376693866939669406694166942669436694466945669466694766948669496695066951669526695366954669556695666957669586695966960669616696266963669646696566966669676696866969669706697166972669736697466975669766697766978669796698066981669826698366984669856698666987669886698966990669916699266993669946699566996669976699866999670006700167002670036700467005670066700767008670096701067011670126701367014670156701667017670186701967020670216702267023670246702567026670276702867029670306703167032670336703467035670366703767038670396704067041670426704367044670456704667047670486704967050670516705267053670546705567056670576705867059670606706167062670636706467065670666706767068670696707067071670726707367074670756707667077670786707967080670816708267083670846708567086670876708867089670906709167092670936709467095670966709767098670996710067101671026710367104671056710667107671086710967110671116711267113671146711567116671176711867119671206712167122671236712467125671266712767128671296713067131671326713367134671356713667137671386713967140671416714267143671446714567146671476714867149671506715167152671536715467155671566715767158671596716067161671626716367164671656716667167671686716967170671716717267173671746717567176671776717867179671806718167182671836718467185671866718767188671896719067191671926719367194671956719667197671986719967200672016720267203672046720567206672076720867209672106721167212672136721467215672166721767218672196722067221672226722367224672256722667227672286722967230672316723267233672346723567236672376723867239672406724167242672436724467245672466724767248672496725067251672526725367254672556725667257672586725967260672616726267263672646726567266672676726867269672706727167272672736727467275672766727767278672796728067281672826728367284672856728667287672886728967290672916729267293672946729567296672976729867299673006730167302673036730467305673066730767308673096731067311673126731367314673156731667317673186731967320673216732267323673246732567326673276732867329673306733167332673336733467335673366733767338673396734067341673426734367344673456734667347673486734967350673516735267353673546735567356673576735867359673606736167362673636736467365673666736767368673696737067371673726737367374673756737667377673786737967380673816738267383673846738567386673876738867389673906739167392673936739467395673966739767398673996740067401674026740367404674056740667407674086740967410674116741267413674146741567416674176741867419674206742167422674236742467425674266742767428674296743067431674326743367434674356743667437674386743967440674416744267443674446744567446674476744867449674506745167452674536745467455674566745767458674596746067461674626746367464674656746667467674686746967470674716747267473674746747567476674776747867479674806748167482674836748467485674866748767488674896749067491674926749367494674956749667497674986749967500675016750267503675046750567506675076750867509675106751167512675136751467515675166751767518675196752067521675226752367524675256752667527675286752967530675316753267533675346753567536675376753867539675406754167542675436754467545675466754767548675496755067551675526755367554675556755667557675586755967560675616756267563675646756567566675676756867569675706757167572675736757467575675766757767578675796758067581675826758367584675856758667587675886758967590675916759267593675946759567596675976759867599676006760167602676036760467605676066760767608676096761067611676126761367614676156761667617676186761967620676216762267623676246762567626676276762867629676306763167632676336763467635676366763767638676396764067641676426764367644676456764667647676486764967650676516765267653676546765567656676576765867659676606766167662676636766467665676666766767668676696767067671676726767367674676756767667677676786767967680676816768267683676846768567686676876768867689676906769167692676936769467695676966769767698676996770067701677026770367704677056770667707677086770967710677116771267713677146771567716677176771867719677206772167722677236772467725677266772767728677296773067731677326773367734677356773667737677386773967740677416774267743677446774567746677476774867749677506775167752677536775467755677566775767758677596776067761677626776367764677656776667767677686776967770677716777267773677746777567776677776777867779677806778167782677836778467785677866778767788677896779067791677926779367794677956779667797677986779967800678016780267803678046780567806678076780867809678106781167812678136781467815678166781767818678196782067821678226782367824678256782667827678286782967830678316783267833678346783567836678376783867839678406784167842678436784467845678466784767848678496785067851678526785367854678556785667857678586785967860678616786267863678646786567866678676786867869678706787167872678736787467875678766787767878678796788067881678826788367884678856788667887678886788967890678916789267893678946789567896678976789867899679006790167902679036790467905679066790767908679096791067911679126791367914679156791667917679186791967920679216792267923679246792567926679276792867929679306793167932679336793467935679366793767938679396794067941679426794367944679456794667947679486794967950679516795267953679546795567956679576795867959679606796167962679636796467965679666796767968679696797067971679726797367974679756797667977679786797967980679816798267983679846798567986679876798867989679906799167992679936799467995679966799767998679996800068001680026800368004680056800668007680086800968010680116801268013680146801568016680176801868019680206802168022680236802468025680266802768028680296803068031680326803368034680356803668037680386803968040680416804268043680446804568046680476804868049680506805168052680536805468055680566805768058680596806068061680626806368064680656806668067680686806968070680716807268073680746807568076680776807868079680806808168082680836808468085680866808768088680896809068091680926809368094680956809668097680986809968100681016810268103681046810568106681076810868109681106811168112681136811468115681166811768118681196812068121681226812368124681256812668127681286812968130681316813268133681346813568136681376813868139681406814168142681436814468145681466814768148681496815068151681526815368154681556815668157681586815968160681616816268163681646816568166681676816868169681706817168172681736817468175681766817768178681796818068181681826818368184681856818668187681886818968190681916819268193681946819568196681976819868199682006820168202682036820468205682066820768208682096821068211682126821368214682156821668217682186821968220682216822268223682246822568226682276822868229682306823168232682336823468235682366823768238682396824068241682426824368244682456824668247682486824968250682516825268253682546825568256682576825868259682606826168262682636826468265682666826768268682696827068271682726827368274682756827668277682786827968280682816828268283682846828568286682876828868289682906829168292682936829468295682966829768298682996830068301683026830368304683056830668307683086830968310683116831268313683146831568316683176831868319683206832168322683236832468325683266832768328683296833068331683326833368334683356833668337683386833968340683416834268343683446834568346683476834868349683506835168352683536835468355683566835768358683596836068361683626836368364683656836668367683686836968370683716837268373683746837568376683776837868379683806838168382683836838468385683866838768388683896839068391683926839368394683956839668397683986839968400684016840268403684046840568406684076840868409684106841168412684136841468415684166841768418684196842068421684226842368424684256842668427684286842968430684316843268433684346843568436684376843868439684406844168442684436844468445684466844768448684496845068451684526845368454684556845668457684586845968460684616846268463684646846568466684676846868469684706847168472684736847468475684766847768478684796848068481684826848368484684856848668487684886848968490684916849268493684946849568496684976849868499685006850168502685036850468505685066850768508685096851068511685126851368514685156851668517685186851968520685216852268523685246852568526685276852868529685306853168532685336853468535685366853768538685396854068541685426854368544685456854668547685486854968550685516855268553685546855568556685576855868559685606856168562685636856468565685666856768568685696857068571685726857368574685756857668577685786857968580685816858268583685846858568586685876858868589685906859168592685936859468595685966859768598685996860068601686026860368604686056860668607686086860968610686116861268613686146861568616686176861868619686206862168622686236862468625686266862768628686296863068631686326863368634686356863668637686386863968640686416864268643686446864568646686476864868649686506865168652686536865468655686566865768658686596866068661686626866368664686656866668667686686866968670686716867268673686746867568676686776867868679686806868168682686836868468685686866868768688686896869068691686926869368694686956869668697686986869968700687016870268703687046870568706687076870868709687106871168712687136871468715687166871768718687196872068721687226872368724687256872668727687286872968730687316873268733687346873568736687376873868739687406874168742687436874468745687466874768748687496875068751687526875368754687556875668757687586875968760687616876268763687646876568766687676876868769687706877168772687736877468775687766877768778687796878068781687826878368784687856878668787687886878968790687916879268793687946879568796687976879868799688006880168802688036880468805688066880768808688096881068811688126881368814688156881668817688186881968820688216882268823688246882568826688276882868829688306883168832688336883468835688366883768838688396884068841688426884368844688456884668847688486884968850688516885268853688546885568856688576885868859688606886168862688636886468865688666886768868688696887068871688726887368874688756887668877688786887968880688816888268883688846888568886688876888868889688906889168892688936889468895688966889768898688996890068901689026890368904689056890668907689086890968910689116891268913689146891568916689176891868919689206892168922689236892468925689266892768928689296893068931689326893368934689356893668937689386893968940689416894268943689446894568946689476894868949689506895168952689536895468955689566895768958689596896068961689626896368964689656896668967689686896968970689716897268973689746897568976689776897868979689806898168982689836898468985689866898768988689896899068991689926899368994689956899668997689986899969000690016900269003690046900569006690076900869009690106901169012690136901469015690166901769018690196902069021690226902369024690256902669027690286902969030690316903269033690346903569036690376903869039690406904169042690436904469045690466904769048690496905069051690526905369054690556905669057690586905969060690616906269063690646906569066690676906869069690706907169072690736907469075690766907769078690796908069081690826908369084690856908669087690886908969090690916909269093690946909569096690976909869099691006910169102691036910469105691066910769108691096911069111691126911369114691156911669117691186911969120691216912269123691246912569126691276912869129691306913169132691336913469135691366913769138691396914069141691426914369144691456914669147691486914969150691516915269153691546915569156691576915869159691606916169162691636916469165691666916769168691696917069171691726917369174691756917669177691786917969180691816918269183691846918569186691876918869189691906919169192691936919469195691966919769198691996920069201692026920369204692056920669207692086920969210692116921269213692146921569216692176921869219692206922169222692236922469225692266922769228692296923069231692326923369234692356923669237692386923969240692416924269243692446924569246692476924869249692506925169252692536925469255692566925769258692596926069261692626926369264692656926669267692686926969270692716927269273692746927569276692776927869279692806928169282692836928469285692866928769288692896929069291692926929369294692956929669297692986929969300693016930269303693046930569306693076930869309693106931169312693136931469315693166931769318693196932069321693226932369324693256932669327693286932969330693316933269333693346933569336693376933869339693406934169342693436934469345693466934769348693496935069351693526935369354693556935669357693586935969360693616936269363693646936569366693676936869369693706937169372693736937469375693766937769378693796938069381693826938369384693856938669387693886938969390693916939269393693946939569396693976939869399694006940169402694036940469405694066940769408694096941069411694126941369414694156941669417694186941969420694216942269423694246942569426694276942869429694306943169432694336943469435694366943769438694396944069441694426944369444694456944669447694486944969450694516945269453694546945569456694576945869459694606946169462694636946469465694666946769468694696947069471694726947369474694756947669477694786947969480694816948269483694846948569486694876948869489694906949169492694936949469495694966949769498694996950069501695026950369504695056950669507695086950969510695116951269513695146951569516695176951869519695206952169522695236952469525695266952769528695296953069531695326953369534695356953669537695386953969540695416954269543695446954569546695476954869549695506955169552695536955469555695566955769558695596956069561695626956369564695656956669567695686956969570695716957269573695746957569576695776957869579695806958169582695836958469585695866958769588695896959069591695926959369594695956959669597695986959969600696016960269603696046960569606696076960869609696106961169612696136961469615696166961769618696196962069621696226962369624696256962669627696286962969630696316963269633696346963569636696376963869639696406964169642696436964469645696466964769648696496965069651696526965369654696556965669657696586965969660696616966269663696646966569666696676966869669696706967169672696736967469675696766967769678696796968069681696826968369684696856968669687696886968969690696916969269693696946969569696696976969869699697006970169702697036970469705697066970769708697096971069711697126971369714697156971669717697186971969720697216972269723697246972569726697276972869729697306973169732697336973469735697366973769738697396974069741697426974369744697456974669747697486974969750697516975269753697546975569756697576975869759697606976169762697636976469765697666976769768697696977069771697726977369774697756977669777697786977969780697816978269783697846978569786697876978869789697906979169792697936979469795697966979769798697996980069801698026980369804698056980669807698086980969810698116981269813698146981569816698176981869819698206982169822698236982469825698266982769828698296983069831698326983369834698356983669837698386983969840698416984269843698446984569846698476984869849698506985169852698536985469855698566985769858698596986069861698626986369864698656986669867698686986969870698716987269873698746987569876698776987869879698806988169882698836988469885698866988769888698896989069891698926989369894698956989669897698986989969900699016990269903699046990569906699076990869909699106991169912699136991469915699166991769918699196992069921699226992369924699256992669927699286992969930699316993269933699346993569936699376993869939699406994169942699436994469945699466994769948699496995069951699526995369954699556995669957699586995969960699616996269963699646996569966699676996869969699706997169972699736997469975699766997769978699796998069981699826998369984699856998669987699886998969990699916999269993699946999569996699976999869999700007000170002700037000470005700067000770008700097001070011700127001370014700157001670017700187001970020700217002270023700247002570026700277002870029700307003170032700337003470035700367003770038700397004070041700427004370044700457004670047700487004970050700517005270053700547005570056700577005870059700607006170062700637006470065700667006770068700697007070071700727007370074700757007670077700787007970080700817008270083700847008570086700877008870089700907009170092700937009470095700967009770098700997010070101701027010370104701057010670107701087010970110701117011270113701147011570116701177011870119701207012170122701237012470125701267012770128701297013070131701327013370134701357013670137701387013970140701417014270143701447014570146701477014870149701507015170152701537015470155701567015770158701597016070161701627016370164701657016670167701687016970170701717017270173701747017570176701777017870179701807018170182701837018470185701867018770188701897019070191701927019370194701957019670197701987019970200702017020270203702047020570206702077020870209702107021170212702137021470215702167021770218702197022070221702227022370224702257022670227702287022970230702317023270233702347023570236702377023870239702407024170242702437024470245702467024770248702497025070251702527025370254702557025670257702587025970260702617026270263702647026570266702677026870269702707027170272702737027470275702767027770278702797028070281702827028370284702857028670287702887028970290702917029270293702947029570296702977029870299703007030170302703037030470305703067030770308703097031070311703127031370314703157031670317703187031970320703217032270323703247032570326703277032870329703307033170332703337033470335703367033770338703397034070341703427034370344703457034670347703487034970350703517035270353703547035570356703577035870359703607036170362703637036470365703667036770368703697037070371703727037370374703757037670377703787037970380703817038270383703847038570386703877038870389703907039170392703937039470395703967039770398703997040070401704027040370404704057040670407704087040970410704117041270413704147041570416704177041870419704207042170422704237042470425704267042770428704297043070431704327043370434704357043670437704387043970440704417044270443704447044570446704477044870449704507045170452704537045470455704567045770458704597046070461704627046370464704657046670467704687046970470704717047270473704747047570476704777047870479704807048170482704837048470485704867048770488704897049070491704927049370494704957049670497704987049970500705017050270503705047050570506705077050870509705107051170512705137051470515705167051770518705197052070521705227052370524705257052670527705287052970530705317053270533705347053570536705377053870539705407054170542705437054470545705467054770548705497055070551705527055370554705557055670557705587055970560705617056270563705647056570566705677056870569705707057170572705737057470575705767057770578705797058070581705827058370584705857058670587705887058970590705917059270593705947059570596705977059870599706007060170602706037060470605706067060770608706097061070611706127061370614706157061670617706187061970620706217062270623706247062570626706277062870629706307063170632706337063470635706367063770638706397064070641706427064370644706457064670647706487064970650706517065270653706547065570656706577065870659706607066170662706637066470665706667066770668706697067070671706727067370674706757067670677706787067970680706817068270683706847068570686706877068870689706907069170692706937069470695706967069770698706997070070701707027070370704707057070670707707087070970710707117071270713707147071570716707177071870719707207072170722707237072470725707267072770728707297073070731707327073370734707357073670737707387073970740707417074270743707447074570746707477074870749707507075170752707537075470755707567075770758707597076070761707627076370764707657076670767707687076970770707717077270773707747077570776707777077870779707807078170782707837078470785707867078770788707897079070791707927079370794707957079670797707987079970800708017080270803708047080570806708077080870809708107081170812708137081470815708167081770818708197082070821708227082370824708257082670827708287082970830708317083270833708347083570836708377083870839708407084170842708437084470845708467084770848708497085070851708527085370854708557085670857708587085970860708617086270863708647086570866708677086870869708707087170872708737087470875708767087770878708797088070881708827088370884708857088670887708887088970890708917089270893708947089570896708977089870899709007090170902709037090470905709067090770908709097091070911709127091370914709157091670917709187091970920709217092270923709247092570926709277092870929709307093170932709337093470935709367093770938709397094070941709427094370944709457094670947709487094970950709517095270953709547095570956709577095870959709607096170962709637096470965709667096770968709697097070971709727097370974709757097670977709787097970980709817098270983709847098570986709877098870989709907099170992709937099470995709967099770998709997100071001710027100371004710057100671007710087100971010710117101271013710147101571016710177101871019710207102171022710237102471025710267102771028710297103071031710327103371034710357103671037710387103971040710417104271043710447104571046710477104871049710507105171052710537105471055710567105771058710597106071061710627106371064710657106671067710687106971070710717107271073710747107571076710777107871079710807108171082710837108471085710867108771088710897109071091710927109371094710957109671097710987109971100711017110271103711047110571106711077110871109711107111171112711137111471115711167111771118711197112071121711227112371124711257112671127711287112971130711317113271133711347113571136711377113871139711407114171142711437114471145711467114771148711497115071151711527115371154711557115671157711587115971160711617116271163711647116571166711677116871169711707117171172711737117471175711767117771178711797118071181711827118371184711857118671187711887118971190711917119271193711947119571196711977119871199712007120171202712037120471205712067120771208712097121071211712127121371214712157121671217712187121971220712217122271223712247122571226712277122871229712307123171232712337123471235712367123771238712397124071241712427124371244712457124671247712487124971250712517125271253712547125571256712577125871259712607126171262712637126471265712667126771268712697127071271712727127371274712757127671277712787127971280712817128271283712847128571286712877128871289712907129171292712937129471295712967129771298712997130071301713027130371304713057130671307713087130971310713117131271313713147131571316713177131871319713207132171322713237132471325713267132771328713297133071331713327133371334713357133671337713387133971340713417134271343713447134571346713477134871349713507135171352713537135471355713567135771358713597136071361713627136371364713657136671367713687136971370713717137271373713747137571376713777137871379713807138171382713837138471385713867138771388713897139071391713927139371394713957139671397713987139971400714017140271403714047140571406714077140871409714107141171412714137141471415714167141771418714197142071421714227142371424714257142671427714287142971430714317143271433714347143571436714377143871439714407144171442714437144471445714467144771448714497145071451714527145371454714557145671457714587145971460714617146271463714647146571466714677146871469714707147171472714737147471475714767147771478714797148071481714827148371484714857148671487714887148971490714917149271493714947149571496714977149871499715007150171502715037150471505715067150771508715097151071511715127151371514715157151671517715187151971520715217152271523715247152571526715277152871529715307153171532715337153471535715367153771538715397154071541715427154371544715457154671547715487154971550715517155271553715547155571556715577155871559715607156171562715637156471565715667156771568715697157071571715727157371574715757157671577715787157971580715817158271583715847158571586715877158871589715907159171592715937159471595715967159771598715997160071601716027160371604716057160671607716087160971610716117161271613716147161571616716177161871619716207162171622716237162471625716267162771628716297163071631716327163371634716357163671637716387163971640716417164271643716447164571646716477164871649716507165171652716537165471655716567165771658716597166071661716627166371664716657166671667716687166971670716717167271673716747167571676716777167871679716807168171682716837168471685716867168771688716897169071691716927169371694716957169671697716987169971700717017170271703717047170571706717077170871709717107171171712717137171471715717167171771718717197172071721717227172371724717257172671727717287172971730717317173271733717347173571736717377173871739717407174171742717437174471745717467174771748717497175071751717527175371754717557175671757717587175971760717617176271763717647176571766717677176871769717707177171772717737177471775717767177771778717797178071781717827178371784717857178671787717887178971790717917179271793717947179571796717977179871799718007180171802718037180471805718067180771808718097181071811718127181371814718157181671817718187181971820718217182271823718247182571826718277182871829718307183171832718337183471835718367183771838718397184071841718427184371844718457184671847718487184971850718517185271853718547185571856718577185871859718607186171862718637186471865718667186771868718697187071871718727187371874718757187671877718787187971880718817188271883718847188571886718877188871889718907189171892718937189471895718967189771898718997190071901719027190371904719057190671907719087190971910719117191271913719147191571916719177191871919719207192171922719237192471925719267192771928719297193071931719327193371934719357193671937719387193971940719417194271943719447194571946719477194871949719507195171952719537195471955719567195771958719597196071961719627196371964719657196671967719687196971970719717197271973719747197571976719777197871979719807198171982719837198471985719867198771988719897199071991719927199371994719957199671997719987199972000720017200272003720047200572006720077200872009720107201172012720137201472015720167201772018720197202072021720227202372024720257202672027720287202972030720317203272033720347203572036720377203872039720407204172042720437204472045720467204772048720497205072051720527205372054720557205672057720587205972060720617206272063720647206572066720677206872069720707207172072720737207472075720767207772078720797208072081720827208372084720857208672087720887208972090720917209272093720947209572096720977209872099721007210172102721037210472105721067210772108721097211072111721127211372114721157211672117721187211972120721217212272123721247212572126721277212872129721307213172132721337213472135721367213772138721397214072141721427214372144721457214672147721487214972150721517215272153721547215572156721577215872159721607216172162721637216472165721667216772168721697217072171721727217372174721757217672177721787217972180721817218272183721847218572186721877218872189721907219172192721937219472195721967219772198721997220072201722027220372204722057220672207722087220972210722117221272213722147221572216722177221872219722207222172222722237222472225722267222772228722297223072231722327223372234722357223672237722387223972240722417224272243722447224572246722477224872249722507225172252722537225472255722567225772258722597226072261722627226372264722657226672267722687226972270722717227272273722747227572276722777227872279722807228172282722837228472285722867228772288722897229072291722927229372294722957229672297722987229972300723017230272303723047230572306723077230872309723107231172312723137231472315723167231772318723197232072321723227232372324723257232672327723287232972330723317233272333723347233572336723377233872339723407234172342723437234472345723467234772348723497235072351723527235372354723557235672357723587235972360723617236272363723647236572366723677236872369723707237172372723737237472375723767237772378723797238072381723827238372384723857238672387723887238972390723917239272393723947239572396723977239872399724007240172402724037240472405724067240772408724097241072411724127241372414724157241672417724187241972420724217242272423724247242572426724277242872429724307243172432724337243472435724367243772438724397244072441724427244372444724457244672447724487244972450724517245272453724547245572456724577245872459724607246172462724637246472465724667246772468724697247072471724727247372474724757247672477724787247972480724817248272483724847248572486724877248872489724907249172492724937249472495724967249772498724997250072501725027250372504725057250672507725087250972510725117251272513725147251572516725177251872519725207252172522725237252472525725267252772528725297253072531725327253372534725357253672537725387253972540725417254272543725447254572546725477254872549725507255172552725537255472555725567255772558725597256072561725627256372564725657256672567725687256972570725717257272573725747257572576725777257872579725807258172582725837258472585725867258772588725897259072591725927259372594725957259672597725987259972600726017260272603726047260572606726077260872609726107261172612726137261472615726167261772618726197262072621726227262372624726257262672627726287262972630726317263272633726347263572636726377263872639726407264172642726437264472645726467264772648726497265072651726527265372654726557265672657726587265972660726617266272663726647266572666726677266872669726707267172672726737267472675726767267772678726797268072681726827268372684726857268672687726887268972690726917269272693726947269572696726977269872699727007270172702727037270472705727067270772708727097271072711727127271372714727157271672717727187271972720727217272272723727247272572726727277272872729727307273172732727337273472735727367273772738727397274072741727427274372744727457274672747727487274972750727517275272753727547275572756727577275872759727607276172762727637276472765727667276772768727697277072771727727277372774727757277672777727787277972780727817278272783727847278572786727877278872789727907279172792727937279472795727967279772798727997280072801728027280372804728057280672807728087280972810728117281272813728147281572816728177281872819728207282172822728237282472825728267282772828728297283072831728327283372834728357283672837728387283972840728417284272843728447284572846728477284872849728507285172852728537285472855728567285772858728597286072861728627286372864728657286672867728687286972870728717287272873728747287572876728777287872879728807288172882728837288472885728867288772888728897289072891728927289372894728957289672897728987289972900729017290272903729047290572906729077290872909729107291172912729137291472915729167291772918729197292072921729227292372924729257292672927729287292972930729317293272933729347293572936729377293872939729407294172942729437294472945729467294772948729497295072951729527295372954729557295672957729587295972960729617296272963729647296572966729677296872969729707297172972729737297472975729767297772978729797298072981729827298372984729857298672987729887298972990729917299272993729947299572996729977299872999730007300173002730037300473005730067300773008730097301073011730127301373014730157301673017730187301973020730217302273023730247302573026730277302873029730307303173032730337303473035730367303773038730397304073041730427304373044730457304673047730487304973050730517305273053730547305573056730577305873059730607306173062730637306473065730667306773068730697307073071730727307373074730757307673077730787307973080730817308273083730847308573086730877308873089730907309173092730937309473095730967309773098730997310073101731027310373104731057310673107731087310973110731117311273113731147311573116731177311873119731207312173122731237312473125731267312773128731297313073131731327313373134731357313673137731387313973140731417314273143731447314573146731477314873149731507315173152731537315473155731567315773158731597316073161731627316373164731657316673167731687316973170731717317273173731747317573176731777317873179731807318173182731837318473185731867318773188731897319073191731927319373194731957319673197731987319973200732017320273203732047320573206732077320873209732107321173212732137321473215732167321773218732197322073221732227322373224732257322673227732287322973230732317323273233732347323573236732377323873239732407324173242732437324473245732467324773248732497325073251732527325373254732557325673257732587325973260732617326273263732647326573266732677326873269732707327173272732737327473275732767327773278732797328073281732827328373284732857328673287732887328973290732917329273293732947329573296732977329873299733007330173302733037330473305733067330773308733097331073311733127331373314733157331673317733187331973320733217332273323733247332573326733277332873329733307333173332733337333473335733367333773338733397334073341733427334373344733457334673347733487334973350733517335273353733547335573356733577335873359733607336173362733637336473365733667336773368733697337073371733727337373374733757337673377733787337973380733817338273383733847338573386733877338873389733907339173392733937339473395733967339773398733997340073401734027340373404734057340673407734087340973410734117341273413734147341573416734177341873419734207342173422734237342473425734267342773428734297343073431734327343373434734357343673437734387343973440734417344273443734447344573446734477344873449734507345173452734537345473455734567345773458734597346073461734627346373464734657346673467734687346973470734717347273473734747347573476734777347873479734807348173482734837348473485734867348773488734897349073491734927349373494734957349673497734987349973500735017350273503735047350573506735077350873509735107351173512735137351473515735167351773518735197352073521735227352373524735257352673527735287352973530735317353273533735347353573536735377353873539735407354173542735437354473545735467354773548735497355073551735527355373554735557355673557735587355973560735617356273563735647356573566735677356873569735707357173572735737357473575735767357773578735797358073581735827358373584735857358673587735887358973590735917359273593735947359573596735977359873599736007360173602736037360473605736067360773608736097361073611736127361373614736157361673617736187361973620736217362273623736247362573626736277362873629736307363173632736337363473635736367363773638736397364073641736427364373644736457364673647736487364973650736517365273653736547365573656736577365873659736607366173662736637366473665736667366773668736697367073671736727367373674736757367673677736787367973680736817368273683736847368573686736877368873689736907369173692736937369473695736967369773698736997370073701737027370373704737057370673707737087370973710737117371273713737147371573716737177371873719737207372173722737237372473725737267372773728737297373073731737327373373734737357373673737737387373973740737417374273743737447374573746737477374873749737507375173752737537375473755737567375773758737597376073761737627376373764737657376673767737687376973770737717377273773737747377573776737777377873779737807378173782737837378473785737867378773788737897379073791737927379373794737957379673797737987379973800738017380273803738047380573806738077380873809738107381173812738137381473815738167381773818738197382073821738227382373824738257382673827738287382973830738317383273833738347383573836738377383873839738407384173842738437384473845738467384773848738497385073851738527385373854738557385673857738587385973860738617386273863738647386573866738677386873869738707387173872738737387473875738767387773878738797388073881738827388373884738857388673887738887388973890738917389273893738947389573896738977389873899739007390173902739037390473905739067390773908739097391073911739127391373914739157391673917739187391973920739217392273923739247392573926739277392873929739307393173932739337393473935739367393773938739397394073941739427394373944739457394673947739487394973950739517395273953739547395573956739577395873959739607396173962739637396473965739667396773968739697397073971739727397373974739757397673977739787397973980739817398273983739847398573986739877398873989739907399173992739937399473995739967399773998739997400074001740027400374004740057400674007740087400974010740117401274013740147401574016740177401874019740207402174022740237402474025740267402774028740297403074031740327403374034740357403674037740387403974040740417404274043740447404574046740477404874049740507405174052740537405474055740567405774058740597406074061740627406374064740657406674067740687406974070740717407274073740747407574076740777407874079740807408174082740837408474085740867408774088740897409074091740927409374094740957409674097740987409974100741017410274103741047410574106741077410874109741107411174112741137411474115741167411774118741197412074121741227412374124741257412674127741287412974130741317413274133741347413574136741377413874139741407414174142741437414474145741467414774148741497415074151741527415374154741557415674157741587415974160741617416274163741647416574166741677416874169741707417174172741737417474175741767417774178741797418074181741827418374184741857418674187741887418974190741917419274193741947419574196741977419874199742007420174202742037420474205742067420774208742097421074211742127421374214742157421674217742187421974220742217422274223742247422574226742277422874229742307423174232742337423474235742367423774238742397424074241742427424374244742457424674247742487424974250742517425274253742547425574256742577425874259742607426174262742637426474265742667426774268742697427074271742727427374274742757427674277742787427974280742817428274283742847428574286742877428874289742907429174292742937429474295742967429774298742997430074301743027430374304743057430674307743087430974310743117431274313743147431574316743177431874319743207432174322743237432474325743267432774328743297433074331743327433374334743357433674337743387433974340743417434274343743447434574346743477434874349743507435174352743537435474355743567435774358743597436074361743627436374364743657436674367743687436974370743717437274373743747437574376743777437874379743807438174382743837438474385743867438774388743897439074391743927439374394743957439674397743987439974400744017440274403744047440574406744077440874409744107441174412744137441474415744167441774418744197442074421744227442374424744257442674427744287442974430744317443274433744347443574436744377443874439744407444174442744437444474445744467444774448744497445074451744527445374454744557445674457744587445974460744617446274463744647446574466744677446874469744707447174472744737447474475744767447774478744797448074481744827448374484744857448674487744887448974490744917449274493744947449574496744977449874499745007450174502745037450474505745067450774508745097451074511745127451374514745157451674517745187451974520745217452274523745247452574526745277452874529745307453174532745337453474535745367453774538745397454074541745427454374544745457454674547745487454974550745517455274553745547455574556745577455874559745607456174562745637456474565745667456774568745697457074571745727457374574745757457674577745787457974580745817458274583745847458574586745877458874589745907459174592745937459474595745967459774598745997460074601746027460374604746057460674607746087460974610746117461274613746147461574616746177461874619746207462174622746237462474625746267462774628746297463074631746327463374634746357463674637746387463974640746417464274643746447464574646746477464874649746507465174652746537465474655746567465774658746597466074661746627466374664746657466674667746687466974670746717467274673746747467574676746777467874679746807468174682746837468474685746867468774688746897469074691746927469374694746957469674697746987469974700747017470274703747047470574706747077470874709747107471174712747137471474715747167471774718747197472074721747227472374724747257472674727747287472974730747317473274733747347473574736747377473874739747407474174742747437474474745747467474774748747497475074751747527475374754747557475674757747587475974760747617476274763747647476574766747677476874769747707477174772747737477474775747767477774778747797478074781747827478374784747857478674787747887478974790747917479274793747947479574796747977479874799748007480174802748037480474805748067480774808748097481074811748127481374814748157481674817748187481974820748217482274823748247482574826748277482874829748307483174832748337483474835748367483774838748397484074841748427484374844748457484674847748487484974850748517485274853748547485574856748577485874859748607486174862748637486474865748667486774868748697487074871748727487374874748757487674877748787487974880748817488274883748847488574886748877488874889748907489174892748937489474895748967489774898748997490074901749027490374904749057490674907749087490974910749117491274913749147491574916749177491874919749207492174922749237492474925749267492774928749297493074931749327493374934749357493674937749387493974940749417494274943749447494574946749477494874949749507495174952749537495474955749567495774958749597496074961749627496374964749657496674967749687496974970749717497274973749747497574976749777497874979749807498174982749837498474985749867498774988749897499074991749927499374994749957499674997749987499975000750017500275003750047500575006750077500875009750107501175012750137501475015750167501775018750197502075021750227502375024750257502675027750287502975030750317503275033750347503575036750377503875039750407504175042750437504475045750467504775048750497505075051750527505375054750557505675057750587505975060750617506275063750647506575066750677506875069750707507175072750737507475075750767507775078750797508075081750827508375084750857508675087750887508975090750917509275093750947509575096750977509875099751007510175102751037510475105751067510775108751097511075111751127511375114751157511675117751187511975120751217512275123751247512575126751277512875129751307513175132751337513475135751367513775138751397514075141751427514375144751457514675147751487514975150751517515275153751547515575156751577515875159751607516175162751637516475165751667516775168751697517075171751727517375174751757517675177751787517975180751817518275183751847518575186751877518875189751907519175192751937519475195751967519775198751997520075201752027520375204752057520675207752087520975210752117521275213752147521575216752177521875219752207522175222752237522475225752267522775228752297523075231752327523375234752357523675237752387523975240752417524275243752447524575246752477524875249752507525175252752537525475255752567525775258752597526075261752627526375264752657526675267752687526975270752717527275273752747527575276752777527875279752807528175282752837528475285752867528775288752897529075291752927529375294752957529675297752987529975300753017530275303753047530575306753077530875309753107531175312753137531475315753167531775318753197532075321753227532375324753257532675327753287532975330753317533275333753347533575336753377533875339753407534175342753437534475345753467534775348753497535075351753527535375354753557535675357753587535975360753617536275363753647536575366753677536875369753707537175372753737537475375753767537775378753797538075381753827538375384753857538675387753887538975390753917539275393753947539575396753977539875399754007540175402754037540475405754067540775408754097541075411754127541375414754157541675417754187541975420754217542275423754247542575426754277542875429754307543175432754337543475435754367543775438754397544075441754427544375444754457544675447754487544975450754517545275453754547545575456754577545875459754607546175462754637546475465754667546775468754697547075471754727547375474754757547675477754787547975480754817548275483754847548575486754877548875489754907549175492754937549475495754967549775498754997550075501755027550375504755057550675507755087550975510755117551275513755147551575516755177551875519755207552175522755237552475525755267552775528755297553075531755327553375534755357553675537755387553975540755417554275543755447554575546755477554875549755507555175552755537555475555755567555775558755597556075561755627556375564755657556675567755687556975570755717557275573755747557575576755777557875579755807558175582755837558475585755867558775588755897559075591755927559375594755957559675597755987559975600756017560275603756047560575606756077560875609756107561175612756137561475615756167561775618756197562075621756227562375624756257562675627756287562975630756317563275633756347563575636756377563875639756407564175642756437564475645756467564775648756497565075651756527565375654756557565675657756587565975660756617566275663756647566575666756677566875669756707567175672756737567475675756767567775678756797568075681756827568375684756857568675687756887568975690756917569275693756947569575696756977569875699757007570175702757037570475705757067570775708757097571075711757127571375714757157571675717757187571975720757217572275723757247572575726757277572875729757307573175732757337573475735757367573775738757397574075741757427574375744757457574675747757487574975750757517575275753757547575575756757577575875759757607576175762757637576475765757667576775768757697577075771757727577375774757757577675777757787577975780757817578275783757847578575786757877578875789757907579175792757937579475795757967579775798757997580075801758027580375804758057580675807758087580975810758117581275813758147581575816758177581875819758207582175822758237582475825758267582775828758297583075831758327583375834758357583675837758387583975840758417584275843758447584575846758477584875849758507585175852758537585475855758567585775858758597586075861758627586375864758657586675867758687586975870758717587275873758747587575876758777587875879758807588175882758837588475885758867588775888758897589075891758927589375894758957589675897758987589975900759017590275903759047590575906759077590875909759107591175912759137591475915759167591775918759197592075921759227592375924759257592675927759287592975930759317593275933759347593575936759377593875939759407594175942759437594475945759467594775948759497595075951759527595375954759557595675957759587595975960759617596275963759647596575966759677596875969759707597175972759737597475975759767597775978759797598075981759827598375984759857598675987759887598975990759917599275993759947599575996759977599875999760007600176002760037600476005760067600776008760097601076011760127601376014760157601676017760187601976020760217602276023760247602576026760277602876029760307603176032760337603476035760367603776038760397604076041760427604376044760457604676047760487604976050760517605276053760547605576056760577605876059760607606176062760637606476065760667606776068760697607076071760727607376074760757607676077760787607976080760817608276083760847608576086760877608876089760907609176092760937609476095760967609776098760997610076101761027610376104761057610676107761087610976110761117611276113761147611576116761177611876119761207612176122761237612476125761267612776128761297613076131761327613376134761357613676137761387613976140761417614276143761447614576146761477614876149761507615176152761537615476155761567615776158761597616076161761627616376164761657616676167761687616976170761717617276173761747617576176761777617876179761807618176182761837618476185761867618776188761897619076191761927619376194761957619676197761987619976200762017620276203762047620576206762077620876209762107621176212762137621476215762167621776218762197622076221762227622376224762257622676227762287622976230762317623276233762347623576236762377623876239762407624176242762437624476245762467624776248762497625076251762527625376254762557625676257762587625976260762617626276263762647626576266762677626876269762707627176272762737627476275762767627776278762797628076281762827628376284762857628676287762887628976290762917629276293762947629576296762977629876299763007630176302763037630476305763067630776308763097631076311763127631376314763157631676317763187631976320763217632276323763247632576326763277632876329763307633176332763337633476335763367633776338763397634076341763427634376344763457634676347763487634976350763517635276353763547635576356763577635876359763607636176362763637636476365763667636776368763697637076371763727637376374763757637676377763787637976380763817638276383763847638576386763877638876389763907639176392763937639476395763967639776398763997640076401764027640376404764057640676407764087640976410764117641276413764147641576416764177641876419764207642176422764237642476425764267642776428764297643076431764327643376434764357643676437764387643976440764417644276443764447644576446764477644876449764507645176452764537645476455764567645776458764597646076461764627646376464764657646676467764687646976470764717647276473764747647576476764777647876479764807648176482764837648476485764867648776488764897649076491764927649376494764957649676497764987649976500765017650276503765047650576506765077650876509765107651176512765137651476515765167651776518765197652076521765227652376524765257652676527765287652976530765317653276533765347653576536765377653876539765407654176542765437654476545765467654776548765497655076551765527655376554765557655676557765587655976560765617656276563765647656576566765677656876569765707657176572765737657476575765767657776578765797658076581765827658376584765857658676587765887658976590765917659276593765947659576596765977659876599766007660176602766037660476605766067660776608766097661076611766127661376614766157661676617766187661976620766217662276623766247662576626766277662876629766307663176632766337663476635766367663776638766397664076641766427664376644766457664676647766487664976650766517665276653766547665576656766577665876659766607666176662766637666476665766667666776668766697667076671766727667376674766757667676677766787667976680766817668276683766847668576686766877668876689766907669176692766937669476695766967669776698766997670076701767027670376704767057670676707767087670976710767117671276713767147671576716767177671876719767207672176722767237672476725767267672776728767297673076731767327673376734767357673676737767387673976740767417674276743767447674576746767477674876749767507675176752767537675476755767567675776758767597676076761767627676376764767657676676767767687676976770767717677276773767747677576776767777677876779767807678176782767837678476785767867678776788767897679076791767927679376794767957679676797767987679976800768017680276803768047680576806768077680876809768107681176812768137681476815768167681776818768197682076821768227682376824768257682676827768287682976830768317683276833768347683576836768377683876839768407684176842768437684476845768467684776848768497685076851768527685376854768557685676857768587685976860768617686276863768647686576866768677686876869768707687176872768737687476875768767687776878768797688076881768827688376884768857688676887768887688976890768917689276893768947689576896768977689876899769007690176902769037690476905769067690776908769097691076911769127691376914769157691676917769187691976920769217692276923769247692576926769277692876929769307693176932769337693476935769367693776938769397694076941769427694376944769457694676947769487694976950769517695276953769547695576956769577695876959769607696176962769637696476965769667696776968769697697076971769727697376974769757697676977769787697976980769817698276983769847698576986769877698876989769907699176992769937699476995769967699776998769997700077001770027700377004770057700677007770087700977010770117701277013770147701577016770177701877019770207702177022770237702477025770267702777028770297703077031770327703377034770357703677037770387703977040770417704277043770447704577046770477704877049770507705177052770537705477055770567705777058770597706077061770627706377064770657706677067770687706977070770717707277073770747707577076770777707877079770807708177082770837708477085770867708777088770897709077091770927709377094770957709677097770987709977100771017710277103771047710577106771077710877109771107711177112771137711477115771167711777118771197712077121771227712377124771257712677127771287712977130771317713277133771347713577136771377713877139771407714177142771437714477145771467714777148771497715077151771527715377154771557715677157771587715977160771617716277163771647716577166771677716877169771707717177172771737717477175771767717777178771797718077181771827718377184771857718677187771887718977190771917719277193771947719577196771977719877199772007720177202772037720477205772067720777208772097721077211772127721377214772157721677217772187721977220772217722277223772247722577226772277722877229772307723177232772337723477235772367723777238772397724077241772427724377244772457724677247772487724977250772517725277253772547725577256772577725877259772607726177262772637726477265772667726777268772697727077271772727727377274772757727677277772787727977280772817728277283772847728577286772877728877289772907729177292772937729477295772967729777298772997730077301773027730377304773057730677307773087730977310773117731277313773147731577316773177731877319773207732177322773237732477325773267732777328773297733077331773327733377334773357733677337773387733977340773417734277343773447734577346773477734877349773507735177352773537735477355773567735777358773597736077361773627736377364773657736677367773687736977370773717737277373773747737577376773777737877379773807738177382773837738477385773867738777388773897739077391773927739377394773957739677397773987739977400774017740277403774047740577406774077740877409774107741177412774137741477415774167741777418774197742077421774227742377424774257742677427774287742977430774317743277433774347743577436774377743877439774407744177442774437744477445774467744777448774497745077451774527745377454774557745677457774587745977460774617746277463774647746577466774677746877469774707747177472774737747477475774767747777478774797748077481774827748377484774857748677487774887748977490774917749277493774947749577496774977749877499775007750177502775037750477505775067750777508775097751077511775127751377514775157751677517775187751977520775217752277523775247752577526775277752877529775307753177532775337753477535775367753777538775397754077541775427754377544775457754677547775487754977550775517755277553775547755577556775577755877559775607756177562775637756477565775667756777568775697757077571775727757377574775757757677577775787757977580775817758277583775847758577586775877758877589775907759177592775937759477595775967759777598775997760077601776027760377604776057760677607776087760977610776117761277613776147761577616776177761877619776207762177622776237762477625776267762777628776297763077631776327763377634776357763677637776387763977640776417764277643776447764577646776477764877649776507765177652776537765477655776567765777658776597766077661776627766377664776657766677667776687766977670776717767277673776747767577676776777767877679776807768177682776837768477685776867768777688776897769077691776927769377694776957769677697776987769977700777017770277703777047770577706777077770877709777107771177712777137771477715777167771777718777197772077721777227772377724777257772677727777287772977730777317773277733777347773577736777377773877739777407774177742777437774477745777467774777748777497775077751777527775377754777557775677757777587775977760777617776277763777647776577766777677776877769777707777177772777737777477775777767777777778777797778077781777827778377784777857778677787777887778977790777917779277793777947779577796777977779877799778007780177802778037780477805778067780777808778097781077811778127781377814778157781677817778187781977820778217782277823778247782577826778277782877829778307783177832778337783477835778367783777838778397784077841778427784377844778457784677847778487784977850778517785277853778547785577856778577785877859778607786177862778637786477865778667786777868778697787077871778727787377874778757787677877778787787977880778817788277883778847788577886778877788877889778907789177892778937789477895778967789777898778997790077901779027790377904779057790677907779087790977910779117791277913779147791577916779177791877919779207792177922779237792477925779267792777928779297793077931779327793377934779357793677937779387793977940779417794277943779447794577946779477794877949779507795177952779537795477955779567795777958779597796077961779627796377964779657796677967779687796977970779717797277973779747797577976779777797877979779807798177982779837798477985779867798777988779897799077991779927799377994779957799677997779987799978000780017800278003780047800578006780077800878009780107801178012780137801478015780167801778018780197802078021780227802378024780257802678027780287802978030780317803278033780347803578036780377803878039780407804178042780437804478045780467804778048780497805078051780527805378054780557805678057780587805978060780617806278063780647806578066780677806878069780707807178072780737807478075780767807778078780797808078081780827808378084780857808678087780887808978090780917809278093780947809578096780977809878099781007810178102781037810478105781067810778108781097811078111781127811378114781157811678117781187811978120781217812278123781247812578126781277812878129781307813178132781337813478135781367813778138781397814078141781427814378144781457814678147781487814978150781517815278153781547815578156781577815878159781607816178162781637816478165781667816778168781697817078171781727817378174781757817678177781787817978180781817818278183781847818578186781877818878189781907819178192781937819478195781967819778198781997820078201782027820378204782057820678207782087820978210782117821278213782147821578216782177821878219782207822178222782237822478225782267822778228782297823078231782327823378234782357823678237782387823978240782417824278243782447824578246782477824878249782507825178252782537825478255782567825778258782597826078261782627826378264782657826678267782687826978270782717827278273782747827578276782777827878279782807828178282782837828478285782867828778288782897829078291782927829378294782957829678297782987829978300783017830278303783047830578306783077830878309783107831178312783137831478315783167831778318783197832078321783227832378324783257832678327783287832978330783317833278333783347833578336783377833878339783407834178342783437834478345783467834778348783497835078351783527835378354783557835678357783587835978360783617836278363783647836578366783677836878369783707837178372783737837478375783767837778378783797838078381783827838378384783857838678387783887838978390783917839278393783947839578396783977839878399784007840178402784037840478405784067840778408784097841078411784127841378414784157841678417784187841978420784217842278423784247842578426784277842878429784307843178432784337843478435784367843778438784397844078441784427844378444784457844678447784487844978450784517845278453784547845578456784577845878459784607846178462784637846478465784667846778468784697847078471784727847378474784757847678477784787847978480784817848278483784847848578486784877848878489784907849178492784937849478495784967849778498784997850078501785027850378504785057850678507785087850978510785117851278513785147851578516785177851878519785207852178522785237852478525785267852778528785297853078531785327853378534785357853678537785387853978540785417854278543785447854578546785477854878549785507855178552785537855478555785567855778558785597856078561785627856378564785657856678567785687856978570785717857278573785747857578576785777857878579785807858178582785837858478585785867858778588785897859078591785927859378594785957859678597785987859978600786017860278603786047860578606786077860878609786107861178612786137861478615786167861778618786197862078621786227862378624786257862678627786287862978630786317863278633786347863578636786377863878639786407864178642786437864478645786467864778648786497865078651786527865378654786557865678657786587865978660786617866278663786647866578666786677866878669786707867178672786737867478675786767867778678786797868078681786827868378684786857868678687786887868978690786917869278693786947869578696786977869878699787007870178702787037870478705787067870778708787097871078711787127871378714787157871678717787187871978720787217872278723787247872578726787277872878729787307873178732787337873478735787367873778738787397874078741787427874378744787457874678747787487874978750787517875278753787547875578756787577875878759787607876178762787637876478765787667876778768787697877078771787727877378774787757877678777787787877978780787817878278783787847878578786787877878878789787907879178792787937879478795787967879778798787997880078801788027880378804788057880678807788087880978810788117881278813788147881578816788177881878819788207882178822788237882478825788267882778828788297883078831788327883378834788357883678837788387883978840788417884278843788447884578846788477884878849788507885178852788537885478855788567885778858788597886078861788627886378864788657886678867788687886978870788717887278873788747887578876788777887878879788807888178882788837888478885788867888778888788897889078891788927889378894788957889678897788987889978900789017890278903789047890578906789077890878909789107891178912789137891478915789167891778918789197892078921789227892378924789257892678927789287892978930789317893278933789347893578936789377893878939789407894178942789437894478945789467894778948789497895078951789527895378954789557895678957789587895978960789617896278963789647896578966789677896878969789707897178972789737897478975789767897778978789797898078981789827898378984789857898678987789887898978990789917899278993789947899578996789977899878999790007900179002790037900479005790067900779008790097901079011790127901379014790157901679017790187901979020790217902279023790247902579026790277902879029790307903179032790337903479035790367903779038790397904079041790427904379044790457904679047790487904979050790517905279053790547905579056790577905879059790607906179062790637906479065790667906779068790697907079071790727907379074790757907679077790787907979080790817908279083790847908579086790877908879089790907909179092790937909479095790967909779098790997910079101791027910379104791057910679107791087910979110791117911279113791147911579116791177911879119791207912179122791237912479125791267912779128791297913079131791327913379134791357913679137791387913979140791417914279143791447914579146791477914879149791507915179152791537915479155791567915779158791597916079161791627916379164791657916679167791687916979170791717917279173791747917579176791777917879179791807918179182791837918479185791867918779188791897919079191791927919379194791957919679197791987919979200792017920279203792047920579206792077920879209792107921179212792137921479215792167921779218792197922079221792227922379224792257922679227792287922979230792317923279233792347923579236792377923879239792407924179242792437924479245792467924779248792497925079251792527925379254792557925679257792587925979260792617926279263792647926579266792677926879269792707927179272792737927479275792767927779278792797928079281792827928379284792857928679287792887928979290792917929279293792947929579296792977929879299793007930179302793037930479305793067930779308793097931079311793127931379314793157931679317793187931979320793217932279323793247932579326793277932879329793307933179332793337933479335793367933779338793397934079341793427934379344793457934679347793487934979350793517935279353793547935579356793577935879359793607936179362793637936479365793667936779368793697937079371793727937379374793757937679377793787937979380793817938279383793847938579386793877938879389793907939179392793937939479395793967939779398793997940079401794027940379404794057940679407794087940979410794117941279413794147941579416794177941879419794207942179422794237942479425794267942779428794297943079431794327943379434794357943679437794387943979440794417944279443794447944579446794477944879449794507945179452794537945479455794567945779458794597946079461794627946379464794657946679467794687946979470794717947279473794747947579476794777947879479794807948179482794837948479485794867948779488794897949079491794927949379494794957949679497794987949979500795017950279503795047950579506795077950879509795107951179512795137951479515795167951779518795197952079521795227952379524795257952679527795287952979530795317953279533795347953579536795377953879539795407954179542795437954479545795467954779548795497955079551795527955379554795557955679557795587955979560795617956279563795647956579566795677956879569795707957179572795737957479575795767957779578795797958079581795827958379584795857958679587795887958979590795917959279593795947959579596795977959879599796007960179602796037960479605796067960779608796097961079611796127961379614796157961679617796187961979620796217962279623796247962579626796277962879629796307963179632796337963479635796367963779638796397964079641796427964379644796457964679647796487964979650796517965279653796547965579656796577965879659796607966179662796637966479665796667966779668796697967079671796727967379674796757967679677796787967979680796817968279683796847968579686796877968879689796907969179692796937969479695796967969779698796997970079701797027970379704797057970679707797087970979710797117971279713797147971579716797177971879719797207972179722797237972479725797267972779728797297973079731797327973379734797357973679737797387973979740797417974279743797447974579746797477974879749797507975179752797537975479755797567975779758797597976079761797627976379764797657976679767797687976979770797717977279773797747977579776797777977879779797807978179782797837978479785797867978779788797897979079791797927979379794797957979679797797987979979800798017980279803798047980579806798077980879809798107981179812798137981479815798167981779818798197982079821798227982379824798257982679827798287982979830798317983279833798347983579836798377983879839798407984179842798437984479845798467984779848798497985079851798527985379854798557985679857798587985979860798617986279863798647986579866798677986879869798707987179872798737987479875798767987779878798797988079881798827988379884798857988679887798887988979890798917989279893798947989579896798977989879899799007990179902799037990479905799067990779908799097991079911799127991379914799157991679917799187991979920799217992279923799247992579926799277992879929799307993179932799337993479935799367993779938799397994079941799427994379944799457994679947799487994979950799517995279953799547995579956799577995879959799607996179962799637996479965799667996779968799697997079971799727997379974799757997679977799787997979980799817998279983799847998579986799877998879989799907999179992799937999479995799967999779998799998000080001800028000380004800058000680007800088000980010800118001280013800148001580016800178001880019800208002180022800238002480025800268002780028800298003080031800328003380034800358003680037800388003980040800418004280043800448004580046800478004880049800508005180052800538005480055800568005780058800598006080061800628006380064800658006680067800688006980070800718007280073800748007580076800778007880079800808008180082800838008480085800868008780088800898009080091800928009380094800958009680097800988009980100801018010280103801048010580106801078010880109801108011180112801138011480115801168011780118801198012080121801228012380124801258012680127801288012980130801318013280133801348013580136801378013880139801408014180142801438014480145801468014780148801498015080151801528015380154801558015680157801588015980160801618016280163801648016580166801678016880169801708017180172801738017480175801768017780178801798018080181801828018380184801858018680187801888018980190801918019280193801948019580196801978019880199802008020180202802038020480205802068020780208802098021080211802128021380214802158021680217802188021980220802218022280223802248022580226802278022880229802308023180232802338023480235802368023780238802398024080241802428024380244802458024680247802488024980250802518025280253802548025580256802578025880259802608026180262802638026480265802668026780268802698027080271802728027380274802758027680277802788027980280802818028280283802848028580286802878028880289802908029180292802938029480295802968029780298802998030080301803028030380304803058030680307803088030980310803118031280313803148031580316803178031880319803208032180322803238032480325803268032780328803298033080331803328033380334803358033680337803388033980340803418034280343803448034580346803478034880349803508035180352803538035480355803568035780358803598036080361803628036380364803658036680367803688036980370803718037280373803748037580376803778037880379803808038180382803838038480385803868038780388803898039080391803928039380394803958039680397803988039980400804018040280403804048040580406804078040880409804108041180412804138041480415804168041780418804198042080421804228042380424804258042680427804288042980430804318043280433804348043580436804378043880439804408044180442804438044480445804468044780448804498045080451804528045380454804558045680457804588045980460804618046280463804648046580466804678046880469804708047180472804738047480475804768047780478804798048080481804828048380484804858048680487804888048980490804918049280493804948049580496804978049880499805008050180502805038050480505805068050780508805098051080511805128051380514805158051680517805188051980520805218052280523805248052580526805278052880529805308053180532805338053480535805368053780538805398054080541805428054380544805458054680547805488054980550805518055280553805548055580556805578055880559805608056180562805638056480565805668056780568805698057080571805728057380574805758057680577805788057980580805818058280583805848058580586805878058880589805908059180592805938059480595805968059780598805998060080601806028060380604806058060680607806088060980610806118061280613806148061580616806178061880619806208062180622806238062480625806268062780628806298063080631806328063380634806358063680637806388063980640806418064280643806448064580646806478064880649806508065180652806538065480655806568065780658806598066080661806628066380664806658066680667806688066980670806718067280673806748067580676806778067880679806808068180682806838068480685806868068780688806898069080691806928069380694806958069680697806988069980700807018070280703807048070580706807078070880709807108071180712807138071480715807168071780718807198072080721807228072380724807258072680727807288072980730807318073280733807348073580736807378073880739807408074180742807438074480745807468074780748807498075080751807528075380754807558075680757807588075980760807618076280763807648076580766807678076880769807708077180772807738077480775807768077780778807798078080781807828078380784807858078680787807888078980790807918079280793807948079580796807978079880799808008080180802808038080480805808068080780808808098081080811808128081380814808158081680817808188081980820808218082280823808248082580826808278082880829808308083180832808338083480835808368083780838808398084080841808428084380844808458084680847808488084980850808518085280853808548085580856808578085880859808608086180862808638086480865808668086780868808698087080871808728087380874808758087680877808788087980880808818088280883808848088580886808878088880889808908089180892808938089480895808968089780898808998090080901809028090380904809058090680907809088090980910809118091280913809148091580916809178091880919809208092180922809238092480925809268092780928809298093080931809328093380934809358093680937809388093980940809418094280943809448094580946809478094880949809508095180952809538095480955809568095780958809598096080961809628096380964809658096680967809688096980970809718097280973809748097580976809778097880979809808098180982809838098480985809868098780988809898099080991809928099380994809958099680997809988099981000810018100281003810048100581006810078100881009810108101181012810138101481015810168101781018810198102081021810228102381024810258102681027810288102981030810318103281033810348103581036810378103881039810408104181042810438104481045810468104781048810498105081051810528105381054810558105681057810588105981060810618106281063810648106581066810678106881069810708107181072810738107481075810768107781078810798108081081810828108381084810858108681087810888108981090810918109281093810948109581096810978109881099811008110181102811038110481105811068110781108811098111081111811128111381114811158111681117811188111981120811218112281123811248112581126811278112881129811308113181132811338113481135811368113781138811398114081141811428114381144811458114681147811488114981150811518115281153811548115581156811578115881159811608116181162811638116481165811668116781168811698117081171811728117381174811758117681177811788117981180811818118281183811848118581186811878118881189811908119181192811938119481195811968119781198811998120081201812028120381204812058120681207812088120981210812118121281213812148121581216812178121881219812208122181222812238122481225812268122781228812298123081231812328123381234812358123681237812388123981240812418124281243812448124581246812478124881249812508125181252812538125481255812568125781258812598126081261812628126381264812658126681267812688126981270812718127281273812748127581276812778127881279812808128181282812838128481285812868128781288812898129081291812928129381294812958129681297812988129981300813018130281303813048130581306813078130881309813108131181312813138131481315813168131781318813198132081321813228132381324813258132681327813288132981330813318133281333813348133581336813378133881339813408134181342813438134481345813468134781348813498135081351813528135381354813558135681357813588135981360813618136281363813648136581366813678136881369813708137181372813738137481375813768137781378813798138081381813828138381384813858138681387813888138981390813918139281393813948139581396813978139881399814008140181402814038140481405814068140781408814098141081411814128141381414814158141681417814188141981420814218142281423814248142581426814278142881429814308143181432814338143481435814368143781438814398144081441814428144381444814458144681447814488144981450814518145281453814548145581456814578145881459814608146181462814638146481465814668146781468814698147081471814728147381474814758147681477814788147981480814818148281483814848148581486814878148881489814908149181492814938149481495814968149781498814998150081501815028150381504815058150681507815088150981510815118151281513815148151581516815178151881519815208152181522815238152481525815268152781528815298153081531815328153381534815358153681537815388153981540815418154281543815448154581546815478154881549815508155181552815538155481555815568155781558815598156081561815628156381564815658156681567815688156981570815718157281573815748157581576815778157881579815808158181582815838158481585815868158781588815898159081591815928159381594815958159681597815988159981600816018160281603816048160581606816078160881609816108161181612816138161481615816168161781618816198162081621816228162381624816258162681627816288162981630816318163281633816348163581636816378163881639816408164181642816438164481645816468164781648816498165081651816528165381654816558165681657816588165981660816618166281663816648166581666816678166881669816708167181672816738167481675816768167781678816798168081681816828168381684816858168681687816888168981690816918169281693816948169581696816978169881699817008170181702817038170481705817068170781708817098171081711817128171381714817158171681717817188171981720817218172281723817248172581726817278172881729817308173181732817338173481735817368173781738817398174081741817428174381744817458174681747817488174981750817518175281753817548175581756817578175881759817608176181762817638176481765817668176781768817698177081771817728177381774817758177681777817788177981780817818178281783817848178581786817878178881789817908179181792817938179481795817968179781798817998180081801818028180381804818058180681807818088180981810818118181281813818148181581816818178181881819818208182181822818238182481825818268182781828818298183081831818328183381834818358183681837818388183981840818418184281843818448184581846818478184881849818508185181852818538185481855818568185781858818598186081861818628186381864818658186681867818688186981870818718187281873818748187581876818778187881879818808188181882818838188481885818868188781888818898189081891818928189381894818958189681897818988189981900819018190281903819048190581906819078190881909819108191181912819138191481915819168191781918819198192081921819228192381924819258192681927819288192981930819318193281933819348193581936819378193881939819408194181942819438194481945819468194781948819498195081951819528195381954819558195681957819588195981960819618196281963819648196581966819678196881969819708197181972819738197481975819768197781978819798198081981819828198381984819858198681987819888198981990819918199281993819948199581996819978199881999820008200182002820038200482005820068200782008820098201082011820128201382014820158201682017820188201982020820218202282023820248202582026820278202882029820308203182032820338203482035820368203782038820398204082041820428204382044820458204682047820488204982050820518205282053820548205582056820578205882059820608206182062820638206482065820668206782068820698207082071820728207382074820758207682077820788207982080820818208282083820848208582086820878208882089820908209182092820938209482095820968209782098820998210082101821028210382104821058210682107821088210982110821118211282113821148211582116821178211882119821208212182122821238212482125821268212782128821298213082131821328213382134821358213682137821388213982140821418214282143821448214582146821478214882149821508215182152821538215482155821568215782158821598216082161821628216382164821658216682167821688216982170821718217282173821748217582176821778217882179821808218182182821838218482185821868218782188821898219082191821928219382194821958219682197821988219982200822018220282203822048220582206822078220882209822108221182212822138221482215822168221782218822198222082221822228222382224822258222682227822288222982230822318223282233822348223582236822378223882239822408224182242822438224482245822468224782248822498225082251822528225382254822558225682257822588225982260822618226282263822648226582266822678226882269822708227182272822738227482275822768227782278822798228082281822828228382284822858228682287822888228982290822918229282293822948229582296822978229882299823008230182302823038230482305823068230782308823098231082311823128231382314823158231682317823188231982320823218232282323823248232582326823278232882329823308233182332823338233482335823368233782338823398234082341823428234382344823458234682347823488234982350823518235282353823548235582356823578235882359823608236182362823638236482365823668236782368823698237082371823728237382374823758237682377823788237982380823818238282383823848238582386823878238882389823908239182392823938239482395823968239782398823998240082401824028240382404824058240682407824088240982410824118241282413824148241582416824178241882419824208242182422824238242482425824268242782428824298243082431824328243382434824358243682437824388243982440824418244282443824448244582446824478244882449824508245182452824538245482455824568245782458824598246082461824628246382464824658246682467824688246982470824718247282473824748247582476824778247882479824808248182482824838248482485824868248782488824898249082491824928249382494824958249682497824988249982500825018250282503825048250582506825078250882509825108251182512825138251482515825168251782518825198252082521825228252382524825258252682527825288252982530825318253282533825348253582536825378253882539825408254182542825438254482545825468254782548825498255082551825528255382554825558255682557825588255982560825618256282563825648256582566825678256882569825708257182572825738257482575825768257782578825798258082581825828258382584825858258682587825888258982590825918259282593825948259582596825978259882599826008260182602826038260482605826068260782608826098261082611826128261382614826158261682617826188261982620826218262282623826248262582626826278262882629826308263182632826338263482635826368263782638826398264082641826428264382644826458264682647826488264982650826518265282653826548265582656826578265882659826608266182662826638266482665826668266782668826698267082671826728267382674826758267682677826788267982680826818268282683826848268582686826878268882689826908269182692826938269482695826968269782698826998270082701827028270382704827058270682707827088270982710827118271282713827148271582716827178271882719827208272182722827238272482725827268272782728827298273082731827328273382734827358273682737827388273982740827418274282743827448274582746827478274882749827508275182752827538275482755827568275782758827598276082761827628276382764827658276682767827688276982770827718277282773827748277582776827778277882779827808278182782827838278482785827868278782788827898279082791827928279382794827958279682797827988279982800828018280282803828048280582806828078280882809828108281182812828138281482815828168281782818828198282082821828228282382824828258282682827828288282982830828318283282833828348283582836828378283882839828408284182842828438284482845828468284782848828498285082851828528285382854828558285682857828588285982860828618286282863828648286582866828678286882869828708287182872828738287482875828768287782878828798288082881828828288382884828858288682887828888288982890828918289282893828948289582896828978289882899829008290182902829038290482905829068290782908829098291082911829128291382914829158291682917829188291982920829218292282923829248292582926829278292882929829308293182932829338293482935829368293782938829398294082941829428294382944829458294682947829488294982950829518295282953829548295582956829578295882959829608296182962829638296482965829668296782968829698297082971829728297382974829758297682977829788297982980829818298282983829848298582986829878298882989829908299182992829938299482995829968299782998829998300083001830028300383004830058300683007830088300983010830118301283013830148301583016830178301883019830208302183022830238302483025830268302783028830298303083031830328303383034830358303683037830388303983040830418304283043830448304583046830478304883049830508305183052830538305483055830568305783058830598306083061830628306383064830658306683067830688306983070830718307283073830748307583076830778307883079830808308183082830838308483085830868308783088830898309083091830928309383094830958309683097830988309983100831018310283103831048310583106831078310883109831108311183112831138311483115831168311783118831198312083121831228312383124831258312683127831288312983130831318313283133831348313583136831378313883139831408314183142831438314483145831468314783148831498315083151831528315383154831558315683157831588315983160831618316283163831648316583166831678316883169831708317183172831738317483175831768317783178831798318083181831828318383184831858318683187831888318983190831918319283193831948319583196831978319883199832008320183202832038320483205832068320783208832098321083211832128321383214832158321683217832188321983220832218322283223832248322583226832278322883229832308323183232832338323483235832368323783238832398324083241832428324383244832458324683247832488324983250832518325283253832548325583256832578325883259832608326183262832638326483265832668326783268832698327083271832728327383274832758327683277832788327983280832818328283283832848328583286832878328883289832908329183292832938329483295832968329783298832998330083301833028330383304833058330683307833088330983310833118331283313833148331583316833178331883319833208332183322833238332483325833268332783328833298333083331833328333383334833358333683337833388333983340833418334283343833448334583346833478334883349833508335183352833538335483355833568335783358833598336083361833628336383364833658336683367833688336983370833718337283373833748337583376833778337883379833808338183382833838338483385833868338783388833898339083391833928339383394833958339683397833988339983400834018340283403834048340583406834078340883409834108341183412834138341483415834168341783418834198342083421834228342383424834258342683427834288342983430834318343283433834348343583436834378343883439834408344183442834438344483445834468344783448834498345083451834528345383454834558345683457834588345983460834618346283463834648346583466834678346883469834708347183472834738347483475834768347783478834798348083481834828348383484834858348683487834888348983490834918349283493834948349583496834978349883499835008350183502835038350483505835068350783508835098351083511835128351383514835158351683517835188351983520835218352283523835248352583526835278352883529835308353183532835338353483535835368353783538835398354083541835428354383544835458354683547835488354983550835518355283553835548355583556835578355883559835608356183562835638356483565835668356783568835698357083571835728357383574835758357683577835788357983580835818358283583835848358583586835878358883589835908359183592835938359483595835968359783598835998360083601836028360383604836058360683607836088360983610836118361283613836148361583616836178361883619836208362183622836238362483625836268362783628836298363083631836328363383634836358363683637836388363983640836418364283643836448364583646836478364883649836508365183652836538365483655836568365783658836598366083661836628366383664836658366683667836688366983670836718367283673836748367583676836778367883679836808368183682836838368483685836868368783688836898369083691836928369383694836958369683697836988369983700837018370283703837048370583706837078370883709837108371183712837138371483715837168371783718837198372083721837228372383724837258372683727837288372983730837318373283733837348373583736837378373883739837408374183742837438374483745837468374783748837498375083751837528375383754837558375683757837588375983760837618376283763837648376583766837678376883769837708377183772837738377483775837768377783778837798378083781837828378383784837858378683787837888378983790837918379283793837948379583796837978379883799838008380183802838038380483805838068380783808838098381083811838128381383814838158381683817838188381983820838218382283823838248382583826838278382883829838308383183832838338383483835838368383783838838398384083841838428384383844838458384683847838488384983850838518385283853838548385583856838578385883859838608386183862838638386483865838668386783868838698387083871838728387383874838758387683877838788387983880838818388283883838848388583886838878388883889838908389183892838938389483895838968389783898838998390083901839028390383904839058390683907839088390983910839118391283913839148391583916839178391883919839208392183922839238392483925839268392783928839298393083931839328393383934839358393683937839388393983940839418394283943839448394583946839478394883949839508395183952839538395483955839568395783958839598396083961839628396383964839658396683967839688396983970839718397283973839748397583976839778397883979839808398183982839838398483985839868398783988839898399083991839928399383994839958399683997839988399984000840018400284003840048400584006840078400884009840108401184012840138401484015840168401784018840198402084021840228402384024840258402684027840288402984030840318403284033840348403584036840378403884039840408404184042840438404484045840468404784048840498405084051840528405384054840558405684057840588405984060840618406284063840648406584066840678406884069840708407184072840738407484075840768407784078840798408084081840828408384084840858408684087840888408984090840918409284093840948409584096840978409884099841008410184102841038410484105841068410784108841098411084111841128411384114841158411684117841188411984120841218412284123841248412584126841278412884129841308413184132841338413484135841368413784138841398414084141841428414384144841458414684147841488414984150841518415284153841548415584156841578415884159841608416184162841638416484165841668416784168841698417084171841728417384174841758417684177841788417984180841818418284183841848418584186841878418884189841908419184192841938419484195841968419784198841998420084201842028420384204842058420684207842088420984210842118421284213842148421584216842178421884219842208422184222842238422484225842268422784228842298423084231842328423384234842358423684237842388423984240842418424284243842448424584246842478424884249842508425184252842538425484255842568425784258842598426084261842628426384264842658426684267842688426984270842718427284273842748427584276842778427884279842808428184282842838428484285842868428784288842898429084291842928429384294842958429684297842988429984300843018430284303843048430584306843078430884309843108431184312843138431484315843168431784318843198432084321843228432384324843258432684327843288432984330843318433284333843348433584336843378433884339843408434184342843438434484345843468434784348843498435084351843528435384354843558435684357843588435984360843618436284363843648436584366843678436884369843708437184372843738437484375843768437784378843798438084381843828438384384843858438684387843888438984390843918439284393843948439584396843978439884399844008440184402844038440484405844068440784408844098441084411844128441384414844158441684417844188441984420844218442284423844248442584426844278442884429844308443184432844338443484435844368443784438844398444084441844428444384444844458444684447844488444984450844518445284453844548445584456844578445884459844608446184462844638446484465844668446784468844698447084471844728447384474844758447684477844788447984480844818448284483844848448584486844878448884489844908449184492844938449484495844968449784498844998450084501845028450384504845058450684507845088450984510845118451284513845148451584516845178451884519845208452184522845238452484525845268452784528845298453084531845328453384534845358453684537845388453984540845418454284543845448454584546845478454884549845508455184552845538455484555845568455784558845598456084561845628456384564845658456684567845688456984570845718457284573845748457584576845778457884579845808458184582845838458484585845868458784588845898459084591845928459384594845958459684597845988459984600846018460284603846048460584606846078460884609846108461184612846138461484615846168461784618846198462084621846228462384624846258462684627846288462984630846318463284633846348463584636846378463884639846408464184642846438464484645846468464784648846498465084651846528465384654846558465684657846588465984660846618466284663846648466584666846678466884669846708467184672846738467484675846768467784678846798468084681846828468384684846858468684687846888468984690846918469284693846948469584696846978469884699847008470184702847038470484705847068470784708847098471084711847128471384714847158471684717847188471984720847218472284723847248472584726847278472884729847308473184732847338473484735847368473784738847398474084741847428474384744847458474684747847488474984750847518475284753847548475584756847578475884759847608476184762847638476484765847668476784768847698477084771847728477384774847758477684777847788477984780847818478284783847848478584786847878478884789847908479184792847938479484795847968479784798847998480084801848028480384804848058480684807848088480984810848118481284813848148481584816848178481884819848208482184822848238482484825848268482784828848298483084831848328483384834848358483684837848388483984840848418484284843848448484584846848478484884849848508485184852848538485484855848568485784858848598486084861848628486384864848658486684867848688486984870848718487284873848748487584876848778487884879848808488184882848838488484885848868488784888848898489084891848928489384894848958489684897848988489984900849018490284903849048490584906849078490884909849108491184912849138491484915849168491784918849198492084921849228492384924849258492684927849288492984930849318493284933849348493584936849378493884939849408494184942849438494484945849468494784948849498495084951849528495384954849558495684957849588495984960849618496284963849648496584966849678496884969849708497184972849738497484975849768497784978849798498084981849828498384984849858498684987849888498984990849918499284993849948499584996849978499884999850008500185002850038500485005850068500785008850098501085011850128501385014850158501685017850188501985020850218502285023850248502585026850278502885029850308503185032850338503485035850368503785038850398504085041850428504385044850458504685047850488504985050850518505285053850548505585056850578505885059850608506185062850638506485065850668506785068850698507085071850728507385074850758507685077850788507985080850818508285083850848508585086850878508885089850908509185092850938509485095850968509785098850998510085101851028510385104851058510685107851088510985110851118511285113851148511585116851178511885119851208512185122851238512485125851268512785128851298513085131851328513385134851358513685137851388513985140851418514285143851448514585146851478514885149851508515185152851538515485155851568515785158851598516085161851628516385164851658516685167851688516985170851718517285173851748517585176851778517885179851808518185182851838518485185851868518785188851898519085191851928519385194851958519685197851988519985200852018520285203852048520585206852078520885209852108521185212852138521485215852168521785218852198522085221852228522385224852258522685227852288522985230852318523285233852348523585236852378523885239852408524185242852438524485245852468524785248852498525085251852528525385254852558525685257852588525985260852618526285263852648526585266852678526885269852708527185272852738527485275852768527785278852798528085281852828528385284852858528685287852888528985290852918529285293852948529585296852978529885299853008530185302853038530485305853068530785308853098531085311853128531385314853158531685317853188531985320853218532285323853248532585326853278532885329853308533185332853338533485335853368533785338853398534085341853428534385344853458534685347853488534985350853518535285353853548535585356853578535885359853608536185362853638536485365853668536785368853698537085371853728537385374853758537685377853788537985380853818538285383853848538585386853878538885389853908539185392853938539485395853968539785398853998540085401854028540385404854058540685407854088540985410854118541285413854148541585416854178541885419854208542185422854238542485425854268542785428854298543085431854328543385434854358543685437854388543985440854418544285443854448544585446854478544885449854508545185452854538545485455854568545785458854598546085461854628546385464854658546685467854688546985470854718547285473854748547585476854778547885479854808548185482854838548485485854868548785488854898549085491854928549385494854958549685497854988549985500855018550285503855048550585506855078550885509855108551185512855138551485515855168551785518855198552085521855228552385524855258552685527855288552985530855318553285533855348553585536855378553885539855408554185542855438554485545855468554785548855498555085551855528555385554855558555685557855588555985560855618556285563855648556585566855678556885569855708557185572855738557485575855768557785578855798558085581855828558385584855858558685587855888558985590855918559285593855948559585596855978559885599856008560185602856038560485605856068560785608856098561085611856128561385614856158561685617856188561985620856218562285623856248562585626856278562885629856308563185632856338563485635856368563785638856398564085641856428564385644856458564685647856488564985650856518565285653856548565585656856578565885659856608566185662856638566485665856668566785668856698567085671856728567385674856758567685677856788567985680856818568285683856848568585686856878568885689856908569185692856938569485695856968569785698856998570085701857028570385704857058570685707857088570985710857118571285713857148571585716857178571885719857208572185722857238572485725857268572785728857298573085731857328573385734857358573685737857388573985740857418574285743857448574585746857478574885749857508575185752857538575485755857568575785758857598576085761857628576385764857658576685767857688576985770857718577285773857748577585776857778577885779857808578185782857838578485785857868578785788857898579085791857928579385794857958579685797857988579985800858018580285803858048580585806858078580885809858108581185812858138581485815858168581785818858198582085821858228582385824858258582685827858288582985830858318583285833858348583585836858378583885839858408584185842858438584485845858468584785848858498585085851858528585385854858558585685857858588585985860858618586285863858648586585866858678586885869858708587185872858738587485875858768587785878858798588085881858828588385884858858588685887858888588985890858918589285893858948589585896858978589885899859008590185902859038590485905859068590785908859098591085911859128591385914859158591685917859188591985920859218592285923859248592585926859278592885929859308593185932859338593485935859368593785938859398594085941859428594385944859458594685947859488594985950859518595285953859548595585956859578595885959859608596185962859638596485965859668596785968859698597085971859728597385974859758597685977859788597985980859818598285983859848598585986859878598885989859908599185992859938599485995859968599785998859998600086001860028600386004860058600686007860088600986010860118601286013860148601586016860178601886019860208602186022860238602486025860268602786028860298603086031860328603386034860358603686037860388603986040860418604286043860448604586046860478604886049860508605186052860538605486055860568605786058860598606086061860628606386064860658606686067860688606986070860718607286073860748607586076860778607886079860808608186082860838608486085860868608786088860898609086091860928609386094860958609686097860988609986100861018610286103861048610586106861078610886109861108611186112861138611486115861168611786118861198612086121861228612386124861258612686127861288612986130861318613286133861348613586136861378613886139861408614186142861438614486145861468614786148861498615086151861528615386154861558615686157861588615986160861618616286163861648616586166861678616886169861708617186172861738617486175861768617786178861798618086181861828618386184861858618686187861888618986190861918619286193861948619586196861978619886199862008620186202862038620486205862068620786208862098621086211862128621386214862158621686217862188621986220862218622286223862248622586226862278622886229862308623186232862338623486235862368623786238862398624086241862428624386244862458624686247862488624986250862518625286253862548625586256862578625886259862608626186262862638626486265862668626786268862698627086271862728627386274862758627686277862788627986280862818628286283862848628586286862878628886289862908629186292862938629486295862968629786298862998630086301863028630386304863058630686307863088630986310863118631286313863148631586316863178631886319863208632186322863238632486325863268632786328863298633086331863328633386334863358633686337863388633986340863418634286343863448634586346863478634886349863508635186352863538635486355863568635786358863598636086361863628636386364863658636686367863688636986370863718637286373863748637586376863778637886379863808638186382863838638486385863868638786388863898639086391863928639386394863958639686397863988639986400864018640286403864048640586406864078640886409864108641186412864138641486415864168641786418864198642086421864228642386424864258642686427864288642986430864318643286433864348643586436864378643886439864408644186442864438644486445864468644786448864498645086451864528645386454864558645686457864588645986460864618646286463864648646586466864678646886469864708647186472864738647486475864768647786478864798648086481864828648386484864858648686487864888648986490864918649286493864948649586496864978649886499865008650186502865038650486505865068650786508865098651086511865128651386514865158651686517865188651986520865218652286523865248652586526865278652886529865308653186532865338653486535865368653786538865398654086541865428654386544865458654686547865488654986550865518655286553865548655586556865578655886559865608656186562865638656486565865668656786568865698657086571865728657386574865758657686577865788657986580865818658286583865848658586586865878658886589865908659186592865938659486595865968659786598865998660086601866028660386604866058660686607866088660986610866118661286613866148661586616866178661886619866208662186622866238662486625866268662786628866298663086631866328663386634866358663686637866388663986640866418664286643866448664586646866478664886649866508665186652866538665486655866568665786658866598666086661866628666386664866658666686667866688666986670866718667286673866748667586676866778667886679866808668186682866838668486685866868668786688866898669086691866928669386694866958669686697866988669986700867018670286703867048670586706867078670886709867108671186712867138671486715867168671786718867198672086721867228672386724867258672686727867288672986730867318673286733867348673586736867378673886739867408674186742867438674486745867468674786748867498675086751867528675386754867558675686757867588675986760867618676286763867648676586766867678676886769867708677186772867738677486775867768677786778867798678086781867828678386784867858678686787867888678986790867918679286793867948679586796867978679886799868008680186802868038680486805868068680786808868098681086811868128681386814868158681686817868188681986820868218682286823868248682586826868278682886829868308683186832868338683486835868368683786838868398684086841868428684386844868458684686847868488684986850868518685286853868548685586856868578685886859868608686186862868638686486865868668686786868868698687086871868728687386874868758687686877868788687986880868818688286883868848688586886868878688886889868908689186892868938689486895868968689786898868998690086901869028690386904869058690686907869088690986910869118691286913869148691586916869178691886919869208692186922869238692486925869268692786928869298693086931869328693386934869358693686937869388693986940869418694286943869448694586946869478694886949869508695186952869538695486955869568695786958869598696086961869628696386964869658696686967869688696986970869718697286973869748697586976869778697886979869808698186982869838698486985869868698786988869898699086991869928699386994869958699686997869988699987000870018700287003870048700587006870078700887009870108701187012870138701487015870168701787018870198702087021870228702387024870258702687027870288702987030870318703287033870348703587036870378703887039870408704187042870438704487045870468704787048870498705087051870528705387054870558705687057870588705987060870618706287063870648706587066870678706887069870708707187072870738707487075870768707787078870798708087081870828708387084870858708687087870888708987090870918709287093870948709587096870978709887099871008710187102871038710487105871068710787108871098711087111871128711387114871158711687117871188711987120871218712287123871248712587126871278712887129871308713187132871338713487135871368713787138871398714087141871428714387144871458714687147871488714987150871518715287153871548715587156871578715887159871608716187162871638716487165871668716787168871698717087171871728717387174871758717687177871788717987180871818718287183871848718587186871878718887189871908719187192871938719487195871968719787198871998720087201872028720387204872058720687207872088720987210872118721287213872148721587216872178721887219872208722187222872238722487225872268722787228872298723087231872328723387234872358723687237872388723987240872418724287243872448724587246872478724887249872508725187252872538725487255872568725787258872598726087261872628726387264872658726687267872688726987270872718727287273872748727587276872778727887279872808728187282872838728487285872868728787288872898729087291872928729387294872958729687297872988729987300873018730287303873048730587306873078730887309873108731187312873138731487315873168731787318873198732087321873228732387324873258732687327873288732987330873318733287333873348733587336873378733887339873408734187342873438734487345873468734787348873498735087351873528735387354873558735687357873588735987360873618736287363873648736587366873678736887369873708737187372873738737487375873768737787378873798738087381873828738387384873858738687387873888738987390873918739287393873948739587396873978739887399874008740187402874038740487405874068740787408874098741087411874128741387414874158741687417874188741987420874218742287423874248742587426874278742887429874308743187432874338743487435874368743787438874398744087441874428744387444874458744687447874488744987450874518745287453874548745587456874578745887459874608746187462874638746487465874668746787468874698747087471874728747387474874758747687477874788747987480874818748287483874848748587486874878748887489874908749187492874938749487495874968749787498874998750087501875028750387504875058750687507875088750987510875118751287513875148751587516875178751887519875208752187522875238752487525875268752787528875298753087531875328753387534875358753687537875388753987540875418754287543875448754587546875478754887549875508755187552875538755487555875568755787558875598756087561875628756387564875658756687567875688756987570875718757287573875748757587576875778757887579875808758187582875838758487585875868758787588875898759087591875928759387594875958759687597875988759987600876018760287603876048760587606876078760887609876108761187612876138761487615876168761787618876198762087621876228762387624876258762687627876288762987630876318763287633876348763587636876378763887639876408764187642876438764487645876468764787648876498765087651876528765387654876558765687657876588765987660876618766287663876648766587666876678766887669876708767187672876738767487675876768767787678876798768087681876828768387684876858768687687876888768987690876918769287693876948769587696876978769887699877008770187702877038770487705877068770787708877098771087711877128771387714877158771687717877188771987720877218772287723877248772587726877278772887729877308773187732877338773487735877368773787738877398774087741877428774387744877458774687747877488774987750877518775287753877548775587756877578775887759877608776187762877638776487765877668776787768877698777087771877728777387774877758777687777877788777987780877818778287783877848778587786877878778887789877908779187792877938779487795877968779787798877998780087801878028780387804878058780687807878088780987810878118781287813878148781587816878178781887819878208782187822878238782487825878268782787828878298783087831878328783387834878358783687837878388783987840878418784287843878448784587846878478784887849878508785187852878538785487855878568785787858878598786087861878628786387864878658786687867878688786987870878718787287873878748787587876878778787887879878808788187882878838788487885878868788787888878898789087891878928789387894878958789687897878988789987900879018790287903879048790587906879078790887909879108791187912879138791487915879168791787918879198792087921879228792387924879258792687927879288792987930879318793287933879348793587936879378793887939879408794187942879438794487945879468794787948879498795087951879528795387954879558795687957879588795987960879618796287963879648796587966879678796887969879708797187972879738797487975879768797787978879798798087981879828798387984879858798687987879888798987990879918799287993879948799587996879978799887999880008800188002880038800488005880068800788008880098801088011880128801388014880158801688017880188801988020880218802288023880248802588026880278802888029880308803188032880338803488035880368803788038880398804088041880428804388044880458804688047880488804988050880518805288053880548805588056880578805888059880608806188062880638806488065880668806788068880698807088071880728807388074880758807688077880788807988080880818808288083880848808588086880878808888089880908809188092880938809488095880968809788098880998810088101881028810388104881058810688107881088810988110881118811288113881148811588116881178811888119881208812188122881238812488125881268812788128881298813088131881328813388134881358813688137881388813988140881418814288143881448814588146881478814888149881508815188152881538815488155881568815788158881598816088161881628816388164881658816688167881688816988170881718817288173881748817588176881778817888179881808818188182881838818488185881868818788188881898819088191881928819388194881958819688197881988819988200882018820288203882048820588206882078820888209882108821188212882138821488215882168821788218882198822088221882228822388224882258822688227882288822988230882318823288233882348823588236882378823888239882408824188242882438824488245882468824788248882498825088251882528825388254882558825688257882588825988260882618826288263882648826588266882678826888269882708827188272882738827488275882768827788278882798828088281882828828388284882858828688287882888828988290882918829288293882948829588296882978829888299883008830188302883038830488305883068830788308883098831088311883128831388314883158831688317883188831988320883218832288323883248832588326883278832888329883308833188332883338833488335883368833788338883398834088341883428834388344883458834688347883488834988350883518835288353883548835588356883578835888359883608836188362883638836488365883668836788368883698837088371883728837388374883758837688377883788837988380883818838288383883848838588386883878838888389883908839188392883938839488395883968839788398883998840088401884028840388404884058840688407884088840988410884118841288413884148841588416884178841888419884208842188422884238842488425884268842788428884298843088431884328843388434884358843688437884388843988440884418844288443884448844588446884478844888449884508845188452884538845488455884568845788458884598846088461884628846388464884658846688467884688846988470884718847288473884748847588476884778847888479884808848188482884838848488485884868848788488884898849088491884928849388494884958849688497884988849988500885018850288503885048850588506885078850888509885108851188512885138851488515885168851788518885198852088521885228852388524885258852688527885288852988530885318853288533885348853588536885378853888539885408854188542885438854488545885468854788548885498855088551885528855388554885558855688557885588855988560885618856288563885648856588566885678856888569885708857188572885738857488575885768857788578885798858088581885828858388584885858858688587885888858988590885918859288593885948859588596885978859888599886008860188602886038860488605886068860788608886098861088611886128861388614886158861688617886188861988620886218862288623886248862588626886278862888629886308863188632886338863488635886368863788638886398864088641886428864388644886458864688647886488864988650886518865288653886548865588656886578865888659886608866188662886638866488665886668866788668886698867088671886728867388674886758867688677886788867988680886818868288683886848868588686886878868888689886908869188692886938869488695886968869788698886998870088701887028870388704887058870688707887088870988710887118871288713887148871588716887178871888719887208872188722887238872488725887268872788728887298873088731887328873388734887358873688737887388873988740887418874288743887448874588746887478874888749887508875188752887538875488755887568875788758887598876088761887628876388764887658876688767887688876988770887718877288773887748877588776887778877888779887808878188782887838878488785887868878788788887898879088791887928879388794887958879688797887988879988800888018880288803888048880588806888078880888809888108881188812888138881488815888168881788818888198882088821888228882388824888258882688827888288882988830888318883288833888348883588836888378883888839888408884188842888438884488845888468884788848888498885088851888528885388854
  1. (self["webpackChunkGrav"] = self["webpackChunkGrav"] || []).push([[736],{
  2. /***/ 26981:
  3. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  4. "use strict";
  5. __webpack_require__(11983);
  6. var _global = _interopRequireDefault(__webpack_require__(40115));
  7. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
  8. if (_global["default"]._babelPolyfill && typeof console !== "undefined" && console.warn) {
  9. console.warn("@babel/polyfill is loaded more than once on this page. This is probably not desirable/intended " + "and may have consequences if different versions of the polyfills are applied sequentially. " + "If you do need to load the polyfill more than once, use @babel/polyfill/noConflict " + "instead to bypass the warning.");
  10. }
  11. _global["default"]._babelPolyfill = true;
  12. /***/ }),
  13. /***/ 11983:
  14. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  15. "use strict";
  16. __webpack_require__(16266);
  17. __webpack_require__(10990);
  18. __webpack_require__(70911);
  19. __webpack_require__(14160);
  20. __webpack_require__(6197);
  21. __webpack_require__(96728);
  22. __webpack_require__(54039);
  23. __webpack_require__(93568);
  24. __webpack_require__(78051);
  25. __webpack_require__(38250);
  26. __webpack_require__(15434);
  27. __webpack_require__(54952);
  28. __webpack_require__(96337);
  29. __webpack_require__(35666);
  30. /***/ }),
  31. /***/ 69259:
  32. /***/ (function(module, exports, __webpack_require__) {
  33. var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (root, factory) {
  34. if (true) {
  35. // AMD. Register as an anonymous module unless amdModuleId is set
  36. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
  37. return (root['Chartist'] = factory());
  38. }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
  39. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  40. } else {}
  41. }(this, function () {
  42. /* Chartist.js 0.11.4
  43. * Copyright © 2019 Gion Kunz
  44. * Free to use under either the WTFPL license or the MIT license.
  45. * https://raw.githubusercontent.com/gionkunz/chartist-js/master/LICENSE-WTFPL
  46. * https://raw.githubusercontent.com/gionkunz/chartist-js/master/LICENSE-MIT
  47. */
  48. /**
  49. * The core module of Chartist that is mainly providing static functions and higher level functions for chart modules.
  50. *
  51. * @module Chartist.Core
  52. */
  53. var Chartist = {
  54. version: '0.11.4'
  55. };
  56. (function (globalRoot, Chartist) {
  57. 'use strict';
  58. var window = globalRoot.window;
  59. var document = globalRoot.document;
  60. /**
  61. * This object contains all namespaces used within Chartist.
  62. *
  63. * @memberof Chartist.Core
  64. * @type {{svg: string, xmlns: string, xhtml: string, xlink: string, ct: string}}
  65. */
  66. Chartist.namespaces = {
  67. svg: 'http://www.w3.org/2000/svg',
  68. xmlns: 'http://www.w3.org/2000/xmlns/',
  69. xhtml: 'http://www.w3.org/1999/xhtml',
  70. xlink: 'http://www.w3.org/1999/xlink',
  71. ct: 'http://gionkunz.github.com/chartist-js/ct'
  72. };
  73. /**
  74. * Helps to simplify functional style code
  75. *
  76. * @memberof Chartist.Core
  77. * @param {*} n This exact value will be returned by the noop function
  78. * @return {*} The same value that was provided to the n parameter
  79. */
  80. Chartist.noop = function (n) {
  81. return n;
  82. };
  83. /**
  84. * Generates a-z from a number 0 to 26
  85. *
  86. * @memberof Chartist.Core
  87. * @param {Number} n A number from 0 to 26 that will result in a letter a-z
  88. * @return {String} A character from a-z based on the input number n
  89. */
  90. Chartist.alphaNumerate = function (n) {
  91. // Limit to a-z
  92. return String.fromCharCode(97 + n % 26);
  93. };
  94. /**
  95. * Simple recursive object extend
  96. *
  97. * @memberof Chartist.Core
  98. * @param {Object} target Target object where the source will be merged into
  99. * @param {Object...} sources This object (objects) will be merged into target and then target is returned
  100. * @return {Object} An object that has the same reference as target but is extended and merged with the properties of source
  101. */
  102. Chartist.extend = function (target) {
  103. var i, source, sourceProp;
  104. target = target || {};
  105. for (i = 1; i < arguments.length; i++) {
  106. source = arguments[i];
  107. for (var prop in source) {
  108. sourceProp = source[prop];
  109. if (typeof sourceProp === 'object' && sourceProp !== null && !(sourceProp instanceof Array)) {
  110. target[prop] = Chartist.extend(target[prop], sourceProp);
  111. } else {
  112. target[prop] = sourceProp;
  113. }
  114. }
  115. }
  116. return target;
  117. };
  118. /**
  119. * Replaces all occurrences of subStr in str with newSubStr and returns a new string.
  120. *
  121. * @memberof Chartist.Core
  122. * @param {String} str
  123. * @param {String} subStr
  124. * @param {String} newSubStr
  125. * @return {String}
  126. */
  127. Chartist.replaceAll = function(str, subStr, newSubStr) {
  128. return str.replace(new RegExp(subStr, 'g'), newSubStr);
  129. };
  130. /**
  131. * Converts a number to a string with a unit. If a string is passed then this will be returned unmodified.
  132. *
  133. * @memberof Chartist.Core
  134. * @param {Number} value
  135. * @param {String} unit
  136. * @return {String} Returns the passed number value with unit.
  137. */
  138. Chartist.ensureUnit = function(value, unit) {
  139. if(typeof value === 'number') {
  140. value = value + unit;
  141. }
  142. return value;
  143. };
  144. /**
  145. * Converts a number or string to a quantity object.
  146. *
  147. * @memberof Chartist.Core
  148. * @param {String|Number} input
  149. * @return {Object} Returns an object containing the value as number and the unit as string.
  150. */
  151. Chartist.quantity = function(input) {
  152. if (typeof input === 'string') {
  153. var match = (/^(\d+)\s*(.*)$/g).exec(input);
  154. return {
  155. value : +match[1],
  156. unit: match[2] || undefined
  157. };
  158. }
  159. return { value: input };
  160. };
  161. /**
  162. * This is a wrapper around document.querySelector that will return the query if it's already of type Node
  163. *
  164. * @memberof Chartist.Core
  165. * @param {String|Node} query The query to use for selecting a Node or a DOM node that will be returned directly
  166. * @return {Node}
  167. */
  168. Chartist.querySelector = function(query) {
  169. return query instanceof Node ? query : document.querySelector(query);
  170. };
  171. /**
  172. * Functional style helper to produce array with given length initialized with undefined values
  173. *
  174. * @memberof Chartist.Core
  175. * @param length
  176. * @return {Array}
  177. */
  178. Chartist.times = function(length) {
  179. return Array.apply(null, new Array(length));
  180. };
  181. /**
  182. * Sum helper to be used in reduce functions
  183. *
  184. * @memberof Chartist.Core
  185. * @param previous
  186. * @param current
  187. * @return {*}
  188. */
  189. Chartist.sum = function(previous, current) {
  190. return previous + (current ? current : 0);
  191. };
  192. /**
  193. * Multiply helper to be used in `Array.map` for multiplying each value of an array with a factor.
  194. *
  195. * @memberof Chartist.Core
  196. * @param {Number} factor
  197. * @returns {Function} Function that can be used in `Array.map` to multiply each value in an array
  198. */
  199. Chartist.mapMultiply = function(factor) {
  200. return function(num) {
  201. return num * factor;
  202. };
  203. };
  204. /**
  205. * Add helper to be used in `Array.map` for adding a addend to each value of an array.
  206. *
  207. * @memberof Chartist.Core
  208. * @param {Number} addend
  209. * @returns {Function} Function that can be used in `Array.map` to add a addend to each value in an array
  210. */
  211. Chartist.mapAdd = function(addend) {
  212. return function(num) {
  213. return num + addend;
  214. };
  215. };
  216. /**
  217. * Map for multi dimensional arrays where their nested arrays will be mapped in serial. The output array will have the length of the largest nested array. The callback function is called with variable arguments where each argument is the nested array value (or undefined if there are no more values).
  218. *
  219. * @memberof Chartist.Core
  220. * @param arr
  221. * @param cb
  222. * @return {Array}
  223. */
  224. Chartist.serialMap = function(arr, cb) {
  225. var result = [],
  226. length = Math.max.apply(null, arr.map(function(e) {
  227. return e.length;
  228. }));
  229. Chartist.times(length).forEach(function(e, index) {
  230. var args = arr.map(function(e) {
  231. return e[index];
  232. });
  233. result[index] = cb.apply(null, args);
  234. });
  235. return result;
  236. };
  237. /**
  238. * This helper function can be used to round values with certain precision level after decimal. This is used to prevent rounding errors near float point precision limit.
  239. *
  240. * @memberof Chartist.Core
  241. * @param {Number} value The value that should be rounded with precision
  242. * @param {Number} [digits] The number of digits after decimal used to do the rounding
  243. * @returns {number} Rounded value
  244. */
  245. Chartist.roundWithPrecision = function(value, digits) {
  246. var precision = Math.pow(10, digits || Chartist.precision);
  247. return Math.round(value * precision) / precision;
  248. };
  249. /**
  250. * Precision level used internally in Chartist for rounding. If you require more decimal places you can increase this number.
  251. *
  252. * @memberof Chartist.Core
  253. * @type {number}
  254. */
  255. Chartist.precision = 8;
  256. /**
  257. * A map with characters to escape for strings to be safely used as attribute values.
  258. *
  259. * @memberof Chartist.Core
  260. * @type {Object}
  261. */
  262. Chartist.escapingMap = {
  263. '&': '&amp;',
  264. '<': '&lt;',
  265. '>': '&gt;',
  266. '"': '&quot;',
  267. '\'': '&#039;'
  268. };
  269. /**
  270. * This function serializes arbitrary data to a string. In case of data that can't be easily converted to a string, this function will create a wrapper object and serialize the data using JSON.stringify. The outcoming string will always be escaped using Chartist.escapingMap.
  271. * If called with null or undefined the function will return immediately with null or undefined.
  272. *
  273. * @memberof Chartist.Core
  274. * @param {Number|String|Object} data
  275. * @return {String}
  276. */
  277. Chartist.serialize = function(data) {
  278. if(data === null || data === undefined) {
  279. return data;
  280. } else if(typeof data === 'number') {
  281. data = ''+data;
  282. } else if(typeof data === 'object') {
  283. data = JSON.stringify({data: data});
  284. }
  285. return Object.keys(Chartist.escapingMap).reduce(function(result, key) {
  286. return Chartist.replaceAll(result, key, Chartist.escapingMap[key]);
  287. }, data);
  288. };
  289. /**
  290. * This function de-serializes a string previously serialized with Chartist.serialize. The string will always be unescaped using Chartist.escapingMap before it's returned. Based on the input value the return type can be Number, String or Object. JSON.parse is used with try / catch to see if the unescaped string can be parsed into an Object and this Object will be returned on success.
  291. *
  292. * @memberof Chartist.Core
  293. * @param {String} data
  294. * @return {String|Number|Object}
  295. */
  296. Chartist.deserialize = function(data) {
  297. if(typeof data !== 'string') {
  298. return data;
  299. }
  300. data = Object.keys(Chartist.escapingMap).reduce(function(result, key) {
  301. return Chartist.replaceAll(result, Chartist.escapingMap[key], key);
  302. }, data);
  303. try {
  304. data = JSON.parse(data);
  305. data = data.data !== undefined ? data.data : data;
  306. } catch(e) {}
  307. return data;
  308. };
  309. /**
  310. * Create or reinitialize the SVG element for the chart
  311. *
  312. * @memberof Chartist.Core
  313. * @param {Node} container The containing DOM Node object that will be used to plant the SVG element
  314. * @param {String} width Set the width of the SVG element. Default is 100%
  315. * @param {String} height Set the height of the SVG element. Default is 100%
  316. * @param {String} className Specify a class to be added to the SVG element
  317. * @return {Object} The created/reinitialized SVG element
  318. */
  319. Chartist.createSvg = function (container, width, height, className) {
  320. var svg;
  321. width = width || '100%';
  322. height = height || '100%';
  323. // Check if there is a previous SVG element in the container that contains the Chartist XML namespace and remove it
  324. // Since the DOM API does not support namespaces we need to manually search the returned list http://www.w3.org/TR/selectors-api/
  325. Array.prototype.slice.call(container.querySelectorAll('svg')).filter(function filterChartistSvgObjects(svg) {
  326. return svg.getAttributeNS(Chartist.namespaces.xmlns, 'ct');
  327. }).forEach(function removePreviousElement(svg) {
  328. container.removeChild(svg);
  329. });
  330. // Create svg object with width and height or use 100% as default
  331. svg = new Chartist.Svg('svg').attr({
  332. width: width,
  333. height: height
  334. }).addClass(className);
  335. svg._node.style.width = width;
  336. svg._node.style.height = height;
  337. // Add the DOM node to our container
  338. container.appendChild(svg._node);
  339. return svg;
  340. };
  341. /**
  342. * Ensures that the data object passed as second argument to the charts is present and correctly initialized.
  343. *
  344. * @param {Object} data The data object that is passed as second argument to the charts
  345. * @return {Object} The normalized data object
  346. */
  347. Chartist.normalizeData = function(data, reverse, multi) {
  348. var labelCount;
  349. var output = {
  350. raw: data,
  351. normalized: {}
  352. };
  353. // Check if we should generate some labels based on existing series data
  354. output.normalized.series = Chartist.getDataArray({
  355. series: data.series || []
  356. }, reverse, multi);
  357. // If all elements of the normalized data array are arrays we're dealing with
  358. // multi series data and we need to find the largest series if they are un-even
  359. if (output.normalized.series.every(function(value) {
  360. return value instanceof Array;
  361. })) {
  362. // Getting the series with the the most elements
  363. labelCount = Math.max.apply(null, output.normalized.series.map(function(series) {
  364. return series.length;
  365. }));
  366. } else {
  367. // We're dealing with Pie data so we just take the normalized array length
  368. labelCount = output.normalized.series.length;
  369. }
  370. output.normalized.labels = (data.labels || []).slice();
  371. // Padding the labels to labelCount with empty strings
  372. Array.prototype.push.apply(
  373. output.normalized.labels,
  374. Chartist.times(Math.max(0, labelCount - output.normalized.labels.length)).map(function() {
  375. return '';
  376. })
  377. );
  378. if(reverse) {
  379. Chartist.reverseData(output.normalized);
  380. }
  381. return output;
  382. };
  383. /**
  384. * This function safely checks if an objects has an owned property.
  385. *
  386. * @param {Object} object The object where to check for a property
  387. * @param {string} property The property name
  388. * @returns {boolean} Returns true if the object owns the specified property
  389. */
  390. Chartist.safeHasProperty = function(object, property) {
  391. return object !== null &&
  392. typeof object === 'object' &&
  393. object.hasOwnProperty(property);
  394. };
  395. /**
  396. * Checks if a value is considered a hole in the data series.
  397. *
  398. * @param {*} value
  399. * @returns {boolean} True if the value is considered a data hole
  400. */
  401. Chartist.isDataHoleValue = function(value) {
  402. return value === null ||
  403. value === undefined ||
  404. (typeof value === 'number' && isNaN(value));
  405. };
  406. /**
  407. * Reverses the series, labels and series data arrays.
  408. *
  409. * @memberof Chartist.Core
  410. * @param data
  411. */
  412. Chartist.reverseData = function(data) {
  413. data.labels.reverse();
  414. data.series.reverse();
  415. for (var i = 0; i < data.series.length; i++) {
  416. if(typeof(data.series[i]) === 'object' && data.series[i].data !== undefined) {
  417. data.series[i].data.reverse();
  418. } else if(data.series[i] instanceof Array) {
  419. data.series[i].reverse();
  420. }
  421. }
  422. };
  423. /**
  424. * Convert data series into plain array
  425. *
  426. * @memberof Chartist.Core
  427. * @param {Object} data The series object that contains the data to be visualized in the chart
  428. * @param {Boolean} [reverse] If true the whole data is reversed by the getDataArray call. This will modify the data object passed as first parameter. The labels as well as the series order is reversed. The whole series data arrays are reversed too.
  429. * @param {Boolean} [multi] Create a multi dimensional array from a series data array where a value object with `x` and `y` values will be created.
  430. * @return {Array} A plain array that contains the data to be visualized in the chart
  431. */
  432. Chartist.getDataArray = function(data, reverse, multi) {
  433. // Recursively walks through nested arrays and convert string values to numbers and objects with value properties
  434. // to values. Check the tests in data core -> data normalization for a detailed specification of expected values
  435. function recursiveConvert(value) {
  436. if(Chartist.safeHasProperty(value, 'value')) {
  437. // We are dealing with value object notation so we need to recurse on value property
  438. return recursiveConvert(value.value);
  439. } else if(Chartist.safeHasProperty(value, 'data')) {
  440. // We are dealing with series object notation so we need to recurse on data property
  441. return recursiveConvert(value.data);
  442. } else if(value instanceof Array) {
  443. // Data is of type array so we need to recurse on the series
  444. return value.map(recursiveConvert);
  445. } else if(Chartist.isDataHoleValue(value)) {
  446. // We're dealing with a hole in the data and therefore need to return undefined
  447. // We're also returning undefined for multi value output
  448. return undefined;
  449. } else {
  450. // We need to prepare multi value output (x and y data)
  451. if(multi) {
  452. var multiValue = {};
  453. // Single series value arrays are assumed to specify the Y-Axis value
  454. // For example: [1, 2] => [{x: undefined, y: 1}, {x: undefined, y: 2}]
  455. // If multi is a string then it's assumed that it specified which dimension should be filled as default
  456. if(typeof multi === 'string') {
  457. multiValue[multi] = Chartist.getNumberOrUndefined(value);
  458. } else {
  459. multiValue.y = Chartist.getNumberOrUndefined(value);
  460. }
  461. multiValue.x = value.hasOwnProperty('x') ? Chartist.getNumberOrUndefined(value.x) : multiValue.x;
  462. multiValue.y = value.hasOwnProperty('y') ? Chartist.getNumberOrUndefined(value.y) : multiValue.y;
  463. return multiValue;
  464. } else {
  465. // We can return simple data
  466. return Chartist.getNumberOrUndefined(value);
  467. }
  468. }
  469. }
  470. return data.series.map(recursiveConvert);
  471. };
  472. /**
  473. * Converts a number into a padding object.
  474. *
  475. * @memberof Chartist.Core
  476. * @param {Object|Number} padding
  477. * @param {Number} [fallback] This value is used to fill missing values if a incomplete padding object was passed
  478. * @returns {Object} Returns a padding object containing top, right, bottom, left properties filled with the padding number passed in as argument. If the argument is something else than a number (presumably already a correct padding object) then this argument is directly returned.
  479. */
  480. Chartist.normalizePadding = function(padding, fallback) {
  481. fallback = fallback || 0;
  482. return typeof padding === 'number' ? {
  483. top: padding,
  484. right: padding,
  485. bottom: padding,
  486. left: padding
  487. } : {
  488. top: typeof padding.top === 'number' ? padding.top : fallback,
  489. right: typeof padding.right === 'number' ? padding.right : fallback,
  490. bottom: typeof padding.bottom === 'number' ? padding.bottom : fallback,
  491. left: typeof padding.left === 'number' ? padding.left : fallback
  492. };
  493. };
  494. Chartist.getMetaData = function(series, index) {
  495. var value = series.data ? series.data[index] : series[index];
  496. return value ? value.meta : undefined;
  497. };
  498. /**
  499. * Calculate the order of magnitude for the chart scale
  500. *
  501. * @memberof Chartist.Core
  502. * @param {Number} value The value Range of the chart
  503. * @return {Number} The order of magnitude
  504. */
  505. Chartist.orderOfMagnitude = function (value) {
  506. return Math.floor(Math.log(Math.abs(value)) / Math.LN10);
  507. };
  508. /**
  509. * Project a data length into screen coordinates (pixels)
  510. *
  511. * @memberof Chartist.Core
  512. * @param {Object} axisLength The svg element for the chart
  513. * @param {Number} length Single data value from a series array
  514. * @param {Object} bounds All the values to set the bounds of the chart
  515. * @return {Number} The projected data length in pixels
  516. */
  517. Chartist.projectLength = function (axisLength, length, bounds) {
  518. return length / bounds.range * axisLength;
  519. };
  520. /**
  521. * Get the height of the area in the chart for the data series
  522. *
  523. * @memberof Chartist.Core
  524. * @param {Object} svg The svg element for the chart
  525. * @param {Object} options The Object that contains all the optional values for the chart
  526. * @return {Number} The height of the area in the chart for the data series
  527. */
  528. Chartist.getAvailableHeight = function (svg, options) {
  529. return Math.max((Chartist.quantity(options.height).value || svg.height()) - (options.chartPadding.top + options.chartPadding.bottom) - options.axisX.offset, 0);
  530. };
  531. /**
  532. * Get highest and lowest value of data array. This Array contains the data that will be visualized in the chart.
  533. *
  534. * @memberof Chartist.Core
  535. * @param {Array} data The array that contains the data to be visualized in the chart
  536. * @param {Object} options The Object that contains the chart options
  537. * @param {String} dimension Axis dimension 'x' or 'y' used to access the correct value and high / low configuration
  538. * @return {Object} An object that contains the highest and lowest value that will be visualized on the chart.
  539. */
  540. Chartist.getHighLow = function (data, options, dimension) {
  541. // TODO: Remove workaround for deprecated global high / low config. Axis high / low configuration is preferred
  542. options = Chartist.extend({}, options, dimension ? options['axis' + dimension.toUpperCase()] : {});
  543. var highLow = {
  544. high: options.high === undefined ? -Number.MAX_VALUE : +options.high,
  545. low: options.low === undefined ? Number.MAX_VALUE : +options.low
  546. };
  547. var findHigh = options.high === undefined;
  548. var findLow = options.low === undefined;
  549. // Function to recursively walk through arrays and find highest and lowest number
  550. function recursiveHighLow(data) {
  551. if(data === undefined) {
  552. return undefined;
  553. } else if(data instanceof Array) {
  554. for (var i = 0; i < data.length; i++) {
  555. recursiveHighLow(data[i]);
  556. }
  557. } else {
  558. var value = dimension ? +data[dimension] : +data;
  559. if (findHigh && value > highLow.high) {
  560. highLow.high = value;
  561. }
  562. if (findLow && value < highLow.low) {
  563. highLow.low = value;
  564. }
  565. }
  566. }
  567. // Start to find highest and lowest number recursively
  568. if(findHigh || findLow) {
  569. recursiveHighLow(data);
  570. }
  571. // Overrides of high / low based on reference value, it will make sure that the invisible reference value is
  572. // used to generate the chart. This is useful when the chart always needs to contain the position of the
  573. // invisible reference value in the view i.e. for bipolar scales.
  574. if (options.referenceValue || options.referenceValue === 0) {
  575. highLow.high = Math.max(options.referenceValue, highLow.high);
  576. highLow.low = Math.min(options.referenceValue, highLow.low);
  577. }
  578. // If high and low are the same because of misconfiguration or flat data (only the same value) we need
  579. // to set the high or low to 0 depending on the polarity
  580. if (highLow.high <= highLow.low) {
  581. // If both values are 0 we set high to 1
  582. if (highLow.low === 0) {
  583. highLow.high = 1;
  584. } else if (highLow.low < 0) {
  585. // If we have the same negative value for the bounds we set bounds.high to 0
  586. highLow.high = 0;
  587. } else if (highLow.high > 0) {
  588. // If we have the same positive value for the bounds we set bounds.low to 0
  589. highLow.low = 0;
  590. } else {
  591. // If data array was empty, values are Number.MAX_VALUE and -Number.MAX_VALUE. Set bounds to prevent errors
  592. highLow.high = 1;
  593. highLow.low = 0;
  594. }
  595. }
  596. return highLow;
  597. };
  598. /**
  599. * Checks if a value can be safely coerced to a number. This includes all values except null which result in finite numbers when coerced. This excludes NaN, since it's not finite.
  600. *
  601. * @memberof Chartist.Core
  602. * @param value
  603. * @returns {Boolean}
  604. */
  605. Chartist.isNumeric = function(value) {
  606. return value === null ? false : isFinite(value);
  607. };
  608. /**
  609. * Returns true on all falsey values except the numeric value 0.
  610. *
  611. * @memberof Chartist.Core
  612. * @param value
  613. * @returns {boolean}
  614. */
  615. Chartist.isFalseyButZero = function(value) {
  616. return !value && value !== 0;
  617. };
  618. /**
  619. * Returns a number if the passed parameter is a valid number or the function will return undefined. On all other values than a valid number, this function will return undefined.
  620. *
  621. * @memberof Chartist.Core
  622. * @param value
  623. * @returns {*}
  624. */
  625. Chartist.getNumberOrUndefined = function(value) {
  626. return Chartist.isNumeric(value) ? +value : undefined;
  627. };
  628. /**
  629. * Checks if provided value object is multi value (contains x or y properties)
  630. *
  631. * @memberof Chartist.Core
  632. * @param value
  633. */
  634. Chartist.isMultiValue = function(value) {
  635. return typeof value === 'object' && ('x' in value || 'y' in value);
  636. };
  637. /**
  638. * Gets a value from a dimension `value.x` or `value.y` while returning value directly if it's a valid numeric value. If the value is not numeric and it's falsey this function will return `defaultValue`.
  639. *
  640. * @memberof Chartist.Core
  641. * @param value
  642. * @param dimension
  643. * @param defaultValue
  644. * @returns {*}
  645. */
  646. Chartist.getMultiValue = function(value, dimension) {
  647. if(Chartist.isMultiValue(value)) {
  648. return Chartist.getNumberOrUndefined(value[dimension || 'y']);
  649. } else {
  650. return Chartist.getNumberOrUndefined(value);
  651. }
  652. };
  653. /**
  654. * Pollard Rho Algorithm to find smallest factor of an integer value. There are more efficient algorithms for factorization, but this one is quite efficient and not so complex.
  655. *
  656. * @memberof Chartist.Core
  657. * @param {Number} num An integer number where the smallest factor should be searched for
  658. * @returns {Number} The smallest integer factor of the parameter num.
  659. */
  660. Chartist.rho = function(num) {
  661. if(num === 1) {
  662. return num;
  663. }
  664. function gcd(p, q) {
  665. if (p % q === 0) {
  666. return q;
  667. } else {
  668. return gcd(q, p % q);
  669. }
  670. }
  671. function f(x) {
  672. return x * x + 1;
  673. }
  674. var x1 = 2, x2 = 2, divisor;
  675. if (num % 2 === 0) {
  676. return 2;
  677. }
  678. do {
  679. x1 = f(x1) % num;
  680. x2 = f(f(x2)) % num;
  681. divisor = gcd(Math.abs(x1 - x2), num);
  682. } while (divisor === 1);
  683. return divisor;
  684. };
  685. /**
  686. * Calculate and retrieve all the bounds for the chart and return them in one array
  687. *
  688. * @memberof Chartist.Core
  689. * @param {Number} axisLength The length of the Axis used for
  690. * @param {Object} highLow An object containing a high and low property indicating the value range of the chart.
  691. * @param {Number} scaleMinSpace The minimum projected length a step should result in
  692. * @param {Boolean} onlyInteger
  693. * @return {Object} All the values to set the bounds of the chart
  694. */
  695. Chartist.getBounds = function (axisLength, highLow, scaleMinSpace, onlyInteger) {
  696. var i,
  697. optimizationCounter = 0,
  698. newMin,
  699. newMax,
  700. bounds = {
  701. high: highLow.high,
  702. low: highLow.low
  703. };
  704. bounds.valueRange = bounds.high - bounds.low;
  705. bounds.oom = Chartist.orderOfMagnitude(bounds.valueRange);
  706. bounds.step = Math.pow(10, bounds.oom);
  707. bounds.min = Math.floor(bounds.low / bounds.step) * bounds.step;
  708. bounds.max = Math.ceil(bounds.high / bounds.step) * bounds.step;
  709. bounds.range = bounds.max - bounds.min;
  710. bounds.numberOfSteps = Math.round(bounds.range / bounds.step);
  711. // Optimize scale step by checking if subdivision is possible based on horizontalGridMinSpace
  712. // If we are already below the scaleMinSpace value we will scale up
  713. var length = Chartist.projectLength(axisLength, bounds.step, bounds);
  714. var scaleUp = length < scaleMinSpace;
  715. var smallestFactor = onlyInteger ? Chartist.rho(bounds.range) : 0;
  716. // First check if we should only use integer steps and if step 1 is still larger than scaleMinSpace so we can use 1
  717. if(onlyInteger && Chartist.projectLength(axisLength, 1, bounds) >= scaleMinSpace) {
  718. bounds.step = 1;
  719. } else if(onlyInteger && smallestFactor < bounds.step && Chartist.projectLength(axisLength, smallestFactor, bounds) >= scaleMinSpace) {
  720. // If step 1 was too small, we can try the smallest factor of range
  721. // If the smallest factor is smaller than the current bounds.step and the projected length of smallest factor
  722. // is larger than the scaleMinSpace we should go for it.
  723. bounds.step = smallestFactor;
  724. } else {
  725. // Trying to divide or multiply by 2 and find the best step value
  726. while (true) {
  727. if (scaleUp && Chartist.projectLength(axisLength, bounds.step, bounds) <= scaleMinSpace) {
  728. bounds.step *= 2;
  729. } else if (!scaleUp && Chartist.projectLength(axisLength, bounds.step / 2, bounds) >= scaleMinSpace) {
  730. bounds.step /= 2;
  731. if(onlyInteger && bounds.step % 1 !== 0) {
  732. bounds.step *= 2;
  733. break;
  734. }
  735. } else {
  736. break;
  737. }
  738. if(optimizationCounter++ > 1000) {
  739. throw new Error('Exceeded maximum number of iterations while optimizing scale step!');
  740. }
  741. }
  742. }
  743. var EPSILON = 2.221E-16;
  744. bounds.step = Math.max(bounds.step, EPSILON);
  745. function safeIncrement(value, increment) {
  746. // If increment is too small use *= (1+EPSILON) as a simple nextafter
  747. if (value === (value += increment)) {
  748. value *= (1 + (increment > 0 ? EPSILON : -EPSILON));
  749. }
  750. return value;
  751. }
  752. // Narrow min and max based on new step
  753. newMin = bounds.min;
  754. newMax = bounds.max;
  755. while (newMin + bounds.step <= bounds.low) {
  756. newMin = safeIncrement(newMin, bounds.step);
  757. }
  758. while (newMax - bounds.step >= bounds.high) {
  759. newMax = safeIncrement(newMax, -bounds.step);
  760. }
  761. bounds.min = newMin;
  762. bounds.max = newMax;
  763. bounds.range = bounds.max - bounds.min;
  764. var values = [];
  765. for (i = bounds.min; i <= bounds.max; i = safeIncrement(i, bounds.step)) {
  766. var value = Chartist.roundWithPrecision(i);
  767. if (value !== values[values.length - 1]) {
  768. values.push(value);
  769. }
  770. }
  771. bounds.values = values;
  772. return bounds;
  773. };
  774. /**
  775. * Calculate cartesian coordinates of polar coordinates
  776. *
  777. * @memberof Chartist.Core
  778. * @param {Number} centerX X-axis coordinates of center point of circle segment
  779. * @param {Number} centerY X-axis coordinates of center point of circle segment
  780. * @param {Number} radius Radius of circle segment
  781. * @param {Number} angleInDegrees Angle of circle segment in degrees
  782. * @return {{x:Number, y:Number}} Coordinates of point on circumference
  783. */
  784. Chartist.polarToCartesian = function (centerX, centerY, radius, angleInDegrees) {
  785. var angleInRadians = (angleInDegrees - 90) * Math.PI / 180.0;
  786. return {
  787. x: centerX + (radius * Math.cos(angleInRadians)),
  788. y: centerY + (radius * Math.sin(angleInRadians))
  789. };
  790. };
  791. /**
  792. * Initialize chart drawing rectangle (area where chart is drawn) x1,y1 = bottom left / x2,y2 = top right
  793. *
  794. * @memberof Chartist.Core
  795. * @param {Object} svg The svg element for the chart
  796. * @param {Object} options The Object that contains all the optional values for the chart
  797. * @param {Number} [fallbackPadding] The fallback padding if partial padding objects are used
  798. * @return {Object} The chart rectangles coordinates inside the svg element plus the rectangles measurements
  799. */
  800. Chartist.createChartRect = function (svg, options, fallbackPadding) {
  801. var hasAxis = !!(options.axisX || options.axisY);
  802. var yAxisOffset = hasAxis ? options.axisY.offset : 0;
  803. var xAxisOffset = hasAxis ? options.axisX.offset : 0;
  804. // If width or height results in invalid value (including 0) we fallback to the unitless settings or even 0
  805. var width = svg.width() || Chartist.quantity(options.width).value || 0;
  806. var height = svg.height() || Chartist.quantity(options.height).value || 0;
  807. var normalizedPadding = Chartist.normalizePadding(options.chartPadding, fallbackPadding);
  808. // If settings were to small to cope with offset (legacy) and padding, we'll adjust
  809. width = Math.max(width, yAxisOffset + normalizedPadding.left + normalizedPadding.right);
  810. height = Math.max(height, xAxisOffset + normalizedPadding.top + normalizedPadding.bottom);
  811. var chartRect = {
  812. padding: normalizedPadding,
  813. width: function () {
  814. return this.x2 - this.x1;
  815. },
  816. height: function () {
  817. return this.y1 - this.y2;
  818. }
  819. };
  820. if(hasAxis) {
  821. if (options.axisX.position === 'start') {
  822. chartRect.y2 = normalizedPadding.top + xAxisOffset;
  823. chartRect.y1 = Math.max(height - normalizedPadding.bottom, chartRect.y2 + 1);
  824. } else {
  825. chartRect.y2 = normalizedPadding.top;
  826. chartRect.y1 = Math.max(height - normalizedPadding.bottom - xAxisOffset, chartRect.y2 + 1);
  827. }
  828. if (options.axisY.position === 'start') {
  829. chartRect.x1 = normalizedPadding.left + yAxisOffset;
  830. chartRect.x2 = Math.max(width - normalizedPadding.right, chartRect.x1 + 1);
  831. } else {
  832. chartRect.x1 = normalizedPadding.left;
  833. chartRect.x2 = Math.max(width - normalizedPadding.right - yAxisOffset, chartRect.x1 + 1);
  834. }
  835. } else {
  836. chartRect.x1 = normalizedPadding.left;
  837. chartRect.x2 = Math.max(width - normalizedPadding.right, chartRect.x1 + 1);
  838. chartRect.y2 = normalizedPadding.top;
  839. chartRect.y1 = Math.max(height - normalizedPadding.bottom, chartRect.y2 + 1);
  840. }
  841. return chartRect;
  842. };
  843. /**
  844. * Creates a grid line based on a projected value.
  845. *
  846. * @memberof Chartist.Core
  847. * @param position
  848. * @param index
  849. * @param axis
  850. * @param offset
  851. * @param length
  852. * @param group
  853. * @param classes
  854. * @param eventEmitter
  855. */
  856. Chartist.createGrid = function(position, index, axis, offset, length, group, classes, eventEmitter) {
  857. var positionalData = {};
  858. positionalData[axis.units.pos + '1'] = position;
  859. positionalData[axis.units.pos + '2'] = position;
  860. positionalData[axis.counterUnits.pos + '1'] = offset;
  861. positionalData[axis.counterUnits.pos + '2'] = offset + length;
  862. var gridElement = group.elem('line', positionalData, classes.join(' '));
  863. // Event for grid draw
  864. eventEmitter.emit('draw',
  865. Chartist.extend({
  866. type: 'grid',
  867. axis: axis,
  868. index: index,
  869. group: group,
  870. element: gridElement
  871. }, positionalData)
  872. );
  873. };
  874. /**
  875. * Creates a grid background rect and emits the draw event.
  876. *
  877. * @memberof Chartist.Core
  878. * @param gridGroup
  879. * @param chartRect
  880. * @param className
  881. * @param eventEmitter
  882. */
  883. Chartist.createGridBackground = function (gridGroup, chartRect, className, eventEmitter) {
  884. var gridBackground = gridGroup.elem('rect', {
  885. x: chartRect.x1,
  886. y: chartRect.y2,
  887. width: chartRect.width(),
  888. height: chartRect.height(),
  889. }, className, true);
  890. // Event for grid background draw
  891. eventEmitter.emit('draw', {
  892. type: 'gridBackground',
  893. group: gridGroup,
  894. element: gridBackground
  895. });
  896. };
  897. /**
  898. * Creates a label based on a projected value and an axis.
  899. *
  900. * @memberof Chartist.Core
  901. * @param position
  902. * @param length
  903. * @param index
  904. * @param labels
  905. * @param axis
  906. * @param axisOffset
  907. * @param labelOffset
  908. * @param group
  909. * @param classes
  910. * @param useForeignObject
  911. * @param eventEmitter
  912. */
  913. Chartist.createLabel = function(position, length, index, labels, axis, axisOffset, labelOffset, group, classes, useForeignObject, eventEmitter) {
  914. var labelElement;
  915. var positionalData = {};
  916. positionalData[axis.units.pos] = position + labelOffset[axis.units.pos];
  917. positionalData[axis.counterUnits.pos] = labelOffset[axis.counterUnits.pos];
  918. positionalData[axis.units.len] = length;
  919. positionalData[axis.counterUnits.len] = Math.max(0, axisOffset - 10);
  920. if(useForeignObject) {
  921. // We need to set width and height explicitly to px as span will not expand with width and height being
  922. // 100% in all browsers
  923. var content = document.createElement('span');
  924. content.className = classes.join(' ');
  925. content.setAttribute('xmlns', Chartist.namespaces.xhtml);
  926. content.innerText = labels[index];
  927. content.style[axis.units.len] = Math.round(positionalData[axis.units.len]) + 'px';
  928. content.style[axis.counterUnits.len] = Math.round(positionalData[axis.counterUnits.len]) + 'px';
  929. labelElement = group.foreignObject(content, Chartist.extend({
  930. style: 'overflow: visible;'
  931. }, positionalData));
  932. } else {
  933. labelElement = group.elem('text', positionalData, classes.join(' ')).text(labels[index]);
  934. }
  935. eventEmitter.emit('draw', Chartist.extend({
  936. type: 'label',
  937. axis: axis,
  938. index: index,
  939. group: group,
  940. element: labelElement,
  941. text: labels[index]
  942. }, positionalData));
  943. };
  944. /**
  945. * Helper to read series specific options from options object. It automatically falls back to the global option if
  946. * there is no option in the series options.
  947. *
  948. * @param {Object} series Series object
  949. * @param {Object} options Chartist options object
  950. * @param {string} key The options key that should be used to obtain the options
  951. * @returns {*}
  952. */
  953. Chartist.getSeriesOption = function(series, options, key) {
  954. if(series.name && options.series && options.series[series.name]) {
  955. var seriesOptions = options.series[series.name];
  956. return seriesOptions.hasOwnProperty(key) ? seriesOptions[key] : options[key];
  957. } else {
  958. return options[key];
  959. }
  960. };
  961. /**
  962. * Provides options handling functionality with callback for options changes triggered by responsive options and media query matches
  963. *
  964. * @memberof Chartist.Core
  965. * @param {Object} options Options set by user
  966. * @param {Array} responsiveOptions Optional functions to add responsive behavior to chart
  967. * @param {Object} eventEmitter The event emitter that will be used to emit the options changed events
  968. * @return {Object} The consolidated options object from the defaults, base and matching responsive options
  969. */
  970. Chartist.optionsProvider = function (options, responsiveOptions, eventEmitter) {
  971. var baseOptions = Chartist.extend({}, options),
  972. currentOptions,
  973. mediaQueryListeners = [],
  974. i;
  975. function updateCurrentOptions(mediaEvent) {
  976. var previousOptions = currentOptions;
  977. currentOptions = Chartist.extend({}, baseOptions);
  978. if (responsiveOptions) {
  979. for (i = 0; i < responsiveOptions.length; i++) {
  980. var mql = window.matchMedia(responsiveOptions[i][0]);
  981. if (mql.matches) {
  982. currentOptions = Chartist.extend(currentOptions, responsiveOptions[i][1]);
  983. }
  984. }
  985. }
  986. if(eventEmitter && mediaEvent) {
  987. eventEmitter.emit('optionsChanged', {
  988. previousOptions: previousOptions,
  989. currentOptions: currentOptions
  990. });
  991. }
  992. }
  993. function removeMediaQueryListeners() {
  994. mediaQueryListeners.forEach(function(mql) {
  995. mql.removeListener(updateCurrentOptions);
  996. });
  997. }
  998. if (!window.matchMedia) {
  999. throw 'window.matchMedia not found! Make sure you\'re using a polyfill.';
  1000. } else if (responsiveOptions) {
  1001. for (i = 0; i < responsiveOptions.length; i++) {
  1002. var mql = window.matchMedia(responsiveOptions[i][0]);
  1003. mql.addListener(updateCurrentOptions);
  1004. mediaQueryListeners.push(mql);
  1005. }
  1006. }
  1007. // Execute initially without an event argument so we get the correct options
  1008. updateCurrentOptions();
  1009. return {
  1010. removeMediaQueryListeners: removeMediaQueryListeners,
  1011. getCurrentOptions: function getCurrentOptions() {
  1012. return Chartist.extend({}, currentOptions);
  1013. }
  1014. };
  1015. };
  1016. /**
  1017. * Splits a list of coordinates and associated values into segments. Each returned segment contains a pathCoordinates
  1018. * valueData property describing the segment.
  1019. *
  1020. * With the default options, segments consist of contiguous sets of points that do not have an undefined value. Any
  1021. * points with undefined values are discarded.
  1022. *
  1023. * **Options**
  1024. * The following options are used to determine how segments are formed
  1025. * ```javascript
  1026. * var options = {
  1027. * // If fillHoles is true, undefined values are simply discarded without creating a new segment. Assuming other options are default, this returns single segment.
  1028. * fillHoles: false,
  1029. * // If increasingX is true, the coordinates in all segments have strictly increasing x-values.
  1030. * increasingX: false
  1031. * };
  1032. * ```
  1033. *
  1034. * @memberof Chartist.Core
  1035. * @param {Array} pathCoordinates List of point coordinates to be split in the form [x1, y1, x2, y2 ... xn, yn]
  1036. * @param {Array} values List of associated point values in the form [v1, v2 .. vn]
  1037. * @param {Object} options Options set by user
  1038. * @return {Array} List of segments, each containing a pathCoordinates and valueData property.
  1039. */
  1040. Chartist.splitIntoSegments = function(pathCoordinates, valueData, options) {
  1041. var defaultOptions = {
  1042. increasingX: false,
  1043. fillHoles: false
  1044. };
  1045. options = Chartist.extend({}, defaultOptions, options);
  1046. var segments = [];
  1047. var hole = true;
  1048. for(var i = 0; i < pathCoordinates.length; i += 2) {
  1049. // If this value is a "hole" we set the hole flag
  1050. if(Chartist.getMultiValue(valueData[i / 2].value) === undefined) {
  1051. // if(valueData[i / 2].value === undefined) {
  1052. if(!options.fillHoles) {
  1053. hole = true;
  1054. }
  1055. } else {
  1056. if(options.increasingX && i >= 2 && pathCoordinates[i] <= pathCoordinates[i-2]) {
  1057. // X is not increasing, so we need to make sure we start a new segment
  1058. hole = true;
  1059. }
  1060. // If it's a valid value we need to check if we're coming out of a hole and create a new empty segment
  1061. if(hole) {
  1062. segments.push({
  1063. pathCoordinates: [],
  1064. valueData: []
  1065. });
  1066. // As we have a valid value now, we are not in a "hole" anymore
  1067. hole = false;
  1068. }
  1069. // Add to the segment pathCoordinates and valueData
  1070. segments[segments.length - 1].pathCoordinates.push(pathCoordinates[i], pathCoordinates[i + 1]);
  1071. segments[segments.length - 1].valueData.push(valueData[i / 2]);
  1072. }
  1073. }
  1074. return segments;
  1075. };
  1076. }(this || __webpack_require__.g, Chartist));
  1077. ;/**
  1078. * Chartist path interpolation functions.
  1079. *
  1080. * @module Chartist.Interpolation
  1081. */
  1082. /* global Chartist */
  1083. (function(globalRoot, Chartist) {
  1084. 'use strict';
  1085. Chartist.Interpolation = {};
  1086. /**
  1087. * This interpolation function does not smooth the path and the result is only containing lines and no curves.
  1088. *
  1089. * @example
  1090. * var chart = new Chartist.Line('.ct-chart', {
  1091. * labels: [1, 2, 3, 4, 5],
  1092. * series: [[1, 2, 8, 1, 7]]
  1093. * }, {
  1094. * lineSmooth: Chartist.Interpolation.none({
  1095. * fillHoles: false
  1096. * })
  1097. * });
  1098. *
  1099. *
  1100. * @memberof Chartist.Interpolation
  1101. * @return {Function}
  1102. */
  1103. Chartist.Interpolation.none = function(options) {
  1104. var defaultOptions = {
  1105. fillHoles: false
  1106. };
  1107. options = Chartist.extend({}, defaultOptions, options);
  1108. return function none(pathCoordinates, valueData) {
  1109. var path = new Chartist.Svg.Path();
  1110. var hole = true;
  1111. for(var i = 0; i < pathCoordinates.length; i += 2) {
  1112. var currX = pathCoordinates[i];
  1113. var currY = pathCoordinates[i + 1];
  1114. var currData = valueData[i / 2];
  1115. if(Chartist.getMultiValue(currData.value) !== undefined) {
  1116. if(hole) {
  1117. path.move(currX, currY, false, currData);
  1118. } else {
  1119. path.line(currX, currY, false, currData);
  1120. }
  1121. hole = false;
  1122. } else if(!options.fillHoles) {
  1123. hole = true;
  1124. }
  1125. }
  1126. return path;
  1127. };
  1128. };
  1129. /**
  1130. * Simple smoothing creates horizontal handles that are positioned with a fraction of the length between two data points. You can use the divisor option to specify the amount of smoothing.
  1131. *
  1132. * Simple smoothing can be used instead of `Chartist.Smoothing.cardinal` if you'd like to get rid of the artifacts it produces sometimes. Simple smoothing produces less flowing lines but is accurate by hitting the points and it also doesn't swing below or above the given data point.
  1133. *
  1134. * All smoothing functions within Chartist are factory functions that accept an options parameter. The simple interpolation function accepts one configuration parameter `divisor`, between 1 and ∞, which controls the smoothing characteristics.
  1135. *
  1136. * @example
  1137. * var chart = new Chartist.Line('.ct-chart', {
  1138. * labels: [1, 2, 3, 4, 5],
  1139. * series: [[1, 2, 8, 1, 7]]
  1140. * }, {
  1141. * lineSmooth: Chartist.Interpolation.simple({
  1142. * divisor: 2,
  1143. * fillHoles: false
  1144. * })
  1145. * });
  1146. *
  1147. *
  1148. * @memberof Chartist.Interpolation
  1149. * @param {Object} options The options of the simple interpolation factory function.
  1150. * @return {Function}
  1151. */
  1152. Chartist.Interpolation.simple = function(options) {
  1153. var defaultOptions = {
  1154. divisor: 2,
  1155. fillHoles: false
  1156. };
  1157. options = Chartist.extend({}, defaultOptions, options);
  1158. var d = 1 / Math.max(1, options.divisor);
  1159. return function simple(pathCoordinates, valueData) {
  1160. var path = new Chartist.Svg.Path();
  1161. var prevX, prevY, prevData;
  1162. for(var i = 0; i < pathCoordinates.length; i += 2) {
  1163. var currX = pathCoordinates[i];
  1164. var currY = pathCoordinates[i + 1];
  1165. var length = (currX - prevX) * d;
  1166. var currData = valueData[i / 2];
  1167. if(currData.value !== undefined) {
  1168. if(prevData === undefined) {
  1169. path.move(currX, currY, false, currData);
  1170. } else {
  1171. path.curve(
  1172. prevX + length,
  1173. prevY,
  1174. currX - length,
  1175. currY,
  1176. currX,
  1177. currY,
  1178. false,
  1179. currData
  1180. );
  1181. }
  1182. prevX = currX;
  1183. prevY = currY;
  1184. prevData = currData;
  1185. } else if(!options.fillHoles) {
  1186. prevX = currX = prevData = undefined;
  1187. }
  1188. }
  1189. return path;
  1190. };
  1191. };
  1192. /**
  1193. * Cardinal / Catmull-Rome spline interpolation is the default smoothing function in Chartist. It produces nice results where the splines will always meet the points. It produces some artifacts though when data values are increased or decreased rapidly. The line may not follow a very accurate path and if the line should be accurate this smoothing function does not produce the best results.
  1194. *
  1195. * Cardinal splines can only be created if there are more than two data points. If this is not the case this smoothing will fallback to `Chartist.Smoothing.none`.
  1196. *
  1197. * All smoothing functions within Chartist are factory functions that accept an options parameter. The cardinal interpolation function accepts one configuration parameter `tension`, between 0 and 1, which controls the smoothing intensity.
  1198. *
  1199. * @example
  1200. * var chart = new Chartist.Line('.ct-chart', {
  1201. * labels: [1, 2, 3, 4, 5],
  1202. * series: [[1, 2, 8, 1, 7]]
  1203. * }, {
  1204. * lineSmooth: Chartist.Interpolation.cardinal({
  1205. * tension: 1,
  1206. * fillHoles: false
  1207. * })
  1208. * });
  1209. *
  1210. * @memberof Chartist.Interpolation
  1211. * @param {Object} options The options of the cardinal factory function.
  1212. * @return {Function}
  1213. */
  1214. Chartist.Interpolation.cardinal = function(options) {
  1215. var defaultOptions = {
  1216. tension: 1,
  1217. fillHoles: false
  1218. };
  1219. options = Chartist.extend({}, defaultOptions, options);
  1220. var t = Math.min(1, Math.max(0, options.tension)),
  1221. c = 1 - t;
  1222. return function cardinal(pathCoordinates, valueData) {
  1223. // First we try to split the coordinates into segments
  1224. // This is necessary to treat "holes" in line charts
  1225. var segments = Chartist.splitIntoSegments(pathCoordinates, valueData, {
  1226. fillHoles: options.fillHoles
  1227. });
  1228. if(!segments.length) {
  1229. // If there were no segments return 'Chartist.Interpolation.none'
  1230. return Chartist.Interpolation.none()([]);
  1231. } else if(segments.length > 1) {
  1232. // If the split resulted in more that one segment we need to interpolate each segment individually and join them
  1233. // afterwards together into a single path.
  1234. var paths = [];
  1235. // For each segment we will recurse the cardinal function
  1236. segments.forEach(function(segment) {
  1237. paths.push(cardinal(segment.pathCoordinates, segment.valueData));
  1238. });
  1239. // Join the segment path data into a single path and return
  1240. return Chartist.Svg.Path.join(paths);
  1241. } else {
  1242. // If there was only one segment we can proceed regularly by using pathCoordinates and valueData from the first
  1243. // segment
  1244. pathCoordinates = segments[0].pathCoordinates;
  1245. valueData = segments[0].valueData;
  1246. // If less than two points we need to fallback to no smoothing
  1247. if(pathCoordinates.length <= 4) {
  1248. return Chartist.Interpolation.none()(pathCoordinates, valueData);
  1249. }
  1250. var path = new Chartist.Svg.Path().move(pathCoordinates[0], pathCoordinates[1], false, valueData[0]),
  1251. z;
  1252. for (var i = 0, iLen = pathCoordinates.length; iLen - 2 * !z > i; i += 2) {
  1253. var p = [
  1254. {x: +pathCoordinates[i - 2], y: +pathCoordinates[i - 1]},
  1255. {x: +pathCoordinates[i], y: +pathCoordinates[i + 1]},
  1256. {x: +pathCoordinates[i + 2], y: +pathCoordinates[i + 3]},
  1257. {x: +pathCoordinates[i + 4], y: +pathCoordinates[i + 5]}
  1258. ];
  1259. if (z) {
  1260. if (!i) {
  1261. p[0] = {x: +pathCoordinates[iLen - 2], y: +pathCoordinates[iLen - 1]};
  1262. } else if (iLen - 4 === i) {
  1263. p[3] = {x: +pathCoordinates[0], y: +pathCoordinates[1]};
  1264. } else if (iLen - 2 === i) {
  1265. p[2] = {x: +pathCoordinates[0], y: +pathCoordinates[1]};
  1266. p[3] = {x: +pathCoordinates[2], y: +pathCoordinates[3]};
  1267. }
  1268. } else {
  1269. if (iLen - 4 === i) {
  1270. p[3] = p[2];
  1271. } else if (!i) {
  1272. p[0] = {x: +pathCoordinates[i], y: +pathCoordinates[i + 1]};
  1273. }
  1274. }
  1275. path.curve(
  1276. (t * (-p[0].x + 6 * p[1].x + p[2].x) / 6) + (c * p[2].x),
  1277. (t * (-p[0].y + 6 * p[1].y + p[2].y) / 6) + (c * p[2].y),
  1278. (t * (p[1].x + 6 * p[2].x - p[3].x) / 6) + (c * p[2].x),
  1279. (t * (p[1].y + 6 * p[2].y - p[3].y) / 6) + (c * p[2].y),
  1280. p[2].x,
  1281. p[2].y,
  1282. false,
  1283. valueData[(i + 2) / 2]
  1284. );
  1285. }
  1286. return path;
  1287. }
  1288. };
  1289. };
  1290. /**
  1291. * Monotone Cubic spline interpolation produces a smooth curve which preserves monotonicity. Unlike cardinal splines, the curve will not extend beyond the range of y-values of the original data points.
  1292. *
  1293. * Monotone Cubic splines can only be created if there are more than two data points. If this is not the case this smoothing will fallback to `Chartist.Smoothing.none`.
  1294. *
  1295. * The x-values of subsequent points must be increasing to fit a Monotone Cubic spline. If this condition is not met for a pair of adjacent points, then there will be a break in the curve between those data points.
  1296. *
  1297. * All smoothing functions within Chartist are factory functions that accept an options parameter.
  1298. *
  1299. * @example
  1300. * var chart = new Chartist.Line('.ct-chart', {
  1301. * labels: [1, 2, 3, 4, 5],
  1302. * series: [[1, 2, 8, 1, 7]]
  1303. * }, {
  1304. * lineSmooth: Chartist.Interpolation.monotoneCubic({
  1305. * fillHoles: false
  1306. * })
  1307. * });
  1308. *
  1309. * @memberof Chartist.Interpolation
  1310. * @param {Object} options The options of the monotoneCubic factory function.
  1311. * @return {Function}
  1312. */
  1313. Chartist.Interpolation.monotoneCubic = function(options) {
  1314. var defaultOptions = {
  1315. fillHoles: false
  1316. };
  1317. options = Chartist.extend({}, defaultOptions, options);
  1318. return function monotoneCubic(pathCoordinates, valueData) {
  1319. // First we try to split the coordinates into segments
  1320. // This is necessary to treat "holes" in line charts
  1321. var segments = Chartist.splitIntoSegments(pathCoordinates, valueData, {
  1322. fillHoles: options.fillHoles,
  1323. increasingX: true
  1324. });
  1325. if(!segments.length) {
  1326. // If there were no segments return 'Chartist.Interpolation.none'
  1327. return Chartist.Interpolation.none()([]);
  1328. } else if(segments.length > 1) {
  1329. // If the split resulted in more that one segment we need to interpolate each segment individually and join them
  1330. // afterwards together into a single path.
  1331. var paths = [];
  1332. // For each segment we will recurse the monotoneCubic fn function
  1333. segments.forEach(function(segment) {
  1334. paths.push(monotoneCubic(segment.pathCoordinates, segment.valueData));
  1335. });
  1336. // Join the segment path data into a single path and return
  1337. return Chartist.Svg.Path.join(paths);
  1338. } else {
  1339. // If there was only one segment we can proceed regularly by using pathCoordinates and valueData from the first
  1340. // segment
  1341. pathCoordinates = segments[0].pathCoordinates;
  1342. valueData = segments[0].valueData;
  1343. // If less than three points we need to fallback to no smoothing
  1344. if(pathCoordinates.length <= 4) {
  1345. return Chartist.Interpolation.none()(pathCoordinates, valueData);
  1346. }
  1347. var xs = [],
  1348. ys = [],
  1349. i,
  1350. n = pathCoordinates.length / 2,
  1351. ms = [],
  1352. ds = [], dys = [], dxs = [],
  1353. path;
  1354. // Populate x and y coordinates into separate arrays, for readability
  1355. for(i = 0; i < n; i++) {
  1356. xs[i] = pathCoordinates[i * 2];
  1357. ys[i] = pathCoordinates[i * 2 + 1];
  1358. }
  1359. // Calculate deltas and derivative
  1360. for(i = 0; i < n - 1; i++) {
  1361. dys[i] = ys[i + 1] - ys[i];
  1362. dxs[i] = xs[i + 1] - xs[i];
  1363. ds[i] = dys[i] / dxs[i];
  1364. }
  1365. // Determine desired slope (m) at each point using Fritsch-Carlson method
  1366. // See: http://math.stackexchange.com/questions/45218/implementation-of-monotone-cubic-interpolation
  1367. ms[0] = ds[0];
  1368. ms[n - 1] = ds[n - 2];
  1369. for(i = 1; i < n - 1; i++) {
  1370. if(ds[i] === 0 || ds[i - 1] === 0 || (ds[i - 1] > 0) !== (ds[i] > 0)) {
  1371. ms[i] = 0;
  1372. } else {
  1373. ms[i] = 3 * (dxs[i - 1] + dxs[i]) / (
  1374. (2 * dxs[i] + dxs[i - 1]) / ds[i - 1] +
  1375. (dxs[i] + 2 * dxs[i - 1]) / ds[i]);
  1376. if(!isFinite(ms[i])) {
  1377. ms[i] = 0;
  1378. }
  1379. }
  1380. }
  1381. // Now build a path from the slopes
  1382. path = new Chartist.Svg.Path().move(xs[0], ys[0], false, valueData[0]);
  1383. for(i = 0; i < n - 1; i++) {
  1384. path.curve(
  1385. // First control point
  1386. xs[i] + dxs[i] / 3,
  1387. ys[i] + ms[i] * dxs[i] / 3,
  1388. // Second control point
  1389. xs[i + 1] - dxs[i] / 3,
  1390. ys[i + 1] - ms[i + 1] * dxs[i] / 3,
  1391. // End point
  1392. xs[i + 1],
  1393. ys[i + 1],
  1394. false,
  1395. valueData[i + 1]
  1396. );
  1397. }
  1398. return path;
  1399. }
  1400. };
  1401. };
  1402. /**
  1403. * Step interpolation will cause the line chart to move in steps rather than diagonal or smoothed lines. This interpolation will create additional points that will also be drawn when the `showPoint` option is enabled.
  1404. *
  1405. * All smoothing functions within Chartist are factory functions that accept an options parameter. The step interpolation function accepts one configuration parameter `postpone`, that can be `true` or `false`. The default value is `true` and will cause the step to occur where the value actually changes. If a different behaviour is needed where the step is shifted to the left and happens before the actual value, this option can be set to `false`.
  1406. *
  1407. * @example
  1408. * var chart = new Chartist.Line('.ct-chart', {
  1409. * labels: [1, 2, 3, 4, 5],
  1410. * series: [[1, 2, 8, 1, 7]]
  1411. * }, {
  1412. * lineSmooth: Chartist.Interpolation.step({
  1413. * postpone: true,
  1414. * fillHoles: false
  1415. * })
  1416. * });
  1417. *
  1418. * @memberof Chartist.Interpolation
  1419. * @param options
  1420. * @returns {Function}
  1421. */
  1422. Chartist.Interpolation.step = function(options) {
  1423. var defaultOptions = {
  1424. postpone: true,
  1425. fillHoles: false
  1426. };
  1427. options = Chartist.extend({}, defaultOptions, options);
  1428. return function step(pathCoordinates, valueData) {
  1429. var path = new Chartist.Svg.Path();
  1430. var prevX, prevY, prevData;
  1431. for (var i = 0; i < pathCoordinates.length; i += 2) {
  1432. var currX = pathCoordinates[i];
  1433. var currY = pathCoordinates[i + 1];
  1434. var currData = valueData[i / 2];
  1435. // If the current point is also not a hole we can draw the step lines
  1436. if(currData.value !== undefined) {
  1437. if(prevData === undefined) {
  1438. path.move(currX, currY, false, currData);
  1439. } else {
  1440. if(options.postpone) {
  1441. // If postponed we should draw the step line with the value of the previous value
  1442. path.line(currX, prevY, false, prevData);
  1443. } else {
  1444. // If not postponed we should draw the step line with the value of the current value
  1445. path.line(prevX, currY, false, currData);
  1446. }
  1447. // Line to the actual point (this should only be a Y-Axis movement
  1448. path.line(currX, currY, false, currData);
  1449. }
  1450. prevX = currX;
  1451. prevY = currY;
  1452. prevData = currData;
  1453. } else if(!options.fillHoles) {
  1454. prevX = prevY = prevData = undefined;
  1455. }
  1456. }
  1457. return path;
  1458. };
  1459. };
  1460. }(this || __webpack_require__.g, Chartist));
  1461. ;/**
  1462. * A very basic event module that helps to generate and catch events.
  1463. *
  1464. * @module Chartist.Event
  1465. */
  1466. /* global Chartist */
  1467. (function (globalRoot, Chartist) {
  1468. 'use strict';
  1469. Chartist.EventEmitter = function () {
  1470. var handlers = [];
  1471. /**
  1472. * Add an event handler for a specific event
  1473. *
  1474. * @memberof Chartist.Event
  1475. * @param {String} event The event name
  1476. * @param {Function} handler A event handler function
  1477. */
  1478. function addEventHandler(event, handler) {
  1479. handlers[event] = handlers[event] || [];
  1480. handlers[event].push(handler);
  1481. }
  1482. /**
  1483. * Remove an event handler of a specific event name or remove all event handlers for a specific event.
  1484. *
  1485. * @memberof Chartist.Event
  1486. * @param {String} event The event name where a specific or all handlers should be removed
  1487. * @param {Function} [handler] An optional event handler function. If specified only this specific handler will be removed and otherwise all handlers are removed.
  1488. */
  1489. function removeEventHandler(event, handler) {
  1490. // Only do something if there are event handlers with this name existing
  1491. if(handlers[event]) {
  1492. // If handler is set we will look for a specific handler and only remove this
  1493. if(handler) {
  1494. handlers[event].splice(handlers[event].indexOf(handler), 1);
  1495. if(handlers[event].length === 0) {
  1496. delete handlers[event];
  1497. }
  1498. } else {
  1499. // If no handler is specified we remove all handlers for this event
  1500. delete handlers[event];
  1501. }
  1502. }
  1503. }
  1504. /**
  1505. * Use this function to emit an event. All handlers that are listening for this event will be triggered with the data parameter.
  1506. *
  1507. * @memberof Chartist.Event
  1508. * @param {String} event The event name that should be triggered
  1509. * @param {*} data Arbitrary data that will be passed to the event handler callback functions
  1510. */
  1511. function emit(event, data) {
  1512. // Only do something if there are event handlers with this name existing
  1513. if(handlers[event]) {
  1514. handlers[event].forEach(function(handler) {
  1515. handler(data);
  1516. });
  1517. }
  1518. // Emit event to star event handlers
  1519. if(handlers['*']) {
  1520. handlers['*'].forEach(function(starHandler) {
  1521. starHandler(event, data);
  1522. });
  1523. }
  1524. }
  1525. return {
  1526. addEventHandler: addEventHandler,
  1527. removeEventHandler: removeEventHandler,
  1528. emit: emit
  1529. };
  1530. };
  1531. }(this || __webpack_require__.g, Chartist));
  1532. ;/**
  1533. * This module provides some basic prototype inheritance utilities.
  1534. *
  1535. * @module Chartist.Class
  1536. */
  1537. /* global Chartist */
  1538. (function(globalRoot, Chartist) {
  1539. 'use strict';
  1540. function listToArray(list) {
  1541. var arr = [];
  1542. if (list.length) {
  1543. for (var i = 0; i < list.length; i++) {
  1544. arr.push(list[i]);
  1545. }
  1546. }
  1547. return arr;
  1548. }
  1549. /**
  1550. * Method to extend from current prototype.
  1551. *
  1552. * @memberof Chartist.Class
  1553. * @param {Object} properties The object that serves as definition for the prototype that gets created for the new class. This object should always contain a constructor property that is the desired constructor for the newly created class.
  1554. * @param {Object} [superProtoOverride] By default extens will use the current class prototype or Chartist.class. With this parameter you can specify any super prototype that will be used.
  1555. * @return {Function} Constructor function of the new class
  1556. *
  1557. * @example
  1558. * var Fruit = Class.extend({
  1559. * color: undefined,
  1560. * sugar: undefined,
  1561. *
  1562. * constructor: function(color, sugar) {
  1563. * this.color = color;
  1564. * this.sugar = sugar;
  1565. * },
  1566. *
  1567. * eat: function() {
  1568. * this.sugar = 0;
  1569. * return this;
  1570. * }
  1571. * });
  1572. *
  1573. * var Banana = Fruit.extend({
  1574. * length: undefined,
  1575. *
  1576. * constructor: function(length, sugar) {
  1577. * Banana.super.constructor.call(this, 'Yellow', sugar);
  1578. * this.length = length;
  1579. * }
  1580. * });
  1581. *
  1582. * var banana = new Banana(20, 40);
  1583. * console.log('banana instanceof Fruit', banana instanceof Fruit);
  1584. * console.log('Fruit is prototype of banana', Fruit.prototype.isPrototypeOf(banana));
  1585. * console.log('bananas prototype is Fruit', Object.getPrototypeOf(banana) === Fruit.prototype);
  1586. * console.log(banana.sugar);
  1587. * console.log(banana.eat().sugar);
  1588. * console.log(banana.color);
  1589. */
  1590. function extend(properties, superProtoOverride) {
  1591. var superProto = superProtoOverride || this.prototype || Chartist.Class;
  1592. var proto = Object.create(superProto);
  1593. Chartist.Class.cloneDefinitions(proto, properties);
  1594. var constr = function() {
  1595. var fn = proto.constructor || function () {},
  1596. instance;
  1597. // If this is linked to the Chartist namespace the constructor was not called with new
  1598. // To provide a fallback we will instantiate here and return the instance
  1599. instance = this === Chartist ? Object.create(proto) : this;
  1600. fn.apply(instance, Array.prototype.slice.call(arguments, 0));
  1601. // If this constructor was not called with new we need to return the instance
  1602. // This will not harm when the constructor has been called with new as the returned value is ignored
  1603. return instance;
  1604. };
  1605. constr.prototype = proto;
  1606. constr.super = superProto;
  1607. constr.extend = this.extend;
  1608. return constr;
  1609. }
  1610. // Variable argument list clones args > 0 into args[0] and retruns modified args[0]
  1611. function cloneDefinitions() {
  1612. var args = listToArray(arguments);
  1613. var target = args[0];
  1614. args.splice(1, args.length - 1).forEach(function (source) {
  1615. Object.getOwnPropertyNames(source).forEach(function (propName) {
  1616. // If this property already exist in target we delete it first
  1617. delete target[propName];
  1618. // Define the property with the descriptor from source
  1619. Object.defineProperty(target, propName,
  1620. Object.getOwnPropertyDescriptor(source, propName));
  1621. });
  1622. });
  1623. return target;
  1624. }
  1625. Chartist.Class = {
  1626. extend: extend,
  1627. cloneDefinitions: cloneDefinitions
  1628. };
  1629. }(this || __webpack_require__.g, Chartist));
  1630. ;/**
  1631. * Base for all chart types. The methods in Chartist.Base are inherited to all chart types.
  1632. *
  1633. * @module Chartist.Base
  1634. */
  1635. /* global Chartist */
  1636. (function(globalRoot, Chartist) {
  1637. 'use strict';
  1638. var window = globalRoot.window;
  1639. // TODO: Currently we need to re-draw the chart on window resize. This is usually very bad and will affect performance.
  1640. // This is done because we can't work with relative coordinates when drawing the chart because SVG Path does not
  1641. // work with relative positions yet. We need to check if we can do a viewBox hack to switch to percentage.
  1642. // See http://mozilla.6506.n7.nabble.com/Specyfing-paths-with-percentages-unit-td247474.html
  1643. // Update: can be done using the above method tested here: http://codepen.io/gionkunz/pen/KDvLj
  1644. // The problem is with the label offsets that can't be converted into percentage and affecting the chart container
  1645. /**
  1646. * Updates the chart which currently does a full reconstruction of the SVG DOM
  1647. *
  1648. * @param {Object} [data] Optional data you'd like to set for the chart before it will update. If not specified the update method will use the data that is already configured with the chart.
  1649. * @param {Object} [options] Optional options you'd like to add to the previous options for the chart before it will update. If not specified the update method will use the options that have been already configured with the chart.
  1650. * @param {Boolean} [override] If set to true, the passed options will be used to extend the options that have been configured already. Otherwise the chart default options will be used as the base
  1651. * @memberof Chartist.Base
  1652. */
  1653. function update(data, options, override) {
  1654. if(data) {
  1655. this.data = data || {};
  1656. this.data.labels = this.data.labels || [];
  1657. this.data.series = this.data.series || [];
  1658. // Event for data transformation that allows to manipulate the data before it gets rendered in the charts
  1659. this.eventEmitter.emit('data', {
  1660. type: 'update',
  1661. data: this.data
  1662. });
  1663. }
  1664. if(options) {
  1665. this.options = Chartist.extend({}, override ? this.options : this.defaultOptions, options);
  1666. // If chartist was not initialized yet, we just set the options and leave the rest to the initialization
  1667. // Otherwise we re-create the optionsProvider at this point
  1668. if(!this.initializeTimeoutId) {
  1669. this.optionsProvider.removeMediaQueryListeners();
  1670. this.optionsProvider = Chartist.optionsProvider(this.options, this.responsiveOptions, this.eventEmitter);
  1671. }
  1672. }
  1673. // Only re-created the chart if it has been initialized yet
  1674. if(!this.initializeTimeoutId) {
  1675. this.createChart(this.optionsProvider.getCurrentOptions());
  1676. }
  1677. // Return a reference to the chart object to chain up calls
  1678. return this;
  1679. }
  1680. /**
  1681. * This method can be called on the API object of each chart and will un-register all event listeners that were added to other components. This currently includes a window.resize listener as well as media query listeners if any responsive options have been provided. Use this function if you need to destroy and recreate Chartist charts dynamically.
  1682. *
  1683. * @memberof Chartist.Base
  1684. */
  1685. function detach() {
  1686. // Only detach if initialization already occurred on this chart. If this chart still hasn't initialized (therefore
  1687. // the initializationTimeoutId is still a valid timeout reference, we will clear the timeout
  1688. if(!this.initializeTimeoutId) {
  1689. window.removeEventListener('resize', this.resizeListener);
  1690. this.optionsProvider.removeMediaQueryListeners();
  1691. } else {
  1692. window.clearTimeout(this.initializeTimeoutId);
  1693. }
  1694. return this;
  1695. }
  1696. /**
  1697. * Use this function to register event handlers. The handler callbacks are synchronous and will run in the main thread rather than the event loop.
  1698. *
  1699. * @memberof Chartist.Base
  1700. * @param {String} event Name of the event. Check the examples for supported events.
  1701. * @param {Function} handler The handler function that will be called when an event with the given name was emitted. This function will receive a data argument which contains event data. See the example for more details.
  1702. */
  1703. function on(event, handler) {
  1704. this.eventEmitter.addEventHandler(event, handler);
  1705. return this;
  1706. }
  1707. /**
  1708. * Use this function to un-register event handlers. If the handler function parameter is omitted all handlers for the given event will be un-registered.
  1709. *
  1710. * @memberof Chartist.Base
  1711. * @param {String} event Name of the event for which a handler should be removed
  1712. * @param {Function} [handler] The handler function that that was previously used to register a new event handler. This handler will be removed from the event handler list. If this parameter is omitted then all event handlers for the given event are removed from the list.
  1713. */
  1714. function off(event, handler) {
  1715. this.eventEmitter.removeEventHandler(event, handler);
  1716. return this;
  1717. }
  1718. function initialize() {
  1719. // Add window resize listener that re-creates the chart
  1720. window.addEventListener('resize', this.resizeListener);
  1721. // Obtain current options based on matching media queries (if responsive options are given)
  1722. // This will also register a listener that is re-creating the chart based on media changes
  1723. this.optionsProvider = Chartist.optionsProvider(this.options, this.responsiveOptions, this.eventEmitter);
  1724. // Register options change listener that will trigger a chart update
  1725. this.eventEmitter.addEventHandler('optionsChanged', function() {
  1726. this.update();
  1727. }.bind(this));
  1728. // Before the first chart creation we need to register us with all plugins that are configured
  1729. // Initialize all relevant plugins with our chart object and the plugin options specified in the config
  1730. if(this.options.plugins) {
  1731. this.options.plugins.forEach(function(plugin) {
  1732. if(plugin instanceof Array) {
  1733. plugin[0](this, plugin[1]);
  1734. } else {
  1735. plugin(this);
  1736. }
  1737. }.bind(this));
  1738. }
  1739. // Event for data transformation that allows to manipulate the data before it gets rendered in the charts
  1740. this.eventEmitter.emit('data', {
  1741. type: 'initial',
  1742. data: this.data
  1743. });
  1744. // Create the first chart
  1745. this.createChart(this.optionsProvider.getCurrentOptions());
  1746. // As chart is initialized from the event loop now we can reset our timeout reference
  1747. // This is important if the chart gets initialized on the same element twice
  1748. this.initializeTimeoutId = undefined;
  1749. }
  1750. /**
  1751. * Constructor of chart base class.
  1752. *
  1753. * @param query
  1754. * @param data
  1755. * @param defaultOptions
  1756. * @param options
  1757. * @param responsiveOptions
  1758. * @constructor
  1759. */
  1760. function Base(query, data, defaultOptions, options, responsiveOptions) {
  1761. this.container = Chartist.querySelector(query);
  1762. this.data = data || {};
  1763. this.data.labels = this.data.labels || [];
  1764. this.data.series = this.data.series || [];
  1765. this.defaultOptions = defaultOptions;
  1766. this.options = options;
  1767. this.responsiveOptions = responsiveOptions;
  1768. this.eventEmitter = Chartist.EventEmitter();
  1769. this.supportsForeignObject = Chartist.Svg.isSupported('Extensibility');
  1770. this.supportsAnimations = Chartist.Svg.isSupported('AnimationEventsAttribute');
  1771. this.resizeListener = function resizeListener(){
  1772. this.update();
  1773. }.bind(this);
  1774. if(this.container) {
  1775. // If chartist was already initialized in this container we are detaching all event listeners first
  1776. if(this.container.__chartist__) {
  1777. this.container.__chartist__.detach();
  1778. }
  1779. this.container.__chartist__ = this;
  1780. }
  1781. // Using event loop for first draw to make it possible to register event listeners in the same call stack where
  1782. // the chart was created.
  1783. this.initializeTimeoutId = setTimeout(initialize.bind(this), 0);
  1784. }
  1785. // Creating the chart base class
  1786. Chartist.Base = Chartist.Class.extend({
  1787. constructor: Base,
  1788. optionsProvider: undefined,
  1789. container: undefined,
  1790. svg: undefined,
  1791. eventEmitter: undefined,
  1792. createChart: function() {
  1793. throw new Error('Base chart type can\'t be instantiated!');
  1794. },
  1795. update: update,
  1796. detach: detach,
  1797. on: on,
  1798. off: off,
  1799. version: Chartist.version,
  1800. supportsForeignObject: false
  1801. });
  1802. }(this || __webpack_require__.g, Chartist));
  1803. ;/**
  1804. * Chartist SVG module for simple SVG DOM abstraction
  1805. *
  1806. * @module Chartist.Svg
  1807. */
  1808. /* global Chartist */
  1809. (function(globalRoot, Chartist) {
  1810. 'use strict';
  1811. var document = globalRoot.document;
  1812. /**
  1813. * Chartist.Svg creates a new SVG object wrapper with a starting element. You can use the wrapper to fluently create sub-elements and modify them.
  1814. *
  1815. * @memberof Chartist.Svg
  1816. * @constructor
  1817. * @param {String|Element} name The name of the SVG element to create or an SVG dom element which should be wrapped into Chartist.Svg
  1818. * @param {Object} attributes An object with properties that will be added as attributes to the SVG element that is created. Attributes with undefined values will not be added.
  1819. * @param {String} className This class or class list will be added to the SVG element
  1820. * @param {Object} parent The parent SVG wrapper object where this newly created wrapper and it's element will be attached to as child
  1821. * @param {Boolean} insertFirst If this param is set to true in conjunction with a parent element the newly created element will be added as first child element in the parent element
  1822. */
  1823. function Svg(name, attributes, className, parent, insertFirst) {
  1824. // If Svg is getting called with an SVG element we just return the wrapper
  1825. if(name instanceof Element) {
  1826. this._node = name;
  1827. } else {
  1828. this._node = document.createElementNS(Chartist.namespaces.svg, name);
  1829. // If this is an SVG element created then custom namespace
  1830. if(name === 'svg') {
  1831. this.attr({
  1832. 'xmlns:ct': Chartist.namespaces.ct
  1833. });
  1834. }
  1835. }
  1836. if(attributes) {
  1837. this.attr(attributes);
  1838. }
  1839. if(className) {
  1840. this.addClass(className);
  1841. }
  1842. if(parent) {
  1843. if (insertFirst && parent._node.firstChild) {
  1844. parent._node.insertBefore(this._node, parent._node.firstChild);
  1845. } else {
  1846. parent._node.appendChild(this._node);
  1847. }
  1848. }
  1849. }
  1850. /**
  1851. * Set attributes on the current SVG element of the wrapper you're currently working on.
  1852. *
  1853. * @memberof Chartist.Svg
  1854. * @param {Object|String} attributes An object with properties that will be added as attributes to the SVG element that is created. Attributes with undefined values will not be added. If this parameter is a String then the function is used as a getter and will return the attribute value.
  1855. * @param {String} [ns] If specified, the attribute will be obtained using getAttributeNs. In order to write namepsaced attributes you can use the namespace:attribute notation within the attributes object.
  1856. * @return {Object|String} The current wrapper object will be returned so it can be used for chaining or the attribute value if used as getter function.
  1857. */
  1858. function attr(attributes, ns) {
  1859. if(typeof attributes === 'string') {
  1860. if(ns) {
  1861. return this._node.getAttributeNS(ns, attributes);
  1862. } else {
  1863. return this._node.getAttribute(attributes);
  1864. }
  1865. }
  1866. Object.keys(attributes).forEach(function(key) {
  1867. // If the attribute value is undefined we can skip this one
  1868. if(attributes[key] === undefined) {
  1869. return;
  1870. }
  1871. if (key.indexOf(':') !== -1) {
  1872. var namespacedAttribute = key.split(':');
  1873. this._node.setAttributeNS(Chartist.namespaces[namespacedAttribute[0]], key, attributes[key]);
  1874. } else {
  1875. this._node.setAttribute(key, attributes[key]);
  1876. }
  1877. }.bind(this));
  1878. return this;
  1879. }
  1880. /**
  1881. * Create a new SVG element whose wrapper object will be selected for further operations. This way you can also create nested groups easily.
  1882. *
  1883. * @memberof Chartist.Svg
  1884. * @param {String} name The name of the SVG element that should be created as child element of the currently selected element wrapper
  1885. * @param {Object} [attributes] An object with properties that will be added as attributes to the SVG element that is created. Attributes with undefined values will not be added.
  1886. * @param {String} [className] This class or class list will be added to the SVG element
  1887. * @param {Boolean} [insertFirst] If this param is set to true in conjunction with a parent element the newly created element will be added as first child element in the parent element
  1888. * @return {Chartist.Svg} Returns a Chartist.Svg wrapper object that can be used to modify the containing SVG data
  1889. */
  1890. function elem(name, attributes, className, insertFirst) {
  1891. return new Chartist.Svg(name, attributes, className, this, insertFirst);
  1892. }
  1893. /**
  1894. * Returns the parent Chartist.SVG wrapper object
  1895. *
  1896. * @memberof Chartist.Svg
  1897. * @return {Chartist.Svg} Returns a Chartist.Svg wrapper around the parent node of the current node. If the parent node is not existing or it's not an SVG node then this function will return null.
  1898. */
  1899. function parent() {
  1900. return this._node.parentNode instanceof SVGElement ? new Chartist.Svg(this._node.parentNode) : null;
  1901. }
  1902. /**
  1903. * This method returns a Chartist.Svg wrapper around the root SVG element of the current tree.
  1904. *
  1905. * @memberof Chartist.Svg
  1906. * @return {Chartist.Svg} The root SVG element wrapped in a Chartist.Svg element
  1907. */
  1908. function root() {
  1909. var node = this._node;
  1910. while(node.nodeName !== 'svg') {
  1911. node = node.parentNode;
  1912. }
  1913. return new Chartist.Svg(node);
  1914. }
  1915. /**
  1916. * Find the first child SVG element of the current element that matches a CSS selector. The returned object is a Chartist.Svg wrapper.
  1917. *
  1918. * @memberof Chartist.Svg
  1919. * @param {String} selector A CSS selector that is used to query for child SVG elements
  1920. * @return {Chartist.Svg} The SVG wrapper for the element found or null if no element was found
  1921. */
  1922. function querySelector(selector) {
  1923. var foundNode = this._node.querySelector(selector);
  1924. return foundNode ? new Chartist.Svg(foundNode) : null;
  1925. }
  1926. /**
  1927. * Find the all child SVG elements of the current element that match a CSS selector. The returned object is a Chartist.Svg.List wrapper.
  1928. *
  1929. * @memberof Chartist.Svg
  1930. * @param {String} selector A CSS selector that is used to query for child SVG elements
  1931. * @return {Chartist.Svg.List} The SVG wrapper list for the element found or null if no element was found
  1932. */
  1933. function querySelectorAll(selector) {
  1934. var foundNodes = this._node.querySelectorAll(selector);
  1935. return foundNodes.length ? new Chartist.Svg.List(foundNodes) : null;
  1936. }
  1937. /**
  1938. * Returns the underlying SVG node for the current element.
  1939. *
  1940. * @memberof Chartist.Svg
  1941. * @returns {Node}
  1942. */
  1943. function getNode() {
  1944. return this._node;
  1945. }
  1946. /**
  1947. * This method creates a foreignObject (see https://developer.mozilla.org/en-US/docs/Web/SVG/Element/foreignObject) that allows to embed HTML content into a SVG graphic. With the help of foreignObjects you can enable the usage of regular HTML elements inside of SVG where they are subject for SVG positioning and transformation but the Browser will use the HTML rendering capabilities for the containing DOM.
  1948. *
  1949. * @memberof Chartist.Svg
  1950. * @param {Node|String} content The DOM Node, or HTML string that will be converted to a DOM Node, that is then placed into and wrapped by the foreignObject
  1951. * @param {String} [attributes] An object with properties that will be added as attributes to the foreignObject element that is created. Attributes with undefined values will not be added.
  1952. * @param {String} [className] This class or class list will be added to the SVG element
  1953. * @param {Boolean} [insertFirst] Specifies if the foreignObject should be inserted as first child
  1954. * @return {Chartist.Svg} New wrapper object that wraps the foreignObject element
  1955. */
  1956. function foreignObject(content, attributes, className, insertFirst) {
  1957. // If content is string then we convert it to DOM
  1958. // TODO: Handle case where content is not a string nor a DOM Node
  1959. if(typeof content === 'string') {
  1960. var container = document.createElement('div');
  1961. container.innerHTML = content;
  1962. content = container.firstChild;
  1963. }
  1964. // Adding namespace to content element
  1965. content.setAttribute('xmlns', Chartist.namespaces.xmlns);
  1966. // Creating the foreignObject without required extension attribute (as described here
  1967. // http://www.w3.org/TR/SVG/extend.html#ForeignObjectElement)
  1968. var fnObj = this.elem('foreignObject', attributes, className, insertFirst);
  1969. // Add content to foreignObjectElement
  1970. fnObj._node.appendChild(content);
  1971. return fnObj;
  1972. }
  1973. /**
  1974. * This method adds a new text element to the current Chartist.Svg wrapper.
  1975. *
  1976. * @memberof Chartist.Svg
  1977. * @param {String} t The text that should be added to the text element that is created
  1978. * @return {Chartist.Svg} The same wrapper object that was used to add the newly created element
  1979. */
  1980. function text(t) {
  1981. this._node.appendChild(document.createTextNode(t));
  1982. return this;
  1983. }
  1984. /**
  1985. * This method will clear all child nodes of the current wrapper object.
  1986. *
  1987. * @memberof Chartist.Svg
  1988. * @return {Chartist.Svg} The same wrapper object that got emptied
  1989. */
  1990. function empty() {
  1991. while (this._node.firstChild) {
  1992. this._node.removeChild(this._node.firstChild);
  1993. }
  1994. return this;
  1995. }
  1996. /**
  1997. * This method will cause the current wrapper to remove itself from its parent wrapper. Use this method if you'd like to get rid of an element in a given DOM structure.
  1998. *
  1999. * @memberof Chartist.Svg
  2000. * @return {Chartist.Svg} The parent wrapper object of the element that got removed
  2001. */
  2002. function remove() {
  2003. this._node.parentNode.removeChild(this._node);
  2004. return this.parent();
  2005. }
  2006. /**
  2007. * This method will replace the element with a new element that can be created outside of the current DOM.
  2008. *
  2009. * @memberof Chartist.Svg
  2010. * @param {Chartist.Svg} newElement The new Chartist.Svg object that will be used to replace the current wrapper object
  2011. * @return {Chartist.Svg} The wrapper of the new element
  2012. */
  2013. function replace(newElement) {
  2014. this._node.parentNode.replaceChild(newElement._node, this._node);
  2015. return newElement;
  2016. }
  2017. /**
  2018. * This method will append an element to the current element as a child.
  2019. *
  2020. * @memberof Chartist.Svg
  2021. * @param {Chartist.Svg} element The Chartist.Svg element that should be added as a child
  2022. * @param {Boolean} [insertFirst] Specifies if the element should be inserted as first child
  2023. * @return {Chartist.Svg} The wrapper of the appended object
  2024. */
  2025. function append(element, insertFirst) {
  2026. if(insertFirst && this._node.firstChild) {
  2027. this._node.insertBefore(element._node, this._node.firstChild);
  2028. } else {
  2029. this._node.appendChild(element._node);
  2030. }
  2031. return this;
  2032. }
  2033. /**
  2034. * Returns an array of class names that are attached to the current wrapper element. This method can not be chained further.
  2035. *
  2036. * @memberof Chartist.Svg
  2037. * @return {Array} A list of classes or an empty array if there are no classes on the current element
  2038. */
  2039. function classes() {
  2040. return this._node.getAttribute('class') ? this._node.getAttribute('class').trim().split(/\s+/) : [];
  2041. }
  2042. /**
  2043. * Adds one or a space separated list of classes to the current element and ensures the classes are only existing once.
  2044. *
  2045. * @memberof Chartist.Svg
  2046. * @param {String} names A white space separated list of class names
  2047. * @return {Chartist.Svg} The wrapper of the current element
  2048. */
  2049. function addClass(names) {
  2050. this._node.setAttribute('class',
  2051. this.classes(this._node)
  2052. .concat(names.trim().split(/\s+/))
  2053. .filter(function(elem, pos, self) {
  2054. return self.indexOf(elem) === pos;
  2055. }).join(' ')
  2056. );
  2057. return this;
  2058. }
  2059. /**
  2060. * Removes one or a space separated list of classes from the current element.
  2061. *
  2062. * @memberof Chartist.Svg
  2063. * @param {String} names A white space separated list of class names
  2064. * @return {Chartist.Svg} The wrapper of the current element
  2065. */
  2066. function removeClass(names) {
  2067. var removedClasses = names.trim().split(/\s+/);
  2068. this._node.setAttribute('class', this.classes(this._node).filter(function(name) {
  2069. return removedClasses.indexOf(name) === -1;
  2070. }).join(' '));
  2071. return this;
  2072. }
  2073. /**
  2074. * Removes all classes from the current element.
  2075. *
  2076. * @memberof Chartist.Svg
  2077. * @return {Chartist.Svg} The wrapper of the current element
  2078. */
  2079. function removeAllClasses() {
  2080. this._node.setAttribute('class', '');
  2081. return this;
  2082. }
  2083. /**
  2084. * Get element height using `getBoundingClientRect`
  2085. *
  2086. * @memberof Chartist.Svg
  2087. * @return {Number} The elements height in pixels
  2088. */
  2089. function height() {
  2090. return this._node.getBoundingClientRect().height;
  2091. }
  2092. /**
  2093. * Get element width using `getBoundingClientRect`
  2094. *
  2095. * @memberof Chartist.Core
  2096. * @return {Number} The elements width in pixels
  2097. */
  2098. function width() {
  2099. return this._node.getBoundingClientRect().width;
  2100. }
  2101. /**
  2102. * The animate function lets you animate the current element with SMIL animations. You can add animations for multiple attributes at the same time by using an animation definition object. This object should contain SMIL animation attributes. Please refer to http://www.w3.org/TR/SVG/animate.html for a detailed specification about the available animation attributes. Additionally an easing property can be passed in the animation definition object. This can be a string with a name of an easing function in `Chartist.Svg.Easing` or an array with four numbers specifying a cubic Bézier curve.
  2103. * **An animations object could look like this:**
  2104. * ```javascript
  2105. * element.animate({
  2106. * opacity: {
  2107. * dur: 1000,
  2108. * from: 0,
  2109. * to: 1
  2110. * },
  2111. * x1: {
  2112. * dur: '1000ms',
  2113. * from: 100,
  2114. * to: 200,
  2115. * easing: 'easeOutQuart'
  2116. * },
  2117. * y1: {
  2118. * dur: '2s',
  2119. * from: 0,
  2120. * to: 100
  2121. * }
  2122. * });
  2123. * ```
  2124. * **Automatic unit conversion**
  2125. * For the `dur` and the `begin` animate attribute you can also omit a unit by passing a number. The number will automatically be converted to milli seconds.
  2126. * **Guided mode**
  2127. * The default behavior of SMIL animations with offset using the `begin` attribute is that the attribute will keep it's original value until the animation starts. Mostly this behavior is not desired as you'd like to have your element attributes already initialized with the animation `from` value even before the animation starts. Also if you don't specify `fill="freeze"` on an animate element or if you delete the animation after it's done (which is done in guided mode) the attribute will switch back to the initial value. This behavior is also not desired when performing simple one-time animations. For one-time animations you'd want to trigger animations immediately instead of relative to the document begin time. That's why in guided mode Chartist.Svg will also use the `begin` property to schedule a timeout and manually start the animation after the timeout. If you're using multiple SMIL definition objects for an attribute (in an array), guided mode will be disabled for this attribute, even if you explicitly enabled it.
  2128. * If guided mode is enabled the following behavior is added:
  2129. * - Before the animation starts (even when delayed with `begin`) the animated attribute will be set already to the `from` value of the animation
  2130. * - `begin` is explicitly set to `indefinite` so it can be started manually without relying on document begin time (creation)
  2131. * - The animate element will be forced to use `fill="freeze"`
  2132. * - The animation will be triggered with `beginElement()` in a timeout where `begin` of the definition object is interpreted in milli seconds. If no `begin` was specified the timeout is triggered immediately.
  2133. * - After the animation the element attribute value will be set to the `to` value of the animation
  2134. * - The animate element is deleted from the DOM
  2135. *
  2136. * @memberof Chartist.Svg
  2137. * @param {Object} animations An animations object where the property keys are the attributes you'd like to animate. The properties should be objects again that contain the SMIL animation attributes (usually begin, dur, from, and to). The property begin and dur is auto converted (see Automatic unit conversion). You can also schedule multiple animations for the same attribute by passing an Array of SMIL definition objects. Attributes that contain an array of SMIL definition objects will not be executed in guided mode.
  2138. * @param {Boolean} guided Specify if guided mode should be activated for this animation (see Guided mode). If not otherwise specified, guided mode will be activated.
  2139. * @param {Object} eventEmitter If specified, this event emitter will be notified when an animation starts or ends.
  2140. * @return {Chartist.Svg} The current element where the animation was added
  2141. */
  2142. function animate(animations, guided, eventEmitter) {
  2143. if(guided === undefined) {
  2144. guided = true;
  2145. }
  2146. Object.keys(animations).forEach(function createAnimateForAttributes(attribute) {
  2147. function createAnimate(animationDefinition, guided) {
  2148. var attributeProperties = {},
  2149. animate,
  2150. timeout,
  2151. easing;
  2152. // Check if an easing is specified in the definition object and delete it from the object as it will not
  2153. // be part of the animate element attributes.
  2154. if(animationDefinition.easing) {
  2155. // If already an easing Bézier curve array we take it or we lookup a easing array in the Easing object
  2156. easing = animationDefinition.easing instanceof Array ?
  2157. animationDefinition.easing :
  2158. Chartist.Svg.Easing[animationDefinition.easing];
  2159. delete animationDefinition.easing;
  2160. }
  2161. // If numeric dur or begin was provided we assume milli seconds
  2162. animationDefinition.begin = Chartist.ensureUnit(animationDefinition.begin, 'ms');
  2163. animationDefinition.dur = Chartist.ensureUnit(animationDefinition.dur, 'ms');
  2164. if(easing) {
  2165. animationDefinition.calcMode = 'spline';
  2166. animationDefinition.keySplines = easing.join(' ');
  2167. animationDefinition.keyTimes = '0;1';
  2168. }
  2169. // Adding "fill: freeze" if we are in guided mode and set initial attribute values
  2170. if(guided) {
  2171. animationDefinition.fill = 'freeze';
  2172. // Animated property on our element should already be set to the animation from value in guided mode
  2173. attributeProperties[attribute] = animationDefinition.from;
  2174. this.attr(attributeProperties);
  2175. // In guided mode we also set begin to indefinite so we can trigger the start manually and put the begin
  2176. // which needs to be in ms aside
  2177. timeout = Chartist.quantity(animationDefinition.begin || 0).value;
  2178. animationDefinition.begin = 'indefinite';
  2179. }
  2180. animate = this.elem('animate', Chartist.extend({
  2181. attributeName: attribute
  2182. }, animationDefinition));
  2183. if(guided) {
  2184. // If guided we take the value that was put aside in timeout and trigger the animation manually with a timeout
  2185. setTimeout(function() {
  2186. // If beginElement fails we set the animated attribute to the end position and remove the animate element
  2187. // This happens if the SMIL ElementTimeControl interface is not supported or any other problems occured in
  2188. // the browser. (Currently FF 34 does not support animate elements in foreignObjects)
  2189. try {
  2190. animate._node.beginElement();
  2191. } catch(err) {
  2192. // Set animated attribute to current animated value
  2193. attributeProperties[attribute] = animationDefinition.to;
  2194. this.attr(attributeProperties);
  2195. // Remove the animate element as it's no longer required
  2196. animate.remove();
  2197. }
  2198. }.bind(this), timeout);
  2199. }
  2200. if(eventEmitter) {
  2201. animate._node.addEventListener('beginEvent', function handleBeginEvent() {
  2202. eventEmitter.emit('animationBegin', {
  2203. element: this,
  2204. animate: animate._node,
  2205. params: animationDefinition
  2206. });
  2207. }.bind(this));
  2208. }
  2209. animate._node.addEventListener('endEvent', function handleEndEvent() {
  2210. if(eventEmitter) {
  2211. eventEmitter.emit('animationEnd', {
  2212. element: this,
  2213. animate: animate._node,
  2214. params: animationDefinition
  2215. });
  2216. }
  2217. if(guided) {
  2218. // Set animated attribute to current animated value
  2219. attributeProperties[attribute] = animationDefinition.to;
  2220. this.attr(attributeProperties);
  2221. // Remove the animate element as it's no longer required
  2222. animate.remove();
  2223. }
  2224. }.bind(this));
  2225. }
  2226. // If current attribute is an array of definition objects we create an animate for each and disable guided mode
  2227. if(animations[attribute] instanceof Array) {
  2228. animations[attribute].forEach(function(animationDefinition) {
  2229. createAnimate.bind(this)(animationDefinition, false);
  2230. }.bind(this));
  2231. } else {
  2232. createAnimate.bind(this)(animations[attribute], guided);
  2233. }
  2234. }.bind(this));
  2235. return this;
  2236. }
  2237. Chartist.Svg = Chartist.Class.extend({
  2238. constructor: Svg,
  2239. attr: attr,
  2240. elem: elem,
  2241. parent: parent,
  2242. root: root,
  2243. querySelector: querySelector,
  2244. querySelectorAll: querySelectorAll,
  2245. getNode: getNode,
  2246. foreignObject: foreignObject,
  2247. text: text,
  2248. empty: empty,
  2249. remove: remove,
  2250. replace: replace,
  2251. append: append,
  2252. classes: classes,
  2253. addClass: addClass,
  2254. removeClass: removeClass,
  2255. removeAllClasses: removeAllClasses,
  2256. height: height,
  2257. width: width,
  2258. animate: animate
  2259. });
  2260. /**
  2261. * This method checks for support of a given SVG feature like Extensibility, SVG-animation or the like. Check http://www.w3.org/TR/SVG11/feature for a detailed list.
  2262. *
  2263. * @memberof Chartist.Svg
  2264. * @param {String} feature The SVG 1.1 feature that should be checked for support.
  2265. * @return {Boolean} True of false if the feature is supported or not
  2266. */
  2267. Chartist.Svg.isSupported = function(feature) {
  2268. return document.implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#' + feature, '1.1');
  2269. };
  2270. /**
  2271. * This Object contains some standard easing cubic bezier curves. Then can be used with their name in the `Chartist.Svg.animate`. You can also extend the list and use your own name in the `animate` function. Click the show code button to see the available bezier functions.
  2272. *
  2273. * @memberof Chartist.Svg
  2274. */
  2275. var easingCubicBeziers = {
  2276. easeInSine: [0.47, 0, 0.745, 0.715],
  2277. easeOutSine: [0.39, 0.575, 0.565, 1],
  2278. easeInOutSine: [0.445, 0.05, 0.55, 0.95],
  2279. easeInQuad: [0.55, 0.085, 0.68, 0.53],
  2280. easeOutQuad: [0.25, 0.46, 0.45, 0.94],
  2281. easeInOutQuad: [0.455, 0.03, 0.515, 0.955],
  2282. easeInCubic: [0.55, 0.055, 0.675, 0.19],
  2283. easeOutCubic: [0.215, 0.61, 0.355, 1],
  2284. easeInOutCubic: [0.645, 0.045, 0.355, 1],
  2285. easeInQuart: [0.895, 0.03, 0.685, 0.22],
  2286. easeOutQuart: [0.165, 0.84, 0.44, 1],
  2287. easeInOutQuart: [0.77, 0, 0.175, 1],
  2288. easeInQuint: [0.755, 0.05, 0.855, 0.06],
  2289. easeOutQuint: [0.23, 1, 0.32, 1],
  2290. easeInOutQuint: [0.86, 0, 0.07, 1],
  2291. easeInExpo: [0.95, 0.05, 0.795, 0.035],
  2292. easeOutExpo: [0.19, 1, 0.22, 1],
  2293. easeInOutExpo: [1, 0, 0, 1],
  2294. easeInCirc: [0.6, 0.04, 0.98, 0.335],
  2295. easeOutCirc: [0.075, 0.82, 0.165, 1],
  2296. easeInOutCirc: [0.785, 0.135, 0.15, 0.86],
  2297. easeInBack: [0.6, -0.28, 0.735, 0.045],
  2298. easeOutBack: [0.175, 0.885, 0.32, 1.275],
  2299. easeInOutBack: [0.68, -0.55, 0.265, 1.55]
  2300. };
  2301. Chartist.Svg.Easing = easingCubicBeziers;
  2302. /**
  2303. * This helper class is to wrap multiple `Chartist.Svg` elements into a list where you can call the `Chartist.Svg` functions on all elements in the list with one call. This is helpful when you'd like to perform calls with `Chartist.Svg` on multiple elements.
  2304. * An instance of this class is also returned by `Chartist.Svg.querySelectorAll`.
  2305. *
  2306. * @memberof Chartist.Svg
  2307. * @param {Array<Node>|NodeList} nodeList An Array of SVG DOM nodes or a SVG DOM NodeList (as returned by document.querySelectorAll)
  2308. * @constructor
  2309. */
  2310. function SvgList(nodeList) {
  2311. var list = this;
  2312. this.svgElements = [];
  2313. for(var i = 0; i < nodeList.length; i++) {
  2314. this.svgElements.push(new Chartist.Svg(nodeList[i]));
  2315. }
  2316. // Add delegation methods for Chartist.Svg
  2317. Object.keys(Chartist.Svg.prototype).filter(function(prototypeProperty) {
  2318. return ['constructor',
  2319. 'parent',
  2320. 'querySelector',
  2321. 'querySelectorAll',
  2322. 'replace',
  2323. 'append',
  2324. 'classes',
  2325. 'height',
  2326. 'width'].indexOf(prototypeProperty) === -1;
  2327. }).forEach(function(prototypeProperty) {
  2328. list[prototypeProperty] = function() {
  2329. var args = Array.prototype.slice.call(arguments, 0);
  2330. list.svgElements.forEach(function(element) {
  2331. Chartist.Svg.prototype[prototypeProperty].apply(element, args);
  2332. });
  2333. return list;
  2334. };
  2335. });
  2336. }
  2337. Chartist.Svg.List = Chartist.Class.extend({
  2338. constructor: SvgList
  2339. });
  2340. }(this || __webpack_require__.g, Chartist));
  2341. ;/**
  2342. * Chartist SVG path module for SVG path description creation and modification.
  2343. *
  2344. * @module Chartist.Svg.Path
  2345. */
  2346. /* global Chartist */
  2347. (function(globalRoot, Chartist) {
  2348. 'use strict';
  2349. /**
  2350. * Contains the descriptors of supported element types in a SVG path. Currently only move, line and curve are supported.
  2351. *
  2352. * @memberof Chartist.Svg.Path
  2353. * @type {Object}
  2354. */
  2355. var elementDescriptions = {
  2356. m: ['x', 'y'],
  2357. l: ['x', 'y'],
  2358. c: ['x1', 'y1', 'x2', 'y2', 'x', 'y'],
  2359. a: ['rx', 'ry', 'xAr', 'lAf', 'sf', 'x', 'y']
  2360. };
  2361. /**
  2362. * Default options for newly created SVG path objects.
  2363. *
  2364. * @memberof Chartist.Svg.Path
  2365. * @type {Object}
  2366. */
  2367. var defaultOptions = {
  2368. // The accuracy in digit count after the decimal point. This will be used to round numbers in the SVG path. If this option is set to false then no rounding will be performed.
  2369. accuracy: 3
  2370. };
  2371. function element(command, params, pathElements, pos, relative, data) {
  2372. var pathElement = Chartist.extend({
  2373. command: relative ? command.toLowerCase() : command.toUpperCase()
  2374. }, params, data ? { data: data } : {} );
  2375. pathElements.splice(pos, 0, pathElement);
  2376. }
  2377. function forEachParam(pathElements, cb) {
  2378. pathElements.forEach(function(pathElement, pathElementIndex) {
  2379. elementDescriptions[pathElement.command.toLowerCase()].forEach(function(paramName, paramIndex) {
  2380. cb(pathElement, paramName, pathElementIndex, paramIndex, pathElements);
  2381. });
  2382. });
  2383. }
  2384. /**
  2385. * Used to construct a new path object.
  2386. *
  2387. * @memberof Chartist.Svg.Path
  2388. * @param {Boolean} close If set to true then this path will be closed when stringified (with a Z at the end)
  2389. * @param {Object} options Options object that overrides the default objects. See default options for more details.
  2390. * @constructor
  2391. */
  2392. function SvgPath(close, options) {
  2393. this.pathElements = [];
  2394. this.pos = 0;
  2395. this.close = close;
  2396. this.options = Chartist.extend({}, defaultOptions, options);
  2397. }
  2398. /**
  2399. * Gets or sets the current position (cursor) inside of the path. You can move around the cursor freely but limited to 0 or the count of existing elements. All modifications with element functions will insert new elements at the position of this cursor.
  2400. *
  2401. * @memberof Chartist.Svg.Path
  2402. * @param {Number} [pos] If a number is passed then the cursor is set to this position in the path element array.
  2403. * @return {Chartist.Svg.Path|Number} If the position parameter was passed then the return value will be the path object for easy call chaining. If no position parameter was passed then the current position is returned.
  2404. */
  2405. function position(pos) {
  2406. if(pos !== undefined) {
  2407. this.pos = Math.max(0, Math.min(this.pathElements.length, pos));
  2408. return this;
  2409. } else {
  2410. return this.pos;
  2411. }
  2412. }
  2413. /**
  2414. * Removes elements from the path starting at the current position.
  2415. *
  2416. * @memberof Chartist.Svg.Path
  2417. * @param {Number} count Number of path elements that should be removed from the current position.
  2418. * @return {Chartist.Svg.Path} The current path object for easy call chaining.
  2419. */
  2420. function remove(count) {
  2421. this.pathElements.splice(this.pos, count);
  2422. return this;
  2423. }
  2424. /**
  2425. * Use this function to add a new move SVG path element.
  2426. *
  2427. * @memberof Chartist.Svg.Path
  2428. * @param {Number} x The x coordinate for the move element.
  2429. * @param {Number} y The y coordinate for the move element.
  2430. * @param {Boolean} [relative] If set to true the move element will be created with relative coordinates (lowercase letter)
  2431. * @param {*} [data] Any data that should be stored with the element object that will be accessible in pathElement
  2432. * @return {Chartist.Svg.Path} The current path object for easy call chaining.
  2433. */
  2434. function move(x, y, relative, data) {
  2435. element('M', {
  2436. x: +x,
  2437. y: +y
  2438. }, this.pathElements, this.pos++, relative, data);
  2439. return this;
  2440. }
  2441. /**
  2442. * Use this function to add a new line SVG path element.
  2443. *
  2444. * @memberof Chartist.Svg.Path
  2445. * @param {Number} x The x coordinate for the line element.
  2446. * @param {Number} y The y coordinate for the line element.
  2447. * @param {Boolean} [relative] If set to true the line element will be created with relative coordinates (lowercase letter)
  2448. * @param {*} [data] Any data that should be stored with the element object that will be accessible in pathElement
  2449. * @return {Chartist.Svg.Path} The current path object for easy call chaining.
  2450. */
  2451. function line(x, y, relative, data) {
  2452. element('L', {
  2453. x: +x,
  2454. y: +y
  2455. }, this.pathElements, this.pos++, relative, data);
  2456. return this;
  2457. }
  2458. /**
  2459. * Use this function to add a new curve SVG path element.
  2460. *
  2461. * @memberof Chartist.Svg.Path
  2462. * @param {Number} x1 The x coordinate for the first control point of the bezier curve.
  2463. * @param {Number} y1 The y coordinate for the first control point of the bezier curve.
  2464. * @param {Number} x2 The x coordinate for the second control point of the bezier curve.
  2465. * @param {Number} y2 The y coordinate for the second control point of the bezier curve.
  2466. * @param {Number} x The x coordinate for the target point of the curve element.
  2467. * @param {Number} y The y coordinate for the target point of the curve element.
  2468. * @param {Boolean} [relative] If set to true the curve element will be created with relative coordinates (lowercase letter)
  2469. * @param {*} [data] Any data that should be stored with the element object that will be accessible in pathElement
  2470. * @return {Chartist.Svg.Path} The current path object for easy call chaining.
  2471. */
  2472. function curve(x1, y1, x2, y2, x, y, relative, data) {
  2473. element('C', {
  2474. x1: +x1,
  2475. y1: +y1,
  2476. x2: +x2,
  2477. y2: +y2,
  2478. x: +x,
  2479. y: +y
  2480. }, this.pathElements, this.pos++, relative, data);
  2481. return this;
  2482. }
  2483. /**
  2484. * Use this function to add a new non-bezier curve SVG path element.
  2485. *
  2486. * @memberof Chartist.Svg.Path
  2487. * @param {Number} rx The radius to be used for the x-axis of the arc.
  2488. * @param {Number} ry The radius to be used for the y-axis of the arc.
  2489. * @param {Number} xAr Defines the orientation of the arc
  2490. * @param {Number} lAf Large arc flag
  2491. * @param {Number} sf Sweep flag
  2492. * @param {Number} x The x coordinate for the target point of the curve element.
  2493. * @param {Number} y The y coordinate for the target point of the curve element.
  2494. * @param {Boolean} [relative] If set to true the curve element will be created with relative coordinates (lowercase letter)
  2495. * @param {*} [data] Any data that should be stored with the element object that will be accessible in pathElement
  2496. * @return {Chartist.Svg.Path} The current path object for easy call chaining.
  2497. */
  2498. function arc(rx, ry, xAr, lAf, sf, x, y, relative, data) {
  2499. element('A', {
  2500. rx: +rx,
  2501. ry: +ry,
  2502. xAr: +xAr,
  2503. lAf: +lAf,
  2504. sf: +sf,
  2505. x: +x,
  2506. y: +y
  2507. }, this.pathElements, this.pos++, relative, data);
  2508. return this;
  2509. }
  2510. /**
  2511. * Parses an SVG path seen in the d attribute of path elements, and inserts the parsed elements into the existing path object at the current cursor position. Any closing path indicators (Z at the end of the path) will be ignored by the parser as this is provided by the close option in the options of the path object.
  2512. *
  2513. * @memberof Chartist.Svg.Path
  2514. * @param {String} path Any SVG path that contains move (m), line (l) or curve (c) components.
  2515. * @return {Chartist.Svg.Path} The current path object for easy call chaining.
  2516. */
  2517. function parse(path) {
  2518. // Parsing the SVG path string into an array of arrays [['M', '10', '10'], ['L', '100', '100']]
  2519. var chunks = path.replace(/([A-Za-z])([0-9])/g, '$1 $2')
  2520. .replace(/([0-9])([A-Za-z])/g, '$1 $2')
  2521. .split(/[\s,]+/)
  2522. .reduce(function(result, element) {
  2523. if(element.match(/[A-Za-z]/)) {
  2524. result.push([]);
  2525. }
  2526. result[result.length - 1].push(element);
  2527. return result;
  2528. }, []);
  2529. // If this is a closed path we remove the Z at the end because this is determined by the close option
  2530. if(chunks[chunks.length - 1][0].toUpperCase() === 'Z') {
  2531. chunks.pop();
  2532. }
  2533. // Using svgPathElementDescriptions to map raw path arrays into objects that contain the command and the parameters
  2534. // For example {command: 'M', x: '10', y: '10'}
  2535. var elements = chunks.map(function(chunk) {
  2536. var command = chunk.shift(),
  2537. description = elementDescriptions[command.toLowerCase()];
  2538. return Chartist.extend({
  2539. command: command
  2540. }, description.reduce(function(result, paramName, index) {
  2541. result[paramName] = +chunk[index];
  2542. return result;
  2543. }, {}));
  2544. });
  2545. // Preparing a splice call with the elements array as var arg params and insert the parsed elements at the current position
  2546. var spliceArgs = [this.pos, 0];
  2547. Array.prototype.push.apply(spliceArgs, elements);
  2548. Array.prototype.splice.apply(this.pathElements, spliceArgs);
  2549. // Increase the internal position by the element count
  2550. this.pos += elements.length;
  2551. return this;
  2552. }
  2553. /**
  2554. * This function renders to current SVG path object into a final SVG string that can be used in the d attribute of SVG path elements. It uses the accuracy option to round big decimals. If the close parameter was set in the constructor of this path object then a path closing Z will be appended to the output string.
  2555. *
  2556. * @memberof Chartist.Svg.Path
  2557. * @return {String}
  2558. */
  2559. function stringify() {
  2560. var accuracyMultiplier = Math.pow(10, this.options.accuracy);
  2561. return this.pathElements.reduce(function(path, pathElement) {
  2562. var params = elementDescriptions[pathElement.command.toLowerCase()].map(function(paramName) {
  2563. return this.options.accuracy ?
  2564. (Math.round(pathElement[paramName] * accuracyMultiplier) / accuracyMultiplier) :
  2565. pathElement[paramName];
  2566. }.bind(this));
  2567. return path + pathElement.command + params.join(',');
  2568. }.bind(this), '') + (this.close ? 'Z' : '');
  2569. }
  2570. /**
  2571. * Scales all elements in the current SVG path object. There is an individual parameter for each coordinate. Scaling will also be done for control points of curves, affecting the given coordinate.
  2572. *
  2573. * @memberof Chartist.Svg.Path
  2574. * @param {Number} x The number which will be used to scale the x, x1 and x2 of all path elements.
  2575. * @param {Number} y The number which will be used to scale the y, y1 and y2 of all path elements.
  2576. * @return {Chartist.Svg.Path} The current path object for easy call chaining.
  2577. */
  2578. function scale(x, y) {
  2579. forEachParam(this.pathElements, function(pathElement, paramName) {
  2580. pathElement[paramName] *= paramName[0] === 'x' ? x : y;
  2581. });
  2582. return this;
  2583. }
  2584. /**
  2585. * Translates all elements in the current SVG path object. The translation is relative and there is an individual parameter for each coordinate. Translation will also be done for control points of curves, affecting the given coordinate.
  2586. *
  2587. * @memberof Chartist.Svg.Path
  2588. * @param {Number} x The number which will be used to translate the x, x1 and x2 of all path elements.
  2589. * @param {Number} y The number which will be used to translate the y, y1 and y2 of all path elements.
  2590. * @return {Chartist.Svg.Path} The current path object for easy call chaining.
  2591. */
  2592. function translate(x, y) {
  2593. forEachParam(this.pathElements, function(pathElement, paramName) {
  2594. pathElement[paramName] += paramName[0] === 'x' ? x : y;
  2595. });
  2596. return this;
  2597. }
  2598. /**
  2599. * This function will run over all existing path elements and then loop over their attributes. The callback function will be called for every path element attribute that exists in the current path.
  2600. * The method signature of the callback function looks like this:
  2601. * ```javascript
  2602. * function(pathElement, paramName, pathElementIndex, paramIndex, pathElements)
  2603. * ```
  2604. * If something else than undefined is returned by the callback function, this value will be used to replace the old value. This allows you to build custom transformations of path objects that can't be achieved using the basic transformation functions scale and translate.
  2605. *
  2606. * @memberof Chartist.Svg.Path
  2607. * @param {Function} transformFnc The callback function for the transformation. Check the signature in the function description.
  2608. * @return {Chartist.Svg.Path} The current path object for easy call chaining.
  2609. */
  2610. function transform(transformFnc) {
  2611. forEachParam(this.pathElements, function(pathElement, paramName, pathElementIndex, paramIndex, pathElements) {
  2612. var transformed = transformFnc(pathElement, paramName, pathElementIndex, paramIndex, pathElements);
  2613. if(transformed || transformed === 0) {
  2614. pathElement[paramName] = transformed;
  2615. }
  2616. });
  2617. return this;
  2618. }
  2619. /**
  2620. * This function clones a whole path object with all its properties. This is a deep clone and path element objects will also be cloned.
  2621. *
  2622. * @memberof Chartist.Svg.Path
  2623. * @param {Boolean} [close] Optional option to set the new cloned path to closed. If not specified or false, the original path close option will be used.
  2624. * @return {Chartist.Svg.Path}
  2625. */
  2626. function clone(close) {
  2627. var c = new Chartist.Svg.Path(close || this.close);
  2628. c.pos = this.pos;
  2629. c.pathElements = this.pathElements.slice().map(function cloneElements(pathElement) {
  2630. return Chartist.extend({}, pathElement);
  2631. });
  2632. c.options = Chartist.extend({}, this.options);
  2633. return c;
  2634. }
  2635. /**
  2636. * Split a Svg.Path object by a specific command in the path chain. The path chain will be split and an array of newly created paths objects will be returned. This is useful if you'd like to split an SVG path by it's move commands, for example, in order to isolate chunks of drawings.
  2637. *
  2638. * @memberof Chartist.Svg.Path
  2639. * @param {String} command The command you'd like to use to split the path
  2640. * @return {Array<Chartist.Svg.Path>}
  2641. */
  2642. function splitByCommand(command) {
  2643. var split = [
  2644. new Chartist.Svg.Path()
  2645. ];
  2646. this.pathElements.forEach(function(pathElement) {
  2647. if(pathElement.command === command.toUpperCase() && split[split.length - 1].pathElements.length !== 0) {
  2648. split.push(new Chartist.Svg.Path());
  2649. }
  2650. split[split.length - 1].pathElements.push(pathElement);
  2651. });
  2652. return split;
  2653. }
  2654. /**
  2655. * This static function on `Chartist.Svg.Path` is joining multiple paths together into one paths.
  2656. *
  2657. * @memberof Chartist.Svg.Path
  2658. * @param {Array<Chartist.Svg.Path>} paths A list of paths to be joined together. The order is important.
  2659. * @param {boolean} close If the newly created path should be a closed path
  2660. * @param {Object} options Path options for the newly created path.
  2661. * @return {Chartist.Svg.Path}
  2662. */
  2663. function join(paths, close, options) {
  2664. var joinedPath = new Chartist.Svg.Path(close, options);
  2665. for(var i = 0; i < paths.length; i++) {
  2666. var path = paths[i];
  2667. for(var j = 0; j < path.pathElements.length; j++) {
  2668. joinedPath.pathElements.push(path.pathElements[j]);
  2669. }
  2670. }
  2671. return joinedPath;
  2672. }
  2673. Chartist.Svg.Path = Chartist.Class.extend({
  2674. constructor: SvgPath,
  2675. position: position,
  2676. remove: remove,
  2677. move: move,
  2678. line: line,
  2679. curve: curve,
  2680. arc: arc,
  2681. scale: scale,
  2682. translate: translate,
  2683. transform: transform,
  2684. parse: parse,
  2685. stringify: stringify,
  2686. clone: clone,
  2687. splitByCommand: splitByCommand
  2688. });
  2689. Chartist.Svg.Path.elementDescriptions = elementDescriptions;
  2690. Chartist.Svg.Path.join = join;
  2691. }(this || __webpack_require__.g, Chartist));
  2692. ;/* global Chartist */
  2693. (function (globalRoot, Chartist) {
  2694. 'use strict';
  2695. var window = globalRoot.window;
  2696. var document = globalRoot.document;
  2697. var axisUnits = {
  2698. x: {
  2699. pos: 'x',
  2700. len: 'width',
  2701. dir: 'horizontal',
  2702. rectStart: 'x1',
  2703. rectEnd: 'x2',
  2704. rectOffset: 'y2'
  2705. },
  2706. y: {
  2707. pos: 'y',
  2708. len: 'height',
  2709. dir: 'vertical',
  2710. rectStart: 'y2',
  2711. rectEnd: 'y1',
  2712. rectOffset: 'x1'
  2713. }
  2714. };
  2715. function Axis(units, chartRect, ticks, options) {
  2716. this.units = units;
  2717. this.counterUnits = units === axisUnits.x ? axisUnits.y : axisUnits.x;
  2718. this.chartRect = chartRect;
  2719. this.axisLength = chartRect[units.rectEnd] - chartRect[units.rectStart];
  2720. this.gridOffset = chartRect[units.rectOffset];
  2721. this.ticks = ticks;
  2722. this.options = options;
  2723. }
  2724. function createGridAndLabels(gridGroup, labelGroup, useForeignObject, chartOptions, eventEmitter) {
  2725. var axisOptions = chartOptions['axis' + this.units.pos.toUpperCase()];
  2726. var projectedValues = this.ticks.map(this.projectValue.bind(this));
  2727. var labelValues = this.ticks.map(axisOptions.labelInterpolationFnc);
  2728. projectedValues.forEach(function(projectedValue, index) {
  2729. var labelOffset = {
  2730. x: 0,
  2731. y: 0
  2732. };
  2733. // TODO: Find better solution for solving this problem
  2734. // Calculate how much space we have available for the label
  2735. var labelLength;
  2736. if(projectedValues[index + 1]) {
  2737. // If we still have one label ahead, we can calculate the distance to the next tick / label
  2738. labelLength = projectedValues[index + 1] - projectedValue;
  2739. } else {
  2740. // If we don't have a label ahead and we have only two labels in total, we just take the remaining distance to
  2741. // on the whole axis length. We limit that to a minimum of 30 pixel, so that labels close to the border will
  2742. // still be visible inside of the chart padding.
  2743. labelLength = Math.max(this.axisLength - projectedValue, 30);
  2744. }
  2745. // Skip grid lines and labels where interpolated label values are falsey (execpt for 0)
  2746. if(Chartist.isFalseyButZero(labelValues[index]) && labelValues[index] !== '') {
  2747. return;
  2748. }
  2749. // Transform to global coordinates using the chartRect
  2750. // We also need to set the label offset for the createLabel function
  2751. if(this.units.pos === 'x') {
  2752. projectedValue = this.chartRect.x1 + projectedValue;
  2753. labelOffset.x = chartOptions.axisX.labelOffset.x;
  2754. // If the labels should be positioned in start position (top side for vertical axis) we need to set a
  2755. // different offset as for positioned with end (bottom)
  2756. if(chartOptions.axisX.position === 'start') {
  2757. labelOffset.y = this.chartRect.padding.top + chartOptions.axisX.labelOffset.y + (useForeignObject ? 5 : 20);
  2758. } else {
  2759. labelOffset.y = this.chartRect.y1 + chartOptions.axisX.labelOffset.y + (useForeignObject ? 5 : 20);
  2760. }
  2761. } else {
  2762. projectedValue = this.chartRect.y1 - projectedValue;
  2763. labelOffset.y = chartOptions.axisY.labelOffset.y - (useForeignObject ? labelLength : 0);
  2764. // If the labels should be positioned in start position (left side for horizontal axis) we need to set a
  2765. // different offset as for positioned with end (right side)
  2766. if(chartOptions.axisY.position === 'start') {
  2767. labelOffset.x = useForeignObject ? this.chartRect.padding.left + chartOptions.axisY.labelOffset.x : this.chartRect.x1 - 10;
  2768. } else {
  2769. labelOffset.x = this.chartRect.x2 + chartOptions.axisY.labelOffset.x + 10;
  2770. }
  2771. }
  2772. if(axisOptions.showGrid) {
  2773. Chartist.createGrid(projectedValue, index, this, this.gridOffset, this.chartRect[this.counterUnits.len](), gridGroup, [
  2774. chartOptions.classNames.grid,
  2775. chartOptions.classNames[this.units.dir]
  2776. ], eventEmitter);
  2777. }
  2778. if(axisOptions.showLabel) {
  2779. Chartist.createLabel(projectedValue, labelLength, index, labelValues, this, axisOptions.offset, labelOffset, labelGroup, [
  2780. chartOptions.classNames.label,
  2781. chartOptions.classNames[this.units.dir],
  2782. (axisOptions.position === 'start' ? chartOptions.classNames[axisOptions.position] : chartOptions.classNames['end'])
  2783. ], useForeignObject, eventEmitter);
  2784. }
  2785. }.bind(this));
  2786. }
  2787. Chartist.Axis = Chartist.Class.extend({
  2788. constructor: Axis,
  2789. createGridAndLabels: createGridAndLabels,
  2790. projectValue: function(value, index, data) {
  2791. throw new Error('Base axis can\'t be instantiated!');
  2792. }
  2793. });
  2794. Chartist.Axis.units = axisUnits;
  2795. }(this || __webpack_require__.g, Chartist));
  2796. ;/**
  2797. * The auto scale axis uses standard linear scale projection of values along an axis. It uses order of magnitude to find a scale automatically and evaluates the available space in order to find the perfect amount of ticks for your chart.
  2798. * **Options**
  2799. * The following options are used by this axis in addition to the default axis options outlined in the axis configuration of the chart default settings.
  2800. * ```javascript
  2801. * var options = {
  2802. * // If high is specified then the axis will display values explicitly up to this value and the computed maximum from the data is ignored
  2803. * high: 100,
  2804. * // If low is specified then the axis will display values explicitly down to this value and the computed minimum from the data is ignored
  2805. * low: 0,
  2806. * // This option will be used when finding the right scale division settings. The amount of ticks on the scale will be determined so that as many ticks as possible will be displayed, while not violating this minimum required space (in pixel).
  2807. * scaleMinSpace: 20,
  2808. * // Can be set to true or false. If set to true, the scale will be generated with whole numbers only.
  2809. * onlyInteger: true,
  2810. * // The reference value can be used to make sure that this value will always be on the chart. This is especially useful on bipolar charts where the bipolar center always needs to be part of the chart.
  2811. * referenceValue: 5
  2812. * };
  2813. * ```
  2814. *
  2815. * @module Chartist.AutoScaleAxis
  2816. */
  2817. /* global Chartist */
  2818. (function (globalRoot, Chartist) {
  2819. 'use strict';
  2820. var window = globalRoot.window;
  2821. var document = globalRoot.document;
  2822. function AutoScaleAxis(axisUnit, data, chartRect, options) {
  2823. // Usually we calculate highLow based on the data but this can be overriden by a highLow object in the options
  2824. var highLow = options.highLow || Chartist.getHighLow(data, options, axisUnit.pos);
  2825. this.bounds = Chartist.getBounds(chartRect[axisUnit.rectEnd] - chartRect[axisUnit.rectStart], highLow, options.scaleMinSpace || 20, options.onlyInteger);
  2826. this.range = {
  2827. min: this.bounds.min,
  2828. max: this.bounds.max
  2829. };
  2830. Chartist.AutoScaleAxis.super.constructor.call(this,
  2831. axisUnit,
  2832. chartRect,
  2833. this.bounds.values,
  2834. options);
  2835. }
  2836. function projectValue(value) {
  2837. return this.axisLength * (+Chartist.getMultiValue(value, this.units.pos) - this.bounds.min) / this.bounds.range;
  2838. }
  2839. Chartist.AutoScaleAxis = Chartist.Axis.extend({
  2840. constructor: AutoScaleAxis,
  2841. projectValue: projectValue
  2842. });
  2843. }(this || __webpack_require__.g, Chartist));
  2844. ;/**
  2845. * The fixed scale axis uses standard linear projection of values along an axis. It makes use of a divisor option to divide the range provided from the minimum and maximum value or the options high and low that will override the computed minimum and maximum.
  2846. * **Options**
  2847. * The following options are used by this axis in addition to the default axis options outlined in the axis configuration of the chart default settings.
  2848. * ```javascript
  2849. * var options = {
  2850. * // If high is specified then the axis will display values explicitly up to this value and the computed maximum from the data is ignored
  2851. * high: 100,
  2852. * // If low is specified then the axis will display values explicitly down to this value and the computed minimum from the data is ignored
  2853. * low: 0,
  2854. * // If specified then the value range determined from minimum to maximum (or low and high) will be divided by this number and ticks will be generated at those division points. The default divisor is 1.
  2855. * divisor: 4,
  2856. * // If ticks is explicitly set, then the axis will not compute the ticks with the divisor, but directly use the data in ticks to determine at what points on the axis a tick need to be generated.
  2857. * ticks: [1, 10, 20, 30]
  2858. * };
  2859. * ```
  2860. *
  2861. * @module Chartist.FixedScaleAxis
  2862. */
  2863. /* global Chartist */
  2864. (function (globalRoot, Chartist) {
  2865. 'use strict';
  2866. var window = globalRoot.window;
  2867. var document = globalRoot.document;
  2868. function FixedScaleAxis(axisUnit, data, chartRect, options) {
  2869. var highLow = options.highLow || Chartist.getHighLow(data, options, axisUnit.pos);
  2870. this.divisor = options.divisor || 1;
  2871. this.ticks = options.ticks || Chartist.times(this.divisor).map(function(value, index) {
  2872. return highLow.low + (highLow.high - highLow.low) / this.divisor * index;
  2873. }.bind(this));
  2874. this.ticks.sort(function(a, b) {
  2875. return a - b;
  2876. });
  2877. this.range = {
  2878. min: highLow.low,
  2879. max: highLow.high
  2880. };
  2881. Chartist.FixedScaleAxis.super.constructor.call(this,
  2882. axisUnit,
  2883. chartRect,
  2884. this.ticks,
  2885. options);
  2886. this.stepLength = this.axisLength / this.divisor;
  2887. }
  2888. function projectValue(value) {
  2889. return this.axisLength * (+Chartist.getMultiValue(value, this.units.pos) - this.range.min) / (this.range.max - this.range.min);
  2890. }
  2891. Chartist.FixedScaleAxis = Chartist.Axis.extend({
  2892. constructor: FixedScaleAxis,
  2893. projectValue: projectValue
  2894. });
  2895. }(this || __webpack_require__.g, Chartist));
  2896. ;/**
  2897. * The step axis for step based charts like bar chart or step based line charts. It uses a fixed amount of ticks that will be equally distributed across the whole axis length. The projection is done using the index of the data value rather than the value itself and therefore it's only useful for distribution purpose.
  2898. * **Options**
  2899. * The following options are used by this axis in addition to the default axis options outlined in the axis configuration of the chart default settings.
  2900. * ```javascript
  2901. * var options = {
  2902. * // Ticks to be used to distribute across the axis length. As this axis type relies on the index of the value rather than the value, arbitrary data that can be converted to a string can be used as ticks.
  2903. * ticks: ['One', 'Two', 'Three'],
  2904. * // If set to true the full width will be used to distribute the values where the last value will be at the maximum of the axis length. If false the spaces between the ticks will be evenly distributed instead.
  2905. * stretch: true
  2906. * };
  2907. * ```
  2908. *
  2909. * @module Chartist.StepAxis
  2910. */
  2911. /* global Chartist */
  2912. (function (globalRoot, Chartist) {
  2913. 'use strict';
  2914. var window = globalRoot.window;
  2915. var document = globalRoot.document;
  2916. function StepAxis(axisUnit, data, chartRect, options) {
  2917. Chartist.StepAxis.super.constructor.call(this,
  2918. axisUnit,
  2919. chartRect,
  2920. options.ticks,
  2921. options);
  2922. var calc = Math.max(1, options.ticks.length - (options.stretch ? 1 : 0));
  2923. this.stepLength = this.axisLength / calc;
  2924. }
  2925. function projectValue(value, index) {
  2926. return this.stepLength * index;
  2927. }
  2928. Chartist.StepAxis = Chartist.Axis.extend({
  2929. constructor: StepAxis,
  2930. projectValue: projectValue
  2931. });
  2932. }(this || __webpack_require__.g, Chartist));
  2933. ;/**
  2934. * The Chartist line chart can be used to draw Line or Scatter charts. If used in the browser you can access the global `Chartist` namespace where you find the `Line` function as a main entry point.
  2935. *
  2936. * For examples on how to use the line chart please check the examples of the `Chartist.Line` method.
  2937. *
  2938. * @module Chartist.Line
  2939. */
  2940. /* global Chartist */
  2941. (function(globalRoot, Chartist){
  2942. 'use strict';
  2943. var window = globalRoot.window;
  2944. var document = globalRoot.document;
  2945. /**
  2946. * Default options in line charts. Expand the code view to see a detailed list of options with comments.
  2947. *
  2948. * @memberof Chartist.Line
  2949. */
  2950. var defaultOptions = {
  2951. // Options for X-Axis
  2952. axisX: {
  2953. // The offset of the labels to the chart area
  2954. offset: 30,
  2955. // Position where labels are placed. Can be set to `start` or `end` where `start` is equivalent to left or top on vertical axis and `end` is equivalent to right or bottom on horizontal axis.
  2956. position: 'end',
  2957. // Allows you to correct label positioning on this axis by positive or negative x and y offset.
  2958. labelOffset: {
  2959. x: 0,
  2960. y: 0
  2961. },
  2962. // If labels should be shown or not
  2963. showLabel: true,
  2964. // If the axis grid should be drawn or not
  2965. showGrid: true,
  2966. // Interpolation function that allows you to intercept the value from the axis label
  2967. labelInterpolationFnc: Chartist.noop,
  2968. // Set the axis type to be used to project values on this axis. If not defined, Chartist.StepAxis will be used for the X-Axis, where the ticks option will be set to the labels in the data and the stretch option will be set to the global fullWidth option. This type can be changed to any axis constructor available (e.g. Chartist.FixedScaleAxis), where all axis options should be present here.
  2969. type: undefined
  2970. },
  2971. // Options for Y-Axis
  2972. axisY: {
  2973. // The offset of the labels to the chart area
  2974. offset: 40,
  2975. // Position where labels are placed. Can be set to `start` or `end` where `start` is equivalent to left or top on vertical axis and `end` is equivalent to right or bottom on horizontal axis.
  2976. position: 'start',
  2977. // Allows you to correct label positioning on this axis by positive or negative x and y offset.
  2978. labelOffset: {
  2979. x: 0,
  2980. y: 0
  2981. },
  2982. // If labels should be shown or not
  2983. showLabel: true,
  2984. // If the axis grid should be drawn or not
  2985. showGrid: true,
  2986. // Interpolation function that allows you to intercept the value from the axis label
  2987. labelInterpolationFnc: Chartist.noop,
  2988. // Set the axis type to be used to project values on this axis. If not defined, Chartist.AutoScaleAxis will be used for the Y-Axis, where the high and low options will be set to the global high and low options. This type can be changed to any axis constructor available (e.g. Chartist.FixedScaleAxis), where all axis options should be present here.
  2989. type: undefined,
  2990. // This value specifies the minimum height in pixel of the scale steps
  2991. scaleMinSpace: 20,
  2992. // Use only integer values (whole numbers) for the scale steps
  2993. onlyInteger: false
  2994. },
  2995. // Specify a fixed width for the chart as a string (i.e. '100px' or '50%')
  2996. width: undefined,
  2997. // Specify a fixed height for the chart as a string (i.e. '100px' or '50%')
  2998. height: undefined,
  2999. // If the line should be drawn or not
  3000. showLine: true,
  3001. // If dots should be drawn or not
  3002. showPoint: true,
  3003. // If the line chart should draw an area
  3004. showArea: false,
  3005. // The base for the area chart that will be used to close the area shape (is normally 0)
  3006. areaBase: 0,
  3007. // Specify if the lines should be smoothed. This value can be true or false where true will result in smoothing using the default smoothing interpolation function Chartist.Interpolation.cardinal and false results in Chartist.Interpolation.none. You can also choose other smoothing / interpolation functions available in the Chartist.Interpolation module, or write your own interpolation function. Check the examples for a brief description.
  3008. lineSmooth: true,
  3009. // If the line chart should add a background fill to the .ct-grids group.
  3010. showGridBackground: false,
  3011. // Overriding the natural low of the chart allows you to zoom in or limit the charts lowest displayed value
  3012. low: undefined,
  3013. // Overriding the natural high of the chart allows you to zoom in or limit the charts highest displayed value
  3014. high: undefined,
  3015. // Padding of the chart drawing area to the container element and labels as a number or padding object {top: 5, right: 5, bottom: 5, left: 5}
  3016. chartPadding: {
  3017. top: 15,
  3018. right: 15,
  3019. bottom: 5,
  3020. left: 10
  3021. },
  3022. // When set to true, the last grid line on the x-axis is not drawn and the chart elements will expand to the full available width of the chart. For the last label to be drawn correctly you might need to add chart padding or offset the last label with a draw event handler.
  3023. fullWidth: false,
  3024. // If true the whole data is reversed including labels, the series order as well as the whole series data arrays.
  3025. reverseData: false,
  3026. // Override the class names that get used to generate the SVG structure of the chart
  3027. classNames: {
  3028. chart: 'ct-chart-line',
  3029. label: 'ct-label',
  3030. labelGroup: 'ct-labels',
  3031. series: 'ct-series',
  3032. line: 'ct-line',
  3033. point: 'ct-point',
  3034. area: 'ct-area',
  3035. grid: 'ct-grid',
  3036. gridGroup: 'ct-grids',
  3037. gridBackground: 'ct-grid-background',
  3038. vertical: 'ct-vertical',
  3039. horizontal: 'ct-horizontal',
  3040. start: 'ct-start',
  3041. end: 'ct-end'
  3042. }
  3043. };
  3044. /**
  3045. * Creates a new chart
  3046. *
  3047. */
  3048. function createChart(options) {
  3049. var data = Chartist.normalizeData(this.data, options.reverseData, true);
  3050. // Create new svg object
  3051. this.svg = Chartist.createSvg(this.container, options.width, options.height, options.classNames.chart);
  3052. // Create groups for labels, grid and series
  3053. var gridGroup = this.svg.elem('g').addClass(options.classNames.gridGroup);
  3054. var seriesGroup = this.svg.elem('g');
  3055. var labelGroup = this.svg.elem('g').addClass(options.classNames.labelGroup);
  3056. var chartRect = Chartist.createChartRect(this.svg, options, defaultOptions.padding);
  3057. var axisX, axisY;
  3058. if(options.axisX.type === undefined) {
  3059. axisX = new Chartist.StepAxis(Chartist.Axis.units.x, data.normalized.series, chartRect, Chartist.extend({}, options.axisX, {
  3060. ticks: data.normalized.labels,
  3061. stretch: options.fullWidth
  3062. }));
  3063. } else {
  3064. axisX = options.axisX.type.call(Chartist, Chartist.Axis.units.x, data.normalized.series, chartRect, options.axisX);
  3065. }
  3066. if(options.axisY.type === undefined) {
  3067. axisY = new Chartist.AutoScaleAxis(Chartist.Axis.units.y, data.normalized.series, chartRect, Chartist.extend({}, options.axisY, {
  3068. high: Chartist.isNumeric(options.high) ? options.high : options.axisY.high,
  3069. low: Chartist.isNumeric(options.low) ? options.low : options.axisY.low
  3070. }));
  3071. } else {
  3072. axisY = options.axisY.type.call(Chartist, Chartist.Axis.units.y, data.normalized.series, chartRect, options.axisY);
  3073. }
  3074. axisX.createGridAndLabels(gridGroup, labelGroup, this.supportsForeignObject, options, this.eventEmitter);
  3075. axisY.createGridAndLabels(gridGroup, labelGroup, this.supportsForeignObject, options, this.eventEmitter);
  3076. if (options.showGridBackground) {
  3077. Chartist.createGridBackground(gridGroup, chartRect, options.classNames.gridBackground, this.eventEmitter);
  3078. }
  3079. // Draw the series
  3080. data.raw.series.forEach(function(series, seriesIndex) {
  3081. var seriesElement = seriesGroup.elem('g');
  3082. // Write attributes to series group element. If series name or meta is undefined the attributes will not be written
  3083. seriesElement.attr({
  3084. 'ct:series-name': series.name,
  3085. 'ct:meta': Chartist.serialize(series.meta)
  3086. });
  3087. // Use series class from series data or if not set generate one
  3088. seriesElement.addClass([
  3089. options.classNames.series,
  3090. (series.className || options.classNames.series + '-' + Chartist.alphaNumerate(seriesIndex))
  3091. ].join(' '));
  3092. var pathCoordinates = [],
  3093. pathData = [];
  3094. data.normalized.series[seriesIndex].forEach(function(value, valueIndex) {
  3095. var p = {
  3096. x: chartRect.x1 + axisX.projectValue(value, valueIndex, data.normalized.series[seriesIndex]),
  3097. y: chartRect.y1 - axisY.projectValue(value, valueIndex, data.normalized.series[seriesIndex])
  3098. };
  3099. pathCoordinates.push(p.x, p.y);
  3100. pathData.push({
  3101. value: value,
  3102. valueIndex: valueIndex,
  3103. meta: Chartist.getMetaData(series, valueIndex)
  3104. });
  3105. }.bind(this));
  3106. var seriesOptions = {
  3107. lineSmooth: Chartist.getSeriesOption(series, options, 'lineSmooth'),
  3108. showPoint: Chartist.getSeriesOption(series, options, 'showPoint'),
  3109. showLine: Chartist.getSeriesOption(series, options, 'showLine'),
  3110. showArea: Chartist.getSeriesOption(series, options, 'showArea'),
  3111. areaBase: Chartist.getSeriesOption(series, options, 'areaBase')
  3112. };
  3113. var smoothing = typeof seriesOptions.lineSmooth === 'function' ?
  3114. seriesOptions.lineSmooth : (seriesOptions.lineSmooth ? Chartist.Interpolation.monotoneCubic() : Chartist.Interpolation.none());
  3115. // Interpolating path where pathData will be used to annotate each path element so we can trace back the original
  3116. // index, value and meta data
  3117. var path = smoothing(pathCoordinates, pathData);
  3118. // If we should show points we need to create them now to avoid secondary loop
  3119. // Points are drawn from the pathElements returned by the interpolation function
  3120. // Small offset for Firefox to render squares correctly
  3121. if (seriesOptions.showPoint) {
  3122. path.pathElements.forEach(function(pathElement) {
  3123. var point = seriesElement.elem('line', {
  3124. x1: pathElement.x,
  3125. y1: pathElement.y,
  3126. x2: pathElement.x + 0.01,
  3127. y2: pathElement.y
  3128. }, options.classNames.point).attr({
  3129. 'ct:value': [pathElement.data.value.x, pathElement.data.value.y].filter(Chartist.isNumeric).join(','),
  3130. 'ct:meta': Chartist.serialize(pathElement.data.meta)
  3131. });
  3132. this.eventEmitter.emit('draw', {
  3133. type: 'point',
  3134. value: pathElement.data.value,
  3135. index: pathElement.data.valueIndex,
  3136. meta: pathElement.data.meta,
  3137. series: series,
  3138. seriesIndex: seriesIndex,
  3139. axisX: axisX,
  3140. axisY: axisY,
  3141. group: seriesElement,
  3142. element: point,
  3143. x: pathElement.x,
  3144. y: pathElement.y
  3145. });
  3146. }.bind(this));
  3147. }
  3148. if(seriesOptions.showLine) {
  3149. var line = seriesElement.elem('path', {
  3150. d: path.stringify()
  3151. }, options.classNames.line, true);
  3152. this.eventEmitter.emit('draw', {
  3153. type: 'line',
  3154. values: data.normalized.series[seriesIndex],
  3155. path: path.clone(),
  3156. chartRect: chartRect,
  3157. index: seriesIndex,
  3158. series: series,
  3159. seriesIndex: seriesIndex,
  3160. seriesMeta: series.meta,
  3161. axisX: axisX,
  3162. axisY: axisY,
  3163. group: seriesElement,
  3164. element: line
  3165. });
  3166. }
  3167. // Area currently only works with axes that support a range!
  3168. if(seriesOptions.showArea && axisY.range) {
  3169. // If areaBase is outside the chart area (< min or > max) we need to set it respectively so that
  3170. // the area is not drawn outside the chart area.
  3171. var areaBase = Math.max(Math.min(seriesOptions.areaBase, axisY.range.max), axisY.range.min);
  3172. // We project the areaBase value into screen coordinates
  3173. var areaBaseProjected = chartRect.y1 - axisY.projectValue(areaBase);
  3174. // In order to form the area we'll first split the path by move commands so we can chunk it up into segments
  3175. path.splitByCommand('M').filter(function onlySolidSegments(pathSegment) {
  3176. // We filter only "solid" segments that contain more than one point. Otherwise there's no need for an area
  3177. return pathSegment.pathElements.length > 1;
  3178. }).map(function convertToArea(solidPathSegments) {
  3179. // Receiving the filtered solid path segments we can now convert those segments into fill areas
  3180. var firstElement = solidPathSegments.pathElements[0];
  3181. var lastElement = solidPathSegments.pathElements[solidPathSegments.pathElements.length - 1];
  3182. // Cloning the solid path segment with closing option and removing the first move command from the clone
  3183. // We then insert a new move that should start at the area base and draw a straight line up or down
  3184. // at the end of the path we add an additional straight line to the projected area base value
  3185. // As the closing option is set our path will be automatically closed
  3186. return solidPathSegments.clone(true)
  3187. .position(0)
  3188. .remove(1)
  3189. .move(firstElement.x, areaBaseProjected)
  3190. .line(firstElement.x, firstElement.y)
  3191. .position(solidPathSegments.pathElements.length + 1)
  3192. .line(lastElement.x, areaBaseProjected);
  3193. }).forEach(function createArea(areaPath) {
  3194. // For each of our newly created area paths, we'll now create path elements by stringifying our path objects
  3195. // and adding the created DOM elements to the correct series group
  3196. var area = seriesElement.elem('path', {
  3197. d: areaPath.stringify()
  3198. }, options.classNames.area, true);
  3199. // Emit an event for each area that was drawn
  3200. this.eventEmitter.emit('draw', {
  3201. type: 'area',
  3202. values: data.normalized.series[seriesIndex],
  3203. path: areaPath.clone(),
  3204. series: series,
  3205. seriesIndex: seriesIndex,
  3206. axisX: axisX,
  3207. axisY: axisY,
  3208. chartRect: chartRect,
  3209. index: seriesIndex,
  3210. group: seriesElement,
  3211. element: area
  3212. });
  3213. }.bind(this));
  3214. }
  3215. }.bind(this));
  3216. this.eventEmitter.emit('created', {
  3217. bounds: axisY.bounds,
  3218. chartRect: chartRect,
  3219. axisX: axisX,
  3220. axisY: axisY,
  3221. svg: this.svg,
  3222. options: options
  3223. });
  3224. }
  3225. /**
  3226. * This method creates a new line chart.
  3227. *
  3228. * @memberof Chartist.Line
  3229. * @param {String|Node} query A selector query string or directly a DOM element
  3230. * @param {Object} data The data object that needs to consist of a labels and a series array
  3231. * @param {Object} [options] The options object with options that override the default options. Check the examples for a detailed list.
  3232. * @param {Array} [responsiveOptions] Specify an array of responsive option arrays which are a media query and options object pair => [[mediaQueryString, optionsObject],[more...]]
  3233. * @return {Object} An object which exposes the API for the created chart
  3234. *
  3235. * @example
  3236. * // Create a simple line chart
  3237. * var data = {
  3238. * // A labels array that can contain any sort of values
  3239. * labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],
  3240. * // Our series array that contains series objects or in this case series data arrays
  3241. * series: [
  3242. * [5, 2, 4, 2, 0]
  3243. * ]
  3244. * };
  3245. *
  3246. * // As options we currently only set a static size of 300x200 px
  3247. * var options = {
  3248. * width: '300px',
  3249. * height: '200px'
  3250. * };
  3251. *
  3252. * // In the global name space Chartist we call the Line function to initialize a line chart. As a first parameter we pass in a selector where we would like to get our chart created. Second parameter is the actual data object and as a third parameter we pass in our options
  3253. * new Chartist.Line('.ct-chart', data, options);
  3254. *
  3255. * @example
  3256. * // Use specific interpolation function with configuration from the Chartist.Interpolation module
  3257. *
  3258. * var chart = new Chartist.Line('.ct-chart', {
  3259. * labels: [1, 2, 3, 4, 5],
  3260. * series: [
  3261. * [1, 1, 8, 1, 7]
  3262. * ]
  3263. * }, {
  3264. * lineSmooth: Chartist.Interpolation.cardinal({
  3265. * tension: 0.2
  3266. * })
  3267. * });
  3268. *
  3269. * @example
  3270. * // Create a line chart with responsive options
  3271. *
  3272. * var data = {
  3273. * // A labels array that can contain any sort of values
  3274. * labels: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'],
  3275. * // Our series array that contains series objects or in this case series data arrays
  3276. * series: [
  3277. * [5, 2, 4, 2, 0]
  3278. * ]
  3279. * };
  3280. *
  3281. * // In addition to the regular options we specify responsive option overrides that will override the default configutation based on the matching media queries.
  3282. * var responsiveOptions = [
  3283. * ['screen and (min-width: 641px) and (max-width: 1024px)', {
  3284. * showPoint: false,
  3285. * axisX: {
  3286. * labelInterpolationFnc: function(value) {
  3287. * // Will return Mon, Tue, Wed etc. on medium screens
  3288. * return value.slice(0, 3);
  3289. * }
  3290. * }
  3291. * }],
  3292. * ['screen and (max-width: 640px)', {
  3293. * showLine: false,
  3294. * axisX: {
  3295. * labelInterpolationFnc: function(value) {
  3296. * // Will return M, T, W etc. on small screens
  3297. * return value[0];
  3298. * }
  3299. * }
  3300. * }]
  3301. * ];
  3302. *
  3303. * new Chartist.Line('.ct-chart', data, null, responsiveOptions);
  3304. *
  3305. */
  3306. function Line(query, data, options, responsiveOptions) {
  3307. Chartist.Line.super.constructor.call(this,
  3308. query,
  3309. data,
  3310. defaultOptions,
  3311. Chartist.extend({}, defaultOptions, options),
  3312. responsiveOptions);
  3313. }
  3314. // Creating line chart type in Chartist namespace
  3315. Chartist.Line = Chartist.Base.extend({
  3316. constructor: Line,
  3317. createChart: createChart
  3318. });
  3319. }(this || __webpack_require__.g, Chartist));
  3320. ;/**
  3321. * The bar chart module of Chartist that can be used to draw unipolar or bipolar bar and grouped bar charts.
  3322. *
  3323. * @module Chartist.Bar
  3324. */
  3325. /* global Chartist */
  3326. (function(globalRoot, Chartist){
  3327. 'use strict';
  3328. var window = globalRoot.window;
  3329. var document = globalRoot.document;
  3330. /**
  3331. * Default options in bar charts. Expand the code view to see a detailed list of options with comments.
  3332. *
  3333. * @memberof Chartist.Bar
  3334. */
  3335. var defaultOptions = {
  3336. // Options for X-Axis
  3337. axisX: {
  3338. // The offset of the chart drawing area to the border of the container
  3339. offset: 30,
  3340. // Position where labels are placed. Can be set to `start` or `end` where `start` is equivalent to left or top on vertical axis and `end` is equivalent to right or bottom on horizontal axis.
  3341. position: 'end',
  3342. // Allows you to correct label positioning on this axis by positive or negative x and y offset.
  3343. labelOffset: {
  3344. x: 0,
  3345. y: 0
  3346. },
  3347. // If labels should be shown or not
  3348. showLabel: true,
  3349. // If the axis grid should be drawn or not
  3350. showGrid: true,
  3351. // Interpolation function that allows you to intercept the value from the axis label
  3352. labelInterpolationFnc: Chartist.noop,
  3353. // This value specifies the minimum width in pixel of the scale steps
  3354. scaleMinSpace: 30,
  3355. // Use only integer values (whole numbers) for the scale steps
  3356. onlyInteger: false
  3357. },
  3358. // Options for Y-Axis
  3359. axisY: {
  3360. // The offset of the chart drawing area to the border of the container
  3361. offset: 40,
  3362. // Position where labels are placed. Can be set to `start` or `end` where `start` is equivalent to left or top on vertical axis and `end` is equivalent to right or bottom on horizontal axis.
  3363. position: 'start',
  3364. // Allows you to correct label positioning on this axis by positive or negative x and y offset.
  3365. labelOffset: {
  3366. x: 0,
  3367. y: 0
  3368. },
  3369. // If labels should be shown or not
  3370. showLabel: true,
  3371. // If the axis grid should be drawn or not
  3372. showGrid: true,
  3373. // Interpolation function that allows you to intercept the value from the axis label
  3374. labelInterpolationFnc: Chartist.noop,
  3375. // This value specifies the minimum height in pixel of the scale steps
  3376. scaleMinSpace: 20,
  3377. // Use only integer values (whole numbers) for the scale steps
  3378. onlyInteger: false
  3379. },
  3380. // Specify a fixed width for the chart as a string (i.e. '100px' or '50%')
  3381. width: undefined,
  3382. // Specify a fixed height for the chart as a string (i.e. '100px' or '50%')
  3383. height: undefined,
  3384. // Overriding the natural high of the chart allows you to zoom in or limit the charts highest displayed value
  3385. high: undefined,
  3386. // Overriding the natural low of the chart allows you to zoom in or limit the charts lowest displayed value
  3387. low: undefined,
  3388. // Unless low/high are explicitly set, bar chart will be centered at zero by default. Set referenceValue to null to auto scale.
  3389. referenceValue: 0,
  3390. // Padding of the chart drawing area to the container element and labels as a number or padding object {top: 5, right: 5, bottom: 5, left: 5}
  3391. chartPadding: {
  3392. top: 15,
  3393. right: 15,
  3394. bottom: 5,
  3395. left: 10
  3396. },
  3397. // Specify the distance in pixel of bars in a group
  3398. seriesBarDistance: 15,
  3399. // If set to true this property will cause the series bars to be stacked. Check the `stackMode` option for further stacking options.
  3400. stackBars: false,
  3401. // If set to 'overlap' this property will force the stacked bars to draw from the zero line.
  3402. // If set to 'accumulate' this property will form a total for each series point. This will also influence the y-axis and the overall bounds of the chart. In stacked mode the seriesBarDistance property will have no effect.
  3403. stackMode: 'accumulate',
  3404. // Inverts the axes of the bar chart in order to draw a horizontal bar chart. Be aware that you also need to invert your axis settings as the Y Axis will now display the labels and the X Axis the values.
  3405. horizontalBars: false,
  3406. // If set to true then each bar will represent a series and the data array is expected to be a one dimensional array of data values rather than a series array of series. This is useful if the bar chart should represent a profile rather than some data over time.
  3407. distributeSeries: false,
  3408. // If true the whole data is reversed including labels, the series order as well as the whole series data arrays.
  3409. reverseData: false,
  3410. // If the bar chart should add a background fill to the .ct-grids group.
  3411. showGridBackground: false,
  3412. // Override the class names that get used to generate the SVG structure of the chart
  3413. classNames: {
  3414. chart: 'ct-chart-bar',
  3415. horizontalBars: 'ct-horizontal-bars',
  3416. label: 'ct-label',
  3417. labelGroup: 'ct-labels',
  3418. series: 'ct-series',
  3419. bar: 'ct-bar',
  3420. grid: 'ct-grid',
  3421. gridGroup: 'ct-grids',
  3422. gridBackground: 'ct-grid-background',
  3423. vertical: 'ct-vertical',
  3424. horizontal: 'ct-horizontal',
  3425. start: 'ct-start',
  3426. end: 'ct-end'
  3427. }
  3428. };
  3429. /**
  3430. * Creates a new chart
  3431. *
  3432. */
  3433. function createChart(options) {
  3434. var data;
  3435. var highLow;
  3436. if(options.distributeSeries) {
  3437. data = Chartist.normalizeData(this.data, options.reverseData, options.horizontalBars ? 'x' : 'y');
  3438. data.normalized.series = data.normalized.series.map(function(value) {
  3439. return [value];
  3440. });
  3441. } else {
  3442. data = Chartist.normalizeData(this.data, options.reverseData, options.horizontalBars ? 'x' : 'y');
  3443. }
  3444. // Create new svg element
  3445. this.svg = Chartist.createSvg(
  3446. this.container,
  3447. options.width,
  3448. options.height,
  3449. options.classNames.chart + (options.horizontalBars ? ' ' + options.classNames.horizontalBars : '')
  3450. );
  3451. // Drawing groups in correct order
  3452. var gridGroup = this.svg.elem('g').addClass(options.classNames.gridGroup);
  3453. var seriesGroup = this.svg.elem('g');
  3454. var labelGroup = this.svg.elem('g').addClass(options.classNames.labelGroup);
  3455. if(options.stackBars && data.normalized.series.length !== 0) {
  3456. // If stacked bars we need to calculate the high low from stacked values from each series
  3457. var serialSums = Chartist.serialMap(data.normalized.series, function serialSums() {
  3458. return Array.prototype.slice.call(arguments).map(function(value) {
  3459. return value;
  3460. }).reduce(function(prev, curr) {
  3461. return {
  3462. x: prev.x + (curr && curr.x) || 0,
  3463. y: prev.y + (curr && curr.y) || 0
  3464. };
  3465. }, {x: 0, y: 0});
  3466. });
  3467. highLow = Chartist.getHighLow([serialSums], options, options.horizontalBars ? 'x' : 'y');
  3468. } else {
  3469. highLow = Chartist.getHighLow(data.normalized.series, options, options.horizontalBars ? 'x' : 'y');
  3470. }
  3471. // Overrides of high / low from settings
  3472. highLow.high = +options.high || (options.high === 0 ? 0 : highLow.high);
  3473. highLow.low = +options.low || (options.low === 0 ? 0 : highLow.low);
  3474. var chartRect = Chartist.createChartRect(this.svg, options, defaultOptions.padding);
  3475. var valueAxis,
  3476. labelAxisTicks,
  3477. labelAxis,
  3478. axisX,
  3479. axisY;
  3480. // We need to set step count based on some options combinations
  3481. if(options.distributeSeries && options.stackBars) {
  3482. // If distributed series are enabled and bars need to be stacked, we'll only have one bar and therefore should
  3483. // use only the first label for the step axis
  3484. labelAxisTicks = data.normalized.labels.slice(0, 1);
  3485. } else {
  3486. // If distributed series are enabled but stacked bars aren't, we should use the series labels
  3487. // If we are drawing a regular bar chart with two dimensional series data, we just use the labels array
  3488. // as the bars are normalized
  3489. labelAxisTicks = data.normalized.labels;
  3490. }
  3491. // Set labelAxis and valueAxis based on the horizontalBars setting. This setting will flip the axes if necessary.
  3492. if(options.horizontalBars) {
  3493. if(options.axisX.type === undefined) {
  3494. valueAxis = axisX = new Chartist.AutoScaleAxis(Chartist.Axis.units.x, data.normalized.series, chartRect, Chartist.extend({}, options.axisX, {
  3495. highLow: highLow,
  3496. referenceValue: 0
  3497. }));
  3498. } else {
  3499. valueAxis = axisX = options.axisX.type.call(Chartist, Chartist.Axis.units.x, data.normalized.series, chartRect, Chartist.extend({}, options.axisX, {
  3500. highLow: highLow,
  3501. referenceValue: 0
  3502. }));
  3503. }
  3504. if(options.axisY.type === undefined) {
  3505. labelAxis = axisY = new Chartist.StepAxis(Chartist.Axis.units.y, data.normalized.series, chartRect, {
  3506. ticks: labelAxisTicks
  3507. });
  3508. } else {
  3509. labelAxis = axisY = options.axisY.type.call(Chartist, Chartist.Axis.units.y, data.normalized.series, chartRect, options.axisY);
  3510. }
  3511. } else {
  3512. if(options.axisX.type === undefined) {
  3513. labelAxis = axisX = new Chartist.StepAxis(Chartist.Axis.units.x, data.normalized.series, chartRect, {
  3514. ticks: labelAxisTicks
  3515. });
  3516. } else {
  3517. labelAxis = axisX = options.axisX.type.call(Chartist, Chartist.Axis.units.x, data.normalized.series, chartRect, options.axisX);
  3518. }
  3519. if(options.axisY.type === undefined) {
  3520. valueAxis = axisY = new Chartist.AutoScaleAxis(Chartist.Axis.units.y, data.normalized.series, chartRect, Chartist.extend({}, options.axisY, {
  3521. highLow: highLow,
  3522. referenceValue: 0
  3523. }));
  3524. } else {
  3525. valueAxis = axisY = options.axisY.type.call(Chartist, Chartist.Axis.units.y, data.normalized.series, chartRect, Chartist.extend({}, options.axisY, {
  3526. highLow: highLow,
  3527. referenceValue: 0
  3528. }));
  3529. }
  3530. }
  3531. // Projected 0 point
  3532. var zeroPoint = options.horizontalBars ? (chartRect.x1 + valueAxis.projectValue(0)) : (chartRect.y1 - valueAxis.projectValue(0));
  3533. // Used to track the screen coordinates of stacked bars
  3534. var stackedBarValues = [];
  3535. labelAxis.createGridAndLabels(gridGroup, labelGroup, this.supportsForeignObject, options, this.eventEmitter);
  3536. valueAxis.createGridAndLabels(gridGroup, labelGroup, this.supportsForeignObject, options, this.eventEmitter);
  3537. if (options.showGridBackground) {
  3538. Chartist.createGridBackground(gridGroup, chartRect, options.classNames.gridBackground, this.eventEmitter);
  3539. }
  3540. // Draw the series
  3541. data.raw.series.forEach(function(series, seriesIndex) {
  3542. // Calculating bi-polar value of index for seriesOffset. For i = 0..4 biPol will be -1.5, -0.5, 0.5, 1.5 etc.
  3543. var biPol = seriesIndex - (data.raw.series.length - 1) / 2;
  3544. // Half of the period width between vertical grid lines used to position bars
  3545. var periodHalfLength;
  3546. // Current series SVG element
  3547. var seriesElement;
  3548. // We need to set periodHalfLength based on some options combinations
  3549. if(options.distributeSeries && !options.stackBars) {
  3550. // If distributed series are enabled but stacked bars aren't, we need to use the length of the normaizedData array
  3551. // which is the series count and divide by 2
  3552. periodHalfLength = labelAxis.axisLength / data.normalized.series.length / 2;
  3553. } else if(options.distributeSeries && options.stackBars) {
  3554. // If distributed series and stacked bars are enabled we'll only get one bar so we should just divide the axis
  3555. // length by 2
  3556. periodHalfLength = labelAxis.axisLength / 2;
  3557. } else {
  3558. // On regular bar charts we should just use the series length
  3559. periodHalfLength = labelAxis.axisLength / data.normalized.series[seriesIndex].length / 2;
  3560. }
  3561. // Adding the series group to the series element
  3562. seriesElement = seriesGroup.elem('g');
  3563. // Write attributes to series group element. If series name or meta is undefined the attributes will not be written
  3564. seriesElement.attr({
  3565. 'ct:series-name': series.name,
  3566. 'ct:meta': Chartist.serialize(series.meta)
  3567. });
  3568. // Use series class from series data or if not set generate one
  3569. seriesElement.addClass([
  3570. options.classNames.series,
  3571. (series.className || options.classNames.series + '-' + Chartist.alphaNumerate(seriesIndex))
  3572. ].join(' '));
  3573. data.normalized.series[seriesIndex].forEach(function(value, valueIndex) {
  3574. var projected,
  3575. bar,
  3576. previousStack,
  3577. labelAxisValueIndex;
  3578. // We need to set labelAxisValueIndex based on some options combinations
  3579. if(options.distributeSeries && !options.stackBars) {
  3580. // If distributed series are enabled but stacked bars aren't, we can use the seriesIndex for later projection
  3581. // on the step axis for label positioning
  3582. labelAxisValueIndex = seriesIndex;
  3583. } else if(options.distributeSeries && options.stackBars) {
  3584. // If distributed series and stacked bars are enabled, we will only get one bar and therefore always use
  3585. // 0 for projection on the label step axis
  3586. labelAxisValueIndex = 0;
  3587. } else {
  3588. // On regular bar charts we just use the value index to project on the label step axis
  3589. labelAxisValueIndex = valueIndex;
  3590. }
  3591. // We need to transform coordinates differently based on the chart layout
  3592. if(options.horizontalBars) {
  3593. projected = {
  3594. x: chartRect.x1 + valueAxis.projectValue(value && value.x ? value.x : 0, valueIndex, data.normalized.series[seriesIndex]),
  3595. y: chartRect.y1 - labelAxis.projectValue(value && value.y ? value.y : 0, labelAxisValueIndex, data.normalized.series[seriesIndex])
  3596. };
  3597. } else {
  3598. projected = {
  3599. x: chartRect.x1 + labelAxis.projectValue(value && value.x ? value.x : 0, labelAxisValueIndex, data.normalized.series[seriesIndex]),
  3600. y: chartRect.y1 - valueAxis.projectValue(value && value.y ? value.y : 0, valueIndex, data.normalized.series[seriesIndex])
  3601. }
  3602. }
  3603. // If the label axis is a step based axis we will offset the bar into the middle of between two steps using
  3604. // the periodHalfLength value. Also we do arrange the different series so that they align up to each other using
  3605. // the seriesBarDistance. If we don't have a step axis, the bar positions can be chosen freely so we should not
  3606. // add any automated positioning.
  3607. if(labelAxis instanceof Chartist.StepAxis) {
  3608. // Offset to center bar between grid lines, but only if the step axis is not stretched
  3609. if(!labelAxis.options.stretch) {
  3610. projected[labelAxis.units.pos] += periodHalfLength * (options.horizontalBars ? -1 : 1);
  3611. }
  3612. // Using bi-polar offset for multiple series if no stacked bars or series distribution is used
  3613. projected[labelAxis.units.pos] += (options.stackBars || options.distributeSeries) ? 0 : biPol * options.seriesBarDistance * (options.horizontalBars ? -1 : 1);
  3614. }
  3615. // Enter value in stacked bar values used to remember previous screen value for stacking up bars
  3616. previousStack = stackedBarValues[valueIndex] || zeroPoint;
  3617. stackedBarValues[valueIndex] = previousStack - (zeroPoint - projected[labelAxis.counterUnits.pos]);
  3618. // Skip if value is undefined
  3619. if(value === undefined) {
  3620. return;
  3621. }
  3622. var positions = {};
  3623. positions[labelAxis.units.pos + '1'] = projected[labelAxis.units.pos];
  3624. positions[labelAxis.units.pos + '2'] = projected[labelAxis.units.pos];
  3625. if(options.stackBars && (options.stackMode === 'accumulate' || !options.stackMode)) {
  3626. // Stack mode: accumulate (default)
  3627. // If bars are stacked we use the stackedBarValues reference and otherwise base all bars off the zero line
  3628. // We want backwards compatibility, so the expected fallback without the 'stackMode' option
  3629. // to be the original behaviour (accumulate)
  3630. positions[labelAxis.counterUnits.pos + '1'] = previousStack;
  3631. positions[labelAxis.counterUnits.pos + '2'] = stackedBarValues[valueIndex];
  3632. } else {
  3633. // Draw from the zero line normally
  3634. // This is also the same code for Stack mode: overlap
  3635. positions[labelAxis.counterUnits.pos + '1'] = zeroPoint;
  3636. positions[labelAxis.counterUnits.pos + '2'] = projected[labelAxis.counterUnits.pos];
  3637. }
  3638. // Limit x and y so that they are within the chart rect
  3639. positions.x1 = Math.min(Math.max(positions.x1, chartRect.x1), chartRect.x2);
  3640. positions.x2 = Math.min(Math.max(positions.x2, chartRect.x1), chartRect.x2);
  3641. positions.y1 = Math.min(Math.max(positions.y1, chartRect.y2), chartRect.y1);
  3642. positions.y2 = Math.min(Math.max(positions.y2, chartRect.y2), chartRect.y1);
  3643. var metaData = Chartist.getMetaData(series, valueIndex);
  3644. // Create bar element
  3645. bar = seriesElement.elem('line', positions, options.classNames.bar).attr({
  3646. 'ct:value': [value.x, value.y].filter(Chartist.isNumeric).join(','),
  3647. 'ct:meta': Chartist.serialize(metaData)
  3648. });
  3649. this.eventEmitter.emit('draw', Chartist.extend({
  3650. type: 'bar',
  3651. value: value,
  3652. index: valueIndex,
  3653. meta: metaData,
  3654. series: series,
  3655. seriesIndex: seriesIndex,
  3656. axisX: axisX,
  3657. axisY: axisY,
  3658. chartRect: chartRect,
  3659. group: seriesElement,
  3660. element: bar
  3661. }, positions));
  3662. }.bind(this));
  3663. }.bind(this));
  3664. this.eventEmitter.emit('created', {
  3665. bounds: valueAxis.bounds,
  3666. chartRect: chartRect,
  3667. axisX: axisX,
  3668. axisY: axisY,
  3669. svg: this.svg,
  3670. options: options
  3671. });
  3672. }
  3673. /**
  3674. * This method creates a new bar chart and returns API object that you can use for later changes.
  3675. *
  3676. * @memberof Chartist.Bar
  3677. * @param {String|Node} query A selector query string or directly a DOM element
  3678. * @param {Object} data The data object that needs to consist of a labels and a series array
  3679. * @param {Object} [options] The options object with options that override the default options. Check the examples for a detailed list.
  3680. * @param {Array} [responsiveOptions] Specify an array of responsive option arrays which are a media query and options object pair => [[mediaQueryString, optionsObject],[more...]]
  3681. * @return {Object} An object which exposes the API for the created chart
  3682. *
  3683. * @example
  3684. * // Create a simple bar chart
  3685. * var data = {
  3686. * labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],
  3687. * series: [
  3688. * [5, 2, 4, 2, 0]
  3689. * ]
  3690. * };
  3691. *
  3692. * // In the global name space Chartist we call the Bar function to initialize a bar chart. As a first parameter we pass in a selector where we would like to get our chart created and as a second parameter we pass our data object.
  3693. * new Chartist.Bar('.ct-chart', data);
  3694. *
  3695. * @example
  3696. * // This example creates a bipolar grouped bar chart where the boundaries are limitted to -10 and 10
  3697. * new Chartist.Bar('.ct-chart', {
  3698. * labels: [1, 2, 3, 4, 5, 6, 7],
  3699. * series: [
  3700. * [1, 3, 2, -5, -3, 1, -6],
  3701. * [-5, -2, -4, -1, 2, -3, 1]
  3702. * ]
  3703. * }, {
  3704. * seriesBarDistance: 12,
  3705. * low: -10,
  3706. * high: 10
  3707. * });
  3708. *
  3709. */
  3710. function Bar(query, data, options, responsiveOptions) {
  3711. Chartist.Bar.super.constructor.call(this,
  3712. query,
  3713. data,
  3714. defaultOptions,
  3715. Chartist.extend({}, defaultOptions, options),
  3716. responsiveOptions);
  3717. }
  3718. // Creating bar chart type in Chartist namespace
  3719. Chartist.Bar = Chartist.Base.extend({
  3720. constructor: Bar,
  3721. createChart: createChart
  3722. });
  3723. }(this || __webpack_require__.g, Chartist));
  3724. ;/**
  3725. * The pie chart module of Chartist that can be used to draw pie, donut or gauge charts
  3726. *
  3727. * @module Chartist.Pie
  3728. */
  3729. /* global Chartist */
  3730. (function(globalRoot, Chartist) {
  3731. 'use strict';
  3732. var window = globalRoot.window;
  3733. var document = globalRoot.document;
  3734. /**
  3735. * Default options in line charts. Expand the code view to see a detailed list of options with comments.
  3736. *
  3737. * @memberof Chartist.Pie
  3738. */
  3739. var defaultOptions = {
  3740. // Specify a fixed width for the chart as a string (i.e. '100px' or '50%')
  3741. width: undefined,
  3742. // Specify a fixed height for the chart as a string (i.e. '100px' or '50%')
  3743. height: undefined,
  3744. // Padding of the chart drawing area to the container element and labels as a number or padding object {top: 5, right: 5, bottom: 5, left: 5}
  3745. chartPadding: 5,
  3746. // Override the class names that are used to generate the SVG structure of the chart
  3747. classNames: {
  3748. chartPie: 'ct-chart-pie',
  3749. chartDonut: 'ct-chart-donut',
  3750. series: 'ct-series',
  3751. slicePie: 'ct-slice-pie',
  3752. sliceDonut: 'ct-slice-donut',
  3753. sliceDonutSolid: 'ct-slice-donut-solid',
  3754. label: 'ct-label'
  3755. },
  3756. // The start angle of the pie chart in degrees where 0 points north. A higher value offsets the start angle clockwise.
  3757. startAngle: 0,
  3758. // An optional total you can specify. By specifying a total value, the sum of the values in the series must be this total in order to draw a full pie. You can use this parameter to draw only parts of a pie or gauge charts.
  3759. total: undefined,
  3760. // If specified the donut CSS classes will be used and strokes will be drawn instead of pie slices.
  3761. donut: false,
  3762. // If specified the donut segments will be drawn as shapes instead of strokes.
  3763. donutSolid: false,
  3764. // Specify the donut stroke width, currently done in javascript for convenience. May move to CSS styles in the future.
  3765. // This option can be set as number or string to specify a relative width (i.e. 100 or '30%').
  3766. donutWidth: 60,
  3767. // If a label should be shown or not
  3768. showLabel: true,
  3769. // Label position offset from the standard position which is half distance of the radius. This value can be either positive or negative. Positive values will position the label away from the center.
  3770. labelOffset: 0,
  3771. // This option can be set to 'inside', 'outside' or 'center'. Positioned with 'inside' the labels will be placed on half the distance of the radius to the border of the Pie by respecting the 'labelOffset'. The 'outside' option will place the labels at the border of the pie and 'center' will place the labels in the absolute center point of the chart. The 'center' option only makes sense in conjunction with the 'labelOffset' option.
  3772. labelPosition: 'inside',
  3773. // An interpolation function for the label value
  3774. labelInterpolationFnc: Chartist.noop,
  3775. // Label direction can be 'neutral', 'explode' or 'implode'. The labels anchor will be positioned based on those settings as well as the fact if the labels are on the right or left side of the center of the chart. Usually explode is useful when labels are positioned far away from the center.
  3776. labelDirection: 'neutral',
  3777. // If true the whole data is reversed including labels, the series order as well as the whole series data arrays.
  3778. reverseData: false,
  3779. // If true empty values will be ignored to avoid drawing unncessary slices and labels
  3780. ignoreEmptyValues: false
  3781. };
  3782. /**
  3783. * Determines SVG anchor position based on direction and center parameter
  3784. *
  3785. * @param center
  3786. * @param label
  3787. * @param direction
  3788. * @return {string}
  3789. */
  3790. function determineAnchorPosition(center, label, direction) {
  3791. var toTheRight = label.x > center.x;
  3792. if(toTheRight && direction === 'explode' ||
  3793. !toTheRight && direction === 'implode') {
  3794. return 'start';
  3795. } else if(toTheRight && direction === 'implode' ||
  3796. !toTheRight && direction === 'explode') {
  3797. return 'end';
  3798. } else {
  3799. return 'middle';
  3800. }
  3801. }
  3802. /**
  3803. * Creates the pie chart
  3804. *
  3805. * @param options
  3806. */
  3807. function createChart(options) {
  3808. var data = Chartist.normalizeData(this.data);
  3809. var seriesGroups = [],
  3810. labelsGroup,
  3811. chartRect,
  3812. radius,
  3813. labelRadius,
  3814. totalDataSum,
  3815. startAngle = options.startAngle;
  3816. // Create SVG.js draw
  3817. this.svg = Chartist.createSvg(this.container, options.width, options.height,options.donut ? options.classNames.chartDonut : options.classNames.chartPie);
  3818. // Calculate charting rect
  3819. chartRect = Chartist.createChartRect(this.svg, options, defaultOptions.padding);
  3820. // Get biggest circle radius possible within chartRect
  3821. radius = Math.min(chartRect.width() / 2, chartRect.height() / 2);
  3822. // Calculate total of all series to get reference value or use total reference from optional options
  3823. totalDataSum = options.total || data.normalized.series.reduce(function(previousValue, currentValue) {
  3824. return previousValue + currentValue;
  3825. }, 0);
  3826. var donutWidth = Chartist.quantity(options.donutWidth);
  3827. if (donutWidth.unit === '%') {
  3828. donutWidth.value *= radius / 100;
  3829. }
  3830. // If this is a donut chart we need to adjust our radius to enable strokes to be drawn inside
  3831. // Unfortunately this is not possible with the current SVG Spec
  3832. // See this proposal for more details: http://lists.w3.org/Archives/Public/www-svg/2003Oct/0000.html
  3833. radius -= options.donut && !options.donutSolid ? donutWidth.value / 2 : 0;
  3834. // If labelPosition is set to `outside` or a donut chart is drawn then the label position is at the radius,
  3835. // if regular pie chart it's half of the radius
  3836. if(options.labelPosition === 'outside' || options.donut && !options.donutSolid) {
  3837. labelRadius = radius;
  3838. } else if(options.labelPosition === 'center') {
  3839. // If labelPosition is center we start with 0 and will later wait for the labelOffset
  3840. labelRadius = 0;
  3841. } else if(options.donutSolid) {
  3842. labelRadius = radius - donutWidth.value / 2;
  3843. } else {
  3844. // Default option is 'inside' where we use half the radius so the label will be placed in the center of the pie
  3845. // slice
  3846. labelRadius = radius / 2;
  3847. }
  3848. // Add the offset to the labelRadius where a negative offset means closed to the center of the chart
  3849. labelRadius += options.labelOffset;
  3850. // Calculate end angle based on total sum and current data value and offset with padding
  3851. var center = {
  3852. x: chartRect.x1 + chartRect.width() / 2,
  3853. y: chartRect.y2 + chartRect.height() / 2
  3854. };
  3855. // Check if there is only one non-zero value in the series array.
  3856. var hasSingleValInSeries = data.raw.series.filter(function(val) {
  3857. return val.hasOwnProperty('value') ? val.value !== 0 : val !== 0;
  3858. }).length === 1;
  3859. // Creating the series groups
  3860. data.raw.series.forEach(function(series, index) {
  3861. seriesGroups[index] = this.svg.elem('g', null, null);
  3862. }.bind(this));
  3863. //if we need to show labels we create the label group now
  3864. if(options.showLabel) {
  3865. labelsGroup = this.svg.elem('g', null, null);
  3866. }
  3867. // Draw the series
  3868. // initialize series groups
  3869. data.raw.series.forEach(function(series, index) {
  3870. // If current value is zero and we are ignoring empty values then skip to next value
  3871. if (data.normalized.series[index] === 0 && options.ignoreEmptyValues) return;
  3872. // If the series is an object and contains a name or meta data we add a custom attribute
  3873. seriesGroups[index].attr({
  3874. 'ct:series-name': series.name
  3875. });
  3876. // Use series class from series data or if not set generate one
  3877. seriesGroups[index].addClass([
  3878. options.classNames.series,
  3879. (series.className || options.classNames.series + '-' + Chartist.alphaNumerate(index))
  3880. ].join(' '));
  3881. // If the whole dataset is 0 endAngle should be zero. Can't divide by 0.
  3882. var endAngle = (totalDataSum > 0 ? startAngle + data.normalized.series[index] / totalDataSum * 360 : 0);
  3883. // Use slight offset so there are no transparent hairline issues
  3884. var overlappigStartAngle = Math.max(0, startAngle - (index === 0 || hasSingleValInSeries ? 0 : 0.2));
  3885. // If we need to draw the arc for all 360 degrees we need to add a hack where we close the circle
  3886. // with Z and use 359.99 degrees
  3887. if(endAngle - overlappigStartAngle >= 359.99) {
  3888. endAngle = overlappigStartAngle + 359.99;
  3889. }
  3890. var start = Chartist.polarToCartesian(center.x, center.y, radius, overlappigStartAngle),
  3891. end = Chartist.polarToCartesian(center.x, center.y, radius, endAngle);
  3892. var innerStart,
  3893. innerEnd,
  3894. donutSolidRadius;
  3895. // Create a new path element for the pie chart. If this isn't a donut chart we should close the path for a correct stroke
  3896. var path = new Chartist.Svg.Path(!options.donut || options.donutSolid)
  3897. .move(end.x, end.y)
  3898. .arc(radius, radius, 0, endAngle - startAngle > 180, 0, start.x, start.y);
  3899. // If regular pie chart (no donut) we add a line to the center of the circle for completing the pie
  3900. if(!options.donut) {
  3901. path.line(center.x, center.y);
  3902. } else if (options.donutSolid) {
  3903. donutSolidRadius = radius - donutWidth.value;
  3904. innerStart = Chartist.polarToCartesian(center.x, center.y, donutSolidRadius, startAngle - (index === 0 || hasSingleValInSeries ? 0 : 0.2));
  3905. innerEnd = Chartist.polarToCartesian(center.x, center.y, donutSolidRadius, endAngle);
  3906. path.line(innerStart.x, innerStart.y);
  3907. path.arc(donutSolidRadius, donutSolidRadius, 0, endAngle - startAngle > 180, 1, innerEnd.x, innerEnd.y);
  3908. }
  3909. // Create the SVG path
  3910. // If this is a donut chart we add the donut class, otherwise just a regular slice
  3911. var pathClassName = options.classNames.slicePie;
  3912. if (options.donut) {
  3913. pathClassName = options.classNames.sliceDonut;
  3914. if (options.donutSolid) {
  3915. pathClassName = options.classNames.sliceDonutSolid;
  3916. }
  3917. }
  3918. var pathElement = seriesGroups[index].elem('path', {
  3919. d: path.stringify()
  3920. }, pathClassName);
  3921. // Adding the pie series value to the path
  3922. pathElement.attr({
  3923. 'ct:value': data.normalized.series[index],
  3924. 'ct:meta': Chartist.serialize(series.meta)
  3925. });
  3926. // If this is a donut, we add the stroke-width as style attribute
  3927. if(options.donut && !options.donutSolid) {
  3928. pathElement._node.style.strokeWidth = donutWidth.value + 'px';
  3929. }
  3930. // Fire off draw event
  3931. this.eventEmitter.emit('draw', {
  3932. type: 'slice',
  3933. value: data.normalized.series[index],
  3934. totalDataSum: totalDataSum,
  3935. index: index,
  3936. meta: series.meta,
  3937. series: series,
  3938. group: seriesGroups[index],
  3939. element: pathElement,
  3940. path: path.clone(),
  3941. center: center,
  3942. radius: radius,
  3943. startAngle: startAngle,
  3944. endAngle: endAngle
  3945. });
  3946. // If we need to show labels we need to add the label for this slice now
  3947. if(options.showLabel) {
  3948. var labelPosition;
  3949. if(data.raw.series.length === 1) {
  3950. // If we have only 1 series, we can position the label in the center of the pie
  3951. labelPosition = {
  3952. x: center.x,
  3953. y: center.y
  3954. };
  3955. } else {
  3956. // Position at the labelRadius distance from center and between start and end angle
  3957. labelPosition = Chartist.polarToCartesian(
  3958. center.x,
  3959. center.y,
  3960. labelRadius,
  3961. startAngle + (endAngle - startAngle) / 2
  3962. );
  3963. }
  3964. var rawValue;
  3965. if(data.normalized.labels && !Chartist.isFalseyButZero(data.normalized.labels[index])) {
  3966. rawValue = data.normalized.labels[index];
  3967. } else {
  3968. rawValue = data.normalized.series[index];
  3969. }
  3970. var interpolatedValue = options.labelInterpolationFnc(rawValue, index);
  3971. if(interpolatedValue || interpolatedValue === 0) {
  3972. var labelElement = labelsGroup.elem('text', {
  3973. dx: labelPosition.x,
  3974. dy: labelPosition.y,
  3975. 'text-anchor': determineAnchorPosition(center, labelPosition, options.labelDirection)
  3976. }, options.classNames.label).text('' + interpolatedValue);
  3977. // Fire off draw event
  3978. this.eventEmitter.emit('draw', {
  3979. type: 'label',
  3980. index: index,
  3981. group: labelsGroup,
  3982. element: labelElement,
  3983. text: '' + interpolatedValue,
  3984. x: labelPosition.x,
  3985. y: labelPosition.y
  3986. });
  3987. }
  3988. }
  3989. // Set next startAngle to current endAngle.
  3990. // (except for last slice)
  3991. startAngle = endAngle;
  3992. }.bind(this));
  3993. this.eventEmitter.emit('created', {
  3994. chartRect: chartRect,
  3995. svg: this.svg,
  3996. options: options
  3997. });
  3998. }
  3999. /**
  4000. * This method creates a new pie chart and returns an object that can be used to redraw the chart.
  4001. *
  4002. * @memberof Chartist.Pie
  4003. * @param {String|Node} query A selector query string or directly a DOM element
  4004. * @param {Object} data The data object in the pie chart needs to have a series property with a one dimensional data array. The values will be normalized against each other and don't necessarily need to be in percentage. The series property can also be an array of value objects that contain a value property and a className property to override the CSS class name for the series group.
  4005. * @param {Object} [options] The options object with options that override the default options. Check the examples for a detailed list.
  4006. * @param {Array} [responsiveOptions] Specify an array of responsive option arrays which are a media query and options object pair => [[mediaQueryString, optionsObject],[more...]]
  4007. * @return {Object} An object with a version and an update method to manually redraw the chart
  4008. *
  4009. * @example
  4010. * // Simple pie chart example with four series
  4011. * new Chartist.Pie('.ct-chart', {
  4012. * series: [10, 2, 4, 3]
  4013. * });
  4014. *
  4015. * @example
  4016. * // Drawing a donut chart
  4017. * new Chartist.Pie('.ct-chart', {
  4018. * series: [10, 2, 4, 3]
  4019. * }, {
  4020. * donut: true
  4021. * });
  4022. *
  4023. * @example
  4024. * // Using donut, startAngle and total to draw a gauge chart
  4025. * new Chartist.Pie('.ct-chart', {
  4026. * series: [20, 10, 30, 40]
  4027. * }, {
  4028. * donut: true,
  4029. * donutWidth: 20,
  4030. * startAngle: 270,
  4031. * total: 200
  4032. * });
  4033. *
  4034. * @example
  4035. * // Drawing a pie chart with padding and labels that are outside the pie
  4036. * new Chartist.Pie('.ct-chart', {
  4037. * series: [20, 10, 30, 40]
  4038. * }, {
  4039. * chartPadding: 30,
  4040. * labelOffset: 50,
  4041. * labelDirection: 'explode'
  4042. * });
  4043. *
  4044. * @example
  4045. * // Overriding the class names for individual series as well as a name and meta data.
  4046. * // The name will be written as ct:series-name attribute and the meta data will be serialized and written
  4047. * // to a ct:meta attribute.
  4048. * new Chartist.Pie('.ct-chart', {
  4049. * series: [{
  4050. * value: 20,
  4051. * name: 'Series 1',
  4052. * className: 'my-custom-class-one',
  4053. * meta: 'Meta One'
  4054. * }, {
  4055. * value: 10,
  4056. * name: 'Series 2',
  4057. * className: 'my-custom-class-two',
  4058. * meta: 'Meta Two'
  4059. * }, {
  4060. * value: 70,
  4061. * name: 'Series 3',
  4062. * className: 'my-custom-class-three',
  4063. * meta: 'Meta Three'
  4064. * }]
  4065. * });
  4066. */
  4067. function Pie(query, data, options, responsiveOptions) {
  4068. Chartist.Pie.super.constructor.call(this,
  4069. query,
  4070. data,
  4071. defaultOptions,
  4072. Chartist.extend({}, defaultOptions, options),
  4073. responsiveOptions);
  4074. }
  4075. // Creating pie chart type in Chartist namespace
  4076. Chartist.Pie = Chartist.Base.extend({
  4077. constructor: Pie,
  4078. createChart: createChart,
  4079. determineAnchorPosition: determineAnchorPosition
  4080. });
  4081. }(this || __webpack_require__.g, Chartist));
  4082. return Chartist;
  4083. }));
  4084. /***/ }),
  4085. /***/ 23350:
  4086. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  4087. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  4088. // Distributed under an MIT license: https://codemirror.net/LICENSE
  4089. (function(mod) {
  4090. if (true) // CommonJS
  4091. mod(__webpack_require__(4631));
  4092. else {}
  4093. })(function(CodeMirror) {
  4094. "use strict";
  4095. var listRE = /^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,
  4096. emptyListRE = /^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,
  4097. unorderedListRE = /[*+-]\s/;
  4098. CodeMirror.commands.newlineAndIndentContinueMarkdownList = function(cm) {
  4099. if (cm.getOption("disableInput")) return CodeMirror.Pass;
  4100. var ranges = cm.listSelections(), replacements = [];
  4101. for (var i = 0; i < ranges.length; i++) {
  4102. var pos = ranges[i].head;
  4103. // If we're not in Markdown mode, fall back to normal newlineAndIndent
  4104. var eolState = cm.getStateAfter(pos.line);
  4105. var inner = CodeMirror.innerMode(cm.getMode(), eolState);
  4106. if (inner.mode.name !== "markdown" && inner.mode.helperType !== "markdown") {
  4107. cm.execCommand("newlineAndIndent");
  4108. return;
  4109. } else {
  4110. eolState = inner.state;
  4111. }
  4112. var inList = eolState.list !== false;
  4113. var inQuote = eolState.quote !== 0;
  4114. var line = cm.getLine(pos.line), match = listRE.exec(line);
  4115. var cursorBeforeBullet = /^\s*$/.test(line.slice(0, pos.ch));
  4116. if (!ranges[i].empty() || (!inList && !inQuote) || !match || cursorBeforeBullet) {
  4117. cm.execCommand("newlineAndIndent");
  4118. return;
  4119. }
  4120. if (emptyListRE.test(line)) {
  4121. var endOfQuote = inQuote && />\s*$/.test(line)
  4122. var endOfList = !/>\s*$/.test(line)
  4123. if (endOfQuote || endOfList) cm.replaceRange("", {
  4124. line: pos.line, ch: 0
  4125. }, {
  4126. line: pos.line, ch: pos.ch + 1
  4127. });
  4128. replacements[i] = "\n";
  4129. } else {
  4130. var indent = match[1], after = match[5];
  4131. var numbered = !(unorderedListRE.test(match[2]) || match[2].indexOf(">") >= 0);
  4132. var bullet = numbered ? (parseInt(match[3], 10) + 1) + match[4] : match[2].replace("x", " ");
  4133. replacements[i] = "\n" + indent + bullet + after;
  4134. if (numbered) incrementRemainingMarkdownListNumbers(cm, pos);
  4135. }
  4136. }
  4137. cm.replaceSelections(replacements);
  4138. };
  4139. // Auto-updating Markdown list numbers when a new item is added to the
  4140. // middle of a list
  4141. function incrementRemainingMarkdownListNumbers(cm, pos) {
  4142. var startLine = pos.line, lookAhead = 0, skipCount = 0;
  4143. var startItem = listRE.exec(cm.getLine(startLine)), startIndent = startItem[1];
  4144. do {
  4145. lookAhead += 1;
  4146. var nextLineNumber = startLine + lookAhead;
  4147. var nextLine = cm.getLine(nextLineNumber), nextItem = listRE.exec(nextLine);
  4148. if (nextItem) {
  4149. var nextIndent = nextItem[1];
  4150. var newNumber = (parseInt(startItem[3], 10) + lookAhead - skipCount);
  4151. var nextNumber = (parseInt(nextItem[3], 10)), itemNumber = nextNumber;
  4152. if (startIndent === nextIndent && !isNaN(nextNumber)) {
  4153. if (newNumber === nextNumber) itemNumber = nextNumber + 1;
  4154. if (newNumber > nextNumber) itemNumber = newNumber + 1;
  4155. cm.replaceRange(
  4156. nextLine.replace(listRE, nextIndent + itemNumber + nextItem[4] + nextItem[5]),
  4157. {
  4158. line: nextLineNumber, ch: 0
  4159. }, {
  4160. line: nextLineNumber, ch: nextLine.length
  4161. });
  4162. } else {
  4163. if (startIndent.length > nextIndent.length) return;
  4164. // This doesn't run if the next line immediately indents, as it is
  4165. // not clear of the users intention (new indented item or same level)
  4166. if ((startIndent.length < nextIndent.length) && (lookAhead === 1)) return;
  4167. skipCount += 1;
  4168. }
  4169. }
  4170. } while (nextItem);
  4171. }
  4172. });
  4173. /***/ }),
  4174. /***/ 41423:
  4175. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  4176. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  4177. // Distributed under an MIT license: https://codemirror.net/LICENSE
  4178. // Depends on csslint.js from https://github.com/stubbornella/csslint
  4179. // declare global: CSSLint
  4180. (function(mod) {
  4181. if (true) // CommonJS
  4182. mod(__webpack_require__(4631));
  4183. else {}
  4184. })(function(CodeMirror) {
  4185. "use strict";
  4186. CodeMirror.registerHelper("lint", "css", function(text, options) {
  4187. var found = [];
  4188. if (!window.CSSLint) {
  4189. if (window.console) {
  4190. window.console.error("Error: window.CSSLint not defined, CodeMirror CSS linting cannot run.");
  4191. }
  4192. return found;
  4193. }
  4194. var results = CSSLint.verify(text, options), messages = results.messages, message = null;
  4195. for ( var i = 0; i < messages.length; i++) {
  4196. message = messages[i];
  4197. var startLine = message.line -1, endLine = message.line -1, startCol = message.col -1, endCol = message.col;
  4198. found.push({
  4199. from: CodeMirror.Pos(startLine, startCol),
  4200. to: CodeMirror.Pos(endLine, endCol),
  4201. message: message.message,
  4202. severity : message.type
  4203. });
  4204. }
  4205. return found;
  4206. });
  4207. });
  4208. /***/ }),
  4209. /***/ 96477:
  4210. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  4211. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  4212. // Distributed under an MIT license: https://codemirror.net/LICENSE
  4213. // Depends on jshint.js from https://github.com/jshint/jshint
  4214. (function(mod) {
  4215. if (true) // CommonJS
  4216. mod(__webpack_require__(4631));
  4217. else {}
  4218. })(function(CodeMirror) {
  4219. "use strict";
  4220. // declare global: JSHINT
  4221. function validator(text, options) {
  4222. if (!window.JSHINT) {
  4223. if (window.console) {
  4224. window.console.error("Error: window.JSHINT not defined, CodeMirror JavaScript linting cannot run.");
  4225. }
  4226. return [];
  4227. }
  4228. if (!options.indent) // JSHint error.character actually is a column index, this fixes underlining on lines using tabs for indentation
  4229. options.indent = 1; // JSHint default value is 4
  4230. JSHINT(text, options, options.globals);
  4231. var errors = JSHINT.data().errors, result = [];
  4232. if (errors) parseErrors(errors, result);
  4233. return result;
  4234. }
  4235. CodeMirror.registerHelper("lint", "javascript", validator);
  4236. function parseErrors(errors, output) {
  4237. for ( var i = 0; i < errors.length; i++) {
  4238. var error = errors[i];
  4239. if (error) {
  4240. if (error.line <= 0) {
  4241. if (window.console) {
  4242. window.console.warn("Cannot display JSHint error (invalid line " + error.line + ")", error);
  4243. }
  4244. continue;
  4245. }
  4246. var start = error.character - 1, end = start + 1;
  4247. if (error.evidence) {
  4248. var index = error.evidence.substring(start).search(/.\b/);
  4249. if (index > -1) {
  4250. end += index;
  4251. }
  4252. }
  4253. // Convert to format expected by validation service
  4254. var hint = {
  4255. message: error.reason,
  4256. severity: error.code ? (error.code.startsWith('W') ? "warning" : "error") : "error",
  4257. from: CodeMirror.Pos(error.line - 1, start),
  4258. to: CodeMirror.Pos(error.line - 1, end)
  4259. };
  4260. output.push(hint);
  4261. }
  4262. }
  4263. }
  4264. });
  4265. /***/ }),
  4266. /***/ 62193:
  4267. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  4268. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  4269. // Distributed under an MIT license: https://codemirror.net/LICENSE
  4270. // Depends on jsonlint.js from https://github.com/zaach/jsonlint
  4271. // declare global: jsonlint
  4272. (function(mod) {
  4273. if (true) // CommonJS
  4274. mod(__webpack_require__(4631));
  4275. else {}
  4276. })(function(CodeMirror) {
  4277. "use strict";
  4278. CodeMirror.registerHelper("lint", "json", function(text) {
  4279. var found = [];
  4280. if (!window.jsonlint) {
  4281. if (window.console) {
  4282. window.console.error("Error: window.jsonlint not defined, CodeMirror JSON linting cannot run.");
  4283. }
  4284. return found;
  4285. }
  4286. // for jsonlint's web dist jsonlint is exported as an object with a single property parser, of which parseError
  4287. // is a subproperty
  4288. var jsonlint = window.jsonlint.parser || window.jsonlint
  4289. jsonlint.parseError = function(str, hash) {
  4290. var loc = hash.loc;
  4291. found.push({from: CodeMirror.Pos(loc.first_line - 1, loc.first_column),
  4292. to: CodeMirror.Pos(loc.last_line - 1, loc.last_column),
  4293. message: str});
  4294. };
  4295. try { jsonlint.parse(text); }
  4296. catch(e) {}
  4297. return found;
  4298. });
  4299. });
  4300. /***/ }),
  4301. /***/ 3256:
  4302. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  4303. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  4304. // Distributed under an MIT license: https://codemirror.net/LICENSE
  4305. (function(mod) {
  4306. if (true) // CommonJS
  4307. mod(__webpack_require__(4631));
  4308. else {}
  4309. })(function(CodeMirror) {
  4310. "use strict";
  4311. var GUTTER_ID = "CodeMirror-lint-markers";
  4312. var LINT_LINE_ID = "CodeMirror-lint-line-";
  4313. function showTooltip(cm, e, content) {
  4314. var tt = document.createElement("div");
  4315. tt.className = "CodeMirror-lint-tooltip cm-s-" + cm.options.theme;
  4316. tt.appendChild(content.cloneNode(true));
  4317. if (cm.state.lint.options.selfContain)
  4318. cm.getWrapperElement().appendChild(tt);
  4319. else
  4320. document.body.appendChild(tt);
  4321. function position(e) {
  4322. if (!tt.parentNode) return CodeMirror.off(document, "mousemove", position);
  4323. tt.style.top = Math.max(0, e.clientY - tt.offsetHeight - 5) + "px";
  4324. tt.style.left = (e.clientX + 5) + "px";
  4325. }
  4326. CodeMirror.on(document, "mousemove", position);
  4327. position(e);
  4328. if (tt.style.opacity != null) tt.style.opacity = 1;
  4329. return tt;
  4330. }
  4331. function rm(elt) {
  4332. if (elt.parentNode) elt.parentNode.removeChild(elt);
  4333. }
  4334. function hideTooltip(tt) {
  4335. if (!tt.parentNode) return;
  4336. if (tt.style.opacity == null) rm(tt);
  4337. tt.style.opacity = 0;
  4338. setTimeout(function() { rm(tt); }, 600);
  4339. }
  4340. function showTooltipFor(cm, e, content, node) {
  4341. var tooltip = showTooltip(cm, e, content);
  4342. function hide() {
  4343. CodeMirror.off(node, "mouseout", hide);
  4344. if (tooltip) { hideTooltip(tooltip); tooltip = null; }
  4345. }
  4346. var poll = setInterval(function() {
  4347. if (tooltip) for (var n = node;; n = n.parentNode) {
  4348. if (n && n.nodeType == 11) n = n.host;
  4349. if (n == document.body) return;
  4350. if (!n) { hide(); break; }
  4351. }
  4352. if (!tooltip) return clearInterval(poll);
  4353. }, 400);
  4354. CodeMirror.on(node, "mouseout", hide);
  4355. }
  4356. function LintState(cm, conf, hasGutter) {
  4357. this.marked = [];
  4358. if (conf instanceof Function) conf = {getAnnotations: conf};
  4359. if (!conf || conf === true) conf = {};
  4360. this.options = {};
  4361. this.linterOptions = conf.options || {};
  4362. for (var prop in defaults) this.options[prop] = defaults[prop];
  4363. for (var prop in conf) {
  4364. if (defaults.hasOwnProperty(prop)) {
  4365. if (conf[prop] != null) this.options[prop] = conf[prop];
  4366. } else if (!conf.options) {
  4367. this.linterOptions[prop] = conf[prop];
  4368. }
  4369. }
  4370. this.timeout = null;
  4371. this.hasGutter = hasGutter;
  4372. this.onMouseOver = function(e) { onMouseOver(cm, e); };
  4373. this.waitingFor = 0
  4374. }
  4375. var defaults = {
  4376. highlightLines: false,
  4377. tooltips: true,
  4378. delay: 500,
  4379. lintOnChange: true,
  4380. getAnnotations: null,
  4381. async: false,
  4382. selfContain: null,
  4383. formatAnnotation: null,
  4384. onUpdateLinting: null
  4385. }
  4386. function clearMarks(cm) {
  4387. var state = cm.state.lint;
  4388. if (state.hasGutter) cm.clearGutter(GUTTER_ID);
  4389. if (state.options.highlightLines) clearErrorLines(cm);
  4390. for (var i = 0; i < state.marked.length; ++i)
  4391. state.marked[i].clear();
  4392. state.marked.length = 0;
  4393. }
  4394. function clearErrorLines(cm) {
  4395. cm.eachLine(function(line) {
  4396. var has = line.wrapClass && /\bCodeMirror-lint-line-\w+\b/.exec(line.wrapClass);
  4397. if (has) cm.removeLineClass(line, "wrap", has[0]);
  4398. })
  4399. }
  4400. function makeMarker(cm, labels, severity, multiple, tooltips) {
  4401. var marker = document.createElement("div"), inner = marker;
  4402. marker.className = "CodeMirror-lint-marker CodeMirror-lint-marker-" + severity;
  4403. if (multiple) {
  4404. inner = marker.appendChild(document.createElement("div"));
  4405. inner.className = "CodeMirror-lint-marker CodeMirror-lint-marker-multiple";
  4406. }
  4407. if (tooltips != false) CodeMirror.on(inner, "mouseover", function(e) {
  4408. showTooltipFor(cm, e, labels, inner);
  4409. });
  4410. return marker;
  4411. }
  4412. function getMaxSeverity(a, b) {
  4413. if (a == "error") return a;
  4414. else return b;
  4415. }
  4416. function groupByLine(annotations) {
  4417. var lines = [];
  4418. for (var i = 0; i < annotations.length; ++i) {
  4419. var ann = annotations[i], line = ann.from.line;
  4420. (lines[line] || (lines[line] = [])).push(ann);
  4421. }
  4422. return lines;
  4423. }
  4424. function annotationTooltip(ann) {
  4425. var severity = ann.severity;
  4426. if (!severity) severity = "error";
  4427. var tip = document.createElement("div");
  4428. tip.className = "CodeMirror-lint-message CodeMirror-lint-message-" + severity;
  4429. if (typeof ann.messageHTML != 'undefined') {
  4430. tip.innerHTML = ann.messageHTML;
  4431. } else {
  4432. tip.appendChild(document.createTextNode(ann.message));
  4433. }
  4434. return tip;
  4435. }
  4436. function lintAsync(cm, getAnnotations) {
  4437. var state = cm.state.lint
  4438. var id = ++state.waitingFor
  4439. function abort() {
  4440. id = -1
  4441. cm.off("change", abort)
  4442. }
  4443. cm.on("change", abort)
  4444. getAnnotations(cm.getValue(), function(annotations, arg2) {
  4445. cm.off("change", abort)
  4446. if (state.waitingFor != id) return
  4447. if (arg2 && annotations instanceof CodeMirror) annotations = arg2
  4448. cm.operation(function() {updateLinting(cm, annotations)})
  4449. }, state.linterOptions, cm);
  4450. }
  4451. function startLinting(cm) {
  4452. var state = cm.state.lint;
  4453. if (!state) return;
  4454. var options = state.options;
  4455. /*
  4456. * Passing rules in `options` property prevents JSHint (and other linters) from complaining
  4457. * about unrecognized rules like `onUpdateLinting`, `delay`, `lintOnChange`, etc.
  4458. */
  4459. var getAnnotations = options.getAnnotations || cm.getHelper(CodeMirror.Pos(0, 0), "lint");
  4460. if (!getAnnotations) return;
  4461. if (options.async || getAnnotations.async) {
  4462. lintAsync(cm, getAnnotations)
  4463. } else {
  4464. var annotations = getAnnotations(cm.getValue(), state.linterOptions, cm);
  4465. if (!annotations) return;
  4466. if (annotations.then) annotations.then(function(issues) {
  4467. cm.operation(function() {updateLinting(cm, issues)})
  4468. });
  4469. else cm.operation(function() {updateLinting(cm, annotations)})
  4470. }
  4471. }
  4472. function updateLinting(cm, annotationsNotSorted) {
  4473. var state = cm.state.lint;
  4474. if (!state) return;
  4475. var options = state.options;
  4476. clearMarks(cm);
  4477. var annotations = groupByLine(annotationsNotSorted);
  4478. for (var line = 0; line < annotations.length; ++line) {
  4479. var anns = annotations[line];
  4480. if (!anns) continue;
  4481. // filter out duplicate messages
  4482. var message = [];
  4483. anns = anns.filter(function(item) { return message.indexOf(item.message) > -1 ? false : message.push(item.message) });
  4484. var maxSeverity = null;
  4485. var tipLabel = state.hasGutter && document.createDocumentFragment();
  4486. for (var i = 0; i < anns.length; ++i) {
  4487. var ann = anns[i];
  4488. var severity = ann.severity;
  4489. if (!severity) severity = "error";
  4490. maxSeverity = getMaxSeverity(maxSeverity, severity);
  4491. if (options.formatAnnotation) ann = options.formatAnnotation(ann);
  4492. if (state.hasGutter) tipLabel.appendChild(annotationTooltip(ann));
  4493. if (ann.to) state.marked.push(cm.markText(ann.from, ann.to, {
  4494. className: "CodeMirror-lint-mark CodeMirror-lint-mark-" + severity,
  4495. __annotation: ann
  4496. }));
  4497. }
  4498. // use original annotations[line] to show multiple messages
  4499. if (state.hasGutter)
  4500. cm.setGutterMarker(line, GUTTER_ID, makeMarker(cm, tipLabel, maxSeverity, annotations[line].length > 1,
  4501. options.tooltips));
  4502. if (options.highlightLines)
  4503. cm.addLineClass(line, "wrap", LINT_LINE_ID + maxSeverity);
  4504. }
  4505. if (options.onUpdateLinting) options.onUpdateLinting(annotationsNotSorted, annotations, cm);
  4506. }
  4507. function onChange(cm) {
  4508. var state = cm.state.lint;
  4509. if (!state) return;
  4510. clearTimeout(state.timeout);
  4511. state.timeout = setTimeout(function(){startLinting(cm);}, state.options.delay);
  4512. }
  4513. function popupTooltips(cm, annotations, e) {
  4514. var target = e.target || e.srcElement;
  4515. var tooltip = document.createDocumentFragment();
  4516. for (var i = 0; i < annotations.length; i++) {
  4517. var ann = annotations[i];
  4518. tooltip.appendChild(annotationTooltip(ann));
  4519. }
  4520. showTooltipFor(cm, e, tooltip, target);
  4521. }
  4522. function onMouseOver(cm, e) {
  4523. var target = e.target || e.srcElement;
  4524. if (!/\bCodeMirror-lint-mark-/.test(target.className)) return;
  4525. var box = target.getBoundingClientRect(), x = (box.left + box.right) / 2, y = (box.top + box.bottom) / 2;
  4526. var spans = cm.findMarksAt(cm.coordsChar({left: x, top: y}, "client"));
  4527. var annotations = [];
  4528. for (var i = 0; i < spans.length; ++i) {
  4529. var ann = spans[i].__annotation;
  4530. if (ann) annotations.push(ann);
  4531. }
  4532. if (annotations.length) popupTooltips(cm, annotations, e);
  4533. }
  4534. CodeMirror.defineOption("lint", false, function(cm, val, old) {
  4535. if (old && old != CodeMirror.Init) {
  4536. clearMarks(cm);
  4537. if (cm.state.lint.options.lintOnChange !== false)
  4538. cm.off("change", onChange);
  4539. CodeMirror.off(cm.getWrapperElement(), "mouseover", cm.state.lint.onMouseOver);
  4540. clearTimeout(cm.state.lint.timeout);
  4541. delete cm.state.lint;
  4542. }
  4543. if (val) {
  4544. var gutters = cm.getOption("gutters"), hasLintGutter = false;
  4545. for (var i = 0; i < gutters.length; ++i) if (gutters[i] == GUTTER_ID) hasLintGutter = true;
  4546. var state = cm.state.lint = new LintState(cm, val, hasLintGutter);
  4547. if (state.options.lintOnChange)
  4548. cm.on("change", onChange);
  4549. if (state.options.tooltips != false && state.options.tooltips != "gutter")
  4550. CodeMirror.on(cm.getWrapperElement(), "mouseover", state.onMouseOver);
  4551. startLinting(cm);
  4552. }
  4553. });
  4554. CodeMirror.defineExtension("performLint", function() {
  4555. startLinting(this);
  4556. });
  4557. });
  4558. /***/ }),
  4559. /***/ 82783:
  4560. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  4561. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  4562. // Distributed under an MIT license: https://codemirror.net/LICENSE
  4563. (function(mod) {
  4564. if (true) // CommonJS
  4565. mod(__webpack_require__(4631));
  4566. else {}
  4567. })(function(CodeMirror) {
  4568. "use strict";
  4569. // Depends on js-yaml.js from https://github.com/nodeca/js-yaml
  4570. // declare global: jsyaml
  4571. CodeMirror.registerHelper("lint", "yaml", function(text) {
  4572. var found = [];
  4573. if (!window.jsyaml) {
  4574. if (window.console) {
  4575. window.console.error("Error: window.jsyaml not defined, CodeMirror YAML linting cannot run.");
  4576. }
  4577. return found;
  4578. }
  4579. try { jsyaml.loadAll(text); }
  4580. catch(e) {
  4581. var loc = e.mark,
  4582. // js-yaml YAMLException doesn't always provide an accurate lineno
  4583. // e.g., when there are multiple yaml docs
  4584. // ---
  4585. // ---
  4586. // foo:bar
  4587. from = loc ? CodeMirror.Pos(loc.line, loc.column) : CodeMirror.Pos(0, 0),
  4588. to = from;
  4589. found.push({ from: from, to: to, message: e.message });
  4590. }
  4591. return found;
  4592. });
  4593. });
  4594. /***/ }),
  4595. /***/ 87093:
  4596. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  4597. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  4598. // Distributed under an MIT license: https://codemirror.net/LICENSE
  4599. (function(mod) {
  4600. if (true) // CommonJS
  4601. mod(__webpack_require__(4631));
  4602. else {}
  4603. })(function(CodeMirror) {
  4604. "use strict";
  4605. CodeMirror.multiplexingMode = function(outer /*, others */) {
  4606. // Others should be {open, close, mode [, delimStyle] [, innerStyle] [, parseDelimiters]} objects
  4607. var others = Array.prototype.slice.call(arguments, 1);
  4608. function indexOf(string, pattern, from, returnEnd) {
  4609. if (typeof pattern == "string") {
  4610. var found = string.indexOf(pattern, from);
  4611. return returnEnd && found > -1 ? found + pattern.length : found;
  4612. }
  4613. var m = pattern.exec(from ? string.slice(from) : string);
  4614. return m ? m.index + from + (returnEnd ? m[0].length : 0) : -1;
  4615. }
  4616. return {
  4617. startState: function() {
  4618. return {
  4619. outer: CodeMirror.startState(outer),
  4620. innerActive: null,
  4621. inner: null,
  4622. startingInner: false
  4623. };
  4624. },
  4625. copyState: function(state) {
  4626. return {
  4627. outer: CodeMirror.copyState(outer, state.outer),
  4628. innerActive: state.innerActive,
  4629. inner: state.innerActive && CodeMirror.copyState(state.innerActive.mode, state.inner),
  4630. startingInner: state.startingInner
  4631. };
  4632. },
  4633. token: function(stream, state) {
  4634. if (!state.innerActive) {
  4635. var cutOff = Infinity, oldContent = stream.string;
  4636. for (var i = 0; i < others.length; ++i) {
  4637. var other = others[i];
  4638. var found = indexOf(oldContent, other.open, stream.pos);
  4639. if (found == stream.pos) {
  4640. if (!other.parseDelimiters) stream.match(other.open);
  4641. state.startingInner = !!other.parseDelimiters
  4642. state.innerActive = other;
  4643. // Get the outer indent, making sure to handle CodeMirror.Pass
  4644. var outerIndent = 0;
  4645. if (outer.indent) {
  4646. var possibleOuterIndent = outer.indent(state.outer, "", "");
  4647. if (possibleOuterIndent !== CodeMirror.Pass) outerIndent = possibleOuterIndent;
  4648. }
  4649. state.inner = CodeMirror.startState(other.mode, outerIndent);
  4650. return other.delimStyle && (other.delimStyle + " " + other.delimStyle + "-open");
  4651. } else if (found != -1 && found < cutOff) {
  4652. cutOff = found;
  4653. }
  4654. }
  4655. if (cutOff != Infinity) stream.string = oldContent.slice(0, cutOff);
  4656. var outerToken = outer.token(stream, state.outer);
  4657. if (cutOff != Infinity) stream.string = oldContent;
  4658. return outerToken;
  4659. } else {
  4660. var curInner = state.innerActive, oldContent = stream.string;
  4661. if (!curInner.close && stream.sol()) {
  4662. state.innerActive = state.inner = null;
  4663. return this.token(stream, state);
  4664. }
  4665. var found = curInner.close && !state.startingInner ?
  4666. indexOf(oldContent, curInner.close, stream.pos, curInner.parseDelimiters) : -1;
  4667. if (found == stream.pos && !curInner.parseDelimiters) {
  4668. stream.match(curInner.close);
  4669. state.innerActive = state.inner = null;
  4670. return curInner.delimStyle && (curInner.delimStyle + " " + curInner.delimStyle + "-close");
  4671. }
  4672. if (found > -1) stream.string = oldContent.slice(0, found);
  4673. var innerToken = curInner.mode.token(stream, state.inner);
  4674. if (found > -1) stream.string = oldContent;
  4675. else if (stream.pos > stream.start) state.startingInner = false
  4676. if (found == stream.pos && curInner.parseDelimiters)
  4677. state.innerActive = state.inner = null;
  4678. if (curInner.innerStyle) {
  4679. if (innerToken) innerToken = innerToken + " " + curInner.innerStyle;
  4680. else innerToken = curInner.innerStyle;
  4681. }
  4682. return innerToken;
  4683. }
  4684. },
  4685. indent: function(state, textAfter, line) {
  4686. var mode = state.innerActive ? state.innerActive.mode : outer;
  4687. if (!mode.indent) return CodeMirror.Pass;
  4688. return mode.indent(state.innerActive ? state.inner : state.outer, textAfter, line);
  4689. },
  4690. blankLine: function(state) {
  4691. var mode = state.innerActive ? state.innerActive.mode : outer;
  4692. if (mode.blankLine) {
  4693. mode.blankLine(state.innerActive ? state.inner : state.outer);
  4694. }
  4695. if (!state.innerActive) {
  4696. for (var i = 0; i < others.length; ++i) {
  4697. var other = others[i];
  4698. if (other.open === "\n") {
  4699. state.innerActive = other;
  4700. state.inner = CodeMirror.startState(other.mode, mode.indent ? mode.indent(state.outer, "", "") : 0);
  4701. }
  4702. }
  4703. } else if (state.innerActive.close === "\n") {
  4704. state.innerActive = state.inner = null;
  4705. }
  4706. },
  4707. electricChars: outer.electricChars,
  4708. innerMode: function(state) {
  4709. return state.inner ? {state: state.inner, mode: state.innerActive.mode} : {state: state.outer, mode: outer};
  4710. }
  4711. };
  4712. };
  4713. });
  4714. /***/ }),
  4715. /***/ 14146:
  4716. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  4717. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  4718. // Distributed under an MIT license: https://codemirror.net/LICENSE
  4719. // Utility function that allows modes to be combined. The mode given
  4720. // as the base argument takes care of most of the normal mode
  4721. // functionality, but a second (typically simple) mode is used, which
  4722. // can override the style of text. Both modes get to parse all of the
  4723. // text, but when both assign a non-null style to a piece of code, the
  4724. // overlay wins, unless the combine argument was true and not overridden,
  4725. // or state.overlay.combineTokens was true, in which case the styles are
  4726. // combined.
  4727. (function(mod) {
  4728. if (true) // CommonJS
  4729. mod(__webpack_require__(4631));
  4730. else {}
  4731. })(function(CodeMirror) {
  4732. "use strict";
  4733. CodeMirror.overlayMode = function(base, overlay, combine) {
  4734. return {
  4735. startState: function() {
  4736. return {
  4737. base: CodeMirror.startState(base),
  4738. overlay: CodeMirror.startState(overlay),
  4739. basePos: 0, baseCur: null,
  4740. overlayPos: 0, overlayCur: null,
  4741. streamSeen: null
  4742. };
  4743. },
  4744. copyState: function(state) {
  4745. return {
  4746. base: CodeMirror.copyState(base, state.base),
  4747. overlay: CodeMirror.copyState(overlay, state.overlay),
  4748. basePos: state.basePos, baseCur: null,
  4749. overlayPos: state.overlayPos, overlayCur: null
  4750. };
  4751. },
  4752. token: function(stream, state) {
  4753. if (stream != state.streamSeen ||
  4754. Math.min(state.basePos, state.overlayPos) < stream.start) {
  4755. state.streamSeen = stream;
  4756. state.basePos = state.overlayPos = stream.start;
  4757. }
  4758. if (stream.start == state.basePos) {
  4759. state.baseCur = base.token(stream, state.base);
  4760. state.basePos = stream.pos;
  4761. }
  4762. if (stream.start == state.overlayPos) {
  4763. stream.pos = stream.start;
  4764. state.overlayCur = overlay.token(stream, state.overlay);
  4765. state.overlayPos = stream.pos;
  4766. }
  4767. stream.pos = Math.min(state.basePos, state.overlayPos);
  4768. // state.overlay.combineTokens always takes precedence over combine,
  4769. // unless set to null
  4770. if (state.overlayCur == null) return state.baseCur;
  4771. else if (state.baseCur != null &&
  4772. state.overlay.combineTokens ||
  4773. combine && state.overlay.combineTokens == null)
  4774. return state.baseCur + " " + state.overlayCur;
  4775. else return state.overlayCur;
  4776. },
  4777. indent: base.indent && function(state, textAfter, line) {
  4778. return base.indent(state.base, textAfter, line);
  4779. },
  4780. electricChars: base.electricChars,
  4781. innerMode: function(state) { return {state: state.base, mode: base}; },
  4782. blankLine: function(state) {
  4783. var baseToken, overlayToken;
  4784. if (base.blankLine) baseToken = base.blankLine(state.base);
  4785. if (overlay.blankLine) overlayToken = overlay.blankLine(state.overlay);
  4786. return overlayToken == null ?
  4787. baseToken :
  4788. (combine && baseToken != null ? baseToken + " " + overlayToken : overlayToken);
  4789. }
  4790. };
  4791. };
  4792. });
  4793. /***/ }),
  4794. /***/ 20017:
  4795. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  4796. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  4797. // Distributed under an MIT license: https://codemirror.net/LICENSE
  4798. (function(mod) {
  4799. if (true) // CommonJS
  4800. mod(__webpack_require__(4631));
  4801. else {}
  4802. })(function(CodeMirror) {
  4803. "use strict";
  4804. var WRAP_CLASS = "CodeMirror-activeline";
  4805. var BACK_CLASS = "CodeMirror-activeline-background";
  4806. var GUTT_CLASS = "CodeMirror-activeline-gutter";
  4807. CodeMirror.defineOption("styleActiveLine", false, function(cm, val, old) {
  4808. var prev = old == CodeMirror.Init ? false : old;
  4809. if (val == prev) return
  4810. if (prev) {
  4811. cm.off("beforeSelectionChange", selectionChange);
  4812. clearActiveLines(cm);
  4813. delete cm.state.activeLines;
  4814. }
  4815. if (val) {
  4816. cm.state.activeLines = [];
  4817. updateActiveLines(cm, cm.listSelections());
  4818. cm.on("beforeSelectionChange", selectionChange);
  4819. }
  4820. });
  4821. function clearActiveLines(cm) {
  4822. for (var i = 0; i < cm.state.activeLines.length; i++) {
  4823. cm.removeLineClass(cm.state.activeLines[i], "wrap", WRAP_CLASS);
  4824. cm.removeLineClass(cm.state.activeLines[i], "background", BACK_CLASS);
  4825. cm.removeLineClass(cm.state.activeLines[i], "gutter", GUTT_CLASS);
  4826. }
  4827. }
  4828. function sameArray(a, b) {
  4829. if (a.length != b.length) return false;
  4830. for (var i = 0; i < a.length; i++)
  4831. if (a[i] != b[i]) return false;
  4832. return true;
  4833. }
  4834. function updateActiveLines(cm, ranges) {
  4835. var active = [];
  4836. for (var i = 0; i < ranges.length; i++) {
  4837. var range = ranges[i];
  4838. var option = cm.getOption("styleActiveLine");
  4839. if (typeof option == "object" && option.nonEmpty ? range.anchor.line != range.head.line : !range.empty())
  4840. continue
  4841. var line = cm.getLineHandleVisualStart(range.head.line);
  4842. if (active[active.length - 1] != line) active.push(line);
  4843. }
  4844. if (sameArray(cm.state.activeLines, active)) return;
  4845. cm.operation(function() {
  4846. clearActiveLines(cm);
  4847. for (var i = 0; i < active.length; i++) {
  4848. cm.addLineClass(active[i], "wrap", WRAP_CLASS);
  4849. cm.addLineClass(active[i], "background", BACK_CLASS);
  4850. cm.addLineClass(active[i], "gutter", GUTT_CLASS);
  4851. }
  4852. cm.state.activeLines = active;
  4853. });
  4854. }
  4855. function selectionChange(cm, sel) {
  4856. updateActiveLines(cm, sel.ranges);
  4857. }
  4858. });
  4859. /***/ }),
  4860. /***/ 4631:
  4861. /***/ (function(module) {
  4862. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  4863. // Distributed under an MIT license: https://codemirror.net/LICENSE
  4864. // This is CodeMirror (https://codemirror.net), a code editor
  4865. // implemented in JavaScript on top of the browser's DOM.
  4866. //
  4867. // You can find some technical background for some of the code below
  4868. // at http://marijnhaverbeke.nl/blog/#cm-internals .
  4869. (function (global, factory) {
  4870. true ? module.exports = factory() :
  4871. 0;
  4872. }(this, (function () { 'use strict';
  4873. // Kludges for bugs and behavior differences that can't be feature
  4874. // detected are enabled based on userAgent etc sniffing.
  4875. var userAgent = navigator.userAgent;
  4876. var platform = navigator.platform;
  4877. var gecko = /gecko\/\d/i.test(userAgent);
  4878. var ie_upto10 = /MSIE \d/.test(userAgent);
  4879. var ie_11up = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(userAgent);
  4880. var edge = /Edge\/(\d+)/.exec(userAgent);
  4881. var ie = ie_upto10 || ie_11up || edge;
  4882. var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : +(edge || ie_11up)[1]);
  4883. var webkit = !edge && /WebKit\//.test(userAgent);
  4884. var qtwebkit = webkit && /Qt\/\d+\.\d+/.test(userAgent);
  4885. var chrome = !edge && /Chrome\//.test(userAgent);
  4886. var presto = /Opera\//.test(userAgent);
  4887. var safari = /Apple Computer/.test(navigator.vendor);
  4888. var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(userAgent);
  4889. var phantom = /PhantomJS/.test(userAgent);
  4890. var ios = safari && (/Mobile\/\w+/.test(userAgent) || navigator.maxTouchPoints > 2);
  4891. var android = /Android/.test(userAgent);
  4892. // This is woefully incomplete. Suggestions for alternative methods welcome.
  4893. var mobile = ios || android || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent);
  4894. var mac = ios || /Mac/.test(platform);
  4895. var chromeOS = /\bCrOS\b/.test(userAgent);
  4896. var windows = /win/i.test(platform);
  4897. var presto_version = presto && userAgent.match(/Version\/(\d*\.\d*)/);
  4898. if (presto_version) { presto_version = Number(presto_version[1]); }
  4899. if (presto_version && presto_version >= 15) { presto = false; webkit = true; }
  4900. // Some browsers use the wrong event properties to signal cmd/ctrl on OS X
  4901. var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11));
  4902. var captureRightClick = gecko || (ie && ie_version >= 9);
  4903. function classTest(cls) { return new RegExp("(^|\\s)" + cls + "(?:$|\\s)\\s*") }
  4904. var rmClass = function(node, cls) {
  4905. var current = node.className;
  4906. var match = classTest(cls).exec(current);
  4907. if (match) {
  4908. var after = current.slice(match.index + match[0].length);
  4909. node.className = current.slice(0, match.index) + (after ? match[1] + after : "");
  4910. }
  4911. };
  4912. function removeChildren(e) {
  4913. for (var count = e.childNodes.length; count > 0; --count)
  4914. { e.removeChild(e.firstChild); }
  4915. return e
  4916. }
  4917. function removeChildrenAndAdd(parent, e) {
  4918. return removeChildren(parent).appendChild(e)
  4919. }
  4920. function elt(tag, content, className, style) {
  4921. var e = document.createElement(tag);
  4922. if (className) { e.className = className; }
  4923. if (style) { e.style.cssText = style; }
  4924. if (typeof content == "string") { e.appendChild(document.createTextNode(content)); }
  4925. else if (content) { for (var i = 0; i < content.length; ++i) { e.appendChild(content[i]); } }
  4926. return e
  4927. }
  4928. // wrapper for elt, which removes the elt from the accessibility tree
  4929. function eltP(tag, content, className, style) {
  4930. var e = elt(tag, content, className, style);
  4931. e.setAttribute("role", "presentation");
  4932. return e
  4933. }
  4934. var range;
  4935. if (document.createRange) { range = function(node, start, end, endNode) {
  4936. var r = document.createRange();
  4937. r.setEnd(endNode || node, end);
  4938. r.setStart(node, start);
  4939. return r
  4940. }; }
  4941. else { range = function(node, start, end) {
  4942. var r = document.body.createTextRange();
  4943. try { r.moveToElementText(node.parentNode); }
  4944. catch(e) { return r }
  4945. r.collapse(true);
  4946. r.moveEnd("character", end);
  4947. r.moveStart("character", start);
  4948. return r
  4949. }; }
  4950. function contains(parent, child) {
  4951. if (child.nodeType == 3) // Android browser always returns false when child is a textnode
  4952. { child = child.parentNode; }
  4953. if (parent.contains)
  4954. { return parent.contains(child) }
  4955. do {
  4956. if (child.nodeType == 11) { child = child.host; }
  4957. if (child == parent) { return true }
  4958. } while (child = child.parentNode)
  4959. }
  4960. function activeElt() {
  4961. // IE and Edge may throw an "Unspecified Error" when accessing document.activeElement.
  4962. // IE < 10 will throw when accessed while the page is loading or in an iframe.
  4963. // IE > 9 and Edge will throw when accessed in an iframe if document.body is unavailable.
  4964. var activeElement;
  4965. try {
  4966. activeElement = document.activeElement;
  4967. } catch(e) {
  4968. activeElement = document.body || null;
  4969. }
  4970. while (activeElement && activeElement.shadowRoot && activeElement.shadowRoot.activeElement)
  4971. { activeElement = activeElement.shadowRoot.activeElement; }
  4972. return activeElement
  4973. }
  4974. function addClass(node, cls) {
  4975. var current = node.className;
  4976. if (!classTest(cls).test(current)) { node.className += (current ? " " : "") + cls; }
  4977. }
  4978. function joinClasses(a, b) {
  4979. var as = a.split(" ");
  4980. for (var i = 0; i < as.length; i++)
  4981. { if (as[i] && !classTest(as[i]).test(b)) { b += " " + as[i]; } }
  4982. return b
  4983. }
  4984. var selectInput = function(node) { node.select(); };
  4985. if (ios) // Mobile Safari apparently has a bug where select() is broken.
  4986. { selectInput = function(node) { node.selectionStart = 0; node.selectionEnd = node.value.length; }; }
  4987. else if (ie) // Suppress mysterious IE10 errors
  4988. { selectInput = function(node) { try { node.select(); } catch(_e) {} }; }
  4989. function bind(f) {
  4990. var args = Array.prototype.slice.call(arguments, 1);
  4991. return function(){return f.apply(null, args)}
  4992. }
  4993. function copyObj(obj, target, overwrite) {
  4994. if (!target) { target = {}; }
  4995. for (var prop in obj)
  4996. { if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop)))
  4997. { target[prop] = obj[prop]; } }
  4998. return target
  4999. }
  5000. // Counts the column offset in a string, taking tabs into account.
  5001. // Used mostly to find indentation.
  5002. function countColumn(string, end, tabSize, startIndex, startValue) {
  5003. if (end == null) {
  5004. end = string.search(/[^\s\u00a0]/);
  5005. if (end == -1) { end = string.length; }
  5006. }
  5007. for (var i = startIndex || 0, n = startValue || 0;;) {
  5008. var nextTab = string.indexOf("\t", i);
  5009. if (nextTab < 0 || nextTab >= end)
  5010. { return n + (end - i) }
  5011. n += nextTab - i;
  5012. n += tabSize - (n % tabSize);
  5013. i = nextTab + 1;
  5014. }
  5015. }
  5016. var Delayed = function() {
  5017. this.id = null;
  5018. this.f = null;
  5019. this.time = 0;
  5020. this.handler = bind(this.onTimeout, this);
  5021. };
  5022. Delayed.prototype.onTimeout = function (self) {
  5023. self.id = 0;
  5024. if (self.time <= +new Date) {
  5025. self.f();
  5026. } else {
  5027. setTimeout(self.handler, self.time - +new Date);
  5028. }
  5029. };
  5030. Delayed.prototype.set = function (ms, f) {
  5031. this.f = f;
  5032. var time = +new Date + ms;
  5033. if (!this.id || time < this.time) {
  5034. clearTimeout(this.id);
  5035. this.id = setTimeout(this.handler, ms);
  5036. this.time = time;
  5037. }
  5038. };
  5039. function indexOf(array, elt) {
  5040. for (var i = 0; i < array.length; ++i)
  5041. { if (array[i] == elt) { return i } }
  5042. return -1
  5043. }
  5044. // Number of pixels added to scroller and sizer to hide scrollbar
  5045. var scrollerGap = 50;
  5046. // Returned or thrown by various protocols to signal 'I'm not
  5047. // handling this'.
  5048. var Pass = {toString: function(){return "CodeMirror.Pass"}};
  5049. // Reused option objects for setSelection & friends
  5050. var sel_dontScroll = {scroll: false}, sel_mouse = {origin: "*mouse"}, sel_move = {origin: "+move"};
  5051. // The inverse of countColumn -- find the offset that corresponds to
  5052. // a particular column.
  5053. function findColumn(string, goal, tabSize) {
  5054. for (var pos = 0, col = 0;;) {
  5055. var nextTab = string.indexOf("\t", pos);
  5056. if (nextTab == -1) { nextTab = string.length; }
  5057. var skipped = nextTab - pos;
  5058. if (nextTab == string.length || col + skipped >= goal)
  5059. { return pos + Math.min(skipped, goal - col) }
  5060. col += nextTab - pos;
  5061. col += tabSize - (col % tabSize);
  5062. pos = nextTab + 1;
  5063. if (col >= goal) { return pos }
  5064. }
  5065. }
  5066. var spaceStrs = [""];
  5067. function spaceStr(n) {
  5068. while (spaceStrs.length <= n)
  5069. { spaceStrs.push(lst(spaceStrs) + " "); }
  5070. return spaceStrs[n]
  5071. }
  5072. function lst(arr) { return arr[arr.length-1] }
  5073. function map(array, f) {
  5074. var out = [];
  5075. for (var i = 0; i < array.length; i++) { out[i] = f(array[i], i); }
  5076. return out
  5077. }
  5078. function insertSorted(array, value, score) {
  5079. var pos = 0, priority = score(value);
  5080. while (pos < array.length && score(array[pos]) <= priority) { pos++; }
  5081. array.splice(pos, 0, value);
  5082. }
  5083. function nothing() {}
  5084. function createObj(base, props) {
  5085. var inst;
  5086. if (Object.create) {
  5087. inst = Object.create(base);
  5088. } else {
  5089. nothing.prototype = base;
  5090. inst = new nothing();
  5091. }
  5092. if (props) { copyObj(props, inst); }
  5093. return inst
  5094. }
  5095. var nonASCIISingleCaseWordChar = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
  5096. function isWordCharBasic(ch) {
  5097. return /\w/.test(ch) || ch > "\x80" &&
  5098. (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch))
  5099. }
  5100. function isWordChar(ch, helper) {
  5101. if (!helper) { return isWordCharBasic(ch) }
  5102. if (helper.source.indexOf("\\w") > -1 && isWordCharBasic(ch)) { return true }
  5103. return helper.test(ch)
  5104. }
  5105. function isEmpty(obj) {
  5106. for (var n in obj) { if (obj.hasOwnProperty(n) && obj[n]) { return false } }
  5107. return true
  5108. }
  5109. // Extending unicode characters. A series of a non-extending char +
  5110. // any number of extending chars is treated as a single unit as far
  5111. // as editing and measuring is concerned. This is not fully correct,
  5112. // since some scripts/fonts/browsers also treat other configurations
  5113. // of code points as a group.
  5114. var extendingChars = /[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;
  5115. function isExtendingChar(ch) { return ch.charCodeAt(0) >= 768 && extendingChars.test(ch) }
  5116. // Returns a number from the range [`0`; `str.length`] unless `pos` is outside that range.
  5117. function skipExtendingChars(str, pos, dir) {
  5118. while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir; }
  5119. return pos
  5120. }
  5121. // Returns the value from the range [`from`; `to`] that satisfies
  5122. // `pred` and is closest to `from`. Assumes that at least `to`
  5123. // satisfies `pred`. Supports `from` being greater than `to`.
  5124. function findFirst(pred, from, to) {
  5125. // At any point we are certain `to` satisfies `pred`, don't know
  5126. // whether `from` does.
  5127. var dir = from > to ? -1 : 1;
  5128. for (;;) {
  5129. if (from == to) { return from }
  5130. var midF = (from + to) / 2, mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF);
  5131. if (mid == from) { return pred(mid) ? from : to }
  5132. if (pred(mid)) { to = mid; }
  5133. else { from = mid + dir; }
  5134. }
  5135. }
  5136. // BIDI HELPERS
  5137. function iterateBidiSections(order, from, to, f) {
  5138. if (!order) { return f(from, to, "ltr", 0) }
  5139. var found = false;
  5140. for (var i = 0; i < order.length; ++i) {
  5141. var part = order[i];
  5142. if (part.from < to && part.to > from || from == to && part.to == from) {
  5143. f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? "rtl" : "ltr", i);
  5144. found = true;
  5145. }
  5146. }
  5147. if (!found) { f(from, to, "ltr"); }
  5148. }
  5149. var bidiOther = null;
  5150. function getBidiPartAt(order, ch, sticky) {
  5151. var found;
  5152. bidiOther = null;
  5153. for (var i = 0; i < order.length; ++i) {
  5154. var cur = order[i];
  5155. if (cur.from < ch && cur.to > ch) { return i }
  5156. if (cur.to == ch) {
  5157. if (cur.from != cur.to && sticky == "before") { found = i; }
  5158. else { bidiOther = i; }
  5159. }
  5160. if (cur.from == ch) {
  5161. if (cur.from != cur.to && sticky != "before") { found = i; }
  5162. else { bidiOther = i; }
  5163. }
  5164. }
  5165. return found != null ? found : bidiOther
  5166. }
  5167. // Bidirectional ordering algorithm
  5168. // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm
  5169. // that this (partially) implements.
  5170. // One-char codes used for character types:
  5171. // L (L): Left-to-Right
  5172. // R (R): Right-to-Left
  5173. // r (AL): Right-to-Left Arabic
  5174. // 1 (EN): European Number
  5175. // + (ES): European Number Separator
  5176. // % (ET): European Number Terminator
  5177. // n (AN): Arabic Number
  5178. // , (CS): Common Number Separator
  5179. // m (NSM): Non-Spacing Mark
  5180. // b (BN): Boundary Neutral
  5181. // s (B): Paragraph Separator
  5182. // t (S): Segment Separator
  5183. // w (WS): Whitespace
  5184. // N (ON): Other Neutrals
  5185. // Returns null if characters are ordered as they appear
  5186. // (left-to-right), or an array of sections ({from, to, level}
  5187. // objects) in the order in which they occur visually.
  5188. var bidiOrdering = (function() {
  5189. // Character types for codepoints 0 to 0xff
  5190. var lowTypes = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN";
  5191. // Character types for codepoints 0x600 to 0x6f9
  5192. var arabicTypes = "nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";
  5193. function charType(code) {
  5194. if (code <= 0xf7) { return lowTypes.charAt(code) }
  5195. else if (0x590 <= code && code <= 0x5f4) { return "R" }
  5196. else if (0x600 <= code && code <= 0x6f9) { return arabicTypes.charAt(code - 0x600) }
  5197. else if (0x6ee <= code && code <= 0x8ac) { return "r" }
  5198. else if (0x2000 <= code && code <= 0x200b) { return "w" }
  5199. else if (code == 0x200c) { return "b" }
  5200. else { return "L" }
  5201. }
  5202. var bidiRE = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
  5203. var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/;
  5204. function BidiSpan(level, from, to) {
  5205. this.level = level;
  5206. this.from = from; this.to = to;
  5207. }
  5208. return function(str, direction) {
  5209. var outerType = direction == "ltr" ? "L" : "R";
  5210. if (str.length == 0 || direction == "ltr" && !bidiRE.test(str)) { return false }
  5211. var len = str.length, types = [];
  5212. for (var i = 0; i < len; ++i)
  5213. { types.push(charType(str.charCodeAt(i))); }
  5214. // W1. Examine each non-spacing mark (NSM) in the level run, and
  5215. // change the type of the NSM to the type of the previous
  5216. // character. If the NSM is at the start of the level run, it will
  5217. // get the type of sor.
  5218. for (var i$1 = 0, prev = outerType; i$1 < len; ++i$1) {
  5219. var type = types[i$1];
  5220. if (type == "m") { types[i$1] = prev; }
  5221. else { prev = type; }
  5222. }
  5223. // W2. Search backwards from each instance of a European number
  5224. // until the first strong type (R, L, AL, or sor) is found. If an
  5225. // AL is found, change the type of the European number to Arabic
  5226. // number.
  5227. // W3. Change all ALs to R.
  5228. for (var i$2 = 0, cur = outerType; i$2 < len; ++i$2) {
  5229. var type$1 = types[i$2];
  5230. if (type$1 == "1" && cur == "r") { types[i$2] = "n"; }
  5231. else if (isStrong.test(type$1)) { cur = type$1; if (type$1 == "r") { types[i$2] = "R"; } }
  5232. }
  5233. // W4. A single European separator between two European numbers
  5234. // changes to a European number. A single common separator between
  5235. // two numbers of the same type changes to that type.
  5236. for (var i$3 = 1, prev$1 = types[0]; i$3 < len - 1; ++i$3) {
  5237. var type$2 = types[i$3];
  5238. if (type$2 == "+" && prev$1 == "1" && types[i$3+1] == "1") { types[i$3] = "1"; }
  5239. else if (type$2 == "," && prev$1 == types[i$3+1] &&
  5240. (prev$1 == "1" || prev$1 == "n")) { types[i$3] = prev$1; }
  5241. prev$1 = type$2;
  5242. }
  5243. // W5. A sequence of European terminators adjacent to European
  5244. // numbers changes to all European numbers.
  5245. // W6. Otherwise, separators and terminators change to Other
  5246. // Neutral.
  5247. for (var i$4 = 0; i$4 < len; ++i$4) {
  5248. var type$3 = types[i$4];
  5249. if (type$3 == ",") { types[i$4] = "N"; }
  5250. else if (type$3 == "%") {
  5251. var end = (void 0);
  5252. for (end = i$4 + 1; end < len && types[end] == "%"; ++end) {}
  5253. var replace = (i$4 && types[i$4-1] == "!") || (end < len && types[end] == "1") ? "1" : "N";
  5254. for (var j = i$4; j < end; ++j) { types[j] = replace; }
  5255. i$4 = end - 1;
  5256. }
  5257. }
  5258. // W7. Search backwards from each instance of a European number
  5259. // until the first strong type (R, L, or sor) is found. If an L is
  5260. // found, then change the type of the European number to L.
  5261. for (var i$5 = 0, cur$1 = outerType; i$5 < len; ++i$5) {
  5262. var type$4 = types[i$5];
  5263. if (cur$1 == "L" && type$4 == "1") { types[i$5] = "L"; }
  5264. else if (isStrong.test(type$4)) { cur$1 = type$4; }
  5265. }
  5266. // N1. A sequence of neutrals takes the direction of the
  5267. // surrounding strong text if the text on both sides has the same
  5268. // direction. European and Arabic numbers act as if they were R in
  5269. // terms of their influence on neutrals. Start-of-level-run (sor)
  5270. // and end-of-level-run (eor) are used at level run boundaries.
  5271. // N2. Any remaining neutrals take the embedding direction.
  5272. for (var i$6 = 0; i$6 < len; ++i$6) {
  5273. if (isNeutral.test(types[i$6])) {
  5274. var end$1 = (void 0);
  5275. for (end$1 = i$6 + 1; end$1 < len && isNeutral.test(types[end$1]); ++end$1) {}
  5276. var before = (i$6 ? types[i$6-1] : outerType) == "L";
  5277. var after = (end$1 < len ? types[end$1] : outerType) == "L";
  5278. var replace$1 = before == after ? (before ? "L" : "R") : outerType;
  5279. for (var j$1 = i$6; j$1 < end$1; ++j$1) { types[j$1] = replace$1; }
  5280. i$6 = end$1 - 1;
  5281. }
  5282. }
  5283. // Here we depart from the documented algorithm, in order to avoid
  5284. // building up an actual levels array. Since there are only three
  5285. // levels (0, 1, 2) in an implementation that doesn't take
  5286. // explicit embedding into account, we can build up the order on
  5287. // the fly, without following the level-based algorithm.
  5288. var order = [], m;
  5289. for (var i$7 = 0; i$7 < len;) {
  5290. if (countsAsLeft.test(types[i$7])) {
  5291. var start = i$7;
  5292. for (++i$7; i$7 < len && countsAsLeft.test(types[i$7]); ++i$7) {}
  5293. order.push(new BidiSpan(0, start, i$7));
  5294. } else {
  5295. var pos = i$7, at = order.length, isRTL = direction == "rtl" ? 1 : 0;
  5296. for (++i$7; i$7 < len && types[i$7] != "L"; ++i$7) {}
  5297. for (var j$2 = pos; j$2 < i$7;) {
  5298. if (countsAsNum.test(types[j$2])) {
  5299. if (pos < j$2) { order.splice(at, 0, new BidiSpan(1, pos, j$2)); at += isRTL; }
  5300. var nstart = j$2;
  5301. for (++j$2; j$2 < i$7 && countsAsNum.test(types[j$2]); ++j$2) {}
  5302. order.splice(at, 0, new BidiSpan(2, nstart, j$2));
  5303. at += isRTL;
  5304. pos = j$2;
  5305. } else { ++j$2; }
  5306. }
  5307. if (pos < i$7) { order.splice(at, 0, new BidiSpan(1, pos, i$7)); }
  5308. }
  5309. }
  5310. if (direction == "ltr") {
  5311. if (order[0].level == 1 && (m = str.match(/^\s+/))) {
  5312. order[0].from = m[0].length;
  5313. order.unshift(new BidiSpan(0, 0, m[0].length));
  5314. }
  5315. if (lst(order).level == 1 && (m = str.match(/\s+$/))) {
  5316. lst(order).to -= m[0].length;
  5317. order.push(new BidiSpan(0, len - m[0].length, len));
  5318. }
  5319. }
  5320. return direction == "rtl" ? order.reverse() : order
  5321. }
  5322. })();
  5323. // Get the bidi ordering for the given line (and cache it). Returns
  5324. // false for lines that are fully left-to-right, and an array of
  5325. // BidiSpan objects otherwise.
  5326. function getOrder(line, direction) {
  5327. var order = line.order;
  5328. if (order == null) { order = line.order = bidiOrdering(line.text, direction); }
  5329. return order
  5330. }
  5331. // EVENT HANDLING
  5332. // Lightweight event framework. on/off also work on DOM nodes,
  5333. // registering native DOM handlers.
  5334. var noHandlers = [];
  5335. var on = function(emitter, type, f) {
  5336. if (emitter.addEventListener) {
  5337. emitter.addEventListener(type, f, false);
  5338. } else if (emitter.attachEvent) {
  5339. emitter.attachEvent("on" + type, f);
  5340. } else {
  5341. var map = emitter._handlers || (emitter._handlers = {});
  5342. map[type] = (map[type] || noHandlers).concat(f);
  5343. }
  5344. };
  5345. function getHandlers(emitter, type) {
  5346. return emitter._handlers && emitter._handlers[type] || noHandlers
  5347. }
  5348. function off(emitter, type, f) {
  5349. if (emitter.removeEventListener) {
  5350. emitter.removeEventListener(type, f, false);
  5351. } else if (emitter.detachEvent) {
  5352. emitter.detachEvent("on" + type, f);
  5353. } else {
  5354. var map = emitter._handlers, arr = map && map[type];
  5355. if (arr) {
  5356. var index = indexOf(arr, f);
  5357. if (index > -1)
  5358. { map[type] = arr.slice(0, index).concat(arr.slice(index + 1)); }
  5359. }
  5360. }
  5361. }
  5362. function signal(emitter, type /*, values...*/) {
  5363. var handlers = getHandlers(emitter, type);
  5364. if (!handlers.length) { return }
  5365. var args = Array.prototype.slice.call(arguments, 2);
  5366. for (var i = 0; i < handlers.length; ++i) { handlers[i].apply(null, args); }
  5367. }
  5368. // The DOM events that CodeMirror handles can be overridden by
  5369. // registering a (non-DOM) handler on the editor for the event name,
  5370. // and preventDefault-ing the event in that handler.
  5371. function signalDOMEvent(cm, e, override) {
  5372. if (typeof e == "string")
  5373. { e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; }
  5374. signal(cm, override || e.type, cm, e);
  5375. return e_defaultPrevented(e) || e.codemirrorIgnore
  5376. }
  5377. function signalCursorActivity(cm) {
  5378. var arr = cm._handlers && cm._handlers.cursorActivity;
  5379. if (!arr) { return }
  5380. var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []);
  5381. for (var i = 0; i < arr.length; ++i) { if (indexOf(set, arr[i]) == -1)
  5382. { set.push(arr[i]); } }
  5383. }
  5384. function hasHandler(emitter, type) {
  5385. return getHandlers(emitter, type).length > 0
  5386. }
  5387. // Add on and off methods to a constructor's prototype, to make
  5388. // registering events on such objects more convenient.
  5389. function eventMixin(ctor) {
  5390. ctor.prototype.on = function(type, f) {on(this, type, f);};
  5391. ctor.prototype.off = function(type, f) {off(this, type, f);};
  5392. }
  5393. // Due to the fact that we still support jurassic IE versions, some
  5394. // compatibility wrappers are needed.
  5395. function e_preventDefault(e) {
  5396. if (e.preventDefault) { e.preventDefault(); }
  5397. else { e.returnValue = false; }
  5398. }
  5399. function e_stopPropagation(e) {
  5400. if (e.stopPropagation) { e.stopPropagation(); }
  5401. else { e.cancelBubble = true; }
  5402. }
  5403. function e_defaultPrevented(e) {
  5404. return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false
  5405. }
  5406. function e_stop(e) {e_preventDefault(e); e_stopPropagation(e);}
  5407. function e_target(e) {return e.target || e.srcElement}
  5408. function e_button(e) {
  5409. var b = e.which;
  5410. if (b == null) {
  5411. if (e.button & 1) { b = 1; }
  5412. else if (e.button & 2) { b = 3; }
  5413. else if (e.button & 4) { b = 2; }
  5414. }
  5415. if (mac && e.ctrlKey && b == 1) { b = 3; }
  5416. return b
  5417. }
  5418. // Detect drag-and-drop
  5419. var dragAndDrop = function() {
  5420. // There is *some* kind of drag-and-drop support in IE6-8, but I
  5421. // couldn't get it to work yet.
  5422. if (ie && ie_version < 9) { return false }
  5423. var div = elt('div');
  5424. return "draggable" in div || "dragDrop" in div
  5425. }();
  5426. var zwspSupported;
  5427. function zeroWidthElement(measure) {
  5428. if (zwspSupported == null) {
  5429. var test = elt("span", "\u200b");
  5430. removeChildrenAndAdd(measure, elt("span", [test, document.createTextNode("x")]));
  5431. if (measure.firstChild.offsetHeight != 0)
  5432. { zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8); }
  5433. }
  5434. var node = zwspSupported ? elt("span", "\u200b") :
  5435. elt("span", "\u00a0", null, "display: inline-block; width: 1px; margin-right: -1px");
  5436. node.setAttribute("cm-text", "");
  5437. return node
  5438. }
  5439. // Feature-detect IE's crummy client rect reporting for bidi text
  5440. var badBidiRects;
  5441. function hasBadBidiRects(measure) {
  5442. if (badBidiRects != null) { return badBidiRects }
  5443. var txt = removeChildrenAndAdd(measure, document.createTextNode("A\u062eA"));
  5444. var r0 = range(txt, 0, 1).getBoundingClientRect();
  5445. var r1 = range(txt, 1, 2).getBoundingClientRect();
  5446. removeChildren(measure);
  5447. if (!r0 || r0.left == r0.right) { return false } // Safari returns null in some cases (#2780)
  5448. return badBidiRects = (r1.right - r0.right < 3)
  5449. }
  5450. // See if "".split is the broken IE version, if so, provide an
  5451. // alternative way to split lines.
  5452. var splitLinesAuto = "\n\nb".split(/\n/).length != 3 ? function (string) {
  5453. var pos = 0, result = [], l = string.length;
  5454. while (pos <= l) {
  5455. var nl = string.indexOf("\n", pos);
  5456. if (nl == -1) { nl = string.length; }
  5457. var line = string.slice(pos, string.charAt(nl - 1) == "\r" ? nl - 1 : nl);
  5458. var rt = line.indexOf("\r");
  5459. if (rt != -1) {
  5460. result.push(line.slice(0, rt));
  5461. pos += rt + 1;
  5462. } else {
  5463. result.push(line);
  5464. pos = nl + 1;
  5465. }
  5466. }
  5467. return result
  5468. } : function (string) { return string.split(/\r\n?|\n/); };
  5469. var hasSelection = window.getSelection ? function (te) {
  5470. try { return te.selectionStart != te.selectionEnd }
  5471. catch(e) { return false }
  5472. } : function (te) {
  5473. var range;
  5474. try {range = te.ownerDocument.selection.createRange();}
  5475. catch(e) {}
  5476. if (!range || range.parentElement() != te) { return false }
  5477. return range.compareEndPoints("StartToEnd", range) != 0
  5478. };
  5479. var hasCopyEvent = (function () {
  5480. var e = elt("div");
  5481. if ("oncopy" in e) { return true }
  5482. e.setAttribute("oncopy", "return;");
  5483. return typeof e.oncopy == "function"
  5484. })();
  5485. var badZoomedRects = null;
  5486. function hasBadZoomedRects(measure) {
  5487. if (badZoomedRects != null) { return badZoomedRects }
  5488. var node = removeChildrenAndAdd(measure, elt("span", "x"));
  5489. var normal = node.getBoundingClientRect();
  5490. var fromRange = range(node, 0, 1).getBoundingClientRect();
  5491. return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1
  5492. }
  5493. // Known modes, by name and by MIME
  5494. var modes = {}, mimeModes = {};
  5495. // Extra arguments are stored as the mode's dependencies, which is
  5496. // used by (legacy) mechanisms like loadmode.js to automatically
  5497. // load a mode. (Preferred mechanism is the require/define calls.)
  5498. function defineMode(name, mode) {
  5499. if (arguments.length > 2)
  5500. { mode.dependencies = Array.prototype.slice.call(arguments, 2); }
  5501. modes[name] = mode;
  5502. }
  5503. function defineMIME(mime, spec) {
  5504. mimeModes[mime] = spec;
  5505. }
  5506. // Given a MIME type, a {name, ...options} config object, or a name
  5507. // string, return a mode config object.
  5508. function resolveMode(spec) {
  5509. if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) {
  5510. spec = mimeModes[spec];
  5511. } else if (spec && typeof spec.name == "string" && mimeModes.hasOwnProperty(spec.name)) {
  5512. var found = mimeModes[spec.name];
  5513. if (typeof found == "string") { found = {name: found}; }
  5514. spec = createObj(found, spec);
  5515. spec.name = found.name;
  5516. } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec)) {
  5517. return resolveMode("application/xml")
  5518. } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+json$/.test(spec)) {
  5519. return resolveMode("application/json")
  5520. }
  5521. if (typeof spec == "string") { return {name: spec} }
  5522. else { return spec || {name: "null"} }
  5523. }
  5524. // Given a mode spec (anything that resolveMode accepts), find and
  5525. // initialize an actual mode object.
  5526. function getMode(options, spec) {
  5527. spec = resolveMode(spec);
  5528. var mfactory = modes[spec.name];
  5529. if (!mfactory) { return getMode(options, "text/plain") }
  5530. var modeObj = mfactory(options, spec);
  5531. if (modeExtensions.hasOwnProperty(spec.name)) {
  5532. var exts = modeExtensions[spec.name];
  5533. for (var prop in exts) {
  5534. if (!exts.hasOwnProperty(prop)) { continue }
  5535. if (modeObj.hasOwnProperty(prop)) { modeObj["_" + prop] = modeObj[prop]; }
  5536. modeObj[prop] = exts[prop];
  5537. }
  5538. }
  5539. modeObj.name = spec.name;
  5540. if (spec.helperType) { modeObj.helperType = spec.helperType; }
  5541. if (spec.modeProps) { for (var prop$1 in spec.modeProps)
  5542. { modeObj[prop$1] = spec.modeProps[prop$1]; } }
  5543. return modeObj
  5544. }
  5545. // This can be used to attach properties to mode objects from
  5546. // outside the actual mode definition.
  5547. var modeExtensions = {};
  5548. function extendMode(mode, properties) {
  5549. var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {});
  5550. copyObj(properties, exts);
  5551. }
  5552. function copyState(mode, state) {
  5553. if (state === true) { return state }
  5554. if (mode.copyState) { return mode.copyState(state) }
  5555. var nstate = {};
  5556. for (var n in state) {
  5557. var val = state[n];
  5558. if (val instanceof Array) { val = val.concat([]); }
  5559. nstate[n] = val;
  5560. }
  5561. return nstate
  5562. }
  5563. // Given a mode and a state (for that mode), find the inner mode and
  5564. // state at the position that the state refers to.
  5565. function innerMode(mode, state) {
  5566. var info;
  5567. while (mode.innerMode) {
  5568. info = mode.innerMode(state);
  5569. if (!info || info.mode == mode) { break }
  5570. state = info.state;
  5571. mode = info.mode;
  5572. }
  5573. return info || {mode: mode, state: state}
  5574. }
  5575. function startState(mode, a1, a2) {
  5576. return mode.startState ? mode.startState(a1, a2) : true
  5577. }
  5578. // STRING STREAM
  5579. // Fed to the mode parsers, provides helper functions to make
  5580. // parsers more succinct.
  5581. var StringStream = function(string, tabSize, lineOracle) {
  5582. this.pos = this.start = 0;
  5583. this.string = string;
  5584. this.tabSize = tabSize || 8;
  5585. this.lastColumnPos = this.lastColumnValue = 0;
  5586. this.lineStart = 0;
  5587. this.lineOracle = lineOracle;
  5588. };
  5589. StringStream.prototype.eol = function () {return this.pos >= this.string.length};
  5590. StringStream.prototype.sol = function () {return this.pos == this.lineStart};
  5591. StringStream.prototype.peek = function () {return this.string.charAt(this.pos) || undefined};
  5592. StringStream.prototype.next = function () {
  5593. if (this.pos < this.string.length)
  5594. { return this.string.charAt(this.pos++) }
  5595. };
  5596. StringStream.prototype.eat = function (match) {
  5597. var ch = this.string.charAt(this.pos);
  5598. var ok;
  5599. if (typeof match == "string") { ok = ch == match; }
  5600. else { ok = ch && (match.test ? match.test(ch) : match(ch)); }
  5601. if (ok) {++this.pos; return ch}
  5602. };
  5603. StringStream.prototype.eatWhile = function (match) {
  5604. var start = this.pos;
  5605. while (this.eat(match)){}
  5606. return this.pos > start
  5607. };
  5608. StringStream.prototype.eatSpace = function () {
  5609. var start = this.pos;
  5610. while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) { ++this.pos; }
  5611. return this.pos > start
  5612. };
  5613. StringStream.prototype.skipToEnd = function () {this.pos = this.string.length;};
  5614. StringStream.prototype.skipTo = function (ch) {
  5615. var found = this.string.indexOf(ch, this.pos);
  5616. if (found > -1) {this.pos = found; return true}
  5617. };
  5618. StringStream.prototype.backUp = function (n) {this.pos -= n;};
  5619. StringStream.prototype.column = function () {
  5620. if (this.lastColumnPos < this.start) {
  5621. this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue);
  5622. this.lastColumnPos = this.start;
  5623. }
  5624. return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)
  5625. };
  5626. StringStream.prototype.indentation = function () {
  5627. return countColumn(this.string, null, this.tabSize) -
  5628. (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)
  5629. };
  5630. StringStream.prototype.match = function (pattern, consume, caseInsensitive) {
  5631. if (typeof pattern == "string") {
  5632. var cased = function (str) { return caseInsensitive ? str.toLowerCase() : str; };
  5633. var substr = this.string.substr(this.pos, pattern.length);
  5634. if (cased(substr) == cased(pattern)) {
  5635. if (consume !== false) { this.pos += pattern.length; }
  5636. return true
  5637. }
  5638. } else {
  5639. var match = this.string.slice(this.pos).match(pattern);
  5640. if (match && match.index > 0) { return null }
  5641. if (match && consume !== false) { this.pos += match[0].length; }
  5642. return match
  5643. }
  5644. };
  5645. StringStream.prototype.current = function (){return this.string.slice(this.start, this.pos)};
  5646. StringStream.prototype.hideFirstChars = function (n, inner) {
  5647. this.lineStart += n;
  5648. try { return inner() }
  5649. finally { this.lineStart -= n; }
  5650. };
  5651. StringStream.prototype.lookAhead = function (n) {
  5652. var oracle = this.lineOracle;
  5653. return oracle && oracle.lookAhead(n)
  5654. };
  5655. StringStream.prototype.baseToken = function () {
  5656. var oracle = this.lineOracle;
  5657. return oracle && oracle.baseToken(this.pos)
  5658. };
  5659. // Find the line object corresponding to the given line number.
  5660. function getLine(doc, n) {
  5661. n -= doc.first;
  5662. if (n < 0 || n >= doc.size) { throw new Error("There is no line " + (n + doc.first) + " in the document.") }
  5663. var chunk = doc;
  5664. while (!chunk.lines) {
  5665. for (var i = 0;; ++i) {
  5666. var child = chunk.children[i], sz = child.chunkSize();
  5667. if (n < sz) { chunk = child; break }
  5668. n -= sz;
  5669. }
  5670. }
  5671. return chunk.lines[n]
  5672. }
  5673. // Get the part of a document between two positions, as an array of
  5674. // strings.
  5675. function getBetween(doc, start, end) {
  5676. var out = [], n = start.line;
  5677. doc.iter(start.line, end.line + 1, function (line) {
  5678. var text = line.text;
  5679. if (n == end.line) { text = text.slice(0, end.ch); }
  5680. if (n == start.line) { text = text.slice(start.ch); }
  5681. out.push(text);
  5682. ++n;
  5683. });
  5684. return out
  5685. }
  5686. // Get the lines between from and to, as array of strings.
  5687. function getLines(doc, from, to) {
  5688. var out = [];
  5689. doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value
  5690. return out
  5691. }
  5692. // Update the height of a line, propagating the height change
  5693. // upwards to parent nodes.
  5694. function updateLineHeight(line, height) {
  5695. var diff = height - line.height;
  5696. if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }
  5697. }
  5698. // Given a line object, find its line number by walking up through
  5699. // its parent links.
  5700. function lineNo(line) {
  5701. if (line.parent == null) { return null }
  5702. var cur = line.parent, no = indexOf(cur.lines, line);
  5703. for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {
  5704. for (var i = 0;; ++i) {
  5705. if (chunk.children[i] == cur) { break }
  5706. no += chunk.children[i].chunkSize();
  5707. }
  5708. }
  5709. return no + cur.first
  5710. }
  5711. // Find the line at the given vertical position, using the height
  5712. // information in the document tree.
  5713. function lineAtHeight(chunk, h) {
  5714. var n = chunk.first;
  5715. outer: do {
  5716. for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {
  5717. var child = chunk.children[i$1], ch = child.height;
  5718. if (h < ch) { chunk = child; continue outer }
  5719. h -= ch;
  5720. n += child.chunkSize();
  5721. }
  5722. return n
  5723. } while (!chunk.lines)
  5724. var i = 0;
  5725. for (; i < chunk.lines.length; ++i) {
  5726. var line = chunk.lines[i], lh = line.height;
  5727. if (h < lh) { break }
  5728. h -= lh;
  5729. }
  5730. return n + i
  5731. }
  5732. function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size}
  5733. function lineNumberFor(options, i) {
  5734. return String(options.lineNumberFormatter(i + options.firstLineNumber))
  5735. }
  5736. // A Pos instance represents a position within the text.
  5737. function Pos(line, ch, sticky) {
  5738. if ( sticky === void 0 ) sticky = null;
  5739. if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) }
  5740. this.line = line;
  5741. this.ch = ch;
  5742. this.sticky = sticky;
  5743. }
  5744. // Compare two positions, return 0 if they are the same, a negative
  5745. // number when a is less, and a positive number otherwise.
  5746. function cmp(a, b) { return a.line - b.line || a.ch - b.ch }
  5747. function equalCursorPos(a, b) { return a.sticky == b.sticky && cmp(a, b) == 0 }
  5748. function copyPos(x) {return Pos(x.line, x.ch)}
  5749. function maxPos(a, b) { return cmp(a, b) < 0 ? b : a }
  5750. function minPos(a, b) { return cmp(a, b) < 0 ? a : b }
  5751. // Most of the external API clips given positions to make sure they
  5752. // actually exist within the document.
  5753. function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1))}
  5754. function clipPos(doc, pos) {
  5755. if (pos.line < doc.first) { return Pos(doc.first, 0) }
  5756. var last = doc.first + doc.size - 1;
  5757. if (pos.line > last) { return Pos(last, getLine(doc, last).text.length) }
  5758. return clipToLen(pos, getLine(doc, pos.line).text.length)
  5759. }
  5760. function clipToLen(pos, linelen) {
  5761. var ch = pos.ch;
  5762. if (ch == null || ch > linelen) { return Pos(pos.line, linelen) }
  5763. else if (ch < 0) { return Pos(pos.line, 0) }
  5764. else { return pos }
  5765. }
  5766. function clipPosArray(doc, array) {
  5767. var out = [];
  5768. for (var i = 0; i < array.length; i++) { out[i] = clipPos(doc, array[i]); }
  5769. return out
  5770. }
  5771. var SavedContext = function(state, lookAhead) {
  5772. this.state = state;
  5773. this.lookAhead = lookAhead;
  5774. };
  5775. var Context = function(doc, state, line, lookAhead) {
  5776. this.state = state;
  5777. this.doc = doc;
  5778. this.line = line;
  5779. this.maxLookAhead = lookAhead || 0;
  5780. this.baseTokens = null;
  5781. this.baseTokenPos = 1;
  5782. };
  5783. Context.prototype.lookAhead = function (n) {
  5784. var line = this.doc.getLine(this.line + n);
  5785. if (line != null && n > this.maxLookAhead) { this.maxLookAhead = n; }
  5786. return line
  5787. };
  5788. Context.prototype.baseToken = function (n) {
  5789. if (!this.baseTokens) { return null }
  5790. while (this.baseTokens[this.baseTokenPos] <= n)
  5791. { this.baseTokenPos += 2; }
  5792. var type = this.baseTokens[this.baseTokenPos + 1];
  5793. return {type: type && type.replace(/( |^)overlay .*/, ""),
  5794. size: this.baseTokens[this.baseTokenPos] - n}
  5795. };
  5796. Context.prototype.nextLine = function () {
  5797. this.line++;
  5798. if (this.maxLookAhead > 0) { this.maxLookAhead--; }
  5799. };
  5800. Context.fromSaved = function (doc, saved, line) {
  5801. if (saved instanceof SavedContext)
  5802. { return new Context(doc, copyState(doc.mode, saved.state), line, saved.lookAhead) }
  5803. else
  5804. { return new Context(doc, copyState(doc.mode, saved), line) }
  5805. };
  5806. Context.prototype.save = function (copy) {
  5807. var state = copy !== false ? copyState(this.doc.mode, this.state) : this.state;
  5808. return this.maxLookAhead > 0 ? new SavedContext(state, this.maxLookAhead) : state
  5809. };
  5810. // Compute a style array (an array starting with a mode generation
  5811. // -- for invalidation -- followed by pairs of end positions and
  5812. // style strings), which is used to highlight the tokens on the
  5813. // line.
  5814. function highlightLine(cm, line, context, forceToEnd) {
  5815. // A styles array always starts with a number identifying the
  5816. // mode/overlays that it is based on (for easy invalidation).
  5817. var st = [cm.state.modeGen], lineClasses = {};
  5818. // Compute the base array of styles
  5819. runMode(cm, line.text, cm.doc.mode, context, function (end, style) { return st.push(end, style); },
  5820. lineClasses, forceToEnd);
  5821. var state = context.state;
  5822. // Run overlays, adjust style array.
  5823. var loop = function ( o ) {
  5824. context.baseTokens = st;
  5825. var overlay = cm.state.overlays[o], i = 1, at = 0;
  5826. context.state = true;
  5827. runMode(cm, line.text, overlay.mode, context, function (end, style) {
  5828. var start = i;
  5829. // Ensure there's a token end at the current position, and that i points at it
  5830. while (at < end) {
  5831. var i_end = st[i];
  5832. if (i_end > end)
  5833. { st.splice(i, 1, end, st[i+1], i_end); }
  5834. i += 2;
  5835. at = Math.min(end, i_end);
  5836. }
  5837. if (!style) { return }
  5838. if (overlay.opaque) {
  5839. st.splice(start, i - start, end, "overlay " + style);
  5840. i = start + 2;
  5841. } else {
  5842. for (; start < i; start += 2) {
  5843. var cur = st[start+1];
  5844. st[start+1] = (cur ? cur + " " : "") + "overlay " + style;
  5845. }
  5846. }
  5847. }, lineClasses);
  5848. context.state = state;
  5849. context.baseTokens = null;
  5850. context.baseTokenPos = 1;
  5851. };
  5852. for (var o = 0; o < cm.state.overlays.length; ++o) loop( o );
  5853. return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null}
  5854. }
  5855. function getLineStyles(cm, line, updateFrontier) {
  5856. if (!line.styles || line.styles[0] != cm.state.modeGen) {
  5857. var context = getContextBefore(cm, lineNo(line));
  5858. var resetState = line.text.length > cm.options.maxHighlightLength && copyState(cm.doc.mode, context.state);
  5859. var result = highlightLine(cm, line, context);
  5860. if (resetState) { context.state = resetState; }
  5861. line.stateAfter = context.save(!resetState);
  5862. line.styles = result.styles;
  5863. if (result.classes) { line.styleClasses = result.classes; }
  5864. else if (line.styleClasses) { line.styleClasses = null; }
  5865. if (updateFrontier === cm.doc.highlightFrontier)
  5866. { cm.doc.modeFrontier = Math.max(cm.doc.modeFrontier, ++cm.doc.highlightFrontier); }
  5867. }
  5868. return line.styles
  5869. }
  5870. function getContextBefore(cm, n, precise) {
  5871. var doc = cm.doc, display = cm.display;
  5872. if (!doc.mode.startState) { return new Context(doc, true, n) }
  5873. var start = findStartLine(cm, n, precise);
  5874. var saved = start > doc.first && getLine(doc, start - 1).stateAfter;
  5875. var context = saved ? Context.fromSaved(doc, saved, start) : new Context(doc, startState(doc.mode), start);
  5876. doc.iter(start, n, function (line) {
  5877. processLine(cm, line.text, context);
  5878. var pos = context.line;
  5879. line.stateAfter = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo ? context.save() : null;
  5880. context.nextLine();
  5881. });
  5882. if (precise) { doc.modeFrontier = context.line; }
  5883. return context
  5884. }
  5885. // Lightweight form of highlight -- proceed over this line and
  5886. // update state, but don't save a style array. Used for lines that
  5887. // aren't currently visible.
  5888. function processLine(cm, text, context, startAt) {
  5889. var mode = cm.doc.mode;
  5890. var stream = new StringStream(text, cm.options.tabSize, context);
  5891. stream.start = stream.pos = startAt || 0;
  5892. if (text == "") { callBlankLine(mode, context.state); }
  5893. while (!stream.eol()) {
  5894. readToken(mode, stream, context.state);
  5895. stream.start = stream.pos;
  5896. }
  5897. }
  5898. function callBlankLine(mode, state) {
  5899. if (mode.blankLine) { return mode.blankLine(state) }
  5900. if (!mode.innerMode) { return }
  5901. var inner = innerMode(mode, state);
  5902. if (inner.mode.blankLine) { return inner.mode.blankLine(inner.state) }
  5903. }
  5904. function readToken(mode, stream, state, inner) {
  5905. for (var i = 0; i < 10; i++) {
  5906. if (inner) { inner[0] = innerMode(mode, state).mode; }
  5907. var style = mode.token(stream, state);
  5908. if (stream.pos > stream.start) { return style }
  5909. }
  5910. throw new Error("Mode " + mode.name + " failed to advance stream.")
  5911. }
  5912. var Token = function(stream, type, state) {
  5913. this.start = stream.start; this.end = stream.pos;
  5914. this.string = stream.current();
  5915. this.type = type || null;
  5916. this.state = state;
  5917. };
  5918. // Utility for getTokenAt and getLineTokens
  5919. function takeToken(cm, pos, precise, asArray) {
  5920. var doc = cm.doc, mode = doc.mode, style;
  5921. pos = clipPos(doc, pos);
  5922. var line = getLine(doc, pos.line), context = getContextBefore(cm, pos.line, precise);
  5923. var stream = new StringStream(line.text, cm.options.tabSize, context), tokens;
  5924. if (asArray) { tokens = []; }
  5925. while ((asArray || stream.pos < pos.ch) && !stream.eol()) {
  5926. stream.start = stream.pos;
  5927. style = readToken(mode, stream, context.state);
  5928. if (asArray) { tokens.push(new Token(stream, style, copyState(doc.mode, context.state))); }
  5929. }
  5930. return asArray ? tokens : new Token(stream, style, context.state)
  5931. }
  5932. function extractLineClasses(type, output) {
  5933. if (type) { for (;;) {
  5934. var lineClass = type.match(/(?:^|\s+)line-(background-)?(\S+)/);
  5935. if (!lineClass) { break }
  5936. type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length);
  5937. var prop = lineClass[1] ? "bgClass" : "textClass";
  5938. if (output[prop] == null)
  5939. { output[prop] = lineClass[2]; }
  5940. else if (!(new RegExp("(?:^|\\s)" + lineClass[2] + "(?:$|\\s)")).test(output[prop]))
  5941. { output[prop] += " " + lineClass[2]; }
  5942. } }
  5943. return type
  5944. }
  5945. // Run the given mode's parser over a line, calling f for each token.
  5946. function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) {
  5947. var flattenSpans = mode.flattenSpans;
  5948. if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans; }
  5949. var curStart = 0, curStyle = null;
  5950. var stream = new StringStream(text, cm.options.tabSize, context), style;
  5951. var inner = cm.options.addModeClass && [null];
  5952. if (text == "") { extractLineClasses(callBlankLine(mode, context.state), lineClasses); }
  5953. while (!stream.eol()) {
  5954. if (stream.pos > cm.options.maxHighlightLength) {
  5955. flattenSpans = false;
  5956. if (forceToEnd) { processLine(cm, text, context, stream.pos); }
  5957. stream.pos = text.length;
  5958. style = null;
  5959. } else {
  5960. style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses);
  5961. }
  5962. if (inner) {
  5963. var mName = inner[0].name;
  5964. if (mName) { style = "m-" + (style ? mName + " " + style : mName); }
  5965. }
  5966. if (!flattenSpans || curStyle != style) {
  5967. while (curStart < stream.start) {
  5968. curStart = Math.min(stream.start, curStart + 5000);
  5969. f(curStart, curStyle);
  5970. }
  5971. curStyle = style;
  5972. }
  5973. stream.start = stream.pos;
  5974. }
  5975. while (curStart < stream.pos) {
  5976. // Webkit seems to refuse to render text nodes longer than 57444
  5977. // characters, and returns inaccurate measurements in nodes
  5978. // starting around 5000 chars.
  5979. var pos = Math.min(stream.pos, curStart + 5000);
  5980. f(pos, curStyle);
  5981. curStart = pos;
  5982. }
  5983. }
  5984. // Finds the line to start with when starting a parse. Tries to
  5985. // find a line with a stateAfter, so that it can start with a
  5986. // valid state. If that fails, it returns the line with the
  5987. // smallest indentation, which tends to need the least context to
  5988. // parse correctly.
  5989. function findStartLine(cm, n, precise) {
  5990. var minindent, minline, doc = cm.doc;
  5991. var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);
  5992. for (var search = n; search > lim; --search) {
  5993. if (search <= doc.first) { return doc.first }
  5994. var line = getLine(doc, search - 1), after = line.stateAfter;
  5995. if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier))
  5996. { return search }
  5997. var indented = countColumn(line.text, null, cm.options.tabSize);
  5998. if (minline == null || minindent > indented) {
  5999. minline = search - 1;
  6000. minindent = indented;
  6001. }
  6002. }
  6003. return minline
  6004. }
  6005. function retreatFrontier(doc, n) {
  6006. doc.modeFrontier = Math.min(doc.modeFrontier, n);
  6007. if (doc.highlightFrontier < n - 10) { return }
  6008. var start = doc.first;
  6009. for (var line = n - 1; line > start; line--) {
  6010. var saved = getLine(doc, line).stateAfter;
  6011. // change is on 3
  6012. // state on line 1 looked ahead 2 -- so saw 3
  6013. // test 1 + 2 < 3 should cover this
  6014. if (saved && (!(saved instanceof SavedContext) || line + saved.lookAhead < n)) {
  6015. start = line + 1;
  6016. break
  6017. }
  6018. }
  6019. doc.highlightFrontier = Math.min(doc.highlightFrontier, start);
  6020. }
  6021. // Optimize some code when these features are not used.
  6022. var sawReadOnlySpans = false, sawCollapsedSpans = false;
  6023. function seeReadOnlySpans() {
  6024. sawReadOnlySpans = true;
  6025. }
  6026. function seeCollapsedSpans() {
  6027. sawCollapsedSpans = true;
  6028. }
  6029. // TEXTMARKER SPANS
  6030. function MarkedSpan(marker, from, to) {
  6031. this.marker = marker;
  6032. this.from = from; this.to = to;
  6033. }
  6034. // Search an array of spans for a span matching the given marker.
  6035. function getMarkedSpanFor(spans, marker) {
  6036. if (spans) { for (var i = 0; i < spans.length; ++i) {
  6037. var span = spans[i];
  6038. if (span.marker == marker) { return span }
  6039. } }
  6040. }
  6041. // Remove a span from an array, returning undefined if no spans are
  6042. // left (we don't store arrays for lines without spans).
  6043. function removeMarkedSpan(spans, span) {
  6044. var r;
  6045. for (var i = 0; i < spans.length; ++i)
  6046. { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }
  6047. return r
  6048. }
  6049. // Add a span to a line.
  6050. function addMarkedSpan(line, span, op) {
  6051. var inThisOp = op && window.WeakSet && (op.markedSpans || (op.markedSpans = new WeakSet));
  6052. if (inThisOp && inThisOp.has(line.markedSpans)) {
  6053. line.markedSpans.push(span);
  6054. } else {
  6055. line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];
  6056. if (inThisOp) { inThisOp.add(line.markedSpans); }
  6057. }
  6058. span.marker.attachLine(line);
  6059. }
  6060. // Used for the algorithm that adjusts markers for a change in the
  6061. // document. These functions cut an array of spans at a given
  6062. // character position, returning an array of remaining chunks (or
  6063. // undefined if nothing remains).
  6064. function markedSpansBefore(old, startCh, isInsert) {
  6065. var nw;
  6066. if (old) { for (var i = 0; i < old.length; ++i) {
  6067. var span = old[i], marker = span.marker;
  6068. var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh);
  6069. if (startsBefore || span.from == startCh && marker.type == "bookmark" && (!isInsert || !span.marker.insertLeft)) {
  6070. var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh)
  6071. ;(nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to));
  6072. }
  6073. } }
  6074. return nw
  6075. }
  6076. function markedSpansAfter(old, endCh, isInsert) {
  6077. var nw;
  6078. if (old) { for (var i = 0; i < old.length; ++i) {
  6079. var span = old[i], marker = span.marker;
  6080. var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh);
  6081. if (endsAfter || span.from == endCh && marker.type == "bookmark" && (!isInsert || span.marker.insertLeft)) {
  6082. var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh)
  6083. ;(nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh,
  6084. span.to == null ? null : span.to - endCh));
  6085. }
  6086. } }
  6087. return nw
  6088. }
  6089. // Given a change object, compute the new set of marker spans that
  6090. // cover the line in which the change took place. Removes spans
  6091. // entirely within the change, reconnects spans belonging to the
  6092. // same marker that appear on both sides of the change, and cuts off
  6093. // spans partially within the change. Returns an array of span
  6094. // arrays with one element for each line in (after) the change.
  6095. function stretchSpansOverChange(doc, change) {
  6096. if (change.full) { return null }
  6097. var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;
  6098. var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;
  6099. if (!oldFirst && !oldLast) { return null }
  6100. var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;
  6101. // Get the spans that 'stick out' on both sides
  6102. var first = markedSpansBefore(oldFirst, startCh, isInsert);
  6103. var last = markedSpansAfter(oldLast, endCh, isInsert);
  6104. // Next, merge those two ends
  6105. var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);
  6106. if (first) {
  6107. // Fix up .to properties of first
  6108. for (var i = 0; i < first.length; ++i) {
  6109. var span = first[i];
  6110. if (span.to == null) {
  6111. var found = getMarkedSpanFor(last, span.marker);
  6112. if (!found) { span.to = startCh; }
  6113. else if (sameLine) { span.to = found.to == null ? null : found.to + offset; }
  6114. }
  6115. }
  6116. }
  6117. if (last) {
  6118. // Fix up .from in last (or move them into first in case of sameLine)
  6119. for (var i$1 = 0; i$1 < last.length; ++i$1) {
  6120. var span$1 = last[i$1];
  6121. if (span$1.to != null) { span$1.to += offset; }
  6122. if (span$1.from == null) {
  6123. var found$1 = getMarkedSpanFor(first, span$1.marker);
  6124. if (!found$1) {
  6125. span$1.from = offset;
  6126. if (sameLine) { (first || (first = [])).push(span$1); }
  6127. }
  6128. } else {
  6129. span$1.from += offset;
  6130. if (sameLine) { (first || (first = [])).push(span$1); }
  6131. }
  6132. }
  6133. }
  6134. // Make sure we didn't create any zero-length spans
  6135. if (first) { first = clearEmptySpans(first); }
  6136. if (last && last != first) { last = clearEmptySpans(last); }
  6137. var newMarkers = [first];
  6138. if (!sameLine) {
  6139. // Fill gap with whole-line-spans
  6140. var gap = change.text.length - 2, gapMarkers;
  6141. if (gap > 0 && first)
  6142. { for (var i$2 = 0; i$2 < first.length; ++i$2)
  6143. { if (first[i$2].to == null)
  6144. { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); } } }
  6145. for (var i$3 = 0; i$3 < gap; ++i$3)
  6146. { newMarkers.push(gapMarkers); }
  6147. newMarkers.push(last);
  6148. }
  6149. return newMarkers
  6150. }
  6151. // Remove spans that are empty and don't have a clearWhenEmpty
  6152. // option of false.
  6153. function clearEmptySpans(spans) {
  6154. for (var i = 0; i < spans.length; ++i) {
  6155. var span = spans[i];
  6156. if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)
  6157. { spans.splice(i--, 1); }
  6158. }
  6159. if (!spans.length) { return null }
  6160. return spans
  6161. }
  6162. // Used to 'clip' out readOnly ranges when making a change.
  6163. function removeReadOnlyRanges(doc, from, to) {
  6164. var markers = null;
  6165. doc.iter(from.line, to.line + 1, function (line) {
  6166. if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {
  6167. var mark = line.markedSpans[i].marker;
  6168. if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))
  6169. { (markers || (markers = [])).push(mark); }
  6170. } }
  6171. });
  6172. if (!markers) { return null }
  6173. var parts = [{from: from, to: to}];
  6174. for (var i = 0; i < markers.length; ++i) {
  6175. var mk = markers[i], m = mk.find(0);
  6176. for (var j = 0; j < parts.length; ++j) {
  6177. var p = parts[j];
  6178. if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue }
  6179. var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);
  6180. if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)
  6181. { newParts.push({from: p.from, to: m.from}); }
  6182. if (dto > 0 || !mk.inclusiveRight && !dto)
  6183. { newParts.push({from: m.to, to: p.to}); }
  6184. parts.splice.apply(parts, newParts);
  6185. j += newParts.length - 3;
  6186. }
  6187. }
  6188. return parts
  6189. }
  6190. // Connect or disconnect spans from a line.
  6191. function detachMarkedSpans(line) {
  6192. var spans = line.markedSpans;
  6193. if (!spans) { return }
  6194. for (var i = 0; i < spans.length; ++i)
  6195. { spans[i].marker.detachLine(line); }
  6196. line.markedSpans = null;
  6197. }
  6198. function attachMarkedSpans(line, spans) {
  6199. if (!spans) { return }
  6200. for (var i = 0; i < spans.length; ++i)
  6201. { spans[i].marker.attachLine(line); }
  6202. line.markedSpans = spans;
  6203. }
  6204. // Helpers used when computing which overlapping collapsed span
  6205. // counts as the larger one.
  6206. function extraLeft(marker) { return marker.inclusiveLeft ? -1 : 0 }
  6207. function extraRight(marker) { return marker.inclusiveRight ? 1 : 0 }
  6208. // Returns a number indicating which of two overlapping collapsed
  6209. // spans is larger (and thus includes the other). Falls back to
  6210. // comparing ids when the spans cover exactly the same range.
  6211. function compareCollapsedMarkers(a, b) {
  6212. var lenDiff = a.lines.length - b.lines.length;
  6213. if (lenDiff != 0) { return lenDiff }
  6214. var aPos = a.find(), bPos = b.find();
  6215. var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);
  6216. if (fromCmp) { return -fromCmp }
  6217. var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);
  6218. if (toCmp) { return toCmp }
  6219. return b.id - a.id
  6220. }
  6221. // Find out whether a line ends or starts in a collapsed span. If
  6222. // so, return the marker for that span.
  6223. function collapsedSpanAtSide(line, start) {
  6224. var sps = sawCollapsedSpans && line.markedSpans, found;
  6225. if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {
  6226. sp = sps[i];
  6227. if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&
  6228. (!found || compareCollapsedMarkers(found, sp.marker) < 0))
  6229. { found = sp.marker; }
  6230. } }
  6231. return found
  6232. }
  6233. function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true) }
  6234. function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false) }
  6235. function collapsedSpanAround(line, ch) {
  6236. var sps = sawCollapsedSpans && line.markedSpans, found;
  6237. if (sps) { for (var i = 0; i < sps.length; ++i) {
  6238. var sp = sps[i];
  6239. if (sp.marker.collapsed && (sp.from == null || sp.from < ch) && (sp.to == null || sp.to > ch) &&
  6240. (!found || compareCollapsedMarkers(found, sp.marker) < 0)) { found = sp.marker; }
  6241. } }
  6242. return found
  6243. }
  6244. // Test whether there exists a collapsed span that partially
  6245. // overlaps (covers the start or end, but not both) of a new span.
  6246. // Such overlap is not allowed.
  6247. function conflictingCollapsedRange(doc, lineNo, from, to, marker) {
  6248. var line = getLine(doc, lineNo);
  6249. var sps = sawCollapsedSpans && line.markedSpans;
  6250. if (sps) { for (var i = 0; i < sps.length; ++i) {
  6251. var sp = sps[i];
  6252. if (!sp.marker.collapsed) { continue }
  6253. var found = sp.marker.find(0);
  6254. var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);
  6255. var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);
  6256. if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }
  6257. if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||
  6258. fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))
  6259. { return true }
  6260. } }
  6261. }
  6262. // A visual line is a line as drawn on the screen. Folding, for
  6263. // example, can cause multiple logical lines to appear on the same
  6264. // visual line. This finds the start of the visual line that the
  6265. // given line is part of (usually that is the line itself).
  6266. function visualLine(line) {
  6267. var merged;
  6268. while (merged = collapsedSpanAtStart(line))
  6269. { line = merged.find(-1, true).line; }
  6270. return line
  6271. }
  6272. function visualLineEnd(line) {
  6273. var merged;
  6274. while (merged = collapsedSpanAtEnd(line))
  6275. { line = merged.find(1, true).line; }
  6276. return line
  6277. }
  6278. // Returns an array of logical lines that continue the visual line
  6279. // started by the argument, or undefined if there are no such lines.
  6280. function visualLineContinued(line) {
  6281. var merged, lines;
  6282. while (merged = collapsedSpanAtEnd(line)) {
  6283. line = merged.find(1, true).line
  6284. ;(lines || (lines = [])).push(line);
  6285. }
  6286. return lines
  6287. }
  6288. // Get the line number of the start of the visual line that the
  6289. // given line number is part of.
  6290. function visualLineNo(doc, lineN) {
  6291. var line = getLine(doc, lineN), vis = visualLine(line);
  6292. if (line == vis) { return lineN }
  6293. return lineNo(vis)
  6294. }
  6295. // Get the line number of the start of the next visual line after
  6296. // the given line.
  6297. function visualLineEndNo(doc, lineN) {
  6298. if (lineN > doc.lastLine()) { return lineN }
  6299. var line = getLine(doc, lineN), merged;
  6300. if (!lineIsHidden(doc, line)) { return lineN }
  6301. while (merged = collapsedSpanAtEnd(line))
  6302. { line = merged.find(1, true).line; }
  6303. return lineNo(line) + 1
  6304. }
  6305. // Compute whether a line is hidden. Lines count as hidden when they
  6306. // are part of a visual line that starts with another line, or when
  6307. // they are entirely covered by collapsed, non-widget span.
  6308. function lineIsHidden(doc, line) {
  6309. var sps = sawCollapsedSpans && line.markedSpans;
  6310. if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {
  6311. sp = sps[i];
  6312. if (!sp.marker.collapsed) { continue }
  6313. if (sp.from == null) { return true }
  6314. if (sp.marker.widgetNode) { continue }
  6315. if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))
  6316. { return true }
  6317. } }
  6318. }
  6319. function lineIsHiddenInner(doc, line, span) {
  6320. if (span.to == null) {
  6321. var end = span.marker.find(1, true);
  6322. return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker))
  6323. }
  6324. if (span.marker.inclusiveRight && span.to == line.text.length)
  6325. { return true }
  6326. for (var sp = (void 0), i = 0; i < line.markedSpans.length; ++i) {
  6327. sp = line.markedSpans[i];
  6328. if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to &&
  6329. (sp.to == null || sp.to != span.from) &&
  6330. (sp.marker.inclusiveLeft || span.marker.inclusiveRight) &&
  6331. lineIsHiddenInner(doc, line, sp)) { return true }
  6332. }
  6333. }
  6334. // Find the height above the given line.
  6335. function heightAtLine(lineObj) {
  6336. lineObj = visualLine(lineObj);
  6337. var h = 0, chunk = lineObj.parent;
  6338. for (var i = 0; i < chunk.lines.length; ++i) {
  6339. var line = chunk.lines[i];
  6340. if (line == lineObj) { break }
  6341. else { h += line.height; }
  6342. }
  6343. for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {
  6344. for (var i$1 = 0; i$1 < p.children.length; ++i$1) {
  6345. var cur = p.children[i$1];
  6346. if (cur == chunk) { break }
  6347. else { h += cur.height; }
  6348. }
  6349. }
  6350. return h
  6351. }
  6352. // Compute the character length of a line, taking into account
  6353. // collapsed ranges (see markText) that might hide parts, and join
  6354. // other lines onto it.
  6355. function lineLength(line) {
  6356. if (line.height == 0) { return 0 }
  6357. var len = line.text.length, merged, cur = line;
  6358. while (merged = collapsedSpanAtStart(cur)) {
  6359. var found = merged.find(0, true);
  6360. cur = found.from.line;
  6361. len += found.from.ch - found.to.ch;
  6362. }
  6363. cur = line;
  6364. while (merged = collapsedSpanAtEnd(cur)) {
  6365. var found$1 = merged.find(0, true);
  6366. len -= cur.text.length - found$1.from.ch;
  6367. cur = found$1.to.line;
  6368. len += cur.text.length - found$1.to.ch;
  6369. }
  6370. return len
  6371. }
  6372. // Find the longest line in the document.
  6373. function findMaxLine(cm) {
  6374. var d = cm.display, doc = cm.doc;
  6375. d.maxLine = getLine(doc, doc.first);
  6376. d.maxLineLength = lineLength(d.maxLine);
  6377. d.maxLineChanged = true;
  6378. doc.iter(function (line) {
  6379. var len = lineLength(line);
  6380. if (len > d.maxLineLength) {
  6381. d.maxLineLength = len;
  6382. d.maxLine = line;
  6383. }
  6384. });
  6385. }
  6386. // LINE DATA STRUCTURE
  6387. // Line objects. These hold state related to a line, including
  6388. // highlighting info (the styles array).
  6389. var Line = function(text, markedSpans, estimateHeight) {
  6390. this.text = text;
  6391. attachMarkedSpans(this, markedSpans);
  6392. this.height = estimateHeight ? estimateHeight(this) : 1;
  6393. };
  6394. Line.prototype.lineNo = function () { return lineNo(this) };
  6395. eventMixin(Line);
  6396. // Change the content (text, markers) of a line. Automatically
  6397. // invalidates cached information and tries to re-estimate the
  6398. // line's height.
  6399. function updateLine(line, text, markedSpans, estimateHeight) {
  6400. line.text = text;
  6401. if (line.stateAfter) { line.stateAfter = null; }
  6402. if (line.styles) { line.styles = null; }
  6403. if (line.order != null) { line.order = null; }
  6404. detachMarkedSpans(line);
  6405. attachMarkedSpans(line, markedSpans);
  6406. var estHeight = estimateHeight ? estimateHeight(line) : 1;
  6407. if (estHeight != line.height) { updateLineHeight(line, estHeight); }
  6408. }
  6409. // Detach a line from the document tree and its markers.
  6410. function cleanUpLine(line) {
  6411. line.parent = null;
  6412. detachMarkedSpans(line);
  6413. }
  6414. // Convert a style as returned by a mode (either null, or a string
  6415. // containing one or more styles) to a CSS style. This is cached,
  6416. // and also looks for line-wide styles.
  6417. var styleToClassCache = {}, styleToClassCacheWithMode = {};
  6418. function interpretTokenStyle(style, options) {
  6419. if (!style || /^\s*$/.test(style)) { return null }
  6420. var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache;
  6421. return cache[style] ||
  6422. (cache[style] = style.replace(/\S+/g, "cm-$&"))
  6423. }
  6424. // Render the DOM representation of the text of a line. Also builds
  6425. // up a 'line map', which points at the DOM nodes that represent
  6426. // specific stretches of text, and is used by the measuring code.
  6427. // The returned object contains the DOM node, this map, and
  6428. // information about line-wide styles that were set by the mode.
  6429. function buildLineContent(cm, lineView) {
  6430. // The padding-right forces the element to have a 'border', which
  6431. // is needed on Webkit to be able to get line-level bounding
  6432. // rectangles for it (in measureChar).
  6433. var content = eltP("span", null, null, webkit ? "padding-right: .1px" : null);
  6434. var builder = {pre: eltP("pre", [content], "CodeMirror-line"), content: content,
  6435. col: 0, pos: 0, cm: cm,
  6436. trailingSpace: false,
  6437. splitSpaces: cm.getOption("lineWrapping")};
  6438. lineView.measure = {};
  6439. // Iterate over the logical lines that make up this visual line.
  6440. for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) {
  6441. var line = i ? lineView.rest[i - 1] : lineView.line, order = (void 0);
  6442. builder.pos = 0;
  6443. builder.addToken = buildToken;
  6444. // Optionally wire in some hacks into the token-rendering
  6445. // algorithm, to deal with browser quirks.
  6446. if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line, cm.doc.direction)))
  6447. { builder.addToken = buildTokenBadBidi(builder.addToken, order); }
  6448. builder.map = [];
  6449. var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line);
  6450. insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate));
  6451. if (line.styleClasses) {
  6452. if (line.styleClasses.bgClass)
  6453. { builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || ""); }
  6454. if (line.styleClasses.textClass)
  6455. { builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || ""); }
  6456. }
  6457. // Ensure at least a single node is present, for measuring.
  6458. if (builder.map.length == 0)
  6459. { builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure))); }
  6460. // Store the map and a cache object for the current logical line
  6461. if (i == 0) {
  6462. lineView.measure.map = builder.map;
  6463. lineView.measure.cache = {};
  6464. } else {
  6465. (lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map)
  6466. ;(lineView.measure.caches || (lineView.measure.caches = [])).push({});
  6467. }
  6468. }
  6469. // See issue #2901
  6470. if (webkit) {
  6471. var last = builder.content.lastChild;
  6472. if (/\bcm-tab\b/.test(last.className) || (last.querySelector && last.querySelector(".cm-tab")))
  6473. { builder.content.className = "cm-tab-wrap-hack"; }
  6474. }
  6475. signal(cm, "renderLine", cm, lineView.line, builder.pre);
  6476. if (builder.pre.className)
  6477. { builder.textClass = joinClasses(builder.pre.className, builder.textClass || ""); }
  6478. return builder
  6479. }
  6480. function defaultSpecialCharPlaceholder(ch) {
  6481. var token = elt("span", "\u2022", "cm-invalidchar");
  6482. token.title = "\\u" + ch.charCodeAt(0).toString(16);
  6483. token.setAttribute("aria-label", token.title);
  6484. return token
  6485. }
  6486. // Build up the DOM representation for a single token, and add it to
  6487. // the line map. Takes care to render special characters separately.
  6488. function buildToken(builder, text, style, startStyle, endStyle, css, attributes) {
  6489. if (!text) { return }
  6490. var displayText = builder.splitSpaces ? splitSpaces(text, builder.trailingSpace) : text;
  6491. var special = builder.cm.state.specialChars, mustWrap = false;
  6492. var content;
  6493. if (!special.test(text)) {
  6494. builder.col += text.length;
  6495. content = document.createTextNode(displayText);
  6496. builder.map.push(builder.pos, builder.pos + text.length, content);
  6497. if (ie && ie_version < 9) { mustWrap = true; }
  6498. builder.pos += text.length;
  6499. } else {
  6500. content = document.createDocumentFragment();
  6501. var pos = 0;
  6502. while (true) {
  6503. special.lastIndex = pos;
  6504. var m = special.exec(text);
  6505. var skipped = m ? m.index - pos : text.length - pos;
  6506. if (skipped) {
  6507. var txt = document.createTextNode(displayText.slice(pos, pos + skipped));
  6508. if (ie && ie_version < 9) { content.appendChild(elt("span", [txt])); }
  6509. else { content.appendChild(txt); }
  6510. builder.map.push(builder.pos, builder.pos + skipped, txt);
  6511. builder.col += skipped;
  6512. builder.pos += skipped;
  6513. }
  6514. if (!m) { break }
  6515. pos += skipped + 1;
  6516. var txt$1 = (void 0);
  6517. if (m[0] == "\t") {
  6518. var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize;
  6519. txt$1 = content.appendChild(elt("span", spaceStr(tabWidth), "cm-tab"));
  6520. txt$1.setAttribute("role", "presentation");
  6521. txt$1.setAttribute("cm-text", "\t");
  6522. builder.col += tabWidth;
  6523. } else if (m[0] == "\r" || m[0] == "\n") {
  6524. txt$1 = content.appendChild(elt("span", m[0] == "\r" ? "\u240d" : "\u2424", "cm-invalidchar"));
  6525. txt$1.setAttribute("cm-text", m[0]);
  6526. builder.col += 1;
  6527. } else {
  6528. txt$1 = builder.cm.options.specialCharPlaceholder(m[0]);
  6529. txt$1.setAttribute("cm-text", m[0]);
  6530. if (ie && ie_version < 9) { content.appendChild(elt("span", [txt$1])); }
  6531. else { content.appendChild(txt$1); }
  6532. builder.col += 1;
  6533. }
  6534. builder.map.push(builder.pos, builder.pos + 1, txt$1);
  6535. builder.pos++;
  6536. }
  6537. }
  6538. builder.trailingSpace = displayText.charCodeAt(text.length - 1) == 32;
  6539. if (style || startStyle || endStyle || mustWrap || css || attributes) {
  6540. var fullStyle = style || "";
  6541. if (startStyle) { fullStyle += startStyle; }
  6542. if (endStyle) { fullStyle += endStyle; }
  6543. var token = elt("span", [content], fullStyle, css);
  6544. if (attributes) {
  6545. for (var attr in attributes) { if (attributes.hasOwnProperty(attr) && attr != "style" && attr != "class")
  6546. { token.setAttribute(attr, attributes[attr]); } }
  6547. }
  6548. return builder.content.appendChild(token)
  6549. }
  6550. builder.content.appendChild(content);
  6551. }
  6552. // Change some spaces to NBSP to prevent the browser from collapsing
  6553. // trailing spaces at the end of a line when rendering text (issue #1362).
  6554. function splitSpaces(text, trailingBefore) {
  6555. if (text.length > 1 && !/ /.test(text)) { return text }
  6556. var spaceBefore = trailingBefore, result = "";
  6557. for (var i = 0; i < text.length; i++) {
  6558. var ch = text.charAt(i);
  6559. if (ch == " " && spaceBefore && (i == text.length - 1 || text.charCodeAt(i + 1) == 32))
  6560. { ch = "\u00a0"; }
  6561. result += ch;
  6562. spaceBefore = ch == " ";
  6563. }
  6564. return result
  6565. }
  6566. // Work around nonsense dimensions being reported for stretches of
  6567. // right-to-left text.
  6568. function buildTokenBadBidi(inner, order) {
  6569. return function (builder, text, style, startStyle, endStyle, css, attributes) {
  6570. style = style ? style + " cm-force-border" : "cm-force-border";
  6571. var start = builder.pos, end = start + text.length;
  6572. for (;;) {
  6573. // Find the part that overlaps with the start of this text
  6574. var part = (void 0);
  6575. for (var i = 0; i < order.length; i++) {
  6576. part = order[i];
  6577. if (part.to > start && part.from <= start) { break }
  6578. }
  6579. if (part.to >= end) { return inner(builder, text, style, startStyle, endStyle, css, attributes) }
  6580. inner(builder, text.slice(0, part.to - start), style, startStyle, null, css, attributes);
  6581. startStyle = null;
  6582. text = text.slice(part.to - start);
  6583. start = part.to;
  6584. }
  6585. }
  6586. }
  6587. function buildCollapsedSpan(builder, size, marker, ignoreWidget) {
  6588. var widget = !ignoreWidget && marker.widgetNode;
  6589. if (widget) { builder.map.push(builder.pos, builder.pos + size, widget); }
  6590. if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) {
  6591. if (!widget)
  6592. { widget = builder.content.appendChild(document.createElement("span")); }
  6593. widget.setAttribute("cm-marker", marker.id);
  6594. }
  6595. if (widget) {
  6596. builder.cm.display.input.setUneditable(widget);
  6597. builder.content.appendChild(widget);
  6598. }
  6599. builder.pos += size;
  6600. builder.trailingSpace = false;
  6601. }
  6602. // Outputs a number of spans to make up a line, taking highlighting
  6603. // and marked text into account.
  6604. function insertLineContent(line, builder, styles) {
  6605. var spans = line.markedSpans, allText = line.text, at = 0;
  6606. if (!spans) {
  6607. for (var i$1 = 1; i$1 < styles.length; i$1+=2)
  6608. { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }
  6609. return
  6610. }
  6611. var len = allText.length, pos = 0, i = 1, text = "", style, css;
  6612. var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed, attributes;
  6613. for (;;) {
  6614. if (nextChange == pos) { // Update current marker set
  6615. spanStyle = spanEndStyle = spanStartStyle = css = "";
  6616. attributes = null;
  6617. collapsed = null; nextChange = Infinity;
  6618. var foundBookmarks = [], endStyles = (void 0);
  6619. for (var j = 0; j < spans.length; ++j) {
  6620. var sp = spans[j], m = sp.marker;
  6621. if (m.type == "bookmark" && sp.from == pos && m.widgetNode) {
  6622. foundBookmarks.push(m);
  6623. } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {
  6624. if (sp.to != null && sp.to != pos && nextChange > sp.to) {
  6625. nextChange = sp.to;
  6626. spanEndStyle = "";
  6627. }
  6628. if (m.className) { spanStyle += " " + m.className; }
  6629. if (m.css) { css = (css ? css + ";" : "") + m.css; }
  6630. if (m.startStyle && sp.from == pos) { spanStartStyle += " " + m.startStyle; }
  6631. if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }
  6632. // support for the old title property
  6633. // https://github.com/codemirror/CodeMirror/pull/5673
  6634. if (m.title) { (attributes || (attributes = {})).title = m.title; }
  6635. if (m.attributes) {
  6636. for (var attr in m.attributes)
  6637. { (attributes || (attributes = {}))[attr] = m.attributes[attr]; }
  6638. }
  6639. if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))
  6640. { collapsed = sp; }
  6641. } else if (sp.from > pos && nextChange > sp.from) {
  6642. nextChange = sp.from;
  6643. }
  6644. }
  6645. if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)
  6646. { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += " " + endStyles[j$1]; } } }
  6647. if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)
  6648. { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }
  6649. if (collapsed && (collapsed.from || 0) == pos) {
  6650. buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,
  6651. collapsed.marker, collapsed.from == null);
  6652. if (collapsed.to == null) { return }
  6653. if (collapsed.to == pos) { collapsed = false; }
  6654. }
  6655. }
  6656. if (pos >= len) { break }
  6657. var upto = Math.min(len, nextChange);
  6658. while (true) {
  6659. if (text) {
  6660. var end = pos + text.length;
  6661. if (!collapsed) {
  6662. var tokenText = end > upto ? text.slice(0, upto - pos) : text;
  6663. builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,
  6664. spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : "", css, attributes);
  6665. }
  6666. if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}
  6667. pos = end;
  6668. spanStartStyle = "";
  6669. }
  6670. text = allText.slice(at, at = styles[i++]);
  6671. style = interpretTokenStyle(styles[i++], builder.cm.options);
  6672. }
  6673. }
  6674. }
  6675. // These objects are used to represent the visible (currently drawn)
  6676. // part of the document. A LineView may correspond to multiple
  6677. // logical lines, if those are connected by collapsed ranges.
  6678. function LineView(doc, line, lineN) {
  6679. // The starting line
  6680. this.line = line;
  6681. // Continuing lines, if any
  6682. this.rest = visualLineContinued(line);
  6683. // Number of logical lines in this visual line
  6684. this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;
  6685. this.node = this.text = null;
  6686. this.hidden = lineIsHidden(doc, line);
  6687. }
  6688. // Create a range of LineView objects for the given lines.
  6689. function buildViewArray(cm, from, to) {
  6690. var array = [], nextPos;
  6691. for (var pos = from; pos < to; pos = nextPos) {
  6692. var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);
  6693. nextPos = pos + view.size;
  6694. array.push(view);
  6695. }
  6696. return array
  6697. }
  6698. var operationGroup = null;
  6699. function pushOperation(op) {
  6700. if (operationGroup) {
  6701. operationGroup.ops.push(op);
  6702. } else {
  6703. op.ownsGroup = operationGroup = {
  6704. ops: [op],
  6705. delayedCallbacks: []
  6706. };
  6707. }
  6708. }
  6709. function fireCallbacksForOps(group) {
  6710. // Calls delayed callbacks and cursorActivity handlers until no
  6711. // new ones appear
  6712. var callbacks = group.delayedCallbacks, i = 0;
  6713. do {
  6714. for (; i < callbacks.length; i++)
  6715. { callbacks[i].call(null); }
  6716. for (var j = 0; j < group.ops.length; j++) {
  6717. var op = group.ops[j];
  6718. if (op.cursorActivityHandlers)
  6719. { while (op.cursorActivityCalled < op.cursorActivityHandlers.length)
  6720. { op.cursorActivityHandlers[op.cursorActivityCalled++].call(null, op.cm); } }
  6721. }
  6722. } while (i < callbacks.length)
  6723. }
  6724. function finishOperation(op, endCb) {
  6725. var group = op.ownsGroup;
  6726. if (!group) { return }
  6727. try { fireCallbacksForOps(group); }
  6728. finally {
  6729. operationGroup = null;
  6730. endCb(group);
  6731. }
  6732. }
  6733. var orphanDelayedCallbacks = null;
  6734. // Often, we want to signal events at a point where we are in the
  6735. // middle of some work, but don't want the handler to start calling
  6736. // other methods on the editor, which might be in an inconsistent
  6737. // state or simply not expect any other events to happen.
  6738. // signalLater looks whether there are any handlers, and schedules
  6739. // them to be executed when the last operation ends, or, if no
  6740. // operation is active, when a timeout fires.
  6741. function signalLater(emitter, type /*, values...*/) {
  6742. var arr = getHandlers(emitter, type);
  6743. if (!arr.length) { return }
  6744. var args = Array.prototype.slice.call(arguments, 2), list;
  6745. if (operationGroup) {
  6746. list = operationGroup.delayedCallbacks;
  6747. } else if (orphanDelayedCallbacks) {
  6748. list = orphanDelayedCallbacks;
  6749. } else {
  6750. list = orphanDelayedCallbacks = [];
  6751. setTimeout(fireOrphanDelayed, 0);
  6752. }
  6753. var loop = function ( i ) {
  6754. list.push(function () { return arr[i].apply(null, args); });
  6755. };
  6756. for (var i = 0; i < arr.length; ++i)
  6757. loop( i );
  6758. }
  6759. function fireOrphanDelayed() {
  6760. var delayed = orphanDelayedCallbacks;
  6761. orphanDelayedCallbacks = null;
  6762. for (var i = 0; i < delayed.length; ++i) { delayed[i](); }
  6763. }
  6764. // When an aspect of a line changes, a string is added to
  6765. // lineView.changes. This updates the relevant part of the line's
  6766. // DOM structure.
  6767. function updateLineForChanges(cm, lineView, lineN, dims) {
  6768. for (var j = 0; j < lineView.changes.length; j++) {
  6769. var type = lineView.changes[j];
  6770. if (type == "text") { updateLineText(cm, lineView); }
  6771. else if (type == "gutter") { updateLineGutter(cm, lineView, lineN, dims); }
  6772. else if (type == "class") { updateLineClasses(cm, lineView); }
  6773. else if (type == "widget") { updateLineWidgets(cm, lineView, dims); }
  6774. }
  6775. lineView.changes = null;
  6776. }
  6777. // Lines with gutter elements, widgets or a background class need to
  6778. // be wrapped, and have the extra elements added to the wrapper div
  6779. function ensureLineWrapped(lineView) {
  6780. if (lineView.node == lineView.text) {
  6781. lineView.node = elt("div", null, null, "position: relative");
  6782. if (lineView.text.parentNode)
  6783. { lineView.text.parentNode.replaceChild(lineView.node, lineView.text); }
  6784. lineView.node.appendChild(lineView.text);
  6785. if (ie && ie_version < 8) { lineView.node.style.zIndex = 2; }
  6786. }
  6787. return lineView.node
  6788. }
  6789. function updateLineBackground(cm, lineView) {
  6790. var cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass;
  6791. if (cls) { cls += " CodeMirror-linebackground"; }
  6792. if (lineView.background) {
  6793. if (cls) { lineView.background.className = cls; }
  6794. else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; }
  6795. } else if (cls) {
  6796. var wrap = ensureLineWrapped(lineView);
  6797. lineView.background = wrap.insertBefore(elt("div", null, cls), wrap.firstChild);
  6798. cm.display.input.setUneditable(lineView.background);
  6799. }
  6800. }
  6801. // Wrapper around buildLineContent which will reuse the structure
  6802. // in display.externalMeasured when possible.
  6803. function getLineContent(cm, lineView) {
  6804. var ext = cm.display.externalMeasured;
  6805. if (ext && ext.line == lineView.line) {
  6806. cm.display.externalMeasured = null;
  6807. lineView.measure = ext.measure;
  6808. return ext.built
  6809. }
  6810. return buildLineContent(cm, lineView)
  6811. }
  6812. // Redraw the line's text. Interacts with the background and text
  6813. // classes because the mode may output tokens that influence these
  6814. // classes.
  6815. function updateLineText(cm, lineView) {
  6816. var cls = lineView.text.className;
  6817. var built = getLineContent(cm, lineView);
  6818. if (lineView.text == lineView.node) { lineView.node = built.pre; }
  6819. lineView.text.parentNode.replaceChild(built.pre, lineView.text);
  6820. lineView.text = built.pre;
  6821. if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) {
  6822. lineView.bgClass = built.bgClass;
  6823. lineView.textClass = built.textClass;
  6824. updateLineClasses(cm, lineView);
  6825. } else if (cls) {
  6826. lineView.text.className = cls;
  6827. }
  6828. }
  6829. function updateLineClasses(cm, lineView) {
  6830. updateLineBackground(cm, lineView);
  6831. if (lineView.line.wrapClass)
  6832. { ensureLineWrapped(lineView).className = lineView.line.wrapClass; }
  6833. else if (lineView.node != lineView.text)
  6834. { lineView.node.className = ""; }
  6835. var textClass = lineView.textClass ? lineView.textClass + " " + (lineView.line.textClass || "") : lineView.line.textClass;
  6836. lineView.text.className = textClass || "";
  6837. }
  6838. function updateLineGutter(cm, lineView, lineN, dims) {
  6839. if (lineView.gutter) {
  6840. lineView.node.removeChild(lineView.gutter);
  6841. lineView.gutter = null;
  6842. }
  6843. if (lineView.gutterBackground) {
  6844. lineView.node.removeChild(lineView.gutterBackground);
  6845. lineView.gutterBackground = null;
  6846. }
  6847. if (lineView.line.gutterClass) {
  6848. var wrap = ensureLineWrapped(lineView);
  6849. lineView.gutterBackground = elt("div", null, "CodeMirror-gutter-background " + lineView.line.gutterClass,
  6850. ("left: " + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px; width: " + (dims.gutterTotalWidth) + "px"));
  6851. cm.display.input.setUneditable(lineView.gutterBackground);
  6852. wrap.insertBefore(lineView.gutterBackground, lineView.text);
  6853. }
  6854. var markers = lineView.line.gutterMarkers;
  6855. if (cm.options.lineNumbers || markers) {
  6856. var wrap$1 = ensureLineWrapped(lineView);
  6857. var gutterWrap = lineView.gutter = elt("div", null, "CodeMirror-gutter-wrapper", ("left: " + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px"));
  6858. gutterWrap.setAttribute("aria-hidden", "true");
  6859. cm.display.input.setUneditable(gutterWrap);
  6860. wrap$1.insertBefore(gutterWrap, lineView.text);
  6861. if (lineView.line.gutterClass)
  6862. { gutterWrap.className += " " + lineView.line.gutterClass; }
  6863. if (cm.options.lineNumbers && (!markers || !markers["CodeMirror-linenumbers"]))
  6864. { lineView.lineNumber = gutterWrap.appendChild(
  6865. elt("div", lineNumberFor(cm.options, lineN),
  6866. "CodeMirror-linenumber CodeMirror-gutter-elt",
  6867. ("left: " + (dims.gutterLeft["CodeMirror-linenumbers"]) + "px; width: " + (cm.display.lineNumInnerWidth) + "px"))); }
  6868. if (markers) { for (var k = 0; k < cm.display.gutterSpecs.length; ++k) {
  6869. var id = cm.display.gutterSpecs[k].className, found = markers.hasOwnProperty(id) && markers[id];
  6870. if (found)
  6871. { gutterWrap.appendChild(elt("div", [found], "CodeMirror-gutter-elt",
  6872. ("left: " + (dims.gutterLeft[id]) + "px; width: " + (dims.gutterWidth[id]) + "px"))); }
  6873. } }
  6874. }
  6875. }
  6876. function updateLineWidgets(cm, lineView, dims) {
  6877. if (lineView.alignable) { lineView.alignable = null; }
  6878. var isWidget = classTest("CodeMirror-linewidget");
  6879. for (var node = lineView.node.firstChild, next = (void 0); node; node = next) {
  6880. next = node.nextSibling;
  6881. if (isWidget.test(node.className)) { lineView.node.removeChild(node); }
  6882. }
  6883. insertLineWidgets(cm, lineView, dims);
  6884. }
  6885. // Build a line's DOM representation from scratch
  6886. function buildLineElement(cm, lineView, lineN, dims) {
  6887. var built = getLineContent(cm, lineView);
  6888. lineView.text = lineView.node = built.pre;
  6889. if (built.bgClass) { lineView.bgClass = built.bgClass; }
  6890. if (built.textClass) { lineView.textClass = built.textClass; }
  6891. updateLineClasses(cm, lineView);
  6892. updateLineGutter(cm, lineView, lineN, dims);
  6893. insertLineWidgets(cm, lineView, dims);
  6894. return lineView.node
  6895. }
  6896. // A lineView may contain multiple logical lines (when merged by
  6897. // collapsed spans). The widgets for all of them need to be drawn.
  6898. function insertLineWidgets(cm, lineView, dims) {
  6899. insertLineWidgetsFor(cm, lineView.line, lineView, dims, true);
  6900. if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++)
  6901. { insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false); } }
  6902. }
  6903. function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) {
  6904. if (!line.widgets) { return }
  6905. var wrap = ensureLineWrapped(lineView);
  6906. for (var i = 0, ws = line.widgets; i < ws.length; ++i) {
  6907. var widget = ws[i], node = elt("div", [widget.node], "CodeMirror-linewidget" + (widget.className ? " " + widget.className : ""));
  6908. if (!widget.handleMouseEvents) { node.setAttribute("cm-ignore-events", "true"); }
  6909. positionLineWidget(widget, node, lineView, dims);
  6910. cm.display.input.setUneditable(node);
  6911. if (allowAbove && widget.above)
  6912. { wrap.insertBefore(node, lineView.gutter || lineView.text); }
  6913. else
  6914. { wrap.appendChild(node); }
  6915. signalLater(widget, "redraw");
  6916. }
  6917. }
  6918. function positionLineWidget(widget, node, lineView, dims) {
  6919. if (widget.noHScroll) {
  6920. (lineView.alignable || (lineView.alignable = [])).push(node);
  6921. var width = dims.wrapperWidth;
  6922. node.style.left = dims.fixedPos + "px";
  6923. if (!widget.coverGutter) {
  6924. width -= dims.gutterTotalWidth;
  6925. node.style.paddingLeft = dims.gutterTotalWidth + "px";
  6926. }
  6927. node.style.width = width + "px";
  6928. }
  6929. if (widget.coverGutter) {
  6930. node.style.zIndex = 5;
  6931. node.style.position = "relative";
  6932. if (!widget.noHScroll) { node.style.marginLeft = -dims.gutterTotalWidth + "px"; }
  6933. }
  6934. }
  6935. function widgetHeight(widget) {
  6936. if (widget.height != null) { return widget.height }
  6937. var cm = widget.doc.cm;
  6938. if (!cm) { return 0 }
  6939. if (!contains(document.body, widget.node)) {
  6940. var parentStyle = "position: relative;";
  6941. if (widget.coverGutter)
  6942. { parentStyle += "margin-left: -" + cm.display.gutters.offsetWidth + "px;"; }
  6943. if (widget.noHScroll)
  6944. { parentStyle += "width: " + cm.display.wrapper.clientWidth + "px;"; }
  6945. removeChildrenAndAdd(cm.display.measure, elt("div", [widget.node], null, parentStyle));
  6946. }
  6947. return widget.height = widget.node.parentNode.offsetHeight
  6948. }
  6949. // Return true when the given mouse event happened in a widget
  6950. function eventInWidget(display, e) {
  6951. for (var n = e_target(e); n != display.wrapper; n = n.parentNode) {
  6952. if (!n || (n.nodeType == 1 && n.getAttribute("cm-ignore-events") == "true") ||
  6953. (n.parentNode == display.sizer && n != display.mover))
  6954. { return true }
  6955. }
  6956. }
  6957. // POSITION MEASUREMENT
  6958. function paddingTop(display) {return display.lineSpace.offsetTop}
  6959. function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight}
  6960. function paddingH(display) {
  6961. if (display.cachedPaddingH) { return display.cachedPaddingH }
  6962. var e = removeChildrenAndAdd(display.measure, elt("pre", "x", "CodeMirror-line-like"));
  6963. var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle;
  6964. var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)};
  6965. if (!isNaN(data.left) && !isNaN(data.right)) { display.cachedPaddingH = data; }
  6966. return data
  6967. }
  6968. function scrollGap(cm) { return scrollerGap - cm.display.nativeBarWidth }
  6969. function displayWidth(cm) {
  6970. return cm.display.scroller.clientWidth - scrollGap(cm) - cm.display.barWidth
  6971. }
  6972. function displayHeight(cm) {
  6973. return cm.display.scroller.clientHeight - scrollGap(cm) - cm.display.barHeight
  6974. }
  6975. // Ensure the lineView.wrapping.heights array is populated. This is
  6976. // an array of bottom offsets for the lines that make up a drawn
  6977. // line. When lineWrapping is on, there might be more than one
  6978. // height.
  6979. function ensureLineHeights(cm, lineView, rect) {
  6980. var wrapping = cm.options.lineWrapping;
  6981. var curWidth = wrapping && displayWidth(cm);
  6982. if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) {
  6983. var heights = lineView.measure.heights = [];
  6984. if (wrapping) {
  6985. lineView.measure.width = curWidth;
  6986. var rects = lineView.text.firstChild.getClientRects();
  6987. for (var i = 0; i < rects.length - 1; i++) {
  6988. var cur = rects[i], next = rects[i + 1];
  6989. if (Math.abs(cur.bottom - next.bottom) > 2)
  6990. { heights.push((cur.bottom + next.top) / 2 - rect.top); }
  6991. }
  6992. }
  6993. heights.push(rect.bottom - rect.top);
  6994. }
  6995. }
  6996. // Find a line map (mapping character offsets to text nodes) and a
  6997. // measurement cache for the given line number. (A line view might
  6998. // contain multiple lines when collapsed ranges are present.)
  6999. function mapFromLineView(lineView, line, lineN) {
  7000. if (lineView.line == line)
  7001. { return {map: lineView.measure.map, cache: lineView.measure.cache} }
  7002. if (lineView.rest) {
  7003. for (var i = 0; i < lineView.rest.length; i++)
  7004. { if (lineView.rest[i] == line)
  7005. { return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i]} } }
  7006. for (var i$1 = 0; i$1 < lineView.rest.length; i$1++)
  7007. { if (lineNo(lineView.rest[i$1]) > lineN)
  7008. { return {map: lineView.measure.maps[i$1], cache: lineView.measure.caches[i$1], before: true} } }
  7009. }
  7010. }
  7011. // Render a line into the hidden node display.externalMeasured. Used
  7012. // when measurement is needed for a line that's not in the viewport.
  7013. function updateExternalMeasurement(cm, line) {
  7014. line = visualLine(line);
  7015. var lineN = lineNo(line);
  7016. var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN);
  7017. view.lineN = lineN;
  7018. var built = view.built = buildLineContent(cm, view);
  7019. view.text = built.pre;
  7020. removeChildrenAndAdd(cm.display.lineMeasure, built.pre);
  7021. return view
  7022. }
  7023. // Get a {top, bottom, left, right} box (in line-local coordinates)
  7024. // for a given character.
  7025. function measureChar(cm, line, ch, bias) {
  7026. return measureCharPrepared(cm, prepareMeasureForLine(cm, line), ch, bias)
  7027. }
  7028. // Find a line view that corresponds to the given line number.
  7029. function findViewForLine(cm, lineN) {
  7030. if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)
  7031. { return cm.display.view[findViewIndex(cm, lineN)] }
  7032. var ext = cm.display.externalMeasured;
  7033. if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)
  7034. { return ext }
  7035. }
  7036. // Measurement can be split in two steps, the set-up work that
  7037. // applies to the whole line, and the measurement of the actual
  7038. // character. Functions like coordsChar, that need to do a lot of
  7039. // measurements in a row, can thus ensure that the set-up work is
  7040. // only done once.
  7041. function prepareMeasureForLine(cm, line) {
  7042. var lineN = lineNo(line);
  7043. var view = findViewForLine(cm, lineN);
  7044. if (view && !view.text) {
  7045. view = null;
  7046. } else if (view && view.changes) {
  7047. updateLineForChanges(cm, view, lineN, getDimensions(cm));
  7048. cm.curOp.forceUpdate = true;
  7049. }
  7050. if (!view)
  7051. { view = updateExternalMeasurement(cm, line); }
  7052. var info = mapFromLineView(view, line, lineN);
  7053. return {
  7054. line: line, view: view, rect: null,
  7055. map: info.map, cache: info.cache, before: info.before,
  7056. hasHeights: false
  7057. }
  7058. }
  7059. // Given a prepared measurement object, measures the position of an
  7060. // actual character (or fetches it from the cache).
  7061. function measureCharPrepared(cm, prepared, ch, bias, varHeight) {
  7062. if (prepared.before) { ch = -1; }
  7063. var key = ch + (bias || ""), found;
  7064. if (prepared.cache.hasOwnProperty(key)) {
  7065. found = prepared.cache[key];
  7066. } else {
  7067. if (!prepared.rect)
  7068. { prepared.rect = prepared.view.text.getBoundingClientRect(); }
  7069. if (!prepared.hasHeights) {
  7070. ensureLineHeights(cm, prepared.view, prepared.rect);
  7071. prepared.hasHeights = true;
  7072. }
  7073. found = measureCharInner(cm, prepared, ch, bias);
  7074. if (!found.bogus) { prepared.cache[key] = found; }
  7075. }
  7076. return {left: found.left, right: found.right,
  7077. top: varHeight ? found.rtop : found.top,
  7078. bottom: varHeight ? found.rbottom : found.bottom}
  7079. }
  7080. var nullRect = {left: 0, right: 0, top: 0, bottom: 0};
  7081. function nodeAndOffsetInLineMap(map, ch, bias) {
  7082. var node, start, end, collapse, mStart, mEnd;
  7083. // First, search the line map for the text node corresponding to,
  7084. // or closest to, the target character.
  7085. for (var i = 0; i < map.length; i += 3) {
  7086. mStart = map[i];
  7087. mEnd = map[i + 1];
  7088. if (ch < mStart) {
  7089. start = 0; end = 1;
  7090. collapse = "left";
  7091. } else if (ch < mEnd) {
  7092. start = ch - mStart;
  7093. end = start + 1;
  7094. } else if (i == map.length - 3 || ch == mEnd && map[i + 3] > ch) {
  7095. end = mEnd - mStart;
  7096. start = end - 1;
  7097. if (ch >= mEnd) { collapse = "right"; }
  7098. }
  7099. if (start != null) {
  7100. node = map[i + 2];
  7101. if (mStart == mEnd && bias == (node.insertLeft ? "left" : "right"))
  7102. { collapse = bias; }
  7103. if (bias == "left" && start == 0)
  7104. { while (i && map[i - 2] == map[i - 3] && map[i - 1].insertLeft) {
  7105. node = map[(i -= 3) + 2];
  7106. collapse = "left";
  7107. } }
  7108. if (bias == "right" && start == mEnd - mStart)
  7109. { while (i < map.length - 3 && map[i + 3] == map[i + 4] && !map[i + 5].insertLeft) {
  7110. node = map[(i += 3) + 2];
  7111. collapse = "right";
  7112. } }
  7113. break
  7114. }
  7115. }
  7116. return {node: node, start: start, end: end, collapse: collapse, coverStart: mStart, coverEnd: mEnd}
  7117. }
  7118. function getUsefulRect(rects, bias) {
  7119. var rect = nullRect;
  7120. if (bias == "left") { for (var i = 0; i < rects.length; i++) {
  7121. if ((rect = rects[i]).left != rect.right) { break }
  7122. } } else { for (var i$1 = rects.length - 1; i$1 >= 0; i$1--) {
  7123. if ((rect = rects[i$1]).left != rect.right) { break }
  7124. } }
  7125. return rect
  7126. }
  7127. function measureCharInner(cm, prepared, ch, bias) {
  7128. var place = nodeAndOffsetInLineMap(prepared.map, ch, bias);
  7129. var node = place.node, start = place.start, end = place.end, collapse = place.collapse;
  7130. var rect;
  7131. if (node.nodeType == 3) { // If it is a text node, use a range to retrieve the coordinates.
  7132. for (var i$1 = 0; i$1 < 4; i$1++) { // Retry a maximum of 4 times when nonsense rectangles are returned
  7133. while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) { --start; }
  7134. while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) { ++end; }
  7135. if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart)
  7136. { rect = node.parentNode.getBoundingClientRect(); }
  7137. else
  7138. { rect = getUsefulRect(range(node, start, end).getClientRects(), bias); }
  7139. if (rect.left || rect.right || start == 0) { break }
  7140. end = start;
  7141. start = start - 1;
  7142. collapse = "right";
  7143. }
  7144. if (ie && ie_version < 11) { rect = maybeUpdateRectForZooming(cm.display.measure, rect); }
  7145. } else { // If it is a widget, simply get the box for the whole widget.
  7146. if (start > 0) { collapse = bias = "right"; }
  7147. var rects;
  7148. if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1)
  7149. { rect = rects[bias == "right" ? rects.length - 1 : 0]; }
  7150. else
  7151. { rect = node.getBoundingClientRect(); }
  7152. }
  7153. if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) {
  7154. var rSpan = node.parentNode.getClientRects()[0];
  7155. if (rSpan)
  7156. { rect = {left: rSpan.left, right: rSpan.left + charWidth(cm.display), top: rSpan.top, bottom: rSpan.bottom}; }
  7157. else
  7158. { rect = nullRect; }
  7159. }
  7160. var rtop = rect.top - prepared.rect.top, rbot = rect.bottom - prepared.rect.top;
  7161. var mid = (rtop + rbot) / 2;
  7162. var heights = prepared.view.measure.heights;
  7163. var i = 0;
  7164. for (; i < heights.length - 1; i++)
  7165. { if (mid < heights[i]) { break } }
  7166. var top = i ? heights[i - 1] : 0, bot = heights[i];
  7167. var result = {left: (collapse == "right" ? rect.right : rect.left) - prepared.rect.left,
  7168. right: (collapse == "left" ? rect.left : rect.right) - prepared.rect.left,
  7169. top: top, bottom: bot};
  7170. if (!rect.left && !rect.right) { result.bogus = true; }
  7171. if (!cm.options.singleCursorHeightPerLine) { result.rtop = rtop; result.rbottom = rbot; }
  7172. return result
  7173. }
  7174. // Work around problem with bounding client rects on ranges being
  7175. // returned incorrectly when zoomed on IE10 and below.
  7176. function maybeUpdateRectForZooming(measure, rect) {
  7177. if (!window.screen || screen.logicalXDPI == null ||
  7178. screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure))
  7179. { return rect }
  7180. var scaleX = screen.logicalXDPI / screen.deviceXDPI;
  7181. var scaleY = screen.logicalYDPI / screen.deviceYDPI;
  7182. return {left: rect.left * scaleX, right: rect.right * scaleX,
  7183. top: rect.top * scaleY, bottom: rect.bottom * scaleY}
  7184. }
  7185. function clearLineMeasurementCacheFor(lineView) {
  7186. if (lineView.measure) {
  7187. lineView.measure.cache = {};
  7188. lineView.measure.heights = null;
  7189. if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++)
  7190. { lineView.measure.caches[i] = {}; } }
  7191. }
  7192. }
  7193. function clearLineMeasurementCache(cm) {
  7194. cm.display.externalMeasure = null;
  7195. removeChildren(cm.display.lineMeasure);
  7196. for (var i = 0; i < cm.display.view.length; i++)
  7197. { clearLineMeasurementCacheFor(cm.display.view[i]); }
  7198. }
  7199. function clearCaches(cm) {
  7200. clearLineMeasurementCache(cm);
  7201. cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null;
  7202. if (!cm.options.lineWrapping) { cm.display.maxLineChanged = true; }
  7203. cm.display.lineNumChars = null;
  7204. }
  7205. function pageScrollX() {
  7206. // Work around https://bugs.chromium.org/p/chromium/issues/detail?id=489206
  7207. // which causes page_Offset and bounding client rects to use
  7208. // different reference viewports and invalidate our calculations.
  7209. if (chrome && android) { return -(document.body.getBoundingClientRect().left - parseInt(getComputedStyle(document.body).marginLeft)) }
  7210. return window.pageXOffset || (document.documentElement || document.body).scrollLeft
  7211. }
  7212. function pageScrollY() {
  7213. if (chrome && android) { return -(document.body.getBoundingClientRect().top - parseInt(getComputedStyle(document.body).marginTop)) }
  7214. return window.pageYOffset || (document.documentElement || document.body).scrollTop
  7215. }
  7216. function widgetTopHeight(lineObj) {
  7217. var ref = visualLine(lineObj);
  7218. var widgets = ref.widgets;
  7219. var height = 0;
  7220. if (widgets) { for (var i = 0; i < widgets.length; ++i) { if (widgets[i].above)
  7221. { height += widgetHeight(widgets[i]); } } }
  7222. return height
  7223. }
  7224. // Converts a {top, bottom, left, right} box from line-local
  7225. // coordinates into another coordinate system. Context may be one of
  7226. // "line", "div" (display.lineDiv), "local"./null (editor), "window",
  7227. // or "page".
  7228. function intoCoordSystem(cm, lineObj, rect, context, includeWidgets) {
  7229. if (!includeWidgets) {
  7230. var height = widgetTopHeight(lineObj);
  7231. rect.top += height; rect.bottom += height;
  7232. }
  7233. if (context == "line") { return rect }
  7234. if (!context) { context = "local"; }
  7235. var yOff = heightAtLine(lineObj);
  7236. if (context == "local") { yOff += paddingTop(cm.display); }
  7237. else { yOff -= cm.display.viewOffset; }
  7238. if (context == "page" || context == "window") {
  7239. var lOff = cm.display.lineSpace.getBoundingClientRect();
  7240. yOff += lOff.top + (context == "window" ? 0 : pageScrollY());
  7241. var xOff = lOff.left + (context == "window" ? 0 : pageScrollX());
  7242. rect.left += xOff; rect.right += xOff;
  7243. }
  7244. rect.top += yOff; rect.bottom += yOff;
  7245. return rect
  7246. }
  7247. // Coverts a box from "div" coords to another coordinate system.
  7248. // Context may be "window", "page", "div", or "local"./null.
  7249. function fromCoordSystem(cm, coords, context) {
  7250. if (context == "div") { return coords }
  7251. var left = coords.left, top = coords.top;
  7252. // First move into "page" coordinate system
  7253. if (context == "page") {
  7254. left -= pageScrollX();
  7255. top -= pageScrollY();
  7256. } else if (context == "local" || !context) {
  7257. var localBox = cm.display.sizer.getBoundingClientRect();
  7258. left += localBox.left;
  7259. top += localBox.top;
  7260. }
  7261. var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();
  7262. return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}
  7263. }
  7264. function charCoords(cm, pos, context, lineObj, bias) {
  7265. if (!lineObj) { lineObj = getLine(cm.doc, pos.line); }
  7266. return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context)
  7267. }
  7268. // Returns a box for a given cursor position, which may have an
  7269. // 'other' property containing the position of the secondary cursor
  7270. // on a bidi boundary.
  7271. // A cursor Pos(line, char, "before") is on the same visual line as `char - 1`
  7272. // and after `char - 1` in writing order of `char - 1`
  7273. // A cursor Pos(line, char, "after") is on the same visual line as `char`
  7274. // and before `char` in writing order of `char`
  7275. // Examples (upper-case letters are RTL, lower-case are LTR):
  7276. // Pos(0, 1, ...)
  7277. // before after
  7278. // ab a|b a|b
  7279. // aB a|B aB|
  7280. // Ab |Ab A|b
  7281. // AB B|A B|A
  7282. // Every position after the last character on a line is considered to stick
  7283. // to the last character on the line.
  7284. function cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) {
  7285. lineObj = lineObj || getLine(cm.doc, pos.line);
  7286. if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); }
  7287. function get(ch, right) {
  7288. var m = measureCharPrepared(cm, preparedMeasure, ch, right ? "right" : "left", varHeight);
  7289. if (right) { m.left = m.right; } else { m.right = m.left; }
  7290. return intoCoordSystem(cm, lineObj, m, context)
  7291. }
  7292. var order = getOrder(lineObj, cm.doc.direction), ch = pos.ch, sticky = pos.sticky;
  7293. if (ch >= lineObj.text.length) {
  7294. ch = lineObj.text.length;
  7295. sticky = "before";
  7296. } else if (ch <= 0) {
  7297. ch = 0;
  7298. sticky = "after";
  7299. }
  7300. if (!order) { return get(sticky == "before" ? ch - 1 : ch, sticky == "before") }
  7301. function getBidi(ch, partPos, invert) {
  7302. var part = order[partPos], right = part.level == 1;
  7303. return get(invert ? ch - 1 : ch, right != invert)
  7304. }
  7305. var partPos = getBidiPartAt(order, ch, sticky);
  7306. var other = bidiOther;
  7307. var val = getBidi(ch, partPos, sticky == "before");
  7308. if (other != null) { val.other = getBidi(ch, other, sticky != "before"); }
  7309. return val
  7310. }
  7311. // Used to cheaply estimate the coordinates for a position. Used for
  7312. // intermediate scroll updates.
  7313. function estimateCoords(cm, pos) {
  7314. var left = 0;
  7315. pos = clipPos(cm.doc, pos);
  7316. if (!cm.options.lineWrapping) { left = charWidth(cm.display) * pos.ch; }
  7317. var lineObj = getLine(cm.doc, pos.line);
  7318. var top = heightAtLine(lineObj) + paddingTop(cm.display);
  7319. return {left: left, right: left, top: top, bottom: top + lineObj.height}
  7320. }
  7321. // Positions returned by coordsChar contain some extra information.
  7322. // xRel is the relative x position of the input coordinates compared
  7323. // to the found position (so xRel > 0 means the coordinates are to
  7324. // the right of the character position, for example). When outside
  7325. // is true, that means the coordinates lie outside the line's
  7326. // vertical range.
  7327. function PosWithInfo(line, ch, sticky, outside, xRel) {
  7328. var pos = Pos(line, ch, sticky);
  7329. pos.xRel = xRel;
  7330. if (outside) { pos.outside = outside; }
  7331. return pos
  7332. }
  7333. // Compute the character position closest to the given coordinates.
  7334. // Input must be lineSpace-local ("div" coordinate system).
  7335. function coordsChar(cm, x, y) {
  7336. var doc = cm.doc;
  7337. y += cm.display.viewOffset;
  7338. if (y < 0) { return PosWithInfo(doc.first, 0, null, -1, -1) }
  7339. var lineN = lineAtHeight(doc, y), last = doc.first + doc.size - 1;
  7340. if (lineN > last)
  7341. { return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, null, 1, 1) }
  7342. if (x < 0) { x = 0; }
  7343. var lineObj = getLine(doc, lineN);
  7344. for (;;) {
  7345. var found = coordsCharInner(cm, lineObj, lineN, x, y);
  7346. var collapsed = collapsedSpanAround(lineObj, found.ch + (found.xRel > 0 || found.outside > 0 ? 1 : 0));
  7347. if (!collapsed) { return found }
  7348. var rangeEnd = collapsed.find(1);
  7349. if (rangeEnd.line == lineN) { return rangeEnd }
  7350. lineObj = getLine(doc, lineN = rangeEnd.line);
  7351. }
  7352. }
  7353. function wrappedLineExtent(cm, lineObj, preparedMeasure, y) {
  7354. y -= widgetTopHeight(lineObj);
  7355. var end = lineObj.text.length;
  7356. var begin = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch - 1).bottom <= y; }, end, 0);
  7357. end = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch).top > y; }, begin, end);
  7358. return {begin: begin, end: end}
  7359. }
  7360. function wrappedLineExtentChar(cm, lineObj, preparedMeasure, target) {
  7361. if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); }
  7362. var targetTop = intoCoordSystem(cm, lineObj, measureCharPrepared(cm, preparedMeasure, target), "line").top;
  7363. return wrappedLineExtent(cm, lineObj, preparedMeasure, targetTop)
  7364. }
  7365. // Returns true if the given side of a box is after the given
  7366. // coordinates, in top-to-bottom, left-to-right order.
  7367. function boxIsAfter(box, x, y, left) {
  7368. return box.bottom <= y ? false : box.top > y ? true : (left ? box.left : box.right) > x
  7369. }
  7370. function coordsCharInner(cm, lineObj, lineNo, x, y) {
  7371. // Move y into line-local coordinate space
  7372. y -= heightAtLine(lineObj);
  7373. var preparedMeasure = prepareMeasureForLine(cm, lineObj);
  7374. // When directly calling `measureCharPrepared`, we have to adjust
  7375. // for the widgets at this line.
  7376. var widgetHeight = widgetTopHeight(lineObj);
  7377. var begin = 0, end = lineObj.text.length, ltr = true;
  7378. var order = getOrder(lineObj, cm.doc.direction);
  7379. // If the line isn't plain left-to-right text, first figure out
  7380. // which bidi section the coordinates fall into.
  7381. if (order) {
  7382. var part = (cm.options.lineWrapping ? coordsBidiPartWrapped : coordsBidiPart)
  7383. (cm, lineObj, lineNo, preparedMeasure, order, x, y);
  7384. ltr = part.level != 1;
  7385. // The awkward -1 offsets are needed because findFirst (called
  7386. // on these below) will treat its first bound as inclusive,
  7387. // second as exclusive, but we want to actually address the
  7388. // characters in the part's range
  7389. begin = ltr ? part.from : part.to - 1;
  7390. end = ltr ? part.to : part.from - 1;
  7391. }
  7392. // A binary search to find the first character whose bounding box
  7393. // starts after the coordinates. If we run across any whose box wrap
  7394. // the coordinates, store that.
  7395. var chAround = null, boxAround = null;
  7396. var ch = findFirst(function (ch) {
  7397. var box = measureCharPrepared(cm, preparedMeasure, ch);
  7398. box.top += widgetHeight; box.bottom += widgetHeight;
  7399. if (!boxIsAfter(box, x, y, false)) { return false }
  7400. if (box.top <= y && box.left <= x) {
  7401. chAround = ch;
  7402. boxAround = box;
  7403. }
  7404. return true
  7405. }, begin, end);
  7406. var baseX, sticky, outside = false;
  7407. // If a box around the coordinates was found, use that
  7408. if (boxAround) {
  7409. // Distinguish coordinates nearer to the left or right side of the box
  7410. var atLeft = x - boxAround.left < boxAround.right - x, atStart = atLeft == ltr;
  7411. ch = chAround + (atStart ? 0 : 1);
  7412. sticky = atStart ? "after" : "before";
  7413. baseX = atLeft ? boxAround.left : boxAround.right;
  7414. } else {
  7415. // (Adjust for extended bound, if necessary.)
  7416. if (!ltr && (ch == end || ch == begin)) { ch++; }
  7417. // To determine which side to associate with, get the box to the
  7418. // left of the character and compare it's vertical position to the
  7419. // coordinates
  7420. sticky = ch == 0 ? "after" : ch == lineObj.text.length ? "before" :
  7421. (measureCharPrepared(cm, preparedMeasure, ch - (ltr ? 1 : 0)).bottom + widgetHeight <= y) == ltr ?
  7422. "after" : "before";
  7423. // Now get accurate coordinates for this place, in order to get a
  7424. // base X position
  7425. var coords = cursorCoords(cm, Pos(lineNo, ch, sticky), "line", lineObj, preparedMeasure);
  7426. baseX = coords.left;
  7427. outside = y < coords.top ? -1 : y >= coords.bottom ? 1 : 0;
  7428. }
  7429. ch = skipExtendingChars(lineObj.text, ch, 1);
  7430. return PosWithInfo(lineNo, ch, sticky, outside, x - baseX)
  7431. }
  7432. function coordsBidiPart(cm, lineObj, lineNo, preparedMeasure, order, x, y) {
  7433. // Bidi parts are sorted left-to-right, and in a non-line-wrapping
  7434. // situation, we can take this ordering to correspond to the visual
  7435. // ordering. This finds the first part whose end is after the given
  7436. // coordinates.
  7437. var index = findFirst(function (i) {
  7438. var part = order[i], ltr = part.level != 1;
  7439. return boxIsAfter(cursorCoords(cm, Pos(lineNo, ltr ? part.to : part.from, ltr ? "before" : "after"),
  7440. "line", lineObj, preparedMeasure), x, y, true)
  7441. }, 0, order.length - 1);
  7442. var part = order[index];
  7443. // If this isn't the first part, the part's start is also after
  7444. // the coordinates, and the coordinates aren't on the same line as
  7445. // that start, move one part back.
  7446. if (index > 0) {
  7447. var ltr = part.level != 1;
  7448. var start = cursorCoords(cm, Pos(lineNo, ltr ? part.from : part.to, ltr ? "after" : "before"),
  7449. "line", lineObj, preparedMeasure);
  7450. if (boxIsAfter(start, x, y, true) && start.top > y)
  7451. { part = order[index - 1]; }
  7452. }
  7453. return part
  7454. }
  7455. function coordsBidiPartWrapped(cm, lineObj, _lineNo, preparedMeasure, order, x, y) {
  7456. // In a wrapped line, rtl text on wrapping boundaries can do things
  7457. // that don't correspond to the ordering in our `order` array at
  7458. // all, so a binary search doesn't work, and we want to return a
  7459. // part that only spans one line so that the binary search in
  7460. // coordsCharInner is safe. As such, we first find the extent of the
  7461. // wrapped line, and then do a flat search in which we discard any
  7462. // spans that aren't on the line.
  7463. var ref = wrappedLineExtent(cm, lineObj, preparedMeasure, y);
  7464. var begin = ref.begin;
  7465. var end = ref.end;
  7466. if (/\s/.test(lineObj.text.charAt(end - 1))) { end--; }
  7467. var part = null, closestDist = null;
  7468. for (var i = 0; i < order.length; i++) {
  7469. var p = order[i];
  7470. if (p.from >= end || p.to <= begin) { continue }
  7471. var ltr = p.level != 1;
  7472. var endX = measureCharPrepared(cm, preparedMeasure, ltr ? Math.min(end, p.to) - 1 : Math.max(begin, p.from)).right;
  7473. // Weigh against spans ending before this, so that they are only
  7474. // picked if nothing ends after
  7475. var dist = endX < x ? x - endX + 1e9 : endX - x;
  7476. if (!part || closestDist > dist) {
  7477. part = p;
  7478. closestDist = dist;
  7479. }
  7480. }
  7481. if (!part) { part = order[order.length - 1]; }
  7482. // Clip the part to the wrapped line.
  7483. if (part.from < begin) { part = {from: begin, to: part.to, level: part.level}; }
  7484. if (part.to > end) { part = {from: part.from, to: end, level: part.level}; }
  7485. return part
  7486. }
  7487. var measureText;
  7488. // Compute the default text height.
  7489. function textHeight(display) {
  7490. if (display.cachedTextHeight != null) { return display.cachedTextHeight }
  7491. if (measureText == null) {
  7492. measureText = elt("pre", null, "CodeMirror-line-like");
  7493. // Measure a bunch of lines, for browsers that compute
  7494. // fractional heights.
  7495. for (var i = 0; i < 49; ++i) {
  7496. measureText.appendChild(document.createTextNode("x"));
  7497. measureText.appendChild(elt("br"));
  7498. }
  7499. measureText.appendChild(document.createTextNode("x"));
  7500. }
  7501. removeChildrenAndAdd(display.measure, measureText);
  7502. var height = measureText.offsetHeight / 50;
  7503. if (height > 3) { display.cachedTextHeight = height; }
  7504. removeChildren(display.measure);
  7505. return height || 1
  7506. }
  7507. // Compute the default character width.
  7508. function charWidth(display) {
  7509. if (display.cachedCharWidth != null) { return display.cachedCharWidth }
  7510. var anchor = elt("span", "xxxxxxxxxx");
  7511. var pre = elt("pre", [anchor], "CodeMirror-line-like");
  7512. removeChildrenAndAdd(display.measure, pre);
  7513. var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10;
  7514. if (width > 2) { display.cachedCharWidth = width; }
  7515. return width || 10
  7516. }
  7517. // Do a bulk-read of the DOM positions and sizes needed to draw the
  7518. // view, so that we don't interleave reading and writing to the DOM.
  7519. function getDimensions(cm) {
  7520. var d = cm.display, left = {}, width = {};
  7521. var gutterLeft = d.gutters.clientLeft;
  7522. for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) {
  7523. var id = cm.display.gutterSpecs[i].className;
  7524. left[id] = n.offsetLeft + n.clientLeft + gutterLeft;
  7525. width[id] = n.clientWidth;
  7526. }
  7527. return {fixedPos: compensateForHScroll(d),
  7528. gutterTotalWidth: d.gutters.offsetWidth,
  7529. gutterLeft: left,
  7530. gutterWidth: width,
  7531. wrapperWidth: d.wrapper.clientWidth}
  7532. }
  7533. // Computes display.scroller.scrollLeft + display.gutters.offsetWidth,
  7534. // but using getBoundingClientRect to get a sub-pixel-accurate
  7535. // result.
  7536. function compensateForHScroll(display) {
  7537. return display.scroller.getBoundingClientRect().left - display.sizer.getBoundingClientRect().left
  7538. }
  7539. // Returns a function that estimates the height of a line, to use as
  7540. // first approximation until the line becomes visible (and is thus
  7541. // properly measurable).
  7542. function estimateHeight(cm) {
  7543. var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;
  7544. var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);
  7545. return function (line) {
  7546. if (lineIsHidden(cm.doc, line)) { return 0 }
  7547. var widgetsHeight = 0;
  7548. if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {
  7549. if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }
  7550. } }
  7551. if (wrapping)
  7552. { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }
  7553. else
  7554. { return widgetsHeight + th }
  7555. }
  7556. }
  7557. function estimateLineHeights(cm) {
  7558. var doc = cm.doc, est = estimateHeight(cm);
  7559. doc.iter(function (line) {
  7560. var estHeight = est(line);
  7561. if (estHeight != line.height) { updateLineHeight(line, estHeight); }
  7562. });
  7563. }
  7564. // Given a mouse event, find the corresponding position. If liberal
  7565. // is false, it checks whether a gutter or scrollbar was clicked,
  7566. // and returns null if it was. forRect is used by rectangular
  7567. // selections, and tries to estimate a character position even for
  7568. // coordinates beyond the right of the text.
  7569. function posFromMouse(cm, e, liberal, forRect) {
  7570. var display = cm.display;
  7571. if (!liberal && e_target(e).getAttribute("cm-not-content") == "true") { return null }
  7572. var x, y, space = display.lineSpace.getBoundingClientRect();
  7573. // Fails unpredictably on IE[67] when mouse is dragged around quickly.
  7574. try { x = e.clientX - space.left; y = e.clientY - space.top; }
  7575. catch (e$1) { return null }
  7576. var coords = coordsChar(cm, x, y), line;
  7577. if (forRect && coords.xRel > 0 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) {
  7578. var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length;
  7579. coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff));
  7580. }
  7581. return coords
  7582. }
  7583. // Find the view element corresponding to a given line. Return null
  7584. // when the line isn't visible.
  7585. function findViewIndex(cm, n) {
  7586. if (n >= cm.display.viewTo) { return null }
  7587. n -= cm.display.viewFrom;
  7588. if (n < 0) { return null }
  7589. var view = cm.display.view;
  7590. for (var i = 0; i < view.length; i++) {
  7591. n -= view[i].size;
  7592. if (n < 0) { return i }
  7593. }
  7594. }
  7595. // Updates the display.view data structure for a given change to the
  7596. // document. From and to are in pre-change coordinates. Lendiff is
  7597. // the amount of lines added or subtracted by the change. This is
  7598. // used for changes that span multiple lines, or change the way
  7599. // lines are divided into visual lines. regLineChange (below)
  7600. // registers single-line changes.
  7601. function regChange(cm, from, to, lendiff) {
  7602. if (from == null) { from = cm.doc.first; }
  7603. if (to == null) { to = cm.doc.first + cm.doc.size; }
  7604. if (!lendiff) { lendiff = 0; }
  7605. var display = cm.display;
  7606. if (lendiff && to < display.viewTo &&
  7607. (display.updateLineNumbers == null || display.updateLineNumbers > from))
  7608. { display.updateLineNumbers = from; }
  7609. cm.curOp.viewChanged = true;
  7610. if (from >= display.viewTo) { // Change after
  7611. if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo)
  7612. { resetView(cm); }
  7613. } else if (to <= display.viewFrom) { // Change before
  7614. if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) {
  7615. resetView(cm);
  7616. } else {
  7617. display.viewFrom += lendiff;
  7618. display.viewTo += lendiff;
  7619. }
  7620. } else if (from <= display.viewFrom && to >= display.viewTo) { // Full overlap
  7621. resetView(cm);
  7622. } else if (from <= display.viewFrom) { // Top overlap
  7623. var cut = viewCuttingPoint(cm, to, to + lendiff, 1);
  7624. if (cut) {
  7625. display.view = display.view.slice(cut.index);
  7626. display.viewFrom = cut.lineN;
  7627. display.viewTo += lendiff;
  7628. } else {
  7629. resetView(cm);
  7630. }
  7631. } else if (to >= display.viewTo) { // Bottom overlap
  7632. var cut$1 = viewCuttingPoint(cm, from, from, -1);
  7633. if (cut$1) {
  7634. display.view = display.view.slice(0, cut$1.index);
  7635. display.viewTo = cut$1.lineN;
  7636. } else {
  7637. resetView(cm);
  7638. }
  7639. } else { // Gap in the middle
  7640. var cutTop = viewCuttingPoint(cm, from, from, -1);
  7641. var cutBot = viewCuttingPoint(cm, to, to + lendiff, 1);
  7642. if (cutTop && cutBot) {
  7643. display.view = display.view.slice(0, cutTop.index)
  7644. .concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN))
  7645. .concat(display.view.slice(cutBot.index));
  7646. display.viewTo += lendiff;
  7647. } else {
  7648. resetView(cm);
  7649. }
  7650. }
  7651. var ext = display.externalMeasured;
  7652. if (ext) {
  7653. if (to < ext.lineN)
  7654. { ext.lineN += lendiff; }
  7655. else if (from < ext.lineN + ext.size)
  7656. { display.externalMeasured = null; }
  7657. }
  7658. }
  7659. // Register a change to a single line. Type must be one of "text",
  7660. // "gutter", "class", "widget"
  7661. function regLineChange(cm, line, type) {
  7662. cm.curOp.viewChanged = true;
  7663. var display = cm.display, ext = cm.display.externalMeasured;
  7664. if (ext && line >= ext.lineN && line < ext.lineN + ext.size)
  7665. { display.externalMeasured = null; }
  7666. if (line < display.viewFrom || line >= display.viewTo) { return }
  7667. var lineView = display.view[findViewIndex(cm, line)];
  7668. if (lineView.node == null) { return }
  7669. var arr = lineView.changes || (lineView.changes = []);
  7670. if (indexOf(arr, type) == -1) { arr.push(type); }
  7671. }
  7672. // Clear the view.
  7673. function resetView(cm) {
  7674. cm.display.viewFrom = cm.display.viewTo = cm.doc.first;
  7675. cm.display.view = [];
  7676. cm.display.viewOffset = 0;
  7677. }
  7678. function viewCuttingPoint(cm, oldN, newN, dir) {
  7679. var index = findViewIndex(cm, oldN), diff, view = cm.display.view;
  7680. if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size)
  7681. { return {index: index, lineN: newN} }
  7682. var n = cm.display.viewFrom;
  7683. for (var i = 0; i < index; i++)
  7684. { n += view[i].size; }
  7685. if (n != oldN) {
  7686. if (dir > 0) {
  7687. if (index == view.length - 1) { return null }
  7688. diff = (n + view[index].size) - oldN;
  7689. index++;
  7690. } else {
  7691. diff = n - oldN;
  7692. }
  7693. oldN += diff; newN += diff;
  7694. }
  7695. while (visualLineNo(cm.doc, newN) != newN) {
  7696. if (index == (dir < 0 ? 0 : view.length - 1)) { return null }
  7697. newN += dir * view[index - (dir < 0 ? 1 : 0)].size;
  7698. index += dir;
  7699. }
  7700. return {index: index, lineN: newN}
  7701. }
  7702. // Force the view to cover a given range, adding empty view element
  7703. // or clipping off existing ones as needed.
  7704. function adjustView(cm, from, to) {
  7705. var display = cm.display, view = display.view;
  7706. if (view.length == 0 || from >= display.viewTo || to <= display.viewFrom) {
  7707. display.view = buildViewArray(cm, from, to);
  7708. display.viewFrom = from;
  7709. } else {
  7710. if (display.viewFrom > from)
  7711. { display.view = buildViewArray(cm, from, display.viewFrom).concat(display.view); }
  7712. else if (display.viewFrom < from)
  7713. { display.view = display.view.slice(findViewIndex(cm, from)); }
  7714. display.viewFrom = from;
  7715. if (display.viewTo < to)
  7716. { display.view = display.view.concat(buildViewArray(cm, display.viewTo, to)); }
  7717. else if (display.viewTo > to)
  7718. { display.view = display.view.slice(0, findViewIndex(cm, to)); }
  7719. }
  7720. display.viewTo = to;
  7721. }
  7722. // Count the number of lines in the view whose DOM representation is
  7723. // out of date (or nonexistent).
  7724. function countDirtyView(cm) {
  7725. var view = cm.display.view, dirty = 0;
  7726. for (var i = 0; i < view.length; i++) {
  7727. var lineView = view[i];
  7728. if (!lineView.hidden && (!lineView.node || lineView.changes)) { ++dirty; }
  7729. }
  7730. return dirty
  7731. }
  7732. function updateSelection(cm) {
  7733. cm.display.input.showSelection(cm.display.input.prepareSelection());
  7734. }
  7735. function prepareSelection(cm, primary) {
  7736. if ( primary === void 0 ) primary = true;
  7737. var doc = cm.doc, result = {};
  7738. var curFragment = result.cursors = document.createDocumentFragment();
  7739. var selFragment = result.selection = document.createDocumentFragment();
  7740. var customCursor = cm.options.$customCursor;
  7741. if (customCursor) { primary = true; }
  7742. for (var i = 0; i < doc.sel.ranges.length; i++) {
  7743. if (!primary && i == doc.sel.primIndex) { continue }
  7744. var range = doc.sel.ranges[i];
  7745. if (range.from().line >= cm.display.viewTo || range.to().line < cm.display.viewFrom) { continue }
  7746. var collapsed = range.empty();
  7747. if (customCursor) {
  7748. var head = customCursor(cm, range);
  7749. if (head) { drawSelectionCursor(cm, head, curFragment); }
  7750. } else if (collapsed || cm.options.showCursorWhenSelecting) {
  7751. drawSelectionCursor(cm, range.head, curFragment);
  7752. }
  7753. if (!collapsed)
  7754. { drawSelectionRange(cm, range, selFragment); }
  7755. }
  7756. return result
  7757. }
  7758. // Draws a cursor for the given range
  7759. function drawSelectionCursor(cm, head, output) {
  7760. var pos = cursorCoords(cm, head, "div", null, null, !cm.options.singleCursorHeightPerLine);
  7761. var cursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor"));
  7762. cursor.style.left = pos.left + "px";
  7763. cursor.style.top = pos.top + "px";
  7764. cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px";
  7765. if (/\bcm-fat-cursor\b/.test(cm.getWrapperElement().className)) {
  7766. var charPos = charCoords(cm, head, "div", null, null);
  7767. var width = charPos.right - charPos.left;
  7768. cursor.style.width = (width > 0 ? width : cm.defaultCharWidth()) + "px";
  7769. }
  7770. if (pos.other) {
  7771. // Secondary cursor, shown when on a 'jump' in bi-directional text
  7772. var otherCursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor CodeMirror-secondarycursor"));
  7773. otherCursor.style.display = "";
  7774. otherCursor.style.left = pos.other.left + "px";
  7775. otherCursor.style.top = pos.other.top + "px";
  7776. otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + "px";
  7777. }
  7778. }
  7779. function cmpCoords(a, b) { return a.top - b.top || a.left - b.left }
  7780. // Draws the given range as a highlighted selection
  7781. function drawSelectionRange(cm, range, output) {
  7782. var display = cm.display, doc = cm.doc;
  7783. var fragment = document.createDocumentFragment();
  7784. var padding = paddingH(cm.display), leftSide = padding.left;
  7785. var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;
  7786. var docLTR = doc.direction == "ltr";
  7787. function add(left, top, width, bottom) {
  7788. if (top < 0) { top = 0; }
  7789. top = Math.round(top);
  7790. bottom = Math.round(bottom);
  7791. fragment.appendChild(elt("div", null, "CodeMirror-selected", ("position: absolute; left: " + left + "px;\n top: " + top + "px; width: " + (width == null ? rightSide - left : width) + "px;\n height: " + (bottom - top) + "px")));
  7792. }
  7793. function drawForLine(line, fromArg, toArg) {
  7794. var lineObj = getLine(doc, line);
  7795. var lineLen = lineObj.text.length;
  7796. var start, end;
  7797. function coords(ch, bias) {
  7798. return charCoords(cm, Pos(line, ch), "div", lineObj, bias)
  7799. }
  7800. function wrapX(pos, dir, side) {
  7801. var extent = wrappedLineExtentChar(cm, lineObj, null, pos);
  7802. var prop = (dir == "ltr") == (side == "after") ? "left" : "right";
  7803. var ch = side == "after" ? extent.begin : extent.end - (/\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1);
  7804. return coords(ch, prop)[prop]
  7805. }
  7806. var order = getOrder(lineObj, doc.direction);
  7807. iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {
  7808. var ltr = dir == "ltr";
  7809. var fromPos = coords(from, ltr ? "left" : "right");
  7810. var toPos = coords(to - 1, ltr ? "right" : "left");
  7811. var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen;
  7812. var first = i == 0, last = !order || i == order.length - 1;
  7813. if (toPos.top - fromPos.top <= 3) { // Single line
  7814. var openLeft = (docLTR ? openStart : openEnd) && first;
  7815. var openRight = (docLTR ? openEnd : openStart) && last;
  7816. var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left;
  7817. var right = openRight ? rightSide : (ltr ? toPos : fromPos).right;
  7818. add(left, fromPos.top, right - left, fromPos.bottom);
  7819. } else { // Multiple lines
  7820. var topLeft, topRight, botLeft, botRight;
  7821. if (ltr) {
  7822. topLeft = docLTR && openStart && first ? leftSide : fromPos.left;
  7823. topRight = docLTR ? rightSide : wrapX(from, dir, "before");
  7824. botLeft = docLTR ? leftSide : wrapX(to, dir, "after");
  7825. botRight = docLTR && openEnd && last ? rightSide : toPos.right;
  7826. } else {
  7827. topLeft = !docLTR ? leftSide : wrapX(from, dir, "before");
  7828. topRight = !docLTR && openStart && first ? rightSide : fromPos.right;
  7829. botLeft = !docLTR && openEnd && last ? leftSide : toPos.left;
  7830. botRight = !docLTR ? rightSide : wrapX(to, dir, "after");
  7831. }
  7832. add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom);
  7833. if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); }
  7834. add(botLeft, toPos.top, botRight - botLeft, toPos.bottom);
  7835. }
  7836. if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; }
  7837. if (cmpCoords(toPos, start) < 0) { start = toPos; }
  7838. if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; }
  7839. if (cmpCoords(toPos, end) < 0) { end = toPos; }
  7840. });
  7841. return {start: start, end: end}
  7842. }
  7843. var sFrom = range.from(), sTo = range.to();
  7844. if (sFrom.line == sTo.line) {
  7845. drawForLine(sFrom.line, sFrom.ch, sTo.ch);
  7846. } else {
  7847. var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);
  7848. var singleVLine = visualLine(fromLine) == visualLine(toLine);
  7849. var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;
  7850. var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;
  7851. if (singleVLine) {
  7852. if (leftEnd.top < rightStart.top - 2) {
  7853. add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);
  7854. add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);
  7855. } else {
  7856. add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);
  7857. }
  7858. }
  7859. if (leftEnd.bottom < rightStart.top)
  7860. { add(leftSide, leftEnd.bottom, null, rightStart.top); }
  7861. }
  7862. output.appendChild(fragment);
  7863. }
  7864. // Cursor-blinking
  7865. function restartBlink(cm) {
  7866. if (!cm.state.focused) { return }
  7867. var display = cm.display;
  7868. clearInterval(display.blinker);
  7869. var on = true;
  7870. display.cursorDiv.style.visibility = "";
  7871. if (cm.options.cursorBlinkRate > 0)
  7872. { display.blinker = setInterval(function () {
  7873. if (!cm.hasFocus()) { onBlur(cm); }
  7874. display.cursorDiv.style.visibility = (on = !on) ? "" : "hidden";
  7875. }, cm.options.cursorBlinkRate); }
  7876. else if (cm.options.cursorBlinkRate < 0)
  7877. { display.cursorDiv.style.visibility = "hidden"; }
  7878. }
  7879. function ensureFocus(cm) {
  7880. if (!cm.hasFocus()) {
  7881. cm.display.input.focus();
  7882. if (!cm.state.focused) { onFocus(cm); }
  7883. }
  7884. }
  7885. function delayBlurEvent(cm) {
  7886. cm.state.delayingBlurEvent = true;
  7887. setTimeout(function () { if (cm.state.delayingBlurEvent) {
  7888. cm.state.delayingBlurEvent = false;
  7889. if (cm.state.focused) { onBlur(cm); }
  7890. } }, 100);
  7891. }
  7892. function onFocus(cm, e) {
  7893. if (cm.state.delayingBlurEvent && !cm.state.draggingText) { cm.state.delayingBlurEvent = false; }
  7894. if (cm.options.readOnly == "nocursor") { return }
  7895. if (!cm.state.focused) {
  7896. signal(cm, "focus", cm, e);
  7897. cm.state.focused = true;
  7898. addClass(cm.display.wrapper, "CodeMirror-focused");
  7899. // This test prevents this from firing when a context
  7900. // menu is closed (since the input reset would kill the
  7901. // select-all detection hack)
  7902. if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) {
  7903. cm.display.input.reset();
  7904. if (webkit) { setTimeout(function () { return cm.display.input.reset(true); }, 20); } // Issue #1730
  7905. }
  7906. cm.display.input.receivedFocus();
  7907. }
  7908. restartBlink(cm);
  7909. }
  7910. function onBlur(cm, e) {
  7911. if (cm.state.delayingBlurEvent) { return }
  7912. if (cm.state.focused) {
  7913. signal(cm, "blur", cm, e);
  7914. cm.state.focused = false;
  7915. rmClass(cm.display.wrapper, "CodeMirror-focused");
  7916. }
  7917. clearInterval(cm.display.blinker);
  7918. setTimeout(function () { if (!cm.state.focused) { cm.display.shift = false; } }, 150);
  7919. }
  7920. // Read the actual heights of the rendered lines, and update their
  7921. // stored heights to match.
  7922. function updateHeightsInViewport(cm) {
  7923. var display = cm.display;
  7924. var prevBottom = display.lineDiv.offsetTop;
  7925. var viewTop = Math.max(0, display.scroller.getBoundingClientRect().top);
  7926. var oldHeight = display.lineDiv.getBoundingClientRect().top;
  7927. var mustScroll = 0;
  7928. for (var i = 0; i < display.view.length; i++) {
  7929. var cur = display.view[i], wrapping = cm.options.lineWrapping;
  7930. var height = (void 0), width = 0;
  7931. if (cur.hidden) { continue }
  7932. oldHeight += cur.line.height;
  7933. if (ie && ie_version < 8) {
  7934. var bot = cur.node.offsetTop + cur.node.offsetHeight;
  7935. height = bot - prevBottom;
  7936. prevBottom = bot;
  7937. } else {
  7938. var box = cur.node.getBoundingClientRect();
  7939. height = box.bottom - box.top;
  7940. // Check that lines don't extend past the right of the current
  7941. // editor width
  7942. if (!wrapping && cur.text.firstChild)
  7943. { width = cur.text.firstChild.getBoundingClientRect().right - box.left - 1; }
  7944. }
  7945. var diff = cur.line.height - height;
  7946. if (diff > .005 || diff < -.005) {
  7947. if (oldHeight < viewTop) { mustScroll -= diff; }
  7948. updateLineHeight(cur.line, height);
  7949. updateWidgetHeight(cur.line);
  7950. if (cur.rest) { for (var j = 0; j < cur.rest.length; j++)
  7951. { updateWidgetHeight(cur.rest[j]); } }
  7952. }
  7953. if (width > cm.display.sizerWidth) {
  7954. var chWidth = Math.ceil(width / charWidth(cm.display));
  7955. if (chWidth > cm.display.maxLineLength) {
  7956. cm.display.maxLineLength = chWidth;
  7957. cm.display.maxLine = cur.line;
  7958. cm.display.maxLineChanged = true;
  7959. }
  7960. }
  7961. }
  7962. if (Math.abs(mustScroll) > 2) { display.scroller.scrollTop += mustScroll; }
  7963. }
  7964. // Read and store the height of line widgets associated with the
  7965. // given line.
  7966. function updateWidgetHeight(line) {
  7967. if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {
  7968. var w = line.widgets[i], parent = w.node.parentNode;
  7969. if (parent) { w.height = parent.offsetHeight; }
  7970. } }
  7971. }
  7972. // Compute the lines that are visible in a given viewport (defaults
  7973. // the the current scroll position). viewport may contain top,
  7974. // height, and ensure (see op.scrollToPos) properties.
  7975. function visibleLines(display, doc, viewport) {
  7976. var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop;
  7977. top = Math.floor(top - paddingTop(display));
  7978. var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight;
  7979. var from = lineAtHeight(doc, top), to = lineAtHeight(doc, bottom);
  7980. // Ensure is a {from: {line, ch}, to: {line, ch}} object, and
  7981. // forces those lines into the viewport (if possible).
  7982. if (viewport && viewport.ensure) {
  7983. var ensureFrom = viewport.ensure.from.line, ensureTo = viewport.ensure.to.line;
  7984. if (ensureFrom < from) {
  7985. from = ensureFrom;
  7986. to = lineAtHeight(doc, heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight);
  7987. } else if (Math.min(ensureTo, doc.lastLine()) >= to) {
  7988. from = lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight);
  7989. to = ensureTo;
  7990. }
  7991. }
  7992. return {from: from, to: Math.max(to, from + 1)}
  7993. }
  7994. // SCROLLING THINGS INTO VIEW
  7995. // If an editor sits on the top or bottom of the window, partially
  7996. // scrolled out of view, this ensures that the cursor is visible.
  7997. function maybeScrollWindow(cm, rect) {
  7998. if (signalDOMEvent(cm, "scrollCursorIntoView")) { return }
  7999. var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null;
  8000. if (rect.top + box.top < 0) { doScroll = true; }
  8001. else if (rect.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) { doScroll = false; }
  8002. if (doScroll != null && !phantom) {
  8003. var scrollNode = elt("div", "\u200b", null, ("position: absolute;\n top: " + (rect.top - display.viewOffset - paddingTop(cm.display)) + "px;\n height: " + (rect.bottom - rect.top + scrollGap(cm) + display.barHeight) + "px;\n left: " + (rect.left) + "px; width: " + (Math.max(2, rect.right - rect.left)) + "px;"));
  8004. cm.display.lineSpace.appendChild(scrollNode);
  8005. scrollNode.scrollIntoView(doScroll);
  8006. cm.display.lineSpace.removeChild(scrollNode);
  8007. }
  8008. }
  8009. // Scroll a given position into view (immediately), verifying that
  8010. // it actually became visible (as line heights are accurately
  8011. // measured, the position of something may 'drift' during drawing).
  8012. function scrollPosIntoView(cm, pos, end, margin) {
  8013. if (margin == null) { margin = 0; }
  8014. var rect;
  8015. if (!cm.options.lineWrapping && pos == end) {
  8016. // Set pos and end to the cursor positions around the character pos sticks to
  8017. // If pos.sticky == "before", that is around pos.ch - 1, otherwise around pos.ch
  8018. // If pos == Pos(_, 0, "before"), pos and end are unchanged
  8019. end = pos.sticky == "before" ? Pos(pos.line, pos.ch + 1, "before") : pos;
  8020. pos = pos.ch ? Pos(pos.line, pos.sticky == "before" ? pos.ch - 1 : pos.ch, "after") : pos;
  8021. }
  8022. for (var limit = 0; limit < 5; limit++) {
  8023. var changed = false;
  8024. var coords = cursorCoords(cm, pos);
  8025. var endCoords = !end || end == pos ? coords : cursorCoords(cm, end);
  8026. rect = {left: Math.min(coords.left, endCoords.left),
  8027. top: Math.min(coords.top, endCoords.top) - margin,
  8028. right: Math.max(coords.left, endCoords.left),
  8029. bottom: Math.max(coords.bottom, endCoords.bottom) + margin};
  8030. var scrollPos = calculateScrollPos(cm, rect);
  8031. var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft;
  8032. if (scrollPos.scrollTop != null) {
  8033. updateScrollTop(cm, scrollPos.scrollTop);
  8034. if (Math.abs(cm.doc.scrollTop - startTop) > 1) { changed = true; }
  8035. }
  8036. if (scrollPos.scrollLeft != null) {
  8037. setScrollLeft(cm, scrollPos.scrollLeft);
  8038. if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) { changed = true; }
  8039. }
  8040. if (!changed) { break }
  8041. }
  8042. return rect
  8043. }
  8044. // Scroll a given set of coordinates into view (immediately).
  8045. function scrollIntoView(cm, rect) {
  8046. var scrollPos = calculateScrollPos(cm, rect);
  8047. if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }
  8048. if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }
  8049. }
  8050. // Calculate a new scroll position needed to scroll the given
  8051. // rectangle into view. Returns an object with scrollTop and
  8052. // scrollLeft properties. When these are undefined, the
  8053. // vertical/horizontal position does not need to be adjusted.
  8054. function calculateScrollPos(cm, rect) {
  8055. var display = cm.display, snapMargin = textHeight(cm.display);
  8056. if (rect.top < 0) { rect.top = 0; }
  8057. var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;
  8058. var screen = displayHeight(cm), result = {};
  8059. if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }
  8060. var docBottom = cm.doc.height + paddingVert(display);
  8061. var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;
  8062. if (rect.top < screentop) {
  8063. result.scrollTop = atTop ? 0 : rect.top;
  8064. } else if (rect.bottom > screentop + screen) {
  8065. var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);
  8066. if (newTop != screentop) { result.scrollTop = newTop; }
  8067. }
  8068. var gutterSpace = cm.options.fixedGutter ? 0 : display.gutters.offsetWidth;
  8069. var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft - gutterSpace;
  8070. var screenw = displayWidth(cm) - display.gutters.offsetWidth;
  8071. var tooWide = rect.right - rect.left > screenw;
  8072. if (tooWide) { rect.right = rect.left + screenw; }
  8073. if (rect.left < 10)
  8074. { result.scrollLeft = 0; }
  8075. else if (rect.left < screenleft)
  8076. { result.scrollLeft = Math.max(0, rect.left + gutterSpace - (tooWide ? 0 : 10)); }
  8077. else if (rect.right > screenw + screenleft - 3)
  8078. { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }
  8079. return result
  8080. }
  8081. // Store a relative adjustment to the scroll position in the current
  8082. // operation (to be applied when the operation finishes).
  8083. function addToScrollTop(cm, top) {
  8084. if (top == null) { return }
  8085. resolveScrollToPos(cm);
  8086. cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top;
  8087. }
  8088. // Make sure that at the end of the operation the current cursor is
  8089. // shown.
  8090. function ensureCursorVisible(cm) {
  8091. resolveScrollToPos(cm);
  8092. var cur = cm.getCursor();
  8093. cm.curOp.scrollToPos = {from: cur, to: cur, margin: cm.options.cursorScrollMargin};
  8094. }
  8095. function scrollToCoords(cm, x, y) {
  8096. if (x != null || y != null) { resolveScrollToPos(cm); }
  8097. if (x != null) { cm.curOp.scrollLeft = x; }
  8098. if (y != null) { cm.curOp.scrollTop = y; }
  8099. }
  8100. function scrollToRange(cm, range) {
  8101. resolveScrollToPos(cm);
  8102. cm.curOp.scrollToPos = range;
  8103. }
  8104. // When an operation has its scrollToPos property set, and another
  8105. // scroll action is applied before the end of the operation, this
  8106. // 'simulates' scrolling that position into view in a cheap way, so
  8107. // that the effect of intermediate scroll commands is not ignored.
  8108. function resolveScrollToPos(cm) {
  8109. var range = cm.curOp.scrollToPos;
  8110. if (range) {
  8111. cm.curOp.scrollToPos = null;
  8112. var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to);
  8113. scrollToCoordsRange(cm, from, to, range.margin);
  8114. }
  8115. }
  8116. function scrollToCoordsRange(cm, from, to, margin) {
  8117. var sPos = calculateScrollPos(cm, {
  8118. left: Math.min(from.left, to.left),
  8119. top: Math.min(from.top, to.top) - margin,
  8120. right: Math.max(from.right, to.right),
  8121. bottom: Math.max(from.bottom, to.bottom) + margin
  8122. });
  8123. scrollToCoords(cm, sPos.scrollLeft, sPos.scrollTop);
  8124. }
  8125. // Sync the scrollable area and scrollbars, ensure the viewport
  8126. // covers the visible area.
  8127. function updateScrollTop(cm, val) {
  8128. if (Math.abs(cm.doc.scrollTop - val) < 2) { return }
  8129. if (!gecko) { updateDisplaySimple(cm, {top: val}); }
  8130. setScrollTop(cm, val, true);
  8131. if (gecko) { updateDisplaySimple(cm); }
  8132. startWorker(cm, 100);
  8133. }
  8134. function setScrollTop(cm, val, forceScroll) {
  8135. val = Math.max(0, Math.min(cm.display.scroller.scrollHeight - cm.display.scroller.clientHeight, val));
  8136. if (cm.display.scroller.scrollTop == val && !forceScroll) { return }
  8137. cm.doc.scrollTop = val;
  8138. cm.display.scrollbars.setScrollTop(val);
  8139. if (cm.display.scroller.scrollTop != val) { cm.display.scroller.scrollTop = val; }
  8140. }
  8141. // Sync scroller and scrollbar, ensure the gutter elements are
  8142. // aligned.
  8143. function setScrollLeft(cm, val, isScroller, forceScroll) {
  8144. val = Math.max(0, Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth));
  8145. if ((isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) && !forceScroll) { return }
  8146. cm.doc.scrollLeft = val;
  8147. alignHorizontally(cm);
  8148. if (cm.display.scroller.scrollLeft != val) { cm.display.scroller.scrollLeft = val; }
  8149. cm.display.scrollbars.setScrollLeft(val);
  8150. }
  8151. // SCROLLBARS
  8152. // Prepare DOM reads needed to update the scrollbars. Done in one
  8153. // shot to minimize update/measure roundtrips.
  8154. function measureForScrollbars(cm) {
  8155. var d = cm.display, gutterW = d.gutters.offsetWidth;
  8156. var docH = Math.round(cm.doc.height + paddingVert(cm.display));
  8157. return {
  8158. clientHeight: d.scroller.clientHeight,
  8159. viewHeight: d.wrapper.clientHeight,
  8160. scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth,
  8161. viewWidth: d.wrapper.clientWidth,
  8162. barLeft: cm.options.fixedGutter ? gutterW : 0,
  8163. docHeight: docH,
  8164. scrollHeight: docH + scrollGap(cm) + d.barHeight,
  8165. nativeBarWidth: d.nativeBarWidth,
  8166. gutterWidth: gutterW
  8167. }
  8168. }
  8169. var NativeScrollbars = function(place, scroll, cm) {
  8170. this.cm = cm;
  8171. var vert = this.vert = elt("div", [elt("div", null, null, "min-width: 1px")], "CodeMirror-vscrollbar");
  8172. var horiz = this.horiz = elt("div", [elt("div", null, null, "height: 100%; min-height: 1px")], "CodeMirror-hscrollbar");
  8173. vert.tabIndex = horiz.tabIndex = -1;
  8174. place(vert); place(horiz);
  8175. on(vert, "scroll", function () {
  8176. if (vert.clientHeight) { scroll(vert.scrollTop, "vertical"); }
  8177. });
  8178. on(horiz, "scroll", function () {
  8179. if (horiz.clientWidth) { scroll(horiz.scrollLeft, "horizontal"); }
  8180. });
  8181. this.checkedZeroWidth = false;
  8182. // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).
  8183. if (ie && ie_version < 8) { this.horiz.style.minHeight = this.vert.style.minWidth = "18px"; }
  8184. };
  8185. NativeScrollbars.prototype.update = function (measure) {
  8186. var needsH = measure.scrollWidth > measure.clientWidth + 1;
  8187. var needsV = measure.scrollHeight > measure.clientHeight + 1;
  8188. var sWidth = measure.nativeBarWidth;
  8189. if (needsV) {
  8190. this.vert.style.display = "block";
  8191. this.vert.style.bottom = needsH ? sWidth + "px" : "0";
  8192. var totalHeight = measure.viewHeight - (needsH ? sWidth : 0);
  8193. // A bug in IE8 can cause this value to be negative, so guard it.
  8194. this.vert.firstChild.style.height =
  8195. Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + "px";
  8196. } else {
  8197. this.vert.scrollTop = 0;
  8198. this.vert.style.display = "";
  8199. this.vert.firstChild.style.height = "0";
  8200. }
  8201. if (needsH) {
  8202. this.horiz.style.display = "block";
  8203. this.horiz.style.right = needsV ? sWidth + "px" : "0";
  8204. this.horiz.style.left = measure.barLeft + "px";
  8205. var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0);
  8206. this.horiz.firstChild.style.width =
  8207. Math.max(0, measure.scrollWidth - measure.clientWidth + totalWidth) + "px";
  8208. } else {
  8209. this.horiz.style.display = "";
  8210. this.horiz.firstChild.style.width = "0";
  8211. }
  8212. if (!this.checkedZeroWidth && measure.clientHeight > 0) {
  8213. if (sWidth == 0) { this.zeroWidthHack(); }
  8214. this.checkedZeroWidth = true;
  8215. }
  8216. return {right: needsV ? sWidth : 0, bottom: needsH ? sWidth : 0}
  8217. };
  8218. NativeScrollbars.prototype.setScrollLeft = function (pos) {
  8219. if (this.horiz.scrollLeft != pos) { this.horiz.scrollLeft = pos; }
  8220. if (this.disableHoriz) { this.enableZeroWidthBar(this.horiz, this.disableHoriz, "horiz"); }
  8221. };
  8222. NativeScrollbars.prototype.setScrollTop = function (pos) {
  8223. if (this.vert.scrollTop != pos) { this.vert.scrollTop = pos; }
  8224. if (this.disableVert) { this.enableZeroWidthBar(this.vert, this.disableVert, "vert"); }
  8225. };
  8226. NativeScrollbars.prototype.zeroWidthHack = function () {
  8227. var w = mac && !mac_geMountainLion ? "12px" : "18px";
  8228. this.horiz.style.height = this.vert.style.width = w;
  8229. this.horiz.style.pointerEvents = this.vert.style.pointerEvents = "none";
  8230. this.disableHoriz = new Delayed;
  8231. this.disableVert = new Delayed;
  8232. };
  8233. NativeScrollbars.prototype.enableZeroWidthBar = function (bar, delay, type) {
  8234. bar.style.pointerEvents = "auto";
  8235. function maybeDisable() {
  8236. // To find out whether the scrollbar is still visible, we
  8237. // check whether the element under the pixel in the bottom
  8238. // right corner of the scrollbar box is the scrollbar box
  8239. // itself (when the bar is still visible) or its filler child
  8240. // (when the bar is hidden). If it is still visible, we keep
  8241. // it enabled, if it's hidden, we disable pointer events.
  8242. var box = bar.getBoundingClientRect();
  8243. var elt = type == "vert" ? document.elementFromPoint(box.right - 1, (box.top + box.bottom) / 2)
  8244. : document.elementFromPoint((box.right + box.left) / 2, box.bottom - 1);
  8245. if (elt != bar) { bar.style.pointerEvents = "none"; }
  8246. else { delay.set(1000, maybeDisable); }
  8247. }
  8248. delay.set(1000, maybeDisable);
  8249. };
  8250. NativeScrollbars.prototype.clear = function () {
  8251. var parent = this.horiz.parentNode;
  8252. parent.removeChild(this.horiz);
  8253. parent.removeChild(this.vert);
  8254. };
  8255. var NullScrollbars = function () {};
  8256. NullScrollbars.prototype.update = function () { return {bottom: 0, right: 0} };
  8257. NullScrollbars.prototype.setScrollLeft = function () {};
  8258. NullScrollbars.prototype.setScrollTop = function () {};
  8259. NullScrollbars.prototype.clear = function () {};
  8260. function updateScrollbars(cm, measure) {
  8261. if (!measure) { measure = measureForScrollbars(cm); }
  8262. var startWidth = cm.display.barWidth, startHeight = cm.display.barHeight;
  8263. updateScrollbarsInner(cm, measure);
  8264. for (var i = 0; i < 4 && startWidth != cm.display.barWidth || startHeight != cm.display.barHeight; i++) {
  8265. if (startWidth != cm.display.barWidth && cm.options.lineWrapping)
  8266. { updateHeightsInViewport(cm); }
  8267. updateScrollbarsInner(cm, measureForScrollbars(cm));
  8268. startWidth = cm.display.barWidth; startHeight = cm.display.barHeight;
  8269. }
  8270. }
  8271. // Re-synchronize the fake scrollbars with the actual size of the
  8272. // content.
  8273. function updateScrollbarsInner(cm, measure) {
  8274. var d = cm.display;
  8275. var sizes = d.scrollbars.update(measure);
  8276. d.sizer.style.paddingRight = (d.barWidth = sizes.right) + "px";
  8277. d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + "px";
  8278. d.heightForcer.style.borderBottom = sizes.bottom + "px solid transparent";
  8279. if (sizes.right && sizes.bottom) {
  8280. d.scrollbarFiller.style.display = "block";
  8281. d.scrollbarFiller.style.height = sizes.bottom + "px";
  8282. d.scrollbarFiller.style.width = sizes.right + "px";
  8283. } else { d.scrollbarFiller.style.display = ""; }
  8284. if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) {
  8285. d.gutterFiller.style.display = "block";
  8286. d.gutterFiller.style.height = sizes.bottom + "px";
  8287. d.gutterFiller.style.width = measure.gutterWidth + "px";
  8288. } else { d.gutterFiller.style.display = ""; }
  8289. }
  8290. var scrollbarModel = {"native": NativeScrollbars, "null": NullScrollbars};
  8291. function initScrollbars(cm) {
  8292. if (cm.display.scrollbars) {
  8293. cm.display.scrollbars.clear();
  8294. if (cm.display.scrollbars.addClass)
  8295. { rmClass(cm.display.wrapper, cm.display.scrollbars.addClass); }
  8296. }
  8297. cm.display.scrollbars = new scrollbarModel[cm.options.scrollbarStyle](function (node) {
  8298. cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller);
  8299. // Prevent clicks in the scrollbars from killing focus
  8300. on(node, "mousedown", function () {
  8301. if (cm.state.focused) { setTimeout(function () { return cm.display.input.focus(); }, 0); }
  8302. });
  8303. node.setAttribute("cm-not-content", "true");
  8304. }, function (pos, axis) {
  8305. if (axis == "horizontal") { setScrollLeft(cm, pos); }
  8306. else { updateScrollTop(cm, pos); }
  8307. }, cm);
  8308. if (cm.display.scrollbars.addClass)
  8309. { addClass(cm.display.wrapper, cm.display.scrollbars.addClass); }
  8310. }
  8311. // Operations are used to wrap a series of changes to the editor
  8312. // state in such a way that each change won't have to update the
  8313. // cursor and display (which would be awkward, slow, and
  8314. // error-prone). Instead, display updates are batched and then all
  8315. // combined and executed at once.
  8316. var nextOpId = 0;
  8317. // Start a new operation.
  8318. function startOperation(cm) {
  8319. cm.curOp = {
  8320. cm: cm,
  8321. viewChanged: false, // Flag that indicates that lines might need to be redrawn
  8322. startHeight: cm.doc.height, // Used to detect need to update scrollbar
  8323. forceUpdate: false, // Used to force a redraw
  8324. updateInput: 0, // Whether to reset the input textarea
  8325. typing: false, // Whether this reset should be careful to leave existing text (for compositing)
  8326. changeObjs: null, // Accumulated changes, for firing change events
  8327. cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on
  8328. cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already
  8329. selectionChanged: false, // Whether the selection needs to be redrawn
  8330. updateMaxLine: false, // Set when the widest line needs to be determined anew
  8331. scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet
  8332. scrollToPos: null, // Used to scroll to a specific position
  8333. focus: false,
  8334. id: ++nextOpId, // Unique ID
  8335. markArrays: null // Used by addMarkedSpan
  8336. };
  8337. pushOperation(cm.curOp);
  8338. }
  8339. // Finish an operation, updating the display and signalling delayed events
  8340. function endOperation(cm) {
  8341. var op = cm.curOp;
  8342. if (op) { finishOperation(op, function (group) {
  8343. for (var i = 0; i < group.ops.length; i++)
  8344. { group.ops[i].cm.curOp = null; }
  8345. endOperations(group);
  8346. }); }
  8347. }
  8348. // The DOM updates done when an operation finishes are batched so
  8349. // that the minimum number of relayouts are required.
  8350. function endOperations(group) {
  8351. var ops = group.ops;
  8352. for (var i = 0; i < ops.length; i++) // Read DOM
  8353. { endOperation_R1(ops[i]); }
  8354. for (var i$1 = 0; i$1 < ops.length; i$1++) // Write DOM (maybe)
  8355. { endOperation_W1(ops[i$1]); }
  8356. for (var i$2 = 0; i$2 < ops.length; i$2++) // Read DOM
  8357. { endOperation_R2(ops[i$2]); }
  8358. for (var i$3 = 0; i$3 < ops.length; i$3++) // Write DOM (maybe)
  8359. { endOperation_W2(ops[i$3]); }
  8360. for (var i$4 = 0; i$4 < ops.length; i$4++) // Read DOM
  8361. { endOperation_finish(ops[i$4]); }
  8362. }
  8363. function endOperation_R1(op) {
  8364. var cm = op.cm, display = cm.display;
  8365. maybeClipScrollbars(cm);
  8366. if (op.updateMaxLine) { findMaxLine(cm); }
  8367. op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null ||
  8368. op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom ||
  8369. op.scrollToPos.to.line >= display.viewTo) ||
  8370. display.maxLineChanged && cm.options.lineWrapping;
  8371. op.update = op.mustUpdate &&
  8372. new DisplayUpdate(cm, op.mustUpdate && {top: op.scrollTop, ensure: op.scrollToPos}, op.forceUpdate);
  8373. }
  8374. function endOperation_W1(op) {
  8375. op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update);
  8376. }
  8377. function endOperation_R2(op) {
  8378. var cm = op.cm, display = cm.display;
  8379. if (op.updatedDisplay) { updateHeightsInViewport(cm); }
  8380. op.barMeasure = measureForScrollbars(cm);
  8381. // If the max line changed since it was last measured, measure it,
  8382. // and ensure the document's width matches it.
  8383. // updateDisplay_W2 will use these properties to do the actual resizing
  8384. if (display.maxLineChanged && !cm.options.lineWrapping) {
  8385. op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3;
  8386. cm.display.sizerWidth = op.adjustWidthTo;
  8387. op.barMeasure.scrollWidth =
  8388. Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth);
  8389. op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm));
  8390. }
  8391. if (op.updatedDisplay || op.selectionChanged)
  8392. { op.preparedSelection = display.input.prepareSelection(); }
  8393. }
  8394. function endOperation_W2(op) {
  8395. var cm = op.cm;
  8396. if (op.adjustWidthTo != null) {
  8397. cm.display.sizer.style.minWidth = op.adjustWidthTo + "px";
  8398. if (op.maxScrollLeft < cm.doc.scrollLeft)
  8399. { setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true); }
  8400. cm.display.maxLineChanged = false;
  8401. }
  8402. var takeFocus = op.focus && op.focus == activeElt();
  8403. if (op.preparedSelection)
  8404. { cm.display.input.showSelection(op.preparedSelection, takeFocus); }
  8405. if (op.updatedDisplay || op.startHeight != cm.doc.height)
  8406. { updateScrollbars(cm, op.barMeasure); }
  8407. if (op.updatedDisplay)
  8408. { setDocumentHeight(cm, op.barMeasure); }
  8409. if (op.selectionChanged) { restartBlink(cm); }
  8410. if (cm.state.focused && op.updateInput)
  8411. { cm.display.input.reset(op.typing); }
  8412. if (takeFocus) { ensureFocus(op.cm); }
  8413. }
  8414. function endOperation_finish(op) {
  8415. var cm = op.cm, display = cm.display, doc = cm.doc;
  8416. if (op.updatedDisplay) { postUpdateDisplay(cm, op.update); }
  8417. // Abort mouse wheel delta measurement, when scrolling explicitly
  8418. if (display.wheelStartX != null && (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos))
  8419. { display.wheelStartX = display.wheelStartY = null; }
  8420. // Propagate the scroll position to the actual DOM scroller
  8421. if (op.scrollTop != null) { setScrollTop(cm, op.scrollTop, op.forceScroll); }
  8422. if (op.scrollLeft != null) { setScrollLeft(cm, op.scrollLeft, true, true); }
  8423. // If we need to scroll a specific position into view, do so.
  8424. if (op.scrollToPos) {
  8425. var rect = scrollPosIntoView(cm, clipPos(doc, op.scrollToPos.from),
  8426. clipPos(doc, op.scrollToPos.to), op.scrollToPos.margin);
  8427. maybeScrollWindow(cm, rect);
  8428. }
  8429. // Fire events for markers that are hidden/unidden by editing or
  8430. // undoing
  8431. var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers;
  8432. if (hidden) { for (var i = 0; i < hidden.length; ++i)
  8433. { if (!hidden[i].lines.length) { signal(hidden[i], "hide"); } } }
  8434. if (unhidden) { for (var i$1 = 0; i$1 < unhidden.length; ++i$1)
  8435. { if (unhidden[i$1].lines.length) { signal(unhidden[i$1], "unhide"); } } }
  8436. if (display.wrapper.offsetHeight)
  8437. { doc.scrollTop = cm.display.scroller.scrollTop; }
  8438. // Fire change events, and delayed event handlers
  8439. if (op.changeObjs)
  8440. { signal(cm, "changes", cm, op.changeObjs); }
  8441. if (op.update)
  8442. { op.update.finish(); }
  8443. }
  8444. // Run the given function in an operation
  8445. function runInOp(cm, f) {
  8446. if (cm.curOp) { return f() }
  8447. startOperation(cm);
  8448. try { return f() }
  8449. finally { endOperation(cm); }
  8450. }
  8451. // Wraps a function in an operation. Returns the wrapped function.
  8452. function operation(cm, f) {
  8453. return function() {
  8454. if (cm.curOp) { return f.apply(cm, arguments) }
  8455. startOperation(cm);
  8456. try { return f.apply(cm, arguments) }
  8457. finally { endOperation(cm); }
  8458. }
  8459. }
  8460. // Used to add methods to editor and doc instances, wrapping them in
  8461. // operations.
  8462. function methodOp(f) {
  8463. return function() {
  8464. if (this.curOp) { return f.apply(this, arguments) }
  8465. startOperation(this);
  8466. try { return f.apply(this, arguments) }
  8467. finally { endOperation(this); }
  8468. }
  8469. }
  8470. function docMethodOp(f) {
  8471. return function() {
  8472. var cm = this.cm;
  8473. if (!cm || cm.curOp) { return f.apply(this, arguments) }
  8474. startOperation(cm);
  8475. try { return f.apply(this, arguments) }
  8476. finally { endOperation(cm); }
  8477. }
  8478. }
  8479. // HIGHLIGHT WORKER
  8480. function startWorker(cm, time) {
  8481. if (cm.doc.highlightFrontier < cm.display.viewTo)
  8482. { cm.state.highlight.set(time, bind(highlightWorker, cm)); }
  8483. }
  8484. function highlightWorker(cm) {
  8485. var doc = cm.doc;
  8486. if (doc.highlightFrontier >= cm.display.viewTo) { return }
  8487. var end = +new Date + cm.options.workTime;
  8488. var context = getContextBefore(cm, doc.highlightFrontier);
  8489. var changedLines = [];
  8490. doc.iter(context.line, Math.min(doc.first + doc.size, cm.display.viewTo + 500), function (line) {
  8491. if (context.line >= cm.display.viewFrom) { // Visible
  8492. var oldStyles = line.styles;
  8493. var resetState = line.text.length > cm.options.maxHighlightLength ? copyState(doc.mode, context.state) : null;
  8494. var highlighted = highlightLine(cm, line, context, true);
  8495. if (resetState) { context.state = resetState; }
  8496. line.styles = highlighted.styles;
  8497. var oldCls = line.styleClasses, newCls = highlighted.classes;
  8498. if (newCls) { line.styleClasses = newCls; }
  8499. else if (oldCls) { line.styleClasses = null; }
  8500. var ischange = !oldStyles || oldStyles.length != line.styles.length ||
  8501. oldCls != newCls && (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass || oldCls.textClass != newCls.textClass);
  8502. for (var i = 0; !ischange && i < oldStyles.length; ++i) { ischange = oldStyles[i] != line.styles[i]; }
  8503. if (ischange) { changedLines.push(context.line); }
  8504. line.stateAfter = context.save();
  8505. context.nextLine();
  8506. } else {
  8507. if (line.text.length <= cm.options.maxHighlightLength)
  8508. { processLine(cm, line.text, context); }
  8509. line.stateAfter = context.line % 5 == 0 ? context.save() : null;
  8510. context.nextLine();
  8511. }
  8512. if (+new Date > end) {
  8513. startWorker(cm, cm.options.workDelay);
  8514. return true
  8515. }
  8516. });
  8517. doc.highlightFrontier = context.line;
  8518. doc.modeFrontier = Math.max(doc.modeFrontier, context.line);
  8519. if (changedLines.length) { runInOp(cm, function () {
  8520. for (var i = 0; i < changedLines.length; i++)
  8521. { regLineChange(cm, changedLines[i], "text"); }
  8522. }); }
  8523. }
  8524. // DISPLAY DRAWING
  8525. var DisplayUpdate = function(cm, viewport, force) {
  8526. var display = cm.display;
  8527. this.viewport = viewport;
  8528. // Store some values that we'll need later (but don't want to force a relayout for)
  8529. this.visible = visibleLines(display, cm.doc, viewport);
  8530. this.editorIsHidden = !display.wrapper.offsetWidth;
  8531. this.wrapperHeight = display.wrapper.clientHeight;
  8532. this.wrapperWidth = display.wrapper.clientWidth;
  8533. this.oldDisplayWidth = displayWidth(cm);
  8534. this.force = force;
  8535. this.dims = getDimensions(cm);
  8536. this.events = [];
  8537. };
  8538. DisplayUpdate.prototype.signal = function (emitter, type) {
  8539. if (hasHandler(emitter, type))
  8540. { this.events.push(arguments); }
  8541. };
  8542. DisplayUpdate.prototype.finish = function () {
  8543. for (var i = 0; i < this.events.length; i++)
  8544. { signal.apply(null, this.events[i]); }
  8545. };
  8546. function maybeClipScrollbars(cm) {
  8547. var display = cm.display;
  8548. if (!display.scrollbarsClipped && display.scroller.offsetWidth) {
  8549. display.nativeBarWidth = display.scroller.offsetWidth - display.scroller.clientWidth;
  8550. display.heightForcer.style.height = scrollGap(cm) + "px";
  8551. display.sizer.style.marginBottom = -display.nativeBarWidth + "px";
  8552. display.sizer.style.borderRightWidth = scrollGap(cm) + "px";
  8553. display.scrollbarsClipped = true;
  8554. }
  8555. }
  8556. function selectionSnapshot(cm) {
  8557. if (cm.hasFocus()) { return null }
  8558. var active = activeElt();
  8559. if (!active || !contains(cm.display.lineDiv, active)) { return null }
  8560. var result = {activeElt: active};
  8561. if (window.getSelection) {
  8562. var sel = window.getSelection();
  8563. if (sel.anchorNode && sel.extend && contains(cm.display.lineDiv, sel.anchorNode)) {
  8564. result.anchorNode = sel.anchorNode;
  8565. result.anchorOffset = sel.anchorOffset;
  8566. result.focusNode = sel.focusNode;
  8567. result.focusOffset = sel.focusOffset;
  8568. }
  8569. }
  8570. return result
  8571. }
  8572. function restoreSelection(snapshot) {
  8573. if (!snapshot || !snapshot.activeElt || snapshot.activeElt == activeElt()) { return }
  8574. snapshot.activeElt.focus();
  8575. if (!/^(INPUT|TEXTAREA)$/.test(snapshot.activeElt.nodeName) &&
  8576. snapshot.anchorNode && contains(document.body, snapshot.anchorNode) && contains(document.body, snapshot.focusNode)) {
  8577. var sel = window.getSelection(), range = document.createRange();
  8578. range.setEnd(snapshot.anchorNode, snapshot.anchorOffset);
  8579. range.collapse(false);
  8580. sel.removeAllRanges();
  8581. sel.addRange(range);
  8582. sel.extend(snapshot.focusNode, snapshot.focusOffset);
  8583. }
  8584. }
  8585. // Does the actual updating of the line display. Bails out
  8586. // (returning false) when there is nothing to be done and forced is
  8587. // false.
  8588. function updateDisplayIfNeeded(cm, update) {
  8589. var display = cm.display, doc = cm.doc;
  8590. if (update.editorIsHidden) {
  8591. resetView(cm);
  8592. return false
  8593. }
  8594. // Bail out if the visible area is already rendered and nothing changed.
  8595. if (!update.force &&
  8596. update.visible.from >= display.viewFrom && update.visible.to <= display.viewTo &&
  8597. (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) &&
  8598. display.renderedView == display.view && countDirtyView(cm) == 0)
  8599. { return false }
  8600. if (maybeUpdateLineNumberWidth(cm)) {
  8601. resetView(cm);
  8602. update.dims = getDimensions(cm);
  8603. }
  8604. // Compute a suitable new viewport (from & to)
  8605. var end = doc.first + doc.size;
  8606. var from = Math.max(update.visible.from - cm.options.viewportMargin, doc.first);
  8607. var to = Math.min(end, update.visible.to + cm.options.viewportMargin);
  8608. if (display.viewFrom < from && from - display.viewFrom < 20) { from = Math.max(doc.first, display.viewFrom); }
  8609. if (display.viewTo > to && display.viewTo - to < 20) { to = Math.min(end, display.viewTo); }
  8610. if (sawCollapsedSpans) {
  8611. from = visualLineNo(cm.doc, from);
  8612. to = visualLineEndNo(cm.doc, to);
  8613. }
  8614. var different = from != display.viewFrom || to != display.viewTo ||
  8615. display.lastWrapHeight != update.wrapperHeight || display.lastWrapWidth != update.wrapperWidth;
  8616. adjustView(cm, from, to);
  8617. display.viewOffset = heightAtLine(getLine(cm.doc, display.viewFrom));
  8618. // Position the mover div to align with the current scroll position
  8619. cm.display.mover.style.top = display.viewOffset + "px";
  8620. var toUpdate = countDirtyView(cm);
  8621. if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view &&
  8622. (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo))
  8623. { return false }
  8624. // For big changes, we hide the enclosing element during the
  8625. // update, since that speeds up the operations on most browsers.
  8626. var selSnapshot = selectionSnapshot(cm);
  8627. if (toUpdate > 4) { display.lineDiv.style.display = "none"; }
  8628. patchDisplay(cm, display.updateLineNumbers, update.dims);
  8629. if (toUpdate > 4) { display.lineDiv.style.display = ""; }
  8630. display.renderedView = display.view;
  8631. // There might have been a widget with a focused element that got
  8632. // hidden or updated, if so re-focus it.
  8633. restoreSelection(selSnapshot);
  8634. // Prevent selection and cursors from interfering with the scroll
  8635. // width and height.
  8636. removeChildren(display.cursorDiv);
  8637. removeChildren(display.selectionDiv);
  8638. display.gutters.style.height = display.sizer.style.minHeight = 0;
  8639. if (different) {
  8640. display.lastWrapHeight = update.wrapperHeight;
  8641. display.lastWrapWidth = update.wrapperWidth;
  8642. startWorker(cm, 400);
  8643. }
  8644. display.updateLineNumbers = null;
  8645. return true
  8646. }
  8647. function postUpdateDisplay(cm, update) {
  8648. var viewport = update.viewport;
  8649. for (var first = true;; first = false) {
  8650. if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) {
  8651. // Clip forced viewport to actual scrollable area.
  8652. if (viewport && viewport.top != null)
  8653. { viewport = {top: Math.min(cm.doc.height + paddingVert(cm.display) - displayHeight(cm), viewport.top)}; }
  8654. // Updated line heights might result in the drawn area not
  8655. // actually covering the viewport. Keep looping until it does.
  8656. update.visible = visibleLines(cm.display, cm.doc, viewport);
  8657. if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo)
  8658. { break }
  8659. } else if (first) {
  8660. update.visible = visibleLines(cm.display, cm.doc, viewport);
  8661. }
  8662. if (!updateDisplayIfNeeded(cm, update)) { break }
  8663. updateHeightsInViewport(cm);
  8664. var barMeasure = measureForScrollbars(cm);
  8665. updateSelection(cm);
  8666. updateScrollbars(cm, barMeasure);
  8667. setDocumentHeight(cm, barMeasure);
  8668. update.force = false;
  8669. }
  8670. update.signal(cm, "update", cm);
  8671. if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) {
  8672. update.signal(cm, "viewportChange", cm, cm.display.viewFrom, cm.display.viewTo);
  8673. cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo;
  8674. }
  8675. }
  8676. function updateDisplaySimple(cm, viewport) {
  8677. var update = new DisplayUpdate(cm, viewport);
  8678. if (updateDisplayIfNeeded(cm, update)) {
  8679. updateHeightsInViewport(cm);
  8680. postUpdateDisplay(cm, update);
  8681. var barMeasure = measureForScrollbars(cm);
  8682. updateSelection(cm);
  8683. updateScrollbars(cm, barMeasure);
  8684. setDocumentHeight(cm, barMeasure);
  8685. update.finish();
  8686. }
  8687. }
  8688. // Sync the actual display DOM structure with display.view, removing
  8689. // nodes for lines that are no longer in view, and creating the ones
  8690. // that are not there yet, and updating the ones that are out of
  8691. // date.
  8692. function patchDisplay(cm, updateNumbersFrom, dims) {
  8693. var display = cm.display, lineNumbers = cm.options.lineNumbers;
  8694. var container = display.lineDiv, cur = container.firstChild;
  8695. function rm(node) {
  8696. var next = node.nextSibling;
  8697. // Works around a throw-scroll bug in OS X Webkit
  8698. if (webkit && mac && cm.display.currentWheelTarget == node)
  8699. { node.style.display = "none"; }
  8700. else
  8701. { node.parentNode.removeChild(node); }
  8702. return next
  8703. }
  8704. var view = display.view, lineN = display.viewFrom;
  8705. // Loop over the elements in the view, syncing cur (the DOM nodes
  8706. // in display.lineDiv) with the view as we go.
  8707. for (var i = 0; i < view.length; i++) {
  8708. var lineView = view[i];
  8709. if (lineView.hidden) ; else if (!lineView.node || lineView.node.parentNode != container) { // Not drawn yet
  8710. var node = buildLineElement(cm, lineView, lineN, dims);
  8711. container.insertBefore(node, cur);
  8712. } else { // Already drawn
  8713. while (cur != lineView.node) { cur = rm(cur); }
  8714. var updateNumber = lineNumbers && updateNumbersFrom != null &&
  8715. updateNumbersFrom <= lineN && lineView.lineNumber;
  8716. if (lineView.changes) {
  8717. if (indexOf(lineView.changes, "gutter") > -1) { updateNumber = false; }
  8718. updateLineForChanges(cm, lineView, lineN, dims);
  8719. }
  8720. if (updateNumber) {
  8721. removeChildren(lineView.lineNumber);
  8722. lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options, lineN)));
  8723. }
  8724. cur = lineView.node.nextSibling;
  8725. }
  8726. lineN += lineView.size;
  8727. }
  8728. while (cur) { cur = rm(cur); }
  8729. }
  8730. function updateGutterSpace(display) {
  8731. var width = display.gutters.offsetWidth;
  8732. display.sizer.style.marginLeft = width + "px";
  8733. // Send an event to consumers responding to changes in gutter width.
  8734. signalLater(display, "gutterChanged", display);
  8735. }
  8736. function setDocumentHeight(cm, measure) {
  8737. cm.display.sizer.style.minHeight = measure.docHeight + "px";
  8738. cm.display.heightForcer.style.top = measure.docHeight + "px";
  8739. cm.display.gutters.style.height = (measure.docHeight + cm.display.barHeight + scrollGap(cm)) + "px";
  8740. }
  8741. // Re-align line numbers and gutter marks to compensate for
  8742. // horizontal scrolling.
  8743. function alignHorizontally(cm) {
  8744. var display = cm.display, view = display.view;
  8745. if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) { return }
  8746. var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft;
  8747. var gutterW = display.gutters.offsetWidth, left = comp + "px";
  8748. for (var i = 0; i < view.length; i++) { if (!view[i].hidden) {
  8749. if (cm.options.fixedGutter) {
  8750. if (view[i].gutter)
  8751. { view[i].gutter.style.left = left; }
  8752. if (view[i].gutterBackground)
  8753. { view[i].gutterBackground.style.left = left; }
  8754. }
  8755. var align = view[i].alignable;
  8756. if (align) { for (var j = 0; j < align.length; j++)
  8757. { align[j].style.left = left; } }
  8758. } }
  8759. if (cm.options.fixedGutter)
  8760. { display.gutters.style.left = (comp + gutterW) + "px"; }
  8761. }
  8762. // Used to ensure that the line number gutter is still the right
  8763. // size for the current document size. Returns true when an update
  8764. // is needed.
  8765. function maybeUpdateLineNumberWidth(cm) {
  8766. if (!cm.options.lineNumbers) { return false }
  8767. var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display;
  8768. if (last.length != display.lineNumChars) {
  8769. var test = display.measure.appendChild(elt("div", [elt("div", last)],
  8770. "CodeMirror-linenumber CodeMirror-gutter-elt"));
  8771. var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW;
  8772. display.lineGutter.style.width = "";
  8773. display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1;
  8774. display.lineNumWidth = display.lineNumInnerWidth + padding;
  8775. display.lineNumChars = display.lineNumInnerWidth ? last.length : -1;
  8776. display.lineGutter.style.width = display.lineNumWidth + "px";
  8777. updateGutterSpace(cm.display);
  8778. return true
  8779. }
  8780. return false
  8781. }
  8782. function getGutters(gutters, lineNumbers) {
  8783. var result = [], sawLineNumbers = false;
  8784. for (var i = 0; i < gutters.length; i++) {
  8785. var name = gutters[i], style = null;
  8786. if (typeof name != "string") { style = name.style; name = name.className; }
  8787. if (name == "CodeMirror-linenumbers") {
  8788. if (!lineNumbers) { continue }
  8789. else { sawLineNumbers = true; }
  8790. }
  8791. result.push({className: name, style: style});
  8792. }
  8793. if (lineNumbers && !sawLineNumbers) { result.push({className: "CodeMirror-linenumbers", style: null}); }
  8794. return result
  8795. }
  8796. // Rebuild the gutter elements, ensure the margin to the left of the
  8797. // code matches their width.
  8798. function renderGutters(display) {
  8799. var gutters = display.gutters, specs = display.gutterSpecs;
  8800. removeChildren(gutters);
  8801. display.lineGutter = null;
  8802. for (var i = 0; i < specs.length; ++i) {
  8803. var ref = specs[i];
  8804. var className = ref.className;
  8805. var style = ref.style;
  8806. var gElt = gutters.appendChild(elt("div", null, "CodeMirror-gutter " + className));
  8807. if (style) { gElt.style.cssText = style; }
  8808. if (className == "CodeMirror-linenumbers") {
  8809. display.lineGutter = gElt;
  8810. gElt.style.width = (display.lineNumWidth || 1) + "px";
  8811. }
  8812. }
  8813. gutters.style.display = specs.length ? "" : "none";
  8814. updateGutterSpace(display);
  8815. }
  8816. function updateGutters(cm) {
  8817. renderGutters(cm.display);
  8818. regChange(cm);
  8819. alignHorizontally(cm);
  8820. }
  8821. // The display handles the DOM integration, both for input reading
  8822. // and content drawing. It holds references to DOM nodes and
  8823. // display-related state.
  8824. function Display(place, doc, input, options) {
  8825. var d = this;
  8826. this.input = input;
  8827. // Covers bottom-right square when both scrollbars are present.
  8828. d.scrollbarFiller = elt("div", null, "CodeMirror-scrollbar-filler");
  8829. d.scrollbarFiller.setAttribute("cm-not-content", "true");
  8830. // Covers bottom of gutter when coverGutterNextToScrollbar is on
  8831. // and h scrollbar is present.
  8832. d.gutterFiller = elt("div", null, "CodeMirror-gutter-filler");
  8833. d.gutterFiller.setAttribute("cm-not-content", "true");
  8834. // Will contain the actual code, positioned to cover the viewport.
  8835. d.lineDiv = eltP("div", null, "CodeMirror-code");
  8836. // Elements are added to these to represent selection and cursors.
  8837. d.selectionDiv = elt("div", null, null, "position: relative; z-index: 1");
  8838. d.cursorDiv = elt("div", null, "CodeMirror-cursors");
  8839. // A visibility: hidden element used to find the size of things.
  8840. d.measure = elt("div", null, "CodeMirror-measure");
  8841. // When lines outside of the viewport are measured, they are drawn in this.
  8842. d.lineMeasure = elt("div", null, "CodeMirror-measure");
  8843. // Wraps everything that needs to exist inside the vertically-padded coordinate system
  8844. d.lineSpace = eltP("div", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv],
  8845. null, "position: relative; outline: none");
  8846. var lines = eltP("div", [d.lineSpace], "CodeMirror-lines");
  8847. // Moved around its parent to cover visible view.
  8848. d.mover = elt("div", [lines], null, "position: relative");
  8849. // Set to the height of the document, allowing scrolling.
  8850. d.sizer = elt("div", [d.mover], "CodeMirror-sizer");
  8851. d.sizerWidth = null;
  8852. // Behavior of elts with overflow: auto and padding is
  8853. // inconsistent across browsers. This is used to ensure the
  8854. // scrollable area is big enough.
  8855. d.heightForcer = elt("div", null, null, "position: absolute; height: " + scrollerGap + "px; width: 1px;");
  8856. // Will contain the gutters, if any.
  8857. d.gutters = elt("div", null, "CodeMirror-gutters");
  8858. d.lineGutter = null;
  8859. // Actual scrollable element.
  8860. d.scroller = elt("div", [d.sizer, d.heightForcer, d.gutters], "CodeMirror-scroll");
  8861. d.scroller.setAttribute("tabIndex", "-1");
  8862. // The element in which the editor lives.
  8863. d.wrapper = elt("div", [d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror");
  8864. // This attribute is respected by automatic translation systems such as Google Translate,
  8865. // and may also be respected by tools used by human translators.
  8866. d.wrapper.setAttribute('translate', 'no');
  8867. // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)
  8868. if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }
  8869. if (!webkit && !(gecko && mobile)) { d.scroller.draggable = true; }
  8870. if (place) {
  8871. if (place.appendChild) { place.appendChild(d.wrapper); }
  8872. else { place(d.wrapper); }
  8873. }
  8874. // Current rendered range (may be bigger than the view window).
  8875. d.viewFrom = d.viewTo = doc.first;
  8876. d.reportedViewFrom = d.reportedViewTo = doc.first;
  8877. // Information about the rendered lines.
  8878. d.view = [];
  8879. d.renderedView = null;
  8880. // Holds info about a single rendered line when it was rendered
  8881. // for measurement, while not in view.
  8882. d.externalMeasured = null;
  8883. // Empty space (in pixels) above the view
  8884. d.viewOffset = 0;
  8885. d.lastWrapHeight = d.lastWrapWidth = 0;
  8886. d.updateLineNumbers = null;
  8887. d.nativeBarWidth = d.barHeight = d.barWidth = 0;
  8888. d.scrollbarsClipped = false;
  8889. // Used to only resize the line number gutter when necessary (when
  8890. // the amount of lines crosses a boundary that makes its width change)
  8891. d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;
  8892. // Set to true when a non-horizontal-scrolling line widget is
  8893. // added. As an optimization, line widget aligning is skipped when
  8894. // this is false.
  8895. d.alignWidgets = false;
  8896. d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;
  8897. // Tracks the maximum line length so that the horizontal scrollbar
  8898. // can be kept static when scrolling.
  8899. d.maxLine = null;
  8900. d.maxLineLength = 0;
  8901. d.maxLineChanged = false;
  8902. // Used for measuring wheel scrolling granularity
  8903. d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;
  8904. // True when shift is held down.
  8905. d.shift = false;
  8906. // Used to track whether anything happened since the context menu
  8907. // was opened.
  8908. d.selForContextMenu = null;
  8909. d.activeTouch = null;
  8910. d.gutterSpecs = getGutters(options.gutters, options.lineNumbers);
  8911. renderGutters(d);
  8912. input.init(d);
  8913. }
  8914. // Since the delta values reported on mouse wheel events are
  8915. // unstandardized between browsers and even browser versions, and
  8916. // generally horribly unpredictable, this code starts by measuring
  8917. // the scroll effect that the first few mouse wheel events have,
  8918. // and, from that, detects the way it can convert deltas to pixel
  8919. // offsets afterwards.
  8920. //
  8921. // The reason we want to know the amount a wheel event will scroll
  8922. // is that it gives us a chance to update the display before the
  8923. // actual scrolling happens, reducing flickering.
  8924. var wheelSamples = 0, wheelPixelsPerUnit = null;
  8925. // Fill in a browser-detected starting value on browsers where we
  8926. // know one. These don't have to be accurate -- the result of them
  8927. // being wrong would just be a slight flicker on the first wheel
  8928. // scroll (if it is large enough).
  8929. if (ie) { wheelPixelsPerUnit = -.53; }
  8930. else if (gecko) { wheelPixelsPerUnit = 15; }
  8931. else if (chrome) { wheelPixelsPerUnit = -.7; }
  8932. else if (safari) { wheelPixelsPerUnit = -1/3; }
  8933. function wheelEventDelta(e) {
  8934. var dx = e.wheelDeltaX, dy = e.wheelDeltaY;
  8935. if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) { dx = e.detail; }
  8936. if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) { dy = e.detail; }
  8937. else if (dy == null) { dy = e.wheelDelta; }
  8938. return {x: dx, y: dy}
  8939. }
  8940. function wheelEventPixels(e) {
  8941. var delta = wheelEventDelta(e);
  8942. delta.x *= wheelPixelsPerUnit;
  8943. delta.y *= wheelPixelsPerUnit;
  8944. return delta
  8945. }
  8946. function onScrollWheel(cm, e) {
  8947. var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y;
  8948. var pixelsPerUnit = wheelPixelsPerUnit;
  8949. if (e.deltaMode === 0) {
  8950. dx = e.deltaX;
  8951. dy = e.deltaY;
  8952. pixelsPerUnit = 1;
  8953. }
  8954. var display = cm.display, scroll = display.scroller;
  8955. // Quit if there's nothing to scroll here
  8956. var canScrollX = scroll.scrollWidth > scroll.clientWidth;
  8957. var canScrollY = scroll.scrollHeight > scroll.clientHeight;
  8958. if (!(dx && canScrollX || dy && canScrollY)) { return }
  8959. // Webkit browsers on OS X abort momentum scrolls when the target
  8960. // of the scroll event is removed from the scrollable element.
  8961. // This hack (see related code in patchDisplay) makes sure the
  8962. // element is kept around.
  8963. if (dy && mac && webkit) {
  8964. outer: for (var cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) {
  8965. for (var i = 0; i < view.length; i++) {
  8966. if (view[i].node == cur) {
  8967. cm.display.currentWheelTarget = cur;
  8968. break outer
  8969. }
  8970. }
  8971. }
  8972. }
  8973. // On some browsers, horizontal scrolling will cause redraws to
  8974. // happen before the gutter has been realigned, causing it to
  8975. // wriggle around in a most unseemly way. When we have an
  8976. // estimated pixels/delta value, we just handle horizontal
  8977. // scrolling entirely here. It'll be slightly off from native, but
  8978. // better than glitching out.
  8979. if (dx && !gecko && !presto && pixelsPerUnit != null) {
  8980. if (dy && canScrollY)
  8981. { updateScrollTop(cm, Math.max(0, scroll.scrollTop + dy * pixelsPerUnit)); }
  8982. setScrollLeft(cm, Math.max(0, scroll.scrollLeft + dx * pixelsPerUnit));
  8983. // Only prevent default scrolling if vertical scrolling is
  8984. // actually possible. Otherwise, it causes vertical scroll
  8985. // jitter on OSX trackpads when deltaX is small and deltaY
  8986. // is large (issue #3579)
  8987. if (!dy || (dy && canScrollY))
  8988. { e_preventDefault(e); }
  8989. display.wheelStartX = null; // Abort measurement, if in progress
  8990. return
  8991. }
  8992. // 'Project' the visible viewport to cover the area that is being
  8993. // scrolled into view (if we know enough to estimate it).
  8994. if (dy && pixelsPerUnit != null) {
  8995. var pixels = dy * pixelsPerUnit;
  8996. var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight;
  8997. if (pixels < 0) { top = Math.max(0, top + pixels - 50); }
  8998. else { bot = Math.min(cm.doc.height, bot + pixels + 50); }
  8999. updateDisplaySimple(cm, {top: top, bottom: bot});
  9000. }
  9001. if (wheelSamples < 20 && e.deltaMode !== 0) {
  9002. if (display.wheelStartX == null) {
  9003. display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop;
  9004. display.wheelDX = dx; display.wheelDY = dy;
  9005. setTimeout(function () {
  9006. if (display.wheelStartX == null) { return }
  9007. var movedX = scroll.scrollLeft - display.wheelStartX;
  9008. var movedY = scroll.scrollTop - display.wheelStartY;
  9009. var sample = (movedY && display.wheelDY && movedY / display.wheelDY) ||
  9010. (movedX && display.wheelDX && movedX / display.wheelDX);
  9011. display.wheelStartX = display.wheelStartY = null;
  9012. if (!sample) { return }
  9013. wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1);
  9014. ++wheelSamples;
  9015. }, 200);
  9016. } else {
  9017. display.wheelDX += dx; display.wheelDY += dy;
  9018. }
  9019. }
  9020. }
  9021. // Selection objects are immutable. A new one is created every time
  9022. // the selection changes. A selection is one or more non-overlapping
  9023. // (and non-touching) ranges, sorted, and an integer that indicates
  9024. // which one is the primary selection (the one that's scrolled into
  9025. // view, that getCursor returns, etc).
  9026. var Selection = function(ranges, primIndex) {
  9027. this.ranges = ranges;
  9028. this.primIndex = primIndex;
  9029. };
  9030. Selection.prototype.primary = function () { return this.ranges[this.primIndex] };
  9031. Selection.prototype.equals = function (other) {
  9032. if (other == this) { return true }
  9033. if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) { return false }
  9034. for (var i = 0; i < this.ranges.length; i++) {
  9035. var here = this.ranges[i], there = other.ranges[i];
  9036. if (!equalCursorPos(here.anchor, there.anchor) || !equalCursorPos(here.head, there.head)) { return false }
  9037. }
  9038. return true
  9039. };
  9040. Selection.prototype.deepCopy = function () {
  9041. var out = [];
  9042. for (var i = 0; i < this.ranges.length; i++)
  9043. { out[i] = new Range(copyPos(this.ranges[i].anchor), copyPos(this.ranges[i].head)); }
  9044. return new Selection(out, this.primIndex)
  9045. };
  9046. Selection.prototype.somethingSelected = function () {
  9047. for (var i = 0; i < this.ranges.length; i++)
  9048. { if (!this.ranges[i].empty()) { return true } }
  9049. return false
  9050. };
  9051. Selection.prototype.contains = function (pos, end) {
  9052. if (!end) { end = pos; }
  9053. for (var i = 0; i < this.ranges.length; i++) {
  9054. var range = this.ranges[i];
  9055. if (cmp(end, range.from()) >= 0 && cmp(pos, range.to()) <= 0)
  9056. { return i }
  9057. }
  9058. return -1
  9059. };
  9060. var Range = function(anchor, head) {
  9061. this.anchor = anchor; this.head = head;
  9062. };
  9063. Range.prototype.from = function () { return minPos(this.anchor, this.head) };
  9064. Range.prototype.to = function () { return maxPos(this.anchor, this.head) };
  9065. Range.prototype.empty = function () { return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch };
  9066. // Take an unsorted, potentially overlapping set of ranges, and
  9067. // build a selection out of it. 'Consumes' ranges array (modifying
  9068. // it).
  9069. function normalizeSelection(cm, ranges, primIndex) {
  9070. var mayTouch = cm && cm.options.selectionsMayTouch;
  9071. var prim = ranges[primIndex];
  9072. ranges.sort(function (a, b) { return cmp(a.from(), b.from()); });
  9073. primIndex = indexOf(ranges, prim);
  9074. for (var i = 1; i < ranges.length; i++) {
  9075. var cur = ranges[i], prev = ranges[i - 1];
  9076. var diff = cmp(prev.to(), cur.from());
  9077. if (mayTouch && !cur.empty() ? diff > 0 : diff >= 0) {
  9078. var from = minPos(prev.from(), cur.from()), to = maxPos(prev.to(), cur.to());
  9079. var inv = prev.empty() ? cur.from() == cur.head : prev.from() == prev.head;
  9080. if (i <= primIndex) { --primIndex; }
  9081. ranges.splice(--i, 2, new Range(inv ? to : from, inv ? from : to));
  9082. }
  9083. }
  9084. return new Selection(ranges, primIndex)
  9085. }
  9086. function simpleSelection(anchor, head) {
  9087. return new Selection([new Range(anchor, head || anchor)], 0)
  9088. }
  9089. // Compute the position of the end of a change (its 'to' property
  9090. // refers to the pre-change end).
  9091. function changeEnd(change) {
  9092. if (!change.text) { return change.to }
  9093. return Pos(change.from.line + change.text.length - 1,
  9094. lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0))
  9095. }
  9096. // Adjust a position to refer to the post-change position of the
  9097. // same text, or the end of the change if the change covers it.
  9098. function adjustForChange(pos, change) {
  9099. if (cmp(pos, change.from) < 0) { return pos }
  9100. if (cmp(pos, change.to) <= 0) { return changeEnd(change) }
  9101. var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch;
  9102. if (pos.line == change.to.line) { ch += changeEnd(change).ch - change.to.ch; }
  9103. return Pos(line, ch)
  9104. }
  9105. function computeSelAfterChange(doc, change) {
  9106. var out = [];
  9107. for (var i = 0; i < doc.sel.ranges.length; i++) {
  9108. var range = doc.sel.ranges[i];
  9109. out.push(new Range(adjustForChange(range.anchor, change),
  9110. adjustForChange(range.head, change)));
  9111. }
  9112. return normalizeSelection(doc.cm, out, doc.sel.primIndex)
  9113. }
  9114. function offsetPos(pos, old, nw) {
  9115. if (pos.line == old.line)
  9116. { return Pos(nw.line, pos.ch - old.ch + nw.ch) }
  9117. else
  9118. { return Pos(nw.line + (pos.line - old.line), pos.ch) }
  9119. }
  9120. // Used by replaceSelections to allow moving the selection to the
  9121. // start or around the replaced test. Hint may be "start" or "around".
  9122. function computeReplacedSel(doc, changes, hint) {
  9123. var out = [];
  9124. var oldPrev = Pos(doc.first, 0), newPrev = oldPrev;
  9125. for (var i = 0; i < changes.length; i++) {
  9126. var change = changes[i];
  9127. var from = offsetPos(change.from, oldPrev, newPrev);
  9128. var to = offsetPos(changeEnd(change), oldPrev, newPrev);
  9129. oldPrev = change.to;
  9130. newPrev = to;
  9131. if (hint == "around") {
  9132. var range = doc.sel.ranges[i], inv = cmp(range.head, range.anchor) < 0;
  9133. out[i] = new Range(inv ? to : from, inv ? from : to);
  9134. } else {
  9135. out[i] = new Range(from, from);
  9136. }
  9137. }
  9138. return new Selection(out, doc.sel.primIndex)
  9139. }
  9140. // Used to get the editor into a consistent state again when options change.
  9141. function loadMode(cm) {
  9142. cm.doc.mode = getMode(cm.options, cm.doc.modeOption);
  9143. resetModeState(cm);
  9144. }
  9145. function resetModeState(cm) {
  9146. cm.doc.iter(function (line) {
  9147. if (line.stateAfter) { line.stateAfter = null; }
  9148. if (line.styles) { line.styles = null; }
  9149. });
  9150. cm.doc.modeFrontier = cm.doc.highlightFrontier = cm.doc.first;
  9151. startWorker(cm, 100);
  9152. cm.state.modeGen++;
  9153. if (cm.curOp) { regChange(cm); }
  9154. }
  9155. // DOCUMENT DATA STRUCTURE
  9156. // By default, updates that start and end at the beginning of a line
  9157. // are treated specially, in order to make the association of line
  9158. // widgets and marker elements with the text behave more intuitive.
  9159. function isWholeLineUpdate(doc, change) {
  9160. return change.from.ch == 0 && change.to.ch == 0 && lst(change.text) == "" &&
  9161. (!doc.cm || doc.cm.options.wholeLineUpdateBefore)
  9162. }
  9163. // Perform a change on the document data structure.
  9164. function updateDoc(doc, change, markedSpans, estimateHeight) {
  9165. function spansFor(n) {return markedSpans ? markedSpans[n] : null}
  9166. function update(line, text, spans) {
  9167. updateLine(line, text, spans, estimateHeight);
  9168. signalLater(line, "change", line, change);
  9169. }
  9170. function linesFor(start, end) {
  9171. var result = [];
  9172. for (var i = start; i < end; ++i)
  9173. { result.push(new Line(text[i], spansFor(i), estimateHeight)); }
  9174. return result
  9175. }
  9176. var from = change.from, to = change.to, text = change.text;
  9177. var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line);
  9178. var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line;
  9179. // Adjust the line structure
  9180. if (change.full) {
  9181. doc.insert(0, linesFor(0, text.length));
  9182. doc.remove(text.length, doc.size - text.length);
  9183. } else if (isWholeLineUpdate(doc, change)) {
  9184. // This is a whole-line replace. Treated specially to make
  9185. // sure line objects move the way they are supposed to.
  9186. var added = linesFor(0, text.length - 1);
  9187. update(lastLine, lastLine.text, lastSpans);
  9188. if (nlines) { doc.remove(from.line, nlines); }
  9189. if (added.length) { doc.insert(from.line, added); }
  9190. } else if (firstLine == lastLine) {
  9191. if (text.length == 1) {
  9192. update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans);
  9193. } else {
  9194. var added$1 = linesFor(1, text.length - 1);
  9195. added$1.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight));
  9196. update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));
  9197. doc.insert(from.line + 1, added$1);
  9198. }
  9199. } else if (text.length == 1) {
  9200. update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0));
  9201. doc.remove(from.line + 1, nlines);
  9202. } else {
  9203. update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));
  9204. update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans);
  9205. var added$2 = linesFor(1, text.length - 1);
  9206. if (nlines > 1) { doc.remove(from.line + 1, nlines - 1); }
  9207. doc.insert(from.line + 1, added$2);
  9208. }
  9209. signalLater(doc, "change", doc, change);
  9210. }
  9211. // Call f for all linked documents.
  9212. function linkedDocs(doc, f, sharedHistOnly) {
  9213. function propagate(doc, skip, sharedHist) {
  9214. if (doc.linked) { for (var i = 0; i < doc.linked.length; ++i) {
  9215. var rel = doc.linked[i];
  9216. if (rel.doc == skip) { continue }
  9217. var shared = sharedHist && rel.sharedHist;
  9218. if (sharedHistOnly && !shared) { continue }
  9219. f(rel.doc, shared);
  9220. propagate(rel.doc, doc, shared);
  9221. } }
  9222. }
  9223. propagate(doc, null, true);
  9224. }
  9225. // Attach a document to an editor.
  9226. function attachDoc(cm, doc) {
  9227. if (doc.cm) { throw new Error("This document is already in use.") }
  9228. cm.doc = doc;
  9229. doc.cm = cm;
  9230. estimateLineHeights(cm);
  9231. loadMode(cm);
  9232. setDirectionClass(cm);
  9233. cm.options.direction = doc.direction;
  9234. if (!cm.options.lineWrapping) { findMaxLine(cm); }
  9235. cm.options.mode = doc.modeOption;
  9236. regChange(cm);
  9237. }
  9238. function setDirectionClass(cm) {
  9239. (cm.doc.direction == "rtl" ? addClass : rmClass)(cm.display.lineDiv, "CodeMirror-rtl");
  9240. }
  9241. function directionChanged(cm) {
  9242. runInOp(cm, function () {
  9243. setDirectionClass(cm);
  9244. regChange(cm);
  9245. });
  9246. }
  9247. function History(prev) {
  9248. // Arrays of change events and selections. Doing something adds an
  9249. // event to done and clears undo. Undoing moves events from done
  9250. // to undone, redoing moves them in the other direction.
  9251. this.done = []; this.undone = [];
  9252. this.undoDepth = prev ? prev.undoDepth : Infinity;
  9253. // Used to track when changes can be merged into a single undo
  9254. // event
  9255. this.lastModTime = this.lastSelTime = 0;
  9256. this.lastOp = this.lastSelOp = null;
  9257. this.lastOrigin = this.lastSelOrigin = null;
  9258. // Used by the isClean() method
  9259. this.generation = this.maxGeneration = prev ? prev.maxGeneration : 1;
  9260. }
  9261. // Create a history change event from an updateDoc-style change
  9262. // object.
  9263. function historyChangeFromChange(doc, change) {
  9264. var histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)};
  9265. attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);
  9266. linkedDocs(doc, function (doc) { return attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1); }, true);
  9267. return histChange
  9268. }
  9269. // Pop all selection events off the end of a history array. Stop at
  9270. // a change event.
  9271. function clearSelectionEvents(array) {
  9272. while (array.length) {
  9273. var last = lst(array);
  9274. if (last.ranges) { array.pop(); }
  9275. else { break }
  9276. }
  9277. }
  9278. // Find the top change event in the history. Pop off selection
  9279. // events that are in the way.
  9280. function lastChangeEvent(hist, force) {
  9281. if (force) {
  9282. clearSelectionEvents(hist.done);
  9283. return lst(hist.done)
  9284. } else if (hist.done.length && !lst(hist.done).ranges) {
  9285. return lst(hist.done)
  9286. } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) {
  9287. hist.done.pop();
  9288. return lst(hist.done)
  9289. }
  9290. }
  9291. // Register a change in the history. Merges changes that are within
  9292. // a single operation, or are close together with an origin that
  9293. // allows merging (starting with "+") into a single event.
  9294. function addChangeToHistory(doc, change, selAfter, opId) {
  9295. var hist = doc.history;
  9296. hist.undone.length = 0;
  9297. var time = +new Date, cur;
  9298. var last;
  9299. if ((hist.lastOp == opId ||
  9300. hist.lastOrigin == change.origin && change.origin &&
  9301. ((change.origin.charAt(0) == "+" && hist.lastModTime > time - (doc.cm ? doc.cm.options.historyEventDelay : 500)) ||
  9302. change.origin.charAt(0) == "*")) &&
  9303. (cur = lastChangeEvent(hist, hist.lastOp == opId))) {
  9304. // Merge this change into the last event
  9305. last = lst(cur.changes);
  9306. if (cmp(change.from, change.to) == 0 && cmp(change.from, last.to) == 0) {
  9307. // Optimized case for simple insertion -- don't want to add
  9308. // new changesets for every character typed
  9309. last.to = changeEnd(change);
  9310. } else {
  9311. // Add new sub-event
  9312. cur.changes.push(historyChangeFromChange(doc, change));
  9313. }
  9314. } else {
  9315. // Can not be merged, start a new event.
  9316. var before = lst(hist.done);
  9317. if (!before || !before.ranges)
  9318. { pushSelectionToHistory(doc.sel, hist.done); }
  9319. cur = {changes: [historyChangeFromChange(doc, change)],
  9320. generation: hist.generation};
  9321. hist.done.push(cur);
  9322. while (hist.done.length > hist.undoDepth) {
  9323. hist.done.shift();
  9324. if (!hist.done[0].ranges) { hist.done.shift(); }
  9325. }
  9326. }
  9327. hist.done.push(selAfter);
  9328. hist.generation = ++hist.maxGeneration;
  9329. hist.lastModTime = hist.lastSelTime = time;
  9330. hist.lastOp = hist.lastSelOp = opId;
  9331. hist.lastOrigin = hist.lastSelOrigin = change.origin;
  9332. if (!last) { signal(doc, "historyAdded"); }
  9333. }
  9334. function selectionEventCanBeMerged(doc, origin, prev, sel) {
  9335. var ch = origin.charAt(0);
  9336. return ch == "*" ||
  9337. ch == "+" &&
  9338. prev.ranges.length == sel.ranges.length &&
  9339. prev.somethingSelected() == sel.somethingSelected() &&
  9340. new Date - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.historyEventDelay : 500)
  9341. }
  9342. // Called whenever the selection changes, sets the new selection as
  9343. // the pending selection in the history, and pushes the old pending
  9344. // selection into the 'done' array when it was significantly
  9345. // different (in number of selected ranges, emptiness, or time).
  9346. function addSelectionToHistory(doc, sel, opId, options) {
  9347. var hist = doc.history, origin = options && options.origin;
  9348. // A new event is started when the previous origin does not match
  9349. // the current, or the origins don't allow matching. Origins
  9350. // starting with * are always merged, those starting with + are
  9351. // merged when similar and close together in time.
  9352. if (opId == hist.lastSelOp ||
  9353. (origin && hist.lastSelOrigin == origin &&
  9354. (hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin ||
  9355. selectionEventCanBeMerged(doc, origin, lst(hist.done), sel))))
  9356. { hist.done[hist.done.length - 1] = sel; }
  9357. else
  9358. { pushSelectionToHistory(sel, hist.done); }
  9359. hist.lastSelTime = +new Date;
  9360. hist.lastSelOrigin = origin;
  9361. hist.lastSelOp = opId;
  9362. if (options && options.clearRedo !== false)
  9363. { clearSelectionEvents(hist.undone); }
  9364. }
  9365. function pushSelectionToHistory(sel, dest) {
  9366. var top = lst(dest);
  9367. if (!(top && top.ranges && top.equals(sel)))
  9368. { dest.push(sel); }
  9369. }
  9370. // Used to store marked span information in the history.
  9371. function attachLocalSpans(doc, change, from, to) {
  9372. var existing = change["spans_" + doc.id], n = 0;
  9373. doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function (line) {
  9374. if (line.markedSpans)
  9375. { (existing || (existing = change["spans_" + doc.id] = {}))[n] = line.markedSpans; }
  9376. ++n;
  9377. });
  9378. }
  9379. // When un/re-doing restores text containing marked spans, those
  9380. // that have been explicitly cleared should not be restored.
  9381. function removeClearedSpans(spans) {
  9382. if (!spans) { return null }
  9383. var out;
  9384. for (var i = 0; i < spans.length; ++i) {
  9385. if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }
  9386. else if (out) { out.push(spans[i]); }
  9387. }
  9388. return !out ? spans : out.length ? out : null
  9389. }
  9390. // Retrieve and filter the old marked spans stored in a change event.
  9391. function getOldSpans(doc, change) {
  9392. var found = change["spans_" + doc.id];
  9393. if (!found) { return null }
  9394. var nw = [];
  9395. for (var i = 0; i < change.text.length; ++i)
  9396. { nw.push(removeClearedSpans(found[i])); }
  9397. return nw
  9398. }
  9399. // Used for un/re-doing changes from the history. Combines the
  9400. // result of computing the existing spans with the set of spans that
  9401. // existed in the history (so that deleting around a span and then
  9402. // undoing brings back the span).
  9403. function mergeOldSpans(doc, change) {
  9404. var old = getOldSpans(doc, change);
  9405. var stretched = stretchSpansOverChange(doc, change);
  9406. if (!old) { return stretched }
  9407. if (!stretched) { return old }
  9408. for (var i = 0; i < old.length; ++i) {
  9409. var oldCur = old[i], stretchCur = stretched[i];
  9410. if (oldCur && stretchCur) {
  9411. spans: for (var j = 0; j < stretchCur.length; ++j) {
  9412. var span = stretchCur[j];
  9413. for (var k = 0; k < oldCur.length; ++k)
  9414. { if (oldCur[k].marker == span.marker) { continue spans } }
  9415. oldCur.push(span);
  9416. }
  9417. } else if (stretchCur) {
  9418. old[i] = stretchCur;
  9419. }
  9420. }
  9421. return old
  9422. }
  9423. // Used both to provide a JSON-safe object in .getHistory, and, when
  9424. // detaching a document, to split the history in two
  9425. function copyHistoryArray(events, newGroup, instantiateSel) {
  9426. var copy = [];
  9427. for (var i = 0; i < events.length; ++i) {
  9428. var event = events[i];
  9429. if (event.ranges) {
  9430. copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);
  9431. continue
  9432. }
  9433. var changes = event.changes, newChanges = [];
  9434. copy.push({changes: newChanges});
  9435. for (var j = 0; j < changes.length; ++j) {
  9436. var change = changes[j], m = (void 0);
  9437. newChanges.push({from: change.from, to: change.to, text: change.text});
  9438. if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\d+)$/)) {
  9439. if (indexOf(newGroup, Number(m[1])) > -1) {
  9440. lst(newChanges)[prop] = change[prop];
  9441. delete change[prop];
  9442. }
  9443. } } }
  9444. }
  9445. }
  9446. return copy
  9447. }
  9448. // The 'scroll' parameter given to many of these indicated whether
  9449. // the new cursor position should be scrolled into view after
  9450. // modifying the selection.
  9451. // If shift is held or the extend flag is set, extends a range to
  9452. // include a given position (and optionally a second position).
  9453. // Otherwise, simply returns the range between the given positions.
  9454. // Used for cursor motion and such.
  9455. function extendRange(range, head, other, extend) {
  9456. if (extend) {
  9457. var anchor = range.anchor;
  9458. if (other) {
  9459. var posBefore = cmp(head, anchor) < 0;
  9460. if (posBefore != (cmp(other, anchor) < 0)) {
  9461. anchor = head;
  9462. head = other;
  9463. } else if (posBefore != (cmp(head, other) < 0)) {
  9464. head = other;
  9465. }
  9466. }
  9467. return new Range(anchor, head)
  9468. } else {
  9469. return new Range(other || head, head)
  9470. }
  9471. }
  9472. // Extend the primary selection range, discard the rest.
  9473. function extendSelection(doc, head, other, options, extend) {
  9474. if (extend == null) { extend = doc.cm && (doc.cm.display.shift || doc.extend); }
  9475. setSelection(doc, new Selection([extendRange(doc.sel.primary(), head, other, extend)], 0), options);
  9476. }
  9477. // Extend all selections (pos is an array of selections with length
  9478. // equal the number of selections)
  9479. function extendSelections(doc, heads, options) {
  9480. var out = [];
  9481. var extend = doc.cm && (doc.cm.display.shift || doc.extend);
  9482. for (var i = 0; i < doc.sel.ranges.length; i++)
  9483. { out[i] = extendRange(doc.sel.ranges[i], heads[i], null, extend); }
  9484. var newSel = normalizeSelection(doc.cm, out, doc.sel.primIndex);
  9485. setSelection(doc, newSel, options);
  9486. }
  9487. // Updates a single range in the selection.
  9488. function replaceOneSelection(doc, i, range, options) {
  9489. var ranges = doc.sel.ranges.slice(0);
  9490. ranges[i] = range;
  9491. setSelection(doc, normalizeSelection(doc.cm, ranges, doc.sel.primIndex), options);
  9492. }
  9493. // Reset the selection to a single range.
  9494. function setSimpleSelection(doc, anchor, head, options) {
  9495. setSelection(doc, simpleSelection(anchor, head), options);
  9496. }
  9497. // Give beforeSelectionChange handlers a change to influence a
  9498. // selection update.
  9499. function filterSelectionChange(doc, sel, options) {
  9500. var obj = {
  9501. ranges: sel.ranges,
  9502. update: function(ranges) {
  9503. this.ranges = [];
  9504. for (var i = 0; i < ranges.length; i++)
  9505. { this.ranges[i] = new Range(clipPos(doc, ranges[i].anchor),
  9506. clipPos(doc, ranges[i].head)); }
  9507. },
  9508. origin: options && options.origin
  9509. };
  9510. signal(doc, "beforeSelectionChange", doc, obj);
  9511. if (doc.cm) { signal(doc.cm, "beforeSelectionChange", doc.cm, obj); }
  9512. if (obj.ranges != sel.ranges) { return normalizeSelection(doc.cm, obj.ranges, obj.ranges.length - 1) }
  9513. else { return sel }
  9514. }
  9515. function setSelectionReplaceHistory(doc, sel, options) {
  9516. var done = doc.history.done, last = lst(done);
  9517. if (last && last.ranges) {
  9518. done[done.length - 1] = sel;
  9519. setSelectionNoUndo(doc, sel, options);
  9520. } else {
  9521. setSelection(doc, sel, options);
  9522. }
  9523. }
  9524. // Set a new selection.
  9525. function setSelection(doc, sel, options) {
  9526. setSelectionNoUndo(doc, sel, options);
  9527. addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options);
  9528. }
  9529. function setSelectionNoUndo(doc, sel, options) {
  9530. if (hasHandler(doc, "beforeSelectionChange") || doc.cm && hasHandler(doc.cm, "beforeSelectionChange"))
  9531. { sel = filterSelectionChange(doc, sel, options); }
  9532. var bias = options && options.bias ||
  9533. (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1);
  9534. setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true));
  9535. if (!(options && options.scroll === false) && doc.cm && doc.cm.getOption("readOnly") != "nocursor")
  9536. { ensureCursorVisible(doc.cm); }
  9537. }
  9538. function setSelectionInner(doc, sel) {
  9539. if (sel.equals(doc.sel)) { return }
  9540. doc.sel = sel;
  9541. if (doc.cm) {
  9542. doc.cm.curOp.updateInput = 1;
  9543. doc.cm.curOp.selectionChanged = true;
  9544. signalCursorActivity(doc.cm);
  9545. }
  9546. signalLater(doc, "cursorActivity", doc);
  9547. }
  9548. // Verify that the selection does not partially select any atomic
  9549. // marked ranges.
  9550. function reCheckSelection(doc) {
  9551. setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false));
  9552. }
  9553. // Return a selection that does not partially select any atomic
  9554. // ranges.
  9555. function skipAtomicInSelection(doc, sel, bias, mayClear) {
  9556. var out;
  9557. for (var i = 0; i < sel.ranges.length; i++) {
  9558. var range = sel.ranges[i];
  9559. var old = sel.ranges.length == doc.sel.ranges.length && doc.sel.ranges[i];
  9560. var newAnchor = skipAtomic(doc, range.anchor, old && old.anchor, bias, mayClear);
  9561. var newHead = skipAtomic(doc, range.head, old && old.head, bias, mayClear);
  9562. if (out || newAnchor != range.anchor || newHead != range.head) {
  9563. if (!out) { out = sel.ranges.slice(0, i); }
  9564. out[i] = new Range(newAnchor, newHead);
  9565. }
  9566. }
  9567. return out ? normalizeSelection(doc.cm, out, sel.primIndex) : sel
  9568. }
  9569. function skipAtomicInner(doc, pos, oldPos, dir, mayClear) {
  9570. var line = getLine(doc, pos.line);
  9571. if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {
  9572. var sp = line.markedSpans[i], m = sp.marker;
  9573. // Determine if we should prevent the cursor being placed to the left/right of an atomic marker
  9574. // Historically this was determined using the inclusiveLeft/Right option, but the new way to control it
  9575. // is with selectLeft/Right
  9576. var preventCursorLeft = ("selectLeft" in m) ? !m.selectLeft : m.inclusiveLeft;
  9577. var preventCursorRight = ("selectRight" in m) ? !m.selectRight : m.inclusiveRight;
  9578. if ((sp.from == null || (preventCursorLeft ? sp.from <= pos.ch : sp.from < pos.ch)) &&
  9579. (sp.to == null || (preventCursorRight ? sp.to >= pos.ch : sp.to > pos.ch))) {
  9580. if (mayClear) {
  9581. signal(m, "beforeCursorEnter");
  9582. if (m.explicitlyCleared) {
  9583. if (!line.markedSpans) { break }
  9584. else {--i; continue}
  9585. }
  9586. }
  9587. if (!m.atomic) { continue }
  9588. if (oldPos) {
  9589. var near = m.find(dir < 0 ? 1 : -1), diff = (void 0);
  9590. if (dir < 0 ? preventCursorRight : preventCursorLeft)
  9591. { near = movePos(doc, near, -dir, near && near.line == pos.line ? line : null); }
  9592. if (near && near.line == pos.line && (diff = cmp(near, oldPos)) && (dir < 0 ? diff < 0 : diff > 0))
  9593. { return skipAtomicInner(doc, near, pos, dir, mayClear) }
  9594. }
  9595. var far = m.find(dir < 0 ? -1 : 1);
  9596. if (dir < 0 ? preventCursorLeft : preventCursorRight)
  9597. { far = movePos(doc, far, dir, far.line == pos.line ? line : null); }
  9598. return far ? skipAtomicInner(doc, far, pos, dir, mayClear) : null
  9599. }
  9600. } }
  9601. return pos
  9602. }
  9603. // Ensure a given position is not inside an atomic range.
  9604. function skipAtomic(doc, pos, oldPos, bias, mayClear) {
  9605. var dir = bias || 1;
  9606. var found = skipAtomicInner(doc, pos, oldPos, dir, mayClear) ||
  9607. (!mayClear && skipAtomicInner(doc, pos, oldPos, dir, true)) ||
  9608. skipAtomicInner(doc, pos, oldPos, -dir, mayClear) ||
  9609. (!mayClear && skipAtomicInner(doc, pos, oldPos, -dir, true));
  9610. if (!found) {
  9611. doc.cantEdit = true;
  9612. return Pos(doc.first, 0)
  9613. }
  9614. return found
  9615. }
  9616. function movePos(doc, pos, dir, line) {
  9617. if (dir < 0 && pos.ch == 0) {
  9618. if (pos.line > doc.first) { return clipPos(doc, Pos(pos.line - 1)) }
  9619. else { return null }
  9620. } else if (dir > 0 && pos.ch == (line || getLine(doc, pos.line)).text.length) {
  9621. if (pos.line < doc.first + doc.size - 1) { return Pos(pos.line + 1, 0) }
  9622. else { return null }
  9623. } else {
  9624. return new Pos(pos.line, pos.ch + dir)
  9625. }
  9626. }
  9627. function selectAll(cm) {
  9628. cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()), sel_dontScroll);
  9629. }
  9630. // UPDATING
  9631. // Allow "beforeChange" event handlers to influence a change
  9632. function filterChange(doc, change, update) {
  9633. var obj = {
  9634. canceled: false,
  9635. from: change.from,
  9636. to: change.to,
  9637. text: change.text,
  9638. origin: change.origin,
  9639. cancel: function () { return obj.canceled = true; }
  9640. };
  9641. if (update) { obj.update = function (from, to, text, origin) {
  9642. if (from) { obj.from = clipPos(doc, from); }
  9643. if (to) { obj.to = clipPos(doc, to); }
  9644. if (text) { obj.text = text; }
  9645. if (origin !== undefined) { obj.origin = origin; }
  9646. }; }
  9647. signal(doc, "beforeChange", doc, obj);
  9648. if (doc.cm) { signal(doc.cm, "beforeChange", doc.cm, obj); }
  9649. if (obj.canceled) {
  9650. if (doc.cm) { doc.cm.curOp.updateInput = 2; }
  9651. return null
  9652. }
  9653. return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin}
  9654. }
  9655. // Apply a change to a document, and add it to the document's
  9656. // history, and propagating it to all linked documents.
  9657. function makeChange(doc, change, ignoreReadOnly) {
  9658. if (doc.cm) {
  9659. if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }
  9660. if (doc.cm.state.suppressEdits) { return }
  9661. }
  9662. if (hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange")) {
  9663. change = filterChange(doc, change, true);
  9664. if (!change) { return }
  9665. }
  9666. // Possibly split or suppress the update based on the presence
  9667. // of read-only spans in its range.
  9668. var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);
  9669. if (split) {
  9670. for (var i = split.length - 1; i >= 0; --i)
  9671. { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [""] : change.text, origin: change.origin}); }
  9672. } else {
  9673. makeChangeInner(doc, change);
  9674. }
  9675. }
  9676. function makeChangeInner(doc, change) {
  9677. if (change.text.length == 1 && change.text[0] == "" && cmp(change.from, change.to) == 0) { return }
  9678. var selAfter = computeSelAfterChange(doc, change);
  9679. addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN);
  9680. makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change));
  9681. var rebased = [];
  9682. linkedDocs(doc, function (doc, sharedHist) {
  9683. if (!sharedHist && indexOf(rebased, doc.history) == -1) {
  9684. rebaseHist(doc.history, change);
  9685. rebased.push(doc.history);
  9686. }
  9687. makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change));
  9688. });
  9689. }
  9690. // Revert a change stored in a document's history.
  9691. function makeChangeFromHistory(doc, type, allowSelectionOnly) {
  9692. var suppress = doc.cm && doc.cm.state.suppressEdits;
  9693. if (suppress && !allowSelectionOnly) { return }
  9694. var hist = doc.history, event, selAfter = doc.sel;
  9695. var source = type == "undo" ? hist.done : hist.undone, dest = type == "undo" ? hist.undone : hist.done;
  9696. // Verify that there is a useable event (so that ctrl-z won't
  9697. // needlessly clear selection events)
  9698. var i = 0;
  9699. for (; i < source.length; i++) {
  9700. event = source[i];
  9701. if (allowSelectionOnly ? event.ranges && !event.equals(doc.sel) : !event.ranges)
  9702. { break }
  9703. }
  9704. if (i == source.length) { return }
  9705. hist.lastOrigin = hist.lastSelOrigin = null;
  9706. for (;;) {
  9707. event = source.pop();
  9708. if (event.ranges) {
  9709. pushSelectionToHistory(event, dest);
  9710. if (allowSelectionOnly && !event.equals(doc.sel)) {
  9711. setSelection(doc, event, {clearRedo: false});
  9712. return
  9713. }
  9714. selAfter = event;
  9715. } else if (suppress) {
  9716. source.push(event);
  9717. return
  9718. } else { break }
  9719. }
  9720. // Build up a reverse change object to add to the opposite history
  9721. // stack (redo when undoing, and vice versa).
  9722. var antiChanges = [];
  9723. pushSelectionToHistory(selAfter, dest);
  9724. dest.push({changes: antiChanges, generation: hist.generation});
  9725. hist.generation = event.generation || ++hist.maxGeneration;
  9726. var filter = hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange");
  9727. var loop = function ( i ) {
  9728. var change = event.changes[i];
  9729. change.origin = type;
  9730. if (filter && !filterChange(doc, change, false)) {
  9731. source.length = 0;
  9732. return {}
  9733. }
  9734. antiChanges.push(historyChangeFromChange(doc, change));
  9735. var after = i ? computeSelAfterChange(doc, change) : lst(source);
  9736. makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change));
  9737. if (!i && doc.cm) { doc.cm.scrollIntoView({from: change.from, to: changeEnd(change)}); }
  9738. var rebased = [];
  9739. // Propagate to the linked documents
  9740. linkedDocs(doc, function (doc, sharedHist) {
  9741. if (!sharedHist && indexOf(rebased, doc.history) == -1) {
  9742. rebaseHist(doc.history, change);
  9743. rebased.push(doc.history);
  9744. }
  9745. makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change));
  9746. });
  9747. };
  9748. for (var i$1 = event.changes.length - 1; i$1 >= 0; --i$1) {
  9749. var returned = loop( i$1 );
  9750. if ( returned ) return returned.v;
  9751. }
  9752. }
  9753. // Sub-views need their line numbers shifted when text is added
  9754. // above or below them in the parent document.
  9755. function shiftDoc(doc, distance) {
  9756. if (distance == 0) { return }
  9757. doc.first += distance;
  9758. doc.sel = new Selection(map(doc.sel.ranges, function (range) { return new Range(
  9759. Pos(range.anchor.line + distance, range.anchor.ch),
  9760. Pos(range.head.line + distance, range.head.ch)
  9761. ); }), doc.sel.primIndex);
  9762. if (doc.cm) {
  9763. regChange(doc.cm, doc.first, doc.first - distance, distance);
  9764. for (var d = doc.cm.display, l = d.viewFrom; l < d.viewTo; l++)
  9765. { regLineChange(doc.cm, l, "gutter"); }
  9766. }
  9767. }
  9768. // More lower-level change function, handling only a single document
  9769. // (not linked ones).
  9770. function makeChangeSingleDoc(doc, change, selAfter, spans) {
  9771. if (doc.cm && !doc.cm.curOp)
  9772. { return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans) }
  9773. if (change.to.line < doc.first) {
  9774. shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line));
  9775. return
  9776. }
  9777. if (change.from.line > doc.lastLine()) { return }
  9778. // Clip the change to the size of this doc
  9779. if (change.from.line < doc.first) {
  9780. var shift = change.text.length - 1 - (doc.first - change.from.line);
  9781. shiftDoc(doc, shift);
  9782. change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch),
  9783. text: [lst(change.text)], origin: change.origin};
  9784. }
  9785. var last = doc.lastLine();
  9786. if (change.to.line > last) {
  9787. change = {from: change.from, to: Pos(last, getLine(doc, last).text.length),
  9788. text: [change.text[0]], origin: change.origin};
  9789. }
  9790. change.removed = getBetween(doc, change.from, change.to);
  9791. if (!selAfter) { selAfter = computeSelAfterChange(doc, change); }
  9792. if (doc.cm) { makeChangeSingleDocInEditor(doc.cm, change, spans); }
  9793. else { updateDoc(doc, change, spans); }
  9794. setSelectionNoUndo(doc, selAfter, sel_dontScroll);
  9795. if (doc.cantEdit && skipAtomic(doc, Pos(doc.firstLine(), 0)))
  9796. { doc.cantEdit = false; }
  9797. }
  9798. // Handle the interaction of a change to a document with the editor
  9799. // that this document is part of.
  9800. function makeChangeSingleDocInEditor(cm, change, spans) {
  9801. var doc = cm.doc, display = cm.display, from = change.from, to = change.to;
  9802. var recomputeMaxLength = false, checkWidthStart = from.line;
  9803. if (!cm.options.lineWrapping) {
  9804. checkWidthStart = lineNo(visualLine(getLine(doc, from.line)));
  9805. doc.iter(checkWidthStart, to.line + 1, function (line) {
  9806. if (line == display.maxLine) {
  9807. recomputeMaxLength = true;
  9808. return true
  9809. }
  9810. });
  9811. }
  9812. if (doc.sel.contains(change.from, change.to) > -1)
  9813. { signalCursorActivity(cm); }
  9814. updateDoc(doc, change, spans, estimateHeight(cm));
  9815. if (!cm.options.lineWrapping) {
  9816. doc.iter(checkWidthStart, from.line + change.text.length, function (line) {
  9817. var len = lineLength(line);
  9818. if (len > display.maxLineLength) {
  9819. display.maxLine = line;
  9820. display.maxLineLength = len;
  9821. display.maxLineChanged = true;
  9822. recomputeMaxLength = false;
  9823. }
  9824. });
  9825. if (recomputeMaxLength) { cm.curOp.updateMaxLine = true; }
  9826. }
  9827. retreatFrontier(doc, from.line);
  9828. startWorker(cm, 400);
  9829. var lendiff = change.text.length - (to.line - from.line) - 1;
  9830. // Remember that these lines changed, for updating the display
  9831. if (change.full)
  9832. { regChange(cm); }
  9833. else if (from.line == to.line && change.text.length == 1 && !isWholeLineUpdate(cm.doc, change))
  9834. { regLineChange(cm, from.line, "text"); }
  9835. else
  9836. { regChange(cm, from.line, to.line + 1, lendiff); }
  9837. var changesHandler = hasHandler(cm, "changes"), changeHandler = hasHandler(cm, "change");
  9838. if (changeHandler || changesHandler) {
  9839. var obj = {
  9840. from: from, to: to,
  9841. text: change.text,
  9842. removed: change.removed,
  9843. origin: change.origin
  9844. };
  9845. if (changeHandler) { signalLater(cm, "change", cm, obj); }
  9846. if (changesHandler) { (cm.curOp.changeObjs || (cm.curOp.changeObjs = [])).push(obj); }
  9847. }
  9848. cm.display.selForContextMenu = null;
  9849. }
  9850. function replaceRange(doc, code, from, to, origin) {
  9851. var assign;
  9852. if (!to) { to = from; }
  9853. if (cmp(to, from) < 0) { (assign = [to, from], from = assign[0], to = assign[1]); }
  9854. if (typeof code == "string") { code = doc.splitLines(code); }
  9855. makeChange(doc, {from: from, to: to, text: code, origin: origin});
  9856. }
  9857. // Rebasing/resetting history to deal with externally-sourced changes
  9858. function rebaseHistSelSingle(pos, from, to, diff) {
  9859. if (to < pos.line) {
  9860. pos.line += diff;
  9861. } else if (from < pos.line) {
  9862. pos.line = from;
  9863. pos.ch = 0;
  9864. }
  9865. }
  9866. // Tries to rebase an array of history events given a change in the
  9867. // document. If the change touches the same lines as the event, the
  9868. // event, and everything 'behind' it, is discarded. If the change is
  9869. // before the event, the event's positions are updated. Uses a
  9870. // copy-on-write scheme for the positions, to avoid having to
  9871. // reallocate them all on every rebase, but also avoid problems with
  9872. // shared position objects being unsafely updated.
  9873. function rebaseHistArray(array, from, to, diff) {
  9874. for (var i = 0; i < array.length; ++i) {
  9875. var sub = array[i], ok = true;
  9876. if (sub.ranges) {
  9877. if (!sub.copied) { sub = array[i] = sub.deepCopy(); sub.copied = true; }
  9878. for (var j = 0; j < sub.ranges.length; j++) {
  9879. rebaseHistSelSingle(sub.ranges[j].anchor, from, to, diff);
  9880. rebaseHistSelSingle(sub.ranges[j].head, from, to, diff);
  9881. }
  9882. continue
  9883. }
  9884. for (var j$1 = 0; j$1 < sub.changes.length; ++j$1) {
  9885. var cur = sub.changes[j$1];
  9886. if (to < cur.from.line) {
  9887. cur.from = Pos(cur.from.line + diff, cur.from.ch);
  9888. cur.to = Pos(cur.to.line + diff, cur.to.ch);
  9889. } else if (from <= cur.to.line) {
  9890. ok = false;
  9891. break
  9892. }
  9893. }
  9894. if (!ok) {
  9895. array.splice(0, i + 1);
  9896. i = 0;
  9897. }
  9898. }
  9899. }
  9900. function rebaseHist(hist, change) {
  9901. var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1;
  9902. rebaseHistArray(hist.done, from, to, diff);
  9903. rebaseHistArray(hist.undone, from, to, diff);
  9904. }
  9905. // Utility for applying a change to a line by handle or number,
  9906. // returning the number and optionally registering the line as
  9907. // changed.
  9908. function changeLine(doc, handle, changeType, op) {
  9909. var no = handle, line = handle;
  9910. if (typeof handle == "number") { line = getLine(doc, clipLine(doc, handle)); }
  9911. else { no = lineNo(handle); }
  9912. if (no == null) { return null }
  9913. if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }
  9914. return line
  9915. }
  9916. // The document is represented as a BTree consisting of leaves, with
  9917. // chunk of lines in them, and branches, with up to ten leaves or
  9918. // other branch nodes below them. The top node is always a branch
  9919. // node, and is the document object itself (meaning it has
  9920. // additional methods and properties).
  9921. //
  9922. // All nodes have parent links. The tree is used both to go from
  9923. // line numbers to line objects, and to go from objects to numbers.
  9924. // It also indexes by height, and is used to convert between height
  9925. // and line object, and to find the total height of the document.
  9926. //
  9927. // See also http://marijnhaverbeke.nl/blog/codemirror-line-tree.html
  9928. function LeafChunk(lines) {
  9929. this.lines = lines;
  9930. this.parent = null;
  9931. var height = 0;
  9932. for (var i = 0; i < lines.length; ++i) {
  9933. lines[i].parent = this;
  9934. height += lines[i].height;
  9935. }
  9936. this.height = height;
  9937. }
  9938. LeafChunk.prototype = {
  9939. chunkSize: function() { return this.lines.length },
  9940. // Remove the n lines at offset 'at'.
  9941. removeInner: function(at, n) {
  9942. for (var i = at, e = at + n; i < e; ++i) {
  9943. var line = this.lines[i];
  9944. this.height -= line.height;
  9945. cleanUpLine(line);
  9946. signalLater(line, "delete");
  9947. }
  9948. this.lines.splice(at, n);
  9949. },
  9950. // Helper used to collapse a small branch into a single leaf.
  9951. collapse: function(lines) {
  9952. lines.push.apply(lines, this.lines);
  9953. },
  9954. // Insert the given array of lines at offset 'at', count them as
  9955. // having the given height.
  9956. insertInner: function(at, lines, height) {
  9957. this.height += height;
  9958. this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at));
  9959. for (var i = 0; i < lines.length; ++i) { lines[i].parent = this; }
  9960. },
  9961. // Used to iterate over a part of the tree.
  9962. iterN: function(at, n, op) {
  9963. for (var e = at + n; at < e; ++at)
  9964. { if (op(this.lines[at])) { return true } }
  9965. }
  9966. };
  9967. function BranchChunk(children) {
  9968. this.children = children;
  9969. var size = 0, height = 0;
  9970. for (var i = 0; i < children.length; ++i) {
  9971. var ch = children[i];
  9972. size += ch.chunkSize(); height += ch.height;
  9973. ch.parent = this;
  9974. }
  9975. this.size = size;
  9976. this.height = height;
  9977. this.parent = null;
  9978. }
  9979. BranchChunk.prototype = {
  9980. chunkSize: function() { return this.size },
  9981. removeInner: function(at, n) {
  9982. this.size -= n;
  9983. for (var i = 0; i < this.children.length; ++i) {
  9984. var child = this.children[i], sz = child.chunkSize();
  9985. if (at < sz) {
  9986. var rm = Math.min(n, sz - at), oldHeight = child.height;
  9987. child.removeInner(at, rm);
  9988. this.height -= oldHeight - child.height;
  9989. if (sz == rm) { this.children.splice(i--, 1); child.parent = null; }
  9990. if ((n -= rm) == 0) { break }
  9991. at = 0;
  9992. } else { at -= sz; }
  9993. }
  9994. // If the result is smaller than 25 lines, ensure that it is a
  9995. // single leaf node.
  9996. if (this.size - n < 25 &&
  9997. (this.children.length > 1 || !(this.children[0] instanceof LeafChunk))) {
  9998. var lines = [];
  9999. this.collapse(lines);
  10000. this.children = [new LeafChunk(lines)];
  10001. this.children[0].parent = this;
  10002. }
  10003. },
  10004. collapse: function(lines) {
  10005. for (var i = 0; i < this.children.length; ++i) { this.children[i].collapse(lines); }
  10006. },
  10007. insertInner: function(at, lines, height) {
  10008. this.size += lines.length;
  10009. this.height += height;
  10010. for (var i = 0; i < this.children.length; ++i) {
  10011. var child = this.children[i], sz = child.chunkSize();
  10012. if (at <= sz) {
  10013. child.insertInner(at, lines, height);
  10014. if (child.lines && child.lines.length > 50) {
  10015. // To avoid memory thrashing when child.lines is huge (e.g. first view of a large file), it's never spliced.
  10016. // Instead, small slices are taken. They're taken in order because sequential memory accesses are fastest.
  10017. var remaining = child.lines.length % 25 + 25;
  10018. for (var pos = remaining; pos < child.lines.length;) {
  10019. var leaf = new LeafChunk(child.lines.slice(pos, pos += 25));
  10020. child.height -= leaf.height;
  10021. this.children.splice(++i, 0, leaf);
  10022. leaf.parent = this;
  10023. }
  10024. child.lines = child.lines.slice(0, remaining);
  10025. this.maybeSpill();
  10026. }
  10027. break
  10028. }
  10029. at -= sz;
  10030. }
  10031. },
  10032. // When a node has grown, check whether it should be split.
  10033. maybeSpill: function() {
  10034. if (this.children.length <= 10) { return }
  10035. var me = this;
  10036. do {
  10037. var spilled = me.children.splice(me.children.length - 5, 5);
  10038. var sibling = new BranchChunk(spilled);
  10039. if (!me.parent) { // Become the parent node
  10040. var copy = new BranchChunk(me.children);
  10041. copy.parent = me;
  10042. me.children = [copy, sibling];
  10043. me = copy;
  10044. } else {
  10045. me.size -= sibling.size;
  10046. me.height -= sibling.height;
  10047. var myIndex = indexOf(me.parent.children, me);
  10048. me.parent.children.splice(myIndex + 1, 0, sibling);
  10049. }
  10050. sibling.parent = me.parent;
  10051. } while (me.children.length > 10)
  10052. me.parent.maybeSpill();
  10053. },
  10054. iterN: function(at, n, op) {
  10055. for (var i = 0; i < this.children.length; ++i) {
  10056. var child = this.children[i], sz = child.chunkSize();
  10057. if (at < sz) {
  10058. var used = Math.min(n, sz - at);
  10059. if (child.iterN(at, used, op)) { return true }
  10060. if ((n -= used) == 0) { break }
  10061. at = 0;
  10062. } else { at -= sz; }
  10063. }
  10064. }
  10065. };
  10066. // Line widgets are block elements displayed above or below a line.
  10067. var LineWidget = function(doc, node, options) {
  10068. if (options) { for (var opt in options) { if (options.hasOwnProperty(opt))
  10069. { this[opt] = options[opt]; } } }
  10070. this.doc = doc;
  10071. this.node = node;
  10072. };
  10073. LineWidget.prototype.clear = function () {
  10074. var cm = this.doc.cm, ws = this.line.widgets, line = this.line, no = lineNo(line);
  10075. if (no == null || !ws) { return }
  10076. for (var i = 0; i < ws.length; ++i) { if (ws[i] == this) { ws.splice(i--, 1); } }
  10077. if (!ws.length) { line.widgets = null; }
  10078. var height = widgetHeight(this);
  10079. updateLineHeight(line, Math.max(0, line.height - height));
  10080. if (cm) {
  10081. runInOp(cm, function () {
  10082. adjustScrollWhenAboveVisible(cm, line, -height);
  10083. regLineChange(cm, no, "widget");
  10084. });
  10085. signalLater(cm, "lineWidgetCleared", cm, this, no);
  10086. }
  10087. };
  10088. LineWidget.prototype.changed = function () {
  10089. var this$1 = this;
  10090. var oldH = this.height, cm = this.doc.cm, line = this.line;
  10091. this.height = null;
  10092. var diff = widgetHeight(this) - oldH;
  10093. if (!diff) { return }
  10094. if (!lineIsHidden(this.doc, line)) { updateLineHeight(line, line.height + diff); }
  10095. if (cm) {
  10096. runInOp(cm, function () {
  10097. cm.curOp.forceUpdate = true;
  10098. adjustScrollWhenAboveVisible(cm, line, diff);
  10099. signalLater(cm, "lineWidgetChanged", cm, this$1, lineNo(line));
  10100. });
  10101. }
  10102. };
  10103. eventMixin(LineWidget);
  10104. function adjustScrollWhenAboveVisible(cm, line, diff) {
  10105. if (heightAtLine(line) < ((cm.curOp && cm.curOp.scrollTop) || cm.doc.scrollTop))
  10106. { addToScrollTop(cm, diff); }
  10107. }
  10108. function addLineWidget(doc, handle, node, options) {
  10109. var widget = new LineWidget(doc, node, options);
  10110. var cm = doc.cm;
  10111. if (cm && widget.noHScroll) { cm.display.alignWidgets = true; }
  10112. changeLine(doc, handle, "widget", function (line) {
  10113. var widgets = line.widgets || (line.widgets = []);
  10114. if (widget.insertAt == null) { widgets.push(widget); }
  10115. else { widgets.splice(Math.min(widgets.length, Math.max(0, widget.insertAt)), 0, widget); }
  10116. widget.line = line;
  10117. if (cm && !lineIsHidden(doc, line)) {
  10118. var aboveVisible = heightAtLine(line) < doc.scrollTop;
  10119. updateLineHeight(line, line.height + widgetHeight(widget));
  10120. if (aboveVisible) { addToScrollTop(cm, widget.height); }
  10121. cm.curOp.forceUpdate = true;
  10122. }
  10123. return true
  10124. });
  10125. if (cm) { signalLater(cm, "lineWidgetAdded", cm, widget, typeof handle == "number" ? handle : lineNo(handle)); }
  10126. return widget
  10127. }
  10128. // TEXTMARKERS
  10129. // Created with markText and setBookmark methods. A TextMarker is a
  10130. // handle that can be used to clear or find a marked position in the
  10131. // document. Line objects hold arrays (markedSpans) containing
  10132. // {from, to, marker} object pointing to such marker objects, and
  10133. // indicating that such a marker is present on that line. Multiple
  10134. // lines may point to the same marker when it spans across lines.
  10135. // The spans will have null for their from/to properties when the
  10136. // marker continues beyond the start/end of the line. Markers have
  10137. // links back to the lines they currently touch.
  10138. // Collapsed markers have unique ids, in order to be able to order
  10139. // them, which is needed for uniquely determining an outer marker
  10140. // when they overlap (they may nest, but not partially overlap).
  10141. var nextMarkerId = 0;
  10142. var TextMarker = function(doc, type) {
  10143. this.lines = [];
  10144. this.type = type;
  10145. this.doc = doc;
  10146. this.id = ++nextMarkerId;
  10147. };
  10148. // Clear the marker.
  10149. TextMarker.prototype.clear = function () {
  10150. if (this.explicitlyCleared) { return }
  10151. var cm = this.doc.cm, withOp = cm && !cm.curOp;
  10152. if (withOp) { startOperation(cm); }
  10153. if (hasHandler(this, "clear")) {
  10154. var found = this.find();
  10155. if (found) { signalLater(this, "clear", found.from, found.to); }
  10156. }
  10157. var min = null, max = null;
  10158. for (var i = 0; i < this.lines.length; ++i) {
  10159. var line = this.lines[i];
  10160. var span = getMarkedSpanFor(line.markedSpans, this);
  10161. if (cm && !this.collapsed) { regLineChange(cm, lineNo(line), "text"); }
  10162. else if (cm) {
  10163. if (span.to != null) { max = lineNo(line); }
  10164. if (span.from != null) { min = lineNo(line); }
  10165. }
  10166. line.markedSpans = removeMarkedSpan(line.markedSpans, span);
  10167. if (span.from == null && this.collapsed && !lineIsHidden(this.doc, line) && cm)
  10168. { updateLineHeight(line, textHeight(cm.display)); }
  10169. }
  10170. if (cm && this.collapsed && !cm.options.lineWrapping) { for (var i$1 = 0; i$1 < this.lines.length; ++i$1) {
  10171. var visual = visualLine(this.lines[i$1]), len = lineLength(visual);
  10172. if (len > cm.display.maxLineLength) {
  10173. cm.display.maxLine = visual;
  10174. cm.display.maxLineLength = len;
  10175. cm.display.maxLineChanged = true;
  10176. }
  10177. } }
  10178. if (min != null && cm && this.collapsed) { regChange(cm, min, max + 1); }
  10179. this.lines.length = 0;
  10180. this.explicitlyCleared = true;
  10181. if (this.atomic && this.doc.cantEdit) {
  10182. this.doc.cantEdit = false;
  10183. if (cm) { reCheckSelection(cm.doc); }
  10184. }
  10185. if (cm) { signalLater(cm, "markerCleared", cm, this, min, max); }
  10186. if (withOp) { endOperation(cm); }
  10187. if (this.parent) { this.parent.clear(); }
  10188. };
  10189. // Find the position of the marker in the document. Returns a {from,
  10190. // to} object by default. Side can be passed to get a specific side
  10191. // -- 0 (both), -1 (left), or 1 (right). When lineObj is true, the
  10192. // Pos objects returned contain a line object, rather than a line
  10193. // number (used to prevent looking up the same line twice).
  10194. TextMarker.prototype.find = function (side, lineObj) {
  10195. if (side == null && this.type == "bookmark") { side = 1; }
  10196. var from, to;
  10197. for (var i = 0; i < this.lines.length; ++i) {
  10198. var line = this.lines[i];
  10199. var span = getMarkedSpanFor(line.markedSpans, this);
  10200. if (span.from != null) {
  10201. from = Pos(lineObj ? line : lineNo(line), span.from);
  10202. if (side == -1) { return from }
  10203. }
  10204. if (span.to != null) {
  10205. to = Pos(lineObj ? line : lineNo(line), span.to);
  10206. if (side == 1) { return to }
  10207. }
  10208. }
  10209. return from && {from: from, to: to}
  10210. };
  10211. // Signals that the marker's widget changed, and surrounding layout
  10212. // should be recomputed.
  10213. TextMarker.prototype.changed = function () {
  10214. var this$1 = this;
  10215. var pos = this.find(-1, true), widget = this, cm = this.doc.cm;
  10216. if (!pos || !cm) { return }
  10217. runInOp(cm, function () {
  10218. var line = pos.line, lineN = lineNo(pos.line);
  10219. var view = findViewForLine(cm, lineN);
  10220. if (view) {
  10221. clearLineMeasurementCacheFor(view);
  10222. cm.curOp.selectionChanged = cm.curOp.forceUpdate = true;
  10223. }
  10224. cm.curOp.updateMaxLine = true;
  10225. if (!lineIsHidden(widget.doc, line) && widget.height != null) {
  10226. var oldHeight = widget.height;
  10227. widget.height = null;
  10228. var dHeight = widgetHeight(widget) - oldHeight;
  10229. if (dHeight)
  10230. { updateLineHeight(line, line.height + dHeight); }
  10231. }
  10232. signalLater(cm, "markerChanged", cm, this$1);
  10233. });
  10234. };
  10235. TextMarker.prototype.attachLine = function (line) {
  10236. if (!this.lines.length && this.doc.cm) {
  10237. var op = this.doc.cm.curOp;
  10238. if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1)
  10239. { (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this); }
  10240. }
  10241. this.lines.push(line);
  10242. };
  10243. TextMarker.prototype.detachLine = function (line) {
  10244. this.lines.splice(indexOf(this.lines, line), 1);
  10245. if (!this.lines.length && this.doc.cm) {
  10246. var op = this.doc.cm.curOp
  10247. ;(op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this);
  10248. }
  10249. };
  10250. eventMixin(TextMarker);
  10251. // Create a marker, wire it up to the right lines, and
  10252. function markText(doc, from, to, options, type) {
  10253. // Shared markers (across linked documents) are handled separately
  10254. // (markTextShared will call out to this again, once per
  10255. // document).
  10256. if (options && options.shared) { return markTextShared(doc, from, to, options, type) }
  10257. // Ensure we are in an operation.
  10258. if (doc.cm && !doc.cm.curOp) { return operation(doc.cm, markText)(doc, from, to, options, type) }
  10259. var marker = new TextMarker(doc, type), diff = cmp(from, to);
  10260. if (options) { copyObj(options, marker, false); }
  10261. // Don't connect empty markers unless clearWhenEmpty is false
  10262. if (diff > 0 || diff == 0 && marker.clearWhenEmpty !== false)
  10263. { return marker }
  10264. if (marker.replacedWith) {
  10265. // Showing up as a widget implies collapsed (widget replaces text)
  10266. marker.collapsed = true;
  10267. marker.widgetNode = eltP("span", [marker.replacedWith], "CodeMirror-widget");
  10268. if (!options.handleMouseEvents) { marker.widgetNode.setAttribute("cm-ignore-events", "true"); }
  10269. if (options.insertLeft) { marker.widgetNode.insertLeft = true; }
  10270. }
  10271. if (marker.collapsed) {
  10272. if (conflictingCollapsedRange(doc, from.line, from, to, marker) ||
  10273. from.line != to.line && conflictingCollapsedRange(doc, to.line, from, to, marker))
  10274. { throw new Error("Inserting collapsed marker partially overlapping an existing one") }
  10275. seeCollapsedSpans();
  10276. }
  10277. if (marker.addToHistory)
  10278. { addChangeToHistory(doc, {from: from, to: to, origin: "markText"}, doc.sel, NaN); }
  10279. var curLine = from.line, cm = doc.cm, updateMaxLine;
  10280. doc.iter(curLine, to.line + 1, function (line) {
  10281. if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(line) == cm.display.maxLine)
  10282. { updateMaxLine = true; }
  10283. if (marker.collapsed && curLine != from.line) { updateLineHeight(line, 0); }
  10284. addMarkedSpan(line, new MarkedSpan(marker,
  10285. curLine == from.line ? from.ch : null,
  10286. curLine == to.line ? to.ch : null), doc.cm && doc.cm.curOp);
  10287. ++curLine;
  10288. });
  10289. // lineIsHidden depends on the presence of the spans, so needs a second pass
  10290. if (marker.collapsed) { doc.iter(from.line, to.line + 1, function (line) {
  10291. if (lineIsHidden(doc, line)) { updateLineHeight(line, 0); }
  10292. }); }
  10293. if (marker.clearOnEnter) { on(marker, "beforeCursorEnter", function () { return marker.clear(); }); }
  10294. if (marker.readOnly) {
  10295. seeReadOnlySpans();
  10296. if (doc.history.done.length || doc.history.undone.length)
  10297. { doc.clearHistory(); }
  10298. }
  10299. if (marker.collapsed) {
  10300. marker.id = ++nextMarkerId;
  10301. marker.atomic = true;
  10302. }
  10303. if (cm) {
  10304. // Sync editor state
  10305. if (updateMaxLine) { cm.curOp.updateMaxLine = true; }
  10306. if (marker.collapsed)
  10307. { regChange(cm, from.line, to.line + 1); }
  10308. else if (marker.className || marker.startStyle || marker.endStyle || marker.css ||
  10309. marker.attributes || marker.title)
  10310. { for (var i = from.line; i <= to.line; i++) { regLineChange(cm, i, "text"); } }
  10311. if (marker.atomic) { reCheckSelection(cm.doc); }
  10312. signalLater(cm, "markerAdded", cm, marker);
  10313. }
  10314. return marker
  10315. }
  10316. // SHARED TEXTMARKERS
  10317. // A shared marker spans multiple linked documents. It is
  10318. // implemented as a meta-marker-object controlling multiple normal
  10319. // markers.
  10320. var SharedTextMarker = function(markers, primary) {
  10321. this.markers = markers;
  10322. this.primary = primary;
  10323. for (var i = 0; i < markers.length; ++i)
  10324. { markers[i].parent = this; }
  10325. };
  10326. SharedTextMarker.prototype.clear = function () {
  10327. if (this.explicitlyCleared) { return }
  10328. this.explicitlyCleared = true;
  10329. for (var i = 0; i < this.markers.length; ++i)
  10330. { this.markers[i].clear(); }
  10331. signalLater(this, "clear");
  10332. };
  10333. SharedTextMarker.prototype.find = function (side, lineObj) {
  10334. return this.primary.find(side, lineObj)
  10335. };
  10336. eventMixin(SharedTextMarker);
  10337. function markTextShared(doc, from, to, options, type) {
  10338. options = copyObj(options);
  10339. options.shared = false;
  10340. var markers = [markText(doc, from, to, options, type)], primary = markers[0];
  10341. var widget = options.widgetNode;
  10342. linkedDocs(doc, function (doc) {
  10343. if (widget) { options.widgetNode = widget.cloneNode(true); }
  10344. markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type));
  10345. for (var i = 0; i < doc.linked.length; ++i)
  10346. { if (doc.linked[i].isParent) { return } }
  10347. primary = lst(markers);
  10348. });
  10349. return new SharedTextMarker(markers, primary)
  10350. }
  10351. function findSharedMarkers(doc) {
  10352. return doc.findMarks(Pos(doc.first, 0), doc.clipPos(Pos(doc.lastLine())), function (m) { return m.parent; })
  10353. }
  10354. function copySharedMarkers(doc, markers) {
  10355. for (var i = 0; i < markers.length; i++) {
  10356. var marker = markers[i], pos = marker.find();
  10357. var mFrom = doc.clipPos(pos.from), mTo = doc.clipPos(pos.to);
  10358. if (cmp(mFrom, mTo)) {
  10359. var subMark = markText(doc, mFrom, mTo, marker.primary, marker.primary.type);
  10360. marker.markers.push(subMark);
  10361. subMark.parent = marker;
  10362. }
  10363. }
  10364. }
  10365. function detachSharedMarkers(markers) {
  10366. var loop = function ( i ) {
  10367. var marker = markers[i], linked = [marker.primary.doc];
  10368. linkedDocs(marker.primary.doc, function (d) { return linked.push(d); });
  10369. for (var j = 0; j < marker.markers.length; j++) {
  10370. var subMarker = marker.markers[j];
  10371. if (indexOf(linked, subMarker.doc) == -1) {
  10372. subMarker.parent = null;
  10373. marker.markers.splice(j--, 1);
  10374. }
  10375. }
  10376. };
  10377. for (var i = 0; i < markers.length; i++) loop( i );
  10378. }
  10379. var nextDocId = 0;
  10380. var Doc = function(text, mode, firstLine, lineSep, direction) {
  10381. if (!(this instanceof Doc)) { return new Doc(text, mode, firstLine, lineSep, direction) }
  10382. if (firstLine == null) { firstLine = 0; }
  10383. BranchChunk.call(this, [new LeafChunk([new Line("", null)])]);
  10384. this.first = firstLine;
  10385. this.scrollTop = this.scrollLeft = 0;
  10386. this.cantEdit = false;
  10387. this.cleanGeneration = 1;
  10388. this.modeFrontier = this.highlightFrontier = firstLine;
  10389. var start = Pos(firstLine, 0);
  10390. this.sel = simpleSelection(start);
  10391. this.history = new History(null);
  10392. this.id = ++nextDocId;
  10393. this.modeOption = mode;
  10394. this.lineSep = lineSep;
  10395. this.direction = (direction == "rtl") ? "rtl" : "ltr";
  10396. this.extend = false;
  10397. if (typeof text == "string") { text = this.splitLines(text); }
  10398. updateDoc(this, {from: start, to: start, text: text});
  10399. setSelection(this, simpleSelection(start), sel_dontScroll);
  10400. };
  10401. Doc.prototype = createObj(BranchChunk.prototype, {
  10402. constructor: Doc,
  10403. // Iterate over the document. Supports two forms -- with only one
  10404. // argument, it calls that for each line in the document. With
  10405. // three, it iterates over the range given by the first two (with
  10406. // the second being non-inclusive).
  10407. iter: function(from, to, op) {
  10408. if (op) { this.iterN(from - this.first, to - from, op); }
  10409. else { this.iterN(this.first, this.first + this.size, from); }
  10410. },
  10411. // Non-public interface for adding and removing lines.
  10412. insert: function(at, lines) {
  10413. var height = 0;
  10414. for (var i = 0; i < lines.length; ++i) { height += lines[i].height; }
  10415. this.insertInner(at - this.first, lines, height);
  10416. },
  10417. remove: function(at, n) { this.removeInner(at - this.first, n); },
  10418. // From here, the methods are part of the public interface. Most
  10419. // are also available from CodeMirror (editor) instances.
  10420. getValue: function(lineSep) {
  10421. var lines = getLines(this, this.first, this.first + this.size);
  10422. if (lineSep === false) { return lines }
  10423. return lines.join(lineSep || this.lineSeparator())
  10424. },
  10425. setValue: docMethodOp(function(code) {
  10426. var top = Pos(this.first, 0), last = this.first + this.size - 1;
  10427. makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length),
  10428. text: this.splitLines(code), origin: "setValue", full: true}, true);
  10429. if (this.cm) { scrollToCoords(this.cm, 0, 0); }
  10430. setSelection(this, simpleSelection(top), sel_dontScroll);
  10431. }),
  10432. replaceRange: function(code, from, to, origin) {
  10433. from = clipPos(this, from);
  10434. to = to ? clipPos(this, to) : from;
  10435. replaceRange(this, code, from, to, origin);
  10436. },
  10437. getRange: function(from, to, lineSep) {
  10438. var lines = getBetween(this, clipPos(this, from), clipPos(this, to));
  10439. if (lineSep === false) { return lines }
  10440. if (lineSep === '') { return lines.join('') }
  10441. return lines.join(lineSep || this.lineSeparator())
  10442. },
  10443. getLine: function(line) {var l = this.getLineHandle(line); return l && l.text},
  10444. getLineHandle: function(line) {if (isLine(this, line)) { return getLine(this, line) }},
  10445. getLineNumber: function(line) {return lineNo(line)},
  10446. getLineHandleVisualStart: function(line) {
  10447. if (typeof line == "number") { line = getLine(this, line); }
  10448. return visualLine(line)
  10449. },
  10450. lineCount: function() {return this.size},
  10451. firstLine: function() {return this.first},
  10452. lastLine: function() {return this.first + this.size - 1},
  10453. clipPos: function(pos) {return clipPos(this, pos)},
  10454. getCursor: function(start) {
  10455. var range = this.sel.primary(), pos;
  10456. if (start == null || start == "head") { pos = range.head; }
  10457. else if (start == "anchor") { pos = range.anchor; }
  10458. else if (start == "end" || start == "to" || start === false) { pos = range.to(); }
  10459. else { pos = range.from(); }
  10460. return pos
  10461. },
  10462. listSelections: function() { return this.sel.ranges },
  10463. somethingSelected: function() {return this.sel.somethingSelected()},
  10464. setCursor: docMethodOp(function(line, ch, options) {
  10465. setSimpleSelection(this, clipPos(this, typeof line == "number" ? Pos(line, ch || 0) : line), null, options);
  10466. }),
  10467. setSelection: docMethodOp(function(anchor, head, options) {
  10468. setSimpleSelection(this, clipPos(this, anchor), clipPos(this, head || anchor), options);
  10469. }),
  10470. extendSelection: docMethodOp(function(head, other, options) {
  10471. extendSelection(this, clipPos(this, head), other && clipPos(this, other), options);
  10472. }),
  10473. extendSelections: docMethodOp(function(heads, options) {
  10474. extendSelections(this, clipPosArray(this, heads), options);
  10475. }),
  10476. extendSelectionsBy: docMethodOp(function(f, options) {
  10477. var heads = map(this.sel.ranges, f);
  10478. extendSelections(this, clipPosArray(this, heads), options);
  10479. }),
  10480. setSelections: docMethodOp(function(ranges, primary, options) {
  10481. if (!ranges.length) { return }
  10482. var out = [];
  10483. for (var i = 0; i < ranges.length; i++)
  10484. { out[i] = new Range(clipPos(this, ranges[i].anchor),
  10485. clipPos(this, ranges[i].head || ranges[i].anchor)); }
  10486. if (primary == null) { primary = Math.min(ranges.length - 1, this.sel.primIndex); }
  10487. setSelection(this, normalizeSelection(this.cm, out, primary), options);
  10488. }),
  10489. addSelection: docMethodOp(function(anchor, head, options) {
  10490. var ranges = this.sel.ranges.slice(0);
  10491. ranges.push(new Range(clipPos(this, anchor), clipPos(this, head || anchor)));
  10492. setSelection(this, normalizeSelection(this.cm, ranges, ranges.length - 1), options);
  10493. }),
  10494. getSelection: function(lineSep) {
  10495. var ranges = this.sel.ranges, lines;
  10496. for (var i = 0; i < ranges.length; i++) {
  10497. var sel = getBetween(this, ranges[i].from(), ranges[i].to());
  10498. lines = lines ? lines.concat(sel) : sel;
  10499. }
  10500. if (lineSep === false) { return lines }
  10501. else { return lines.join(lineSep || this.lineSeparator()) }
  10502. },
  10503. getSelections: function(lineSep) {
  10504. var parts = [], ranges = this.sel.ranges;
  10505. for (var i = 0; i < ranges.length; i++) {
  10506. var sel = getBetween(this, ranges[i].from(), ranges[i].to());
  10507. if (lineSep !== false) { sel = sel.join(lineSep || this.lineSeparator()); }
  10508. parts[i] = sel;
  10509. }
  10510. return parts
  10511. },
  10512. replaceSelection: function(code, collapse, origin) {
  10513. var dup = [];
  10514. for (var i = 0; i < this.sel.ranges.length; i++)
  10515. { dup[i] = code; }
  10516. this.replaceSelections(dup, collapse, origin || "+input");
  10517. },
  10518. replaceSelections: docMethodOp(function(code, collapse, origin) {
  10519. var changes = [], sel = this.sel;
  10520. for (var i = 0; i < sel.ranges.length; i++) {
  10521. var range = sel.ranges[i];
  10522. changes[i] = {from: range.from(), to: range.to(), text: this.splitLines(code[i]), origin: origin};
  10523. }
  10524. var newSel = collapse && collapse != "end" && computeReplacedSel(this, changes, collapse);
  10525. for (var i$1 = changes.length - 1; i$1 >= 0; i$1--)
  10526. { makeChange(this, changes[i$1]); }
  10527. if (newSel) { setSelectionReplaceHistory(this, newSel); }
  10528. else if (this.cm) { ensureCursorVisible(this.cm); }
  10529. }),
  10530. undo: docMethodOp(function() {makeChangeFromHistory(this, "undo");}),
  10531. redo: docMethodOp(function() {makeChangeFromHistory(this, "redo");}),
  10532. undoSelection: docMethodOp(function() {makeChangeFromHistory(this, "undo", true);}),
  10533. redoSelection: docMethodOp(function() {makeChangeFromHistory(this, "redo", true);}),
  10534. setExtending: function(val) {this.extend = val;},
  10535. getExtending: function() {return this.extend},
  10536. historySize: function() {
  10537. var hist = this.history, done = 0, undone = 0;
  10538. for (var i = 0; i < hist.done.length; i++) { if (!hist.done[i].ranges) { ++done; } }
  10539. for (var i$1 = 0; i$1 < hist.undone.length; i$1++) { if (!hist.undone[i$1].ranges) { ++undone; } }
  10540. return {undo: done, redo: undone}
  10541. },
  10542. clearHistory: function() {
  10543. var this$1 = this;
  10544. this.history = new History(this.history);
  10545. linkedDocs(this, function (doc) { return doc.history = this$1.history; }, true);
  10546. },
  10547. markClean: function() {
  10548. this.cleanGeneration = this.changeGeneration(true);
  10549. },
  10550. changeGeneration: function(forceSplit) {
  10551. if (forceSplit)
  10552. { this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null; }
  10553. return this.history.generation
  10554. },
  10555. isClean: function (gen) {
  10556. return this.history.generation == (gen || this.cleanGeneration)
  10557. },
  10558. getHistory: function() {
  10559. return {done: copyHistoryArray(this.history.done),
  10560. undone: copyHistoryArray(this.history.undone)}
  10561. },
  10562. setHistory: function(histData) {
  10563. var hist = this.history = new History(this.history);
  10564. hist.done = copyHistoryArray(histData.done.slice(0), null, true);
  10565. hist.undone = copyHistoryArray(histData.undone.slice(0), null, true);
  10566. },
  10567. setGutterMarker: docMethodOp(function(line, gutterID, value) {
  10568. return changeLine(this, line, "gutter", function (line) {
  10569. var markers = line.gutterMarkers || (line.gutterMarkers = {});
  10570. markers[gutterID] = value;
  10571. if (!value && isEmpty(markers)) { line.gutterMarkers = null; }
  10572. return true
  10573. })
  10574. }),
  10575. clearGutter: docMethodOp(function(gutterID) {
  10576. var this$1 = this;
  10577. this.iter(function (line) {
  10578. if (line.gutterMarkers && line.gutterMarkers[gutterID]) {
  10579. changeLine(this$1, line, "gutter", function () {
  10580. line.gutterMarkers[gutterID] = null;
  10581. if (isEmpty(line.gutterMarkers)) { line.gutterMarkers = null; }
  10582. return true
  10583. });
  10584. }
  10585. });
  10586. }),
  10587. lineInfo: function(line) {
  10588. var n;
  10589. if (typeof line == "number") {
  10590. if (!isLine(this, line)) { return null }
  10591. n = line;
  10592. line = getLine(this, line);
  10593. if (!line) { return null }
  10594. } else {
  10595. n = lineNo(line);
  10596. if (n == null) { return null }
  10597. }
  10598. return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers,
  10599. textClass: line.textClass, bgClass: line.bgClass, wrapClass: line.wrapClass,
  10600. widgets: line.widgets}
  10601. },
  10602. addLineClass: docMethodOp(function(handle, where, cls) {
  10603. return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function (line) {
  10604. var prop = where == "text" ? "textClass"
  10605. : where == "background" ? "bgClass"
  10606. : where == "gutter" ? "gutterClass" : "wrapClass";
  10607. if (!line[prop]) { line[prop] = cls; }
  10608. else if (classTest(cls).test(line[prop])) { return false }
  10609. else { line[prop] += " " + cls; }
  10610. return true
  10611. })
  10612. }),
  10613. removeLineClass: docMethodOp(function(handle, where, cls) {
  10614. return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function (line) {
  10615. var prop = where == "text" ? "textClass"
  10616. : where == "background" ? "bgClass"
  10617. : where == "gutter" ? "gutterClass" : "wrapClass";
  10618. var cur = line[prop];
  10619. if (!cur) { return false }
  10620. else if (cls == null) { line[prop] = null; }
  10621. else {
  10622. var found = cur.match(classTest(cls));
  10623. if (!found) { return false }
  10624. var end = found.index + found[0].length;
  10625. line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? "" : " ") + cur.slice(end) || null;
  10626. }
  10627. return true
  10628. })
  10629. }),
  10630. addLineWidget: docMethodOp(function(handle, node, options) {
  10631. return addLineWidget(this, handle, node, options)
  10632. }),
  10633. removeLineWidget: function(widget) { widget.clear(); },
  10634. markText: function(from, to, options) {
  10635. return markText(this, clipPos(this, from), clipPos(this, to), options, options && options.type || "range")
  10636. },
  10637. setBookmark: function(pos, options) {
  10638. var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options),
  10639. insertLeft: options && options.insertLeft,
  10640. clearWhenEmpty: false, shared: options && options.shared,
  10641. handleMouseEvents: options && options.handleMouseEvents};
  10642. pos = clipPos(this, pos);
  10643. return markText(this, pos, pos, realOpts, "bookmark")
  10644. },
  10645. findMarksAt: function(pos) {
  10646. pos = clipPos(this, pos);
  10647. var markers = [], spans = getLine(this, pos.line).markedSpans;
  10648. if (spans) { for (var i = 0; i < spans.length; ++i) {
  10649. var span = spans[i];
  10650. if ((span.from == null || span.from <= pos.ch) &&
  10651. (span.to == null || span.to >= pos.ch))
  10652. { markers.push(span.marker.parent || span.marker); }
  10653. } }
  10654. return markers
  10655. },
  10656. findMarks: function(from, to, filter) {
  10657. from = clipPos(this, from); to = clipPos(this, to);
  10658. var found = [], lineNo = from.line;
  10659. this.iter(from.line, to.line + 1, function (line) {
  10660. var spans = line.markedSpans;
  10661. if (spans) { for (var i = 0; i < spans.length; i++) {
  10662. var span = spans[i];
  10663. if (!(span.to != null && lineNo == from.line && from.ch >= span.to ||
  10664. span.from == null && lineNo != from.line ||
  10665. span.from != null && lineNo == to.line && span.from >= to.ch) &&
  10666. (!filter || filter(span.marker)))
  10667. { found.push(span.marker.parent || span.marker); }
  10668. } }
  10669. ++lineNo;
  10670. });
  10671. return found
  10672. },
  10673. getAllMarks: function() {
  10674. var markers = [];
  10675. this.iter(function (line) {
  10676. var sps = line.markedSpans;
  10677. if (sps) { for (var i = 0; i < sps.length; ++i)
  10678. { if (sps[i].from != null) { markers.push(sps[i].marker); } } }
  10679. });
  10680. return markers
  10681. },
  10682. posFromIndex: function(off) {
  10683. var ch, lineNo = this.first, sepSize = this.lineSeparator().length;
  10684. this.iter(function (line) {
  10685. var sz = line.text.length + sepSize;
  10686. if (sz > off) { ch = off; return true }
  10687. off -= sz;
  10688. ++lineNo;
  10689. });
  10690. return clipPos(this, Pos(lineNo, ch))
  10691. },
  10692. indexFromPos: function (coords) {
  10693. coords = clipPos(this, coords);
  10694. var index = coords.ch;
  10695. if (coords.line < this.first || coords.ch < 0) { return 0 }
  10696. var sepSize = this.lineSeparator().length;
  10697. this.iter(this.first, coords.line, function (line) { // iter aborts when callback returns a truthy value
  10698. index += line.text.length + sepSize;
  10699. });
  10700. return index
  10701. },
  10702. copy: function(copyHistory) {
  10703. var doc = new Doc(getLines(this, this.first, this.first + this.size),
  10704. this.modeOption, this.first, this.lineSep, this.direction);
  10705. doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft;
  10706. doc.sel = this.sel;
  10707. doc.extend = false;
  10708. if (copyHistory) {
  10709. doc.history.undoDepth = this.history.undoDepth;
  10710. doc.setHistory(this.getHistory());
  10711. }
  10712. return doc
  10713. },
  10714. linkedDoc: function(options) {
  10715. if (!options) { options = {}; }
  10716. var from = this.first, to = this.first + this.size;
  10717. if (options.from != null && options.from > from) { from = options.from; }
  10718. if (options.to != null && options.to < to) { to = options.to; }
  10719. var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from, this.lineSep, this.direction);
  10720. if (options.sharedHist) { copy.history = this.history
  10721. ; }(this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist});
  10722. copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}];
  10723. copySharedMarkers(copy, findSharedMarkers(this));
  10724. return copy
  10725. },
  10726. unlinkDoc: function(other) {
  10727. if (other instanceof CodeMirror) { other = other.doc; }
  10728. if (this.linked) { for (var i = 0; i < this.linked.length; ++i) {
  10729. var link = this.linked[i];
  10730. if (link.doc != other) { continue }
  10731. this.linked.splice(i, 1);
  10732. other.unlinkDoc(this);
  10733. detachSharedMarkers(findSharedMarkers(this));
  10734. break
  10735. } }
  10736. // If the histories were shared, split them again
  10737. if (other.history == this.history) {
  10738. var splitIds = [other.id];
  10739. linkedDocs(other, function (doc) { return splitIds.push(doc.id); }, true);
  10740. other.history = new History(null);
  10741. other.history.done = copyHistoryArray(this.history.done, splitIds);
  10742. other.history.undone = copyHistoryArray(this.history.undone, splitIds);
  10743. }
  10744. },
  10745. iterLinkedDocs: function(f) {linkedDocs(this, f);},
  10746. getMode: function() {return this.mode},
  10747. getEditor: function() {return this.cm},
  10748. splitLines: function(str) {
  10749. if (this.lineSep) { return str.split(this.lineSep) }
  10750. return splitLinesAuto(str)
  10751. },
  10752. lineSeparator: function() { return this.lineSep || "\n" },
  10753. setDirection: docMethodOp(function (dir) {
  10754. if (dir != "rtl") { dir = "ltr"; }
  10755. if (dir == this.direction) { return }
  10756. this.direction = dir;
  10757. this.iter(function (line) { return line.order = null; });
  10758. if (this.cm) { directionChanged(this.cm); }
  10759. })
  10760. });
  10761. // Public alias.
  10762. Doc.prototype.eachLine = Doc.prototype.iter;
  10763. // Kludge to work around strange IE behavior where it'll sometimes
  10764. // re-fire a series of drag-related events right after the drop (#1551)
  10765. var lastDrop = 0;
  10766. function onDrop(e) {
  10767. var cm = this;
  10768. clearDragCursor(cm);
  10769. if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e))
  10770. { return }
  10771. e_preventDefault(e);
  10772. if (ie) { lastDrop = +new Date; }
  10773. var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files;
  10774. if (!pos || cm.isReadOnly()) { return }
  10775. // Might be a file drop, in which case we simply extract the text
  10776. // and insert it.
  10777. if (files && files.length && window.FileReader && window.File) {
  10778. var n = files.length, text = Array(n), read = 0;
  10779. var markAsReadAndPasteIfAllFilesAreRead = function () {
  10780. if (++read == n) {
  10781. operation(cm, function () {
  10782. pos = clipPos(cm.doc, pos);
  10783. var change = {from: pos, to: pos,
  10784. text: cm.doc.splitLines(
  10785. text.filter(function (t) { return t != null; }).join(cm.doc.lineSeparator())),
  10786. origin: "paste"};
  10787. makeChange(cm.doc, change);
  10788. setSelectionReplaceHistory(cm.doc, simpleSelection(clipPos(cm.doc, pos), clipPos(cm.doc, changeEnd(change))));
  10789. })();
  10790. }
  10791. };
  10792. var readTextFromFile = function (file, i) {
  10793. if (cm.options.allowDropFileTypes &&
  10794. indexOf(cm.options.allowDropFileTypes, file.type) == -1) {
  10795. markAsReadAndPasteIfAllFilesAreRead();
  10796. return
  10797. }
  10798. var reader = new FileReader;
  10799. reader.onerror = function () { return markAsReadAndPasteIfAllFilesAreRead(); };
  10800. reader.onload = function () {
  10801. var content = reader.result;
  10802. if (/[\x00-\x08\x0e-\x1f]{2}/.test(content)) {
  10803. markAsReadAndPasteIfAllFilesAreRead();
  10804. return
  10805. }
  10806. text[i] = content;
  10807. markAsReadAndPasteIfAllFilesAreRead();
  10808. };
  10809. reader.readAsText(file);
  10810. };
  10811. for (var i = 0; i < files.length; i++) { readTextFromFile(files[i], i); }
  10812. } else { // Normal drop
  10813. // Don't do a replace if the drop happened inside of the selected text.
  10814. if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) {
  10815. cm.state.draggingText(e);
  10816. // Ensure the editor is re-focused
  10817. setTimeout(function () { return cm.display.input.focus(); }, 20);
  10818. return
  10819. }
  10820. try {
  10821. var text$1 = e.dataTransfer.getData("Text");
  10822. if (text$1) {
  10823. var selected;
  10824. if (cm.state.draggingText && !cm.state.draggingText.copy)
  10825. { selected = cm.listSelections(); }
  10826. setSelectionNoUndo(cm.doc, simpleSelection(pos, pos));
  10827. if (selected) { for (var i$1 = 0; i$1 < selected.length; ++i$1)
  10828. { replaceRange(cm.doc, "", selected[i$1].anchor, selected[i$1].head, "drag"); } }
  10829. cm.replaceSelection(text$1, "around", "paste");
  10830. cm.display.input.focus();
  10831. }
  10832. }
  10833. catch(e$1){}
  10834. }
  10835. }
  10836. function onDragStart(cm, e) {
  10837. if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return }
  10838. if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) { return }
  10839. e.dataTransfer.setData("Text", cm.getSelection());
  10840. e.dataTransfer.effectAllowed = "copyMove";
  10841. // Use dummy image instead of default browsers image.
  10842. // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there.
  10843. if (e.dataTransfer.setDragImage && !safari) {
  10844. var img = elt("img", null, null, "position: fixed; left: 0; top: 0;");
  10845. img.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";
  10846. if (presto) {
  10847. img.width = img.height = 1;
  10848. cm.display.wrapper.appendChild(img);
  10849. // Force a relayout, or Opera won't use our image for some obscure reason
  10850. img._top = img.offsetTop;
  10851. }
  10852. e.dataTransfer.setDragImage(img, 0, 0);
  10853. if (presto) { img.parentNode.removeChild(img); }
  10854. }
  10855. }
  10856. function onDragOver(cm, e) {
  10857. var pos = posFromMouse(cm, e);
  10858. if (!pos) { return }
  10859. var frag = document.createDocumentFragment();
  10860. drawSelectionCursor(cm, pos, frag);
  10861. if (!cm.display.dragCursor) {
  10862. cm.display.dragCursor = elt("div", null, "CodeMirror-cursors CodeMirror-dragcursors");
  10863. cm.display.lineSpace.insertBefore(cm.display.dragCursor, cm.display.cursorDiv);
  10864. }
  10865. removeChildrenAndAdd(cm.display.dragCursor, frag);
  10866. }
  10867. function clearDragCursor(cm) {
  10868. if (cm.display.dragCursor) {
  10869. cm.display.lineSpace.removeChild(cm.display.dragCursor);
  10870. cm.display.dragCursor = null;
  10871. }
  10872. }
  10873. // These must be handled carefully, because naively registering a
  10874. // handler for each editor will cause the editors to never be
  10875. // garbage collected.
  10876. function forEachCodeMirror(f) {
  10877. if (!document.getElementsByClassName) { return }
  10878. var byClass = document.getElementsByClassName("CodeMirror"), editors = [];
  10879. for (var i = 0; i < byClass.length; i++) {
  10880. var cm = byClass[i].CodeMirror;
  10881. if (cm) { editors.push(cm); }
  10882. }
  10883. if (editors.length) { editors[0].operation(function () {
  10884. for (var i = 0; i < editors.length; i++) { f(editors[i]); }
  10885. }); }
  10886. }
  10887. var globalsRegistered = false;
  10888. function ensureGlobalHandlers() {
  10889. if (globalsRegistered) { return }
  10890. registerGlobalHandlers();
  10891. globalsRegistered = true;
  10892. }
  10893. function registerGlobalHandlers() {
  10894. // When the window resizes, we need to refresh active editors.
  10895. var resizeTimer;
  10896. on(window, "resize", function () {
  10897. if (resizeTimer == null) { resizeTimer = setTimeout(function () {
  10898. resizeTimer = null;
  10899. forEachCodeMirror(onResize);
  10900. }, 100); }
  10901. });
  10902. // When the window loses focus, we want to show the editor as blurred
  10903. on(window, "blur", function () { return forEachCodeMirror(onBlur); });
  10904. }
  10905. // Called when the window resizes
  10906. function onResize(cm) {
  10907. var d = cm.display;
  10908. // Might be a text scaling operation, clear size caches.
  10909. d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;
  10910. d.scrollbarsClipped = false;
  10911. cm.setSize();
  10912. }
  10913. var keyNames = {
  10914. 3: "Pause", 8: "Backspace", 9: "Tab", 13: "Enter", 16: "Shift", 17: "Ctrl", 18: "Alt",
  10915. 19: "Pause", 20: "CapsLock", 27: "Esc", 32: "Space", 33: "PageUp", 34: "PageDown", 35: "End",
  10916. 36: "Home", 37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "PrintScrn", 45: "Insert",
  10917. 46: "Delete", 59: ";", 61: "=", 91: "Mod", 92: "Mod", 93: "Mod",
  10918. 106: "*", 107: "=", 109: "-", 110: ".", 111: "/", 145: "ScrollLock",
  10919. 173: "-", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\",
  10920. 221: "]", 222: "'", 224: "Mod", 63232: "Up", 63233: "Down", 63234: "Left", 63235: "Right", 63272: "Delete",
  10921. 63273: "Home", 63275: "End", 63276: "PageUp", 63277: "PageDown", 63302: "Insert"
  10922. };
  10923. // Number keys
  10924. for (var i = 0; i < 10; i++) { keyNames[i + 48] = keyNames[i + 96] = String(i); }
  10925. // Alphabetic keys
  10926. for (var i$1 = 65; i$1 <= 90; i$1++) { keyNames[i$1] = String.fromCharCode(i$1); }
  10927. // Function keys
  10928. for (var i$2 = 1; i$2 <= 12; i$2++) { keyNames[i$2 + 111] = keyNames[i$2 + 63235] = "F" + i$2; }
  10929. var keyMap = {};
  10930. keyMap.basic = {
  10931. "Left": "goCharLeft", "Right": "goCharRight", "Up": "goLineUp", "Down": "goLineDown",
  10932. "End": "goLineEnd", "Home": "goLineStartSmart", "PageUp": "goPageUp", "PageDown": "goPageDown",
  10933. "Delete": "delCharAfter", "Backspace": "delCharBefore", "Shift-Backspace": "delCharBefore",
  10934. "Tab": "defaultTab", "Shift-Tab": "indentAuto",
  10935. "Enter": "newlineAndIndent", "Insert": "toggleOverwrite",
  10936. "Esc": "singleSelection"
  10937. };
  10938. // Note that the save and find-related commands aren't defined by
  10939. // default. User code or addons can define them. Unknown commands
  10940. // are simply ignored.
  10941. keyMap.pcDefault = {
  10942. "Ctrl-A": "selectAll", "Ctrl-D": "deleteLine", "Ctrl-Z": "undo", "Shift-Ctrl-Z": "redo", "Ctrl-Y": "redo",
  10943. "Ctrl-Home": "goDocStart", "Ctrl-End": "goDocEnd", "Ctrl-Up": "goLineUp", "Ctrl-Down": "goLineDown",
  10944. "Ctrl-Left": "goGroupLeft", "Ctrl-Right": "goGroupRight", "Alt-Left": "goLineStart", "Alt-Right": "goLineEnd",
  10945. "Ctrl-Backspace": "delGroupBefore", "Ctrl-Delete": "delGroupAfter", "Ctrl-S": "save", "Ctrl-F": "find",
  10946. "Ctrl-G": "findNext", "Shift-Ctrl-G": "findPrev", "Shift-Ctrl-F": "replace", "Shift-Ctrl-R": "replaceAll",
  10947. "Ctrl-[": "indentLess", "Ctrl-]": "indentMore",
  10948. "Ctrl-U": "undoSelection", "Shift-Ctrl-U": "redoSelection", "Alt-U": "redoSelection",
  10949. "fallthrough": "basic"
  10950. };
  10951. // Very basic readline/emacs-style bindings, which are standard on Mac.
  10952. keyMap.emacsy = {
  10953. "Ctrl-F": "goCharRight", "Ctrl-B": "goCharLeft", "Ctrl-P": "goLineUp", "Ctrl-N": "goLineDown",
  10954. "Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd", "Ctrl-V": "goPageDown", "Shift-Ctrl-V": "goPageUp",
  10955. "Ctrl-D": "delCharAfter", "Ctrl-H": "delCharBefore", "Alt-Backspace": "delWordBefore", "Ctrl-K": "killLine",
  10956. "Ctrl-T": "transposeChars", "Ctrl-O": "openLine"
  10957. };
  10958. keyMap.macDefault = {
  10959. "Cmd-A": "selectAll", "Cmd-D": "deleteLine", "Cmd-Z": "undo", "Shift-Cmd-Z": "redo", "Cmd-Y": "redo",
  10960. "Cmd-Home": "goDocStart", "Cmd-Up": "goDocStart", "Cmd-End": "goDocEnd", "Cmd-Down": "goDocEnd", "Alt-Left": "goGroupLeft",
  10961. "Alt-Right": "goGroupRight", "Cmd-Left": "goLineLeft", "Cmd-Right": "goLineRight", "Alt-Backspace": "delGroupBefore",
  10962. "Ctrl-Alt-Backspace": "delGroupAfter", "Alt-Delete": "delGroupAfter", "Cmd-S": "save", "Cmd-F": "find",
  10963. "Cmd-G": "findNext", "Shift-Cmd-G": "findPrev", "Cmd-Alt-F": "replace", "Shift-Cmd-Alt-F": "replaceAll",
  10964. "Cmd-[": "indentLess", "Cmd-]": "indentMore", "Cmd-Backspace": "delWrappedLineLeft", "Cmd-Delete": "delWrappedLineRight",
  10965. "Cmd-U": "undoSelection", "Shift-Cmd-U": "redoSelection", "Ctrl-Up": "goDocStart", "Ctrl-Down": "goDocEnd",
  10966. "fallthrough": ["basic", "emacsy"]
  10967. };
  10968. keyMap["default"] = mac ? keyMap.macDefault : keyMap.pcDefault;
  10969. // KEYMAP DISPATCH
  10970. function normalizeKeyName(name) {
  10971. var parts = name.split(/-(?!$)/);
  10972. name = parts[parts.length - 1];
  10973. var alt, ctrl, shift, cmd;
  10974. for (var i = 0; i < parts.length - 1; i++) {
  10975. var mod = parts[i];
  10976. if (/^(cmd|meta|m)$/i.test(mod)) { cmd = true; }
  10977. else if (/^a(lt)?$/i.test(mod)) { alt = true; }
  10978. else if (/^(c|ctrl|control)$/i.test(mod)) { ctrl = true; }
  10979. else if (/^s(hift)?$/i.test(mod)) { shift = true; }
  10980. else { throw new Error("Unrecognized modifier name: " + mod) }
  10981. }
  10982. if (alt) { name = "Alt-" + name; }
  10983. if (ctrl) { name = "Ctrl-" + name; }
  10984. if (cmd) { name = "Cmd-" + name; }
  10985. if (shift) { name = "Shift-" + name; }
  10986. return name
  10987. }
  10988. // This is a kludge to keep keymaps mostly working as raw objects
  10989. // (backwards compatibility) while at the same time support features
  10990. // like normalization and multi-stroke key bindings. It compiles a
  10991. // new normalized keymap, and then updates the old object to reflect
  10992. // this.
  10993. function normalizeKeyMap(keymap) {
  10994. var copy = {};
  10995. for (var keyname in keymap) { if (keymap.hasOwnProperty(keyname)) {
  10996. var value = keymap[keyname];
  10997. if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) { continue }
  10998. if (value == "...") { delete keymap[keyname]; continue }
  10999. var keys = map(keyname.split(" "), normalizeKeyName);
  11000. for (var i = 0; i < keys.length; i++) {
  11001. var val = (void 0), name = (void 0);
  11002. if (i == keys.length - 1) {
  11003. name = keys.join(" ");
  11004. val = value;
  11005. } else {
  11006. name = keys.slice(0, i + 1).join(" ");
  11007. val = "...";
  11008. }
  11009. var prev = copy[name];
  11010. if (!prev) { copy[name] = val; }
  11011. else if (prev != val) { throw new Error("Inconsistent bindings for " + name) }
  11012. }
  11013. delete keymap[keyname];
  11014. } }
  11015. for (var prop in copy) { keymap[prop] = copy[prop]; }
  11016. return keymap
  11017. }
  11018. function lookupKey(key, map, handle, context) {
  11019. map = getKeyMap(map);
  11020. var found = map.call ? map.call(key, context) : map[key];
  11021. if (found === false) { return "nothing" }
  11022. if (found === "...") { return "multi" }
  11023. if (found != null && handle(found)) { return "handled" }
  11024. if (map.fallthrough) {
  11025. if (Object.prototype.toString.call(map.fallthrough) != "[object Array]")
  11026. { return lookupKey(key, map.fallthrough, handle, context) }
  11027. for (var i = 0; i < map.fallthrough.length; i++) {
  11028. var result = lookupKey(key, map.fallthrough[i], handle, context);
  11029. if (result) { return result }
  11030. }
  11031. }
  11032. }
  11033. // Modifier key presses don't count as 'real' key presses for the
  11034. // purpose of keymap fallthrough.
  11035. function isModifierKey(value) {
  11036. var name = typeof value == "string" ? value : keyNames[value.keyCode];
  11037. return name == "Ctrl" || name == "Alt" || name == "Shift" || name == "Mod"
  11038. }
  11039. function addModifierNames(name, event, noShift) {
  11040. var base = name;
  11041. if (event.altKey && base != "Alt") { name = "Alt-" + name; }
  11042. if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != "Ctrl") { name = "Ctrl-" + name; }
  11043. if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != "Mod") { name = "Cmd-" + name; }
  11044. if (!noShift && event.shiftKey && base != "Shift") { name = "Shift-" + name; }
  11045. return name
  11046. }
  11047. // Look up the name of a key as indicated by an event object.
  11048. function keyName(event, noShift) {
  11049. if (presto && event.keyCode == 34 && event["char"]) { return false }
  11050. var name = keyNames[event.keyCode];
  11051. if (name == null || event.altGraphKey) { return false }
  11052. // Ctrl-ScrollLock has keyCode 3, same as Ctrl-Pause,
  11053. // so we'll use event.code when available (Chrome 48+, FF 38+, Safari 10.1+)
  11054. if (event.keyCode == 3 && event.code) { name = event.code; }
  11055. return addModifierNames(name, event, noShift)
  11056. }
  11057. function getKeyMap(val) {
  11058. return typeof val == "string" ? keyMap[val] : val
  11059. }
  11060. // Helper for deleting text near the selection(s), used to implement
  11061. // backspace, delete, and similar functionality.
  11062. function deleteNearSelection(cm, compute) {
  11063. var ranges = cm.doc.sel.ranges, kill = [];
  11064. // Build up a set of ranges to kill first, merging overlapping
  11065. // ranges.
  11066. for (var i = 0; i < ranges.length; i++) {
  11067. var toKill = compute(ranges[i]);
  11068. while (kill.length && cmp(toKill.from, lst(kill).to) <= 0) {
  11069. var replaced = kill.pop();
  11070. if (cmp(replaced.from, toKill.from) < 0) {
  11071. toKill.from = replaced.from;
  11072. break
  11073. }
  11074. }
  11075. kill.push(toKill);
  11076. }
  11077. // Next, remove those actual ranges.
  11078. runInOp(cm, function () {
  11079. for (var i = kill.length - 1; i >= 0; i--)
  11080. { replaceRange(cm.doc, "", kill[i].from, kill[i].to, "+delete"); }
  11081. ensureCursorVisible(cm);
  11082. });
  11083. }
  11084. function moveCharLogically(line, ch, dir) {
  11085. var target = skipExtendingChars(line.text, ch + dir, dir);
  11086. return target < 0 || target > line.text.length ? null : target
  11087. }
  11088. function moveLogically(line, start, dir) {
  11089. var ch = moveCharLogically(line, start.ch, dir);
  11090. return ch == null ? null : new Pos(start.line, ch, dir < 0 ? "after" : "before")
  11091. }
  11092. function endOfLine(visually, cm, lineObj, lineNo, dir) {
  11093. if (visually) {
  11094. if (cm.doc.direction == "rtl") { dir = -dir; }
  11095. var order = getOrder(lineObj, cm.doc.direction);
  11096. if (order) {
  11097. var part = dir < 0 ? lst(order) : order[0];
  11098. var moveInStorageOrder = (dir < 0) == (part.level == 1);
  11099. var sticky = moveInStorageOrder ? "after" : "before";
  11100. var ch;
  11101. // With a wrapped rtl chunk (possibly spanning multiple bidi parts),
  11102. // it could be that the last bidi part is not on the last visual line,
  11103. // since visual lines contain content order-consecutive chunks.
  11104. // Thus, in rtl, we are looking for the first (content-order) character
  11105. // in the rtl chunk that is on the last line (that is, the same line
  11106. // as the last (content-order) character).
  11107. if (part.level > 0 || cm.doc.direction == "rtl") {
  11108. var prep = prepareMeasureForLine(cm, lineObj);
  11109. ch = dir < 0 ? lineObj.text.length - 1 : 0;
  11110. var targetTop = measureCharPrepared(cm, prep, ch).top;
  11111. ch = findFirst(function (ch) { return measureCharPrepared(cm, prep, ch).top == targetTop; }, (dir < 0) == (part.level == 1) ? part.from : part.to - 1, ch);
  11112. if (sticky == "before") { ch = moveCharLogically(lineObj, ch, 1); }
  11113. } else { ch = dir < 0 ? part.to : part.from; }
  11114. return new Pos(lineNo, ch, sticky)
  11115. }
  11116. }
  11117. return new Pos(lineNo, dir < 0 ? lineObj.text.length : 0, dir < 0 ? "before" : "after")
  11118. }
  11119. function moveVisually(cm, line, start, dir) {
  11120. var bidi = getOrder(line, cm.doc.direction);
  11121. if (!bidi) { return moveLogically(line, start, dir) }
  11122. if (start.ch >= line.text.length) {
  11123. start.ch = line.text.length;
  11124. start.sticky = "before";
  11125. } else if (start.ch <= 0) {
  11126. start.ch = 0;
  11127. start.sticky = "after";
  11128. }
  11129. var partPos = getBidiPartAt(bidi, start.ch, start.sticky), part = bidi[partPos];
  11130. if (cm.doc.direction == "ltr" && part.level % 2 == 0 && (dir > 0 ? part.to > start.ch : part.from < start.ch)) {
  11131. // Case 1: We move within an ltr part in an ltr editor. Even with wrapped lines,
  11132. // nothing interesting happens.
  11133. return moveLogically(line, start, dir)
  11134. }
  11135. var mv = function (pos, dir) { return moveCharLogically(line, pos instanceof Pos ? pos.ch : pos, dir); };
  11136. var prep;
  11137. var getWrappedLineExtent = function (ch) {
  11138. if (!cm.options.lineWrapping) { return {begin: 0, end: line.text.length} }
  11139. prep = prep || prepareMeasureForLine(cm, line);
  11140. return wrappedLineExtentChar(cm, line, prep, ch)
  11141. };
  11142. var wrappedLineExtent = getWrappedLineExtent(start.sticky == "before" ? mv(start, -1) : start.ch);
  11143. if (cm.doc.direction == "rtl" || part.level == 1) {
  11144. var moveInStorageOrder = (part.level == 1) == (dir < 0);
  11145. var ch = mv(start, moveInStorageOrder ? 1 : -1);
  11146. if (ch != null && (!moveInStorageOrder ? ch >= part.from && ch >= wrappedLineExtent.begin : ch <= part.to && ch <= wrappedLineExtent.end)) {
  11147. // Case 2: We move within an rtl part or in an rtl editor on the same visual line
  11148. var sticky = moveInStorageOrder ? "before" : "after";
  11149. return new Pos(start.line, ch, sticky)
  11150. }
  11151. }
  11152. // Case 3: Could not move within this bidi part in this visual line, so leave
  11153. // the current bidi part
  11154. var searchInVisualLine = function (partPos, dir, wrappedLineExtent) {
  11155. var getRes = function (ch, moveInStorageOrder) { return moveInStorageOrder
  11156. ? new Pos(start.line, mv(ch, 1), "before")
  11157. : new Pos(start.line, ch, "after"); };
  11158. for (; partPos >= 0 && partPos < bidi.length; partPos += dir) {
  11159. var part = bidi[partPos];
  11160. var moveInStorageOrder = (dir > 0) == (part.level != 1);
  11161. var ch = moveInStorageOrder ? wrappedLineExtent.begin : mv(wrappedLineExtent.end, -1);
  11162. if (part.from <= ch && ch < part.to) { return getRes(ch, moveInStorageOrder) }
  11163. ch = moveInStorageOrder ? part.from : mv(part.to, -1);
  11164. if (wrappedLineExtent.begin <= ch && ch < wrappedLineExtent.end) { return getRes(ch, moveInStorageOrder) }
  11165. }
  11166. };
  11167. // Case 3a: Look for other bidi parts on the same visual line
  11168. var res = searchInVisualLine(partPos + dir, dir, wrappedLineExtent);
  11169. if (res) { return res }
  11170. // Case 3b: Look for other bidi parts on the next visual line
  11171. var nextCh = dir > 0 ? wrappedLineExtent.end : mv(wrappedLineExtent.begin, -1);
  11172. if (nextCh != null && !(dir > 0 && nextCh == line.text.length)) {
  11173. res = searchInVisualLine(dir > 0 ? 0 : bidi.length - 1, dir, getWrappedLineExtent(nextCh));
  11174. if (res) { return res }
  11175. }
  11176. // Case 4: Nowhere to move
  11177. return null
  11178. }
  11179. // Commands are parameter-less actions that can be performed on an
  11180. // editor, mostly used for keybindings.
  11181. var commands = {
  11182. selectAll: selectAll,
  11183. singleSelection: function (cm) { return cm.setSelection(cm.getCursor("anchor"), cm.getCursor("head"), sel_dontScroll); },
  11184. killLine: function (cm) { return deleteNearSelection(cm, function (range) {
  11185. if (range.empty()) {
  11186. var len = getLine(cm.doc, range.head.line).text.length;
  11187. if (range.head.ch == len && range.head.line < cm.lastLine())
  11188. { return {from: range.head, to: Pos(range.head.line + 1, 0)} }
  11189. else
  11190. { return {from: range.head, to: Pos(range.head.line, len)} }
  11191. } else {
  11192. return {from: range.from(), to: range.to()}
  11193. }
  11194. }); },
  11195. deleteLine: function (cm) { return deleteNearSelection(cm, function (range) { return ({
  11196. from: Pos(range.from().line, 0),
  11197. to: clipPos(cm.doc, Pos(range.to().line + 1, 0))
  11198. }); }); },
  11199. delLineLeft: function (cm) { return deleteNearSelection(cm, function (range) { return ({
  11200. from: Pos(range.from().line, 0), to: range.from()
  11201. }); }); },
  11202. delWrappedLineLeft: function (cm) { return deleteNearSelection(cm, function (range) {
  11203. var top = cm.charCoords(range.head, "div").top + 5;
  11204. var leftPos = cm.coordsChar({left: 0, top: top}, "div");
  11205. return {from: leftPos, to: range.from()}
  11206. }); },
  11207. delWrappedLineRight: function (cm) { return deleteNearSelection(cm, function (range) {
  11208. var top = cm.charCoords(range.head, "div").top + 5;
  11209. var rightPos = cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div");
  11210. return {from: range.from(), to: rightPos }
  11211. }); },
  11212. undo: function (cm) { return cm.undo(); },
  11213. redo: function (cm) { return cm.redo(); },
  11214. undoSelection: function (cm) { return cm.undoSelection(); },
  11215. redoSelection: function (cm) { return cm.redoSelection(); },
  11216. goDocStart: function (cm) { return cm.extendSelection(Pos(cm.firstLine(), 0)); },
  11217. goDocEnd: function (cm) { return cm.extendSelection(Pos(cm.lastLine())); },
  11218. goLineStart: function (cm) { return cm.extendSelectionsBy(function (range) { return lineStart(cm, range.head.line); },
  11219. {origin: "+move", bias: 1}
  11220. ); },
  11221. goLineStartSmart: function (cm) { return cm.extendSelectionsBy(function (range) { return lineStartSmart(cm, range.head); },
  11222. {origin: "+move", bias: 1}
  11223. ); },
  11224. goLineEnd: function (cm) { return cm.extendSelectionsBy(function (range) { return lineEnd(cm, range.head.line); },
  11225. {origin: "+move", bias: -1}
  11226. ); },
  11227. goLineRight: function (cm) { return cm.extendSelectionsBy(function (range) {
  11228. var top = cm.cursorCoords(range.head, "div").top + 5;
  11229. return cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div")
  11230. }, sel_move); },
  11231. goLineLeft: function (cm) { return cm.extendSelectionsBy(function (range) {
  11232. var top = cm.cursorCoords(range.head, "div").top + 5;
  11233. return cm.coordsChar({left: 0, top: top}, "div")
  11234. }, sel_move); },
  11235. goLineLeftSmart: function (cm) { return cm.extendSelectionsBy(function (range) {
  11236. var top = cm.cursorCoords(range.head, "div").top + 5;
  11237. var pos = cm.coordsChar({left: 0, top: top}, "div");
  11238. if (pos.ch < cm.getLine(pos.line).search(/\S/)) { return lineStartSmart(cm, range.head) }
  11239. return pos
  11240. }, sel_move); },
  11241. goLineUp: function (cm) { return cm.moveV(-1, "line"); },
  11242. goLineDown: function (cm) { return cm.moveV(1, "line"); },
  11243. goPageUp: function (cm) { return cm.moveV(-1, "page"); },
  11244. goPageDown: function (cm) { return cm.moveV(1, "page"); },
  11245. goCharLeft: function (cm) { return cm.moveH(-1, "char"); },
  11246. goCharRight: function (cm) { return cm.moveH(1, "char"); },
  11247. goColumnLeft: function (cm) { return cm.moveH(-1, "column"); },
  11248. goColumnRight: function (cm) { return cm.moveH(1, "column"); },
  11249. goWordLeft: function (cm) { return cm.moveH(-1, "word"); },
  11250. goGroupRight: function (cm) { return cm.moveH(1, "group"); },
  11251. goGroupLeft: function (cm) { return cm.moveH(-1, "group"); },
  11252. goWordRight: function (cm) { return cm.moveH(1, "word"); },
  11253. delCharBefore: function (cm) { return cm.deleteH(-1, "codepoint"); },
  11254. delCharAfter: function (cm) { return cm.deleteH(1, "char"); },
  11255. delWordBefore: function (cm) { return cm.deleteH(-1, "word"); },
  11256. delWordAfter: function (cm) { return cm.deleteH(1, "word"); },
  11257. delGroupBefore: function (cm) { return cm.deleteH(-1, "group"); },
  11258. delGroupAfter: function (cm) { return cm.deleteH(1, "group"); },
  11259. indentAuto: function (cm) { return cm.indentSelection("smart"); },
  11260. indentMore: function (cm) { return cm.indentSelection("add"); },
  11261. indentLess: function (cm) { return cm.indentSelection("subtract"); },
  11262. insertTab: function (cm) { return cm.replaceSelection("\t"); },
  11263. insertSoftTab: function (cm) {
  11264. var spaces = [], ranges = cm.listSelections(), tabSize = cm.options.tabSize;
  11265. for (var i = 0; i < ranges.length; i++) {
  11266. var pos = ranges[i].from();
  11267. var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize);
  11268. spaces.push(spaceStr(tabSize - col % tabSize));
  11269. }
  11270. cm.replaceSelections(spaces);
  11271. },
  11272. defaultTab: function (cm) {
  11273. if (cm.somethingSelected()) { cm.indentSelection("add"); }
  11274. else { cm.execCommand("insertTab"); }
  11275. },
  11276. // Swap the two chars left and right of each selection's head.
  11277. // Move cursor behind the two swapped characters afterwards.
  11278. //
  11279. // Doesn't consider line feeds a character.
  11280. // Doesn't scan more than one line above to find a character.
  11281. // Doesn't do anything on an empty line.
  11282. // Doesn't do anything with non-empty selections.
  11283. transposeChars: function (cm) { return runInOp(cm, function () {
  11284. var ranges = cm.listSelections(), newSel = [];
  11285. for (var i = 0; i < ranges.length; i++) {
  11286. if (!ranges[i].empty()) { continue }
  11287. var cur = ranges[i].head, line = getLine(cm.doc, cur.line).text;
  11288. if (line) {
  11289. if (cur.ch == line.length) { cur = new Pos(cur.line, cur.ch - 1); }
  11290. if (cur.ch > 0) {
  11291. cur = new Pos(cur.line, cur.ch + 1);
  11292. cm.replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2),
  11293. Pos(cur.line, cur.ch - 2), cur, "+transpose");
  11294. } else if (cur.line > cm.doc.first) {
  11295. var prev = getLine(cm.doc, cur.line - 1).text;
  11296. if (prev) {
  11297. cur = new Pos(cur.line, 1);
  11298. cm.replaceRange(line.charAt(0) + cm.doc.lineSeparator() +
  11299. prev.charAt(prev.length - 1),
  11300. Pos(cur.line - 1, prev.length - 1), cur, "+transpose");
  11301. }
  11302. }
  11303. }
  11304. newSel.push(new Range(cur, cur));
  11305. }
  11306. cm.setSelections(newSel);
  11307. }); },
  11308. newlineAndIndent: function (cm) { return runInOp(cm, function () {
  11309. var sels = cm.listSelections();
  11310. for (var i = sels.length - 1; i >= 0; i--)
  11311. { cm.replaceRange(cm.doc.lineSeparator(), sels[i].anchor, sels[i].head, "+input"); }
  11312. sels = cm.listSelections();
  11313. for (var i$1 = 0; i$1 < sels.length; i$1++)
  11314. { cm.indentLine(sels[i$1].from().line, null, true); }
  11315. ensureCursorVisible(cm);
  11316. }); },
  11317. openLine: function (cm) { return cm.replaceSelection("\n", "start"); },
  11318. toggleOverwrite: function (cm) { return cm.toggleOverwrite(); }
  11319. };
  11320. function lineStart(cm, lineN) {
  11321. var line = getLine(cm.doc, lineN);
  11322. var visual = visualLine(line);
  11323. if (visual != line) { lineN = lineNo(visual); }
  11324. return endOfLine(true, cm, visual, lineN, 1)
  11325. }
  11326. function lineEnd(cm, lineN) {
  11327. var line = getLine(cm.doc, lineN);
  11328. var visual = visualLineEnd(line);
  11329. if (visual != line) { lineN = lineNo(visual); }
  11330. return endOfLine(true, cm, line, lineN, -1)
  11331. }
  11332. function lineStartSmart(cm, pos) {
  11333. var start = lineStart(cm, pos.line);
  11334. var line = getLine(cm.doc, start.line);
  11335. var order = getOrder(line, cm.doc.direction);
  11336. if (!order || order[0].level == 0) {
  11337. var firstNonWS = Math.max(start.ch, line.text.search(/\S/));
  11338. var inWS = pos.line == start.line && pos.ch <= firstNonWS && pos.ch;
  11339. return Pos(start.line, inWS ? 0 : firstNonWS, start.sticky)
  11340. }
  11341. return start
  11342. }
  11343. // Run a handler that was bound to a key.
  11344. function doHandleBinding(cm, bound, dropShift) {
  11345. if (typeof bound == "string") {
  11346. bound = commands[bound];
  11347. if (!bound) { return false }
  11348. }
  11349. // Ensure previous input has been read, so that the handler sees a
  11350. // consistent view of the document
  11351. cm.display.input.ensurePolled();
  11352. var prevShift = cm.display.shift, done = false;
  11353. try {
  11354. if (cm.isReadOnly()) { cm.state.suppressEdits = true; }
  11355. if (dropShift) { cm.display.shift = false; }
  11356. done = bound(cm) != Pass;
  11357. } finally {
  11358. cm.display.shift = prevShift;
  11359. cm.state.suppressEdits = false;
  11360. }
  11361. return done
  11362. }
  11363. function lookupKeyForEditor(cm, name, handle) {
  11364. for (var i = 0; i < cm.state.keyMaps.length; i++) {
  11365. var result = lookupKey(name, cm.state.keyMaps[i], handle, cm);
  11366. if (result) { return result }
  11367. }
  11368. return (cm.options.extraKeys && lookupKey(name, cm.options.extraKeys, handle, cm))
  11369. || lookupKey(name, cm.options.keyMap, handle, cm)
  11370. }
  11371. // Note that, despite the name, this function is also used to check
  11372. // for bound mouse clicks.
  11373. var stopSeq = new Delayed;
  11374. function dispatchKey(cm, name, e, handle) {
  11375. var seq = cm.state.keySeq;
  11376. if (seq) {
  11377. if (isModifierKey(name)) { return "handled" }
  11378. if (/\'$/.test(name))
  11379. { cm.state.keySeq = null; }
  11380. else
  11381. { stopSeq.set(50, function () {
  11382. if (cm.state.keySeq == seq) {
  11383. cm.state.keySeq = null;
  11384. cm.display.input.reset();
  11385. }
  11386. }); }
  11387. if (dispatchKeyInner(cm, seq + " " + name, e, handle)) { return true }
  11388. }
  11389. return dispatchKeyInner(cm, name, e, handle)
  11390. }
  11391. function dispatchKeyInner(cm, name, e, handle) {
  11392. var result = lookupKeyForEditor(cm, name, handle);
  11393. if (result == "multi")
  11394. { cm.state.keySeq = name; }
  11395. if (result == "handled")
  11396. { signalLater(cm, "keyHandled", cm, name, e); }
  11397. if (result == "handled" || result == "multi") {
  11398. e_preventDefault(e);
  11399. restartBlink(cm);
  11400. }
  11401. return !!result
  11402. }
  11403. // Handle a key from the keydown event.
  11404. function handleKeyBinding(cm, e) {
  11405. var name = keyName(e, true);
  11406. if (!name) { return false }
  11407. if (e.shiftKey && !cm.state.keySeq) {
  11408. // First try to resolve full name (including 'Shift-'). Failing
  11409. // that, see if there is a cursor-motion command (starting with
  11410. // 'go') bound to the keyname without 'Shift-'.
  11411. return dispatchKey(cm, "Shift-" + name, e, function (b) { return doHandleBinding(cm, b, true); })
  11412. || dispatchKey(cm, name, e, function (b) {
  11413. if (typeof b == "string" ? /^go[A-Z]/.test(b) : b.motion)
  11414. { return doHandleBinding(cm, b) }
  11415. })
  11416. } else {
  11417. return dispatchKey(cm, name, e, function (b) { return doHandleBinding(cm, b); })
  11418. }
  11419. }
  11420. // Handle a key from the keypress event
  11421. function handleCharBinding(cm, e, ch) {
  11422. return dispatchKey(cm, "'" + ch + "'", e, function (b) { return doHandleBinding(cm, b, true); })
  11423. }
  11424. var lastStoppedKey = null;
  11425. function onKeyDown(e) {
  11426. var cm = this;
  11427. if (e.target && e.target != cm.display.input.getField()) { return }
  11428. cm.curOp.focus = activeElt();
  11429. if (signalDOMEvent(cm, e)) { return }
  11430. // IE does strange things with escape.
  11431. if (ie && ie_version < 11 && e.keyCode == 27) { e.returnValue = false; }
  11432. var code = e.keyCode;
  11433. cm.display.shift = code == 16 || e.shiftKey;
  11434. var handled = handleKeyBinding(cm, e);
  11435. if (presto) {
  11436. lastStoppedKey = handled ? code : null;
  11437. // Opera has no cut event... we try to at least catch the key combo
  11438. if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey))
  11439. { cm.replaceSelection("", null, "cut"); }
  11440. }
  11441. if (gecko && !mac && !handled && code == 46 && e.shiftKey && !e.ctrlKey && document.execCommand)
  11442. { document.execCommand("cut"); }
  11443. // Turn mouse into crosshair when Alt is held on Mac.
  11444. if (code == 18 && !/\bCodeMirror-crosshair\b/.test(cm.display.lineDiv.className))
  11445. { showCrossHair(cm); }
  11446. }
  11447. function showCrossHair(cm) {
  11448. var lineDiv = cm.display.lineDiv;
  11449. addClass(lineDiv, "CodeMirror-crosshair");
  11450. function up(e) {
  11451. if (e.keyCode == 18 || !e.altKey) {
  11452. rmClass(lineDiv, "CodeMirror-crosshair");
  11453. off(document, "keyup", up);
  11454. off(document, "mouseover", up);
  11455. }
  11456. }
  11457. on(document, "keyup", up);
  11458. on(document, "mouseover", up);
  11459. }
  11460. function onKeyUp(e) {
  11461. if (e.keyCode == 16) { this.doc.sel.shift = false; }
  11462. signalDOMEvent(this, e);
  11463. }
  11464. function onKeyPress(e) {
  11465. var cm = this;
  11466. if (e.target && e.target != cm.display.input.getField()) { return }
  11467. if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) { return }
  11468. var keyCode = e.keyCode, charCode = e.charCode;
  11469. if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return}
  11470. if ((presto && (!e.which || e.which < 10)) && handleKeyBinding(cm, e)) { return }
  11471. var ch = String.fromCharCode(charCode == null ? keyCode : charCode);
  11472. // Some browsers fire keypress events for backspace
  11473. if (ch == "\x08") { return }
  11474. if (handleCharBinding(cm, e, ch)) { return }
  11475. cm.display.input.onKeyPress(e);
  11476. }
  11477. var DOUBLECLICK_DELAY = 400;
  11478. var PastClick = function(time, pos, button) {
  11479. this.time = time;
  11480. this.pos = pos;
  11481. this.button = button;
  11482. };
  11483. PastClick.prototype.compare = function (time, pos, button) {
  11484. return this.time + DOUBLECLICK_DELAY > time &&
  11485. cmp(pos, this.pos) == 0 && button == this.button
  11486. };
  11487. var lastClick, lastDoubleClick;
  11488. function clickRepeat(pos, button) {
  11489. var now = +new Date;
  11490. if (lastDoubleClick && lastDoubleClick.compare(now, pos, button)) {
  11491. lastClick = lastDoubleClick = null;
  11492. return "triple"
  11493. } else if (lastClick && lastClick.compare(now, pos, button)) {
  11494. lastDoubleClick = new PastClick(now, pos, button);
  11495. lastClick = null;
  11496. return "double"
  11497. } else {
  11498. lastClick = new PastClick(now, pos, button);
  11499. lastDoubleClick = null;
  11500. return "single"
  11501. }
  11502. }
  11503. // A mouse down can be a single click, double click, triple click,
  11504. // start of selection drag, start of text drag, new cursor
  11505. // (ctrl-click), rectangle drag (alt-drag), or xwin
  11506. // middle-click-paste. Or it might be a click on something we should
  11507. // not interfere with, such as a scrollbar or widget.
  11508. function onMouseDown(e) {
  11509. var cm = this, display = cm.display;
  11510. if (signalDOMEvent(cm, e) || display.activeTouch && display.input.supportsTouch()) { return }
  11511. display.input.ensurePolled();
  11512. display.shift = e.shiftKey;
  11513. if (eventInWidget(display, e)) {
  11514. if (!webkit) {
  11515. // Briefly turn off draggability, to allow widgets to do
  11516. // normal dragging things.
  11517. display.scroller.draggable = false;
  11518. setTimeout(function () { return display.scroller.draggable = true; }, 100);
  11519. }
  11520. return
  11521. }
  11522. if (clickInGutter(cm, e)) { return }
  11523. var pos = posFromMouse(cm, e), button = e_button(e), repeat = pos ? clickRepeat(pos, button) : "single";
  11524. window.focus();
  11525. // #3261: make sure, that we're not starting a second selection
  11526. if (button == 1 && cm.state.selectingText)
  11527. { cm.state.selectingText(e); }
  11528. if (pos && handleMappedButton(cm, button, pos, repeat, e)) { return }
  11529. if (button == 1) {
  11530. if (pos) { leftButtonDown(cm, pos, repeat, e); }
  11531. else if (e_target(e) == display.scroller) { e_preventDefault(e); }
  11532. } else if (button == 2) {
  11533. if (pos) { extendSelection(cm.doc, pos); }
  11534. setTimeout(function () { return display.input.focus(); }, 20);
  11535. } else if (button == 3) {
  11536. if (captureRightClick) { cm.display.input.onContextMenu(e); }
  11537. else { delayBlurEvent(cm); }
  11538. }
  11539. }
  11540. function handleMappedButton(cm, button, pos, repeat, event) {
  11541. var name = "Click";
  11542. if (repeat == "double") { name = "Double" + name; }
  11543. else if (repeat == "triple") { name = "Triple" + name; }
  11544. name = (button == 1 ? "Left" : button == 2 ? "Middle" : "Right") + name;
  11545. return dispatchKey(cm, addModifierNames(name, event), event, function (bound) {
  11546. if (typeof bound == "string") { bound = commands[bound]; }
  11547. if (!bound) { return false }
  11548. var done = false;
  11549. try {
  11550. if (cm.isReadOnly()) { cm.state.suppressEdits = true; }
  11551. done = bound(cm, pos) != Pass;
  11552. } finally {
  11553. cm.state.suppressEdits = false;
  11554. }
  11555. return done
  11556. })
  11557. }
  11558. function configureMouse(cm, repeat, event) {
  11559. var option = cm.getOption("configureMouse");
  11560. var value = option ? option(cm, repeat, event) : {};
  11561. if (value.unit == null) {
  11562. var rect = chromeOS ? event.shiftKey && event.metaKey : event.altKey;
  11563. value.unit = rect ? "rectangle" : repeat == "single" ? "char" : repeat == "double" ? "word" : "line";
  11564. }
  11565. if (value.extend == null || cm.doc.extend) { value.extend = cm.doc.extend || event.shiftKey; }
  11566. if (value.addNew == null) { value.addNew = mac ? event.metaKey : event.ctrlKey; }
  11567. if (value.moveOnDrag == null) { value.moveOnDrag = !(mac ? event.altKey : event.ctrlKey); }
  11568. return value
  11569. }
  11570. function leftButtonDown(cm, pos, repeat, event) {
  11571. if (ie) { setTimeout(bind(ensureFocus, cm), 0); }
  11572. else { cm.curOp.focus = activeElt(); }
  11573. var behavior = configureMouse(cm, repeat, event);
  11574. var sel = cm.doc.sel, contained;
  11575. if (cm.options.dragDrop && dragAndDrop && !cm.isReadOnly() &&
  11576. repeat == "single" && (contained = sel.contains(pos)) > -1 &&
  11577. (cmp((contained = sel.ranges[contained]).from(), pos) < 0 || pos.xRel > 0) &&
  11578. (cmp(contained.to(), pos) > 0 || pos.xRel < 0))
  11579. { leftButtonStartDrag(cm, event, pos, behavior); }
  11580. else
  11581. { leftButtonSelect(cm, event, pos, behavior); }
  11582. }
  11583. // Start a text drag. When it ends, see if any dragging actually
  11584. // happen, and treat as a click if it didn't.
  11585. function leftButtonStartDrag(cm, event, pos, behavior) {
  11586. var display = cm.display, moved = false;
  11587. var dragEnd = operation(cm, function (e) {
  11588. if (webkit) { display.scroller.draggable = false; }
  11589. cm.state.draggingText = false;
  11590. if (cm.state.delayingBlurEvent) {
  11591. if (cm.hasFocus()) { cm.state.delayingBlurEvent = false; }
  11592. else { delayBlurEvent(cm); }
  11593. }
  11594. off(display.wrapper.ownerDocument, "mouseup", dragEnd);
  11595. off(display.wrapper.ownerDocument, "mousemove", mouseMove);
  11596. off(display.scroller, "dragstart", dragStart);
  11597. off(display.scroller, "drop", dragEnd);
  11598. if (!moved) {
  11599. e_preventDefault(e);
  11600. if (!behavior.addNew)
  11601. { extendSelection(cm.doc, pos, null, null, behavior.extend); }
  11602. // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081)
  11603. if ((webkit && !safari) || ie && ie_version == 9)
  11604. { setTimeout(function () {display.wrapper.ownerDocument.body.focus({preventScroll: true}); display.input.focus();}, 20); }
  11605. else
  11606. { display.input.focus(); }
  11607. }
  11608. });
  11609. var mouseMove = function(e2) {
  11610. moved = moved || Math.abs(event.clientX - e2.clientX) + Math.abs(event.clientY - e2.clientY) >= 10;
  11611. };
  11612. var dragStart = function () { return moved = true; };
  11613. // Let the drag handler handle this.
  11614. if (webkit) { display.scroller.draggable = true; }
  11615. cm.state.draggingText = dragEnd;
  11616. dragEnd.copy = !behavior.moveOnDrag;
  11617. on(display.wrapper.ownerDocument, "mouseup", dragEnd);
  11618. on(display.wrapper.ownerDocument, "mousemove", mouseMove);
  11619. on(display.scroller, "dragstart", dragStart);
  11620. on(display.scroller, "drop", dragEnd);
  11621. cm.state.delayingBlurEvent = true;
  11622. setTimeout(function () { return display.input.focus(); }, 20);
  11623. // IE's approach to draggable
  11624. if (display.scroller.dragDrop) { display.scroller.dragDrop(); }
  11625. }
  11626. function rangeForUnit(cm, pos, unit) {
  11627. if (unit == "char") { return new Range(pos, pos) }
  11628. if (unit == "word") { return cm.findWordAt(pos) }
  11629. if (unit == "line") { return new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))) }
  11630. var result = unit(cm, pos);
  11631. return new Range(result.from, result.to)
  11632. }
  11633. // Normal selection, as opposed to text dragging.
  11634. function leftButtonSelect(cm, event, start, behavior) {
  11635. if (ie) { delayBlurEvent(cm); }
  11636. var display = cm.display, doc = cm.doc;
  11637. e_preventDefault(event);
  11638. var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges;
  11639. if (behavior.addNew && !behavior.extend) {
  11640. ourIndex = doc.sel.contains(start);
  11641. if (ourIndex > -1)
  11642. { ourRange = ranges[ourIndex]; }
  11643. else
  11644. { ourRange = new Range(start, start); }
  11645. } else {
  11646. ourRange = doc.sel.primary();
  11647. ourIndex = doc.sel.primIndex;
  11648. }
  11649. if (behavior.unit == "rectangle") {
  11650. if (!behavior.addNew) { ourRange = new Range(start, start); }
  11651. start = posFromMouse(cm, event, true, true);
  11652. ourIndex = -1;
  11653. } else {
  11654. var range = rangeForUnit(cm, start, behavior.unit);
  11655. if (behavior.extend)
  11656. { ourRange = extendRange(ourRange, range.anchor, range.head, behavior.extend); }
  11657. else
  11658. { ourRange = range; }
  11659. }
  11660. if (!behavior.addNew) {
  11661. ourIndex = 0;
  11662. setSelection(doc, new Selection([ourRange], 0), sel_mouse);
  11663. startSel = doc.sel;
  11664. } else if (ourIndex == -1) {
  11665. ourIndex = ranges.length;
  11666. setSelection(doc, normalizeSelection(cm, ranges.concat([ourRange]), ourIndex),
  11667. {scroll: false, origin: "*mouse"});
  11668. } else if (ranges.length > 1 && ranges[ourIndex].empty() && behavior.unit == "char" && !behavior.extend) {
  11669. setSelection(doc, normalizeSelection(cm, ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0),
  11670. {scroll: false, origin: "*mouse"});
  11671. startSel = doc.sel;
  11672. } else {
  11673. replaceOneSelection(doc, ourIndex, ourRange, sel_mouse);
  11674. }
  11675. var lastPos = start;
  11676. function extendTo(pos) {
  11677. if (cmp(lastPos, pos) == 0) { return }
  11678. lastPos = pos;
  11679. if (behavior.unit == "rectangle") {
  11680. var ranges = [], tabSize = cm.options.tabSize;
  11681. var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize);
  11682. var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize);
  11683. var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol);
  11684. for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line));
  11685. line <= end; line++) {
  11686. var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize);
  11687. if (left == right)
  11688. { ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))); }
  11689. else if (text.length > leftPos)
  11690. { ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))); }
  11691. }
  11692. if (!ranges.length) { ranges.push(new Range(start, start)); }
  11693. setSelection(doc, normalizeSelection(cm, startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),
  11694. {origin: "*mouse", scroll: false});
  11695. cm.scrollIntoView(pos);
  11696. } else {
  11697. var oldRange = ourRange;
  11698. var range = rangeForUnit(cm, pos, behavior.unit);
  11699. var anchor = oldRange.anchor, head;
  11700. if (cmp(range.anchor, anchor) > 0) {
  11701. head = range.head;
  11702. anchor = minPos(oldRange.from(), range.anchor);
  11703. } else {
  11704. head = range.anchor;
  11705. anchor = maxPos(oldRange.to(), range.head);
  11706. }
  11707. var ranges$1 = startSel.ranges.slice(0);
  11708. ranges$1[ourIndex] = bidiSimplify(cm, new Range(clipPos(doc, anchor), head));
  11709. setSelection(doc, normalizeSelection(cm, ranges$1, ourIndex), sel_mouse);
  11710. }
  11711. }
  11712. var editorSize = display.wrapper.getBoundingClientRect();
  11713. // Used to ensure timeout re-tries don't fire when another extend
  11714. // happened in the meantime (clearTimeout isn't reliable -- at
  11715. // least on Chrome, the timeouts still happen even when cleared,
  11716. // if the clear happens after their scheduled firing time).
  11717. var counter = 0;
  11718. function extend(e) {
  11719. var curCount = ++counter;
  11720. var cur = posFromMouse(cm, e, true, behavior.unit == "rectangle");
  11721. if (!cur) { return }
  11722. if (cmp(cur, lastPos) != 0) {
  11723. cm.curOp.focus = activeElt();
  11724. extendTo(cur);
  11725. var visible = visibleLines(display, doc);
  11726. if (cur.line >= visible.to || cur.line < visible.from)
  11727. { setTimeout(operation(cm, function () {if (counter == curCount) { extend(e); }}), 150); }
  11728. } else {
  11729. var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0;
  11730. if (outside) { setTimeout(operation(cm, function () {
  11731. if (counter != curCount) { return }
  11732. display.scroller.scrollTop += outside;
  11733. extend(e);
  11734. }), 50); }
  11735. }
  11736. }
  11737. function done(e) {
  11738. cm.state.selectingText = false;
  11739. counter = Infinity;
  11740. // If e is null or undefined we interpret this as someone trying
  11741. // to explicitly cancel the selection rather than the user
  11742. // letting go of the mouse button.
  11743. if (e) {
  11744. e_preventDefault(e);
  11745. display.input.focus();
  11746. }
  11747. off(display.wrapper.ownerDocument, "mousemove", move);
  11748. off(display.wrapper.ownerDocument, "mouseup", up);
  11749. doc.history.lastSelOrigin = null;
  11750. }
  11751. var move = operation(cm, function (e) {
  11752. if (e.buttons === 0 || !e_button(e)) { done(e); }
  11753. else { extend(e); }
  11754. });
  11755. var up = operation(cm, done);
  11756. cm.state.selectingText = up;
  11757. on(display.wrapper.ownerDocument, "mousemove", move);
  11758. on(display.wrapper.ownerDocument, "mouseup", up);
  11759. }
  11760. // Used when mouse-selecting to adjust the anchor to the proper side
  11761. // of a bidi jump depending on the visual position of the head.
  11762. function bidiSimplify(cm, range) {
  11763. var anchor = range.anchor;
  11764. var head = range.head;
  11765. var anchorLine = getLine(cm.doc, anchor.line);
  11766. if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range }
  11767. var order = getOrder(anchorLine);
  11768. if (!order) { return range }
  11769. var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];
  11770. if (part.from != anchor.ch && part.to != anchor.ch) { return range }
  11771. var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);
  11772. if (boundary == 0 || boundary == order.length) { return range }
  11773. // Compute the relative visual position of the head compared to the
  11774. // anchor (<0 is to the left, >0 to the right)
  11775. var leftSide;
  11776. if (head.line != anchor.line) {
  11777. leftSide = (head.line - anchor.line) * (cm.doc.direction == "ltr" ? 1 : -1) > 0;
  11778. } else {
  11779. var headIndex = getBidiPartAt(order, head.ch, head.sticky);
  11780. var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);
  11781. if (headIndex == boundary - 1 || headIndex == boundary)
  11782. { leftSide = dir < 0; }
  11783. else
  11784. { leftSide = dir > 0; }
  11785. }
  11786. var usePart = order[boundary + (leftSide ? -1 : 0)];
  11787. var from = leftSide == (usePart.level == 1);
  11788. var ch = from ? usePart.from : usePart.to, sticky = from ? "after" : "before";
  11789. return anchor.ch == ch && anchor.sticky == sticky ? range : new Range(new Pos(anchor.line, ch, sticky), head)
  11790. }
  11791. // Determines whether an event happened in the gutter, and fires the
  11792. // handlers for the corresponding event.
  11793. function gutterEvent(cm, e, type, prevent) {
  11794. var mX, mY;
  11795. if (e.touches) {
  11796. mX = e.touches[0].clientX;
  11797. mY = e.touches[0].clientY;
  11798. } else {
  11799. try { mX = e.clientX; mY = e.clientY; }
  11800. catch(e$1) { return false }
  11801. }
  11802. if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) { return false }
  11803. if (prevent) { e_preventDefault(e); }
  11804. var display = cm.display;
  11805. var lineBox = display.lineDiv.getBoundingClientRect();
  11806. if (mY > lineBox.bottom || !hasHandler(cm, type)) { return e_defaultPrevented(e) }
  11807. mY -= lineBox.top - display.viewOffset;
  11808. for (var i = 0; i < cm.display.gutterSpecs.length; ++i) {
  11809. var g = display.gutters.childNodes[i];
  11810. if (g && g.getBoundingClientRect().right >= mX) {
  11811. var line = lineAtHeight(cm.doc, mY);
  11812. var gutter = cm.display.gutterSpecs[i];
  11813. signal(cm, type, cm, line, gutter.className, e);
  11814. return e_defaultPrevented(e)
  11815. }
  11816. }
  11817. }
  11818. function clickInGutter(cm, e) {
  11819. return gutterEvent(cm, e, "gutterClick", true)
  11820. }
  11821. // CONTEXT MENU HANDLING
  11822. // To make the context menu work, we need to briefly unhide the
  11823. // textarea (making it as unobtrusive as possible) to let the
  11824. // right-click take effect on it.
  11825. function onContextMenu(cm, e) {
  11826. if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return }
  11827. if (signalDOMEvent(cm, e, "contextmenu")) { return }
  11828. if (!captureRightClick) { cm.display.input.onContextMenu(e); }
  11829. }
  11830. function contextMenuInGutter(cm, e) {
  11831. if (!hasHandler(cm, "gutterContextMenu")) { return false }
  11832. return gutterEvent(cm, e, "gutterContextMenu", false)
  11833. }
  11834. function themeChanged(cm) {
  11835. cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") +
  11836. cm.options.theme.replace(/(^|\s)\s*/g, " cm-s-");
  11837. clearCaches(cm);
  11838. }
  11839. var Init = {toString: function(){return "CodeMirror.Init"}};
  11840. var defaults = {};
  11841. var optionHandlers = {};
  11842. function defineOptions(CodeMirror) {
  11843. var optionHandlers = CodeMirror.optionHandlers;
  11844. function option(name, deflt, handle, notOnInit) {
  11845. CodeMirror.defaults[name] = deflt;
  11846. if (handle) { optionHandlers[name] =
  11847. notOnInit ? function (cm, val, old) {if (old != Init) { handle(cm, val, old); }} : handle; }
  11848. }
  11849. CodeMirror.defineOption = option;
  11850. // Passed to option handlers when there is no old value.
  11851. CodeMirror.Init = Init;
  11852. // These two are, on init, called from the constructor because they
  11853. // have to be initialized before the editor can start at all.
  11854. option("value", "", function (cm, val) { return cm.setValue(val); }, true);
  11855. option("mode", null, function (cm, val) {
  11856. cm.doc.modeOption = val;
  11857. loadMode(cm);
  11858. }, true);
  11859. option("indentUnit", 2, loadMode, true);
  11860. option("indentWithTabs", false);
  11861. option("smartIndent", true);
  11862. option("tabSize", 4, function (cm) {
  11863. resetModeState(cm);
  11864. clearCaches(cm);
  11865. regChange(cm);
  11866. }, true);
  11867. option("lineSeparator", null, function (cm, val) {
  11868. cm.doc.lineSep = val;
  11869. if (!val) { return }
  11870. var newBreaks = [], lineNo = cm.doc.first;
  11871. cm.doc.iter(function (line) {
  11872. for (var pos = 0;;) {
  11873. var found = line.text.indexOf(val, pos);
  11874. if (found == -1) { break }
  11875. pos = found + val.length;
  11876. newBreaks.push(Pos(lineNo, found));
  11877. }
  11878. lineNo++;
  11879. });
  11880. for (var i = newBreaks.length - 1; i >= 0; i--)
  11881. { replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length)); }
  11882. });
  11883. option("specialChars", /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g, function (cm, val, old) {
  11884. cm.state.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g");
  11885. if (old != Init) { cm.refresh(); }
  11886. });
  11887. option("specialCharPlaceholder", defaultSpecialCharPlaceholder, function (cm) { return cm.refresh(); }, true);
  11888. option("electricChars", true);
  11889. option("inputStyle", mobile ? "contenteditable" : "textarea", function () {
  11890. throw new Error("inputStyle can not (yet) be changed in a running editor") // FIXME
  11891. }, true);
  11892. option("spellcheck", false, function (cm, val) { return cm.getInputField().spellcheck = val; }, true);
  11893. option("autocorrect", false, function (cm, val) { return cm.getInputField().autocorrect = val; }, true);
  11894. option("autocapitalize", false, function (cm, val) { return cm.getInputField().autocapitalize = val; }, true);
  11895. option("rtlMoveVisually", !windows);
  11896. option("wholeLineUpdateBefore", true);
  11897. option("theme", "default", function (cm) {
  11898. themeChanged(cm);
  11899. updateGutters(cm);
  11900. }, true);
  11901. option("keyMap", "default", function (cm, val, old) {
  11902. var next = getKeyMap(val);
  11903. var prev = old != Init && getKeyMap(old);
  11904. if (prev && prev.detach) { prev.detach(cm, next); }
  11905. if (next.attach) { next.attach(cm, prev || null); }
  11906. });
  11907. option("extraKeys", null);
  11908. option("configureMouse", null);
  11909. option("lineWrapping", false, wrappingChanged, true);
  11910. option("gutters", [], function (cm, val) {
  11911. cm.display.gutterSpecs = getGutters(val, cm.options.lineNumbers);
  11912. updateGutters(cm);
  11913. }, true);
  11914. option("fixedGutter", true, function (cm, val) {
  11915. cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + "px" : "0";
  11916. cm.refresh();
  11917. }, true);
  11918. option("coverGutterNextToScrollbar", false, function (cm) { return updateScrollbars(cm); }, true);
  11919. option("scrollbarStyle", "native", function (cm) {
  11920. initScrollbars(cm);
  11921. updateScrollbars(cm);
  11922. cm.display.scrollbars.setScrollTop(cm.doc.scrollTop);
  11923. cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft);
  11924. }, true);
  11925. option("lineNumbers", false, function (cm, val) {
  11926. cm.display.gutterSpecs = getGutters(cm.options.gutters, val);
  11927. updateGutters(cm);
  11928. }, true);
  11929. option("firstLineNumber", 1, updateGutters, true);
  11930. option("lineNumberFormatter", function (integer) { return integer; }, updateGutters, true);
  11931. option("showCursorWhenSelecting", false, updateSelection, true);
  11932. option("resetSelectionOnContextMenu", true);
  11933. option("lineWiseCopyCut", true);
  11934. option("pasteLinesPerSelection", true);
  11935. option("selectionsMayTouch", false);
  11936. option("readOnly", false, function (cm, val) {
  11937. if (val == "nocursor") {
  11938. onBlur(cm);
  11939. cm.display.input.blur();
  11940. }
  11941. cm.display.input.readOnlyChanged(val);
  11942. });
  11943. option("screenReaderLabel", null, function (cm, val) {
  11944. val = (val === '') ? null : val;
  11945. cm.display.input.screenReaderLabelChanged(val);
  11946. });
  11947. option("disableInput", false, function (cm, val) {if (!val) { cm.display.input.reset(); }}, true);
  11948. option("dragDrop", true, dragDropChanged);
  11949. option("allowDropFileTypes", null);
  11950. option("cursorBlinkRate", 530);
  11951. option("cursorScrollMargin", 0);
  11952. option("cursorHeight", 1, updateSelection, true);
  11953. option("singleCursorHeightPerLine", true, updateSelection, true);
  11954. option("workTime", 100);
  11955. option("workDelay", 100);
  11956. option("flattenSpans", true, resetModeState, true);
  11957. option("addModeClass", false, resetModeState, true);
  11958. option("pollInterval", 100);
  11959. option("undoDepth", 200, function (cm, val) { return cm.doc.history.undoDepth = val; });
  11960. option("historyEventDelay", 1250);
  11961. option("viewportMargin", 10, function (cm) { return cm.refresh(); }, true);
  11962. option("maxHighlightLength", 10000, resetModeState, true);
  11963. option("moveInputWithCursor", true, function (cm, val) {
  11964. if (!val) { cm.display.input.resetPosition(); }
  11965. });
  11966. option("tabindex", null, function (cm, val) { return cm.display.input.getField().tabIndex = val || ""; });
  11967. option("autofocus", null);
  11968. option("direction", "ltr", function (cm, val) { return cm.doc.setDirection(val); }, true);
  11969. option("phrases", null);
  11970. }
  11971. function dragDropChanged(cm, value, old) {
  11972. var wasOn = old && old != Init;
  11973. if (!value != !wasOn) {
  11974. var funcs = cm.display.dragFunctions;
  11975. var toggle = value ? on : off;
  11976. toggle(cm.display.scroller, "dragstart", funcs.start);
  11977. toggle(cm.display.scroller, "dragenter", funcs.enter);
  11978. toggle(cm.display.scroller, "dragover", funcs.over);
  11979. toggle(cm.display.scroller, "dragleave", funcs.leave);
  11980. toggle(cm.display.scroller, "drop", funcs.drop);
  11981. }
  11982. }
  11983. function wrappingChanged(cm) {
  11984. if (cm.options.lineWrapping) {
  11985. addClass(cm.display.wrapper, "CodeMirror-wrap");
  11986. cm.display.sizer.style.minWidth = "";
  11987. cm.display.sizerWidth = null;
  11988. } else {
  11989. rmClass(cm.display.wrapper, "CodeMirror-wrap");
  11990. findMaxLine(cm);
  11991. }
  11992. estimateLineHeights(cm);
  11993. regChange(cm);
  11994. clearCaches(cm);
  11995. setTimeout(function () { return updateScrollbars(cm); }, 100);
  11996. }
  11997. // A CodeMirror instance represents an editor. This is the object
  11998. // that user code is usually dealing with.
  11999. function CodeMirror(place, options) {
  12000. var this$1 = this;
  12001. if (!(this instanceof CodeMirror)) { return new CodeMirror(place, options) }
  12002. this.options = options = options ? copyObj(options) : {};
  12003. // Determine effective options based on given values and defaults.
  12004. copyObj(defaults, options, false);
  12005. var doc = options.value;
  12006. if (typeof doc == "string") { doc = new Doc(doc, options.mode, null, options.lineSeparator, options.direction); }
  12007. else if (options.mode) { doc.modeOption = options.mode; }
  12008. this.doc = doc;
  12009. var input = new CodeMirror.inputStyles[options.inputStyle](this);
  12010. var display = this.display = new Display(place, doc, input, options);
  12011. display.wrapper.CodeMirror = this;
  12012. themeChanged(this);
  12013. if (options.lineWrapping)
  12014. { this.display.wrapper.className += " CodeMirror-wrap"; }
  12015. initScrollbars(this);
  12016. this.state = {
  12017. keyMaps: [], // stores maps added by addKeyMap
  12018. overlays: [], // highlighting overlays, as added by addOverlay
  12019. modeGen: 0, // bumped when mode/overlay changes, used to invalidate highlighting info
  12020. overwrite: false,
  12021. delayingBlurEvent: false,
  12022. focused: false,
  12023. suppressEdits: false, // used to disable editing during key handlers when in readOnly mode
  12024. pasteIncoming: -1, cutIncoming: -1, // help recognize paste/cut edits in input.poll
  12025. selectingText: false,
  12026. draggingText: false,
  12027. highlight: new Delayed(), // stores highlight worker timeout
  12028. keySeq: null, // Unfinished key sequence
  12029. specialChars: null
  12030. };
  12031. if (options.autofocus && !mobile) { display.input.focus(); }
  12032. // Override magic textarea content restore that IE sometimes does
  12033. // on our hidden textarea on reload
  12034. if (ie && ie_version < 11) { setTimeout(function () { return this$1.display.input.reset(true); }, 20); }
  12035. registerEventHandlers(this);
  12036. ensureGlobalHandlers();
  12037. startOperation(this);
  12038. this.curOp.forceUpdate = true;
  12039. attachDoc(this, doc);
  12040. if ((options.autofocus && !mobile) || this.hasFocus())
  12041. { setTimeout(function () {
  12042. if (this$1.hasFocus() && !this$1.state.focused) { onFocus(this$1); }
  12043. }, 20); }
  12044. else
  12045. { onBlur(this); }
  12046. for (var opt in optionHandlers) { if (optionHandlers.hasOwnProperty(opt))
  12047. { optionHandlers[opt](this, options[opt], Init); } }
  12048. maybeUpdateLineNumberWidth(this);
  12049. if (options.finishInit) { options.finishInit(this); }
  12050. for (var i = 0; i < initHooks.length; ++i) { initHooks[i](this); }
  12051. endOperation(this);
  12052. // Suppress optimizelegibility in Webkit, since it breaks text
  12053. // measuring on line wrapping boundaries.
  12054. if (webkit && options.lineWrapping &&
  12055. getComputedStyle(display.lineDiv).textRendering == "optimizelegibility")
  12056. { display.lineDiv.style.textRendering = "auto"; }
  12057. }
  12058. // The default configuration options.
  12059. CodeMirror.defaults = defaults;
  12060. // Functions to run when options are changed.
  12061. CodeMirror.optionHandlers = optionHandlers;
  12062. // Attach the necessary event handlers when initializing the editor
  12063. function registerEventHandlers(cm) {
  12064. var d = cm.display;
  12065. on(d.scroller, "mousedown", operation(cm, onMouseDown));
  12066. // Older IE's will not fire a second mousedown for a double click
  12067. if (ie && ie_version < 11)
  12068. { on(d.scroller, "dblclick", operation(cm, function (e) {
  12069. if (signalDOMEvent(cm, e)) { return }
  12070. var pos = posFromMouse(cm, e);
  12071. if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) { return }
  12072. e_preventDefault(e);
  12073. var word = cm.findWordAt(pos);
  12074. extendSelection(cm.doc, word.anchor, word.head);
  12075. })); }
  12076. else
  12077. { on(d.scroller, "dblclick", function (e) { return signalDOMEvent(cm, e) || e_preventDefault(e); }); }
  12078. // Some browsers fire contextmenu *after* opening the menu, at
  12079. // which point we can't mess with it anymore. Context menu is
  12080. // handled in onMouseDown for these browsers.
  12081. on(d.scroller, "contextmenu", function (e) { return onContextMenu(cm, e); });
  12082. on(d.input.getField(), "contextmenu", function (e) {
  12083. if (!d.scroller.contains(e.target)) { onContextMenu(cm, e); }
  12084. });
  12085. // Used to suppress mouse event handling when a touch happens
  12086. var touchFinished, prevTouch = {end: 0};
  12087. function finishTouch() {
  12088. if (d.activeTouch) {
  12089. touchFinished = setTimeout(function () { return d.activeTouch = null; }, 1000);
  12090. prevTouch = d.activeTouch;
  12091. prevTouch.end = +new Date;
  12092. }
  12093. }
  12094. function isMouseLikeTouchEvent(e) {
  12095. if (e.touches.length != 1) { return false }
  12096. var touch = e.touches[0];
  12097. return touch.radiusX <= 1 && touch.radiusY <= 1
  12098. }
  12099. function farAway(touch, other) {
  12100. if (other.left == null) { return true }
  12101. var dx = other.left - touch.left, dy = other.top - touch.top;
  12102. return dx * dx + dy * dy > 20 * 20
  12103. }
  12104. on(d.scroller, "touchstart", function (e) {
  12105. if (!signalDOMEvent(cm, e) && !isMouseLikeTouchEvent(e) && !clickInGutter(cm, e)) {
  12106. d.input.ensurePolled();
  12107. clearTimeout(touchFinished);
  12108. var now = +new Date;
  12109. d.activeTouch = {start: now, moved: false,
  12110. prev: now - prevTouch.end <= 300 ? prevTouch : null};
  12111. if (e.touches.length == 1) {
  12112. d.activeTouch.left = e.touches[0].pageX;
  12113. d.activeTouch.top = e.touches[0].pageY;
  12114. }
  12115. }
  12116. });
  12117. on(d.scroller, "touchmove", function () {
  12118. if (d.activeTouch) { d.activeTouch.moved = true; }
  12119. });
  12120. on(d.scroller, "touchend", function (e) {
  12121. var touch = d.activeTouch;
  12122. if (touch && !eventInWidget(d, e) && touch.left != null &&
  12123. !touch.moved && new Date - touch.start < 300) {
  12124. var pos = cm.coordsChar(d.activeTouch, "page"), range;
  12125. if (!touch.prev || farAway(touch, touch.prev)) // Single tap
  12126. { range = new Range(pos, pos); }
  12127. else if (!touch.prev.prev || farAway(touch, touch.prev.prev)) // Double tap
  12128. { range = cm.findWordAt(pos); }
  12129. else // Triple tap
  12130. { range = new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))); }
  12131. cm.setSelection(range.anchor, range.head);
  12132. cm.focus();
  12133. e_preventDefault(e);
  12134. }
  12135. finishTouch();
  12136. });
  12137. on(d.scroller, "touchcancel", finishTouch);
  12138. // Sync scrolling between fake scrollbars and real scrollable
  12139. // area, ensure viewport is updated when scrolling.
  12140. on(d.scroller, "scroll", function () {
  12141. if (d.scroller.clientHeight) {
  12142. updateScrollTop(cm, d.scroller.scrollTop);
  12143. setScrollLeft(cm, d.scroller.scrollLeft, true);
  12144. signal(cm, "scroll", cm);
  12145. }
  12146. });
  12147. // Listen to wheel events in order to try and update the viewport on time.
  12148. on(d.scroller, "mousewheel", function (e) { return onScrollWheel(cm, e); });
  12149. on(d.scroller, "DOMMouseScroll", function (e) { return onScrollWheel(cm, e); });
  12150. // Prevent wrapper from ever scrolling
  12151. on(d.wrapper, "scroll", function () { return d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; });
  12152. d.dragFunctions = {
  12153. enter: function (e) {if (!signalDOMEvent(cm, e)) { e_stop(e); }},
  12154. over: function (e) {if (!signalDOMEvent(cm, e)) { onDragOver(cm, e); e_stop(e); }},
  12155. start: function (e) { return onDragStart(cm, e); },
  12156. drop: operation(cm, onDrop),
  12157. leave: function (e) {if (!signalDOMEvent(cm, e)) { clearDragCursor(cm); }}
  12158. };
  12159. var inp = d.input.getField();
  12160. on(inp, "keyup", function (e) { return onKeyUp.call(cm, e); });
  12161. on(inp, "keydown", operation(cm, onKeyDown));
  12162. on(inp, "keypress", operation(cm, onKeyPress));
  12163. on(inp, "focus", function (e) { return onFocus(cm, e); });
  12164. on(inp, "blur", function (e) { return onBlur(cm, e); });
  12165. }
  12166. var initHooks = [];
  12167. CodeMirror.defineInitHook = function (f) { return initHooks.push(f); };
  12168. // Indent the given line. The how parameter can be "smart",
  12169. // "add"/null, "subtract", or "prev". When aggressive is false
  12170. // (typically set to true for forced single-line indents), empty
  12171. // lines are not indented, and places where the mode returns Pass
  12172. // are left alone.
  12173. function indentLine(cm, n, how, aggressive) {
  12174. var doc = cm.doc, state;
  12175. if (how == null) { how = "add"; }
  12176. if (how == "smart") {
  12177. // Fall back to "prev" when the mode doesn't have an indentation
  12178. // method.
  12179. if (!doc.mode.indent) { how = "prev"; }
  12180. else { state = getContextBefore(cm, n).state; }
  12181. }
  12182. var tabSize = cm.options.tabSize;
  12183. var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize);
  12184. if (line.stateAfter) { line.stateAfter = null; }
  12185. var curSpaceString = line.text.match(/^\s*/)[0], indentation;
  12186. if (!aggressive && !/\S/.test(line.text)) {
  12187. indentation = 0;
  12188. how = "not";
  12189. } else if (how == "smart") {
  12190. indentation = doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text);
  12191. if (indentation == Pass || indentation > 150) {
  12192. if (!aggressive) { return }
  12193. how = "prev";
  12194. }
  12195. }
  12196. if (how == "prev") {
  12197. if (n > doc.first) { indentation = countColumn(getLine(doc, n-1).text, null, tabSize); }
  12198. else { indentation = 0; }
  12199. } else if (how == "add") {
  12200. indentation = curSpace + cm.options.indentUnit;
  12201. } else if (how == "subtract") {
  12202. indentation = curSpace - cm.options.indentUnit;
  12203. } else if (typeof how == "number") {
  12204. indentation = curSpace + how;
  12205. }
  12206. indentation = Math.max(0, indentation);
  12207. var indentString = "", pos = 0;
  12208. if (cm.options.indentWithTabs)
  12209. { for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += "\t";} }
  12210. if (pos < indentation) { indentString += spaceStr(indentation - pos); }
  12211. if (indentString != curSpaceString) {
  12212. replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), "+input");
  12213. line.stateAfter = null;
  12214. return true
  12215. } else {
  12216. // Ensure that, if the cursor was in the whitespace at the start
  12217. // of the line, it is moved to the end of that space.
  12218. for (var i$1 = 0; i$1 < doc.sel.ranges.length; i$1++) {
  12219. var range = doc.sel.ranges[i$1];
  12220. if (range.head.line == n && range.head.ch < curSpaceString.length) {
  12221. var pos$1 = Pos(n, curSpaceString.length);
  12222. replaceOneSelection(doc, i$1, new Range(pos$1, pos$1));
  12223. break
  12224. }
  12225. }
  12226. }
  12227. }
  12228. // This will be set to a {lineWise: bool, text: [string]} object, so
  12229. // that, when pasting, we know what kind of selections the copied
  12230. // text was made out of.
  12231. var lastCopied = null;
  12232. function setLastCopied(newLastCopied) {
  12233. lastCopied = newLastCopied;
  12234. }
  12235. function applyTextInput(cm, inserted, deleted, sel, origin) {
  12236. var doc = cm.doc;
  12237. cm.display.shift = false;
  12238. if (!sel) { sel = doc.sel; }
  12239. var recent = +new Date - 200;
  12240. var paste = origin == "paste" || cm.state.pasteIncoming > recent;
  12241. var textLines = splitLinesAuto(inserted), multiPaste = null;
  12242. // When pasting N lines into N selections, insert one line per selection
  12243. if (paste && sel.ranges.length > 1) {
  12244. if (lastCopied && lastCopied.text.join("\n") == inserted) {
  12245. if (sel.ranges.length % lastCopied.text.length == 0) {
  12246. multiPaste = [];
  12247. for (var i = 0; i < lastCopied.text.length; i++)
  12248. { multiPaste.push(doc.splitLines(lastCopied.text[i])); }
  12249. }
  12250. } else if (textLines.length == sel.ranges.length && cm.options.pasteLinesPerSelection) {
  12251. multiPaste = map(textLines, function (l) { return [l]; });
  12252. }
  12253. }
  12254. var updateInput = cm.curOp.updateInput;
  12255. // Normal behavior is to insert the new text into every selection
  12256. for (var i$1 = sel.ranges.length - 1; i$1 >= 0; i$1--) {
  12257. var range = sel.ranges[i$1];
  12258. var from = range.from(), to = range.to();
  12259. if (range.empty()) {
  12260. if (deleted && deleted > 0) // Handle deletion
  12261. { from = Pos(from.line, from.ch - deleted); }
  12262. else if (cm.state.overwrite && !paste) // Handle overwrite
  12263. { to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length)); }
  12264. else if (paste && lastCopied && lastCopied.lineWise && lastCopied.text.join("\n") == textLines.join("\n"))
  12265. { from = to = Pos(from.line, 0); }
  12266. }
  12267. var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i$1 % multiPaste.length] : textLines,
  12268. origin: origin || (paste ? "paste" : cm.state.cutIncoming > recent ? "cut" : "+input")};
  12269. makeChange(cm.doc, changeEvent);
  12270. signalLater(cm, "inputRead", cm, changeEvent);
  12271. }
  12272. if (inserted && !paste)
  12273. { triggerElectric(cm, inserted); }
  12274. ensureCursorVisible(cm);
  12275. if (cm.curOp.updateInput < 2) { cm.curOp.updateInput = updateInput; }
  12276. cm.curOp.typing = true;
  12277. cm.state.pasteIncoming = cm.state.cutIncoming = -1;
  12278. }
  12279. function handlePaste(e, cm) {
  12280. var pasted = e.clipboardData && e.clipboardData.getData("Text");
  12281. if (pasted) {
  12282. e.preventDefault();
  12283. if (!cm.isReadOnly() && !cm.options.disableInput)
  12284. { runInOp(cm, function () { return applyTextInput(cm, pasted, 0, null, "paste"); }); }
  12285. return true
  12286. }
  12287. }
  12288. function triggerElectric(cm, inserted) {
  12289. // When an 'electric' character is inserted, immediately trigger a reindent
  12290. if (!cm.options.electricChars || !cm.options.smartIndent) { return }
  12291. var sel = cm.doc.sel;
  12292. for (var i = sel.ranges.length - 1; i >= 0; i--) {
  12293. var range = sel.ranges[i];
  12294. if (range.head.ch > 100 || (i && sel.ranges[i - 1].head.line == range.head.line)) { continue }
  12295. var mode = cm.getModeAt(range.head);
  12296. var indented = false;
  12297. if (mode.electricChars) {
  12298. for (var j = 0; j < mode.electricChars.length; j++)
  12299. { if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) {
  12300. indented = indentLine(cm, range.head.line, "smart");
  12301. break
  12302. } }
  12303. } else if (mode.electricInput) {
  12304. if (mode.electricInput.test(getLine(cm.doc, range.head.line).text.slice(0, range.head.ch)))
  12305. { indented = indentLine(cm, range.head.line, "smart"); }
  12306. }
  12307. if (indented) { signalLater(cm, "electricInput", cm, range.head.line); }
  12308. }
  12309. }
  12310. function copyableRanges(cm) {
  12311. var text = [], ranges = [];
  12312. for (var i = 0; i < cm.doc.sel.ranges.length; i++) {
  12313. var line = cm.doc.sel.ranges[i].head.line;
  12314. var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)};
  12315. ranges.push(lineRange);
  12316. text.push(cm.getRange(lineRange.anchor, lineRange.head));
  12317. }
  12318. return {text: text, ranges: ranges}
  12319. }
  12320. function disableBrowserMagic(field, spellcheck, autocorrect, autocapitalize) {
  12321. field.setAttribute("autocorrect", autocorrect ? "" : "off");
  12322. field.setAttribute("autocapitalize", autocapitalize ? "" : "off");
  12323. field.setAttribute("spellcheck", !!spellcheck);
  12324. }
  12325. function hiddenTextarea() {
  12326. var te = elt("textarea", null, null, "position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none");
  12327. var div = elt("div", [te], null, "overflow: hidden; position: relative; width: 3px; height: 0px;");
  12328. // The textarea is kept positioned near the cursor to prevent the
  12329. // fact that it'll be scrolled into view on input from scrolling
  12330. // our fake cursor out of view. On webkit, when wrap=off, paste is
  12331. // very slow. So make the area wide instead.
  12332. if (webkit) { te.style.width = "1000px"; }
  12333. else { te.setAttribute("wrap", "off"); }
  12334. // If border: 0; -- iOS fails to open keyboard (issue #1287)
  12335. if (ios) { te.style.border = "1px solid black"; }
  12336. disableBrowserMagic(te);
  12337. return div
  12338. }
  12339. // The publicly visible API. Note that methodOp(f) means
  12340. // 'wrap f in an operation, performed on its `this` parameter'.
  12341. // This is not the complete set of editor methods. Most of the
  12342. // methods defined on the Doc type are also injected into
  12343. // CodeMirror.prototype, for backwards compatibility and
  12344. // convenience.
  12345. function addEditorMethods(CodeMirror) {
  12346. var optionHandlers = CodeMirror.optionHandlers;
  12347. var helpers = CodeMirror.helpers = {};
  12348. CodeMirror.prototype = {
  12349. constructor: CodeMirror,
  12350. focus: function(){window.focus(); this.display.input.focus();},
  12351. setOption: function(option, value) {
  12352. var options = this.options, old = options[option];
  12353. if (options[option] == value && option != "mode") { return }
  12354. options[option] = value;
  12355. if (optionHandlers.hasOwnProperty(option))
  12356. { operation(this, optionHandlers[option])(this, value, old); }
  12357. signal(this, "optionChange", this, option);
  12358. },
  12359. getOption: function(option) {return this.options[option]},
  12360. getDoc: function() {return this.doc},
  12361. addKeyMap: function(map, bottom) {
  12362. this.state.keyMaps[bottom ? "push" : "unshift"](getKeyMap(map));
  12363. },
  12364. removeKeyMap: function(map) {
  12365. var maps = this.state.keyMaps;
  12366. for (var i = 0; i < maps.length; ++i)
  12367. { if (maps[i] == map || maps[i].name == map) {
  12368. maps.splice(i, 1);
  12369. return true
  12370. } }
  12371. },
  12372. addOverlay: methodOp(function(spec, options) {
  12373. var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec);
  12374. if (mode.startState) { throw new Error("Overlays may not be stateful.") }
  12375. insertSorted(this.state.overlays,
  12376. {mode: mode, modeSpec: spec, opaque: options && options.opaque,
  12377. priority: (options && options.priority) || 0},
  12378. function (overlay) { return overlay.priority; });
  12379. this.state.modeGen++;
  12380. regChange(this);
  12381. }),
  12382. removeOverlay: methodOp(function(spec) {
  12383. var overlays = this.state.overlays;
  12384. for (var i = 0; i < overlays.length; ++i) {
  12385. var cur = overlays[i].modeSpec;
  12386. if (cur == spec || typeof spec == "string" && cur.name == spec) {
  12387. overlays.splice(i, 1);
  12388. this.state.modeGen++;
  12389. regChange(this);
  12390. return
  12391. }
  12392. }
  12393. }),
  12394. indentLine: methodOp(function(n, dir, aggressive) {
  12395. if (typeof dir != "string" && typeof dir != "number") {
  12396. if (dir == null) { dir = this.options.smartIndent ? "smart" : "prev"; }
  12397. else { dir = dir ? "add" : "subtract"; }
  12398. }
  12399. if (isLine(this.doc, n)) { indentLine(this, n, dir, aggressive); }
  12400. }),
  12401. indentSelection: methodOp(function(how) {
  12402. var ranges = this.doc.sel.ranges, end = -1;
  12403. for (var i = 0; i < ranges.length; i++) {
  12404. var range = ranges[i];
  12405. if (!range.empty()) {
  12406. var from = range.from(), to = range.to();
  12407. var start = Math.max(end, from.line);
  12408. end = Math.min(this.lastLine(), to.line - (to.ch ? 0 : 1)) + 1;
  12409. for (var j = start; j < end; ++j)
  12410. { indentLine(this, j, how); }
  12411. var newRanges = this.doc.sel.ranges;
  12412. if (from.ch == 0 && ranges.length == newRanges.length && newRanges[i].from().ch > 0)
  12413. { replaceOneSelection(this.doc, i, new Range(from, newRanges[i].to()), sel_dontScroll); }
  12414. } else if (range.head.line > end) {
  12415. indentLine(this, range.head.line, how, true);
  12416. end = range.head.line;
  12417. if (i == this.doc.sel.primIndex) { ensureCursorVisible(this); }
  12418. }
  12419. }
  12420. }),
  12421. // Fetch the parser token for a given character. Useful for hacks
  12422. // that want to inspect the mode state (say, for completion).
  12423. getTokenAt: function(pos, precise) {
  12424. return takeToken(this, pos, precise)
  12425. },
  12426. getLineTokens: function(line, precise) {
  12427. return takeToken(this, Pos(line), precise, true)
  12428. },
  12429. getTokenTypeAt: function(pos) {
  12430. pos = clipPos(this.doc, pos);
  12431. var styles = getLineStyles(this, getLine(this.doc, pos.line));
  12432. var before = 0, after = (styles.length - 1) / 2, ch = pos.ch;
  12433. var type;
  12434. if (ch == 0) { type = styles[2]; }
  12435. else { for (;;) {
  12436. var mid = (before + after) >> 1;
  12437. if ((mid ? styles[mid * 2 - 1] : 0) >= ch) { after = mid; }
  12438. else if (styles[mid * 2 + 1] < ch) { before = mid + 1; }
  12439. else { type = styles[mid * 2 + 2]; break }
  12440. } }
  12441. var cut = type ? type.indexOf("overlay ") : -1;
  12442. return cut < 0 ? type : cut == 0 ? null : type.slice(0, cut - 1)
  12443. },
  12444. getModeAt: function(pos) {
  12445. var mode = this.doc.mode;
  12446. if (!mode.innerMode) { return mode }
  12447. return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode
  12448. },
  12449. getHelper: function(pos, type) {
  12450. return this.getHelpers(pos, type)[0]
  12451. },
  12452. getHelpers: function(pos, type) {
  12453. var found = [];
  12454. if (!helpers.hasOwnProperty(type)) { return found }
  12455. var help = helpers[type], mode = this.getModeAt(pos);
  12456. if (typeof mode[type] == "string") {
  12457. if (help[mode[type]]) { found.push(help[mode[type]]); }
  12458. } else if (mode[type]) {
  12459. for (var i = 0; i < mode[type].length; i++) {
  12460. var val = help[mode[type][i]];
  12461. if (val) { found.push(val); }
  12462. }
  12463. } else if (mode.helperType && help[mode.helperType]) {
  12464. found.push(help[mode.helperType]);
  12465. } else if (help[mode.name]) {
  12466. found.push(help[mode.name]);
  12467. }
  12468. for (var i$1 = 0; i$1 < help._global.length; i$1++) {
  12469. var cur = help._global[i$1];
  12470. if (cur.pred(mode, this) && indexOf(found, cur.val) == -1)
  12471. { found.push(cur.val); }
  12472. }
  12473. return found
  12474. },
  12475. getStateAfter: function(line, precise) {
  12476. var doc = this.doc;
  12477. line = clipLine(doc, line == null ? doc.first + doc.size - 1: line);
  12478. return getContextBefore(this, line + 1, precise).state
  12479. },
  12480. cursorCoords: function(start, mode) {
  12481. var pos, range = this.doc.sel.primary();
  12482. if (start == null) { pos = range.head; }
  12483. else if (typeof start == "object") { pos = clipPos(this.doc, start); }
  12484. else { pos = start ? range.from() : range.to(); }
  12485. return cursorCoords(this, pos, mode || "page")
  12486. },
  12487. charCoords: function(pos, mode) {
  12488. return charCoords(this, clipPos(this.doc, pos), mode || "page")
  12489. },
  12490. coordsChar: function(coords, mode) {
  12491. coords = fromCoordSystem(this, coords, mode || "page");
  12492. return coordsChar(this, coords.left, coords.top)
  12493. },
  12494. lineAtHeight: function(height, mode) {
  12495. height = fromCoordSystem(this, {top: height, left: 0}, mode || "page").top;
  12496. return lineAtHeight(this.doc, height + this.display.viewOffset)
  12497. },
  12498. heightAtLine: function(line, mode, includeWidgets) {
  12499. var end = false, lineObj;
  12500. if (typeof line == "number") {
  12501. var last = this.doc.first + this.doc.size - 1;
  12502. if (line < this.doc.first) { line = this.doc.first; }
  12503. else if (line > last) { line = last; end = true; }
  12504. lineObj = getLine(this.doc, line);
  12505. } else {
  12506. lineObj = line;
  12507. }
  12508. return intoCoordSystem(this, lineObj, {top: 0, left: 0}, mode || "page", includeWidgets || end).top +
  12509. (end ? this.doc.height - heightAtLine(lineObj) : 0)
  12510. },
  12511. defaultTextHeight: function() { return textHeight(this.display) },
  12512. defaultCharWidth: function() { return charWidth(this.display) },
  12513. getViewport: function() { return {from: this.display.viewFrom, to: this.display.viewTo}},
  12514. addWidget: function(pos, node, scroll, vert, horiz) {
  12515. var display = this.display;
  12516. pos = cursorCoords(this, clipPos(this.doc, pos));
  12517. var top = pos.bottom, left = pos.left;
  12518. node.style.position = "absolute";
  12519. node.setAttribute("cm-ignore-events", "true");
  12520. this.display.input.setUneditable(node);
  12521. display.sizer.appendChild(node);
  12522. if (vert == "over") {
  12523. top = pos.top;
  12524. } else if (vert == "above" || vert == "near") {
  12525. var vspace = Math.max(display.wrapper.clientHeight, this.doc.height),
  12526. hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth);
  12527. // Default to positioning above (if specified and possible); otherwise default to positioning below
  12528. if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight)
  12529. { top = pos.top - node.offsetHeight; }
  12530. else if (pos.bottom + node.offsetHeight <= vspace)
  12531. { top = pos.bottom; }
  12532. if (left + node.offsetWidth > hspace)
  12533. { left = hspace - node.offsetWidth; }
  12534. }
  12535. node.style.top = top + "px";
  12536. node.style.left = node.style.right = "";
  12537. if (horiz == "right") {
  12538. left = display.sizer.clientWidth - node.offsetWidth;
  12539. node.style.right = "0px";
  12540. } else {
  12541. if (horiz == "left") { left = 0; }
  12542. else if (horiz == "middle") { left = (display.sizer.clientWidth - node.offsetWidth) / 2; }
  12543. node.style.left = left + "px";
  12544. }
  12545. if (scroll)
  12546. { scrollIntoView(this, {left: left, top: top, right: left + node.offsetWidth, bottom: top + node.offsetHeight}); }
  12547. },
  12548. triggerOnKeyDown: methodOp(onKeyDown),
  12549. triggerOnKeyPress: methodOp(onKeyPress),
  12550. triggerOnKeyUp: onKeyUp,
  12551. triggerOnMouseDown: methodOp(onMouseDown),
  12552. execCommand: function(cmd) {
  12553. if (commands.hasOwnProperty(cmd))
  12554. { return commands[cmd].call(null, this) }
  12555. },
  12556. triggerElectric: methodOp(function(text) { triggerElectric(this, text); }),
  12557. findPosH: function(from, amount, unit, visually) {
  12558. var dir = 1;
  12559. if (amount < 0) { dir = -1; amount = -amount; }
  12560. var cur = clipPos(this.doc, from);
  12561. for (var i = 0; i < amount; ++i) {
  12562. cur = findPosH(this.doc, cur, dir, unit, visually);
  12563. if (cur.hitSide) { break }
  12564. }
  12565. return cur
  12566. },
  12567. moveH: methodOp(function(dir, unit) {
  12568. var this$1 = this;
  12569. this.extendSelectionsBy(function (range) {
  12570. if (this$1.display.shift || this$1.doc.extend || range.empty())
  12571. { return findPosH(this$1.doc, range.head, dir, unit, this$1.options.rtlMoveVisually) }
  12572. else
  12573. { return dir < 0 ? range.from() : range.to() }
  12574. }, sel_move);
  12575. }),
  12576. deleteH: methodOp(function(dir, unit) {
  12577. var sel = this.doc.sel, doc = this.doc;
  12578. if (sel.somethingSelected())
  12579. { doc.replaceSelection("", null, "+delete"); }
  12580. else
  12581. { deleteNearSelection(this, function (range) {
  12582. var other = findPosH(doc, range.head, dir, unit, false);
  12583. return dir < 0 ? {from: other, to: range.head} : {from: range.head, to: other}
  12584. }); }
  12585. }),
  12586. findPosV: function(from, amount, unit, goalColumn) {
  12587. var dir = 1, x = goalColumn;
  12588. if (amount < 0) { dir = -1; amount = -amount; }
  12589. var cur = clipPos(this.doc, from);
  12590. for (var i = 0; i < amount; ++i) {
  12591. var coords = cursorCoords(this, cur, "div");
  12592. if (x == null) { x = coords.left; }
  12593. else { coords.left = x; }
  12594. cur = findPosV(this, coords, dir, unit);
  12595. if (cur.hitSide) { break }
  12596. }
  12597. return cur
  12598. },
  12599. moveV: methodOp(function(dir, unit) {
  12600. var this$1 = this;
  12601. var doc = this.doc, goals = [];
  12602. var collapse = !this.display.shift && !doc.extend && doc.sel.somethingSelected();
  12603. doc.extendSelectionsBy(function (range) {
  12604. if (collapse)
  12605. { return dir < 0 ? range.from() : range.to() }
  12606. var headPos = cursorCoords(this$1, range.head, "div");
  12607. if (range.goalColumn != null) { headPos.left = range.goalColumn; }
  12608. goals.push(headPos.left);
  12609. var pos = findPosV(this$1, headPos, dir, unit);
  12610. if (unit == "page" && range == doc.sel.primary())
  12611. { addToScrollTop(this$1, charCoords(this$1, pos, "div").top - headPos.top); }
  12612. return pos
  12613. }, sel_move);
  12614. if (goals.length) { for (var i = 0; i < doc.sel.ranges.length; i++)
  12615. { doc.sel.ranges[i].goalColumn = goals[i]; } }
  12616. }),
  12617. // Find the word at the given position (as returned by coordsChar).
  12618. findWordAt: function(pos) {
  12619. var doc = this.doc, line = getLine(doc, pos.line).text;
  12620. var start = pos.ch, end = pos.ch;
  12621. if (line) {
  12622. var helper = this.getHelper(pos, "wordChars");
  12623. if ((pos.sticky == "before" || end == line.length) && start) { --start; } else { ++end; }
  12624. var startChar = line.charAt(start);
  12625. var check = isWordChar(startChar, helper)
  12626. ? function (ch) { return isWordChar(ch, helper); }
  12627. : /\s/.test(startChar) ? function (ch) { return /\s/.test(ch); }
  12628. : function (ch) { return (!/\s/.test(ch) && !isWordChar(ch)); };
  12629. while (start > 0 && check(line.charAt(start - 1))) { --start; }
  12630. while (end < line.length && check(line.charAt(end))) { ++end; }
  12631. }
  12632. return new Range(Pos(pos.line, start), Pos(pos.line, end))
  12633. },
  12634. toggleOverwrite: function(value) {
  12635. if (value != null && value == this.state.overwrite) { return }
  12636. if (this.state.overwrite = !this.state.overwrite)
  12637. { addClass(this.display.cursorDiv, "CodeMirror-overwrite"); }
  12638. else
  12639. { rmClass(this.display.cursorDiv, "CodeMirror-overwrite"); }
  12640. signal(this, "overwriteToggle", this, this.state.overwrite);
  12641. },
  12642. hasFocus: function() { return this.display.input.getField() == activeElt() },
  12643. isReadOnly: function() { return !!(this.options.readOnly || this.doc.cantEdit) },
  12644. scrollTo: methodOp(function (x, y) { scrollToCoords(this, x, y); }),
  12645. getScrollInfo: function() {
  12646. var scroller = this.display.scroller;
  12647. return {left: scroller.scrollLeft, top: scroller.scrollTop,
  12648. height: scroller.scrollHeight - scrollGap(this) - this.display.barHeight,
  12649. width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth,
  12650. clientHeight: displayHeight(this), clientWidth: displayWidth(this)}
  12651. },
  12652. scrollIntoView: methodOp(function(range, margin) {
  12653. if (range == null) {
  12654. range = {from: this.doc.sel.primary().head, to: null};
  12655. if (margin == null) { margin = this.options.cursorScrollMargin; }
  12656. } else if (typeof range == "number") {
  12657. range = {from: Pos(range, 0), to: null};
  12658. } else if (range.from == null) {
  12659. range = {from: range, to: null};
  12660. }
  12661. if (!range.to) { range.to = range.from; }
  12662. range.margin = margin || 0;
  12663. if (range.from.line != null) {
  12664. scrollToRange(this, range);
  12665. } else {
  12666. scrollToCoordsRange(this, range.from, range.to, range.margin);
  12667. }
  12668. }),
  12669. setSize: methodOp(function(width, height) {
  12670. var this$1 = this;
  12671. var interpret = function (val) { return typeof val == "number" || /^\d+$/.test(String(val)) ? val + "px" : val; };
  12672. if (width != null) { this.display.wrapper.style.width = interpret(width); }
  12673. if (height != null) { this.display.wrapper.style.height = interpret(height); }
  12674. if (this.options.lineWrapping) { clearLineMeasurementCache(this); }
  12675. var lineNo = this.display.viewFrom;
  12676. this.doc.iter(lineNo, this.display.viewTo, function (line) {
  12677. if (line.widgets) { for (var i = 0; i < line.widgets.length; i++)
  12678. { if (line.widgets[i].noHScroll) { regLineChange(this$1, lineNo, "widget"); break } } }
  12679. ++lineNo;
  12680. });
  12681. this.curOp.forceUpdate = true;
  12682. signal(this, "refresh", this);
  12683. }),
  12684. operation: function(f){return runInOp(this, f)},
  12685. startOperation: function(){return startOperation(this)},
  12686. endOperation: function(){return endOperation(this)},
  12687. refresh: methodOp(function() {
  12688. var oldHeight = this.display.cachedTextHeight;
  12689. regChange(this);
  12690. this.curOp.forceUpdate = true;
  12691. clearCaches(this);
  12692. scrollToCoords(this, this.doc.scrollLeft, this.doc.scrollTop);
  12693. updateGutterSpace(this.display);
  12694. if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5 || this.options.lineWrapping)
  12695. { estimateLineHeights(this); }
  12696. signal(this, "refresh", this);
  12697. }),
  12698. swapDoc: methodOp(function(doc) {
  12699. var old = this.doc;
  12700. old.cm = null;
  12701. // Cancel the current text selection if any (#5821)
  12702. if (this.state.selectingText) { this.state.selectingText(); }
  12703. attachDoc(this, doc);
  12704. clearCaches(this);
  12705. this.display.input.reset();
  12706. scrollToCoords(this, doc.scrollLeft, doc.scrollTop);
  12707. this.curOp.forceScroll = true;
  12708. signalLater(this, "swapDoc", this, old);
  12709. return old
  12710. }),
  12711. phrase: function(phraseText) {
  12712. var phrases = this.options.phrases;
  12713. return phrases && Object.prototype.hasOwnProperty.call(phrases, phraseText) ? phrases[phraseText] : phraseText
  12714. },
  12715. getInputField: function(){return this.display.input.getField()},
  12716. getWrapperElement: function(){return this.display.wrapper},
  12717. getScrollerElement: function(){return this.display.scroller},
  12718. getGutterElement: function(){return this.display.gutters}
  12719. };
  12720. eventMixin(CodeMirror);
  12721. CodeMirror.registerHelper = function(type, name, value) {
  12722. if (!helpers.hasOwnProperty(type)) { helpers[type] = CodeMirror[type] = {_global: []}; }
  12723. helpers[type][name] = value;
  12724. };
  12725. CodeMirror.registerGlobalHelper = function(type, name, predicate, value) {
  12726. CodeMirror.registerHelper(type, name, value);
  12727. helpers[type]._global.push({pred: predicate, val: value});
  12728. };
  12729. }
  12730. // Used for horizontal relative motion. Dir is -1 or 1 (left or
  12731. // right), unit can be "codepoint", "char", "column" (like char, but
  12732. // doesn't cross line boundaries), "word" (across next word), or
  12733. // "group" (to the start of next group of word or
  12734. // non-word-non-whitespace chars). The visually param controls
  12735. // whether, in right-to-left text, direction 1 means to move towards
  12736. // the next index in the string, or towards the character to the right
  12737. // of the current position. The resulting position will have a
  12738. // hitSide=true property if it reached the end of the document.
  12739. function findPosH(doc, pos, dir, unit, visually) {
  12740. var oldPos = pos;
  12741. var origDir = dir;
  12742. var lineObj = getLine(doc, pos.line);
  12743. var lineDir = visually && doc.direction == "rtl" ? -dir : dir;
  12744. function findNextLine() {
  12745. var l = pos.line + lineDir;
  12746. if (l < doc.first || l >= doc.first + doc.size) { return false }
  12747. pos = new Pos(l, pos.ch, pos.sticky);
  12748. return lineObj = getLine(doc, l)
  12749. }
  12750. function moveOnce(boundToLine) {
  12751. var next;
  12752. if (unit == "codepoint") {
  12753. var ch = lineObj.text.charCodeAt(pos.ch + (dir > 0 ? 0 : -1));
  12754. if (isNaN(ch)) {
  12755. next = null;
  12756. } else {
  12757. var astral = dir > 0 ? ch >= 0xD800 && ch < 0xDC00 : ch >= 0xDC00 && ch < 0xDFFF;
  12758. next = new Pos(pos.line, Math.max(0, Math.min(lineObj.text.length, pos.ch + dir * (astral ? 2 : 1))), -dir);
  12759. }
  12760. } else if (visually) {
  12761. next = moveVisually(doc.cm, lineObj, pos, dir);
  12762. } else {
  12763. next = moveLogically(lineObj, pos, dir);
  12764. }
  12765. if (next == null) {
  12766. if (!boundToLine && findNextLine())
  12767. { pos = endOfLine(visually, doc.cm, lineObj, pos.line, lineDir); }
  12768. else
  12769. { return false }
  12770. } else {
  12771. pos = next;
  12772. }
  12773. return true
  12774. }
  12775. if (unit == "char" || unit == "codepoint") {
  12776. moveOnce();
  12777. } else if (unit == "column") {
  12778. moveOnce(true);
  12779. } else if (unit == "word" || unit == "group") {
  12780. var sawType = null, group = unit == "group";
  12781. var helper = doc.cm && doc.cm.getHelper(pos, "wordChars");
  12782. for (var first = true;; first = false) {
  12783. if (dir < 0 && !moveOnce(!first)) { break }
  12784. var cur = lineObj.text.charAt(pos.ch) || "\n";
  12785. var type = isWordChar(cur, helper) ? "w"
  12786. : group && cur == "\n" ? "n"
  12787. : !group || /\s/.test(cur) ? null
  12788. : "p";
  12789. if (group && !first && !type) { type = "s"; }
  12790. if (sawType && sawType != type) {
  12791. if (dir < 0) {dir = 1; moveOnce(); pos.sticky = "after";}
  12792. break
  12793. }
  12794. if (type) { sawType = type; }
  12795. if (dir > 0 && !moveOnce(!first)) { break }
  12796. }
  12797. }
  12798. var result = skipAtomic(doc, pos, oldPos, origDir, true);
  12799. if (equalCursorPos(oldPos, result)) { result.hitSide = true; }
  12800. return result
  12801. }
  12802. // For relative vertical movement. Dir may be -1 or 1. Unit can be
  12803. // "page" or "line". The resulting position will have a hitSide=true
  12804. // property if it reached the end of the document.
  12805. function findPosV(cm, pos, dir, unit) {
  12806. var doc = cm.doc, x = pos.left, y;
  12807. if (unit == "page") {
  12808. var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight);
  12809. var moveAmount = Math.max(pageSize - .5 * textHeight(cm.display), 3);
  12810. y = (dir > 0 ? pos.bottom : pos.top) + dir * moveAmount;
  12811. } else if (unit == "line") {
  12812. y = dir > 0 ? pos.bottom + 3 : pos.top - 3;
  12813. }
  12814. var target;
  12815. for (;;) {
  12816. target = coordsChar(cm, x, y);
  12817. if (!target.outside) { break }
  12818. if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break }
  12819. y += dir * 5;
  12820. }
  12821. return target
  12822. }
  12823. // CONTENTEDITABLE INPUT STYLE
  12824. var ContentEditableInput = function(cm) {
  12825. this.cm = cm;
  12826. this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null;
  12827. this.polling = new Delayed();
  12828. this.composing = null;
  12829. this.gracePeriod = false;
  12830. this.readDOMTimeout = null;
  12831. };
  12832. ContentEditableInput.prototype.init = function (display) {
  12833. var this$1 = this;
  12834. var input = this, cm = input.cm;
  12835. var div = input.div = display.lineDiv;
  12836. div.contentEditable = true;
  12837. disableBrowserMagic(div, cm.options.spellcheck, cm.options.autocorrect, cm.options.autocapitalize);
  12838. function belongsToInput(e) {
  12839. for (var t = e.target; t; t = t.parentNode) {
  12840. if (t == div) { return true }
  12841. if (/\bCodeMirror-(?:line)?widget\b/.test(t.className)) { break }
  12842. }
  12843. return false
  12844. }
  12845. on(div, "paste", function (e) {
  12846. if (!belongsToInput(e) || signalDOMEvent(cm, e) || handlePaste(e, cm)) { return }
  12847. // IE doesn't fire input events, so we schedule a read for the pasted content in this way
  12848. if (ie_version <= 11) { setTimeout(operation(cm, function () { return this$1.updateFromDOM(); }), 20); }
  12849. });
  12850. on(div, "compositionstart", function (e) {
  12851. this$1.composing = {data: e.data, done: false};
  12852. });
  12853. on(div, "compositionupdate", function (e) {
  12854. if (!this$1.composing) { this$1.composing = {data: e.data, done: false}; }
  12855. });
  12856. on(div, "compositionend", function (e) {
  12857. if (this$1.composing) {
  12858. if (e.data != this$1.composing.data) { this$1.readFromDOMSoon(); }
  12859. this$1.composing.done = true;
  12860. }
  12861. });
  12862. on(div, "touchstart", function () { return input.forceCompositionEnd(); });
  12863. on(div, "input", function () {
  12864. if (!this$1.composing) { this$1.readFromDOMSoon(); }
  12865. });
  12866. function onCopyCut(e) {
  12867. if (!belongsToInput(e) || signalDOMEvent(cm, e)) { return }
  12868. if (cm.somethingSelected()) {
  12869. setLastCopied({lineWise: false, text: cm.getSelections()});
  12870. if (e.type == "cut") { cm.replaceSelection("", null, "cut"); }
  12871. } else if (!cm.options.lineWiseCopyCut) {
  12872. return
  12873. } else {
  12874. var ranges = copyableRanges(cm);
  12875. setLastCopied({lineWise: true, text: ranges.text});
  12876. if (e.type == "cut") {
  12877. cm.operation(function () {
  12878. cm.setSelections(ranges.ranges, 0, sel_dontScroll);
  12879. cm.replaceSelection("", null, "cut");
  12880. });
  12881. }
  12882. }
  12883. if (e.clipboardData) {
  12884. e.clipboardData.clearData();
  12885. var content = lastCopied.text.join("\n");
  12886. // iOS exposes the clipboard API, but seems to discard content inserted into it
  12887. e.clipboardData.setData("Text", content);
  12888. if (e.clipboardData.getData("Text") == content) {
  12889. e.preventDefault();
  12890. return
  12891. }
  12892. }
  12893. // Old-fashioned briefly-focus-a-textarea hack
  12894. var kludge = hiddenTextarea(), te = kludge.firstChild;
  12895. cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild);
  12896. te.value = lastCopied.text.join("\n");
  12897. var hadFocus = activeElt();
  12898. selectInput(te);
  12899. setTimeout(function () {
  12900. cm.display.lineSpace.removeChild(kludge);
  12901. hadFocus.focus();
  12902. if (hadFocus == div) { input.showPrimarySelection(); }
  12903. }, 50);
  12904. }
  12905. on(div, "copy", onCopyCut);
  12906. on(div, "cut", onCopyCut);
  12907. };
  12908. ContentEditableInput.prototype.screenReaderLabelChanged = function (label) {
  12909. // Label for screenreaders, accessibility
  12910. if(label) {
  12911. this.div.setAttribute('aria-label', label);
  12912. } else {
  12913. this.div.removeAttribute('aria-label');
  12914. }
  12915. };
  12916. ContentEditableInput.prototype.prepareSelection = function () {
  12917. var result = prepareSelection(this.cm, false);
  12918. result.focus = activeElt() == this.div;
  12919. return result
  12920. };
  12921. ContentEditableInput.prototype.showSelection = function (info, takeFocus) {
  12922. if (!info || !this.cm.display.view.length) { return }
  12923. if (info.focus || takeFocus) { this.showPrimarySelection(); }
  12924. this.showMultipleSelections(info);
  12925. };
  12926. ContentEditableInput.prototype.getSelection = function () {
  12927. return this.cm.display.wrapper.ownerDocument.getSelection()
  12928. };
  12929. ContentEditableInput.prototype.showPrimarySelection = function () {
  12930. var sel = this.getSelection(), cm = this.cm, prim = cm.doc.sel.primary();
  12931. var from = prim.from(), to = prim.to();
  12932. if (cm.display.viewTo == cm.display.viewFrom || from.line >= cm.display.viewTo || to.line < cm.display.viewFrom) {
  12933. sel.removeAllRanges();
  12934. return
  12935. }
  12936. var curAnchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);
  12937. var curFocus = domToPos(cm, sel.focusNode, sel.focusOffset);
  12938. if (curAnchor && !curAnchor.bad && curFocus && !curFocus.bad &&
  12939. cmp(minPos(curAnchor, curFocus), from) == 0 &&
  12940. cmp(maxPos(curAnchor, curFocus), to) == 0)
  12941. { return }
  12942. var view = cm.display.view;
  12943. var start = (from.line >= cm.display.viewFrom && posToDOM(cm, from)) ||
  12944. {node: view[0].measure.map[2], offset: 0};
  12945. var end = to.line < cm.display.viewTo && posToDOM(cm, to);
  12946. if (!end) {
  12947. var measure = view[view.length - 1].measure;
  12948. var map = measure.maps ? measure.maps[measure.maps.length - 1] : measure.map;
  12949. end = {node: map[map.length - 1], offset: map[map.length - 2] - map[map.length - 3]};
  12950. }
  12951. if (!start || !end) {
  12952. sel.removeAllRanges();
  12953. return
  12954. }
  12955. var old = sel.rangeCount && sel.getRangeAt(0), rng;
  12956. try { rng = range(start.node, start.offset, end.offset, end.node); }
  12957. catch(e) {} // Our model of the DOM might be outdated, in which case the range we try to set can be impossible
  12958. if (rng) {
  12959. if (!gecko && cm.state.focused) {
  12960. sel.collapse(start.node, start.offset);
  12961. if (!rng.collapsed) {
  12962. sel.removeAllRanges();
  12963. sel.addRange(rng);
  12964. }
  12965. } else {
  12966. sel.removeAllRanges();
  12967. sel.addRange(rng);
  12968. }
  12969. if (old && sel.anchorNode == null) { sel.addRange(old); }
  12970. else if (gecko) { this.startGracePeriod(); }
  12971. }
  12972. this.rememberSelection();
  12973. };
  12974. ContentEditableInput.prototype.startGracePeriod = function () {
  12975. var this$1 = this;
  12976. clearTimeout(this.gracePeriod);
  12977. this.gracePeriod = setTimeout(function () {
  12978. this$1.gracePeriod = false;
  12979. if (this$1.selectionChanged())
  12980. { this$1.cm.operation(function () { return this$1.cm.curOp.selectionChanged = true; }); }
  12981. }, 20);
  12982. };
  12983. ContentEditableInput.prototype.showMultipleSelections = function (info) {
  12984. removeChildrenAndAdd(this.cm.display.cursorDiv, info.cursors);
  12985. removeChildrenAndAdd(this.cm.display.selectionDiv, info.selection);
  12986. };
  12987. ContentEditableInput.prototype.rememberSelection = function () {
  12988. var sel = this.getSelection();
  12989. this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset;
  12990. this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset;
  12991. };
  12992. ContentEditableInput.prototype.selectionInEditor = function () {
  12993. var sel = this.getSelection();
  12994. if (!sel.rangeCount) { return false }
  12995. var node = sel.getRangeAt(0).commonAncestorContainer;
  12996. return contains(this.div, node)
  12997. };
  12998. ContentEditableInput.prototype.focus = function () {
  12999. if (this.cm.options.readOnly != "nocursor") {
  13000. if (!this.selectionInEditor() || activeElt() != this.div)
  13001. { this.showSelection(this.prepareSelection(), true); }
  13002. this.div.focus();
  13003. }
  13004. };
  13005. ContentEditableInput.prototype.blur = function () { this.div.blur(); };
  13006. ContentEditableInput.prototype.getField = function () { return this.div };
  13007. ContentEditableInput.prototype.supportsTouch = function () { return true };
  13008. ContentEditableInput.prototype.receivedFocus = function () {
  13009. var this$1 = this;
  13010. var input = this;
  13011. if (this.selectionInEditor())
  13012. { setTimeout(function () { return this$1.pollSelection(); }, 20); }
  13013. else
  13014. { runInOp(this.cm, function () { return input.cm.curOp.selectionChanged = true; }); }
  13015. function poll() {
  13016. if (input.cm.state.focused) {
  13017. input.pollSelection();
  13018. input.polling.set(input.cm.options.pollInterval, poll);
  13019. }
  13020. }
  13021. this.polling.set(this.cm.options.pollInterval, poll);
  13022. };
  13023. ContentEditableInput.prototype.selectionChanged = function () {
  13024. var sel = this.getSelection();
  13025. return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset ||
  13026. sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset
  13027. };
  13028. ContentEditableInput.prototype.pollSelection = function () {
  13029. if (this.readDOMTimeout != null || this.gracePeriod || !this.selectionChanged()) { return }
  13030. var sel = this.getSelection(), cm = this.cm;
  13031. // On Android Chrome (version 56, at least), backspacing into an
  13032. // uneditable block element will put the cursor in that element,
  13033. // and then, because it's not editable, hide the virtual keyboard.
  13034. // Because Android doesn't allow us to actually detect backspace
  13035. // presses in a sane way, this code checks for when that happens
  13036. // and simulates a backspace press in this case.
  13037. if (android && chrome && this.cm.display.gutterSpecs.length && isInGutter(sel.anchorNode)) {
  13038. this.cm.triggerOnKeyDown({type: "keydown", keyCode: 8, preventDefault: Math.abs});
  13039. this.blur();
  13040. this.focus();
  13041. return
  13042. }
  13043. if (this.composing) { return }
  13044. this.rememberSelection();
  13045. var anchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);
  13046. var head = domToPos(cm, sel.focusNode, sel.focusOffset);
  13047. if (anchor && head) { runInOp(cm, function () {
  13048. setSelection(cm.doc, simpleSelection(anchor, head), sel_dontScroll);
  13049. if (anchor.bad || head.bad) { cm.curOp.selectionChanged = true; }
  13050. }); }
  13051. };
  13052. ContentEditableInput.prototype.pollContent = function () {
  13053. if (this.readDOMTimeout != null) {
  13054. clearTimeout(this.readDOMTimeout);
  13055. this.readDOMTimeout = null;
  13056. }
  13057. var cm = this.cm, display = cm.display, sel = cm.doc.sel.primary();
  13058. var from = sel.from(), to = sel.to();
  13059. if (from.ch == 0 && from.line > cm.firstLine())
  13060. { from = Pos(from.line - 1, getLine(cm.doc, from.line - 1).length); }
  13061. if (to.ch == getLine(cm.doc, to.line).text.length && to.line < cm.lastLine())
  13062. { to = Pos(to.line + 1, 0); }
  13063. if (from.line < display.viewFrom || to.line > display.viewTo - 1) { return false }
  13064. var fromIndex, fromLine, fromNode;
  13065. if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) {
  13066. fromLine = lineNo(display.view[0].line);
  13067. fromNode = display.view[0].node;
  13068. } else {
  13069. fromLine = lineNo(display.view[fromIndex].line);
  13070. fromNode = display.view[fromIndex - 1].node.nextSibling;
  13071. }
  13072. var toIndex = findViewIndex(cm, to.line);
  13073. var toLine, toNode;
  13074. if (toIndex == display.view.length - 1) {
  13075. toLine = display.viewTo - 1;
  13076. toNode = display.lineDiv.lastChild;
  13077. } else {
  13078. toLine = lineNo(display.view[toIndex + 1].line) - 1;
  13079. toNode = display.view[toIndex + 1].node.previousSibling;
  13080. }
  13081. if (!fromNode) { return false }
  13082. var newText = cm.doc.splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine));
  13083. var oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length));
  13084. while (newText.length > 1 && oldText.length > 1) {
  13085. if (lst(newText) == lst(oldText)) { newText.pop(); oldText.pop(); toLine--; }
  13086. else if (newText[0] == oldText[0]) { newText.shift(); oldText.shift(); fromLine++; }
  13087. else { break }
  13088. }
  13089. var cutFront = 0, cutEnd = 0;
  13090. var newTop = newText[0], oldTop = oldText[0], maxCutFront = Math.min(newTop.length, oldTop.length);
  13091. while (cutFront < maxCutFront && newTop.charCodeAt(cutFront) == oldTop.charCodeAt(cutFront))
  13092. { ++cutFront; }
  13093. var newBot = lst(newText), oldBot = lst(oldText);
  13094. var maxCutEnd = Math.min(newBot.length - (newText.length == 1 ? cutFront : 0),
  13095. oldBot.length - (oldText.length == 1 ? cutFront : 0));
  13096. while (cutEnd < maxCutEnd &&
  13097. newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1))
  13098. { ++cutEnd; }
  13099. // Try to move start of change to start of selection if ambiguous
  13100. if (newText.length == 1 && oldText.length == 1 && fromLine == from.line) {
  13101. while (cutFront && cutFront > from.ch &&
  13102. newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1)) {
  13103. cutFront--;
  13104. cutEnd++;
  13105. }
  13106. }
  13107. newText[newText.length - 1] = newBot.slice(0, newBot.length - cutEnd).replace(/^\u200b+/, "");
  13108. newText[0] = newText[0].slice(cutFront).replace(/\u200b+$/, "");
  13109. var chFrom = Pos(fromLine, cutFront);
  13110. var chTo = Pos(toLine, oldText.length ? lst(oldText).length - cutEnd : 0);
  13111. if (newText.length > 1 || newText[0] || cmp(chFrom, chTo)) {
  13112. replaceRange(cm.doc, newText, chFrom, chTo, "+input");
  13113. return true
  13114. }
  13115. };
  13116. ContentEditableInput.prototype.ensurePolled = function () {
  13117. this.forceCompositionEnd();
  13118. };
  13119. ContentEditableInput.prototype.reset = function () {
  13120. this.forceCompositionEnd();
  13121. };
  13122. ContentEditableInput.prototype.forceCompositionEnd = function () {
  13123. if (!this.composing) { return }
  13124. clearTimeout(this.readDOMTimeout);
  13125. this.composing = null;
  13126. this.updateFromDOM();
  13127. this.div.blur();
  13128. this.div.focus();
  13129. };
  13130. ContentEditableInput.prototype.readFromDOMSoon = function () {
  13131. var this$1 = this;
  13132. if (this.readDOMTimeout != null) { return }
  13133. this.readDOMTimeout = setTimeout(function () {
  13134. this$1.readDOMTimeout = null;
  13135. if (this$1.composing) {
  13136. if (this$1.composing.done) { this$1.composing = null; }
  13137. else { return }
  13138. }
  13139. this$1.updateFromDOM();
  13140. }, 80);
  13141. };
  13142. ContentEditableInput.prototype.updateFromDOM = function () {
  13143. var this$1 = this;
  13144. if (this.cm.isReadOnly() || !this.pollContent())
  13145. { runInOp(this.cm, function () { return regChange(this$1.cm); }); }
  13146. };
  13147. ContentEditableInput.prototype.setUneditable = function (node) {
  13148. node.contentEditable = "false";
  13149. };
  13150. ContentEditableInput.prototype.onKeyPress = function (e) {
  13151. if (e.charCode == 0 || this.composing) { return }
  13152. e.preventDefault();
  13153. if (!this.cm.isReadOnly())
  13154. { operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0); }
  13155. };
  13156. ContentEditableInput.prototype.readOnlyChanged = function (val) {
  13157. this.div.contentEditable = String(val != "nocursor");
  13158. };
  13159. ContentEditableInput.prototype.onContextMenu = function () {};
  13160. ContentEditableInput.prototype.resetPosition = function () {};
  13161. ContentEditableInput.prototype.needsContentAttribute = true;
  13162. function posToDOM(cm, pos) {
  13163. var view = findViewForLine(cm, pos.line);
  13164. if (!view || view.hidden) { return null }
  13165. var line = getLine(cm.doc, pos.line);
  13166. var info = mapFromLineView(view, line, pos.line);
  13167. var order = getOrder(line, cm.doc.direction), side = "left";
  13168. if (order) {
  13169. var partPos = getBidiPartAt(order, pos.ch);
  13170. side = partPos % 2 ? "right" : "left";
  13171. }
  13172. var result = nodeAndOffsetInLineMap(info.map, pos.ch, side);
  13173. result.offset = result.collapse == "right" ? result.end : result.start;
  13174. return result
  13175. }
  13176. function isInGutter(node) {
  13177. for (var scan = node; scan; scan = scan.parentNode)
  13178. { if (/CodeMirror-gutter-wrapper/.test(scan.className)) { return true } }
  13179. return false
  13180. }
  13181. function badPos(pos, bad) { if (bad) { pos.bad = true; } return pos }
  13182. function domTextBetween(cm, from, to, fromLine, toLine) {
  13183. var text = "", closing = false, lineSep = cm.doc.lineSeparator(), extraLinebreak = false;
  13184. function recognizeMarker(id) { return function (marker) { return marker.id == id; } }
  13185. function close() {
  13186. if (closing) {
  13187. text += lineSep;
  13188. if (extraLinebreak) { text += lineSep; }
  13189. closing = extraLinebreak = false;
  13190. }
  13191. }
  13192. function addText(str) {
  13193. if (str) {
  13194. close();
  13195. text += str;
  13196. }
  13197. }
  13198. function walk(node) {
  13199. if (node.nodeType == 1) {
  13200. var cmText = node.getAttribute("cm-text");
  13201. if (cmText) {
  13202. addText(cmText);
  13203. return
  13204. }
  13205. var markerID = node.getAttribute("cm-marker"), range;
  13206. if (markerID) {
  13207. var found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID));
  13208. if (found.length && (range = found[0].find(0)))
  13209. { addText(getBetween(cm.doc, range.from, range.to).join(lineSep)); }
  13210. return
  13211. }
  13212. if (node.getAttribute("contenteditable") == "false") { return }
  13213. var isBlock = /^(pre|div|p|li|table|br)$/i.test(node.nodeName);
  13214. if (!/^br$/i.test(node.nodeName) && node.textContent.length == 0) { return }
  13215. if (isBlock) { close(); }
  13216. for (var i = 0; i < node.childNodes.length; i++)
  13217. { walk(node.childNodes[i]); }
  13218. if (/^(pre|p)$/i.test(node.nodeName)) { extraLinebreak = true; }
  13219. if (isBlock) { closing = true; }
  13220. } else if (node.nodeType == 3) {
  13221. addText(node.nodeValue.replace(/\u200b/g, "").replace(/\u00a0/g, " "));
  13222. }
  13223. }
  13224. for (;;) {
  13225. walk(from);
  13226. if (from == to) { break }
  13227. from = from.nextSibling;
  13228. extraLinebreak = false;
  13229. }
  13230. return text
  13231. }
  13232. function domToPos(cm, node, offset) {
  13233. var lineNode;
  13234. if (node == cm.display.lineDiv) {
  13235. lineNode = cm.display.lineDiv.childNodes[offset];
  13236. if (!lineNode) { return badPos(cm.clipPos(Pos(cm.display.viewTo - 1)), true) }
  13237. node = null; offset = 0;
  13238. } else {
  13239. for (lineNode = node;; lineNode = lineNode.parentNode) {
  13240. if (!lineNode || lineNode == cm.display.lineDiv) { return null }
  13241. if (lineNode.parentNode && lineNode.parentNode == cm.display.lineDiv) { break }
  13242. }
  13243. }
  13244. for (var i = 0; i < cm.display.view.length; i++) {
  13245. var lineView = cm.display.view[i];
  13246. if (lineView.node == lineNode)
  13247. { return locateNodeInLineView(lineView, node, offset) }
  13248. }
  13249. }
  13250. function locateNodeInLineView(lineView, node, offset) {
  13251. var wrapper = lineView.text.firstChild, bad = false;
  13252. if (!node || !contains(wrapper, node)) { return badPos(Pos(lineNo(lineView.line), 0), true) }
  13253. if (node == wrapper) {
  13254. bad = true;
  13255. node = wrapper.childNodes[offset];
  13256. offset = 0;
  13257. if (!node) {
  13258. var line = lineView.rest ? lst(lineView.rest) : lineView.line;
  13259. return badPos(Pos(lineNo(line), line.text.length), bad)
  13260. }
  13261. }
  13262. var textNode = node.nodeType == 3 ? node : null, topNode = node;
  13263. if (!textNode && node.childNodes.length == 1 && node.firstChild.nodeType == 3) {
  13264. textNode = node.firstChild;
  13265. if (offset) { offset = textNode.nodeValue.length; }
  13266. }
  13267. while (topNode.parentNode != wrapper) { topNode = topNode.parentNode; }
  13268. var measure = lineView.measure, maps = measure.maps;
  13269. function find(textNode, topNode, offset) {
  13270. for (var i = -1; i < (maps ? maps.length : 0); i++) {
  13271. var map = i < 0 ? measure.map : maps[i];
  13272. for (var j = 0; j < map.length; j += 3) {
  13273. var curNode = map[j + 2];
  13274. if (curNode == textNode || curNode == topNode) {
  13275. var line = lineNo(i < 0 ? lineView.line : lineView.rest[i]);
  13276. var ch = map[j] + offset;
  13277. if (offset < 0 || curNode != textNode) { ch = map[j + (offset ? 1 : 0)]; }
  13278. return Pos(line, ch)
  13279. }
  13280. }
  13281. }
  13282. }
  13283. var found = find(textNode, topNode, offset);
  13284. if (found) { return badPos(found, bad) }
  13285. // FIXME this is all really shaky. might handle the few cases it needs to handle, but likely to cause problems
  13286. for (var after = topNode.nextSibling, dist = textNode ? textNode.nodeValue.length - offset : 0; after; after = after.nextSibling) {
  13287. found = find(after, after.firstChild, 0);
  13288. if (found)
  13289. { return badPos(Pos(found.line, found.ch - dist), bad) }
  13290. else
  13291. { dist += after.textContent.length; }
  13292. }
  13293. for (var before = topNode.previousSibling, dist$1 = offset; before; before = before.previousSibling) {
  13294. found = find(before, before.firstChild, -1);
  13295. if (found)
  13296. { return badPos(Pos(found.line, found.ch + dist$1), bad) }
  13297. else
  13298. { dist$1 += before.textContent.length; }
  13299. }
  13300. }
  13301. // TEXTAREA INPUT STYLE
  13302. var TextareaInput = function(cm) {
  13303. this.cm = cm;
  13304. // See input.poll and input.reset
  13305. this.prevInput = "";
  13306. // Flag that indicates whether we expect input to appear real soon
  13307. // now (after some event like 'keypress' or 'input') and are
  13308. // polling intensively.
  13309. this.pollingFast = false;
  13310. // Self-resetting timeout for the poller
  13311. this.polling = new Delayed();
  13312. // Used to work around IE issue with selection being forgotten when focus moves away from textarea
  13313. this.hasSelection = false;
  13314. this.composing = null;
  13315. };
  13316. TextareaInput.prototype.init = function (display) {
  13317. var this$1 = this;
  13318. var input = this, cm = this.cm;
  13319. this.createField(display);
  13320. var te = this.textarea;
  13321. display.wrapper.insertBefore(this.wrapper, display.wrapper.firstChild);
  13322. // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore)
  13323. if (ios) { te.style.width = "0px"; }
  13324. on(te, "input", function () {
  13325. if (ie && ie_version >= 9 && this$1.hasSelection) { this$1.hasSelection = null; }
  13326. input.poll();
  13327. });
  13328. on(te, "paste", function (e) {
  13329. if (signalDOMEvent(cm, e) || handlePaste(e, cm)) { return }
  13330. cm.state.pasteIncoming = +new Date;
  13331. input.fastPoll();
  13332. });
  13333. function prepareCopyCut(e) {
  13334. if (signalDOMEvent(cm, e)) { return }
  13335. if (cm.somethingSelected()) {
  13336. setLastCopied({lineWise: false, text: cm.getSelections()});
  13337. } else if (!cm.options.lineWiseCopyCut) {
  13338. return
  13339. } else {
  13340. var ranges = copyableRanges(cm);
  13341. setLastCopied({lineWise: true, text: ranges.text});
  13342. if (e.type == "cut") {
  13343. cm.setSelections(ranges.ranges, null, sel_dontScroll);
  13344. } else {
  13345. input.prevInput = "";
  13346. te.value = ranges.text.join("\n");
  13347. selectInput(te);
  13348. }
  13349. }
  13350. if (e.type == "cut") { cm.state.cutIncoming = +new Date; }
  13351. }
  13352. on(te, "cut", prepareCopyCut);
  13353. on(te, "copy", prepareCopyCut);
  13354. on(display.scroller, "paste", function (e) {
  13355. if (eventInWidget(display, e) || signalDOMEvent(cm, e)) { return }
  13356. if (!te.dispatchEvent) {
  13357. cm.state.pasteIncoming = +new Date;
  13358. input.focus();
  13359. return
  13360. }
  13361. // Pass the `paste` event to the textarea so it's handled by its event listener.
  13362. var event = new Event("paste");
  13363. event.clipboardData = e.clipboardData;
  13364. te.dispatchEvent(event);
  13365. });
  13366. // Prevent normal selection in the editor (we handle our own)
  13367. on(display.lineSpace, "selectstart", function (e) {
  13368. if (!eventInWidget(display, e)) { e_preventDefault(e); }
  13369. });
  13370. on(te, "compositionstart", function () {
  13371. var start = cm.getCursor("from");
  13372. if (input.composing) { input.composing.range.clear(); }
  13373. input.composing = {
  13374. start: start,
  13375. range: cm.markText(start, cm.getCursor("to"), {className: "CodeMirror-composing"})
  13376. };
  13377. });
  13378. on(te, "compositionend", function () {
  13379. if (input.composing) {
  13380. input.poll();
  13381. input.composing.range.clear();
  13382. input.composing = null;
  13383. }
  13384. });
  13385. };
  13386. TextareaInput.prototype.createField = function (_display) {
  13387. // Wraps and hides input textarea
  13388. this.wrapper = hiddenTextarea();
  13389. // The semihidden textarea that is focused when the editor is
  13390. // focused, and receives input.
  13391. this.textarea = this.wrapper.firstChild;
  13392. };
  13393. TextareaInput.prototype.screenReaderLabelChanged = function (label) {
  13394. // Label for screenreaders, accessibility
  13395. if(label) {
  13396. this.textarea.setAttribute('aria-label', label);
  13397. } else {
  13398. this.textarea.removeAttribute('aria-label');
  13399. }
  13400. };
  13401. TextareaInput.prototype.prepareSelection = function () {
  13402. // Redraw the selection and/or cursor
  13403. var cm = this.cm, display = cm.display, doc = cm.doc;
  13404. var result = prepareSelection(cm);
  13405. // Move the hidden textarea near the cursor to prevent scrolling artifacts
  13406. if (cm.options.moveInputWithCursor) {
  13407. var headPos = cursorCoords(cm, doc.sel.primary().head, "div");
  13408. var wrapOff = display.wrapper.getBoundingClientRect(), lineOff = display.lineDiv.getBoundingClientRect();
  13409. result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10,
  13410. headPos.top + lineOff.top - wrapOff.top));
  13411. result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10,
  13412. headPos.left + lineOff.left - wrapOff.left));
  13413. }
  13414. return result
  13415. };
  13416. TextareaInput.prototype.showSelection = function (drawn) {
  13417. var cm = this.cm, display = cm.display;
  13418. removeChildrenAndAdd(display.cursorDiv, drawn.cursors);
  13419. removeChildrenAndAdd(display.selectionDiv, drawn.selection);
  13420. if (drawn.teTop != null) {
  13421. this.wrapper.style.top = drawn.teTop + "px";
  13422. this.wrapper.style.left = drawn.teLeft + "px";
  13423. }
  13424. };
  13425. // Reset the input to correspond to the selection (or to be empty,
  13426. // when not typing and nothing is selected)
  13427. TextareaInput.prototype.reset = function (typing) {
  13428. if (this.contextMenuPending || this.composing) { return }
  13429. var cm = this.cm;
  13430. if (cm.somethingSelected()) {
  13431. this.prevInput = "";
  13432. var content = cm.getSelection();
  13433. this.textarea.value = content;
  13434. if (cm.state.focused) { selectInput(this.textarea); }
  13435. if (ie && ie_version >= 9) { this.hasSelection = content; }
  13436. } else if (!typing) {
  13437. this.prevInput = this.textarea.value = "";
  13438. if (ie && ie_version >= 9) { this.hasSelection = null; }
  13439. }
  13440. };
  13441. TextareaInput.prototype.getField = function () { return this.textarea };
  13442. TextareaInput.prototype.supportsTouch = function () { return false };
  13443. TextareaInput.prototype.focus = function () {
  13444. if (this.cm.options.readOnly != "nocursor" && (!mobile || activeElt() != this.textarea)) {
  13445. try { this.textarea.focus(); }
  13446. catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM
  13447. }
  13448. };
  13449. TextareaInput.prototype.blur = function () { this.textarea.blur(); };
  13450. TextareaInput.prototype.resetPosition = function () {
  13451. this.wrapper.style.top = this.wrapper.style.left = 0;
  13452. };
  13453. TextareaInput.prototype.receivedFocus = function () { this.slowPoll(); };
  13454. // Poll for input changes, using the normal rate of polling. This
  13455. // runs as long as the editor is focused.
  13456. TextareaInput.prototype.slowPoll = function () {
  13457. var this$1 = this;
  13458. if (this.pollingFast) { return }
  13459. this.polling.set(this.cm.options.pollInterval, function () {
  13460. this$1.poll();
  13461. if (this$1.cm.state.focused) { this$1.slowPoll(); }
  13462. });
  13463. };
  13464. // When an event has just come in that is likely to add or change
  13465. // something in the input textarea, we poll faster, to ensure that
  13466. // the change appears on the screen quickly.
  13467. TextareaInput.prototype.fastPoll = function () {
  13468. var missed = false, input = this;
  13469. input.pollingFast = true;
  13470. function p() {
  13471. var changed = input.poll();
  13472. if (!changed && !missed) {missed = true; input.polling.set(60, p);}
  13473. else {input.pollingFast = false; input.slowPoll();}
  13474. }
  13475. input.polling.set(20, p);
  13476. };
  13477. // Read input from the textarea, and update the document to match.
  13478. // When something is selected, it is present in the textarea, and
  13479. // selected (unless it is huge, in which case a placeholder is
  13480. // used). When nothing is selected, the cursor sits after previously
  13481. // seen text (can be empty), which is stored in prevInput (we must
  13482. // not reset the textarea when typing, because that breaks IME).
  13483. TextareaInput.prototype.poll = function () {
  13484. var this$1 = this;
  13485. var cm = this.cm, input = this.textarea, prevInput = this.prevInput;
  13486. // Since this is called a *lot*, try to bail out as cheaply as
  13487. // possible when it is clear that nothing happened. hasSelection
  13488. // will be the case when there is a lot of text in the textarea,
  13489. // in which case reading its value would be expensive.
  13490. if (this.contextMenuPending || !cm.state.focused ||
  13491. (hasSelection(input) && !prevInput && !this.composing) ||
  13492. cm.isReadOnly() || cm.options.disableInput || cm.state.keySeq)
  13493. { return false }
  13494. var text = input.value;
  13495. // If nothing changed, bail.
  13496. if (text == prevInput && !cm.somethingSelected()) { return false }
  13497. // Work around nonsensical selection resetting in IE9/10, and
  13498. // inexplicable appearance of private area unicode characters on
  13499. // some key combos in Mac (#2689).
  13500. if (ie && ie_version >= 9 && this.hasSelection === text ||
  13501. mac && /[\uf700-\uf7ff]/.test(text)) {
  13502. cm.display.input.reset();
  13503. return false
  13504. }
  13505. if (cm.doc.sel == cm.display.selForContextMenu) {
  13506. var first = text.charCodeAt(0);
  13507. if (first == 0x200b && !prevInput) { prevInput = "\u200b"; }
  13508. if (first == 0x21da) { this.reset(); return this.cm.execCommand("undo") }
  13509. }
  13510. // Find the part of the input that is actually new
  13511. var same = 0, l = Math.min(prevInput.length, text.length);
  13512. while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) { ++same; }
  13513. runInOp(cm, function () {
  13514. applyTextInput(cm, text.slice(same), prevInput.length - same,
  13515. null, this$1.composing ? "*compose" : null);
  13516. // Don't leave long text in the textarea, since it makes further polling slow
  13517. if (text.length > 1000 || text.indexOf("\n") > -1) { input.value = this$1.prevInput = ""; }
  13518. else { this$1.prevInput = text; }
  13519. if (this$1.composing) {
  13520. this$1.composing.range.clear();
  13521. this$1.composing.range = cm.markText(this$1.composing.start, cm.getCursor("to"),
  13522. {className: "CodeMirror-composing"});
  13523. }
  13524. });
  13525. return true
  13526. };
  13527. TextareaInput.prototype.ensurePolled = function () {
  13528. if (this.pollingFast && this.poll()) { this.pollingFast = false; }
  13529. };
  13530. TextareaInput.prototype.onKeyPress = function () {
  13531. if (ie && ie_version >= 9) { this.hasSelection = null; }
  13532. this.fastPoll();
  13533. };
  13534. TextareaInput.prototype.onContextMenu = function (e) {
  13535. var input = this, cm = input.cm, display = cm.display, te = input.textarea;
  13536. if (input.contextMenuPending) { input.contextMenuPending(); }
  13537. var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop;
  13538. if (!pos || presto) { return } // Opera is difficult.
  13539. // Reset the current text selection only if the click is done outside of the selection
  13540. // and 'resetSelectionOnContextMenu' option is true.
  13541. var reset = cm.options.resetSelectionOnContextMenu;
  13542. if (reset && cm.doc.sel.contains(pos) == -1)
  13543. { operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll); }
  13544. var oldCSS = te.style.cssText, oldWrapperCSS = input.wrapper.style.cssText;
  13545. var wrapperBox = input.wrapper.offsetParent.getBoundingClientRect();
  13546. input.wrapper.style.cssText = "position: static";
  13547. te.style.cssText = "position: absolute; width: 30px; height: 30px;\n top: " + (e.clientY - wrapperBox.top - 5) + "px; left: " + (e.clientX - wrapperBox.left - 5) + "px;\n z-index: 1000; background: " + (ie ? "rgba(255, 255, 255, .05)" : "transparent") + ";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";
  13548. var oldScrollY;
  13549. if (webkit) { oldScrollY = window.scrollY; } // Work around Chrome issue (#2712)
  13550. display.input.focus();
  13551. if (webkit) { window.scrollTo(null, oldScrollY); }
  13552. display.input.reset();
  13553. // Adds "Select all" to context menu in FF
  13554. if (!cm.somethingSelected()) { te.value = input.prevInput = " "; }
  13555. input.contextMenuPending = rehide;
  13556. display.selForContextMenu = cm.doc.sel;
  13557. clearTimeout(display.detectingSelectAll);
  13558. // Select-all will be greyed out if there's nothing to select, so
  13559. // this adds a zero-width space so that we can later check whether
  13560. // it got selected.
  13561. function prepareSelectAllHack() {
  13562. if (te.selectionStart != null) {
  13563. var selected = cm.somethingSelected();
  13564. var extval = "\u200b" + (selected ? te.value : "");
  13565. te.value = "\u21da"; // Used to catch context-menu undo
  13566. te.value = extval;
  13567. input.prevInput = selected ? "" : "\u200b";
  13568. te.selectionStart = 1; te.selectionEnd = extval.length;
  13569. // Re-set this, in case some other handler touched the
  13570. // selection in the meantime.
  13571. display.selForContextMenu = cm.doc.sel;
  13572. }
  13573. }
  13574. function rehide() {
  13575. if (input.contextMenuPending != rehide) { return }
  13576. input.contextMenuPending = false;
  13577. input.wrapper.style.cssText = oldWrapperCSS;
  13578. te.style.cssText = oldCSS;
  13579. if (ie && ie_version < 9) { display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos); }
  13580. // Try to detect the user choosing select-all
  13581. if (te.selectionStart != null) {
  13582. if (!ie || (ie && ie_version < 9)) { prepareSelectAllHack(); }
  13583. var i = 0, poll = function () {
  13584. if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0 &&
  13585. te.selectionEnd > 0 && input.prevInput == "\u200b") {
  13586. operation(cm, selectAll)(cm);
  13587. } else if (i++ < 10) {
  13588. display.detectingSelectAll = setTimeout(poll, 500);
  13589. } else {
  13590. display.selForContextMenu = null;
  13591. display.input.reset();
  13592. }
  13593. };
  13594. display.detectingSelectAll = setTimeout(poll, 200);
  13595. }
  13596. }
  13597. if (ie && ie_version >= 9) { prepareSelectAllHack(); }
  13598. if (captureRightClick) {
  13599. e_stop(e);
  13600. var mouseup = function () {
  13601. off(window, "mouseup", mouseup);
  13602. setTimeout(rehide, 20);
  13603. };
  13604. on(window, "mouseup", mouseup);
  13605. } else {
  13606. setTimeout(rehide, 50);
  13607. }
  13608. };
  13609. TextareaInput.prototype.readOnlyChanged = function (val) {
  13610. if (!val) { this.reset(); }
  13611. this.textarea.disabled = val == "nocursor";
  13612. this.textarea.readOnly = !!val;
  13613. };
  13614. TextareaInput.prototype.setUneditable = function () {};
  13615. TextareaInput.prototype.needsContentAttribute = false;
  13616. function fromTextArea(textarea, options) {
  13617. options = options ? copyObj(options) : {};
  13618. options.value = textarea.value;
  13619. if (!options.tabindex && textarea.tabIndex)
  13620. { options.tabindex = textarea.tabIndex; }
  13621. if (!options.placeholder && textarea.placeholder)
  13622. { options.placeholder = textarea.placeholder; }
  13623. // Set autofocus to true if this textarea is focused, or if it has
  13624. // autofocus and no other element is focused.
  13625. if (options.autofocus == null) {
  13626. var hasFocus = activeElt();
  13627. options.autofocus = hasFocus == textarea ||
  13628. textarea.getAttribute("autofocus") != null && hasFocus == document.body;
  13629. }
  13630. function save() {textarea.value = cm.getValue();}
  13631. var realSubmit;
  13632. if (textarea.form) {
  13633. on(textarea.form, "submit", save);
  13634. // Deplorable hack to make the submit method do the right thing.
  13635. if (!options.leaveSubmitMethodAlone) {
  13636. var form = textarea.form;
  13637. realSubmit = form.submit;
  13638. try {
  13639. var wrappedSubmit = form.submit = function () {
  13640. save();
  13641. form.submit = realSubmit;
  13642. form.submit();
  13643. form.submit = wrappedSubmit;
  13644. };
  13645. } catch(e) {}
  13646. }
  13647. }
  13648. options.finishInit = function (cm) {
  13649. cm.save = save;
  13650. cm.getTextArea = function () { return textarea; };
  13651. cm.toTextArea = function () {
  13652. cm.toTextArea = isNaN; // Prevent this from being ran twice
  13653. save();
  13654. textarea.parentNode.removeChild(cm.getWrapperElement());
  13655. textarea.style.display = "";
  13656. if (textarea.form) {
  13657. off(textarea.form, "submit", save);
  13658. if (!options.leaveSubmitMethodAlone && typeof textarea.form.submit == "function")
  13659. { textarea.form.submit = realSubmit; }
  13660. }
  13661. };
  13662. };
  13663. textarea.style.display = "none";
  13664. var cm = CodeMirror(function (node) { return textarea.parentNode.insertBefore(node, textarea.nextSibling); },
  13665. options);
  13666. return cm
  13667. }
  13668. function addLegacyProps(CodeMirror) {
  13669. CodeMirror.off = off;
  13670. CodeMirror.on = on;
  13671. CodeMirror.wheelEventPixels = wheelEventPixels;
  13672. CodeMirror.Doc = Doc;
  13673. CodeMirror.splitLines = splitLinesAuto;
  13674. CodeMirror.countColumn = countColumn;
  13675. CodeMirror.findColumn = findColumn;
  13676. CodeMirror.isWordChar = isWordCharBasic;
  13677. CodeMirror.Pass = Pass;
  13678. CodeMirror.signal = signal;
  13679. CodeMirror.Line = Line;
  13680. CodeMirror.changeEnd = changeEnd;
  13681. CodeMirror.scrollbarModel = scrollbarModel;
  13682. CodeMirror.Pos = Pos;
  13683. CodeMirror.cmpPos = cmp;
  13684. CodeMirror.modes = modes;
  13685. CodeMirror.mimeModes = mimeModes;
  13686. CodeMirror.resolveMode = resolveMode;
  13687. CodeMirror.getMode = getMode;
  13688. CodeMirror.modeExtensions = modeExtensions;
  13689. CodeMirror.extendMode = extendMode;
  13690. CodeMirror.copyState = copyState;
  13691. CodeMirror.startState = startState;
  13692. CodeMirror.innerMode = innerMode;
  13693. CodeMirror.commands = commands;
  13694. CodeMirror.keyMap = keyMap;
  13695. CodeMirror.keyName = keyName;
  13696. CodeMirror.isModifierKey = isModifierKey;
  13697. CodeMirror.lookupKey = lookupKey;
  13698. CodeMirror.normalizeKeyMap = normalizeKeyMap;
  13699. CodeMirror.StringStream = StringStream;
  13700. CodeMirror.SharedTextMarker = SharedTextMarker;
  13701. CodeMirror.TextMarker = TextMarker;
  13702. CodeMirror.LineWidget = LineWidget;
  13703. CodeMirror.e_preventDefault = e_preventDefault;
  13704. CodeMirror.e_stopPropagation = e_stopPropagation;
  13705. CodeMirror.e_stop = e_stop;
  13706. CodeMirror.addClass = addClass;
  13707. CodeMirror.contains = contains;
  13708. CodeMirror.rmClass = rmClass;
  13709. CodeMirror.keyNames = keyNames;
  13710. }
  13711. // EDITOR CONSTRUCTOR
  13712. defineOptions(CodeMirror);
  13713. addEditorMethods(CodeMirror);
  13714. // Set up methods on CodeMirror's prototype to redirect to the editor's document.
  13715. var dontDelegate = "iter insert remove copy getEditor constructor".split(" ");
  13716. for (var prop in Doc.prototype) { if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0)
  13717. { CodeMirror.prototype[prop] = (function(method) {
  13718. return function() {return method.apply(this.doc, arguments)}
  13719. })(Doc.prototype[prop]); } }
  13720. eventMixin(Doc);
  13721. CodeMirror.inputStyles = {"textarea": TextareaInput, "contenteditable": ContentEditableInput};
  13722. // Extra arguments are stored as the mode's dependencies, which is
  13723. // used by (legacy) mechanisms like loadmode.js to automatically
  13724. // load a mode. (Preferred mechanism is the require/define calls.)
  13725. CodeMirror.defineMode = function(name/*, mode, …*/) {
  13726. if (!CodeMirror.defaults.mode && name != "null") { CodeMirror.defaults.mode = name; }
  13727. defineMode.apply(this, arguments);
  13728. };
  13729. CodeMirror.defineMIME = defineMIME;
  13730. // Minimal default mode.
  13731. CodeMirror.defineMode("null", function () { return ({token: function (stream) { return stream.skipToEnd(); }}); });
  13732. CodeMirror.defineMIME("text/plain", "null");
  13733. // EXTENSIONS
  13734. CodeMirror.defineExtension = function (name, func) {
  13735. CodeMirror.prototype[name] = func;
  13736. };
  13737. CodeMirror.defineDocExtension = function (name, func) {
  13738. Doc.prototype[name] = func;
  13739. };
  13740. CodeMirror.fromTextArea = fromTextArea;
  13741. addLegacyProps(CodeMirror);
  13742. CodeMirror.version = "5.65.2";
  13743. return CodeMirror;
  13744. })));
  13745. /***/ }),
  13746. /***/ 99762:
  13747. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  13748. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  13749. // Distributed under an MIT license: https://codemirror.net/LICENSE
  13750. (function(mod) {
  13751. if (true) // CommonJS
  13752. mod(__webpack_require__(4631));
  13753. else {}
  13754. })(function(CodeMirror) {
  13755. "use strict";
  13756. function Context(indented, column, type, info, align, prev) {
  13757. this.indented = indented;
  13758. this.column = column;
  13759. this.type = type;
  13760. this.info = info;
  13761. this.align = align;
  13762. this.prev = prev;
  13763. }
  13764. function pushContext(state, col, type, info) {
  13765. var indent = state.indented;
  13766. if (state.context && state.context.type == "statement" && type != "statement")
  13767. indent = state.context.indented;
  13768. return state.context = new Context(indent, col, type, info, null, state.context);
  13769. }
  13770. function popContext(state) {
  13771. var t = state.context.type;
  13772. if (t == ")" || t == "]" || t == "}")
  13773. state.indented = state.context.indented;
  13774. return state.context = state.context.prev;
  13775. }
  13776. function typeBefore(stream, state, pos) {
  13777. if (state.prevToken == "variable" || state.prevToken == "type") return true;
  13778. if (/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(stream.string.slice(0, pos))) return true;
  13779. if (state.typeAtEndOfLine && stream.column() == stream.indentation()) return true;
  13780. }
  13781. function isTopScope(context) {
  13782. for (;;) {
  13783. if (!context || context.type == "top") return true;
  13784. if (context.type == "}" && context.prev.info != "namespace") return false;
  13785. context = context.prev;
  13786. }
  13787. }
  13788. CodeMirror.defineMode("clike", function(config, parserConfig) {
  13789. var indentUnit = config.indentUnit,
  13790. statementIndentUnit = parserConfig.statementIndentUnit || indentUnit,
  13791. dontAlignCalls = parserConfig.dontAlignCalls,
  13792. keywords = parserConfig.keywords || {},
  13793. types = parserConfig.types || {},
  13794. builtin = parserConfig.builtin || {},
  13795. blockKeywords = parserConfig.blockKeywords || {},
  13796. defKeywords = parserConfig.defKeywords || {},
  13797. atoms = parserConfig.atoms || {},
  13798. hooks = parserConfig.hooks || {},
  13799. multiLineStrings = parserConfig.multiLineStrings,
  13800. indentStatements = parserConfig.indentStatements !== false,
  13801. indentSwitch = parserConfig.indentSwitch !== false,
  13802. namespaceSeparator = parserConfig.namespaceSeparator,
  13803. isPunctuationChar = parserConfig.isPunctuationChar || /[\[\]{}\(\),;\:\.]/,
  13804. numberStart = parserConfig.numberStart || /[\d\.]/,
  13805. number = parserConfig.number || /^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,
  13806. isOperatorChar = parserConfig.isOperatorChar || /[+\-*&%=<>!?|\/]/,
  13807. isIdentifierChar = parserConfig.isIdentifierChar || /[\w\$_\xa1-\uffff]/,
  13808. // An optional function that takes a {string} token and returns true if it
  13809. // should be treated as a builtin.
  13810. isReservedIdentifier = parserConfig.isReservedIdentifier || false;
  13811. var curPunc, isDefKeyword;
  13812. function tokenBase(stream, state) {
  13813. var ch = stream.next();
  13814. if (hooks[ch]) {
  13815. var result = hooks[ch](stream, state);
  13816. if (result !== false) return result;
  13817. }
  13818. if (ch == '"' || ch == "'") {
  13819. state.tokenize = tokenString(ch);
  13820. return state.tokenize(stream, state);
  13821. }
  13822. if (numberStart.test(ch)) {
  13823. stream.backUp(1)
  13824. if (stream.match(number)) return "number"
  13825. stream.next()
  13826. }
  13827. if (isPunctuationChar.test(ch)) {
  13828. curPunc = ch;
  13829. return null;
  13830. }
  13831. if (ch == "/") {
  13832. if (stream.eat("*")) {
  13833. state.tokenize = tokenComment;
  13834. return tokenComment(stream, state);
  13835. }
  13836. if (stream.eat("/")) {
  13837. stream.skipToEnd();
  13838. return "comment";
  13839. }
  13840. }
  13841. if (isOperatorChar.test(ch)) {
  13842. while (!stream.match(/^\/[\/*]/, false) && stream.eat(isOperatorChar)) {}
  13843. return "operator";
  13844. }
  13845. stream.eatWhile(isIdentifierChar);
  13846. if (namespaceSeparator) while (stream.match(namespaceSeparator))
  13847. stream.eatWhile(isIdentifierChar);
  13848. var cur = stream.current();
  13849. if (contains(keywords, cur)) {
  13850. if (contains(blockKeywords, cur)) curPunc = "newstatement";
  13851. if (contains(defKeywords, cur)) isDefKeyword = true;
  13852. return "keyword";
  13853. }
  13854. if (contains(types, cur)) return "type";
  13855. if (contains(builtin, cur)
  13856. || (isReservedIdentifier && isReservedIdentifier(cur))) {
  13857. if (contains(blockKeywords, cur)) curPunc = "newstatement";
  13858. return "builtin";
  13859. }
  13860. if (contains(atoms, cur)) return "atom";
  13861. return "variable";
  13862. }
  13863. function tokenString(quote) {
  13864. return function(stream, state) {
  13865. var escaped = false, next, end = false;
  13866. while ((next = stream.next()) != null) {
  13867. if (next == quote && !escaped) {end = true; break;}
  13868. escaped = !escaped && next == "\\";
  13869. }
  13870. if (end || !(escaped || multiLineStrings))
  13871. state.tokenize = null;
  13872. return "string";
  13873. };
  13874. }
  13875. function tokenComment(stream, state) {
  13876. var maybeEnd = false, ch;
  13877. while (ch = stream.next()) {
  13878. if (ch == "/" && maybeEnd) {
  13879. state.tokenize = null;
  13880. break;
  13881. }
  13882. maybeEnd = (ch == "*");
  13883. }
  13884. return "comment";
  13885. }
  13886. function maybeEOL(stream, state) {
  13887. if (parserConfig.typeFirstDefinitions && stream.eol() && isTopScope(state.context))
  13888. state.typeAtEndOfLine = typeBefore(stream, state, stream.pos)
  13889. }
  13890. // Interface
  13891. return {
  13892. startState: function(basecolumn) {
  13893. return {
  13894. tokenize: null,
  13895. context: new Context((basecolumn || 0) - indentUnit, 0, "top", null, false),
  13896. indented: 0,
  13897. startOfLine: true,
  13898. prevToken: null
  13899. };
  13900. },
  13901. token: function(stream, state) {
  13902. var ctx = state.context;
  13903. if (stream.sol()) {
  13904. if (ctx.align == null) ctx.align = false;
  13905. state.indented = stream.indentation();
  13906. state.startOfLine = true;
  13907. }
  13908. if (stream.eatSpace()) { maybeEOL(stream, state); return null; }
  13909. curPunc = isDefKeyword = null;
  13910. var style = (state.tokenize || tokenBase)(stream, state);
  13911. if (style == "comment" || style == "meta") return style;
  13912. if (ctx.align == null) ctx.align = true;
  13913. if (curPunc == ";" || curPunc == ":" || (curPunc == "," && stream.match(/^\s*(?:\/\/.*)?$/, false)))
  13914. while (state.context.type == "statement") popContext(state);
  13915. else if (curPunc == "{") pushContext(state, stream.column(), "}");
  13916. else if (curPunc == "[") pushContext(state, stream.column(), "]");
  13917. else if (curPunc == "(") pushContext(state, stream.column(), ")");
  13918. else if (curPunc == "}") {
  13919. while (ctx.type == "statement") ctx = popContext(state);
  13920. if (ctx.type == "}") ctx = popContext(state);
  13921. while (ctx.type == "statement") ctx = popContext(state);
  13922. }
  13923. else if (curPunc == ctx.type) popContext(state);
  13924. else if (indentStatements &&
  13925. (((ctx.type == "}" || ctx.type == "top") && curPunc != ";") ||
  13926. (ctx.type == "statement" && curPunc == "newstatement"))) {
  13927. pushContext(state, stream.column(), "statement", stream.current());
  13928. }
  13929. if (style == "variable" &&
  13930. ((state.prevToken == "def" ||
  13931. (parserConfig.typeFirstDefinitions && typeBefore(stream, state, stream.start) &&
  13932. isTopScope(state.context) && stream.match(/^\s*\(/, false)))))
  13933. style = "def";
  13934. if (hooks.token) {
  13935. var result = hooks.token(stream, state, style);
  13936. if (result !== undefined) style = result;
  13937. }
  13938. if (style == "def" && parserConfig.styleDefs === false) style = "variable";
  13939. state.startOfLine = false;
  13940. state.prevToken = isDefKeyword ? "def" : style || curPunc;
  13941. maybeEOL(stream, state);
  13942. return style;
  13943. },
  13944. indent: function(state, textAfter) {
  13945. if (state.tokenize != tokenBase && state.tokenize != null || state.typeAtEndOfLine) return CodeMirror.Pass;
  13946. var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);
  13947. var closing = firstChar == ctx.type;
  13948. if (ctx.type == "statement" && firstChar == "}") ctx = ctx.prev;
  13949. if (parserConfig.dontIndentStatements)
  13950. while (ctx.type == "statement" && parserConfig.dontIndentStatements.test(ctx.info))
  13951. ctx = ctx.prev
  13952. if (hooks.indent) {
  13953. var hook = hooks.indent(state, ctx, textAfter, indentUnit);
  13954. if (typeof hook == "number") return hook
  13955. }
  13956. var switchBlock = ctx.prev && ctx.prev.info == "switch";
  13957. if (parserConfig.allmanIndentation && /[{(]/.test(firstChar)) {
  13958. while (ctx.type != "top" && ctx.type != "}") ctx = ctx.prev
  13959. return ctx.indented
  13960. }
  13961. if (ctx.type == "statement")
  13962. return ctx.indented + (firstChar == "{" ? 0 : statementIndentUnit);
  13963. if (ctx.align && (!dontAlignCalls || ctx.type != ")"))
  13964. return ctx.column + (closing ? 0 : 1);
  13965. if (ctx.type == ")" && !closing)
  13966. return ctx.indented + statementIndentUnit;
  13967. return ctx.indented + (closing ? 0 : indentUnit) +
  13968. (!closing && switchBlock && !/^(?:case|default)\b/.test(textAfter) ? indentUnit : 0);
  13969. },
  13970. electricInput: indentSwitch ? /^\s*(?:case .*?:|default:|\{\}?|\})$/ : /^\s*[{}]$/,
  13971. blockCommentStart: "/*",
  13972. blockCommentEnd: "*/",
  13973. blockCommentContinue: " * ",
  13974. lineComment: "//",
  13975. fold: "brace"
  13976. };
  13977. });
  13978. function words(str) {
  13979. var obj = {}, words = str.split(" ");
  13980. for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
  13981. return obj;
  13982. }
  13983. function contains(words, word) {
  13984. if (typeof words === "function") {
  13985. return words(word);
  13986. } else {
  13987. return words.propertyIsEnumerable(word);
  13988. }
  13989. }
  13990. var cKeywords = "auto if break case register continue return default do sizeof " +
  13991. "static else struct switch extern typedef union for goto while enum const " +
  13992. "volatile inline restrict asm fortran";
  13993. // Keywords from https://en.cppreference.com/w/cpp/keyword includes C++20.
  13994. var cppKeywords = "alignas alignof and and_eq audit axiom bitand bitor catch " +
  13995. "class compl concept constexpr const_cast decltype delete dynamic_cast " +
  13996. "explicit export final friend import module mutable namespace new noexcept " +
  13997. "not not_eq operator or or_eq override private protected public " +
  13998. "reinterpret_cast requires static_assert static_cast template this " +
  13999. "thread_local throw try typeid typename using virtual xor xor_eq";
  14000. var objCKeywords = "bycopy byref in inout oneway out self super atomic nonatomic retain copy " +
  14001. "readwrite readonly strong weak assign typeof nullable nonnull null_resettable _cmd " +
  14002. "@interface @implementation @end @protocol @encode @property @synthesize @dynamic @class " +
  14003. "@public @package @private @protected @required @optional @try @catch @finally @import " +
  14004. "@selector @encode @defs @synchronized @autoreleasepool @compatibility_alias @available";
  14005. var objCBuiltins = "FOUNDATION_EXPORT FOUNDATION_EXTERN NS_INLINE NS_FORMAT_FUNCTION " +
  14006. " NS_RETURNS_RETAINEDNS_ERROR_ENUM NS_RETURNS_NOT_RETAINED NS_RETURNS_INNER_POINTER " +
  14007. "NS_DESIGNATED_INITIALIZER NS_ENUM NS_OPTIONS NS_REQUIRES_NIL_TERMINATION " +
  14008. "NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_SWIFT_NAME NS_REFINED_FOR_SWIFT"
  14009. // Do not use this. Use the cTypes function below. This is global just to avoid
  14010. // excessive calls when cTypes is being called multiple times during a parse.
  14011. var basicCTypes = words("int long char short double float unsigned signed " +
  14012. "void bool");
  14013. // Do not use this. Use the objCTypes function below. This is global just to avoid
  14014. // excessive calls when objCTypes is being called multiple times during a parse.
  14015. var basicObjCTypes = words("SEL instancetype id Class Protocol BOOL");
  14016. // Returns true if identifier is a "C" type.
  14017. // C type is defined as those that are reserved by the compiler (basicTypes),
  14018. // and those that end in _t (Reserved by POSIX for types)
  14019. // http://www.gnu.org/software/libc/manual/html_node/Reserved-Names.html
  14020. function cTypes(identifier) {
  14021. return contains(basicCTypes, identifier) || /.+_t$/.test(identifier);
  14022. }
  14023. // Returns true if identifier is a "Objective C" type.
  14024. function objCTypes(identifier) {
  14025. return cTypes(identifier) || contains(basicObjCTypes, identifier);
  14026. }
  14027. var cBlockKeywords = "case do else for if switch while struct enum union";
  14028. var cDefKeywords = "struct enum union";
  14029. function cppHook(stream, state) {
  14030. if (!state.startOfLine) return false
  14031. for (var ch, next = null; ch = stream.peek();) {
  14032. if (ch == "\\" && stream.match(/^.$/)) {
  14033. next = cppHook
  14034. break
  14035. } else if (ch == "/" && stream.match(/^\/[\/\*]/, false)) {
  14036. break
  14037. }
  14038. stream.next()
  14039. }
  14040. state.tokenize = next
  14041. return "meta"
  14042. }
  14043. function pointerHook(_stream, state) {
  14044. if (state.prevToken == "type") return "type";
  14045. return false;
  14046. }
  14047. // For C and C++ (and ObjC): identifiers starting with __
  14048. // or _ followed by a capital letter are reserved for the compiler.
  14049. function cIsReservedIdentifier(token) {
  14050. if (!token || token.length < 2) return false;
  14051. if (token[0] != '_') return false;
  14052. return (token[1] == '_') || (token[1] !== token[1].toLowerCase());
  14053. }
  14054. function cpp14Literal(stream) {
  14055. stream.eatWhile(/[\w\.']/);
  14056. return "number";
  14057. }
  14058. function cpp11StringHook(stream, state) {
  14059. stream.backUp(1);
  14060. // Raw strings.
  14061. if (stream.match(/^(?:R|u8R|uR|UR|LR)/)) {
  14062. var match = stream.match(/^"([^\s\\()]{0,16})\(/);
  14063. if (!match) {
  14064. return false;
  14065. }
  14066. state.cpp11RawStringDelim = match[1];
  14067. state.tokenize = tokenRawString;
  14068. return tokenRawString(stream, state);
  14069. }
  14070. // Unicode strings/chars.
  14071. if (stream.match(/^(?:u8|u|U|L)/)) {
  14072. if (stream.match(/^["']/, /* eat */ false)) {
  14073. return "string";
  14074. }
  14075. return false;
  14076. }
  14077. // Ignore this hook.
  14078. stream.next();
  14079. return false;
  14080. }
  14081. function cppLooksLikeConstructor(word) {
  14082. var lastTwo = /(\w+)::~?(\w+)$/.exec(word);
  14083. return lastTwo && lastTwo[1] == lastTwo[2];
  14084. }
  14085. // C#-style strings where "" escapes a quote.
  14086. function tokenAtString(stream, state) {
  14087. var next;
  14088. while ((next = stream.next()) != null) {
  14089. if (next == '"' && !stream.eat('"')) {
  14090. state.tokenize = null;
  14091. break;
  14092. }
  14093. }
  14094. return "string";
  14095. }
  14096. // C++11 raw string literal is <prefix>"<delim>( anything )<delim>", where
  14097. // <delim> can be a string up to 16 characters long.
  14098. function tokenRawString(stream, state) {
  14099. // Escape characters that have special regex meanings.
  14100. var delim = state.cpp11RawStringDelim.replace(/[^\w\s]/g, '\\$&');
  14101. var match = stream.match(new RegExp(".*?\\)" + delim + '"'));
  14102. if (match)
  14103. state.tokenize = null;
  14104. else
  14105. stream.skipToEnd();
  14106. return "string";
  14107. }
  14108. function def(mimes, mode) {
  14109. if (typeof mimes == "string") mimes = [mimes];
  14110. var words = [];
  14111. function add(obj) {
  14112. if (obj) for (var prop in obj) if (obj.hasOwnProperty(prop))
  14113. words.push(prop);
  14114. }
  14115. add(mode.keywords);
  14116. add(mode.types);
  14117. add(mode.builtin);
  14118. add(mode.atoms);
  14119. if (words.length) {
  14120. mode.helperType = mimes[0];
  14121. CodeMirror.registerHelper("hintWords", mimes[0], words);
  14122. }
  14123. for (var i = 0; i < mimes.length; ++i)
  14124. CodeMirror.defineMIME(mimes[i], mode);
  14125. }
  14126. def(["text/x-csrc", "text/x-c", "text/x-chdr"], {
  14127. name: "clike",
  14128. keywords: words(cKeywords),
  14129. types: cTypes,
  14130. blockKeywords: words(cBlockKeywords),
  14131. defKeywords: words(cDefKeywords),
  14132. typeFirstDefinitions: true,
  14133. atoms: words("NULL true false"),
  14134. isReservedIdentifier: cIsReservedIdentifier,
  14135. hooks: {
  14136. "#": cppHook,
  14137. "*": pointerHook,
  14138. },
  14139. modeProps: {fold: ["brace", "include"]}
  14140. });
  14141. def(["text/x-c++src", "text/x-c++hdr"], {
  14142. name: "clike",
  14143. keywords: words(cKeywords + " " + cppKeywords),
  14144. types: cTypes,
  14145. blockKeywords: words(cBlockKeywords + " class try catch"),
  14146. defKeywords: words(cDefKeywords + " class namespace"),
  14147. typeFirstDefinitions: true,
  14148. atoms: words("true false NULL nullptr"),
  14149. dontIndentStatements: /^template$/,
  14150. isIdentifierChar: /[\w\$_~\xa1-\uffff]/,
  14151. isReservedIdentifier: cIsReservedIdentifier,
  14152. hooks: {
  14153. "#": cppHook,
  14154. "*": pointerHook,
  14155. "u": cpp11StringHook,
  14156. "U": cpp11StringHook,
  14157. "L": cpp11StringHook,
  14158. "R": cpp11StringHook,
  14159. "0": cpp14Literal,
  14160. "1": cpp14Literal,
  14161. "2": cpp14Literal,
  14162. "3": cpp14Literal,
  14163. "4": cpp14Literal,
  14164. "5": cpp14Literal,
  14165. "6": cpp14Literal,
  14166. "7": cpp14Literal,
  14167. "8": cpp14Literal,
  14168. "9": cpp14Literal,
  14169. token: function(stream, state, style) {
  14170. if (style == "variable" && stream.peek() == "(" &&
  14171. (state.prevToken == ";" || state.prevToken == null ||
  14172. state.prevToken == "}") &&
  14173. cppLooksLikeConstructor(stream.current()))
  14174. return "def";
  14175. }
  14176. },
  14177. namespaceSeparator: "::",
  14178. modeProps: {fold: ["brace", "include"]}
  14179. });
  14180. def("text/x-java", {
  14181. name: "clike",
  14182. keywords: words("abstract assert break case catch class const continue default " +
  14183. "do else enum extends final finally for goto if implements import " +
  14184. "instanceof interface native new package private protected public " +
  14185. "return static strictfp super switch synchronized this throw throws transient " +
  14186. "try volatile while @interface"),
  14187. types: words("var byte short int long float double boolean char void Boolean Byte Character Double Float " +
  14188. "Integer Long Number Object Short String StringBuffer StringBuilder Void"),
  14189. blockKeywords: words("catch class do else finally for if switch try while"),
  14190. defKeywords: words("class interface enum @interface"),
  14191. typeFirstDefinitions: true,
  14192. atoms: words("true false null"),
  14193. number: /^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,
  14194. hooks: {
  14195. "@": function(stream) {
  14196. // Don't match the @interface keyword.
  14197. if (stream.match('interface', false)) return false;
  14198. stream.eatWhile(/[\w\$_]/);
  14199. return "meta";
  14200. },
  14201. '"': function(stream, state) {
  14202. if (!stream.match('""\n')) return false;
  14203. state.tokenize = tokenTripleString;
  14204. return state.tokenize(stream, state);
  14205. }
  14206. },
  14207. modeProps: {fold: ["brace", "import"]}
  14208. });
  14209. def("text/x-csharp", {
  14210. name: "clike",
  14211. keywords: words("abstract as async await base break case catch checked class const continue" +
  14212. " default delegate do else enum event explicit extern finally fixed for" +
  14213. " foreach goto if implicit in interface internal is lock namespace new" +
  14214. " operator out override params private protected public readonly ref return sealed" +
  14215. " sizeof stackalloc static struct switch this throw try typeof unchecked" +
  14216. " unsafe using virtual void volatile while add alias ascending descending dynamic from get" +
  14217. " global group into join let orderby partial remove select set value var yield"),
  14218. types: words("Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func" +
  14219. " Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32" +
  14220. " UInt64 bool byte char decimal double short int long object" +
  14221. " sbyte float string ushort uint ulong"),
  14222. blockKeywords: words("catch class do else finally for foreach if struct switch try while"),
  14223. defKeywords: words("class interface namespace struct var"),
  14224. typeFirstDefinitions: true,
  14225. atoms: words("true false null"),
  14226. hooks: {
  14227. "@": function(stream, state) {
  14228. if (stream.eat('"')) {
  14229. state.tokenize = tokenAtString;
  14230. return tokenAtString(stream, state);
  14231. }
  14232. stream.eatWhile(/[\w\$_]/);
  14233. return "meta";
  14234. }
  14235. }
  14236. });
  14237. function tokenTripleString(stream, state) {
  14238. var escaped = false;
  14239. while (!stream.eol()) {
  14240. if (!escaped && stream.match('"""')) {
  14241. state.tokenize = null;
  14242. break;
  14243. }
  14244. escaped = stream.next() == "\\" && !escaped;
  14245. }
  14246. return "string";
  14247. }
  14248. function tokenNestedComment(depth) {
  14249. return function (stream, state) {
  14250. var ch
  14251. while (ch = stream.next()) {
  14252. if (ch == "*" && stream.eat("/")) {
  14253. if (depth == 1) {
  14254. state.tokenize = null
  14255. break
  14256. } else {
  14257. state.tokenize = tokenNestedComment(depth - 1)
  14258. return state.tokenize(stream, state)
  14259. }
  14260. } else if (ch == "/" && stream.eat("*")) {
  14261. state.tokenize = tokenNestedComment(depth + 1)
  14262. return state.tokenize(stream, state)
  14263. }
  14264. }
  14265. return "comment"
  14266. }
  14267. }
  14268. def("text/x-scala", {
  14269. name: "clike",
  14270. keywords: words(
  14271. /* scala */
  14272. "abstract case catch class def do else extends final finally for forSome if " +
  14273. "implicit import lazy match new null object override package private protected return " +
  14274. "sealed super this throw trait try type val var while with yield _ " +
  14275. /* package scala */
  14276. "assert assume require print println printf readLine readBoolean readByte readShort " +
  14277. "readChar readInt readLong readFloat readDouble"
  14278. ),
  14279. types: words(
  14280. "AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either " +
  14281. "Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable " +
  14282. "Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering " +
  14283. "Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder " +
  14284. "StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector " +
  14285. /* package java.lang */
  14286. "Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable " +
  14287. "Compiler Double Exception Float Integer Long Math Number Object Package Pair Process " +
  14288. "Runtime Runnable SecurityManager Short StackTraceElement StrictMath String " +
  14289. "StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"
  14290. ),
  14291. multiLineStrings: true,
  14292. blockKeywords: words("catch class enum do else finally for forSome if match switch try while"),
  14293. defKeywords: words("class enum def object package trait type val var"),
  14294. atoms: words("true false null"),
  14295. indentStatements: false,
  14296. indentSwitch: false,
  14297. isOperatorChar: /[+\-*&%=<>!?|\/#:@]/,
  14298. hooks: {
  14299. "@": function(stream) {
  14300. stream.eatWhile(/[\w\$_]/);
  14301. return "meta";
  14302. },
  14303. '"': function(stream, state) {
  14304. if (!stream.match('""')) return false;
  14305. state.tokenize = tokenTripleString;
  14306. return state.tokenize(stream, state);
  14307. },
  14308. "'": function(stream) {
  14309. stream.eatWhile(/[\w\$_\xa1-\uffff]/);
  14310. return "atom";
  14311. },
  14312. "=": function(stream, state) {
  14313. var cx = state.context
  14314. if (cx.type == "}" && cx.align && stream.eat(">")) {
  14315. state.context = new Context(cx.indented, cx.column, cx.type, cx.info, null, cx.prev)
  14316. return "operator"
  14317. } else {
  14318. return false
  14319. }
  14320. },
  14321. "/": function(stream, state) {
  14322. if (!stream.eat("*")) return false
  14323. state.tokenize = tokenNestedComment(1)
  14324. return state.tokenize(stream, state)
  14325. }
  14326. },
  14327. modeProps: {closeBrackets: {pairs: '()[]{}""', triples: '"'}}
  14328. });
  14329. function tokenKotlinString(tripleString){
  14330. return function (stream, state) {
  14331. var escaped = false, next, end = false;
  14332. while (!stream.eol()) {
  14333. if (!tripleString && !escaped && stream.match('"') ) {end = true; break;}
  14334. if (tripleString && stream.match('"""')) {end = true; break;}
  14335. next = stream.next();
  14336. if(!escaped && next == "$" && stream.match('{'))
  14337. stream.skipTo("}");
  14338. escaped = !escaped && next == "\\" && !tripleString;
  14339. }
  14340. if (end || !tripleString)
  14341. state.tokenize = null;
  14342. return "string";
  14343. }
  14344. }
  14345. def("text/x-kotlin", {
  14346. name: "clike",
  14347. keywords: words(
  14348. /*keywords*/
  14349. "package as typealias class interface this super val operator " +
  14350. "var fun for is in This throw return annotation " +
  14351. "break continue object if else while do try when !in !is as? " +
  14352. /*soft keywords*/
  14353. "file import where by get set abstract enum open inner override private public internal " +
  14354. "protected catch finally out final vararg reified dynamic companion constructor init " +
  14355. "sealed field property receiver param sparam lateinit data inline noinline tailrec " +
  14356. "external annotation crossinline const operator infix suspend actual expect setparam value"
  14357. ),
  14358. types: words(
  14359. /* package java.lang */
  14360. "Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable " +
  14361. "Compiler Double Exception Float Integer Long Math Number Object Package Pair Process " +
  14362. "Runtime Runnable SecurityManager Short StackTraceElement StrictMath String " +
  14363. "StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray " +
  14364. "ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy " +
  14365. "LazyThreadSafetyMode LongArray Nothing ShortArray Unit"
  14366. ),
  14367. intendSwitch: false,
  14368. indentStatements: false,
  14369. multiLineStrings: true,
  14370. number: /^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,
  14371. blockKeywords: words("catch class do else finally for if where try while enum"),
  14372. defKeywords: words("class val var object interface fun"),
  14373. atoms: words("true false null this"),
  14374. hooks: {
  14375. "@": function(stream) {
  14376. stream.eatWhile(/[\w\$_]/);
  14377. return "meta";
  14378. },
  14379. '*': function(_stream, state) {
  14380. return state.prevToken == '.' ? 'variable' : 'operator';
  14381. },
  14382. '"': function(stream, state) {
  14383. state.tokenize = tokenKotlinString(stream.match('""'));
  14384. return state.tokenize(stream, state);
  14385. },
  14386. "/": function(stream, state) {
  14387. if (!stream.eat("*")) return false;
  14388. state.tokenize = tokenNestedComment(1);
  14389. return state.tokenize(stream, state)
  14390. },
  14391. indent: function(state, ctx, textAfter, indentUnit) {
  14392. var firstChar = textAfter && textAfter.charAt(0);
  14393. if ((state.prevToken == "}" || state.prevToken == ")") && textAfter == "")
  14394. return state.indented;
  14395. if ((state.prevToken == "operator" && textAfter != "}" && state.context.type != "}") ||
  14396. state.prevToken == "variable" && firstChar == "." ||
  14397. (state.prevToken == "}" || state.prevToken == ")") && firstChar == ".")
  14398. return indentUnit * 2 + ctx.indented;
  14399. if (ctx.align && ctx.type == "}")
  14400. return ctx.indented + (state.context.type == (textAfter || "").charAt(0) ? 0 : indentUnit);
  14401. }
  14402. },
  14403. modeProps: {closeBrackets: {triples: '"'}}
  14404. });
  14405. def(["x-shader/x-vertex", "x-shader/x-fragment"], {
  14406. name: "clike",
  14407. keywords: words("sampler1D sampler2D sampler3D samplerCube " +
  14408. "sampler1DShadow sampler2DShadow " +
  14409. "const attribute uniform varying " +
  14410. "break continue discard return " +
  14411. "for while do if else struct " +
  14412. "in out inout"),
  14413. types: words("float int bool void " +
  14414. "vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 " +
  14415. "mat2 mat3 mat4"),
  14416. blockKeywords: words("for while do if else struct"),
  14417. builtin: words("radians degrees sin cos tan asin acos atan " +
  14418. "pow exp log exp2 sqrt inversesqrt " +
  14419. "abs sign floor ceil fract mod min max clamp mix step smoothstep " +
  14420. "length distance dot cross normalize ftransform faceforward " +
  14421. "reflect refract matrixCompMult " +
  14422. "lessThan lessThanEqual greaterThan greaterThanEqual " +
  14423. "equal notEqual any all not " +
  14424. "texture1D texture1DProj texture1DLod texture1DProjLod " +
  14425. "texture2D texture2DProj texture2DLod texture2DProjLod " +
  14426. "texture3D texture3DProj texture3DLod texture3DProjLod " +
  14427. "textureCube textureCubeLod " +
  14428. "shadow1D shadow2D shadow1DProj shadow2DProj " +
  14429. "shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod " +
  14430. "dFdx dFdy fwidth " +
  14431. "noise1 noise2 noise3 noise4"),
  14432. atoms: words("true false " +
  14433. "gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex " +
  14434. "gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 " +
  14435. "gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 " +
  14436. "gl_FogCoord gl_PointCoord " +
  14437. "gl_Position gl_PointSize gl_ClipVertex " +
  14438. "gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor " +
  14439. "gl_TexCoord gl_FogFragCoord " +
  14440. "gl_FragCoord gl_FrontFacing " +
  14441. "gl_FragData gl_FragDepth " +
  14442. "gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix " +
  14443. "gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse " +
  14444. "gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse " +
  14445. "gl_TextureMatrixTranspose gl_ModelViewMatrixInverseTranspose " +
  14446. "gl_ProjectionMatrixInverseTranspose " +
  14447. "gl_ModelViewProjectionMatrixInverseTranspose " +
  14448. "gl_TextureMatrixInverseTranspose " +
  14449. "gl_NormalScale gl_DepthRange gl_ClipPlane " +
  14450. "gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel " +
  14451. "gl_FrontLightModelProduct gl_BackLightModelProduct " +
  14452. "gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ " +
  14453. "gl_FogParameters " +
  14454. "gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords " +
  14455. "gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats " +
  14456. "gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits " +
  14457. "gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits " +
  14458. "gl_MaxDrawBuffers"),
  14459. indentSwitch: false,
  14460. hooks: {"#": cppHook},
  14461. modeProps: {fold: ["brace", "include"]}
  14462. });
  14463. def("text/x-nesc", {
  14464. name: "clike",
  14465. keywords: words(cKeywords + " as atomic async call command component components configuration event generic " +
  14466. "implementation includes interface module new norace nx_struct nx_union post provides " +
  14467. "signal task uses abstract extends"),
  14468. types: cTypes,
  14469. blockKeywords: words(cBlockKeywords),
  14470. atoms: words("null true false"),
  14471. hooks: {"#": cppHook},
  14472. modeProps: {fold: ["brace", "include"]}
  14473. });
  14474. def("text/x-objectivec", {
  14475. name: "clike",
  14476. keywords: words(cKeywords + " " + objCKeywords),
  14477. types: objCTypes,
  14478. builtin: words(objCBuiltins),
  14479. blockKeywords: words(cBlockKeywords + " @synthesize @try @catch @finally @autoreleasepool @synchronized"),
  14480. defKeywords: words(cDefKeywords + " @interface @implementation @protocol @class"),
  14481. dontIndentStatements: /^@.*$/,
  14482. typeFirstDefinitions: true,
  14483. atoms: words("YES NO NULL Nil nil true false nullptr"),
  14484. isReservedIdentifier: cIsReservedIdentifier,
  14485. hooks: {
  14486. "#": cppHook,
  14487. "*": pointerHook,
  14488. },
  14489. modeProps: {fold: ["brace", "include"]}
  14490. });
  14491. def("text/x-objectivec++", {
  14492. name: "clike",
  14493. keywords: words(cKeywords + " " + objCKeywords + " " + cppKeywords),
  14494. types: objCTypes,
  14495. builtin: words(objCBuiltins),
  14496. blockKeywords: words(cBlockKeywords + " @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),
  14497. defKeywords: words(cDefKeywords + " @interface @implementation @protocol @class class namespace"),
  14498. dontIndentStatements: /^@.*$|^template$/,
  14499. typeFirstDefinitions: true,
  14500. atoms: words("YES NO NULL Nil nil true false nullptr"),
  14501. isReservedIdentifier: cIsReservedIdentifier,
  14502. hooks: {
  14503. "#": cppHook,
  14504. "*": pointerHook,
  14505. "u": cpp11StringHook,
  14506. "U": cpp11StringHook,
  14507. "L": cpp11StringHook,
  14508. "R": cpp11StringHook,
  14509. "0": cpp14Literal,
  14510. "1": cpp14Literal,
  14511. "2": cpp14Literal,
  14512. "3": cpp14Literal,
  14513. "4": cpp14Literal,
  14514. "5": cpp14Literal,
  14515. "6": cpp14Literal,
  14516. "7": cpp14Literal,
  14517. "8": cpp14Literal,
  14518. "9": cpp14Literal,
  14519. token: function(stream, state, style) {
  14520. if (style == "variable" && stream.peek() == "(" &&
  14521. (state.prevToken == ";" || state.prevToken == null ||
  14522. state.prevToken == "}") &&
  14523. cppLooksLikeConstructor(stream.current()))
  14524. return "def";
  14525. }
  14526. },
  14527. namespaceSeparator: "::",
  14528. modeProps: {fold: ["brace", "include"]}
  14529. });
  14530. def("text/x-squirrel", {
  14531. name: "clike",
  14532. keywords: words("base break clone continue const default delete enum extends function in class" +
  14533. " foreach local resume return this throw typeof yield constructor instanceof static"),
  14534. types: cTypes,
  14535. blockKeywords: words("case catch class else for foreach if switch try while"),
  14536. defKeywords: words("function local class"),
  14537. typeFirstDefinitions: true,
  14538. atoms: words("true false null"),
  14539. hooks: {"#": cppHook},
  14540. modeProps: {fold: ["brace", "include"]}
  14541. });
  14542. // Ceylon Strings need to deal with interpolation
  14543. var stringTokenizer = null;
  14544. function tokenCeylonString(type) {
  14545. return function(stream, state) {
  14546. var escaped = false, next, end = false;
  14547. while (!stream.eol()) {
  14548. if (!escaped && stream.match('"') &&
  14549. (type == "single" || stream.match('""'))) {
  14550. end = true;
  14551. break;
  14552. }
  14553. if (!escaped && stream.match('``')) {
  14554. stringTokenizer = tokenCeylonString(type);
  14555. end = true;
  14556. break;
  14557. }
  14558. next = stream.next();
  14559. escaped = type == "single" && !escaped && next == "\\";
  14560. }
  14561. if (end)
  14562. state.tokenize = null;
  14563. return "string";
  14564. }
  14565. }
  14566. def("text/x-ceylon", {
  14567. name: "clike",
  14568. keywords: words("abstracts alias assembly assert assign break case catch class continue dynamic else" +
  14569. " exists extends finally for function given if import in interface is let module new" +
  14570. " nonempty object of out outer package return satisfies super switch then this throw" +
  14571. " try value void while"),
  14572. types: function(word) {
  14573. // In Ceylon all identifiers that start with an uppercase are types
  14574. var first = word.charAt(0);
  14575. return (first === first.toUpperCase() && first !== first.toLowerCase());
  14576. },
  14577. blockKeywords: words("case catch class dynamic else finally for function if interface module new object switch try while"),
  14578. defKeywords: words("class dynamic function interface module object package value"),
  14579. builtin: words("abstract actual aliased annotation by default deprecated doc final formal late license" +
  14580. " native optional sealed see serializable shared suppressWarnings tagged throws variable"),
  14581. isPunctuationChar: /[\[\]{}\(\),;\:\.`]/,
  14582. isOperatorChar: /[+\-*&%=<>!?|^~:\/]/,
  14583. numberStart: /[\d#$]/,
  14584. number: /^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,
  14585. multiLineStrings: true,
  14586. typeFirstDefinitions: true,
  14587. atoms: words("true false null larger smaller equal empty finished"),
  14588. indentSwitch: false,
  14589. styleDefs: false,
  14590. hooks: {
  14591. "@": function(stream) {
  14592. stream.eatWhile(/[\w\$_]/);
  14593. return "meta";
  14594. },
  14595. '"': function(stream, state) {
  14596. state.tokenize = tokenCeylonString(stream.match('""') ? "triple" : "single");
  14597. return state.tokenize(stream, state);
  14598. },
  14599. '`': function(stream, state) {
  14600. if (!stringTokenizer || !stream.match('`')) return false;
  14601. state.tokenize = stringTokenizer;
  14602. stringTokenizer = null;
  14603. return state.tokenize(stream, state);
  14604. },
  14605. "'": function(stream) {
  14606. stream.eatWhile(/[\w\$_\xa1-\uffff]/);
  14607. return "atom";
  14608. },
  14609. token: function(_stream, state, style) {
  14610. if ((style == "variable" || style == "type") &&
  14611. state.prevToken == ".") {
  14612. return "variable-2";
  14613. }
  14614. }
  14615. },
  14616. modeProps: {
  14617. fold: ["brace", "import"],
  14618. closeBrackets: {triples: '"'}
  14619. }
  14620. });
  14621. });
  14622. /***/ }),
  14623. /***/ 36629:
  14624. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  14625. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  14626. // Distributed under an MIT license: https://codemirror.net/LICENSE
  14627. (function(mod) {
  14628. if (true) // CommonJS
  14629. mod(__webpack_require__(4631));
  14630. else {}
  14631. })(function(CodeMirror) {
  14632. "use strict";
  14633. CodeMirror.defineMode("css", function(config, parserConfig) {
  14634. var inline = parserConfig.inline
  14635. if (!parserConfig.propertyKeywords) parserConfig = CodeMirror.resolveMode("text/css");
  14636. var indentUnit = config.indentUnit,
  14637. tokenHooks = parserConfig.tokenHooks,
  14638. documentTypes = parserConfig.documentTypes || {},
  14639. mediaTypes = parserConfig.mediaTypes || {},
  14640. mediaFeatures = parserConfig.mediaFeatures || {},
  14641. mediaValueKeywords = parserConfig.mediaValueKeywords || {},
  14642. propertyKeywords = parserConfig.propertyKeywords || {},
  14643. nonStandardPropertyKeywords = parserConfig.nonStandardPropertyKeywords || {},
  14644. fontProperties = parserConfig.fontProperties || {},
  14645. counterDescriptors = parserConfig.counterDescriptors || {},
  14646. colorKeywords = parserConfig.colorKeywords || {},
  14647. valueKeywords = parserConfig.valueKeywords || {},
  14648. allowNested = parserConfig.allowNested,
  14649. lineComment = parserConfig.lineComment,
  14650. supportsAtComponent = parserConfig.supportsAtComponent === true,
  14651. highlightNonStandardPropertyKeywords = config.highlightNonStandardPropertyKeywords !== false;
  14652. var type, override;
  14653. function ret(style, tp) { type = tp; return style; }
  14654. // Tokenizers
  14655. function tokenBase(stream, state) {
  14656. var ch = stream.next();
  14657. if (tokenHooks[ch]) {
  14658. var result = tokenHooks[ch](stream, state);
  14659. if (result !== false) return result;
  14660. }
  14661. if (ch == "@") {
  14662. stream.eatWhile(/[\w\\\-]/);
  14663. return ret("def", stream.current());
  14664. } else if (ch == "=" || (ch == "~" || ch == "|") && stream.eat("=")) {
  14665. return ret(null, "compare");
  14666. } else if (ch == "\"" || ch == "'") {
  14667. state.tokenize = tokenString(ch);
  14668. return state.tokenize(stream, state);
  14669. } else if (ch == "#") {
  14670. stream.eatWhile(/[\w\\\-]/);
  14671. return ret("atom", "hash");
  14672. } else if (ch == "!") {
  14673. stream.match(/^\s*\w*/);
  14674. return ret("keyword", "important");
  14675. } else if (/\d/.test(ch) || ch == "." && stream.eat(/\d/)) {
  14676. stream.eatWhile(/[\w.%]/);
  14677. return ret("number", "unit");
  14678. } else if (ch === "-") {
  14679. if (/[\d.]/.test(stream.peek())) {
  14680. stream.eatWhile(/[\w.%]/);
  14681. return ret("number", "unit");
  14682. } else if (stream.match(/^-[\w\\\-]*/)) {
  14683. stream.eatWhile(/[\w\\\-]/);
  14684. if (stream.match(/^\s*:/, false))
  14685. return ret("variable-2", "variable-definition");
  14686. return ret("variable-2", "variable");
  14687. } else if (stream.match(/^\w+-/)) {
  14688. return ret("meta", "meta");
  14689. }
  14690. } else if (/[,+>*\/]/.test(ch)) {
  14691. return ret(null, "select-op");
  14692. } else if (ch == "." && stream.match(/^-?[_a-z][_a-z0-9-]*/i)) {
  14693. return ret("qualifier", "qualifier");
  14694. } else if (/[:;{}\[\]\(\)]/.test(ch)) {
  14695. return ret(null, ch);
  14696. } else if (stream.match(/^[\w-.]+(?=\()/)) {
  14697. if (/^(url(-prefix)?|domain|regexp)$/i.test(stream.current())) {
  14698. state.tokenize = tokenParenthesized;
  14699. }
  14700. return ret("variable callee", "variable");
  14701. } else if (/[\w\\\-]/.test(ch)) {
  14702. stream.eatWhile(/[\w\\\-]/);
  14703. return ret("property", "word");
  14704. } else {
  14705. return ret(null, null);
  14706. }
  14707. }
  14708. function tokenString(quote) {
  14709. return function(stream, state) {
  14710. var escaped = false, ch;
  14711. while ((ch = stream.next()) != null) {
  14712. if (ch == quote && !escaped) {
  14713. if (quote == ")") stream.backUp(1);
  14714. break;
  14715. }
  14716. escaped = !escaped && ch == "\\";
  14717. }
  14718. if (ch == quote || !escaped && quote != ")") state.tokenize = null;
  14719. return ret("string", "string");
  14720. };
  14721. }
  14722. function tokenParenthesized(stream, state) {
  14723. stream.next(); // Must be '('
  14724. if (!stream.match(/^\s*[\"\')]/, false))
  14725. state.tokenize = tokenString(")");
  14726. else
  14727. state.tokenize = null;
  14728. return ret(null, "(");
  14729. }
  14730. // Context management
  14731. function Context(type, indent, prev) {
  14732. this.type = type;
  14733. this.indent = indent;
  14734. this.prev = prev;
  14735. }
  14736. function pushContext(state, stream, type, indent) {
  14737. state.context = new Context(type, stream.indentation() + (indent === false ? 0 : indentUnit), state.context);
  14738. return type;
  14739. }
  14740. function popContext(state) {
  14741. if (state.context.prev)
  14742. state.context = state.context.prev;
  14743. return state.context.type;
  14744. }
  14745. function pass(type, stream, state) {
  14746. return states[state.context.type](type, stream, state);
  14747. }
  14748. function popAndPass(type, stream, state, n) {
  14749. for (var i = n || 1; i > 0; i--)
  14750. state.context = state.context.prev;
  14751. return pass(type, stream, state);
  14752. }
  14753. // Parser
  14754. function wordAsValue(stream) {
  14755. var word = stream.current().toLowerCase();
  14756. if (valueKeywords.hasOwnProperty(word))
  14757. override = "atom";
  14758. else if (colorKeywords.hasOwnProperty(word))
  14759. override = "keyword";
  14760. else
  14761. override = "variable";
  14762. }
  14763. var states = {};
  14764. states.top = function(type, stream, state) {
  14765. if (type == "{") {
  14766. return pushContext(state, stream, "block");
  14767. } else if (type == "}" && state.context.prev) {
  14768. return popContext(state);
  14769. } else if (supportsAtComponent && /@component/i.test(type)) {
  14770. return pushContext(state, stream, "atComponentBlock");
  14771. } else if (/^@(-moz-)?document$/i.test(type)) {
  14772. return pushContext(state, stream, "documentTypes");
  14773. } else if (/^@(media|supports|(-moz-)?document|import)$/i.test(type)) {
  14774. return pushContext(state, stream, "atBlock");
  14775. } else if (/^@(font-face|counter-style)/i.test(type)) {
  14776. state.stateArg = type;
  14777. return "restricted_atBlock_before";
  14778. } else if (/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(type)) {
  14779. return "keyframes";
  14780. } else if (type && type.charAt(0) == "@") {
  14781. return pushContext(state, stream, "at");
  14782. } else if (type == "hash") {
  14783. override = "builtin";
  14784. } else if (type == "word") {
  14785. override = "tag";
  14786. } else if (type == "variable-definition") {
  14787. return "maybeprop";
  14788. } else if (type == "interpolation") {
  14789. return pushContext(state, stream, "interpolation");
  14790. } else if (type == ":") {
  14791. return "pseudo";
  14792. } else if (allowNested && type == "(") {
  14793. return pushContext(state, stream, "parens");
  14794. }
  14795. return state.context.type;
  14796. };
  14797. states.block = function(type, stream, state) {
  14798. if (type == "word") {
  14799. var word = stream.current().toLowerCase();
  14800. if (propertyKeywords.hasOwnProperty(word)) {
  14801. override = "property";
  14802. return "maybeprop";
  14803. } else if (nonStandardPropertyKeywords.hasOwnProperty(word)) {
  14804. override = highlightNonStandardPropertyKeywords ? "string-2" : "property";
  14805. return "maybeprop";
  14806. } else if (allowNested) {
  14807. override = stream.match(/^\s*:(?:\s|$)/, false) ? "property" : "tag";
  14808. return "block";
  14809. } else {
  14810. override += " error";
  14811. return "maybeprop";
  14812. }
  14813. } else if (type == "meta") {
  14814. return "block";
  14815. } else if (!allowNested && (type == "hash" || type == "qualifier")) {
  14816. override = "error";
  14817. return "block";
  14818. } else {
  14819. return states.top(type, stream, state);
  14820. }
  14821. };
  14822. states.maybeprop = function(type, stream, state) {
  14823. if (type == ":") return pushContext(state, stream, "prop");
  14824. return pass(type, stream, state);
  14825. };
  14826. states.prop = function(type, stream, state) {
  14827. if (type == ";") return popContext(state);
  14828. if (type == "{" && allowNested) return pushContext(state, stream, "propBlock");
  14829. if (type == "}" || type == "{") return popAndPass(type, stream, state);
  14830. if (type == "(") return pushContext(state, stream, "parens");
  14831. if (type == "hash" && !/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(stream.current())) {
  14832. override += " error";
  14833. } else if (type == "word") {
  14834. wordAsValue(stream);
  14835. } else if (type == "interpolation") {
  14836. return pushContext(state, stream, "interpolation");
  14837. }
  14838. return "prop";
  14839. };
  14840. states.propBlock = function(type, _stream, state) {
  14841. if (type == "}") return popContext(state);
  14842. if (type == "word") { override = "property"; return "maybeprop"; }
  14843. return state.context.type;
  14844. };
  14845. states.parens = function(type, stream, state) {
  14846. if (type == "{" || type == "}") return popAndPass(type, stream, state);
  14847. if (type == ")") return popContext(state);
  14848. if (type == "(") return pushContext(state, stream, "parens");
  14849. if (type == "interpolation") return pushContext(state, stream, "interpolation");
  14850. if (type == "word") wordAsValue(stream);
  14851. return "parens";
  14852. };
  14853. states.pseudo = function(type, stream, state) {
  14854. if (type == "meta") return "pseudo";
  14855. if (type == "word") {
  14856. override = "variable-3";
  14857. return state.context.type;
  14858. }
  14859. return pass(type, stream, state);
  14860. };
  14861. states.documentTypes = function(type, stream, state) {
  14862. if (type == "word" && documentTypes.hasOwnProperty(stream.current())) {
  14863. override = "tag";
  14864. return state.context.type;
  14865. } else {
  14866. return states.atBlock(type, stream, state);
  14867. }
  14868. };
  14869. states.atBlock = function(type, stream, state) {
  14870. if (type == "(") return pushContext(state, stream, "atBlock_parens");
  14871. if (type == "}" || type == ";") return popAndPass(type, stream, state);
  14872. if (type == "{") return popContext(state) && pushContext(state, stream, allowNested ? "block" : "top");
  14873. if (type == "interpolation") return pushContext(state, stream, "interpolation");
  14874. if (type == "word") {
  14875. var word = stream.current().toLowerCase();
  14876. if (word == "only" || word == "not" || word == "and" || word == "or")
  14877. override = "keyword";
  14878. else if (mediaTypes.hasOwnProperty(word))
  14879. override = "attribute";
  14880. else if (mediaFeatures.hasOwnProperty(word))
  14881. override = "property";
  14882. else if (mediaValueKeywords.hasOwnProperty(word))
  14883. override = "keyword";
  14884. else if (propertyKeywords.hasOwnProperty(word))
  14885. override = "property";
  14886. else if (nonStandardPropertyKeywords.hasOwnProperty(word))
  14887. override = highlightNonStandardPropertyKeywords ? "string-2" : "property";
  14888. else if (valueKeywords.hasOwnProperty(word))
  14889. override = "atom";
  14890. else if (colorKeywords.hasOwnProperty(word))
  14891. override = "keyword";
  14892. else
  14893. override = "error";
  14894. }
  14895. return state.context.type;
  14896. };
  14897. states.atComponentBlock = function(type, stream, state) {
  14898. if (type == "}")
  14899. return popAndPass(type, stream, state);
  14900. if (type == "{")
  14901. return popContext(state) && pushContext(state, stream, allowNested ? "block" : "top", false);
  14902. if (type == "word")
  14903. override = "error";
  14904. return state.context.type;
  14905. };
  14906. states.atBlock_parens = function(type, stream, state) {
  14907. if (type == ")") return popContext(state);
  14908. if (type == "{" || type == "}") return popAndPass(type, stream, state, 2);
  14909. return states.atBlock(type, stream, state);
  14910. };
  14911. states.restricted_atBlock_before = function(type, stream, state) {
  14912. if (type == "{")
  14913. return pushContext(state, stream, "restricted_atBlock");
  14914. if (type == "word" && state.stateArg == "@counter-style") {
  14915. override = "variable";
  14916. return "restricted_atBlock_before";
  14917. }
  14918. return pass(type, stream, state);
  14919. };
  14920. states.restricted_atBlock = function(type, stream, state) {
  14921. if (type == "}") {
  14922. state.stateArg = null;
  14923. return popContext(state);
  14924. }
  14925. if (type == "word") {
  14926. if ((state.stateArg == "@font-face" && !fontProperties.hasOwnProperty(stream.current().toLowerCase())) ||
  14927. (state.stateArg == "@counter-style" && !counterDescriptors.hasOwnProperty(stream.current().toLowerCase())))
  14928. override = "error";
  14929. else
  14930. override = "property";
  14931. return "maybeprop";
  14932. }
  14933. return "restricted_atBlock";
  14934. };
  14935. states.keyframes = function(type, stream, state) {
  14936. if (type == "word") { override = "variable"; return "keyframes"; }
  14937. if (type == "{") return pushContext(state, stream, "top");
  14938. return pass(type, stream, state);
  14939. };
  14940. states.at = function(type, stream, state) {
  14941. if (type == ";") return popContext(state);
  14942. if (type == "{" || type == "}") return popAndPass(type, stream, state);
  14943. if (type == "word") override = "tag";
  14944. else if (type == "hash") override = "builtin";
  14945. return "at";
  14946. };
  14947. states.interpolation = function(type, stream, state) {
  14948. if (type == "}") return popContext(state);
  14949. if (type == "{" || type == ";") return popAndPass(type, stream, state);
  14950. if (type == "word") override = "variable";
  14951. else if (type != "variable" && type != "(" && type != ")") override = "error";
  14952. return "interpolation";
  14953. };
  14954. return {
  14955. startState: function(base) {
  14956. return {tokenize: null,
  14957. state: inline ? "block" : "top",
  14958. stateArg: null,
  14959. context: new Context(inline ? "block" : "top", base || 0, null)};
  14960. },
  14961. token: function(stream, state) {
  14962. if (!state.tokenize && stream.eatSpace()) return null;
  14963. var style = (state.tokenize || tokenBase)(stream, state);
  14964. if (style && typeof style == "object") {
  14965. type = style[1];
  14966. style = style[0];
  14967. }
  14968. override = style;
  14969. if (type != "comment")
  14970. state.state = states[state.state](type, stream, state);
  14971. return override;
  14972. },
  14973. indent: function(state, textAfter) {
  14974. var cx = state.context, ch = textAfter && textAfter.charAt(0);
  14975. var indent = cx.indent;
  14976. if (cx.type == "prop" && (ch == "}" || ch == ")")) cx = cx.prev;
  14977. if (cx.prev) {
  14978. if (ch == "}" && (cx.type == "block" || cx.type == "top" ||
  14979. cx.type == "interpolation" || cx.type == "restricted_atBlock")) {
  14980. // Resume indentation from parent context.
  14981. cx = cx.prev;
  14982. indent = cx.indent;
  14983. } else if (ch == ")" && (cx.type == "parens" || cx.type == "atBlock_parens") ||
  14984. ch == "{" && (cx.type == "at" || cx.type == "atBlock")) {
  14985. // Dedent relative to current context.
  14986. indent = Math.max(0, cx.indent - indentUnit);
  14987. }
  14988. }
  14989. return indent;
  14990. },
  14991. electricChars: "}",
  14992. blockCommentStart: "/*",
  14993. blockCommentEnd: "*/",
  14994. blockCommentContinue: " * ",
  14995. lineComment: lineComment,
  14996. fold: "brace"
  14997. };
  14998. });
  14999. function keySet(array) {
  15000. var keys = {};
  15001. for (var i = 0; i < array.length; ++i) {
  15002. keys[array[i].toLowerCase()] = true;
  15003. }
  15004. return keys;
  15005. }
  15006. var documentTypes_ = [
  15007. "domain", "regexp", "url", "url-prefix"
  15008. ], documentTypes = keySet(documentTypes_);
  15009. var mediaTypes_ = [
  15010. "all", "aural", "braille", "handheld", "print", "projection", "screen",
  15011. "tty", "tv", "embossed"
  15012. ], mediaTypes = keySet(mediaTypes_);
  15013. var mediaFeatures_ = [
  15014. "width", "min-width", "max-width", "height", "min-height", "max-height",
  15015. "device-width", "min-device-width", "max-device-width", "device-height",
  15016. "min-device-height", "max-device-height", "aspect-ratio",
  15017. "min-aspect-ratio", "max-aspect-ratio", "device-aspect-ratio",
  15018. "min-device-aspect-ratio", "max-device-aspect-ratio", "color", "min-color",
  15019. "max-color", "color-index", "min-color-index", "max-color-index",
  15020. "monochrome", "min-monochrome", "max-monochrome", "resolution",
  15021. "min-resolution", "max-resolution", "scan", "grid", "orientation",
  15022. "device-pixel-ratio", "min-device-pixel-ratio", "max-device-pixel-ratio",
  15023. "pointer", "any-pointer", "hover", "any-hover", "prefers-color-scheme",
  15024. "dynamic-range", "video-dynamic-range"
  15025. ], mediaFeatures = keySet(mediaFeatures_);
  15026. var mediaValueKeywords_ = [
  15027. "landscape", "portrait", "none", "coarse", "fine", "on-demand", "hover",
  15028. "interlace", "progressive",
  15029. "dark", "light",
  15030. "standard", "high"
  15031. ], mediaValueKeywords = keySet(mediaValueKeywords_);
  15032. var propertyKeywords_ = [
  15033. "align-content", "align-items", "align-self", "alignment-adjust",
  15034. "alignment-baseline", "all", "anchor-point", "animation", "animation-delay",
  15035. "animation-direction", "animation-duration", "animation-fill-mode",
  15036. "animation-iteration-count", "animation-name", "animation-play-state",
  15037. "animation-timing-function", "appearance", "azimuth", "backdrop-filter",
  15038. "backface-visibility", "background", "background-attachment",
  15039. "background-blend-mode", "background-clip", "background-color",
  15040. "background-image", "background-origin", "background-position",
  15041. "background-position-x", "background-position-y", "background-repeat",
  15042. "background-size", "baseline-shift", "binding", "bleed", "block-size",
  15043. "bookmark-label", "bookmark-level", "bookmark-state", "bookmark-target",
  15044. "border", "border-bottom", "border-bottom-color", "border-bottom-left-radius",
  15045. "border-bottom-right-radius", "border-bottom-style", "border-bottom-width",
  15046. "border-collapse", "border-color", "border-image", "border-image-outset",
  15047. "border-image-repeat", "border-image-slice", "border-image-source",
  15048. "border-image-width", "border-left", "border-left-color", "border-left-style",
  15049. "border-left-width", "border-radius", "border-right", "border-right-color",
  15050. "border-right-style", "border-right-width", "border-spacing", "border-style",
  15051. "border-top", "border-top-color", "border-top-left-radius",
  15052. "border-top-right-radius", "border-top-style", "border-top-width",
  15053. "border-width", "bottom", "box-decoration-break", "box-shadow", "box-sizing",
  15054. "break-after", "break-before", "break-inside", "caption-side", "caret-color",
  15055. "clear", "clip", "color", "color-profile", "column-count", "column-fill",
  15056. "column-gap", "column-rule", "column-rule-color", "column-rule-style",
  15057. "column-rule-width", "column-span", "column-width", "columns", "contain",
  15058. "content", "counter-increment", "counter-reset", "crop", "cue", "cue-after",
  15059. "cue-before", "cursor", "direction", "display", "dominant-baseline",
  15060. "drop-initial-after-adjust", "drop-initial-after-align",
  15061. "drop-initial-before-adjust", "drop-initial-before-align", "drop-initial-size",
  15062. "drop-initial-value", "elevation", "empty-cells", "fit", "fit-content", "fit-position",
  15063. "flex", "flex-basis", "flex-direction", "flex-flow", "flex-grow",
  15064. "flex-shrink", "flex-wrap", "float", "float-offset", "flow-from", "flow-into",
  15065. "font", "font-family", "font-feature-settings", "font-kerning",
  15066. "font-language-override", "font-optical-sizing", "font-size",
  15067. "font-size-adjust", "font-stretch", "font-style", "font-synthesis",
  15068. "font-variant", "font-variant-alternates", "font-variant-caps",
  15069. "font-variant-east-asian", "font-variant-ligatures", "font-variant-numeric",
  15070. "font-variant-position", "font-variation-settings", "font-weight", "gap",
  15071. "grid", "grid-area", "grid-auto-columns", "grid-auto-flow", "grid-auto-rows",
  15072. "grid-column", "grid-column-end", "grid-column-gap", "grid-column-start",
  15073. "grid-gap", "grid-row", "grid-row-end", "grid-row-gap", "grid-row-start",
  15074. "grid-template", "grid-template-areas", "grid-template-columns",
  15075. "grid-template-rows", "hanging-punctuation", "height", "hyphens", "icon",
  15076. "image-orientation", "image-rendering", "image-resolution", "inline-box-align",
  15077. "inset", "inset-block", "inset-block-end", "inset-block-start", "inset-inline",
  15078. "inset-inline-end", "inset-inline-start", "isolation", "justify-content",
  15079. "justify-items", "justify-self", "left", "letter-spacing", "line-break",
  15080. "line-height", "line-height-step", "line-stacking", "line-stacking-ruby",
  15081. "line-stacking-shift", "line-stacking-strategy", "list-style",
  15082. "list-style-image", "list-style-position", "list-style-type", "margin",
  15083. "margin-bottom", "margin-left", "margin-right", "margin-top", "marks",
  15084. "marquee-direction", "marquee-loop", "marquee-play-count", "marquee-speed",
  15085. "marquee-style", "mask-clip", "mask-composite", "mask-image", "mask-mode",
  15086. "mask-origin", "mask-position", "mask-repeat", "mask-size","mask-type",
  15087. "max-block-size", "max-height", "max-inline-size",
  15088. "max-width", "min-block-size", "min-height", "min-inline-size", "min-width",
  15089. "mix-blend-mode", "move-to", "nav-down", "nav-index", "nav-left", "nav-right",
  15090. "nav-up", "object-fit", "object-position", "offset", "offset-anchor",
  15091. "offset-distance", "offset-path", "offset-position", "offset-rotate",
  15092. "opacity", "order", "orphans", "outline", "outline-color", "outline-offset",
  15093. "outline-style", "outline-width", "overflow", "overflow-style",
  15094. "overflow-wrap", "overflow-x", "overflow-y", "padding", "padding-bottom",
  15095. "padding-left", "padding-right", "padding-top", "page", "page-break-after",
  15096. "page-break-before", "page-break-inside", "page-policy", "pause",
  15097. "pause-after", "pause-before", "perspective", "perspective-origin", "pitch",
  15098. "pitch-range", "place-content", "place-items", "place-self", "play-during",
  15099. "position", "presentation-level", "punctuation-trim", "quotes",
  15100. "region-break-after", "region-break-before", "region-break-inside",
  15101. "region-fragment", "rendering-intent", "resize", "rest", "rest-after",
  15102. "rest-before", "richness", "right", "rotate", "rotation", "rotation-point",
  15103. "row-gap", "ruby-align", "ruby-overhang", "ruby-position", "ruby-span",
  15104. "scale", "scroll-behavior", "scroll-margin", "scroll-margin-block",
  15105. "scroll-margin-block-end", "scroll-margin-block-start", "scroll-margin-bottom",
  15106. "scroll-margin-inline", "scroll-margin-inline-end",
  15107. "scroll-margin-inline-start", "scroll-margin-left", "scroll-margin-right",
  15108. "scroll-margin-top", "scroll-padding", "scroll-padding-block",
  15109. "scroll-padding-block-end", "scroll-padding-block-start",
  15110. "scroll-padding-bottom", "scroll-padding-inline", "scroll-padding-inline-end",
  15111. "scroll-padding-inline-start", "scroll-padding-left", "scroll-padding-right",
  15112. "scroll-padding-top", "scroll-snap-align", "scroll-snap-type",
  15113. "shape-image-threshold", "shape-inside", "shape-margin", "shape-outside",
  15114. "size", "speak", "speak-as", "speak-header", "speak-numeral",
  15115. "speak-punctuation", "speech-rate", "stress", "string-set", "tab-size",
  15116. "table-layout", "target", "target-name", "target-new", "target-position",
  15117. "text-align", "text-align-last", "text-combine-upright", "text-decoration",
  15118. "text-decoration-color", "text-decoration-line", "text-decoration-skip",
  15119. "text-decoration-skip-ink", "text-decoration-style", "text-emphasis",
  15120. "text-emphasis-color", "text-emphasis-position", "text-emphasis-style",
  15121. "text-height", "text-indent", "text-justify", "text-orientation",
  15122. "text-outline", "text-overflow", "text-rendering", "text-shadow",
  15123. "text-size-adjust", "text-space-collapse", "text-transform",
  15124. "text-underline-position", "text-wrap", "top", "touch-action", "transform", "transform-origin",
  15125. "transform-style", "transition", "transition-delay", "transition-duration",
  15126. "transition-property", "transition-timing-function", "translate",
  15127. "unicode-bidi", "user-select", "vertical-align", "visibility", "voice-balance",
  15128. "voice-duration", "voice-family", "voice-pitch", "voice-range", "voice-rate",
  15129. "voice-stress", "voice-volume", "volume", "white-space", "widows", "width",
  15130. "will-change", "word-break", "word-spacing", "word-wrap", "writing-mode", "z-index",
  15131. // SVG-specific
  15132. "clip-path", "clip-rule", "mask", "enable-background", "filter", "flood-color",
  15133. "flood-opacity", "lighting-color", "stop-color", "stop-opacity", "pointer-events",
  15134. "color-interpolation", "color-interpolation-filters",
  15135. "color-rendering", "fill", "fill-opacity", "fill-rule", "image-rendering",
  15136. "marker", "marker-end", "marker-mid", "marker-start", "paint-order", "shape-rendering", "stroke",
  15137. "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin",
  15138. "stroke-miterlimit", "stroke-opacity", "stroke-width", "text-rendering",
  15139. "baseline-shift", "dominant-baseline", "glyph-orientation-horizontal",
  15140. "glyph-orientation-vertical", "text-anchor", "writing-mode",
  15141. ], propertyKeywords = keySet(propertyKeywords_);
  15142. var nonStandardPropertyKeywords_ = [
  15143. "accent-color", "aspect-ratio", "border-block", "border-block-color", "border-block-end",
  15144. "border-block-end-color", "border-block-end-style", "border-block-end-width",
  15145. "border-block-start", "border-block-start-color", "border-block-start-style",
  15146. "border-block-start-width", "border-block-style", "border-block-width",
  15147. "border-inline", "border-inline-color", "border-inline-end",
  15148. "border-inline-end-color", "border-inline-end-style",
  15149. "border-inline-end-width", "border-inline-start", "border-inline-start-color",
  15150. "border-inline-start-style", "border-inline-start-width",
  15151. "border-inline-style", "border-inline-width", "content-visibility", "margin-block",
  15152. "margin-block-end", "margin-block-start", "margin-inline", "margin-inline-end",
  15153. "margin-inline-start", "overflow-anchor", "overscroll-behavior", "padding-block", "padding-block-end",
  15154. "padding-block-start", "padding-inline", "padding-inline-end",
  15155. "padding-inline-start", "scroll-snap-stop", "scrollbar-3d-light-color",
  15156. "scrollbar-arrow-color", "scrollbar-base-color", "scrollbar-dark-shadow-color",
  15157. "scrollbar-face-color", "scrollbar-highlight-color", "scrollbar-shadow-color",
  15158. "scrollbar-track-color", "searchfield-cancel-button", "searchfield-decoration",
  15159. "searchfield-results-button", "searchfield-results-decoration", "shape-inside", "zoom"
  15160. ], nonStandardPropertyKeywords = keySet(nonStandardPropertyKeywords_);
  15161. var fontProperties_ = [
  15162. "font-display", "font-family", "src", "unicode-range", "font-variant",
  15163. "font-feature-settings", "font-stretch", "font-weight", "font-style"
  15164. ], fontProperties = keySet(fontProperties_);
  15165. var counterDescriptors_ = [
  15166. "additive-symbols", "fallback", "negative", "pad", "prefix", "range",
  15167. "speak-as", "suffix", "symbols", "system"
  15168. ], counterDescriptors = keySet(counterDescriptors_);
  15169. var colorKeywords_ = [
  15170. "aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige",
  15171. "bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown",
  15172. "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue",
  15173. "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod",
  15174. "darkgray", "darkgreen", "darkgrey", "darkkhaki", "darkmagenta", "darkolivegreen",
  15175. "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen",
  15176. "darkslateblue", "darkslategray", "darkslategrey", "darkturquoise", "darkviolet",
  15177. "deeppink", "deepskyblue", "dimgray", "dimgrey", "dodgerblue", "firebrick",
  15178. "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite",
  15179. "gold", "goldenrod", "gray", "grey", "green", "greenyellow", "honeydew",
  15180. "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender",
  15181. "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral",
  15182. "lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightgrey", "lightpink",
  15183. "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", "lightslategrey",
  15184. "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta",
  15185. "maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple",
  15186. "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise",
  15187. "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin",
  15188. "navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered",
  15189. "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred",
  15190. "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue",
  15191. "purple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown",
  15192. "salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue",
  15193. "slateblue", "slategray", "slategrey", "snow", "springgreen", "steelblue", "tan",
  15194. "teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white",
  15195. "whitesmoke", "yellow", "yellowgreen"
  15196. ], colorKeywords = keySet(colorKeywords_);
  15197. var valueKeywords_ = [
  15198. "above", "absolute", "activeborder", "additive", "activecaption", "afar",
  15199. "after-white-space", "ahead", "alias", "all", "all-scroll", "alphabetic", "alternate",
  15200. "always", "amharic", "amharic-abegede", "antialiased", "appworkspace",
  15201. "arabic-indic", "armenian", "asterisks", "attr", "auto", "auto-flow", "avoid", "avoid-column", "avoid-page",
  15202. "avoid-region", "axis-pan", "background", "backwards", "baseline", "below", "bidi-override", "binary",
  15203. "bengali", "blink", "block", "block-axis", "blur", "bold", "bolder", "border", "border-box",
  15204. "both", "bottom", "break", "break-all", "break-word", "brightness", "bullets", "button", "button-bevel",
  15205. "buttonface", "buttonhighlight", "buttonshadow", "buttontext", "calc", "cambodian",
  15206. "capitalize", "caps-lock-indicator", "caption", "captiontext", "caret",
  15207. "cell", "center", "checkbox", "circle", "cjk-decimal", "cjk-earthly-branch",
  15208. "cjk-heavenly-stem", "cjk-ideographic", "clear", "clip", "close-quote",
  15209. "col-resize", "collapse", "color", "color-burn", "color-dodge", "column", "column-reverse",
  15210. "compact", "condensed", "conic-gradient", "contain", "content", "contents",
  15211. "content-box", "context-menu", "continuous", "contrast", "copy", "counter", "counters", "cover", "crop",
  15212. "cross", "crosshair", "cubic-bezier", "currentcolor", "cursive", "cyclic", "darken", "dashed", "decimal",
  15213. "decimal-leading-zero", "default", "default-button", "dense", "destination-atop",
  15214. "destination-in", "destination-out", "destination-over", "devanagari", "difference",
  15215. "disc", "discard", "disclosure-closed", "disclosure-open", "document",
  15216. "dot-dash", "dot-dot-dash",
  15217. "dotted", "double", "down", "drop-shadow", "e-resize", "ease", "ease-in", "ease-in-out", "ease-out",
  15218. "element", "ellipse", "ellipsis", "embed", "end", "ethiopic", "ethiopic-abegede",
  15219. "ethiopic-abegede-am-et", "ethiopic-abegede-gez", "ethiopic-abegede-ti-er",
  15220. "ethiopic-abegede-ti-et", "ethiopic-halehame-aa-er",
  15221. "ethiopic-halehame-aa-et", "ethiopic-halehame-am-et",
  15222. "ethiopic-halehame-gez", "ethiopic-halehame-om-et",
  15223. "ethiopic-halehame-sid-et", "ethiopic-halehame-so-et",
  15224. "ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "ethiopic-halehame-tig",
  15225. "ethiopic-numeric", "ew-resize", "exclusion", "expanded", "extends", "extra-condensed",
  15226. "extra-expanded", "fantasy", "fast", "fill", "fill-box", "fixed", "flat", "flex", "flex-end", "flex-start", "footnotes",
  15227. "forwards", "from", "geometricPrecision", "georgian", "grayscale", "graytext", "grid", "groove",
  15228. "gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hard-light", "hebrew",
  15229. "help", "hidden", "hide", "higher", "highlight", "highlighttext",
  15230. "hiragana", "hiragana-iroha", "horizontal", "hsl", "hsla", "hue", "hue-rotate", "icon", "ignore",
  15231. "inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite",
  15232. "infobackground", "infotext", "inherit", "initial", "inline", "inline-axis",
  15233. "inline-block", "inline-flex", "inline-grid", "inline-table", "inset", "inside", "intrinsic", "invert",
  15234. "italic", "japanese-formal", "japanese-informal", "justify", "kannada",
  15235. "katakana", "katakana-iroha", "keep-all", "khmer",
  15236. "korean-hangul-formal", "korean-hanja-formal", "korean-hanja-informal",
  15237. "landscape", "lao", "large", "larger", "left", "level", "lighter", "lighten",
  15238. "line-through", "linear", "linear-gradient", "lines", "list-item", "listbox", "listitem",
  15239. "local", "logical", "loud", "lower", "lower-alpha", "lower-armenian",
  15240. "lower-greek", "lower-hexadecimal", "lower-latin", "lower-norwegian",
  15241. "lower-roman", "lowercase", "ltr", "luminosity", "malayalam", "manipulation", "match", "matrix", "matrix3d",
  15242. "media-controls-background", "media-current-time-display",
  15243. "media-fullscreen-button", "media-mute-button", "media-play-button",
  15244. "media-return-to-realtime-button", "media-rewind-button",
  15245. "media-seek-back-button", "media-seek-forward-button", "media-slider",
  15246. "media-sliderthumb", "media-time-remaining-display", "media-volume-slider",
  15247. "media-volume-slider-container", "media-volume-sliderthumb", "medium",
  15248. "menu", "menulist", "menulist-button", "menulist-text",
  15249. "menulist-textfield", "menutext", "message-box", "middle", "min-intrinsic",
  15250. "mix", "mongolian", "monospace", "move", "multiple", "multiple_mask_images", "multiply", "myanmar", "n-resize",
  15251. "narrower", "ne-resize", "nesw-resize", "no-close-quote", "no-drop",
  15252. "no-open-quote", "no-repeat", "none", "normal", "not-allowed", "nowrap",
  15253. "ns-resize", "numbers", "numeric", "nw-resize", "nwse-resize", "oblique", "octal", "opacity", "open-quote",
  15254. "optimizeLegibility", "optimizeSpeed", "oriya", "oromo", "outset",
  15255. "outside", "outside-shape", "overlay", "overline", "padding", "padding-box",
  15256. "painted", "page", "paused", "persian", "perspective", "pinch-zoom", "plus-darker", "plus-lighter",
  15257. "pointer", "polygon", "portrait", "pre", "pre-line", "pre-wrap", "preserve-3d",
  15258. "progress", "push-button", "radial-gradient", "radio", "read-only",
  15259. "read-write", "read-write-plaintext-only", "rectangle", "region",
  15260. "relative", "repeat", "repeating-linear-gradient", "repeating-radial-gradient",
  15261. "repeating-conic-gradient", "repeat-x", "repeat-y", "reset", "reverse",
  15262. "rgb", "rgba", "ridge", "right", "rotate", "rotate3d", "rotateX", "rotateY",
  15263. "rotateZ", "round", "row", "row-resize", "row-reverse", "rtl", "run-in", "running",
  15264. "s-resize", "sans-serif", "saturate", "saturation", "scale", "scale3d", "scaleX", "scaleY", "scaleZ", "screen",
  15265. "scroll", "scrollbar", "scroll-position", "se-resize", "searchfield",
  15266. "searchfield-cancel-button", "searchfield-decoration",
  15267. "searchfield-results-button", "searchfield-results-decoration", "self-start", "self-end",
  15268. "semi-condensed", "semi-expanded", "separate", "sepia", "serif", "show", "sidama",
  15269. "simp-chinese-formal", "simp-chinese-informal", "single",
  15270. "skew", "skewX", "skewY", "skip-white-space", "slide", "slider-horizontal",
  15271. "slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "slow",
  15272. "small", "small-caps", "small-caption", "smaller", "soft-light", "solid", "somali",
  15273. "source-atop", "source-in", "source-out", "source-over", "space", "space-around", "space-between", "space-evenly", "spell-out", "square",
  15274. "square-button", "start", "static", "status-bar", "stretch", "stroke", "stroke-box", "sub",
  15275. "subpixel-antialiased", "svg_masks", "super", "sw-resize", "symbolic", "symbols", "system-ui", "table",
  15276. "table-caption", "table-cell", "table-column", "table-column-group",
  15277. "table-footer-group", "table-header-group", "table-row", "table-row-group",
  15278. "tamil",
  15279. "telugu", "text", "text-bottom", "text-top", "textarea", "textfield", "thai",
  15280. "thick", "thin", "threeddarkshadow", "threedface", "threedhighlight",
  15281. "threedlightshadow", "threedshadow", "tibetan", "tigre", "tigrinya-er",
  15282. "tigrinya-er-abegede", "tigrinya-et", "tigrinya-et-abegede", "to", "top",
  15283. "trad-chinese-formal", "trad-chinese-informal", "transform",
  15284. "translate", "translate3d", "translateX", "translateY", "translateZ",
  15285. "transparent", "ultra-condensed", "ultra-expanded", "underline", "unidirectional-pan", "unset", "up",
  15286. "upper-alpha", "upper-armenian", "upper-greek", "upper-hexadecimal",
  15287. "upper-latin", "upper-norwegian", "upper-roman", "uppercase", "urdu", "url",
  15288. "var", "vertical", "vertical-text", "view-box", "visible", "visibleFill", "visiblePainted",
  15289. "visibleStroke", "visual", "w-resize", "wait", "wave", "wider",
  15290. "window", "windowframe", "windowtext", "words", "wrap", "wrap-reverse", "x-large", "x-small", "xor",
  15291. "xx-large", "xx-small"
  15292. ], valueKeywords = keySet(valueKeywords_);
  15293. var allWords = documentTypes_.concat(mediaTypes_).concat(mediaFeatures_).concat(mediaValueKeywords_)
  15294. .concat(propertyKeywords_).concat(nonStandardPropertyKeywords_).concat(colorKeywords_)
  15295. .concat(valueKeywords_);
  15296. CodeMirror.registerHelper("hintWords", "css", allWords);
  15297. function tokenCComment(stream, state) {
  15298. var maybeEnd = false, ch;
  15299. while ((ch = stream.next()) != null) {
  15300. if (maybeEnd && ch == "/") {
  15301. state.tokenize = null;
  15302. break;
  15303. }
  15304. maybeEnd = (ch == "*");
  15305. }
  15306. return ["comment", "comment"];
  15307. }
  15308. CodeMirror.defineMIME("text/css", {
  15309. documentTypes: documentTypes,
  15310. mediaTypes: mediaTypes,
  15311. mediaFeatures: mediaFeatures,
  15312. mediaValueKeywords: mediaValueKeywords,
  15313. propertyKeywords: propertyKeywords,
  15314. nonStandardPropertyKeywords: nonStandardPropertyKeywords,
  15315. fontProperties: fontProperties,
  15316. counterDescriptors: counterDescriptors,
  15317. colorKeywords: colorKeywords,
  15318. valueKeywords: valueKeywords,
  15319. tokenHooks: {
  15320. "/": function(stream, state) {
  15321. if (!stream.eat("*")) return false;
  15322. state.tokenize = tokenCComment;
  15323. return tokenCComment(stream, state);
  15324. }
  15325. },
  15326. name: "css"
  15327. });
  15328. CodeMirror.defineMIME("text/x-scss", {
  15329. mediaTypes: mediaTypes,
  15330. mediaFeatures: mediaFeatures,
  15331. mediaValueKeywords: mediaValueKeywords,
  15332. propertyKeywords: propertyKeywords,
  15333. nonStandardPropertyKeywords: nonStandardPropertyKeywords,
  15334. colorKeywords: colorKeywords,
  15335. valueKeywords: valueKeywords,
  15336. fontProperties: fontProperties,
  15337. allowNested: true,
  15338. lineComment: "//",
  15339. tokenHooks: {
  15340. "/": function(stream, state) {
  15341. if (stream.eat("/")) {
  15342. stream.skipToEnd();
  15343. return ["comment", "comment"];
  15344. } else if (stream.eat("*")) {
  15345. state.tokenize = tokenCComment;
  15346. return tokenCComment(stream, state);
  15347. } else {
  15348. return ["operator", "operator"];
  15349. }
  15350. },
  15351. ":": function(stream) {
  15352. if (stream.match(/^\s*\{/, false))
  15353. return [null, null]
  15354. return false;
  15355. },
  15356. "$": function(stream) {
  15357. stream.match(/^[\w-]+/);
  15358. if (stream.match(/^\s*:/, false))
  15359. return ["variable-2", "variable-definition"];
  15360. return ["variable-2", "variable"];
  15361. },
  15362. "#": function(stream) {
  15363. if (!stream.eat("{")) return false;
  15364. return [null, "interpolation"];
  15365. }
  15366. },
  15367. name: "css",
  15368. helperType: "scss"
  15369. });
  15370. CodeMirror.defineMIME("text/x-less", {
  15371. mediaTypes: mediaTypes,
  15372. mediaFeatures: mediaFeatures,
  15373. mediaValueKeywords: mediaValueKeywords,
  15374. propertyKeywords: propertyKeywords,
  15375. nonStandardPropertyKeywords: nonStandardPropertyKeywords,
  15376. colorKeywords: colorKeywords,
  15377. valueKeywords: valueKeywords,
  15378. fontProperties: fontProperties,
  15379. allowNested: true,
  15380. lineComment: "//",
  15381. tokenHooks: {
  15382. "/": function(stream, state) {
  15383. if (stream.eat("/")) {
  15384. stream.skipToEnd();
  15385. return ["comment", "comment"];
  15386. } else if (stream.eat("*")) {
  15387. state.tokenize = tokenCComment;
  15388. return tokenCComment(stream, state);
  15389. } else {
  15390. return ["operator", "operator"];
  15391. }
  15392. },
  15393. "@": function(stream) {
  15394. if (stream.eat("{")) return [null, "interpolation"];
  15395. if (stream.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i, false)) return false;
  15396. stream.eatWhile(/[\w\\\-]/);
  15397. if (stream.match(/^\s*:/, false))
  15398. return ["variable-2", "variable-definition"];
  15399. return ["variable-2", "variable"];
  15400. },
  15401. "&": function() {
  15402. return ["atom", "atom"];
  15403. }
  15404. },
  15405. name: "css",
  15406. helperType: "less"
  15407. });
  15408. CodeMirror.defineMIME("text/x-gss", {
  15409. documentTypes: documentTypes,
  15410. mediaTypes: mediaTypes,
  15411. mediaFeatures: mediaFeatures,
  15412. propertyKeywords: propertyKeywords,
  15413. nonStandardPropertyKeywords: nonStandardPropertyKeywords,
  15414. fontProperties: fontProperties,
  15415. counterDescriptors: counterDescriptors,
  15416. colorKeywords: colorKeywords,
  15417. valueKeywords: valueKeywords,
  15418. supportsAtComponent: true,
  15419. tokenHooks: {
  15420. "/": function(stream, state) {
  15421. if (!stream.eat("*")) return false;
  15422. state.tokenize = tokenCComment;
  15423. return tokenCComment(stream, state);
  15424. }
  15425. },
  15426. name: "css",
  15427. helperType: "gss"
  15428. });
  15429. });
  15430. /***/ }),
  15431. /***/ 42425:
  15432. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  15433. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  15434. // Distributed under an MIT license: https://codemirror.net/LICENSE
  15435. (function(mod) {
  15436. if (true) // CommonJS
  15437. mod(__webpack_require__(4631), __webpack_require__(49047), __webpack_require__(14146));
  15438. else {}
  15439. })(function(CodeMirror) {
  15440. "use strict";
  15441. var urlRE = /^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i
  15442. CodeMirror.defineMode("gfm", function(config, modeConfig) {
  15443. var codeDepth = 0;
  15444. function blankLine(state) {
  15445. state.code = false;
  15446. return null;
  15447. }
  15448. var gfmOverlay = {
  15449. startState: function() {
  15450. return {
  15451. code: false,
  15452. codeBlock: false,
  15453. ateSpace: false
  15454. };
  15455. },
  15456. copyState: function(s) {
  15457. return {
  15458. code: s.code,
  15459. codeBlock: s.codeBlock,
  15460. ateSpace: s.ateSpace
  15461. };
  15462. },
  15463. token: function(stream, state) {
  15464. state.combineTokens = null;
  15465. // Hack to prevent formatting override inside code blocks (block and inline)
  15466. if (state.codeBlock) {
  15467. if (stream.match(/^```+/)) {
  15468. state.codeBlock = false;
  15469. return null;
  15470. }
  15471. stream.skipToEnd();
  15472. return null;
  15473. }
  15474. if (stream.sol()) {
  15475. state.code = false;
  15476. }
  15477. if (stream.sol() && stream.match(/^```+/)) {
  15478. stream.skipToEnd();
  15479. state.codeBlock = true;
  15480. return null;
  15481. }
  15482. // If this block is changed, it may need to be updated in Markdown mode
  15483. if (stream.peek() === '`') {
  15484. stream.next();
  15485. var before = stream.pos;
  15486. stream.eatWhile('`');
  15487. var difference = 1 + stream.pos - before;
  15488. if (!state.code) {
  15489. codeDepth = difference;
  15490. state.code = true;
  15491. } else {
  15492. if (difference === codeDepth) { // Must be exact
  15493. state.code = false;
  15494. }
  15495. }
  15496. return null;
  15497. } else if (state.code) {
  15498. stream.next();
  15499. return null;
  15500. }
  15501. // Check if space. If so, links can be formatted later on
  15502. if (stream.eatSpace()) {
  15503. state.ateSpace = true;
  15504. return null;
  15505. }
  15506. if (stream.sol() || state.ateSpace) {
  15507. state.ateSpace = false;
  15508. if (modeConfig.gitHubSpice !== false) {
  15509. if(stream.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/)) {
  15510. // User/Project@SHA
  15511. // User@SHA
  15512. // SHA
  15513. state.combineTokens = true;
  15514. return "link";
  15515. } else if (stream.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/)) {
  15516. // User/Project#Num
  15517. // User#Num
  15518. // #Num
  15519. state.combineTokens = true;
  15520. return "link";
  15521. }
  15522. }
  15523. }
  15524. if (stream.match(urlRE) &&
  15525. stream.string.slice(stream.start - 2, stream.start) != "](" &&
  15526. (stream.start == 0 || /\W/.test(stream.string.charAt(stream.start - 1)))) {
  15527. // URLs
  15528. // Taken from http://daringfireball.net/2010/07/improved_regex_for_matching_urls
  15529. // And then (issue #1160) simplified to make it not crash the Chrome Regexp engine
  15530. // And then limited url schemes to the CommonMark list, so foo:bar isn't matched as a URL
  15531. state.combineTokens = true;
  15532. return "link";
  15533. }
  15534. stream.next();
  15535. return null;
  15536. },
  15537. blankLine: blankLine
  15538. };
  15539. var markdownConfig = {
  15540. taskLists: true,
  15541. strikethrough: true,
  15542. emoji: true
  15543. };
  15544. for (var attr in modeConfig) {
  15545. markdownConfig[attr] = modeConfig[attr];
  15546. }
  15547. markdownConfig.name = "markdown";
  15548. return CodeMirror.overlayMode(CodeMirror.getMode(config, markdownConfig), gfmOverlay);
  15549. }, "markdown");
  15550. CodeMirror.defineMIME("text/x-gfm", "gfm");
  15551. });
  15552. /***/ }),
  15553. /***/ 16531:
  15554. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  15555. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  15556. // Distributed under an MIT license: https://codemirror.net/LICENSE
  15557. (function(mod) {
  15558. if (true) // CommonJS
  15559. mod(__webpack_require__(4631), __webpack_require__(29589), __webpack_require__(96876), __webpack_require__(36629));
  15560. else {}
  15561. })(function(CodeMirror) {
  15562. "use strict";
  15563. var defaultTags = {
  15564. script: [
  15565. ["lang", /(javascript|babel)/i, "javascript"],
  15566. ["type", /^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i, "javascript"],
  15567. ["type", /./, "text/plain"],
  15568. [null, null, "javascript"]
  15569. ],
  15570. style: [
  15571. ["lang", /^css$/i, "css"],
  15572. ["type", /^(text\/)?(x-)?(stylesheet|css)$/i, "css"],
  15573. ["type", /./, "text/plain"],
  15574. [null, null, "css"]
  15575. ]
  15576. };
  15577. function maybeBackup(stream, pat, style) {
  15578. var cur = stream.current(), close = cur.search(pat);
  15579. if (close > -1) {
  15580. stream.backUp(cur.length - close);
  15581. } else if (cur.match(/<\/?$/)) {
  15582. stream.backUp(cur.length);
  15583. if (!stream.match(pat, false)) stream.match(cur);
  15584. }
  15585. return style;
  15586. }
  15587. var attrRegexpCache = {};
  15588. function getAttrRegexp(attr) {
  15589. var regexp = attrRegexpCache[attr];
  15590. if (regexp) return regexp;
  15591. return attrRegexpCache[attr] = new RegExp("\\s+" + attr + "\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*");
  15592. }
  15593. function getAttrValue(text, attr) {
  15594. var match = text.match(getAttrRegexp(attr))
  15595. return match ? /^\s*(.*?)\s*$/.exec(match[2])[1] : ""
  15596. }
  15597. function getTagRegexp(tagName, anchored) {
  15598. return new RegExp((anchored ? "^" : "") + "<\/\\s*" + tagName + "\\s*>", "i");
  15599. }
  15600. function addTags(from, to) {
  15601. for (var tag in from) {
  15602. var dest = to[tag] || (to[tag] = []);
  15603. var source = from[tag];
  15604. for (var i = source.length - 1; i >= 0; i--)
  15605. dest.unshift(source[i])
  15606. }
  15607. }
  15608. function findMatchingMode(tagInfo, tagText) {
  15609. for (var i = 0; i < tagInfo.length; i++) {
  15610. var spec = tagInfo[i];
  15611. if (!spec[0] || spec[1].test(getAttrValue(tagText, spec[0]))) return spec[2];
  15612. }
  15613. }
  15614. CodeMirror.defineMode("htmlmixed", function (config, parserConfig) {
  15615. var htmlMode = CodeMirror.getMode(config, {
  15616. name: "xml",
  15617. htmlMode: true,
  15618. multilineTagIndentFactor: parserConfig.multilineTagIndentFactor,
  15619. multilineTagIndentPastTag: parserConfig.multilineTagIndentPastTag,
  15620. allowMissingTagName: parserConfig.allowMissingTagName,
  15621. });
  15622. var tags = {};
  15623. var configTags = parserConfig && parserConfig.tags, configScript = parserConfig && parserConfig.scriptTypes;
  15624. addTags(defaultTags, tags);
  15625. if (configTags) addTags(configTags, tags);
  15626. if (configScript) for (var i = configScript.length - 1; i >= 0; i--)
  15627. tags.script.unshift(["type", configScript[i].matches, configScript[i].mode])
  15628. function html(stream, state) {
  15629. var style = htmlMode.token(stream, state.htmlState), tag = /\btag\b/.test(style), tagName
  15630. if (tag && !/[<>\s\/]/.test(stream.current()) &&
  15631. (tagName = state.htmlState.tagName && state.htmlState.tagName.toLowerCase()) &&
  15632. tags.hasOwnProperty(tagName)) {
  15633. state.inTag = tagName + " "
  15634. } else if (state.inTag && tag && />$/.test(stream.current())) {
  15635. var inTag = /^([\S]+) (.*)/.exec(state.inTag)
  15636. state.inTag = null
  15637. var modeSpec = stream.current() == ">" && findMatchingMode(tags[inTag[1]], inTag[2])
  15638. var mode = CodeMirror.getMode(config, modeSpec)
  15639. var endTagA = getTagRegexp(inTag[1], true), endTag = getTagRegexp(inTag[1], false);
  15640. state.token = function (stream, state) {
  15641. if (stream.match(endTagA, false)) {
  15642. state.token = html;
  15643. state.localState = state.localMode = null;
  15644. return null;
  15645. }
  15646. return maybeBackup(stream, endTag, state.localMode.token(stream, state.localState));
  15647. };
  15648. state.localMode = mode;
  15649. state.localState = CodeMirror.startState(mode, htmlMode.indent(state.htmlState, "", ""));
  15650. } else if (state.inTag) {
  15651. state.inTag += stream.current()
  15652. if (stream.eol()) state.inTag += " "
  15653. }
  15654. return style;
  15655. };
  15656. return {
  15657. startState: function () {
  15658. var state = CodeMirror.startState(htmlMode);
  15659. return {token: html, inTag: null, localMode: null, localState: null, htmlState: state};
  15660. },
  15661. copyState: function (state) {
  15662. var local;
  15663. if (state.localState) {
  15664. local = CodeMirror.copyState(state.localMode, state.localState);
  15665. }
  15666. return {token: state.token, inTag: state.inTag,
  15667. localMode: state.localMode, localState: local,
  15668. htmlState: CodeMirror.copyState(htmlMode, state.htmlState)};
  15669. },
  15670. token: function (stream, state) {
  15671. return state.token(stream, state);
  15672. },
  15673. indent: function (state, textAfter, line) {
  15674. if (!state.localMode || /^\s*<\//.test(textAfter))
  15675. return htmlMode.indent(state.htmlState, textAfter, line);
  15676. else if (state.localMode.indent)
  15677. return state.localMode.indent(state.localState, textAfter, line);
  15678. else
  15679. return CodeMirror.Pass;
  15680. },
  15681. innerMode: function (state) {
  15682. return {state: state.localState || state.htmlState, mode: state.localMode || htmlMode};
  15683. }
  15684. };
  15685. }, "xml", "javascript", "css");
  15686. CodeMirror.defineMIME("text/html", "htmlmixed");
  15687. });
  15688. /***/ }),
  15689. /***/ 96876:
  15690. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  15691. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  15692. // Distributed under an MIT license: https://codemirror.net/LICENSE
  15693. (function(mod) {
  15694. if (true) // CommonJS
  15695. mod(__webpack_require__(4631));
  15696. else {}
  15697. })(function(CodeMirror) {
  15698. "use strict";
  15699. CodeMirror.defineMode("javascript", function(config, parserConfig) {
  15700. var indentUnit = config.indentUnit;
  15701. var statementIndent = parserConfig.statementIndent;
  15702. var jsonldMode = parserConfig.jsonld;
  15703. var jsonMode = parserConfig.json || jsonldMode;
  15704. var trackScope = parserConfig.trackScope !== false
  15705. var isTS = parserConfig.typescript;
  15706. var wordRE = parserConfig.wordCharacters || /[\w$\xa1-\uffff]/;
  15707. // Tokenizer
  15708. var keywords = function(){
  15709. function kw(type) {return {type: type, style: "keyword"};}
  15710. var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c"), D = kw("keyword d");
  15711. var operator = kw("operator"), atom = {type: "atom", style: "atom"};
  15712. return {
  15713. "if": kw("if"), "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B,
  15714. "return": D, "break": D, "continue": D, "new": kw("new"), "delete": C, "void": C, "throw": C,
  15715. "debugger": kw("debugger"), "var": kw("var"), "const": kw("var"), "let": kw("var"),
  15716. "function": kw("function"), "catch": kw("catch"),
  15717. "for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"),
  15718. "in": operator, "typeof": operator, "instanceof": operator,
  15719. "true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom,
  15720. "this": kw("this"), "class": kw("class"), "super": kw("atom"),
  15721. "yield": C, "export": kw("export"), "import": kw("import"), "extends": C,
  15722. "await": C
  15723. };
  15724. }();
  15725. var isOperatorChar = /[+\-*&%=<>!?|~^@]/;
  15726. var isJsonldKeyword = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;
  15727. function readRegexp(stream) {
  15728. var escaped = false, next, inSet = false;
  15729. while ((next = stream.next()) != null) {
  15730. if (!escaped) {
  15731. if (next == "/" && !inSet) return;
  15732. if (next == "[") inSet = true;
  15733. else if (inSet && next == "]") inSet = false;
  15734. }
  15735. escaped = !escaped && next == "\\";
  15736. }
  15737. }
  15738. // Used as scratch variables to communicate multiple values without
  15739. // consing up tons of objects.
  15740. var type, content;
  15741. function ret(tp, style, cont) {
  15742. type = tp; content = cont;
  15743. return style;
  15744. }
  15745. function tokenBase(stream, state) {
  15746. var ch = stream.next();
  15747. if (ch == '"' || ch == "'") {
  15748. state.tokenize = tokenString(ch);
  15749. return state.tokenize(stream, state);
  15750. } else if (ch == "." && stream.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/)) {
  15751. return ret("number", "number");
  15752. } else if (ch == "." && stream.match("..")) {
  15753. return ret("spread", "meta");
  15754. } else if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
  15755. return ret(ch);
  15756. } else if (ch == "=" && stream.eat(">")) {
  15757. return ret("=>", "operator");
  15758. } else if (ch == "0" && stream.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/)) {
  15759. return ret("number", "number");
  15760. } else if (/\d/.test(ch)) {
  15761. stream.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/);
  15762. return ret("number", "number");
  15763. } else if (ch == "/") {
  15764. if (stream.eat("*")) {
  15765. state.tokenize = tokenComment;
  15766. return tokenComment(stream, state);
  15767. } else if (stream.eat("/")) {
  15768. stream.skipToEnd();
  15769. return ret("comment", "comment");
  15770. } else if (expressionAllowed(stream, state, 1)) {
  15771. readRegexp(stream);
  15772. stream.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/);
  15773. return ret("regexp", "string-2");
  15774. } else {
  15775. stream.eat("=");
  15776. return ret("operator", "operator", stream.current());
  15777. }
  15778. } else if (ch == "`") {
  15779. state.tokenize = tokenQuasi;
  15780. return tokenQuasi(stream, state);
  15781. } else if (ch == "#" && stream.peek() == "!") {
  15782. stream.skipToEnd();
  15783. return ret("meta", "meta");
  15784. } else if (ch == "#" && stream.eatWhile(wordRE)) {
  15785. return ret("variable", "property")
  15786. } else if (ch == "<" && stream.match("!--") ||
  15787. (ch == "-" && stream.match("->") && !/\S/.test(stream.string.slice(0, stream.start)))) {
  15788. stream.skipToEnd()
  15789. return ret("comment", "comment")
  15790. } else if (isOperatorChar.test(ch)) {
  15791. if (ch != ">" || !state.lexical || state.lexical.type != ">") {
  15792. if (stream.eat("=")) {
  15793. if (ch == "!" || ch == "=") stream.eat("=")
  15794. } else if (/[<>*+\-|&?]/.test(ch)) {
  15795. stream.eat(ch)
  15796. if (ch == ">") stream.eat(ch)
  15797. }
  15798. }
  15799. if (ch == "?" && stream.eat(".")) return ret(".")
  15800. return ret("operator", "operator", stream.current());
  15801. } else if (wordRE.test(ch)) {
  15802. stream.eatWhile(wordRE);
  15803. var word = stream.current()
  15804. if (state.lastType != ".") {
  15805. if (keywords.propertyIsEnumerable(word)) {
  15806. var kw = keywords[word]
  15807. return ret(kw.type, kw.style, word)
  15808. }
  15809. if (word == "async" && stream.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/, false))
  15810. return ret("async", "keyword", word)
  15811. }
  15812. return ret("variable", "variable", word)
  15813. }
  15814. }
  15815. function tokenString(quote) {
  15816. return function(stream, state) {
  15817. var escaped = false, next;
  15818. if (jsonldMode && stream.peek() == "@" && stream.match(isJsonldKeyword)){
  15819. state.tokenize = tokenBase;
  15820. return ret("jsonld-keyword", "meta");
  15821. }
  15822. while ((next = stream.next()) != null) {
  15823. if (next == quote && !escaped) break;
  15824. escaped = !escaped && next == "\\";
  15825. }
  15826. if (!escaped) state.tokenize = tokenBase;
  15827. return ret("string", "string");
  15828. };
  15829. }
  15830. function tokenComment(stream, state) {
  15831. var maybeEnd = false, ch;
  15832. while (ch = stream.next()) {
  15833. if (ch == "/" && maybeEnd) {
  15834. state.tokenize = tokenBase;
  15835. break;
  15836. }
  15837. maybeEnd = (ch == "*");
  15838. }
  15839. return ret("comment", "comment");
  15840. }
  15841. function tokenQuasi(stream, state) {
  15842. var escaped = false, next;
  15843. while ((next = stream.next()) != null) {
  15844. if (!escaped && (next == "`" || next == "$" && stream.eat("{"))) {
  15845. state.tokenize = tokenBase;
  15846. break;
  15847. }
  15848. escaped = !escaped && next == "\\";
  15849. }
  15850. return ret("quasi", "string-2", stream.current());
  15851. }
  15852. var brackets = "([{}])";
  15853. // This is a crude lookahead trick to try and notice that we're
  15854. // parsing the argument patterns for a fat-arrow function before we
  15855. // actually hit the arrow token. It only works if the arrow is on
  15856. // the same line as the arguments and there's no strange noise
  15857. // (comments) in between. Fallback is to only notice when we hit the
  15858. // arrow, and not declare the arguments as locals for the arrow
  15859. // body.
  15860. function findFatArrow(stream, state) {
  15861. if (state.fatArrowAt) state.fatArrowAt = null;
  15862. var arrow = stream.string.indexOf("=>", stream.start);
  15863. if (arrow < 0) return;
  15864. if (isTS) { // Try to skip TypeScript return type declarations after the arguments
  15865. var m = /:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(stream.string.slice(stream.start, arrow))
  15866. if (m) arrow = m.index
  15867. }
  15868. var depth = 0, sawSomething = false;
  15869. for (var pos = arrow - 1; pos >= 0; --pos) {
  15870. var ch = stream.string.charAt(pos);
  15871. var bracket = brackets.indexOf(ch);
  15872. if (bracket >= 0 && bracket < 3) {
  15873. if (!depth) { ++pos; break; }
  15874. if (--depth == 0) { if (ch == "(") sawSomething = true; break; }
  15875. } else if (bracket >= 3 && bracket < 6) {
  15876. ++depth;
  15877. } else if (wordRE.test(ch)) {
  15878. sawSomething = true;
  15879. } else if (/["'\/`]/.test(ch)) {
  15880. for (;; --pos) {
  15881. if (pos == 0) return
  15882. var next = stream.string.charAt(pos - 1)
  15883. if (next == ch && stream.string.charAt(pos - 2) != "\\") { pos--; break }
  15884. }
  15885. } else if (sawSomething && !depth) {
  15886. ++pos;
  15887. break;
  15888. }
  15889. }
  15890. if (sawSomething && !depth) state.fatArrowAt = pos;
  15891. }
  15892. // Parser
  15893. var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true,
  15894. "regexp": true, "this": true, "import": true, "jsonld-keyword": true};
  15895. function JSLexical(indented, column, type, align, prev, info) {
  15896. this.indented = indented;
  15897. this.column = column;
  15898. this.type = type;
  15899. this.prev = prev;
  15900. this.info = info;
  15901. if (align != null) this.align = align;
  15902. }
  15903. function inScope(state, varname) {
  15904. if (!trackScope) return false
  15905. for (var v = state.localVars; v; v = v.next)
  15906. if (v.name == varname) return true;
  15907. for (var cx = state.context; cx; cx = cx.prev) {
  15908. for (var v = cx.vars; v; v = v.next)
  15909. if (v.name == varname) return true;
  15910. }
  15911. }
  15912. function parseJS(state, style, type, content, stream) {
  15913. var cc = state.cc;
  15914. // Communicate our context to the combinators.
  15915. // (Less wasteful than consing up a hundred closures on every call.)
  15916. cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; cx.style = style;
  15917. if (!state.lexical.hasOwnProperty("align"))
  15918. state.lexical.align = true;
  15919. while(true) {
  15920. var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement;
  15921. if (combinator(type, content)) {
  15922. while(cc.length && cc[cc.length - 1].lex)
  15923. cc.pop()();
  15924. if (cx.marked) return cx.marked;
  15925. if (type == "variable" && inScope(state, content)) return "variable-2";
  15926. return style;
  15927. }
  15928. }
  15929. }
  15930. // Combinator utils
  15931. var cx = {state: null, column: null, marked: null, cc: null};
  15932. function pass() {
  15933. for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]);
  15934. }
  15935. function cont() {
  15936. pass.apply(null, arguments);
  15937. return true;
  15938. }
  15939. function inList(name, list) {
  15940. for (var v = list; v; v = v.next) if (v.name == name) return true
  15941. return false;
  15942. }
  15943. function register(varname) {
  15944. var state = cx.state;
  15945. cx.marked = "def";
  15946. if (!trackScope) return
  15947. if (state.context) {
  15948. if (state.lexical.info == "var" && state.context && state.context.block) {
  15949. // FIXME function decls are also not block scoped
  15950. var newContext = registerVarScoped(varname, state.context)
  15951. if (newContext != null) {
  15952. state.context = newContext
  15953. return
  15954. }
  15955. } else if (!inList(varname, state.localVars)) {
  15956. state.localVars = new Var(varname, state.localVars)
  15957. return
  15958. }
  15959. }
  15960. // Fall through means this is global
  15961. if (parserConfig.globalVars && !inList(varname, state.globalVars))
  15962. state.globalVars = new Var(varname, state.globalVars)
  15963. }
  15964. function registerVarScoped(varname, context) {
  15965. if (!context) {
  15966. return null
  15967. } else if (context.block) {
  15968. var inner = registerVarScoped(varname, context.prev)
  15969. if (!inner) return null
  15970. if (inner == context.prev) return context
  15971. return new Context(inner, context.vars, true)
  15972. } else if (inList(varname, context.vars)) {
  15973. return context
  15974. } else {
  15975. return new Context(context.prev, new Var(varname, context.vars), false)
  15976. }
  15977. }
  15978. function isModifier(name) {
  15979. return name == "public" || name == "private" || name == "protected" || name == "abstract" || name == "readonly"
  15980. }
  15981. // Combinators
  15982. function Context(prev, vars, block) { this.prev = prev; this.vars = vars; this.block = block }
  15983. function Var(name, next) { this.name = name; this.next = next }
  15984. var defaultVars = new Var("this", new Var("arguments", null))
  15985. function pushcontext() {
  15986. cx.state.context = new Context(cx.state.context, cx.state.localVars, false)
  15987. cx.state.localVars = defaultVars
  15988. }
  15989. function pushblockcontext() {
  15990. cx.state.context = new Context(cx.state.context, cx.state.localVars, true)
  15991. cx.state.localVars = null
  15992. }
  15993. pushcontext.lex = pushblockcontext.lex = true
  15994. function popcontext() {
  15995. cx.state.localVars = cx.state.context.vars
  15996. cx.state.context = cx.state.context.prev
  15997. }
  15998. popcontext.lex = true
  15999. function pushlex(type, info) {
  16000. var result = function() {
  16001. var state = cx.state, indent = state.indented;
  16002. if (state.lexical.type == "stat") indent = state.lexical.indented;
  16003. else for (var outer = state.lexical; outer && outer.type == ")" && outer.align; outer = outer.prev)
  16004. indent = outer.indented;
  16005. state.lexical = new JSLexical(indent, cx.stream.column(), type, null, state.lexical, info);
  16006. };
  16007. result.lex = true;
  16008. return result;
  16009. }
  16010. function poplex() {
  16011. var state = cx.state;
  16012. if (state.lexical.prev) {
  16013. if (state.lexical.type == ")")
  16014. state.indented = state.lexical.indented;
  16015. state.lexical = state.lexical.prev;
  16016. }
  16017. }
  16018. poplex.lex = true;
  16019. function expect(wanted) {
  16020. function exp(type) {
  16021. if (type == wanted) return cont();
  16022. else if (wanted == ";" || type == "}" || type == ")" || type == "]") return pass();
  16023. else return cont(exp);
  16024. };
  16025. return exp;
  16026. }
  16027. function statement(type, value) {
  16028. if (type == "var") return cont(pushlex("vardef", value), vardef, expect(";"), poplex);
  16029. if (type == "keyword a") return cont(pushlex("form"), parenExpr, statement, poplex);
  16030. if (type == "keyword b") return cont(pushlex("form"), statement, poplex);
  16031. if (type == "keyword d") return cx.stream.match(/^\s*$/, false) ? cont() : cont(pushlex("stat"), maybeexpression, expect(";"), poplex);
  16032. if (type == "debugger") return cont(expect(";"));
  16033. if (type == "{") return cont(pushlex("}"), pushblockcontext, block, poplex, popcontext);
  16034. if (type == ";") return cont();
  16035. if (type == "if") {
  16036. if (cx.state.lexical.info == "else" && cx.state.cc[cx.state.cc.length - 1] == poplex)
  16037. cx.state.cc.pop()();
  16038. return cont(pushlex("form"), parenExpr, statement, poplex, maybeelse);
  16039. }
  16040. if (type == "function") return cont(functiondef);
  16041. if (type == "for") return cont(pushlex("form"), pushblockcontext, forspec, statement, popcontext, poplex);
  16042. if (type == "class" || (isTS && value == "interface")) {
  16043. cx.marked = "keyword"
  16044. return cont(pushlex("form", type == "class" ? type : value), className, poplex)
  16045. }
  16046. if (type == "variable") {
  16047. if (isTS && value == "declare") {
  16048. cx.marked = "keyword"
  16049. return cont(statement)
  16050. } else if (isTS && (value == "module" || value == "enum" || value == "type") && cx.stream.match(/^\s*\w/, false)) {
  16051. cx.marked = "keyword"
  16052. if (value == "enum") return cont(enumdef);
  16053. else if (value == "type") return cont(typename, expect("operator"), typeexpr, expect(";"));
  16054. else return cont(pushlex("form"), pattern, expect("{"), pushlex("}"), block, poplex, poplex)
  16055. } else if (isTS && value == "namespace") {
  16056. cx.marked = "keyword"
  16057. return cont(pushlex("form"), expression, statement, poplex)
  16058. } else if (isTS && value == "abstract") {
  16059. cx.marked = "keyword"
  16060. return cont(statement)
  16061. } else {
  16062. return cont(pushlex("stat"), maybelabel);
  16063. }
  16064. }
  16065. if (type == "switch") return cont(pushlex("form"), parenExpr, expect("{"), pushlex("}", "switch"), pushblockcontext,
  16066. block, poplex, poplex, popcontext);
  16067. if (type == "case") return cont(expression, expect(":"));
  16068. if (type == "default") return cont(expect(":"));
  16069. if (type == "catch") return cont(pushlex("form"), pushcontext, maybeCatchBinding, statement, poplex, popcontext);
  16070. if (type == "export") return cont(pushlex("stat"), afterExport, poplex);
  16071. if (type == "import") return cont(pushlex("stat"), afterImport, poplex);
  16072. if (type == "async") return cont(statement)
  16073. if (value == "@") return cont(expression, statement)
  16074. return pass(pushlex("stat"), expression, expect(";"), poplex);
  16075. }
  16076. function maybeCatchBinding(type) {
  16077. if (type == "(") return cont(funarg, expect(")"))
  16078. }
  16079. function expression(type, value) {
  16080. return expressionInner(type, value, false);
  16081. }
  16082. function expressionNoComma(type, value) {
  16083. return expressionInner(type, value, true);
  16084. }
  16085. function parenExpr(type) {
  16086. if (type != "(") return pass()
  16087. return cont(pushlex(")"), maybeexpression, expect(")"), poplex)
  16088. }
  16089. function expressionInner(type, value, noComma) {
  16090. if (cx.state.fatArrowAt == cx.stream.start) {
  16091. var body = noComma ? arrowBodyNoComma : arrowBody;
  16092. if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, expect("=>"), body, popcontext);
  16093. else if (type == "variable") return pass(pushcontext, pattern, expect("=>"), body, popcontext);
  16094. }
  16095. var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;
  16096. if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);
  16097. if (type == "function") return cont(functiondef, maybeop);
  16098. if (type == "class" || (isTS && value == "interface")) { cx.marked = "keyword"; return cont(pushlex("form"), classExpression, poplex); }
  16099. if (type == "keyword c" || type == "async") return cont(noComma ? expressionNoComma : expression);
  16100. if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeop);
  16101. if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression);
  16102. if (type == "[") return cont(pushlex("]"), arrayLiteral, poplex, maybeop);
  16103. if (type == "{") return contCommasep(objprop, "}", null, maybeop);
  16104. if (type == "quasi") return pass(quasi, maybeop);
  16105. if (type == "new") return cont(maybeTarget(noComma));
  16106. return cont();
  16107. }
  16108. function maybeexpression(type) {
  16109. if (type.match(/[;\}\)\],]/)) return pass();
  16110. return pass(expression);
  16111. }
  16112. function maybeoperatorComma(type, value) {
  16113. if (type == ",") return cont(maybeexpression);
  16114. return maybeoperatorNoComma(type, value, false);
  16115. }
  16116. function maybeoperatorNoComma(type, value, noComma) {
  16117. var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma;
  16118. var expr = noComma == false ? expression : expressionNoComma;
  16119. if (type == "=>") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext);
  16120. if (type == "operator") {
  16121. if (/\+\+|--/.test(value) || isTS && value == "!") return cont(me);
  16122. if (isTS && value == "<" && cx.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/, false))
  16123. return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, me);
  16124. if (value == "?") return cont(expression, expect(":"), expr);
  16125. return cont(expr);
  16126. }
  16127. if (type == "quasi") { return pass(quasi, me); }
  16128. if (type == ";") return;
  16129. if (type == "(") return contCommasep(expressionNoComma, ")", "call", me);
  16130. if (type == ".") return cont(property, me);
  16131. if (type == "[") return cont(pushlex("]"), maybeexpression, expect("]"), poplex, me);
  16132. if (isTS && value == "as") { cx.marked = "keyword"; return cont(typeexpr, me) }
  16133. if (type == "regexp") {
  16134. cx.state.lastType = cx.marked = "operator"
  16135. cx.stream.backUp(cx.stream.pos - cx.stream.start - 1)
  16136. return cont(expr)
  16137. }
  16138. }
  16139. function quasi(type, value) {
  16140. if (type != "quasi") return pass();
  16141. if (value.slice(value.length - 2) != "${") return cont(quasi);
  16142. return cont(maybeexpression, continueQuasi);
  16143. }
  16144. function continueQuasi(type) {
  16145. if (type == "}") {
  16146. cx.marked = "string-2";
  16147. cx.state.tokenize = tokenQuasi;
  16148. return cont(quasi);
  16149. }
  16150. }
  16151. function arrowBody(type) {
  16152. findFatArrow(cx.stream, cx.state);
  16153. return pass(type == "{" ? statement : expression);
  16154. }
  16155. function arrowBodyNoComma(type) {
  16156. findFatArrow(cx.stream, cx.state);
  16157. return pass(type == "{" ? statement : expressionNoComma);
  16158. }
  16159. function maybeTarget(noComma) {
  16160. return function(type) {
  16161. if (type == ".") return cont(noComma ? targetNoComma : target);
  16162. else if (type == "variable" && isTS) return cont(maybeTypeArgs, noComma ? maybeoperatorNoComma : maybeoperatorComma)
  16163. else return pass(noComma ? expressionNoComma : expression);
  16164. };
  16165. }
  16166. function target(_, value) {
  16167. if (value == "target") { cx.marked = "keyword"; return cont(maybeoperatorComma); }
  16168. }
  16169. function targetNoComma(_, value) {
  16170. if (value == "target") { cx.marked = "keyword"; return cont(maybeoperatorNoComma); }
  16171. }
  16172. function maybelabel(type) {
  16173. if (type == ":") return cont(poplex, statement);
  16174. return pass(maybeoperatorComma, expect(";"), poplex);
  16175. }
  16176. function property(type) {
  16177. if (type == "variable") {cx.marked = "property"; return cont();}
  16178. }
  16179. function objprop(type, value) {
  16180. if (type == "async") {
  16181. cx.marked = "property";
  16182. return cont(objprop);
  16183. } else if (type == "variable" || cx.style == "keyword") {
  16184. cx.marked = "property";
  16185. if (value == "get" || value == "set") return cont(getterSetter);
  16186. var m // Work around fat-arrow-detection complication for detecting typescript typed arrow params
  16187. if (isTS && cx.state.fatArrowAt == cx.stream.start && (m = cx.stream.match(/^\s*:\s*/, false)))
  16188. cx.state.fatArrowAt = cx.stream.pos + m[0].length
  16189. return cont(afterprop);
  16190. } else if (type == "number" || type == "string") {
  16191. cx.marked = jsonldMode ? "property" : (cx.style + " property");
  16192. return cont(afterprop);
  16193. } else if (type == "jsonld-keyword") {
  16194. return cont(afterprop);
  16195. } else if (isTS && isModifier(value)) {
  16196. cx.marked = "keyword"
  16197. return cont(objprop)
  16198. } else if (type == "[") {
  16199. return cont(expression, maybetype, expect("]"), afterprop);
  16200. } else if (type == "spread") {
  16201. return cont(expressionNoComma, afterprop);
  16202. } else if (value == "*") {
  16203. cx.marked = "keyword";
  16204. return cont(objprop);
  16205. } else if (type == ":") {
  16206. return pass(afterprop)
  16207. }
  16208. }
  16209. function getterSetter(type) {
  16210. if (type != "variable") return pass(afterprop);
  16211. cx.marked = "property";
  16212. return cont(functiondef);
  16213. }
  16214. function afterprop(type) {
  16215. if (type == ":") return cont(expressionNoComma);
  16216. if (type == "(") return pass(functiondef);
  16217. }
  16218. function commasep(what, end, sep) {
  16219. function proceed(type, value) {
  16220. if (sep ? sep.indexOf(type) > -1 : type == ",") {
  16221. var lex = cx.state.lexical;
  16222. if (lex.info == "call") lex.pos = (lex.pos || 0) + 1;
  16223. return cont(function(type, value) {
  16224. if (type == end || value == end) return pass()
  16225. return pass(what)
  16226. }, proceed);
  16227. }
  16228. if (type == end || value == end) return cont();
  16229. if (sep && sep.indexOf(";") > -1) return pass(what)
  16230. return cont(expect(end));
  16231. }
  16232. return function(type, value) {
  16233. if (type == end || value == end) return cont();
  16234. return pass(what, proceed);
  16235. };
  16236. }
  16237. function contCommasep(what, end, info) {
  16238. for (var i = 3; i < arguments.length; i++)
  16239. cx.cc.push(arguments[i]);
  16240. return cont(pushlex(end, info), commasep(what, end), poplex);
  16241. }
  16242. function block(type) {
  16243. if (type == "}") return cont();
  16244. return pass(statement, block);
  16245. }
  16246. function maybetype(type, value) {
  16247. if (isTS) {
  16248. if (type == ":") return cont(typeexpr);
  16249. if (value == "?") return cont(maybetype);
  16250. }
  16251. }
  16252. function maybetypeOrIn(type, value) {
  16253. if (isTS && (type == ":" || value == "in")) return cont(typeexpr)
  16254. }
  16255. function mayberettype(type) {
  16256. if (isTS && type == ":") {
  16257. if (cx.stream.match(/^\s*\w+\s+is\b/, false)) return cont(expression, isKW, typeexpr)
  16258. else return cont(typeexpr)
  16259. }
  16260. }
  16261. function isKW(_, value) {
  16262. if (value == "is") {
  16263. cx.marked = "keyword"
  16264. return cont()
  16265. }
  16266. }
  16267. function typeexpr(type, value) {
  16268. if (value == "keyof" || value == "typeof" || value == "infer" || value == "readonly") {
  16269. cx.marked = "keyword"
  16270. return cont(value == "typeof" ? expressionNoComma : typeexpr)
  16271. }
  16272. if (type == "variable" || value == "void") {
  16273. cx.marked = "type"
  16274. return cont(afterType)
  16275. }
  16276. if (value == "|" || value == "&") return cont(typeexpr)
  16277. if (type == "string" || type == "number" || type == "atom") return cont(afterType);
  16278. if (type == "[") return cont(pushlex("]"), commasep(typeexpr, "]", ","), poplex, afterType)
  16279. if (type == "{") return cont(pushlex("}"), typeprops, poplex, afterType)
  16280. if (type == "(") return cont(commasep(typearg, ")"), maybeReturnType, afterType)
  16281. if (type == "<") return cont(commasep(typeexpr, ">"), typeexpr)
  16282. if (type == "quasi") { return pass(quasiType, afterType); }
  16283. }
  16284. function maybeReturnType(type) {
  16285. if (type == "=>") return cont(typeexpr)
  16286. }
  16287. function typeprops(type) {
  16288. if (type.match(/[\}\)\]]/)) return cont()
  16289. if (type == "," || type == ";") return cont(typeprops)
  16290. return pass(typeprop, typeprops)
  16291. }
  16292. function typeprop(type, value) {
  16293. if (type == "variable" || cx.style == "keyword") {
  16294. cx.marked = "property"
  16295. return cont(typeprop)
  16296. } else if (value == "?" || type == "number" || type == "string") {
  16297. return cont(typeprop)
  16298. } else if (type == ":") {
  16299. return cont(typeexpr)
  16300. } else if (type == "[") {
  16301. return cont(expect("variable"), maybetypeOrIn, expect("]"), typeprop)
  16302. } else if (type == "(") {
  16303. return pass(functiondecl, typeprop)
  16304. } else if (!type.match(/[;\}\)\],]/)) {
  16305. return cont()
  16306. }
  16307. }
  16308. function quasiType(type, value) {
  16309. if (type != "quasi") return pass();
  16310. if (value.slice(value.length - 2) != "${") return cont(quasiType);
  16311. return cont(typeexpr, continueQuasiType);
  16312. }
  16313. function continueQuasiType(type) {
  16314. if (type == "}") {
  16315. cx.marked = "string-2";
  16316. cx.state.tokenize = tokenQuasi;
  16317. return cont(quasiType);
  16318. }
  16319. }
  16320. function typearg(type, value) {
  16321. if (type == "variable" && cx.stream.match(/^\s*[?:]/, false) || value == "?") return cont(typearg)
  16322. if (type == ":") return cont(typeexpr)
  16323. if (type == "spread") return cont(typearg)
  16324. return pass(typeexpr)
  16325. }
  16326. function afterType(type, value) {
  16327. if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType)
  16328. if (value == "|" || type == "." || value == "&") return cont(typeexpr)
  16329. if (type == "[") return cont(typeexpr, expect("]"), afterType)
  16330. if (value == "extends" || value == "implements") { cx.marked = "keyword"; return cont(typeexpr) }
  16331. if (value == "?") return cont(typeexpr, expect(":"), typeexpr)
  16332. }
  16333. function maybeTypeArgs(_, value) {
  16334. if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType)
  16335. }
  16336. function typeparam() {
  16337. return pass(typeexpr, maybeTypeDefault)
  16338. }
  16339. function maybeTypeDefault(_, value) {
  16340. if (value == "=") return cont(typeexpr)
  16341. }
  16342. function vardef(_, value) {
  16343. if (value == "enum") {cx.marked = "keyword"; return cont(enumdef)}
  16344. return pass(pattern, maybetype, maybeAssign, vardefCont);
  16345. }
  16346. function pattern(type, value) {
  16347. if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(pattern) }
  16348. if (type == "variable") { register(value); return cont(); }
  16349. if (type == "spread") return cont(pattern);
  16350. if (type == "[") return contCommasep(eltpattern, "]");
  16351. if (type == "{") return contCommasep(proppattern, "}");
  16352. }
  16353. function proppattern(type, value) {
  16354. if (type == "variable" && !cx.stream.match(/^\s*:/, false)) {
  16355. register(value);
  16356. return cont(maybeAssign);
  16357. }
  16358. if (type == "variable") cx.marked = "property";
  16359. if (type == "spread") return cont(pattern);
  16360. if (type == "}") return pass();
  16361. if (type == "[") return cont(expression, expect(']'), expect(':'), proppattern);
  16362. return cont(expect(":"), pattern, maybeAssign);
  16363. }
  16364. function eltpattern() {
  16365. return pass(pattern, maybeAssign)
  16366. }
  16367. function maybeAssign(_type, value) {
  16368. if (value == "=") return cont(expressionNoComma);
  16369. }
  16370. function vardefCont(type) {
  16371. if (type == ",") return cont(vardef);
  16372. }
  16373. function maybeelse(type, value) {
  16374. if (type == "keyword b" && value == "else") return cont(pushlex("form", "else"), statement, poplex);
  16375. }
  16376. function forspec(type, value) {
  16377. if (value == "await") return cont(forspec);
  16378. if (type == "(") return cont(pushlex(")"), forspec1, poplex);
  16379. }
  16380. function forspec1(type) {
  16381. if (type == "var") return cont(vardef, forspec2);
  16382. if (type == "variable") return cont(forspec2);
  16383. return pass(forspec2)
  16384. }
  16385. function forspec2(type, value) {
  16386. if (type == ")") return cont()
  16387. if (type == ";") return cont(forspec2)
  16388. if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression, forspec2) }
  16389. return pass(expression, forspec2)
  16390. }
  16391. function functiondef(type, value) {
  16392. if (value == "*") {cx.marked = "keyword"; return cont(functiondef);}
  16393. if (type == "variable") {register(value); return cont(functiondef);}
  16394. if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, statement, popcontext);
  16395. if (isTS && value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondef)
  16396. }
  16397. function functiondecl(type, value) {
  16398. if (value == "*") {cx.marked = "keyword"; return cont(functiondecl);}
  16399. if (type == "variable") {register(value); return cont(functiondecl);}
  16400. if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, popcontext);
  16401. if (isTS && value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondecl)
  16402. }
  16403. function typename(type, value) {
  16404. if (type == "keyword" || type == "variable") {
  16405. cx.marked = "type"
  16406. return cont(typename)
  16407. } else if (value == "<") {
  16408. return cont(pushlex(">"), commasep(typeparam, ">"), poplex)
  16409. }
  16410. }
  16411. function funarg(type, value) {
  16412. if (value == "@") cont(expression, funarg)
  16413. if (type == "spread") return cont(funarg);
  16414. if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(funarg); }
  16415. if (isTS && type == "this") return cont(maybetype, maybeAssign)
  16416. return pass(pattern, maybetype, maybeAssign);
  16417. }
  16418. function classExpression(type, value) {
  16419. // Class expressions may have an optional name.
  16420. if (type == "variable") return className(type, value);
  16421. return classNameAfter(type, value);
  16422. }
  16423. function className(type, value) {
  16424. if (type == "variable") {register(value); return cont(classNameAfter);}
  16425. }
  16426. function classNameAfter(type, value) {
  16427. if (value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, classNameAfter)
  16428. if (value == "extends" || value == "implements" || (isTS && type == ",")) {
  16429. if (value == "implements") cx.marked = "keyword";
  16430. return cont(isTS ? typeexpr : expression, classNameAfter);
  16431. }
  16432. if (type == "{") return cont(pushlex("}"), classBody, poplex);
  16433. }
  16434. function classBody(type, value) {
  16435. if (type == "async" ||
  16436. (type == "variable" &&
  16437. (value == "static" || value == "get" || value == "set" || (isTS && isModifier(value))) &&
  16438. cx.stream.match(/^\s+[\w$\xa1-\uffff]/, false))) {
  16439. cx.marked = "keyword";
  16440. return cont(classBody);
  16441. }
  16442. if (type == "variable" || cx.style == "keyword") {
  16443. cx.marked = "property";
  16444. return cont(classfield, classBody);
  16445. }
  16446. if (type == "number" || type == "string") return cont(classfield, classBody);
  16447. if (type == "[")
  16448. return cont(expression, maybetype, expect("]"), classfield, classBody)
  16449. if (value == "*") {
  16450. cx.marked = "keyword";
  16451. return cont(classBody);
  16452. }
  16453. if (isTS && type == "(") return pass(functiondecl, classBody)
  16454. if (type == ";" || type == ",") return cont(classBody);
  16455. if (type == "}") return cont();
  16456. if (value == "@") return cont(expression, classBody)
  16457. }
  16458. function classfield(type, value) {
  16459. if (value == "!") return cont(classfield)
  16460. if (value == "?") return cont(classfield)
  16461. if (type == ":") return cont(typeexpr, maybeAssign)
  16462. if (value == "=") return cont(expressionNoComma)
  16463. var context = cx.state.lexical.prev, isInterface = context && context.info == "interface"
  16464. return pass(isInterface ? functiondecl : functiondef)
  16465. }
  16466. function afterExport(type, value) {
  16467. if (value == "*") { cx.marked = "keyword"; return cont(maybeFrom, expect(";")); }
  16468. if (value == "default") { cx.marked = "keyword"; return cont(expression, expect(";")); }
  16469. if (type == "{") return cont(commasep(exportField, "}"), maybeFrom, expect(";"));
  16470. return pass(statement);
  16471. }
  16472. function exportField(type, value) {
  16473. if (value == "as") { cx.marked = "keyword"; return cont(expect("variable")); }
  16474. if (type == "variable") return pass(expressionNoComma, exportField);
  16475. }
  16476. function afterImport(type) {
  16477. if (type == "string") return cont();
  16478. if (type == "(") return pass(expression);
  16479. if (type == ".") return pass(maybeoperatorComma);
  16480. return pass(importSpec, maybeMoreImports, maybeFrom);
  16481. }
  16482. function importSpec(type, value) {
  16483. if (type == "{") return contCommasep(importSpec, "}");
  16484. if (type == "variable") register(value);
  16485. if (value == "*") cx.marked = "keyword";
  16486. return cont(maybeAs);
  16487. }
  16488. function maybeMoreImports(type) {
  16489. if (type == ",") return cont(importSpec, maybeMoreImports)
  16490. }
  16491. function maybeAs(_type, value) {
  16492. if (value == "as") { cx.marked = "keyword"; return cont(importSpec); }
  16493. }
  16494. function maybeFrom(_type, value) {
  16495. if (value == "from") { cx.marked = "keyword"; return cont(expression); }
  16496. }
  16497. function arrayLiteral(type) {
  16498. if (type == "]") return cont();
  16499. return pass(commasep(expressionNoComma, "]"));
  16500. }
  16501. function enumdef() {
  16502. return pass(pushlex("form"), pattern, expect("{"), pushlex("}"), commasep(enummember, "}"), poplex, poplex)
  16503. }
  16504. function enummember() {
  16505. return pass(pattern, maybeAssign);
  16506. }
  16507. function isContinuedStatement(state, textAfter) {
  16508. return state.lastType == "operator" || state.lastType == "," ||
  16509. isOperatorChar.test(textAfter.charAt(0)) ||
  16510. /[,.]/.test(textAfter.charAt(0));
  16511. }
  16512. function expressionAllowed(stream, state, backUp) {
  16513. return state.tokenize == tokenBase &&
  16514. /^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(state.lastType) ||
  16515. (state.lastType == "quasi" && /\{\s*$/.test(stream.string.slice(0, stream.pos - (backUp || 0))))
  16516. }
  16517. // Interface
  16518. return {
  16519. startState: function(basecolumn) {
  16520. var state = {
  16521. tokenize: tokenBase,
  16522. lastType: "sof",
  16523. cc: [],
  16524. lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false),
  16525. localVars: parserConfig.localVars,
  16526. context: parserConfig.localVars && new Context(null, null, false),
  16527. indented: basecolumn || 0
  16528. };
  16529. if (parserConfig.globalVars && typeof parserConfig.globalVars == "object")
  16530. state.globalVars = parserConfig.globalVars;
  16531. return state;
  16532. },
  16533. token: function(stream, state) {
  16534. if (stream.sol()) {
  16535. if (!state.lexical.hasOwnProperty("align"))
  16536. state.lexical.align = false;
  16537. state.indented = stream.indentation();
  16538. findFatArrow(stream, state);
  16539. }
  16540. if (state.tokenize != tokenComment && stream.eatSpace()) return null;
  16541. var style = state.tokenize(stream, state);
  16542. if (type == "comment") return style;
  16543. state.lastType = type == "operator" && (content == "++" || content == "--") ? "incdec" : type;
  16544. return parseJS(state, style, type, content, stream);
  16545. },
  16546. indent: function(state, textAfter) {
  16547. if (state.tokenize == tokenComment || state.tokenize == tokenQuasi) return CodeMirror.Pass;
  16548. if (state.tokenize != tokenBase) return 0;
  16549. var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical, top
  16550. // Kludge to prevent 'maybelse' from blocking lexical scope pops
  16551. if (!/^\s*else\b/.test(textAfter)) for (var i = state.cc.length - 1; i >= 0; --i) {
  16552. var c = state.cc[i];
  16553. if (c == poplex) lexical = lexical.prev;
  16554. else if (c != maybeelse && c != popcontext) break;
  16555. }
  16556. while ((lexical.type == "stat" || lexical.type == "form") &&
  16557. (firstChar == "}" || ((top = state.cc[state.cc.length - 1]) &&
  16558. (top == maybeoperatorComma || top == maybeoperatorNoComma) &&
  16559. !/^[,\.=+\-*:?[\(]/.test(textAfter))))
  16560. lexical = lexical.prev;
  16561. if (statementIndent && lexical.type == ")" && lexical.prev.type == "stat")
  16562. lexical = lexical.prev;
  16563. var type = lexical.type, closing = firstChar == type;
  16564. if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info.length + 1 : 0);
  16565. else if (type == "form" && firstChar == "{") return lexical.indented;
  16566. else if (type == "form") return lexical.indented + indentUnit;
  16567. else if (type == "stat")
  16568. return lexical.indented + (isContinuedStatement(state, textAfter) ? statementIndent || indentUnit : 0);
  16569. else if (lexical.info == "switch" && !closing && parserConfig.doubleIndentSwitch != false)
  16570. return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit);
  16571. else if (lexical.align) return lexical.column + (closing ? 0 : 1);
  16572. else return lexical.indented + (closing ? 0 : indentUnit);
  16573. },
  16574. electricInput: /^\s*(?:case .*?:|default:|\{|\})$/,
  16575. blockCommentStart: jsonMode ? null : "/*",
  16576. blockCommentEnd: jsonMode ? null : "*/",
  16577. blockCommentContinue: jsonMode ? null : " * ",
  16578. lineComment: jsonMode ? null : "//",
  16579. fold: "brace",
  16580. closeBrackets: "()[]{}''\"\"``",
  16581. helperType: jsonMode ? "json" : "javascript",
  16582. jsonldMode: jsonldMode,
  16583. jsonMode: jsonMode,
  16584. expressionAllowed: expressionAllowed,
  16585. skipExpression: function(state) {
  16586. parseJS(state, "atom", "atom", "true", new CodeMirror.StringStream("", 2, null))
  16587. }
  16588. };
  16589. });
  16590. CodeMirror.registerHelper("wordChars", "javascript", /[\w$]/);
  16591. CodeMirror.defineMIME("text/javascript", "javascript");
  16592. CodeMirror.defineMIME("text/ecmascript", "javascript");
  16593. CodeMirror.defineMIME("application/javascript", "javascript");
  16594. CodeMirror.defineMIME("application/x-javascript", "javascript");
  16595. CodeMirror.defineMIME("application/ecmascript", "javascript");
  16596. CodeMirror.defineMIME("application/json", { name: "javascript", json: true });
  16597. CodeMirror.defineMIME("application/x-json", { name: "javascript", json: true });
  16598. CodeMirror.defineMIME("application/manifest+json", { name: "javascript", json: true })
  16599. CodeMirror.defineMIME("application/ld+json", { name: "javascript", jsonld: true });
  16600. CodeMirror.defineMIME("text/typescript", { name: "javascript", typescript: true });
  16601. CodeMirror.defineMIME("application/typescript", { name: "javascript", typescript: true });
  16602. });
  16603. /***/ }),
  16604. /***/ 49047:
  16605. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  16606. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  16607. // Distributed under an MIT license: https://codemirror.net/LICENSE
  16608. (function(mod) {
  16609. if (true) // CommonJS
  16610. mod(__webpack_require__(4631), __webpack_require__(29589), __webpack_require__(52539));
  16611. else {}
  16612. })(function(CodeMirror) {
  16613. "use strict";
  16614. CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
  16615. var htmlMode = CodeMirror.getMode(cmCfg, "text/html");
  16616. var htmlModeMissing = htmlMode.name == "null"
  16617. function getMode(name) {
  16618. if (CodeMirror.findModeByName) {
  16619. var found = CodeMirror.findModeByName(name);
  16620. if (found) name = found.mime || found.mimes[0];
  16621. }
  16622. var mode = CodeMirror.getMode(cmCfg, name);
  16623. return mode.name == "null" ? null : mode;
  16624. }
  16625. // Should characters that affect highlighting be highlighted separate?
  16626. // Does not include characters that will be output (such as `1.` and `-` for lists)
  16627. if (modeCfg.highlightFormatting === undefined)
  16628. modeCfg.highlightFormatting = false;
  16629. // Maximum number of nested blockquotes. Set to 0 for infinite nesting.
  16630. // Excess `>` will emit `error` token.
  16631. if (modeCfg.maxBlockquoteDepth === undefined)
  16632. modeCfg.maxBlockquoteDepth = 0;
  16633. // Turn on task lists? ("- [ ] " and "- [x] ")
  16634. if (modeCfg.taskLists === undefined) modeCfg.taskLists = false;
  16635. // Turn on strikethrough syntax
  16636. if (modeCfg.strikethrough === undefined)
  16637. modeCfg.strikethrough = false;
  16638. if (modeCfg.emoji === undefined)
  16639. modeCfg.emoji = false;
  16640. if (modeCfg.fencedCodeBlockHighlighting === undefined)
  16641. modeCfg.fencedCodeBlockHighlighting = true;
  16642. if (modeCfg.fencedCodeBlockDefaultMode === undefined)
  16643. modeCfg.fencedCodeBlockDefaultMode = 'text/plain';
  16644. if (modeCfg.xml === undefined)
  16645. modeCfg.xml = true;
  16646. // Allow token types to be overridden by user-provided token types.
  16647. if (modeCfg.tokenTypeOverrides === undefined)
  16648. modeCfg.tokenTypeOverrides = {};
  16649. var tokenTypes = {
  16650. header: "header",
  16651. code: "comment",
  16652. quote: "quote",
  16653. list1: "variable-2",
  16654. list2: "variable-3",
  16655. list3: "keyword",
  16656. hr: "hr",
  16657. image: "image",
  16658. imageAltText: "image-alt-text",
  16659. imageMarker: "image-marker",
  16660. formatting: "formatting",
  16661. linkInline: "link",
  16662. linkEmail: "link",
  16663. linkText: "link",
  16664. linkHref: "string",
  16665. em: "em",
  16666. strong: "strong",
  16667. strikethrough: "strikethrough",
  16668. emoji: "builtin"
  16669. };
  16670. for (var tokenType in tokenTypes) {
  16671. if (tokenTypes.hasOwnProperty(tokenType) && modeCfg.tokenTypeOverrides[tokenType]) {
  16672. tokenTypes[tokenType] = modeCfg.tokenTypeOverrides[tokenType];
  16673. }
  16674. }
  16675. var hrRE = /^([*\-_])(?:\s*\1){2,}\s*$/
  16676. , listRE = /^(?:[*\-+]|^[0-9]+([.)]))\s+/
  16677. , taskListRE = /^\[(x| )\](?=\s)/i // Must follow listRE
  16678. , atxHeaderRE = modeCfg.allowAtxHeaderWithoutSpace ? /^(#+)/ : /^(#+)(?: |$)/
  16679. , setextHeaderRE = /^ {0,3}(?:\={1,}|-{2,})\s*$/
  16680. , textRE = /^[^#!\[\]*_\\<>` "'(~:]+/
  16681. , fencedCodeRE = /^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/
  16682. , linkDefRE = /^\s*\[[^\]]+?\]:.*$/ // naive link-definition
  16683. , punctuation = /[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/
  16684. , expandedTab = " " // CommonMark specifies tab as 4 spaces
  16685. function switchInline(stream, state, f) {
  16686. state.f = state.inline = f;
  16687. return f(stream, state);
  16688. }
  16689. function switchBlock(stream, state, f) {
  16690. state.f = state.block = f;
  16691. return f(stream, state);
  16692. }
  16693. function lineIsEmpty(line) {
  16694. return !line || !/\S/.test(line.string)
  16695. }
  16696. // Blocks
  16697. function blankLine(state) {
  16698. // Reset linkTitle state
  16699. state.linkTitle = false;
  16700. state.linkHref = false;
  16701. state.linkText = false;
  16702. // Reset EM state
  16703. state.em = false;
  16704. // Reset STRONG state
  16705. state.strong = false;
  16706. // Reset strikethrough state
  16707. state.strikethrough = false;
  16708. // Reset state.quote
  16709. state.quote = 0;
  16710. // Reset state.indentedCode
  16711. state.indentedCode = false;
  16712. if (state.f == htmlBlock) {
  16713. var exit = htmlModeMissing
  16714. if (!exit) {
  16715. var inner = CodeMirror.innerMode(htmlMode, state.htmlState)
  16716. exit = inner.mode.name == "xml" && inner.state.tagStart === null &&
  16717. (!inner.state.context && inner.state.tokenize.isInText)
  16718. }
  16719. if (exit) {
  16720. state.f = inlineNormal;
  16721. state.block = blockNormal;
  16722. state.htmlState = null;
  16723. }
  16724. }
  16725. // Reset state.trailingSpace
  16726. state.trailingSpace = 0;
  16727. state.trailingSpaceNewLine = false;
  16728. // Mark this line as blank
  16729. state.prevLine = state.thisLine
  16730. state.thisLine = {stream: null}
  16731. return null;
  16732. }
  16733. function blockNormal(stream, state) {
  16734. var firstTokenOnLine = stream.column() === state.indentation;
  16735. var prevLineLineIsEmpty = lineIsEmpty(state.prevLine.stream);
  16736. var prevLineIsIndentedCode = state.indentedCode;
  16737. var prevLineIsHr = state.prevLine.hr;
  16738. var prevLineIsList = state.list !== false;
  16739. var maxNonCodeIndentation = (state.listStack[state.listStack.length - 1] || 0) + 3;
  16740. state.indentedCode = false;
  16741. var lineIndentation = state.indentation;
  16742. // compute once per line (on first token)
  16743. if (state.indentationDiff === null) {
  16744. state.indentationDiff = state.indentation;
  16745. if (prevLineIsList) {
  16746. state.list = null;
  16747. // While this list item's marker's indentation is less than the deepest
  16748. // list item's content's indentation,pop the deepest list item
  16749. // indentation off the stack, and update block indentation state
  16750. while (lineIndentation < state.listStack[state.listStack.length - 1]) {
  16751. state.listStack.pop();
  16752. if (state.listStack.length) {
  16753. state.indentation = state.listStack[state.listStack.length - 1];
  16754. // less than the first list's indent -> the line is no longer a list
  16755. } else {
  16756. state.list = false;
  16757. }
  16758. }
  16759. if (state.list !== false) {
  16760. state.indentationDiff = lineIndentation - state.listStack[state.listStack.length - 1]
  16761. }
  16762. }
  16763. }
  16764. // not comprehensive (currently only for setext detection purposes)
  16765. var allowsInlineContinuation = (
  16766. !prevLineLineIsEmpty && !prevLineIsHr && !state.prevLine.header &&
  16767. (!prevLineIsList || !prevLineIsIndentedCode) &&
  16768. !state.prevLine.fencedCodeEnd
  16769. );
  16770. var isHr = (state.list === false || prevLineIsHr || prevLineLineIsEmpty) &&
  16771. state.indentation <= maxNonCodeIndentation && stream.match(hrRE);
  16772. var match = null;
  16773. if (state.indentationDiff >= 4 && (prevLineIsIndentedCode || state.prevLine.fencedCodeEnd ||
  16774. state.prevLine.header || prevLineLineIsEmpty)) {
  16775. stream.skipToEnd();
  16776. state.indentedCode = true;
  16777. return tokenTypes.code;
  16778. } else if (stream.eatSpace()) {
  16779. return null;
  16780. } else if (firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(atxHeaderRE)) && match[1].length <= 6) {
  16781. state.quote = 0;
  16782. state.header = match[1].length;
  16783. state.thisLine.header = true;
  16784. if (modeCfg.highlightFormatting) state.formatting = "header";
  16785. state.f = state.inline;
  16786. return getType(state);
  16787. } else if (state.indentation <= maxNonCodeIndentation && stream.eat('>')) {
  16788. state.quote = firstTokenOnLine ? 1 : state.quote + 1;
  16789. if (modeCfg.highlightFormatting) state.formatting = "quote";
  16790. stream.eatSpace();
  16791. return getType(state);
  16792. } else if (!isHr && !state.setext && firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(listRE))) {
  16793. var listType = match[1] ? "ol" : "ul";
  16794. state.indentation = lineIndentation + stream.current().length;
  16795. state.list = true;
  16796. state.quote = 0;
  16797. // Add this list item's content's indentation to the stack
  16798. state.listStack.push(state.indentation);
  16799. // Reset inline styles which shouldn't propagate across list items
  16800. state.em = false;
  16801. state.strong = false;
  16802. state.code = false;
  16803. state.strikethrough = false;
  16804. if (modeCfg.taskLists && stream.match(taskListRE, false)) {
  16805. state.taskList = true;
  16806. }
  16807. state.f = state.inline;
  16808. if (modeCfg.highlightFormatting) state.formatting = ["list", "list-" + listType];
  16809. return getType(state);
  16810. } else if (firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(fencedCodeRE, true))) {
  16811. state.quote = 0;
  16812. state.fencedEndRE = new RegExp(match[1] + "+ *$");
  16813. // try switching mode
  16814. state.localMode = modeCfg.fencedCodeBlockHighlighting && getMode(match[2] || modeCfg.fencedCodeBlockDefaultMode );
  16815. if (state.localMode) state.localState = CodeMirror.startState(state.localMode);
  16816. state.f = state.block = local;
  16817. if (modeCfg.highlightFormatting) state.formatting = "code-block";
  16818. state.code = -1
  16819. return getType(state);
  16820. // SETEXT has lowest block-scope precedence after HR, so check it after
  16821. // the others (code, blockquote, list...)
  16822. } else if (
  16823. // if setext set, indicates line after ---/===
  16824. state.setext || (
  16825. // line before ---/===
  16826. (!allowsInlineContinuation || !prevLineIsList) && !state.quote && state.list === false &&
  16827. !state.code && !isHr && !linkDefRE.test(stream.string) &&
  16828. (match = stream.lookAhead(1)) && (match = match.match(setextHeaderRE))
  16829. )
  16830. ) {
  16831. if ( !state.setext ) {
  16832. state.header = match[0].charAt(0) == '=' ? 1 : 2;
  16833. state.setext = state.header;
  16834. } else {
  16835. state.header = state.setext;
  16836. // has no effect on type so we can reset it now
  16837. state.setext = 0;
  16838. stream.skipToEnd();
  16839. if (modeCfg.highlightFormatting) state.formatting = "header";
  16840. }
  16841. state.thisLine.header = true;
  16842. state.f = state.inline;
  16843. return getType(state);
  16844. } else if (isHr) {
  16845. stream.skipToEnd();
  16846. state.hr = true;
  16847. state.thisLine.hr = true;
  16848. return tokenTypes.hr;
  16849. } else if (stream.peek() === '[') {
  16850. return switchInline(stream, state, footnoteLink);
  16851. }
  16852. return switchInline(stream, state, state.inline);
  16853. }
  16854. function htmlBlock(stream, state) {
  16855. var style = htmlMode.token(stream, state.htmlState);
  16856. if (!htmlModeMissing) {
  16857. var inner = CodeMirror.innerMode(htmlMode, state.htmlState)
  16858. if ((inner.mode.name == "xml" && inner.state.tagStart === null &&
  16859. (!inner.state.context && inner.state.tokenize.isInText)) ||
  16860. (state.md_inside && stream.current().indexOf(">") > -1)) {
  16861. state.f = inlineNormal;
  16862. state.block = blockNormal;
  16863. state.htmlState = null;
  16864. }
  16865. }
  16866. return style;
  16867. }
  16868. function local(stream, state) {
  16869. var currListInd = state.listStack[state.listStack.length - 1] || 0;
  16870. var hasExitedList = state.indentation < currListInd;
  16871. var maxFencedEndInd = currListInd + 3;
  16872. if (state.fencedEndRE && state.indentation <= maxFencedEndInd && (hasExitedList || stream.match(state.fencedEndRE))) {
  16873. if (modeCfg.highlightFormatting) state.formatting = "code-block";
  16874. var returnType;
  16875. if (!hasExitedList) returnType = getType(state)
  16876. state.localMode = state.localState = null;
  16877. state.block = blockNormal;
  16878. state.f = inlineNormal;
  16879. state.fencedEndRE = null;
  16880. state.code = 0
  16881. state.thisLine.fencedCodeEnd = true;
  16882. if (hasExitedList) return switchBlock(stream, state, state.block);
  16883. return returnType;
  16884. } else if (state.localMode) {
  16885. return state.localMode.token(stream, state.localState);
  16886. } else {
  16887. stream.skipToEnd();
  16888. return tokenTypes.code;
  16889. }
  16890. }
  16891. // Inline
  16892. function getType(state) {
  16893. var styles = [];
  16894. if (state.formatting) {
  16895. styles.push(tokenTypes.formatting);
  16896. if (typeof state.formatting === "string") state.formatting = [state.formatting];
  16897. for (var i = 0; i < state.formatting.length; i++) {
  16898. styles.push(tokenTypes.formatting + "-" + state.formatting[i]);
  16899. if (state.formatting[i] === "header") {
  16900. styles.push(tokenTypes.formatting + "-" + state.formatting[i] + "-" + state.header);
  16901. }
  16902. // Add `formatting-quote` and `formatting-quote-#` for blockquotes
  16903. // Add `error` instead if the maximum blockquote nesting depth is passed
  16904. if (state.formatting[i] === "quote") {
  16905. if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {
  16906. styles.push(tokenTypes.formatting + "-" + state.formatting[i] + "-" + state.quote);
  16907. } else {
  16908. styles.push("error");
  16909. }
  16910. }
  16911. }
  16912. }
  16913. if (state.taskOpen) {
  16914. styles.push("meta");
  16915. return styles.length ? styles.join(' ') : null;
  16916. }
  16917. if (state.taskClosed) {
  16918. styles.push("property");
  16919. return styles.length ? styles.join(' ') : null;
  16920. }
  16921. if (state.linkHref) {
  16922. styles.push(tokenTypes.linkHref, "url");
  16923. } else { // Only apply inline styles to non-url text
  16924. if (state.strong) { styles.push(tokenTypes.strong); }
  16925. if (state.em) { styles.push(tokenTypes.em); }
  16926. if (state.strikethrough) { styles.push(tokenTypes.strikethrough); }
  16927. if (state.emoji) { styles.push(tokenTypes.emoji); }
  16928. if (state.linkText) { styles.push(tokenTypes.linkText); }
  16929. if (state.code) { styles.push(tokenTypes.code); }
  16930. if (state.image) { styles.push(tokenTypes.image); }
  16931. if (state.imageAltText) { styles.push(tokenTypes.imageAltText, "link"); }
  16932. if (state.imageMarker) { styles.push(tokenTypes.imageMarker); }
  16933. }
  16934. if (state.header) { styles.push(tokenTypes.header, tokenTypes.header + "-" + state.header); }
  16935. if (state.quote) {
  16936. styles.push(tokenTypes.quote);
  16937. // Add `quote-#` where the maximum for `#` is modeCfg.maxBlockquoteDepth
  16938. if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {
  16939. styles.push(tokenTypes.quote + "-" + state.quote);
  16940. } else {
  16941. styles.push(tokenTypes.quote + "-" + modeCfg.maxBlockquoteDepth);
  16942. }
  16943. }
  16944. if (state.list !== false) {
  16945. var listMod = (state.listStack.length - 1) % 3;
  16946. if (!listMod) {
  16947. styles.push(tokenTypes.list1);
  16948. } else if (listMod === 1) {
  16949. styles.push(tokenTypes.list2);
  16950. } else {
  16951. styles.push(tokenTypes.list3);
  16952. }
  16953. }
  16954. if (state.trailingSpaceNewLine) {
  16955. styles.push("trailing-space-new-line");
  16956. } else if (state.trailingSpace) {
  16957. styles.push("trailing-space-" + (state.trailingSpace % 2 ? "a" : "b"));
  16958. }
  16959. return styles.length ? styles.join(' ') : null;
  16960. }
  16961. function handleText(stream, state) {
  16962. if (stream.match(textRE, true)) {
  16963. return getType(state);
  16964. }
  16965. return undefined;
  16966. }
  16967. function inlineNormal(stream, state) {
  16968. var style = state.text(stream, state);
  16969. if (typeof style !== 'undefined')
  16970. return style;
  16971. if (state.list) { // List marker (*, +, -, 1., etc)
  16972. state.list = null;
  16973. return getType(state);
  16974. }
  16975. if (state.taskList) {
  16976. var taskOpen = stream.match(taskListRE, true)[1] === " ";
  16977. if (taskOpen) state.taskOpen = true;
  16978. else state.taskClosed = true;
  16979. if (modeCfg.highlightFormatting) state.formatting = "task";
  16980. state.taskList = false;
  16981. return getType(state);
  16982. }
  16983. state.taskOpen = false;
  16984. state.taskClosed = false;
  16985. if (state.header && stream.match(/^#+$/, true)) {
  16986. if (modeCfg.highlightFormatting) state.formatting = "header";
  16987. return getType(state);
  16988. }
  16989. var ch = stream.next();
  16990. // Matches link titles present on next line
  16991. if (state.linkTitle) {
  16992. state.linkTitle = false;
  16993. var matchCh = ch;
  16994. if (ch === '(') {
  16995. matchCh = ')';
  16996. }
  16997. matchCh = (matchCh+'').replace(/([.?*+^\[\]\\(){}|-])/g, "\\$1");
  16998. var regex = '^\\s*(?:[^' + matchCh + '\\\\]+|\\\\\\\\|\\\\.)' + matchCh;
  16999. if (stream.match(new RegExp(regex), true)) {
  17000. return tokenTypes.linkHref;
  17001. }
  17002. }
  17003. // If this block is changed, it may need to be updated in GFM mode
  17004. if (ch === '`') {
  17005. var previousFormatting = state.formatting;
  17006. if (modeCfg.highlightFormatting) state.formatting = "code";
  17007. stream.eatWhile('`');
  17008. var count = stream.current().length
  17009. if (state.code == 0 && (!state.quote || count == 1)) {
  17010. state.code = count
  17011. return getType(state)
  17012. } else if (count == state.code) { // Must be exact
  17013. var t = getType(state)
  17014. state.code = 0
  17015. return t
  17016. } else {
  17017. state.formatting = previousFormatting
  17018. return getType(state)
  17019. }
  17020. } else if (state.code) {
  17021. return getType(state);
  17022. }
  17023. if (ch === '\\') {
  17024. stream.next();
  17025. if (modeCfg.highlightFormatting) {
  17026. var type = getType(state);
  17027. var formattingEscape = tokenTypes.formatting + "-escape";
  17028. return type ? type + " " + formattingEscape : formattingEscape;
  17029. }
  17030. }
  17031. if (ch === '!' && stream.match(/\[[^\]]*\] ?(?:\(|\[)/, false)) {
  17032. state.imageMarker = true;
  17033. state.image = true;
  17034. if (modeCfg.highlightFormatting) state.formatting = "image";
  17035. return getType(state);
  17036. }
  17037. if (ch === '[' && state.imageMarker && stream.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/, false)) {
  17038. state.imageMarker = false;
  17039. state.imageAltText = true
  17040. if (modeCfg.highlightFormatting) state.formatting = "image";
  17041. return getType(state);
  17042. }
  17043. if (ch === ']' && state.imageAltText) {
  17044. if (modeCfg.highlightFormatting) state.formatting = "image";
  17045. var type = getType(state);
  17046. state.imageAltText = false;
  17047. state.image = false;
  17048. state.inline = state.f = linkHref;
  17049. return type;
  17050. }
  17051. if (ch === '[' && !state.image) {
  17052. if (state.linkText && stream.match(/^.*?\]/)) return getType(state)
  17053. state.linkText = true;
  17054. if (modeCfg.highlightFormatting) state.formatting = "link";
  17055. return getType(state);
  17056. }
  17057. if (ch === ']' && state.linkText) {
  17058. if (modeCfg.highlightFormatting) state.formatting = "link";
  17059. var type = getType(state);
  17060. state.linkText = false;
  17061. state.inline = state.f = stream.match(/\(.*?\)| ?\[.*?\]/, false) ? linkHref : inlineNormal
  17062. return type;
  17063. }
  17064. if (ch === '<' && stream.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/, false)) {
  17065. state.f = state.inline = linkInline;
  17066. if (modeCfg.highlightFormatting) state.formatting = "link";
  17067. var type = getType(state);
  17068. if (type){
  17069. type += " ";
  17070. } else {
  17071. type = "";
  17072. }
  17073. return type + tokenTypes.linkInline;
  17074. }
  17075. if (ch === '<' && stream.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/, false)) {
  17076. state.f = state.inline = linkInline;
  17077. if (modeCfg.highlightFormatting) state.formatting = "link";
  17078. var type = getType(state);
  17079. if (type){
  17080. type += " ";
  17081. } else {
  17082. type = "";
  17083. }
  17084. return type + tokenTypes.linkEmail;
  17085. }
  17086. if (modeCfg.xml && ch === '<' && stream.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i, false)) {
  17087. var end = stream.string.indexOf(">", stream.pos);
  17088. if (end != -1) {
  17089. var atts = stream.string.substring(stream.start, end);
  17090. if (/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(atts)) state.md_inside = true;
  17091. }
  17092. stream.backUp(1);
  17093. state.htmlState = CodeMirror.startState(htmlMode);
  17094. return switchBlock(stream, state, htmlBlock);
  17095. }
  17096. if (modeCfg.xml && ch === '<' && stream.match(/^\/\w*?>/)) {
  17097. state.md_inside = false;
  17098. return "tag";
  17099. } else if (ch === "*" || ch === "_") {
  17100. var len = 1, before = stream.pos == 1 ? " " : stream.string.charAt(stream.pos - 2)
  17101. while (len < 3 && stream.eat(ch)) len++
  17102. var after = stream.peek() || " "
  17103. // See http://spec.commonmark.org/0.27/#emphasis-and-strong-emphasis
  17104. var leftFlanking = !/\s/.test(after) && (!punctuation.test(after) || /\s/.test(before) || punctuation.test(before))
  17105. var rightFlanking = !/\s/.test(before) && (!punctuation.test(before) || /\s/.test(after) || punctuation.test(after))
  17106. var setEm = null, setStrong = null
  17107. if (len % 2) { // Em
  17108. if (!state.em && leftFlanking && (ch === "*" || !rightFlanking || punctuation.test(before)))
  17109. setEm = true
  17110. else if (state.em == ch && rightFlanking && (ch === "*" || !leftFlanking || punctuation.test(after)))
  17111. setEm = false
  17112. }
  17113. if (len > 1) { // Strong
  17114. if (!state.strong && leftFlanking && (ch === "*" || !rightFlanking || punctuation.test(before)))
  17115. setStrong = true
  17116. else if (state.strong == ch && rightFlanking && (ch === "*" || !leftFlanking || punctuation.test(after)))
  17117. setStrong = false
  17118. }
  17119. if (setStrong != null || setEm != null) {
  17120. if (modeCfg.highlightFormatting) state.formatting = setEm == null ? "strong" : setStrong == null ? "em" : "strong em"
  17121. if (setEm === true) state.em = ch
  17122. if (setStrong === true) state.strong = ch
  17123. var t = getType(state)
  17124. if (setEm === false) state.em = false
  17125. if (setStrong === false) state.strong = false
  17126. return t
  17127. }
  17128. } else if (ch === ' ') {
  17129. if (stream.eat('*') || stream.eat('_')) { // Probably surrounded by spaces
  17130. if (stream.peek() === ' ') { // Surrounded by spaces, ignore
  17131. return getType(state);
  17132. } else { // Not surrounded by spaces, back up pointer
  17133. stream.backUp(1);
  17134. }
  17135. }
  17136. }
  17137. if (modeCfg.strikethrough) {
  17138. if (ch === '~' && stream.eatWhile(ch)) {
  17139. if (state.strikethrough) {// Remove strikethrough
  17140. if (modeCfg.highlightFormatting) state.formatting = "strikethrough";
  17141. var t = getType(state);
  17142. state.strikethrough = false;
  17143. return t;
  17144. } else if (stream.match(/^[^\s]/, false)) {// Add strikethrough
  17145. state.strikethrough = true;
  17146. if (modeCfg.highlightFormatting) state.formatting = "strikethrough";
  17147. return getType(state);
  17148. }
  17149. } else if (ch === ' ') {
  17150. if (stream.match('~~', true)) { // Probably surrounded by space
  17151. if (stream.peek() === ' ') { // Surrounded by spaces, ignore
  17152. return getType(state);
  17153. } else { // Not surrounded by spaces, back up pointer
  17154. stream.backUp(2);
  17155. }
  17156. }
  17157. }
  17158. }
  17159. if (modeCfg.emoji && ch === ":" && stream.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)) {
  17160. state.emoji = true;
  17161. if (modeCfg.highlightFormatting) state.formatting = "emoji";
  17162. var retType = getType(state);
  17163. state.emoji = false;
  17164. return retType;
  17165. }
  17166. if (ch === ' ') {
  17167. if (stream.match(/^ +$/, false)) {
  17168. state.trailingSpace++;
  17169. } else if (state.trailingSpace) {
  17170. state.trailingSpaceNewLine = true;
  17171. }
  17172. }
  17173. return getType(state);
  17174. }
  17175. function linkInline(stream, state) {
  17176. var ch = stream.next();
  17177. if (ch === ">") {
  17178. state.f = state.inline = inlineNormal;
  17179. if (modeCfg.highlightFormatting) state.formatting = "link";
  17180. var type = getType(state);
  17181. if (type){
  17182. type += " ";
  17183. } else {
  17184. type = "";
  17185. }
  17186. return type + tokenTypes.linkInline;
  17187. }
  17188. stream.match(/^[^>]+/, true);
  17189. return tokenTypes.linkInline;
  17190. }
  17191. function linkHref(stream, state) {
  17192. // Check if space, and return NULL if so (to avoid marking the space)
  17193. if(stream.eatSpace()){
  17194. return null;
  17195. }
  17196. var ch = stream.next();
  17197. if (ch === '(' || ch === '[') {
  17198. state.f = state.inline = getLinkHrefInside(ch === "(" ? ")" : "]");
  17199. if (modeCfg.highlightFormatting) state.formatting = "link-string";
  17200. state.linkHref = true;
  17201. return getType(state);
  17202. }
  17203. return 'error';
  17204. }
  17205. var linkRE = {
  17206. ")": /^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,
  17207. "]": /^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/
  17208. }
  17209. function getLinkHrefInside(endChar) {
  17210. return function(stream, state) {
  17211. var ch = stream.next();
  17212. if (ch === endChar) {
  17213. state.f = state.inline = inlineNormal;
  17214. if (modeCfg.highlightFormatting) state.formatting = "link-string";
  17215. var returnState = getType(state);
  17216. state.linkHref = false;
  17217. return returnState;
  17218. }
  17219. stream.match(linkRE[endChar])
  17220. state.linkHref = true;
  17221. return getType(state);
  17222. };
  17223. }
  17224. function footnoteLink(stream, state) {
  17225. if (stream.match(/^([^\]\\]|\\.)*\]:/, false)) {
  17226. state.f = footnoteLinkInside;
  17227. stream.next(); // Consume [
  17228. if (modeCfg.highlightFormatting) state.formatting = "link";
  17229. state.linkText = true;
  17230. return getType(state);
  17231. }
  17232. return switchInline(stream, state, inlineNormal);
  17233. }
  17234. function footnoteLinkInside(stream, state) {
  17235. if (stream.match(']:', true)) {
  17236. state.f = state.inline = footnoteUrl;
  17237. if (modeCfg.highlightFormatting) state.formatting = "link";
  17238. var returnType = getType(state);
  17239. state.linkText = false;
  17240. return returnType;
  17241. }
  17242. stream.match(/^([^\]\\]|\\.)+/, true);
  17243. return tokenTypes.linkText;
  17244. }
  17245. function footnoteUrl(stream, state) {
  17246. // Check if space, and return NULL if so (to avoid marking the space)
  17247. if(stream.eatSpace()){
  17248. return null;
  17249. }
  17250. // Match URL
  17251. stream.match(/^[^\s]+/, true);
  17252. // Check for link title
  17253. if (stream.peek() === undefined) { // End of line, set flag to check next line
  17254. state.linkTitle = true;
  17255. } else { // More content on line, check if link title
  17256. stream.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/, true);
  17257. }
  17258. state.f = state.inline = inlineNormal;
  17259. return tokenTypes.linkHref + " url";
  17260. }
  17261. var mode = {
  17262. startState: function() {
  17263. return {
  17264. f: blockNormal,
  17265. prevLine: {stream: null},
  17266. thisLine: {stream: null},
  17267. block: blockNormal,
  17268. htmlState: null,
  17269. indentation: 0,
  17270. inline: inlineNormal,
  17271. text: handleText,
  17272. formatting: false,
  17273. linkText: false,
  17274. linkHref: false,
  17275. linkTitle: false,
  17276. code: 0,
  17277. em: false,
  17278. strong: false,
  17279. header: 0,
  17280. setext: 0,
  17281. hr: false,
  17282. taskList: false,
  17283. list: false,
  17284. listStack: [],
  17285. quote: 0,
  17286. trailingSpace: 0,
  17287. trailingSpaceNewLine: false,
  17288. strikethrough: false,
  17289. emoji: false,
  17290. fencedEndRE: null
  17291. };
  17292. },
  17293. copyState: function(s) {
  17294. return {
  17295. f: s.f,
  17296. prevLine: s.prevLine,
  17297. thisLine: s.thisLine,
  17298. block: s.block,
  17299. htmlState: s.htmlState && CodeMirror.copyState(htmlMode, s.htmlState),
  17300. indentation: s.indentation,
  17301. localMode: s.localMode,
  17302. localState: s.localMode ? CodeMirror.copyState(s.localMode, s.localState) : null,
  17303. inline: s.inline,
  17304. text: s.text,
  17305. formatting: false,
  17306. linkText: s.linkText,
  17307. linkTitle: s.linkTitle,
  17308. linkHref: s.linkHref,
  17309. code: s.code,
  17310. em: s.em,
  17311. strong: s.strong,
  17312. strikethrough: s.strikethrough,
  17313. emoji: s.emoji,
  17314. header: s.header,
  17315. setext: s.setext,
  17316. hr: s.hr,
  17317. taskList: s.taskList,
  17318. list: s.list,
  17319. listStack: s.listStack.slice(0),
  17320. quote: s.quote,
  17321. indentedCode: s.indentedCode,
  17322. trailingSpace: s.trailingSpace,
  17323. trailingSpaceNewLine: s.trailingSpaceNewLine,
  17324. md_inside: s.md_inside,
  17325. fencedEndRE: s.fencedEndRE
  17326. };
  17327. },
  17328. token: function(stream, state) {
  17329. // Reset state.formatting
  17330. state.formatting = false;
  17331. if (stream != state.thisLine.stream) {
  17332. state.header = 0;
  17333. state.hr = false;
  17334. if (stream.match(/^\s*$/, true)) {
  17335. blankLine(state);
  17336. return null;
  17337. }
  17338. state.prevLine = state.thisLine
  17339. state.thisLine = {stream: stream}
  17340. // Reset state.taskList
  17341. state.taskList = false;
  17342. // Reset state.trailingSpace
  17343. state.trailingSpace = 0;
  17344. state.trailingSpaceNewLine = false;
  17345. if (!state.localState) {
  17346. state.f = state.block;
  17347. if (state.f != htmlBlock) {
  17348. var indentation = stream.match(/^\s*/, true)[0].replace(/\t/g, expandedTab).length;
  17349. state.indentation = indentation;
  17350. state.indentationDiff = null;
  17351. if (indentation > 0) return null;
  17352. }
  17353. }
  17354. }
  17355. return state.f(stream, state);
  17356. },
  17357. innerMode: function(state) {
  17358. if (state.block == htmlBlock) return {state: state.htmlState, mode: htmlMode};
  17359. if (state.localState) return {state: state.localState, mode: state.localMode};
  17360. return {state: state, mode: mode};
  17361. },
  17362. indent: function(state, textAfter, line) {
  17363. if (state.block == htmlBlock && htmlMode.indent) return htmlMode.indent(state.htmlState, textAfter, line)
  17364. if (state.localState && state.localMode.indent) return state.localMode.indent(state.localState, textAfter, line)
  17365. return CodeMirror.Pass
  17366. },
  17367. blankLine: blankLine,
  17368. getType: getType,
  17369. blockCommentStart: "<!--",
  17370. blockCommentEnd: "-->",
  17371. closeBrackets: "()[]{}''\"\"``",
  17372. fold: "markdown"
  17373. };
  17374. return mode;
  17375. }, "xml");
  17376. CodeMirror.defineMIME("text/markdown", "markdown");
  17377. CodeMirror.defineMIME("text/x-markdown", "markdown");
  17378. });
  17379. /***/ }),
  17380. /***/ 52539:
  17381. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  17382. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  17383. // Distributed under an MIT license: https://codemirror.net/LICENSE
  17384. (function(mod) {
  17385. if (true) // CommonJS
  17386. mod(__webpack_require__(4631));
  17387. else {}
  17388. })(function(CodeMirror) {
  17389. "use strict";
  17390. CodeMirror.modeInfo = [
  17391. {name: "APL", mime: "text/apl", mode: "apl", ext: ["dyalog", "apl"]},
  17392. {name: "PGP", mimes: ["application/pgp", "application/pgp-encrypted", "application/pgp-keys", "application/pgp-signature"], mode: "asciiarmor", ext: ["asc", "pgp", "sig"]},
  17393. {name: "ASN.1", mime: "text/x-ttcn-asn", mode: "asn.1", ext: ["asn", "asn1"]},
  17394. {name: "Asterisk", mime: "text/x-asterisk", mode: "asterisk", file: /^extensions\.conf$/i},
  17395. {name: "Brainfuck", mime: "text/x-brainfuck", mode: "brainfuck", ext: ["b", "bf"]},
  17396. {name: "C", mime: "text/x-csrc", mode: "clike", ext: ["c", "h", "ino"]},
  17397. {name: "C++", mime: "text/x-c++src", mode: "clike", ext: ["cpp", "c++", "cc", "cxx", "hpp", "h++", "hh", "hxx"], alias: ["cpp"]},
  17398. {name: "Cobol", mime: "text/x-cobol", mode: "cobol", ext: ["cob", "cpy", "cbl"]},
  17399. {name: "C#", mime: "text/x-csharp", mode: "clike", ext: ["cs"], alias: ["csharp", "cs"]},
  17400. {name: "Clojure", mime: "text/x-clojure", mode: "clojure", ext: ["clj", "cljc", "cljx"]},
  17401. {name: "ClojureScript", mime: "text/x-clojurescript", mode: "clojure", ext: ["cljs"]},
  17402. {name: "Closure Stylesheets (GSS)", mime: "text/x-gss", mode: "css", ext: ["gss"]},
  17403. {name: "CMake", mime: "text/x-cmake", mode: "cmake", ext: ["cmake", "cmake.in"], file: /^CMakeLists\.txt$/},
  17404. {name: "CoffeeScript", mimes: ["application/vnd.coffeescript", "text/coffeescript", "text/x-coffeescript"], mode: "coffeescript", ext: ["coffee"], alias: ["coffee", "coffee-script"]},
  17405. {name: "Common Lisp", mime: "text/x-common-lisp", mode: "commonlisp", ext: ["cl", "lisp", "el"], alias: ["lisp"]},
  17406. {name: "Cypher", mime: "application/x-cypher-query", mode: "cypher", ext: ["cyp", "cypher"]},
  17407. {name: "Cython", mime: "text/x-cython", mode: "python", ext: ["pyx", "pxd", "pxi"]},
  17408. {name: "Crystal", mime: "text/x-crystal", mode: "crystal", ext: ["cr"]},
  17409. {name: "CSS", mime: "text/css", mode: "css", ext: ["css"]},
  17410. {name: "CQL", mime: "text/x-cassandra", mode: "sql", ext: ["cql"]},
  17411. {name: "D", mime: "text/x-d", mode: "d", ext: ["d"]},
  17412. {name: "Dart", mimes: ["application/dart", "text/x-dart"], mode: "dart", ext: ["dart"]},
  17413. {name: "diff", mime: "text/x-diff", mode: "diff", ext: ["diff", "patch"]},
  17414. {name: "Django", mime: "text/x-django", mode: "django"},
  17415. {name: "Dockerfile", mime: "text/x-dockerfile", mode: "dockerfile", file: /^Dockerfile$/},
  17416. {name: "DTD", mime: "application/xml-dtd", mode: "dtd", ext: ["dtd"]},
  17417. {name: "Dylan", mime: "text/x-dylan", mode: "dylan", ext: ["dylan", "dyl", "intr"]},
  17418. {name: "EBNF", mime: "text/x-ebnf", mode: "ebnf"},
  17419. {name: "ECL", mime: "text/x-ecl", mode: "ecl", ext: ["ecl"]},
  17420. {name: "edn", mime: "application/edn", mode: "clojure", ext: ["edn"]},
  17421. {name: "Eiffel", mime: "text/x-eiffel", mode: "eiffel", ext: ["e"]},
  17422. {name: "Elm", mime: "text/x-elm", mode: "elm", ext: ["elm"]},
  17423. {name: "Embedded JavaScript", mime: "application/x-ejs", mode: "htmlembedded", ext: ["ejs"]},
  17424. {name: "Embedded Ruby", mime: "application/x-erb", mode: "htmlembedded", ext: ["erb"]},
  17425. {name: "Erlang", mime: "text/x-erlang", mode: "erlang", ext: ["erl"]},
  17426. {name: "Esper", mime: "text/x-esper", mode: "sql"},
  17427. {name: "Factor", mime: "text/x-factor", mode: "factor", ext: ["factor"]},
  17428. {name: "FCL", mime: "text/x-fcl", mode: "fcl"},
  17429. {name: "Forth", mime: "text/x-forth", mode: "forth", ext: ["forth", "fth", "4th"]},
  17430. {name: "Fortran", mime: "text/x-fortran", mode: "fortran", ext: ["f", "for", "f77", "f90", "f95"]},
  17431. {name: "F#", mime: "text/x-fsharp", mode: "mllike", ext: ["fs"], alias: ["fsharp"]},
  17432. {name: "Gas", mime: "text/x-gas", mode: "gas", ext: ["s"]},
  17433. {name: "Gherkin", mime: "text/x-feature", mode: "gherkin", ext: ["feature"]},
  17434. {name: "GitHub Flavored Markdown", mime: "text/x-gfm", mode: "gfm", file: /^(readme|contributing|history)\.md$/i},
  17435. {name: "Go", mime: "text/x-go", mode: "go", ext: ["go"]},
  17436. {name: "Groovy", mime: "text/x-groovy", mode: "groovy", ext: ["groovy", "gradle"], file: /^Jenkinsfile$/},
  17437. {name: "HAML", mime: "text/x-haml", mode: "haml", ext: ["haml"]},
  17438. {name: "Haskell", mime: "text/x-haskell", mode: "haskell", ext: ["hs"]},
  17439. {name: "Haskell (Literate)", mime: "text/x-literate-haskell", mode: "haskell-literate", ext: ["lhs"]},
  17440. {name: "Haxe", mime: "text/x-haxe", mode: "haxe", ext: ["hx"]},
  17441. {name: "HXML", mime: "text/x-hxml", mode: "haxe", ext: ["hxml"]},
  17442. {name: "ASP.NET", mime: "application/x-aspx", mode: "htmlembedded", ext: ["aspx"], alias: ["asp", "aspx"]},
  17443. {name: "HTML", mime: "text/html", mode: "htmlmixed", ext: ["html", "htm", "handlebars", "hbs"], alias: ["xhtml"]},
  17444. {name: "HTTP", mime: "message/http", mode: "http"},
  17445. {name: "IDL", mime: "text/x-idl", mode: "idl", ext: ["pro"]},
  17446. {name: "Pug", mime: "text/x-pug", mode: "pug", ext: ["jade", "pug"], alias: ["jade"]},
  17447. {name: "Java", mime: "text/x-java", mode: "clike", ext: ["java"]},
  17448. {name: "Java Server Pages", mime: "application/x-jsp", mode: "htmlembedded", ext: ["jsp"], alias: ["jsp"]},
  17449. {name: "JavaScript", mimes: ["text/javascript", "text/ecmascript", "application/javascript", "application/x-javascript", "application/ecmascript"],
  17450. mode: "javascript", ext: ["js"], alias: ["ecmascript", "js", "node"]},
  17451. {name: "JSON", mimes: ["application/json", "application/x-json"], mode: "javascript", ext: ["json", "map"], alias: ["json5"]},
  17452. {name: "JSON-LD", mime: "application/ld+json", mode: "javascript", ext: ["jsonld"], alias: ["jsonld"]},
  17453. {name: "JSX", mime: "text/jsx", mode: "jsx", ext: ["jsx"]},
  17454. {name: "Jinja2", mime: "text/jinja2", mode: "jinja2", ext: ["j2", "jinja", "jinja2"]},
  17455. {name: "Julia", mime: "text/x-julia", mode: "julia", ext: ["jl"], alias: ["jl"]},
  17456. {name: "Kotlin", mime: "text/x-kotlin", mode: "clike", ext: ["kt"]},
  17457. {name: "LESS", mime: "text/x-less", mode: "css", ext: ["less"]},
  17458. {name: "LiveScript", mime: "text/x-livescript", mode: "livescript", ext: ["ls"], alias: ["ls"]},
  17459. {name: "Lua", mime: "text/x-lua", mode: "lua", ext: ["lua"]},
  17460. {name: "Markdown", mime: "text/x-markdown", mode: "markdown", ext: ["markdown", "md", "mkd"]},
  17461. {name: "mIRC", mime: "text/mirc", mode: "mirc"},
  17462. {name: "MariaDB SQL", mime: "text/x-mariadb", mode: "sql"},
  17463. {name: "Mathematica", mime: "text/x-mathematica", mode: "mathematica", ext: ["m", "nb", "wl", "wls"]},
  17464. {name: "Modelica", mime: "text/x-modelica", mode: "modelica", ext: ["mo"]},
  17465. {name: "MUMPS", mime: "text/x-mumps", mode: "mumps", ext: ["mps"]},
  17466. {name: "MS SQL", mime: "text/x-mssql", mode: "sql"},
  17467. {name: "mbox", mime: "application/mbox", mode: "mbox", ext: ["mbox"]},
  17468. {name: "MySQL", mime: "text/x-mysql", mode: "sql"},
  17469. {name: "Nginx", mime: "text/x-nginx-conf", mode: "nginx", file: /nginx.*\.conf$/i},
  17470. {name: "NSIS", mime: "text/x-nsis", mode: "nsis", ext: ["nsh", "nsi"]},
  17471. {name: "NTriples", mimes: ["application/n-triples", "application/n-quads", "text/n-triples"],
  17472. mode: "ntriples", ext: ["nt", "nq"]},
  17473. {name: "Objective-C", mime: "text/x-objectivec", mode: "clike", ext: ["m"], alias: ["objective-c", "objc"]},
  17474. {name: "Objective-C++", mime: "text/x-objectivec++", mode: "clike", ext: ["mm"], alias: ["objective-c++", "objc++"]},
  17475. {name: "OCaml", mime: "text/x-ocaml", mode: "mllike", ext: ["ml", "mli", "mll", "mly"]},
  17476. {name: "Octave", mime: "text/x-octave", mode: "octave", ext: ["m"]},
  17477. {name: "Oz", mime: "text/x-oz", mode: "oz", ext: ["oz"]},
  17478. {name: "Pascal", mime: "text/x-pascal", mode: "pascal", ext: ["p", "pas"]},
  17479. {name: "PEG.js", mime: "null", mode: "pegjs", ext: ["jsonld"]},
  17480. {name: "Perl", mime: "text/x-perl", mode: "perl", ext: ["pl", "pm"]},
  17481. {name: "PHP", mimes: ["text/x-php", "application/x-httpd-php", "application/x-httpd-php-open"], mode: "php", ext: ["php", "php3", "php4", "php5", "php7", "phtml"]},
  17482. {name: "Pig", mime: "text/x-pig", mode: "pig", ext: ["pig"]},
  17483. {name: "Plain Text", mime: "text/plain", mode: "null", ext: ["txt", "text", "conf", "def", "list", "log"]},
  17484. {name: "PLSQL", mime: "text/x-plsql", mode: "sql", ext: ["pls"]},
  17485. {name: "PostgreSQL", mime: "text/x-pgsql", mode: "sql"},
  17486. {name: "PowerShell", mime: "application/x-powershell", mode: "powershell", ext: ["ps1", "psd1", "psm1"]},
  17487. {name: "Properties files", mime: "text/x-properties", mode: "properties", ext: ["properties", "ini", "in"], alias: ["ini", "properties"]},
  17488. {name: "ProtoBuf", mime: "text/x-protobuf", mode: "protobuf", ext: ["proto"]},
  17489. {name: "Python", mime: "text/x-python", mode: "python", ext: ["BUILD", "bzl", "py", "pyw"], file: /^(BUCK|BUILD)$/},
  17490. {name: "Puppet", mime: "text/x-puppet", mode: "puppet", ext: ["pp"]},
  17491. {name: "Q", mime: "text/x-q", mode: "q", ext: ["q"]},
  17492. {name: "R", mime: "text/x-rsrc", mode: "r", ext: ["r", "R"], alias: ["rscript"]},
  17493. {name: "reStructuredText", mime: "text/x-rst", mode: "rst", ext: ["rst"], alias: ["rst"]},
  17494. {name: "RPM Changes", mime: "text/x-rpm-changes", mode: "rpm"},
  17495. {name: "RPM Spec", mime: "text/x-rpm-spec", mode: "rpm", ext: ["spec"]},
  17496. {name: "Ruby", mime: "text/x-ruby", mode: "ruby", ext: ["rb"], alias: ["jruby", "macruby", "rake", "rb", "rbx"]},
  17497. {name: "Rust", mime: "text/x-rustsrc", mode: "rust", ext: ["rs"]},
  17498. {name: "SAS", mime: "text/x-sas", mode: "sas", ext: ["sas"]},
  17499. {name: "Sass", mime: "text/x-sass", mode: "sass", ext: ["sass"]},
  17500. {name: "Scala", mime: "text/x-scala", mode: "clike", ext: ["scala"]},
  17501. {name: "Scheme", mime: "text/x-scheme", mode: "scheme", ext: ["scm", "ss"]},
  17502. {name: "SCSS", mime: "text/x-scss", mode: "css", ext: ["scss"]},
  17503. {name: "Shell", mimes: ["text/x-sh", "application/x-sh"], mode: "shell", ext: ["sh", "ksh", "bash"], alias: ["bash", "sh", "zsh"], file: /^PKGBUILD$/},
  17504. {name: "Sieve", mime: "application/sieve", mode: "sieve", ext: ["siv", "sieve"]},
  17505. {name: "Slim", mimes: ["text/x-slim", "application/x-slim"], mode: "slim", ext: ["slim"]},
  17506. {name: "Smalltalk", mime: "text/x-stsrc", mode: "smalltalk", ext: ["st"]},
  17507. {name: "Smarty", mime: "text/x-smarty", mode: "smarty", ext: ["tpl"]},
  17508. {name: "Solr", mime: "text/x-solr", mode: "solr"},
  17509. {name: "SML", mime: "text/x-sml", mode: "mllike", ext: ["sml", "sig", "fun", "smackspec"]},
  17510. {name: "Soy", mime: "text/x-soy", mode: "soy", ext: ["soy"], alias: ["closure template"]},
  17511. {name: "SPARQL", mime: "application/sparql-query", mode: "sparql", ext: ["rq", "sparql"], alias: ["sparul"]},
  17512. {name: "Spreadsheet", mime: "text/x-spreadsheet", mode: "spreadsheet", alias: ["excel", "formula"]},
  17513. {name: "SQL", mime: "text/x-sql", mode: "sql", ext: ["sql"]},
  17514. {name: "SQLite", mime: "text/x-sqlite", mode: "sql"},
  17515. {name: "Squirrel", mime: "text/x-squirrel", mode: "clike", ext: ["nut"]},
  17516. {name: "Stylus", mime: "text/x-styl", mode: "stylus", ext: ["styl"]},
  17517. {name: "Swift", mime: "text/x-swift", mode: "swift", ext: ["swift"]},
  17518. {name: "sTeX", mime: "text/x-stex", mode: "stex"},
  17519. {name: "LaTeX", mime: "text/x-latex", mode: "stex", ext: ["text", "ltx", "tex"], alias: ["tex"]},
  17520. {name: "SystemVerilog", mime: "text/x-systemverilog", mode: "verilog", ext: ["v", "sv", "svh"]},
  17521. {name: "Tcl", mime: "text/x-tcl", mode: "tcl", ext: ["tcl"]},
  17522. {name: "Textile", mime: "text/x-textile", mode: "textile", ext: ["textile"]},
  17523. {name: "TiddlyWiki", mime: "text/x-tiddlywiki", mode: "tiddlywiki"},
  17524. {name: "Tiki wiki", mime: "text/tiki", mode: "tiki"},
  17525. {name: "TOML", mime: "text/x-toml", mode: "toml", ext: ["toml"]},
  17526. {name: "Tornado", mime: "text/x-tornado", mode: "tornado"},
  17527. {name: "troff", mime: "text/troff", mode: "troff", ext: ["1", "2", "3", "4", "5", "6", "7", "8", "9"]},
  17528. {name: "TTCN", mime: "text/x-ttcn", mode: "ttcn", ext: ["ttcn", "ttcn3", "ttcnpp"]},
  17529. {name: "TTCN_CFG", mime: "text/x-ttcn-cfg", mode: "ttcn-cfg", ext: ["cfg"]},
  17530. {name: "Turtle", mime: "text/turtle", mode: "turtle", ext: ["ttl"]},
  17531. {name: "TypeScript", mime: "application/typescript", mode: "javascript", ext: ["ts"], alias: ["ts"]},
  17532. {name: "TypeScript-JSX", mime: "text/typescript-jsx", mode: "jsx", ext: ["tsx"], alias: ["tsx"]},
  17533. {name: "Twig", mime: "text/x-twig", mode: "twig"},
  17534. {name: "Web IDL", mime: "text/x-webidl", mode: "webidl", ext: ["webidl"]},
  17535. {name: "VB.NET", mime: "text/x-vb", mode: "vb", ext: ["vb"]},
  17536. {name: "VBScript", mime: "text/vbscript", mode: "vbscript", ext: ["vbs"]},
  17537. {name: "Velocity", mime: "text/velocity", mode: "velocity", ext: ["vtl"]},
  17538. {name: "Verilog", mime: "text/x-verilog", mode: "verilog", ext: ["v"]},
  17539. {name: "VHDL", mime: "text/x-vhdl", mode: "vhdl", ext: ["vhd", "vhdl"]},
  17540. {name: "Vue.js Component", mimes: ["script/x-vue", "text/x-vue"], mode: "vue", ext: ["vue"]},
  17541. {name: "XML", mimes: ["application/xml", "text/xml"], mode: "xml", ext: ["xml", "xsl", "xsd", "svg"], alias: ["rss", "wsdl", "xsd"]},
  17542. {name: "XQuery", mime: "application/xquery", mode: "xquery", ext: ["xy", "xquery"]},
  17543. {name: "Yacas", mime: "text/x-yacas", mode: "yacas", ext: ["ys"]},
  17544. {name: "YAML", mimes: ["text/x-yaml", "text/yaml"], mode: "yaml", ext: ["yaml", "yml"], alias: ["yml"]},
  17545. {name: "Z80", mime: "text/x-z80", mode: "z80", ext: ["z80"]},
  17546. {name: "mscgen", mime: "text/x-mscgen", mode: "mscgen", ext: ["mscgen", "mscin", "msc"]},
  17547. {name: "xu", mime: "text/x-xu", mode: "mscgen", ext: ["xu"]},
  17548. {name: "msgenny", mime: "text/x-msgenny", mode: "mscgen", ext: ["msgenny"]},
  17549. {name: "WebAssembly", mime: "text/webassembly", mode: "wast", ext: ["wat", "wast"]},
  17550. ];
  17551. // Ensure all modes have a mime property for backwards compatibility
  17552. for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
  17553. var info = CodeMirror.modeInfo[i];
  17554. if (info.mimes) info.mime = info.mimes[0];
  17555. }
  17556. CodeMirror.findModeByMIME = function(mime) {
  17557. mime = mime.toLowerCase();
  17558. for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
  17559. var info = CodeMirror.modeInfo[i];
  17560. if (info.mime == mime) return info;
  17561. if (info.mimes) for (var j = 0; j < info.mimes.length; j++)
  17562. if (info.mimes[j] == mime) return info;
  17563. }
  17564. if (/\+xml$/.test(mime)) return CodeMirror.findModeByMIME("application/xml")
  17565. if (/\+json$/.test(mime)) return CodeMirror.findModeByMIME("application/json")
  17566. };
  17567. CodeMirror.findModeByExtension = function(ext) {
  17568. ext = ext.toLowerCase();
  17569. for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
  17570. var info = CodeMirror.modeInfo[i];
  17571. if (info.ext) for (var j = 0; j < info.ext.length; j++)
  17572. if (info.ext[j] == ext) return info;
  17573. }
  17574. };
  17575. CodeMirror.findModeByFileName = function(filename) {
  17576. for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
  17577. var info = CodeMirror.modeInfo[i];
  17578. if (info.file && info.file.test(filename)) return info;
  17579. }
  17580. var dot = filename.lastIndexOf(".");
  17581. var ext = dot > -1 && filename.substring(dot + 1, filename.length);
  17582. if (ext) return CodeMirror.findModeByExtension(ext);
  17583. };
  17584. CodeMirror.findModeByName = function(name) {
  17585. name = name.toLowerCase();
  17586. for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
  17587. var info = CodeMirror.modeInfo[i];
  17588. if (info.name.toLowerCase() == name) return info;
  17589. if (info.alias) for (var j = 0; j < info.alias.length; j++)
  17590. if (info.alias[j].toLowerCase() == name) return info;
  17591. }
  17592. };
  17593. });
  17594. /***/ }),
  17595. /***/ 36702:
  17596. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  17597. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  17598. // Distributed under an MIT license: https://codemirror.net/LICENSE
  17599. (function(mod) {
  17600. if (true) // CommonJS
  17601. mod(__webpack_require__(4631), __webpack_require__(16531), __webpack_require__(99762));
  17602. else {}
  17603. })(function(CodeMirror) {
  17604. "use strict";
  17605. function keywords(str) {
  17606. var obj = {}, words = str.split(" ");
  17607. for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
  17608. return obj;
  17609. }
  17610. // Helper for phpString
  17611. function matchSequence(list, end, escapes) {
  17612. if (list.length == 0) return phpString(end);
  17613. return function (stream, state) {
  17614. var patterns = list[0];
  17615. for (var i = 0; i < patterns.length; i++) if (stream.match(patterns[i][0])) {
  17616. state.tokenize = matchSequence(list.slice(1), end);
  17617. return patterns[i][1];
  17618. }
  17619. state.tokenize = phpString(end, escapes);
  17620. return "string";
  17621. };
  17622. }
  17623. function phpString(closing, escapes) {
  17624. return function(stream, state) { return phpString_(stream, state, closing, escapes); };
  17625. }
  17626. function phpString_(stream, state, closing, escapes) {
  17627. // "Complex" syntax
  17628. if (escapes !== false && stream.match("${", false) || stream.match("{$", false)) {
  17629. state.tokenize = null;
  17630. return "string";
  17631. }
  17632. // Simple syntax
  17633. if (escapes !== false && stream.match(/^\$[a-zA-Z_][a-zA-Z0-9_]*/)) {
  17634. // After the variable name there may appear array or object operator.
  17635. if (stream.match("[", false)) {
  17636. // Match array operator
  17637. state.tokenize = matchSequence([
  17638. [["[", null]],
  17639. [[/\d[\w\.]*/, "number"],
  17640. [/\$[a-zA-Z_][a-zA-Z0-9_]*/, "variable-2"],
  17641. [/[\w\$]+/, "variable"]],
  17642. [["]", null]]
  17643. ], closing, escapes);
  17644. }
  17645. if (stream.match(/^->\w/, false)) {
  17646. // Match object operator
  17647. state.tokenize = matchSequence([
  17648. [["->", null]],
  17649. [[/[\w]+/, "variable"]]
  17650. ], closing, escapes);
  17651. }
  17652. return "variable-2";
  17653. }
  17654. var escaped = false;
  17655. // Normal string
  17656. while (!stream.eol() &&
  17657. (escaped || escapes === false ||
  17658. (!stream.match("{$", false) &&
  17659. !stream.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/, false)))) {
  17660. if (!escaped && stream.match(closing)) {
  17661. state.tokenize = null;
  17662. state.tokStack.pop(); state.tokStack.pop();
  17663. break;
  17664. }
  17665. escaped = stream.next() == "\\" && !escaped;
  17666. }
  17667. return "string";
  17668. }
  17669. var phpKeywords = "abstract and array as break case catch class clone const continue declare default " +
  17670. "do else elseif enddeclare endfor endforeach endif endswitch endwhile enum extends final " +
  17671. "for foreach function global goto if implements interface instanceof namespace " +
  17672. "new or private protected public static switch throw trait try use var while xor " +
  17673. "die echo empty exit eval include include_once isset list require require_once return " +
  17674. "print unset __halt_compiler self static parent yield insteadof finally readonly match";
  17675. var phpAtoms = "true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__";
  17676. var phpBuiltin = "func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage memory_get_peak_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents file_put_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists array_intersect_key array_combine array_column pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";
  17677. CodeMirror.registerHelper("hintWords", "php", [phpKeywords, phpAtoms, phpBuiltin].join(" ").split(" "));
  17678. CodeMirror.registerHelper("wordChars", "php", /[\w$]/);
  17679. var phpConfig = {
  17680. name: "clike",
  17681. helperType: "php",
  17682. keywords: keywords(phpKeywords),
  17683. blockKeywords: keywords("catch do else elseif for foreach if switch try while finally"),
  17684. defKeywords: keywords("class enum function interface namespace trait"),
  17685. atoms: keywords(phpAtoms),
  17686. builtin: keywords(phpBuiltin),
  17687. multiLineStrings: true,
  17688. hooks: {
  17689. "$": function(stream) {
  17690. stream.eatWhile(/[\w\$_]/);
  17691. return "variable-2";
  17692. },
  17693. "<": function(stream, state) {
  17694. var before;
  17695. if (before = stream.match(/^<<\s*/)) {
  17696. var quoted = stream.eat(/['"]/);
  17697. stream.eatWhile(/[\w\.]/);
  17698. var delim = stream.current().slice(before[0].length + (quoted ? 2 : 1));
  17699. if (quoted) stream.eat(quoted);
  17700. if (delim) {
  17701. (state.tokStack || (state.tokStack = [])).push(delim, 0);
  17702. state.tokenize = phpString(delim, quoted != "'");
  17703. return "string";
  17704. }
  17705. }
  17706. return false;
  17707. },
  17708. "#": function(stream) {
  17709. while (!stream.eol() && !stream.match("?>", false)) stream.next();
  17710. return "comment";
  17711. },
  17712. "/": function(stream) {
  17713. if (stream.eat("/")) {
  17714. while (!stream.eol() && !stream.match("?>", false)) stream.next();
  17715. return "comment";
  17716. }
  17717. return false;
  17718. },
  17719. '"': function(_stream, state) {
  17720. (state.tokStack || (state.tokStack = [])).push('"', 0);
  17721. state.tokenize = phpString('"');
  17722. return "string";
  17723. },
  17724. "{": function(_stream, state) {
  17725. if (state.tokStack && state.tokStack.length)
  17726. state.tokStack[state.tokStack.length - 1]++;
  17727. return false;
  17728. },
  17729. "}": function(_stream, state) {
  17730. if (state.tokStack && state.tokStack.length > 0 &&
  17731. !--state.tokStack[state.tokStack.length - 1]) {
  17732. state.tokenize = phpString(state.tokStack[state.tokStack.length - 2]);
  17733. }
  17734. return false;
  17735. }
  17736. }
  17737. };
  17738. CodeMirror.defineMode("php", function(config, parserConfig) {
  17739. var htmlMode = CodeMirror.getMode(config, (parserConfig && parserConfig.htmlMode) || "text/html");
  17740. var phpMode = CodeMirror.getMode(config, phpConfig);
  17741. function dispatch(stream, state) {
  17742. var isPHP = state.curMode == phpMode;
  17743. if (stream.sol() && state.pending && state.pending != '"' && state.pending != "'") state.pending = null;
  17744. if (!isPHP) {
  17745. if (stream.match(/^<\?\w*/)) {
  17746. state.curMode = phpMode;
  17747. if (!state.php) state.php = CodeMirror.startState(phpMode, htmlMode.indent(state.html, "", ""))
  17748. state.curState = state.php;
  17749. return "meta";
  17750. }
  17751. if (state.pending == '"' || state.pending == "'") {
  17752. while (!stream.eol() && stream.next() != state.pending) {}
  17753. var style = "string";
  17754. } else if (state.pending && stream.pos < state.pending.end) {
  17755. stream.pos = state.pending.end;
  17756. var style = state.pending.style;
  17757. } else {
  17758. var style = htmlMode.token(stream, state.curState);
  17759. }
  17760. if (state.pending) state.pending = null;
  17761. var cur = stream.current(), openPHP = cur.search(/<\?/), m;
  17762. if (openPHP != -1) {
  17763. if (style == "string" && (m = cur.match(/[\'\"]$/)) && !/\?>/.test(cur)) state.pending = m[0];
  17764. else state.pending = {end: stream.pos, style: style};
  17765. stream.backUp(cur.length - openPHP);
  17766. }
  17767. return style;
  17768. } else if (isPHP && state.php.tokenize == null && stream.match("?>")) {
  17769. state.curMode = htmlMode;
  17770. state.curState = state.html;
  17771. if (!state.php.context.prev) state.php = null;
  17772. return "meta";
  17773. } else {
  17774. return phpMode.token(stream, state.curState);
  17775. }
  17776. }
  17777. return {
  17778. startState: function() {
  17779. var html = CodeMirror.startState(htmlMode)
  17780. var php = parserConfig.startOpen ? CodeMirror.startState(phpMode) : null
  17781. return {html: html,
  17782. php: php,
  17783. curMode: parserConfig.startOpen ? phpMode : htmlMode,
  17784. curState: parserConfig.startOpen ? php : html,
  17785. pending: null};
  17786. },
  17787. copyState: function(state) {
  17788. var html = state.html, htmlNew = CodeMirror.copyState(htmlMode, html),
  17789. php = state.php, phpNew = php && CodeMirror.copyState(phpMode, php), cur;
  17790. if (state.curMode == htmlMode) cur = htmlNew;
  17791. else cur = phpNew;
  17792. return {html: htmlNew, php: phpNew, curMode: state.curMode, curState: cur,
  17793. pending: state.pending};
  17794. },
  17795. token: dispatch,
  17796. indent: function(state, textAfter, line) {
  17797. if ((state.curMode != phpMode && /^\s*<\//.test(textAfter)) ||
  17798. (state.curMode == phpMode && /^\?>/.test(textAfter)))
  17799. return htmlMode.indent(state.html, textAfter, line);
  17800. return state.curMode.indent(state.curState, textAfter, line);
  17801. },
  17802. blockCommentStart: "/*",
  17803. blockCommentEnd: "*/",
  17804. lineComment: "//",
  17805. innerMode: function(state) { return {state: state.curState, mode: state.curMode}; }
  17806. };
  17807. }, "htmlmixed", "clike");
  17808. CodeMirror.defineMIME("application/x-httpd-php", "php");
  17809. CodeMirror.defineMIME("application/x-httpd-php-open", {name: "php", startOpen: true});
  17810. CodeMirror.defineMIME("text/x-php", phpConfig);
  17811. });
  17812. /***/ }),
  17813. /***/ 81201:
  17814. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  17815. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  17816. // Distributed under an MIT license: https://codemirror.net/LICENSE
  17817. (function(mod) {
  17818. if (true) // CommonJS
  17819. mod(__webpack_require__(4631), __webpack_require__(36629));
  17820. else {}
  17821. })(function(CodeMirror) {
  17822. "use strict";
  17823. CodeMirror.defineMode("sass", function(config) {
  17824. var cssMode = CodeMirror.mimeModes["text/css"];
  17825. var propertyKeywords = cssMode.propertyKeywords || {},
  17826. colorKeywords = cssMode.colorKeywords || {},
  17827. valueKeywords = cssMode.valueKeywords || {},
  17828. fontProperties = cssMode.fontProperties || {};
  17829. function tokenRegexp(words) {
  17830. return new RegExp("^" + words.join("|"));
  17831. }
  17832. var keywords = ["true", "false", "null", "auto"];
  17833. var keywordsRegexp = new RegExp("^" + keywords.join("|"));
  17834. var operators = ["\\(", "\\)", "=", ">", "<", "==", ">=", "<=", "\\+", "-",
  17835. "\\!=", "/", "\\*", "%", "and", "or", "not", ";","\\{","\\}",":"];
  17836. var opRegexp = tokenRegexp(operators);
  17837. var pseudoElementsRegexp = /^::?[a-zA-Z_][\w\-]*/;
  17838. var word;
  17839. function isEndLine(stream) {
  17840. return !stream.peek() || stream.match(/\s+$/, false);
  17841. }
  17842. function urlTokens(stream, state) {
  17843. var ch = stream.peek();
  17844. if (ch === ")") {
  17845. stream.next();
  17846. state.tokenizer = tokenBase;
  17847. return "operator";
  17848. } else if (ch === "(") {
  17849. stream.next();
  17850. stream.eatSpace();
  17851. return "operator";
  17852. } else if (ch === "'" || ch === '"') {
  17853. state.tokenizer = buildStringTokenizer(stream.next());
  17854. return "string";
  17855. } else {
  17856. state.tokenizer = buildStringTokenizer(")", false);
  17857. return "string";
  17858. }
  17859. }
  17860. function comment(indentation, multiLine) {
  17861. return function(stream, state) {
  17862. if (stream.sol() && stream.indentation() <= indentation) {
  17863. state.tokenizer = tokenBase;
  17864. return tokenBase(stream, state);
  17865. }
  17866. if (multiLine && stream.skipTo("*/")) {
  17867. stream.next();
  17868. stream.next();
  17869. state.tokenizer = tokenBase;
  17870. } else {
  17871. stream.skipToEnd();
  17872. }
  17873. return "comment";
  17874. };
  17875. }
  17876. function buildStringTokenizer(quote, greedy) {
  17877. if (greedy == null) { greedy = true; }
  17878. function stringTokenizer(stream, state) {
  17879. var nextChar = stream.next();
  17880. var peekChar = stream.peek();
  17881. var previousChar = stream.string.charAt(stream.pos-2);
  17882. var endingString = ((nextChar !== "\\" && peekChar === quote) || (nextChar === quote && previousChar !== "\\"));
  17883. if (endingString) {
  17884. if (nextChar !== quote && greedy) { stream.next(); }
  17885. if (isEndLine(stream)) {
  17886. state.cursorHalf = 0;
  17887. }
  17888. state.tokenizer = tokenBase;
  17889. return "string";
  17890. } else if (nextChar === "#" && peekChar === "{") {
  17891. state.tokenizer = buildInterpolationTokenizer(stringTokenizer);
  17892. stream.next();
  17893. return "operator";
  17894. } else {
  17895. return "string";
  17896. }
  17897. }
  17898. return stringTokenizer;
  17899. }
  17900. function buildInterpolationTokenizer(currentTokenizer) {
  17901. return function(stream, state) {
  17902. if (stream.peek() === "}") {
  17903. stream.next();
  17904. state.tokenizer = currentTokenizer;
  17905. return "operator";
  17906. } else {
  17907. return tokenBase(stream, state);
  17908. }
  17909. };
  17910. }
  17911. function indent(state) {
  17912. if (state.indentCount == 0) {
  17913. state.indentCount++;
  17914. var lastScopeOffset = state.scopes[0].offset;
  17915. var currentOffset = lastScopeOffset + config.indentUnit;
  17916. state.scopes.unshift({ offset:currentOffset });
  17917. }
  17918. }
  17919. function dedent(state) {
  17920. if (state.scopes.length == 1) return;
  17921. state.scopes.shift();
  17922. }
  17923. function tokenBase(stream, state) {
  17924. var ch = stream.peek();
  17925. // Comment
  17926. if (stream.match("/*")) {
  17927. state.tokenizer = comment(stream.indentation(), true);
  17928. return state.tokenizer(stream, state);
  17929. }
  17930. if (stream.match("//")) {
  17931. state.tokenizer = comment(stream.indentation(), false);
  17932. return state.tokenizer(stream, state);
  17933. }
  17934. // Interpolation
  17935. if (stream.match("#{")) {
  17936. state.tokenizer = buildInterpolationTokenizer(tokenBase);
  17937. return "operator";
  17938. }
  17939. // Strings
  17940. if (ch === '"' || ch === "'") {
  17941. stream.next();
  17942. state.tokenizer = buildStringTokenizer(ch);
  17943. return "string";
  17944. }
  17945. if(!state.cursorHalf){// state.cursorHalf === 0
  17946. // first half i.e. before : for key-value pairs
  17947. // including selectors
  17948. if (ch === "-") {
  17949. if (stream.match(/^-\w+-/)) {
  17950. return "meta";
  17951. }
  17952. }
  17953. if (ch === ".") {
  17954. stream.next();
  17955. if (stream.match(/^[\w-]+/)) {
  17956. indent(state);
  17957. return "qualifier";
  17958. } else if (stream.peek() === "#") {
  17959. indent(state);
  17960. return "tag";
  17961. }
  17962. }
  17963. if (ch === "#") {
  17964. stream.next();
  17965. // ID selectors
  17966. if (stream.match(/^[\w-]+/)) {
  17967. indent(state);
  17968. return "builtin";
  17969. }
  17970. if (stream.peek() === "#") {
  17971. indent(state);
  17972. return "tag";
  17973. }
  17974. }
  17975. // Variables
  17976. if (ch === "$") {
  17977. stream.next();
  17978. stream.eatWhile(/[\w-]/);
  17979. return "variable-2";
  17980. }
  17981. // Numbers
  17982. if (stream.match(/^-?[0-9\.]+/))
  17983. return "number";
  17984. // Units
  17985. if (stream.match(/^(px|em|in)\b/))
  17986. return "unit";
  17987. if (stream.match(keywordsRegexp))
  17988. return "keyword";
  17989. if (stream.match(/^url/) && stream.peek() === "(") {
  17990. state.tokenizer = urlTokens;
  17991. return "atom";
  17992. }
  17993. if (ch === "=") {
  17994. // Match shortcut mixin definition
  17995. if (stream.match(/^=[\w-]+/)) {
  17996. indent(state);
  17997. return "meta";
  17998. }
  17999. }
  18000. if (ch === "+") {
  18001. // Match shortcut mixin definition
  18002. if (stream.match(/^\+[\w-]+/)){
  18003. return "variable-3";
  18004. }
  18005. }
  18006. if(ch === "@"){
  18007. if(stream.match('@extend')){
  18008. if(!stream.match(/\s*[\w]/))
  18009. dedent(state);
  18010. }
  18011. }
  18012. // Indent Directives
  18013. if (stream.match(/^@(else if|if|media|else|for|each|while|mixin|function)/)) {
  18014. indent(state);
  18015. return "def";
  18016. }
  18017. // Other Directives
  18018. if (ch === "@") {
  18019. stream.next();
  18020. stream.eatWhile(/[\w-]/);
  18021. return "def";
  18022. }
  18023. if (stream.eatWhile(/[\w-]/)){
  18024. if(stream.match(/ *: *[\w-\+\$#!\("']/,false)){
  18025. word = stream.current().toLowerCase();
  18026. var prop = state.prevProp + "-" + word;
  18027. if (propertyKeywords.hasOwnProperty(prop)) {
  18028. return "property";
  18029. } else if (propertyKeywords.hasOwnProperty(word)) {
  18030. state.prevProp = word;
  18031. return "property";
  18032. } else if (fontProperties.hasOwnProperty(word)) {
  18033. return "property";
  18034. }
  18035. return "tag";
  18036. }
  18037. else if(stream.match(/ *:/,false)){
  18038. indent(state);
  18039. state.cursorHalf = 1;
  18040. state.prevProp = stream.current().toLowerCase();
  18041. return "property";
  18042. }
  18043. else if(stream.match(/ *,/,false)){
  18044. return "tag";
  18045. }
  18046. else{
  18047. indent(state);
  18048. return "tag";
  18049. }
  18050. }
  18051. if(ch === ":"){
  18052. if (stream.match(pseudoElementsRegexp)){ // could be a pseudo-element
  18053. return "variable-3";
  18054. }
  18055. stream.next();
  18056. state.cursorHalf=1;
  18057. return "operator";
  18058. }
  18059. } // cursorHalf===0 ends here
  18060. else{
  18061. if (ch === "#") {
  18062. stream.next();
  18063. // Hex numbers
  18064. if (stream.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/)){
  18065. if (isEndLine(stream)) {
  18066. state.cursorHalf = 0;
  18067. }
  18068. return "number";
  18069. }
  18070. }
  18071. // Numbers
  18072. if (stream.match(/^-?[0-9\.]+/)){
  18073. if (isEndLine(stream)) {
  18074. state.cursorHalf = 0;
  18075. }
  18076. return "number";
  18077. }
  18078. // Units
  18079. if (stream.match(/^(px|em|in)\b/)){
  18080. if (isEndLine(stream)) {
  18081. state.cursorHalf = 0;
  18082. }
  18083. return "unit";
  18084. }
  18085. if (stream.match(keywordsRegexp)){
  18086. if (isEndLine(stream)) {
  18087. state.cursorHalf = 0;
  18088. }
  18089. return "keyword";
  18090. }
  18091. if (stream.match(/^url/) && stream.peek() === "(") {
  18092. state.tokenizer = urlTokens;
  18093. if (isEndLine(stream)) {
  18094. state.cursorHalf = 0;
  18095. }
  18096. return "atom";
  18097. }
  18098. // Variables
  18099. if (ch === "$") {
  18100. stream.next();
  18101. stream.eatWhile(/[\w-]/);
  18102. if (isEndLine(stream)) {
  18103. state.cursorHalf = 0;
  18104. }
  18105. return "variable-2";
  18106. }
  18107. // bang character for !important, !default, etc.
  18108. if (ch === "!") {
  18109. stream.next();
  18110. state.cursorHalf = 0;
  18111. return stream.match(/^[\w]+/) ? "keyword": "operator";
  18112. }
  18113. if (stream.match(opRegexp)){
  18114. if (isEndLine(stream)) {
  18115. state.cursorHalf = 0;
  18116. }
  18117. return "operator";
  18118. }
  18119. // attributes
  18120. if (stream.eatWhile(/[\w-]/)) {
  18121. if (isEndLine(stream)) {
  18122. state.cursorHalf = 0;
  18123. }
  18124. word = stream.current().toLowerCase();
  18125. if (valueKeywords.hasOwnProperty(word)) {
  18126. return "atom";
  18127. } else if (colorKeywords.hasOwnProperty(word)) {
  18128. return "keyword";
  18129. } else if (propertyKeywords.hasOwnProperty(word)) {
  18130. state.prevProp = stream.current().toLowerCase();
  18131. return "property";
  18132. } else {
  18133. return "tag";
  18134. }
  18135. }
  18136. //stream.eatSpace();
  18137. if (isEndLine(stream)) {
  18138. state.cursorHalf = 0;
  18139. return null;
  18140. }
  18141. } // else ends here
  18142. if (stream.match(opRegexp))
  18143. return "operator";
  18144. // If we haven't returned by now, we move 1 character
  18145. // and return an error
  18146. stream.next();
  18147. return null;
  18148. }
  18149. function tokenLexer(stream, state) {
  18150. if (stream.sol()) state.indentCount = 0;
  18151. var style = state.tokenizer(stream, state);
  18152. var current = stream.current();
  18153. if (current === "@return" || current === "}"){
  18154. dedent(state);
  18155. }
  18156. if (style !== null) {
  18157. var startOfToken = stream.pos - current.length;
  18158. var withCurrentIndent = startOfToken + (config.indentUnit * state.indentCount);
  18159. var newScopes = [];
  18160. for (var i = 0; i < state.scopes.length; i++) {
  18161. var scope = state.scopes[i];
  18162. if (scope.offset <= withCurrentIndent)
  18163. newScopes.push(scope);
  18164. }
  18165. state.scopes = newScopes;
  18166. }
  18167. return style;
  18168. }
  18169. return {
  18170. startState: function() {
  18171. return {
  18172. tokenizer: tokenBase,
  18173. scopes: [{offset: 0, type: "sass"}],
  18174. indentCount: 0,
  18175. cursorHalf: 0, // cursor half tells us if cursor lies after (1)
  18176. // or before (0) colon (well... more or less)
  18177. definedVars: [],
  18178. definedMixins: []
  18179. };
  18180. },
  18181. token: function(stream, state) {
  18182. var style = tokenLexer(stream, state);
  18183. state.lastToken = { style: style, content: stream.current() };
  18184. return style;
  18185. },
  18186. indent: function(state) {
  18187. return state.scopes[0].offset;
  18188. },
  18189. blockCommentStart: "/*",
  18190. blockCommentEnd: "*/",
  18191. lineComment: "//",
  18192. fold: "indent"
  18193. };
  18194. }, "css");
  18195. CodeMirror.defineMIME("text/x-sass", "sass");
  18196. });
  18197. /***/ }),
  18198. /***/ 54702:
  18199. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  18200. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  18201. // Distributed under an MIT license: https://codemirror.net/LICENSE
  18202. (function(mod) {
  18203. if (true) // CommonJS
  18204. mod(__webpack_require__(4631), __webpack_require__(87093));
  18205. else {}
  18206. })(function(CodeMirror) {
  18207. "use strict";
  18208. CodeMirror.defineMode("twig:inner", function() {
  18209. var keywords = ["and", "as", "autoescape", "endautoescape", "block", "do", "endblock", "else", "elseif", "extends", "for", "endfor", "embed", "endembed", "filter", "endfilter", "flush", "from", "if", "endif", "in", "is", "include", "import", "not", "or", "set", "spaceless", "endspaceless", "with", "endwith", "trans", "endtrans", "blocktrans", "endblocktrans", "macro", "endmacro", "use", "verbatim", "endverbatim"],
  18210. operator = /^[+\-*&%=<>!?|~^]/,
  18211. sign = /^[:\[\(\{]/,
  18212. atom = ["true", "false", "null", "empty", "defined", "divisibleby", "divisible by", "even", "odd", "iterable", "sameas", "same as"],
  18213. number = /^(\d[+\-\*\/])?\d+(\.\d+)?/;
  18214. keywords = new RegExp("((" + keywords.join(")|(") + "))\\b");
  18215. atom = new RegExp("((" + atom.join(")|(") + "))\\b");
  18216. function tokenBase (stream, state) {
  18217. var ch = stream.peek();
  18218. //Comment
  18219. if (state.incomment) {
  18220. if (!stream.skipTo("#}")) {
  18221. stream.skipToEnd();
  18222. } else {
  18223. stream.eatWhile(/\#|}/);
  18224. state.incomment = false;
  18225. }
  18226. return "comment";
  18227. //Tag
  18228. } else if (state.intag) {
  18229. //After operator
  18230. if (state.operator) {
  18231. state.operator = false;
  18232. if (stream.match(atom)) {
  18233. return "atom";
  18234. }
  18235. if (stream.match(number)) {
  18236. return "number";
  18237. }
  18238. }
  18239. //After sign
  18240. if (state.sign) {
  18241. state.sign = false;
  18242. if (stream.match(atom)) {
  18243. return "atom";
  18244. }
  18245. if (stream.match(number)) {
  18246. return "number";
  18247. }
  18248. }
  18249. if (state.instring) {
  18250. if (ch == state.instring) {
  18251. state.instring = false;
  18252. }
  18253. stream.next();
  18254. return "string";
  18255. } else if (ch == "'" || ch == '"') {
  18256. state.instring = ch;
  18257. stream.next();
  18258. return "string";
  18259. } else if (stream.match(state.intag + "}") || stream.eat("-") && stream.match(state.intag + "}")) {
  18260. state.intag = false;
  18261. return "tag";
  18262. } else if (stream.match(operator)) {
  18263. state.operator = true;
  18264. return "operator";
  18265. } else if (stream.match(sign)) {
  18266. state.sign = true;
  18267. } else {
  18268. if (stream.eat(" ") || stream.sol()) {
  18269. if (stream.match(keywords)) {
  18270. return "keyword";
  18271. }
  18272. if (stream.match(atom)) {
  18273. return "atom";
  18274. }
  18275. if (stream.match(number)) {
  18276. return "number";
  18277. }
  18278. if (stream.sol()) {
  18279. stream.next();
  18280. }
  18281. } else {
  18282. stream.next();
  18283. }
  18284. }
  18285. return "variable";
  18286. } else if (stream.eat("{")) {
  18287. if (stream.eat("#")) {
  18288. state.incomment = true;
  18289. if (!stream.skipTo("#}")) {
  18290. stream.skipToEnd();
  18291. } else {
  18292. stream.eatWhile(/\#|}/);
  18293. state.incomment = false;
  18294. }
  18295. return "comment";
  18296. //Open tag
  18297. } else if (ch = stream.eat(/\{|%/)) {
  18298. //Cache close tag
  18299. state.intag = ch;
  18300. if (ch == "{") {
  18301. state.intag = "}";
  18302. }
  18303. stream.eat("-");
  18304. return "tag";
  18305. }
  18306. }
  18307. stream.next();
  18308. };
  18309. return {
  18310. startState: function () {
  18311. return {};
  18312. },
  18313. token: function (stream, state) {
  18314. return tokenBase(stream, state);
  18315. }
  18316. };
  18317. });
  18318. CodeMirror.defineMode("twig", function(config, parserConfig) {
  18319. var twigInner = CodeMirror.getMode(config, "twig:inner");
  18320. if (!parserConfig || !parserConfig.base) return twigInner;
  18321. return CodeMirror.multiplexingMode(
  18322. CodeMirror.getMode(config, parserConfig.base), {
  18323. open: /\{[{#%]/, close: /[}#%]\}/, mode: twigInner, parseDelimiters: true
  18324. }
  18325. );
  18326. });
  18327. CodeMirror.defineMIME("text/x-twig", "twig");
  18328. });
  18329. /***/ }),
  18330. /***/ 29589:
  18331. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  18332. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  18333. // Distributed under an MIT license: https://codemirror.net/LICENSE
  18334. (function(mod) {
  18335. if (true) // CommonJS
  18336. mod(__webpack_require__(4631));
  18337. else {}
  18338. })(function(CodeMirror) {
  18339. "use strict";
  18340. var htmlConfig = {
  18341. autoSelfClosers: {'area': true, 'base': true, 'br': true, 'col': true, 'command': true,
  18342. 'embed': true, 'frame': true, 'hr': true, 'img': true, 'input': true,
  18343. 'keygen': true, 'link': true, 'meta': true, 'param': true, 'source': true,
  18344. 'track': true, 'wbr': true, 'menuitem': true},
  18345. implicitlyClosed: {'dd': true, 'li': true, 'optgroup': true, 'option': true, 'p': true,
  18346. 'rp': true, 'rt': true, 'tbody': true, 'td': true, 'tfoot': true,
  18347. 'th': true, 'tr': true},
  18348. contextGrabbers: {
  18349. 'dd': {'dd': true, 'dt': true},
  18350. 'dt': {'dd': true, 'dt': true},
  18351. 'li': {'li': true},
  18352. 'option': {'option': true, 'optgroup': true},
  18353. 'optgroup': {'optgroup': true},
  18354. 'p': {'address': true, 'article': true, 'aside': true, 'blockquote': true, 'dir': true,
  18355. 'div': true, 'dl': true, 'fieldset': true, 'footer': true, 'form': true,
  18356. 'h1': true, 'h2': true, 'h3': true, 'h4': true, 'h5': true, 'h6': true,
  18357. 'header': true, 'hgroup': true, 'hr': true, 'menu': true, 'nav': true, 'ol': true,
  18358. 'p': true, 'pre': true, 'section': true, 'table': true, 'ul': true},
  18359. 'rp': {'rp': true, 'rt': true},
  18360. 'rt': {'rp': true, 'rt': true},
  18361. 'tbody': {'tbody': true, 'tfoot': true},
  18362. 'td': {'td': true, 'th': true},
  18363. 'tfoot': {'tbody': true},
  18364. 'th': {'td': true, 'th': true},
  18365. 'thead': {'tbody': true, 'tfoot': true},
  18366. 'tr': {'tr': true}
  18367. },
  18368. doNotIndent: {"pre": true},
  18369. allowUnquoted: true,
  18370. allowMissing: true,
  18371. caseFold: true
  18372. }
  18373. var xmlConfig = {
  18374. autoSelfClosers: {},
  18375. implicitlyClosed: {},
  18376. contextGrabbers: {},
  18377. doNotIndent: {},
  18378. allowUnquoted: false,
  18379. allowMissing: false,
  18380. allowMissingTagName: false,
  18381. caseFold: false
  18382. }
  18383. CodeMirror.defineMode("xml", function(editorConf, config_) {
  18384. var indentUnit = editorConf.indentUnit
  18385. var config = {}
  18386. var defaults = config_.htmlMode ? htmlConfig : xmlConfig
  18387. for (var prop in defaults) config[prop] = defaults[prop]
  18388. for (var prop in config_) config[prop] = config_[prop]
  18389. // Return variables for tokenizers
  18390. var type, setStyle;
  18391. function inText(stream, state) {
  18392. function chain(parser) {
  18393. state.tokenize = parser;
  18394. return parser(stream, state);
  18395. }
  18396. var ch = stream.next();
  18397. if (ch == "<") {
  18398. if (stream.eat("!")) {
  18399. if (stream.eat("[")) {
  18400. if (stream.match("CDATA[")) return chain(inBlock("atom", "]]>"));
  18401. else return null;
  18402. } else if (stream.match("--")) {
  18403. return chain(inBlock("comment", "-->"));
  18404. } else if (stream.match("DOCTYPE", true, true)) {
  18405. stream.eatWhile(/[\w\._\-]/);
  18406. return chain(doctype(1));
  18407. } else {
  18408. return null;
  18409. }
  18410. } else if (stream.eat("?")) {
  18411. stream.eatWhile(/[\w\._\-]/);
  18412. state.tokenize = inBlock("meta", "?>");
  18413. return "meta";
  18414. } else {
  18415. type = stream.eat("/") ? "closeTag" : "openTag";
  18416. state.tokenize = inTag;
  18417. return "tag bracket";
  18418. }
  18419. } else if (ch == "&") {
  18420. var ok;
  18421. if (stream.eat("#")) {
  18422. if (stream.eat("x")) {
  18423. ok = stream.eatWhile(/[a-fA-F\d]/) && stream.eat(";");
  18424. } else {
  18425. ok = stream.eatWhile(/[\d]/) && stream.eat(";");
  18426. }
  18427. } else {
  18428. ok = stream.eatWhile(/[\w\.\-:]/) && stream.eat(";");
  18429. }
  18430. return ok ? "atom" : "error";
  18431. } else {
  18432. stream.eatWhile(/[^&<]/);
  18433. return null;
  18434. }
  18435. }
  18436. inText.isInText = true;
  18437. function inTag(stream, state) {
  18438. var ch = stream.next();
  18439. if (ch == ">" || (ch == "/" && stream.eat(">"))) {
  18440. state.tokenize = inText;
  18441. type = ch == ">" ? "endTag" : "selfcloseTag";
  18442. return "tag bracket";
  18443. } else if (ch == "=") {
  18444. type = "equals";
  18445. return null;
  18446. } else if (ch == "<") {
  18447. state.tokenize = inText;
  18448. state.state = baseState;
  18449. state.tagName = state.tagStart = null;
  18450. var next = state.tokenize(stream, state);
  18451. return next ? next + " tag error" : "tag error";
  18452. } else if (/[\'\"]/.test(ch)) {
  18453. state.tokenize = inAttribute(ch);
  18454. state.stringStartCol = stream.column();
  18455. return state.tokenize(stream, state);
  18456. } else {
  18457. stream.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);
  18458. return "word";
  18459. }
  18460. }
  18461. function inAttribute(quote) {
  18462. var closure = function(stream, state) {
  18463. while (!stream.eol()) {
  18464. if (stream.next() == quote) {
  18465. state.tokenize = inTag;
  18466. break;
  18467. }
  18468. }
  18469. return "string";
  18470. };
  18471. closure.isInAttribute = true;
  18472. return closure;
  18473. }
  18474. function inBlock(style, terminator) {
  18475. return function(stream, state) {
  18476. while (!stream.eol()) {
  18477. if (stream.match(terminator)) {
  18478. state.tokenize = inText;
  18479. break;
  18480. }
  18481. stream.next();
  18482. }
  18483. return style;
  18484. }
  18485. }
  18486. function doctype(depth) {
  18487. return function(stream, state) {
  18488. var ch;
  18489. while ((ch = stream.next()) != null) {
  18490. if (ch == "<") {
  18491. state.tokenize = doctype(depth + 1);
  18492. return state.tokenize(stream, state);
  18493. } else if (ch == ">") {
  18494. if (depth == 1) {
  18495. state.tokenize = inText;
  18496. break;
  18497. } else {
  18498. state.tokenize = doctype(depth - 1);
  18499. return state.tokenize(stream, state);
  18500. }
  18501. }
  18502. }
  18503. return "meta";
  18504. };
  18505. }
  18506. function lower(tagName) {
  18507. return tagName && tagName.toLowerCase();
  18508. }
  18509. function Context(state, tagName, startOfLine) {
  18510. this.prev = state.context;
  18511. this.tagName = tagName || "";
  18512. this.indent = state.indented;
  18513. this.startOfLine = startOfLine;
  18514. if (config.doNotIndent.hasOwnProperty(tagName) || (state.context && state.context.noIndent))
  18515. this.noIndent = true;
  18516. }
  18517. function popContext(state) {
  18518. if (state.context) state.context = state.context.prev;
  18519. }
  18520. function maybePopContext(state, nextTagName) {
  18521. var parentTagName;
  18522. while (true) {
  18523. if (!state.context) {
  18524. return;
  18525. }
  18526. parentTagName = state.context.tagName;
  18527. if (!config.contextGrabbers.hasOwnProperty(lower(parentTagName)) ||
  18528. !config.contextGrabbers[lower(parentTagName)].hasOwnProperty(lower(nextTagName))) {
  18529. return;
  18530. }
  18531. popContext(state);
  18532. }
  18533. }
  18534. function baseState(type, stream, state) {
  18535. if (type == "openTag") {
  18536. state.tagStart = stream.column();
  18537. return tagNameState;
  18538. } else if (type == "closeTag") {
  18539. return closeTagNameState;
  18540. } else {
  18541. return baseState;
  18542. }
  18543. }
  18544. function tagNameState(type, stream, state) {
  18545. if (type == "word") {
  18546. state.tagName = stream.current();
  18547. setStyle = "tag";
  18548. return attrState;
  18549. } else if (config.allowMissingTagName && type == "endTag") {
  18550. setStyle = "tag bracket";
  18551. return attrState(type, stream, state);
  18552. } else {
  18553. setStyle = "error";
  18554. return tagNameState;
  18555. }
  18556. }
  18557. function closeTagNameState(type, stream, state) {
  18558. if (type == "word") {
  18559. var tagName = stream.current();
  18560. if (state.context && state.context.tagName != tagName &&
  18561. config.implicitlyClosed.hasOwnProperty(lower(state.context.tagName)))
  18562. popContext(state);
  18563. if ((state.context && state.context.tagName == tagName) || config.matchClosing === false) {
  18564. setStyle = "tag";
  18565. return closeState;
  18566. } else {
  18567. setStyle = "tag error";
  18568. return closeStateErr;
  18569. }
  18570. } else if (config.allowMissingTagName && type == "endTag") {
  18571. setStyle = "tag bracket";
  18572. return closeState(type, stream, state);
  18573. } else {
  18574. setStyle = "error";
  18575. return closeStateErr;
  18576. }
  18577. }
  18578. function closeState(type, _stream, state) {
  18579. if (type != "endTag") {
  18580. setStyle = "error";
  18581. return closeState;
  18582. }
  18583. popContext(state);
  18584. return baseState;
  18585. }
  18586. function closeStateErr(type, stream, state) {
  18587. setStyle = "error";
  18588. return closeState(type, stream, state);
  18589. }
  18590. function attrState(type, _stream, state) {
  18591. if (type == "word") {
  18592. setStyle = "attribute";
  18593. return attrEqState;
  18594. } else if (type == "endTag" || type == "selfcloseTag") {
  18595. var tagName = state.tagName, tagStart = state.tagStart;
  18596. state.tagName = state.tagStart = null;
  18597. if (type == "selfcloseTag" ||
  18598. config.autoSelfClosers.hasOwnProperty(lower(tagName))) {
  18599. maybePopContext(state, tagName);
  18600. } else {
  18601. maybePopContext(state, tagName);
  18602. state.context = new Context(state, tagName, tagStart == state.indented);
  18603. }
  18604. return baseState;
  18605. }
  18606. setStyle = "error";
  18607. return attrState;
  18608. }
  18609. function attrEqState(type, stream, state) {
  18610. if (type == "equals") return attrValueState;
  18611. if (!config.allowMissing) setStyle = "error";
  18612. return attrState(type, stream, state);
  18613. }
  18614. function attrValueState(type, stream, state) {
  18615. if (type == "string") return attrContinuedState;
  18616. if (type == "word" && config.allowUnquoted) {setStyle = "string"; return attrState;}
  18617. setStyle = "error";
  18618. return attrState(type, stream, state);
  18619. }
  18620. function attrContinuedState(type, stream, state) {
  18621. if (type == "string") return attrContinuedState;
  18622. return attrState(type, stream, state);
  18623. }
  18624. return {
  18625. startState: function(baseIndent) {
  18626. var state = {tokenize: inText,
  18627. state: baseState,
  18628. indented: baseIndent || 0,
  18629. tagName: null, tagStart: null,
  18630. context: null}
  18631. if (baseIndent != null) state.baseIndent = baseIndent
  18632. return state
  18633. },
  18634. token: function(stream, state) {
  18635. if (!state.tagName && stream.sol())
  18636. state.indented = stream.indentation();
  18637. if (stream.eatSpace()) return null;
  18638. type = null;
  18639. var style = state.tokenize(stream, state);
  18640. if ((style || type) && style != "comment") {
  18641. setStyle = null;
  18642. state.state = state.state(type || style, stream, state);
  18643. if (setStyle)
  18644. style = setStyle == "error" ? style + " error" : setStyle;
  18645. }
  18646. return style;
  18647. },
  18648. indent: function(state, textAfter, fullLine) {
  18649. var context = state.context;
  18650. // Indent multi-line strings (e.g. css).
  18651. if (state.tokenize.isInAttribute) {
  18652. if (state.tagStart == state.indented)
  18653. return state.stringStartCol + 1;
  18654. else
  18655. return state.indented + indentUnit;
  18656. }
  18657. if (context && context.noIndent) return CodeMirror.Pass;
  18658. if (state.tokenize != inTag && state.tokenize != inText)
  18659. return fullLine ? fullLine.match(/^(\s*)/)[0].length : 0;
  18660. // Indent the starts of attribute names.
  18661. if (state.tagName) {
  18662. if (config.multilineTagIndentPastTag !== false)
  18663. return state.tagStart + state.tagName.length + 2;
  18664. else
  18665. return state.tagStart + indentUnit * (config.multilineTagIndentFactor || 1);
  18666. }
  18667. if (config.alignCDATA && /<!\[CDATA\[/.test(textAfter)) return 0;
  18668. var tagAfter = textAfter && /^<(\/)?([\w_:\.-]*)/.exec(textAfter);
  18669. if (tagAfter && tagAfter[1]) { // Closing tag spotted
  18670. while (context) {
  18671. if (context.tagName == tagAfter[2]) {
  18672. context = context.prev;
  18673. break;
  18674. } else if (config.implicitlyClosed.hasOwnProperty(lower(context.tagName))) {
  18675. context = context.prev;
  18676. } else {
  18677. break;
  18678. }
  18679. }
  18680. } else if (tagAfter) { // Opening tag spotted
  18681. while (context) {
  18682. var grabbers = config.contextGrabbers[lower(context.tagName)];
  18683. if (grabbers && grabbers.hasOwnProperty(lower(tagAfter[2])))
  18684. context = context.prev;
  18685. else
  18686. break;
  18687. }
  18688. }
  18689. while (context && context.prev && !context.startOfLine)
  18690. context = context.prev;
  18691. if (context) return context.indent + indentUnit;
  18692. else return state.baseIndent || 0;
  18693. },
  18694. electricInput: /<\/[\s\w:]+>$/,
  18695. blockCommentStart: "<!--",
  18696. blockCommentEnd: "-->",
  18697. configuration: config.htmlMode ? "html" : "xml",
  18698. helperType: config.htmlMode ? "html" : "xml",
  18699. skipAttribute: function(state) {
  18700. if (state.state == attrValueState)
  18701. state.state = attrState
  18702. },
  18703. xmlCurrentTag: function(state) {
  18704. return state.tagName ? {name: state.tagName, close: state.type == "closeTag"} : null
  18705. },
  18706. xmlCurrentContext: function(state) {
  18707. var context = []
  18708. for (var cx = state.context; cx; cx = cx.prev)
  18709. context.push(cx.tagName)
  18710. return context.reverse()
  18711. }
  18712. };
  18713. });
  18714. CodeMirror.defineMIME("text/xml", "xml");
  18715. CodeMirror.defineMIME("application/xml", "xml");
  18716. if (!CodeMirror.mimeModes.hasOwnProperty("text/html"))
  18717. CodeMirror.defineMIME("text/html", {name: "xml", htmlMode: true});
  18718. });
  18719. /***/ }),
  18720. /***/ 53631:
  18721. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  18722. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  18723. // Distributed under an MIT license: https://codemirror.net/LICENSE
  18724. (function(mod) {
  18725. if (true) // CommonJS
  18726. mod(__webpack_require__(4631));
  18727. else {}
  18728. })(function(CodeMirror) {
  18729. "use strict";
  18730. CodeMirror.defineMode("yaml", function() {
  18731. var cons = ['true', 'false', 'on', 'off', 'yes', 'no'];
  18732. var keywordRegex = new RegExp("\\b(("+cons.join(")|(")+"))$", 'i');
  18733. return {
  18734. token: function(stream, state) {
  18735. var ch = stream.peek();
  18736. var esc = state.escaped;
  18737. state.escaped = false;
  18738. /* comments */
  18739. if (ch == "#" && (stream.pos == 0 || /\s/.test(stream.string.charAt(stream.pos - 1)))) {
  18740. stream.skipToEnd();
  18741. return "comment";
  18742. }
  18743. if (stream.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))
  18744. return "string";
  18745. if (state.literal && stream.indentation() > state.keyCol) {
  18746. stream.skipToEnd(); return "string";
  18747. } else if (state.literal) { state.literal = false; }
  18748. if (stream.sol()) {
  18749. state.keyCol = 0;
  18750. state.pair = false;
  18751. state.pairStart = false;
  18752. /* document start */
  18753. if(stream.match('---')) { return "def"; }
  18754. /* document end */
  18755. if (stream.match('...')) { return "def"; }
  18756. /* array list item */
  18757. if (stream.match(/\s*-\s+/)) { return 'meta'; }
  18758. }
  18759. /* inline pairs/lists */
  18760. if (stream.match(/^(\{|\}|\[|\])/)) {
  18761. if (ch == '{')
  18762. state.inlinePairs++;
  18763. else if (ch == '}')
  18764. state.inlinePairs--;
  18765. else if (ch == '[')
  18766. state.inlineList++;
  18767. else
  18768. state.inlineList--;
  18769. return 'meta';
  18770. }
  18771. /* list separator */
  18772. if (state.inlineList > 0 && !esc && ch == ',') {
  18773. stream.next();
  18774. return 'meta';
  18775. }
  18776. /* pairs separator */
  18777. if (state.inlinePairs > 0 && !esc && ch == ',') {
  18778. state.keyCol = 0;
  18779. state.pair = false;
  18780. state.pairStart = false;
  18781. stream.next();
  18782. return 'meta';
  18783. }
  18784. /* start of value of a pair */
  18785. if (state.pairStart) {
  18786. /* block literals */
  18787. if (stream.match(/^\s*(\||\>)\s*/)) { state.literal = true; return 'meta'; };
  18788. /* references */
  18789. if (stream.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i)) { return 'variable-2'; }
  18790. /* numbers */
  18791. if (state.inlinePairs == 0 && stream.match(/^\s*-?[0-9\.\,]+\s?$/)) { return 'number'; }
  18792. if (state.inlinePairs > 0 && stream.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/)) { return 'number'; }
  18793. /* keywords */
  18794. if (stream.match(keywordRegex)) { return 'keyword'; }
  18795. }
  18796. /* pairs (associative arrays) -> key */
  18797. if (!state.pair && stream.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)) {
  18798. state.pair = true;
  18799. state.keyCol = stream.indentation();
  18800. return "atom";
  18801. }
  18802. if (state.pair && stream.match(/^:\s*/)) { state.pairStart = true; return 'meta'; }
  18803. /* nothing found, continue */
  18804. state.pairStart = false;
  18805. state.escaped = (ch == '\\');
  18806. stream.next();
  18807. return null;
  18808. },
  18809. startState: function() {
  18810. return {
  18811. pair: false,
  18812. pairStart: false,
  18813. keyCol: 0,
  18814. inlinePairs: 0,
  18815. inlineList: 0,
  18816. literal: false,
  18817. escaped: false
  18818. };
  18819. },
  18820. lineComment: "#",
  18821. fold: "indent"
  18822. };
  18823. });
  18824. CodeMirror.defineMIME("text/x-yaml", "yaml");
  18825. CodeMirror.defineMIME("text/yaml", "yaml");
  18826. });
  18827. /***/ }),
  18828. /***/ 16266:
  18829. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  18830. __webpack_require__(95767);
  18831. __webpack_require__(68132);
  18832. __webpack_require__(48388);
  18833. __webpack_require__(37470);
  18834. __webpack_require__(94882);
  18835. __webpack_require__(41520);
  18836. __webpack_require__(27476);
  18837. __webpack_require__(79622);
  18838. __webpack_require__(89375);
  18839. __webpack_require__(43533);
  18840. __webpack_require__(84672);
  18841. __webpack_require__(64157);
  18842. __webpack_require__(35095);
  18843. __webpack_require__(49892);
  18844. __webpack_require__(75115);
  18845. __webpack_require__(99176);
  18846. __webpack_require__(68838);
  18847. __webpack_require__(96253);
  18848. __webpack_require__(39730);
  18849. __webpack_require__(6059);
  18850. __webpack_require__(48377);
  18851. __webpack_require__(71084);
  18852. __webpack_require__(64299);
  18853. __webpack_require__(11246);
  18854. __webpack_require__(30726);
  18855. __webpack_require__(1901);
  18856. __webpack_require__(75972);
  18857. __webpack_require__(53403);
  18858. __webpack_require__(92516);
  18859. __webpack_require__(49371);
  18860. __webpack_require__(86479);
  18861. __webpack_require__(91736);
  18862. __webpack_require__(51889);
  18863. __webpack_require__(65177);
  18864. __webpack_require__(81246);
  18865. __webpack_require__(76503);
  18866. __webpack_require__(66786);
  18867. __webpack_require__(50932);
  18868. __webpack_require__(57526);
  18869. __webpack_require__(21591);
  18870. __webpack_require__(9073);
  18871. __webpack_require__(80347);
  18872. __webpack_require__(30579);
  18873. __webpack_require__(4669);
  18874. __webpack_require__(67710);
  18875. __webpack_require__(45789);
  18876. __webpack_require__(33514);
  18877. __webpack_require__(99978);
  18878. __webpack_require__(58472);
  18879. __webpack_require__(86946);
  18880. __webpack_require__(35068);
  18881. __webpack_require__(413);
  18882. __webpack_require__(50191);
  18883. __webpack_require__(98306);
  18884. __webpack_require__(64564);
  18885. __webpack_require__(39115);
  18886. __webpack_require__(29539);
  18887. __webpack_require__(96620);
  18888. __webpack_require__(62850);
  18889. __webpack_require__(10823);
  18890. __webpack_require__(17732);
  18891. __webpack_require__(40856);
  18892. __webpack_require__(80703);
  18893. __webpack_require__(91539);
  18894. __webpack_require__(5292);
  18895. __webpack_require__(45177);
  18896. __webpack_require__(73694);
  18897. __webpack_require__(37648);
  18898. __webpack_require__(27795);
  18899. __webpack_require__(4531);
  18900. __webpack_require__(23605);
  18901. __webpack_require__(6780);
  18902. __webpack_require__(69937);
  18903. __webpack_require__(10511);
  18904. __webpack_require__(81822);
  18905. __webpack_require__(19977);
  18906. __webpack_require__(91031);
  18907. __webpack_require__(46331);
  18908. __webpack_require__(41560);
  18909. __webpack_require__(20774);
  18910. __webpack_require__(30522);
  18911. __webpack_require__(58295);
  18912. __webpack_require__(87842);
  18913. __webpack_require__(50110);
  18914. __webpack_require__(20075);
  18915. __webpack_require__(24336);
  18916. __webpack_require__(19371);
  18917. __webpack_require__(98837);
  18918. __webpack_require__(26773);
  18919. __webpack_require__(15745);
  18920. __webpack_require__(33057);
  18921. __webpack_require__(3750);
  18922. __webpack_require__(23369);
  18923. __webpack_require__(99564);
  18924. __webpack_require__(32000);
  18925. __webpack_require__(48977);
  18926. __webpack_require__(52310);
  18927. __webpack_require__(94899);
  18928. __webpack_require__(31842);
  18929. __webpack_require__(56997);
  18930. __webpack_require__(83946);
  18931. __webpack_require__(18269);
  18932. __webpack_require__(66108);
  18933. __webpack_require__(76774);
  18934. __webpack_require__(21466);
  18935. __webpack_require__(59357);
  18936. __webpack_require__(76142);
  18937. __webpack_require__(51876);
  18938. __webpack_require__(40851);
  18939. __webpack_require__(88416);
  18940. __webpack_require__(98184);
  18941. __webpack_require__(30147);
  18942. __webpack_require__(59192);
  18943. __webpack_require__(30142);
  18944. __webpack_require__(1786);
  18945. __webpack_require__(75368);
  18946. __webpack_require__(46964);
  18947. __webpack_require__(62152);
  18948. __webpack_require__(74821);
  18949. __webpack_require__(79103);
  18950. __webpack_require__(81303);
  18951. __webpack_require__(83318);
  18952. __webpack_require__(70162);
  18953. __webpack_require__(33834);
  18954. __webpack_require__(21572);
  18955. __webpack_require__(82139);
  18956. __webpack_require__(10685);
  18957. __webpack_require__(85535);
  18958. __webpack_require__(17347);
  18959. __webpack_require__(83049);
  18960. __webpack_require__(96633);
  18961. __webpack_require__(68989);
  18962. __webpack_require__(78270);
  18963. __webpack_require__(64510);
  18964. __webpack_require__(73984);
  18965. __webpack_require__(75769);
  18966. __webpack_require__(50055);
  18967. __webpack_require__(96014);
  18968. module.exports = __webpack_require__(25645);
  18969. /***/ }),
  18970. /***/ 70911:
  18971. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  18972. __webpack_require__(1268);
  18973. module.exports = __webpack_require__(25645).Array.flatMap;
  18974. /***/ }),
  18975. /***/ 10990:
  18976. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  18977. __webpack_require__(62773);
  18978. module.exports = __webpack_require__(25645).Array.includes;
  18979. /***/ }),
  18980. /***/ 15434:
  18981. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  18982. __webpack_require__(83276);
  18983. module.exports = __webpack_require__(25645).Object.entries;
  18984. /***/ }),
  18985. /***/ 78051:
  18986. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  18987. __webpack_require__(98351);
  18988. module.exports = __webpack_require__(25645).Object.getOwnPropertyDescriptors;
  18989. /***/ }),
  18990. /***/ 38250:
  18991. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  18992. __webpack_require__(96409);
  18993. module.exports = __webpack_require__(25645).Object.values;
  18994. /***/ }),
  18995. /***/ 54952:
  18996. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  18997. "use strict";
  18998. __webpack_require__(40851);
  18999. __webpack_require__(9865);
  19000. module.exports = __webpack_require__(25645).Promise["finally"];
  19001. /***/ }),
  19002. /***/ 6197:
  19003. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19004. __webpack_require__(92770);
  19005. module.exports = __webpack_require__(25645).String.padEnd;
  19006. /***/ }),
  19007. /***/ 14160:
  19008. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19009. __webpack_require__(41784);
  19010. module.exports = __webpack_require__(25645).String.padStart;
  19011. /***/ }),
  19012. /***/ 54039:
  19013. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19014. __webpack_require__(94325);
  19015. module.exports = __webpack_require__(25645).String.trimRight;
  19016. /***/ }),
  19017. /***/ 96728:
  19018. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19019. __webpack_require__(65869);
  19020. module.exports = __webpack_require__(25645).String.trimLeft;
  19021. /***/ }),
  19022. /***/ 93568:
  19023. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19024. __webpack_require__(79665);
  19025. module.exports = (__webpack_require__(28787).f)('asyncIterator');
  19026. /***/ }),
  19027. /***/ 40115:
  19028. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19029. __webpack_require__(34579);
  19030. module.exports = __webpack_require__(11327).global;
  19031. /***/ }),
  19032. /***/ 85663:
  19033. /***/ ((module) => {
  19034. module.exports = function (it) {
  19035. if (typeof it != 'function') throw TypeError(it + ' is not a function!');
  19036. return it;
  19037. };
  19038. /***/ }),
  19039. /***/ 12159:
  19040. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19041. var isObject = __webpack_require__(36727);
  19042. module.exports = function (it) {
  19043. if (!isObject(it)) throw TypeError(it + ' is not an object!');
  19044. return it;
  19045. };
  19046. /***/ }),
  19047. /***/ 11327:
  19048. /***/ ((module) => {
  19049. var core = module.exports = { version: '2.6.11' };
  19050. if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
  19051. /***/ }),
  19052. /***/ 19216:
  19053. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19054. // optional / simple context binding
  19055. var aFunction = __webpack_require__(85663);
  19056. module.exports = function (fn, that, length) {
  19057. aFunction(fn);
  19058. if (that === undefined) return fn;
  19059. switch (length) {
  19060. case 1: return function (a) {
  19061. return fn.call(that, a);
  19062. };
  19063. case 2: return function (a, b) {
  19064. return fn.call(that, a, b);
  19065. };
  19066. case 3: return function (a, b, c) {
  19067. return fn.call(that, a, b, c);
  19068. };
  19069. }
  19070. return function (/* ...args */) {
  19071. return fn.apply(that, arguments);
  19072. };
  19073. };
  19074. /***/ }),
  19075. /***/ 89666:
  19076. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19077. // Thank's IE8 for his funny defineProperty
  19078. module.exports = !__webpack_require__(7929)(function () {
  19079. return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
  19080. });
  19081. /***/ }),
  19082. /***/ 97467:
  19083. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19084. var isObject = __webpack_require__(36727);
  19085. var document = (__webpack_require__(33938).document);
  19086. // typeof document.createElement is 'object' in old IE
  19087. var is = isObject(document) && isObject(document.createElement);
  19088. module.exports = function (it) {
  19089. return is ? document.createElement(it) : {};
  19090. };
  19091. /***/ }),
  19092. /***/ 83856:
  19093. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19094. var global = __webpack_require__(33938);
  19095. var core = __webpack_require__(11327);
  19096. var ctx = __webpack_require__(19216);
  19097. var hide = __webpack_require__(41818);
  19098. var has = __webpack_require__(27069);
  19099. var PROTOTYPE = 'prototype';
  19100. var $export = function (type, name, source) {
  19101. var IS_FORCED = type & $export.F;
  19102. var IS_GLOBAL = type & $export.G;
  19103. var IS_STATIC = type & $export.S;
  19104. var IS_PROTO = type & $export.P;
  19105. var IS_BIND = type & $export.B;
  19106. var IS_WRAP = type & $export.W;
  19107. var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
  19108. var expProto = exports[PROTOTYPE];
  19109. var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
  19110. var key, own, out;
  19111. if (IS_GLOBAL) source = name;
  19112. for (key in source) {
  19113. // contains in native
  19114. own = !IS_FORCED && target && target[key] !== undefined;
  19115. if (own && has(exports, key)) continue;
  19116. // export native or passed
  19117. out = own ? target[key] : source[key];
  19118. // prevent global pollution for namespaces
  19119. exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
  19120. // bind timers to global for call from export context
  19121. : IS_BIND && own ? ctx(out, global)
  19122. // wrap global constructors for prevent change them in library
  19123. : IS_WRAP && target[key] == out ? (function (C) {
  19124. var F = function (a, b, c) {
  19125. if (this instanceof C) {
  19126. switch (arguments.length) {
  19127. case 0: return new C();
  19128. case 1: return new C(a);
  19129. case 2: return new C(a, b);
  19130. } return new C(a, b, c);
  19131. } return C.apply(this, arguments);
  19132. };
  19133. F[PROTOTYPE] = C[PROTOTYPE];
  19134. return F;
  19135. // make static versions for prototype methods
  19136. })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
  19137. // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
  19138. if (IS_PROTO) {
  19139. (exports.virtual || (exports.virtual = {}))[key] = out;
  19140. // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
  19141. if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
  19142. }
  19143. }
  19144. };
  19145. // type bitmap
  19146. $export.F = 1; // forced
  19147. $export.G = 2; // global
  19148. $export.S = 4; // static
  19149. $export.P = 8; // proto
  19150. $export.B = 16; // bind
  19151. $export.W = 32; // wrap
  19152. $export.U = 64; // safe
  19153. $export.R = 128; // real proto method for `library`
  19154. module.exports = $export;
  19155. /***/ }),
  19156. /***/ 7929:
  19157. /***/ ((module) => {
  19158. module.exports = function (exec) {
  19159. try {
  19160. return !!exec();
  19161. } catch (e) {
  19162. return true;
  19163. }
  19164. };
  19165. /***/ }),
  19166. /***/ 33938:
  19167. /***/ ((module) => {
  19168. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  19169. var global = module.exports = typeof window != 'undefined' && window.Math == Math
  19170. ? window : typeof self != 'undefined' && self.Math == Math ? self
  19171. // eslint-disable-next-line no-new-func
  19172. : Function('return this')();
  19173. if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
  19174. /***/ }),
  19175. /***/ 27069:
  19176. /***/ ((module) => {
  19177. var hasOwnProperty = {}.hasOwnProperty;
  19178. module.exports = function (it, key) {
  19179. return hasOwnProperty.call(it, key);
  19180. };
  19181. /***/ }),
  19182. /***/ 41818:
  19183. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19184. var dP = __webpack_require__(4743);
  19185. var createDesc = __webpack_require__(83101);
  19186. module.exports = __webpack_require__(89666) ? function (object, key, value) {
  19187. return dP.f(object, key, createDesc(1, value));
  19188. } : function (object, key, value) {
  19189. object[key] = value;
  19190. return object;
  19191. };
  19192. /***/ }),
  19193. /***/ 33758:
  19194. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19195. module.exports = !__webpack_require__(89666) && !__webpack_require__(7929)(function () {
  19196. return Object.defineProperty(__webpack_require__(97467)('div'), 'a', { get: function () { return 7; } }).a != 7;
  19197. });
  19198. /***/ }),
  19199. /***/ 36727:
  19200. /***/ ((module) => {
  19201. module.exports = function (it) {
  19202. return typeof it === 'object' ? it !== null : typeof it === 'function';
  19203. };
  19204. /***/ }),
  19205. /***/ 4743:
  19206. /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
  19207. var anObject = __webpack_require__(12159);
  19208. var IE8_DOM_DEFINE = __webpack_require__(33758);
  19209. var toPrimitive = __webpack_require__(33206);
  19210. var dP = Object.defineProperty;
  19211. exports.f = __webpack_require__(89666) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
  19212. anObject(O);
  19213. P = toPrimitive(P, true);
  19214. anObject(Attributes);
  19215. if (IE8_DOM_DEFINE) try {
  19216. return dP(O, P, Attributes);
  19217. } catch (e) { /* empty */ }
  19218. if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
  19219. if ('value' in Attributes) O[P] = Attributes.value;
  19220. return O;
  19221. };
  19222. /***/ }),
  19223. /***/ 83101:
  19224. /***/ ((module) => {
  19225. module.exports = function (bitmap, value) {
  19226. return {
  19227. enumerable: !(bitmap & 1),
  19228. configurable: !(bitmap & 2),
  19229. writable: !(bitmap & 4),
  19230. value: value
  19231. };
  19232. };
  19233. /***/ }),
  19234. /***/ 33206:
  19235. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19236. // 7.1.1 ToPrimitive(input [, PreferredType])
  19237. var isObject = __webpack_require__(36727);
  19238. // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  19239. // and the second argument - flag - preferred type is a string
  19240. module.exports = function (it, S) {
  19241. if (!isObject(it)) return it;
  19242. var fn, val;
  19243. if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  19244. if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
  19245. if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  19246. throw TypeError("Can't convert object to primitive value");
  19247. };
  19248. /***/ }),
  19249. /***/ 34579:
  19250. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  19251. // https://github.com/tc39/proposal-global
  19252. var $export = __webpack_require__(83856);
  19253. $export($export.G, { global: __webpack_require__(33938) });
  19254. /***/ }),
  19255. /***/ 24963:
  19256. /***/ ((module) => {
  19257. module.exports = function (it) {
  19258. if (typeof it != 'function') throw TypeError(it + ' is not a function!');
  19259. return it;
  19260. };
  19261. /***/ }),
  19262. /***/ 83365:
  19263. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19264. var cof = __webpack_require__(92032);
  19265. module.exports = function (it, msg) {
  19266. if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg);
  19267. return +it;
  19268. };
  19269. /***/ }),
  19270. /***/ 17722:
  19271. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19272. // 22.1.3.31 Array.prototype[@@unscopables]
  19273. var UNSCOPABLES = __webpack_require__(86314)('unscopables');
  19274. var ArrayProto = Array.prototype;
  19275. if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(87728)(ArrayProto, UNSCOPABLES, {});
  19276. module.exports = function (key) {
  19277. ArrayProto[UNSCOPABLES][key] = true;
  19278. };
  19279. /***/ }),
  19280. /***/ 76793:
  19281. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19282. "use strict";
  19283. var at = __webpack_require__(24496)(true);
  19284. // `AdvanceStringIndex` abstract operation
  19285. // https://tc39.github.io/ecma262/#sec-advancestringindex
  19286. module.exports = function (S, index, unicode) {
  19287. return index + (unicode ? at(S, index).length : 1);
  19288. };
  19289. /***/ }),
  19290. /***/ 83328:
  19291. /***/ ((module) => {
  19292. module.exports = function (it, Constructor, name, forbiddenField) {
  19293. if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {
  19294. throw TypeError(name + ': incorrect invocation!');
  19295. } return it;
  19296. };
  19297. /***/ }),
  19298. /***/ 27007:
  19299. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19300. var isObject = __webpack_require__(55286);
  19301. module.exports = function (it) {
  19302. if (!isObject(it)) throw TypeError(it + ' is not an object!');
  19303. return it;
  19304. };
  19305. /***/ }),
  19306. /***/ 5216:
  19307. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19308. "use strict";
  19309. // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
  19310. var toObject = __webpack_require__(20508);
  19311. var toAbsoluteIndex = __webpack_require__(92337);
  19312. var toLength = __webpack_require__(10875);
  19313. module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {
  19314. var O = toObject(this);
  19315. var len = toLength(O.length);
  19316. var to = toAbsoluteIndex(target, len);
  19317. var from = toAbsoluteIndex(start, len);
  19318. var end = arguments.length > 2 ? arguments[2] : undefined;
  19319. var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);
  19320. var inc = 1;
  19321. if (from < to && to < from + count) {
  19322. inc = -1;
  19323. from += count - 1;
  19324. to += count - 1;
  19325. }
  19326. while (count-- > 0) {
  19327. if (from in O) O[to] = O[from];
  19328. else delete O[to];
  19329. to += inc;
  19330. from += inc;
  19331. } return O;
  19332. };
  19333. /***/ }),
  19334. /***/ 46852:
  19335. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19336. "use strict";
  19337. // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
  19338. var toObject = __webpack_require__(20508);
  19339. var toAbsoluteIndex = __webpack_require__(92337);
  19340. var toLength = __webpack_require__(10875);
  19341. module.exports = function fill(value /* , start = 0, end = @length */) {
  19342. var O = toObject(this);
  19343. var length = toLength(O.length);
  19344. var aLen = arguments.length;
  19345. var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length);
  19346. var end = aLen > 2 ? arguments[2] : undefined;
  19347. var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
  19348. while (endPos > index) O[index++] = value;
  19349. return O;
  19350. };
  19351. /***/ }),
  19352. /***/ 79315:
  19353. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19354. // false -> Array#indexOf
  19355. // true -> Array#includes
  19356. var toIObject = __webpack_require__(22110);
  19357. var toLength = __webpack_require__(10875);
  19358. var toAbsoluteIndex = __webpack_require__(92337);
  19359. module.exports = function (IS_INCLUDES) {
  19360. return function ($this, el, fromIndex) {
  19361. var O = toIObject($this);
  19362. var length = toLength(O.length);
  19363. var index = toAbsoluteIndex(fromIndex, length);
  19364. var value;
  19365. // Array#includes uses SameValueZero equality algorithm
  19366. // eslint-disable-next-line no-self-compare
  19367. if (IS_INCLUDES && el != el) while (length > index) {
  19368. value = O[index++];
  19369. // eslint-disable-next-line no-self-compare
  19370. if (value != value) return true;
  19371. // Array#indexOf ignores holes, Array#includes - not
  19372. } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
  19373. if (O[index] === el) return IS_INCLUDES || index || 0;
  19374. } return !IS_INCLUDES && -1;
  19375. };
  19376. };
  19377. /***/ }),
  19378. /***/ 10050:
  19379. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19380. // 0 -> Array#forEach
  19381. // 1 -> Array#map
  19382. // 2 -> Array#filter
  19383. // 3 -> Array#some
  19384. // 4 -> Array#every
  19385. // 5 -> Array#find
  19386. // 6 -> Array#findIndex
  19387. var ctx = __webpack_require__(741);
  19388. var IObject = __webpack_require__(49797);
  19389. var toObject = __webpack_require__(20508);
  19390. var toLength = __webpack_require__(10875);
  19391. var asc = __webpack_require__(16886);
  19392. module.exports = function (TYPE, $create) {
  19393. var IS_MAP = TYPE == 1;
  19394. var IS_FILTER = TYPE == 2;
  19395. var IS_SOME = TYPE == 3;
  19396. var IS_EVERY = TYPE == 4;
  19397. var IS_FIND_INDEX = TYPE == 6;
  19398. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  19399. var create = $create || asc;
  19400. return function ($this, callbackfn, that) {
  19401. var O = toObject($this);
  19402. var self = IObject(O);
  19403. var f = ctx(callbackfn, that, 3);
  19404. var length = toLength(self.length);
  19405. var index = 0;
  19406. var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
  19407. var val, res;
  19408. for (;length > index; index++) if (NO_HOLES || index in self) {
  19409. val = self[index];
  19410. res = f(val, index, O);
  19411. if (TYPE) {
  19412. if (IS_MAP) result[index] = res; // map
  19413. else if (res) switch (TYPE) {
  19414. case 3: return true; // some
  19415. case 5: return val; // find
  19416. case 6: return index; // findIndex
  19417. case 2: result.push(val); // filter
  19418. } else if (IS_EVERY) return false; // every
  19419. }
  19420. }
  19421. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
  19422. };
  19423. };
  19424. /***/ }),
  19425. /***/ 37628:
  19426. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19427. var aFunction = __webpack_require__(24963);
  19428. var toObject = __webpack_require__(20508);
  19429. var IObject = __webpack_require__(49797);
  19430. var toLength = __webpack_require__(10875);
  19431. module.exports = function (that, callbackfn, aLen, memo, isRight) {
  19432. aFunction(callbackfn);
  19433. var O = toObject(that);
  19434. var self = IObject(O);
  19435. var length = toLength(O.length);
  19436. var index = isRight ? length - 1 : 0;
  19437. var i = isRight ? -1 : 1;
  19438. if (aLen < 2) for (;;) {
  19439. if (index in self) {
  19440. memo = self[index];
  19441. index += i;
  19442. break;
  19443. }
  19444. index += i;
  19445. if (isRight ? index < 0 : length <= index) {
  19446. throw TypeError('Reduce of empty array with no initial value');
  19447. }
  19448. }
  19449. for (;isRight ? index >= 0 : length > index; index += i) if (index in self) {
  19450. memo = callbackfn(memo, self[index], index, O);
  19451. }
  19452. return memo;
  19453. };
  19454. /***/ }),
  19455. /***/ 42736:
  19456. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19457. var isObject = __webpack_require__(55286);
  19458. var isArray = __webpack_require__(4302);
  19459. var SPECIES = __webpack_require__(86314)('species');
  19460. module.exports = function (original) {
  19461. var C;
  19462. if (isArray(original)) {
  19463. C = original.constructor;
  19464. // cross-realm fallback
  19465. if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
  19466. if (isObject(C)) {
  19467. C = C[SPECIES];
  19468. if (C === null) C = undefined;
  19469. }
  19470. } return C === undefined ? Array : C;
  19471. };
  19472. /***/ }),
  19473. /***/ 16886:
  19474. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19475. // 9.4.2.3 ArraySpeciesCreate(originalArray, length)
  19476. var speciesConstructor = __webpack_require__(42736);
  19477. module.exports = function (original, length) {
  19478. return new (speciesConstructor(original))(length);
  19479. };
  19480. /***/ }),
  19481. /***/ 34398:
  19482. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19483. "use strict";
  19484. var aFunction = __webpack_require__(24963);
  19485. var isObject = __webpack_require__(55286);
  19486. var invoke = __webpack_require__(97242);
  19487. var arraySlice = [].slice;
  19488. var factories = {};
  19489. var construct = function (F, len, args) {
  19490. if (!(len in factories)) {
  19491. for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']';
  19492. // eslint-disable-next-line no-new-func
  19493. factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');
  19494. } return factories[len](F, args);
  19495. };
  19496. module.exports = Function.bind || function bind(that /* , ...args */) {
  19497. var fn = aFunction(this);
  19498. var partArgs = arraySlice.call(arguments, 1);
  19499. var bound = function (/* args... */) {
  19500. var args = partArgs.concat(arraySlice.call(arguments));
  19501. return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);
  19502. };
  19503. if (isObject(fn.prototype)) bound.prototype = fn.prototype;
  19504. return bound;
  19505. };
  19506. /***/ }),
  19507. /***/ 41488:
  19508. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19509. // getting tag from 19.1.3.6 Object.prototype.toString()
  19510. var cof = __webpack_require__(92032);
  19511. var TAG = __webpack_require__(86314)('toStringTag');
  19512. // ES3 wrong here
  19513. var ARG = cof(function () { return arguments; }()) == 'Arguments';
  19514. // fallback for IE11 Script Access Denied error
  19515. var tryGet = function (it, key) {
  19516. try {
  19517. return it[key];
  19518. } catch (e) { /* empty */ }
  19519. };
  19520. module.exports = function (it) {
  19521. var O, T, B;
  19522. return it === undefined ? 'Undefined' : it === null ? 'Null'
  19523. // @@toStringTag case
  19524. : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
  19525. // builtinTag case
  19526. : ARG ? cof(O)
  19527. // ES3 arguments fallback
  19528. : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
  19529. };
  19530. /***/ }),
  19531. /***/ 92032:
  19532. /***/ ((module) => {
  19533. var toString = {}.toString;
  19534. module.exports = function (it) {
  19535. return toString.call(it).slice(8, -1);
  19536. };
  19537. /***/ }),
  19538. /***/ 9824:
  19539. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19540. "use strict";
  19541. var dP = (__webpack_require__(99275).f);
  19542. var create = __webpack_require__(42503);
  19543. var redefineAll = __webpack_require__(24408);
  19544. var ctx = __webpack_require__(741);
  19545. var anInstance = __webpack_require__(83328);
  19546. var forOf = __webpack_require__(3531);
  19547. var $iterDefine = __webpack_require__(42923);
  19548. var step = __webpack_require__(15436);
  19549. var setSpecies = __webpack_require__(2974);
  19550. var DESCRIPTORS = __webpack_require__(67057);
  19551. var fastKey = (__webpack_require__(84728).fastKey);
  19552. var validate = __webpack_require__(1616);
  19553. var SIZE = DESCRIPTORS ? '_s' : 'size';
  19554. var getEntry = function (that, key) {
  19555. // fast case
  19556. var index = fastKey(key);
  19557. var entry;
  19558. if (index !== 'F') return that._i[index];
  19559. // frozen object case
  19560. for (entry = that._f; entry; entry = entry.n) {
  19561. if (entry.k == key) return entry;
  19562. }
  19563. };
  19564. module.exports = {
  19565. getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
  19566. var C = wrapper(function (that, iterable) {
  19567. anInstance(that, C, NAME, '_i');
  19568. that._t = NAME; // collection type
  19569. that._i = create(null); // index
  19570. that._f = undefined; // first entry
  19571. that._l = undefined; // last entry
  19572. that[SIZE] = 0; // size
  19573. if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
  19574. });
  19575. redefineAll(C.prototype, {
  19576. // 23.1.3.1 Map.prototype.clear()
  19577. // 23.2.3.2 Set.prototype.clear()
  19578. clear: function clear() {
  19579. for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) {
  19580. entry.r = true;
  19581. if (entry.p) entry.p = entry.p.n = undefined;
  19582. delete data[entry.i];
  19583. }
  19584. that._f = that._l = undefined;
  19585. that[SIZE] = 0;
  19586. },
  19587. // 23.1.3.3 Map.prototype.delete(key)
  19588. // 23.2.3.4 Set.prototype.delete(value)
  19589. 'delete': function (key) {
  19590. var that = validate(this, NAME);
  19591. var entry = getEntry(that, key);
  19592. if (entry) {
  19593. var next = entry.n;
  19594. var prev = entry.p;
  19595. delete that._i[entry.i];
  19596. entry.r = true;
  19597. if (prev) prev.n = next;
  19598. if (next) next.p = prev;
  19599. if (that._f == entry) that._f = next;
  19600. if (that._l == entry) that._l = prev;
  19601. that[SIZE]--;
  19602. } return !!entry;
  19603. },
  19604. // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
  19605. // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
  19606. forEach: function forEach(callbackfn /* , that = undefined */) {
  19607. validate(this, NAME);
  19608. var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
  19609. var entry;
  19610. while (entry = entry ? entry.n : this._f) {
  19611. f(entry.v, entry.k, this);
  19612. // revert to the last existing entry
  19613. while (entry && entry.r) entry = entry.p;
  19614. }
  19615. },
  19616. // 23.1.3.7 Map.prototype.has(key)
  19617. // 23.2.3.7 Set.prototype.has(value)
  19618. has: function has(key) {
  19619. return !!getEntry(validate(this, NAME), key);
  19620. }
  19621. });
  19622. if (DESCRIPTORS) dP(C.prototype, 'size', {
  19623. get: function () {
  19624. return validate(this, NAME)[SIZE];
  19625. }
  19626. });
  19627. return C;
  19628. },
  19629. def: function (that, key, value) {
  19630. var entry = getEntry(that, key);
  19631. var prev, index;
  19632. // change existing entry
  19633. if (entry) {
  19634. entry.v = value;
  19635. // create new entry
  19636. } else {
  19637. that._l = entry = {
  19638. i: index = fastKey(key, true), // <- index
  19639. k: key, // <- key
  19640. v: value, // <- value
  19641. p: prev = that._l, // <- previous entry
  19642. n: undefined, // <- next entry
  19643. r: false // <- removed
  19644. };
  19645. if (!that._f) that._f = entry;
  19646. if (prev) prev.n = entry;
  19647. that[SIZE]++;
  19648. // add to index
  19649. if (index !== 'F') that._i[index] = entry;
  19650. } return that;
  19651. },
  19652. getEntry: getEntry,
  19653. setStrong: function (C, NAME, IS_MAP) {
  19654. // add .keys, .values, .entries, [@@iterator]
  19655. // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
  19656. $iterDefine(C, NAME, function (iterated, kind) {
  19657. this._t = validate(iterated, NAME); // target
  19658. this._k = kind; // kind
  19659. this._l = undefined; // previous
  19660. }, function () {
  19661. var that = this;
  19662. var kind = that._k;
  19663. var entry = that._l;
  19664. // revert to the last existing entry
  19665. while (entry && entry.r) entry = entry.p;
  19666. // get next entry
  19667. if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) {
  19668. // or finish the iteration
  19669. that._t = undefined;
  19670. return step(1);
  19671. }
  19672. // return step by kind
  19673. if (kind == 'keys') return step(0, entry.k);
  19674. if (kind == 'values') return step(0, entry.v);
  19675. return step(0, [entry.k, entry.v]);
  19676. }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
  19677. // add [@@species], 23.1.2.2, 23.2.2.2
  19678. setSpecies(NAME);
  19679. }
  19680. };
  19681. /***/ }),
  19682. /***/ 23657:
  19683. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19684. "use strict";
  19685. var redefineAll = __webpack_require__(24408);
  19686. var getWeak = (__webpack_require__(84728).getWeak);
  19687. var anObject = __webpack_require__(27007);
  19688. var isObject = __webpack_require__(55286);
  19689. var anInstance = __webpack_require__(83328);
  19690. var forOf = __webpack_require__(3531);
  19691. var createArrayMethod = __webpack_require__(10050);
  19692. var $has = __webpack_require__(79181);
  19693. var validate = __webpack_require__(1616);
  19694. var arrayFind = createArrayMethod(5);
  19695. var arrayFindIndex = createArrayMethod(6);
  19696. var id = 0;
  19697. // fallback for uncaught frozen keys
  19698. var uncaughtFrozenStore = function (that) {
  19699. return that._l || (that._l = new UncaughtFrozenStore());
  19700. };
  19701. var UncaughtFrozenStore = function () {
  19702. this.a = [];
  19703. };
  19704. var findUncaughtFrozen = function (store, key) {
  19705. return arrayFind(store.a, function (it) {
  19706. return it[0] === key;
  19707. });
  19708. };
  19709. UncaughtFrozenStore.prototype = {
  19710. get: function (key) {
  19711. var entry = findUncaughtFrozen(this, key);
  19712. if (entry) return entry[1];
  19713. },
  19714. has: function (key) {
  19715. return !!findUncaughtFrozen(this, key);
  19716. },
  19717. set: function (key, value) {
  19718. var entry = findUncaughtFrozen(this, key);
  19719. if (entry) entry[1] = value;
  19720. else this.a.push([key, value]);
  19721. },
  19722. 'delete': function (key) {
  19723. var index = arrayFindIndex(this.a, function (it) {
  19724. return it[0] === key;
  19725. });
  19726. if (~index) this.a.splice(index, 1);
  19727. return !!~index;
  19728. }
  19729. };
  19730. module.exports = {
  19731. getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
  19732. var C = wrapper(function (that, iterable) {
  19733. anInstance(that, C, NAME, '_i');
  19734. that._t = NAME; // collection type
  19735. that._i = id++; // collection id
  19736. that._l = undefined; // leak store for uncaught frozen objects
  19737. if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
  19738. });
  19739. redefineAll(C.prototype, {
  19740. // 23.3.3.2 WeakMap.prototype.delete(key)
  19741. // 23.4.3.3 WeakSet.prototype.delete(value)
  19742. 'delete': function (key) {
  19743. if (!isObject(key)) return false;
  19744. var data = getWeak(key);
  19745. if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key);
  19746. return data && $has(data, this._i) && delete data[this._i];
  19747. },
  19748. // 23.3.3.4 WeakMap.prototype.has(key)
  19749. // 23.4.3.4 WeakSet.prototype.has(value)
  19750. has: function has(key) {
  19751. if (!isObject(key)) return false;
  19752. var data = getWeak(key);
  19753. if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key);
  19754. return data && $has(data, this._i);
  19755. }
  19756. });
  19757. return C;
  19758. },
  19759. def: function (that, key, value) {
  19760. var data = getWeak(anObject(key), true);
  19761. if (data === true) uncaughtFrozenStore(that).set(key, value);
  19762. else data[that._i] = value;
  19763. return that;
  19764. },
  19765. ufstore: uncaughtFrozenStore
  19766. };
  19767. /***/ }),
  19768. /***/ 45795:
  19769. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19770. "use strict";
  19771. var global = __webpack_require__(3816);
  19772. var $export = __webpack_require__(42985);
  19773. var redefine = __webpack_require__(77234);
  19774. var redefineAll = __webpack_require__(24408);
  19775. var meta = __webpack_require__(84728);
  19776. var forOf = __webpack_require__(3531);
  19777. var anInstance = __webpack_require__(83328);
  19778. var isObject = __webpack_require__(55286);
  19779. var fails = __webpack_require__(74253);
  19780. var $iterDetect = __webpack_require__(7462);
  19781. var setToStringTag = __webpack_require__(22943);
  19782. var inheritIfRequired = __webpack_require__(40266);
  19783. module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {
  19784. var Base = global[NAME];
  19785. var C = Base;
  19786. var ADDER = IS_MAP ? 'set' : 'add';
  19787. var proto = C && C.prototype;
  19788. var O = {};
  19789. var fixMethod = function (KEY) {
  19790. var fn = proto[KEY];
  19791. redefine(proto, KEY,
  19792. KEY == 'delete' ? function (a) {
  19793. return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
  19794. } : KEY == 'has' ? function has(a) {
  19795. return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
  19796. } : KEY == 'get' ? function get(a) {
  19797. return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a);
  19798. } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; }
  19799. : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; }
  19800. );
  19801. };
  19802. if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () {
  19803. new C().entries().next();
  19804. }))) {
  19805. // create collection constructor
  19806. C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);
  19807. redefineAll(C.prototype, methods);
  19808. meta.NEED = true;
  19809. } else {
  19810. var instance = new C();
  19811. // early implementations not supports chaining
  19812. var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;
  19813. // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
  19814. var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });
  19815. // most early implementations doesn't supports iterables, most modern - not close it correctly
  19816. var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new
  19817. // for early implementations -0 and +0 not the same
  19818. var BUGGY_ZERO = !IS_WEAK && fails(function () {
  19819. // V8 ~ Chromium 42- fails only with 5+ elements
  19820. var $instance = new C();
  19821. var index = 5;
  19822. while (index--) $instance[ADDER](index, index);
  19823. return !$instance.has(-0);
  19824. });
  19825. if (!ACCEPT_ITERABLES) {
  19826. C = wrapper(function (target, iterable) {
  19827. anInstance(target, C, NAME);
  19828. var that = inheritIfRequired(new Base(), target, C);
  19829. if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
  19830. return that;
  19831. });
  19832. C.prototype = proto;
  19833. proto.constructor = C;
  19834. }
  19835. if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {
  19836. fixMethod('delete');
  19837. fixMethod('has');
  19838. IS_MAP && fixMethod('get');
  19839. }
  19840. if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);
  19841. // weak collections should not contains .clear method
  19842. if (IS_WEAK && proto.clear) delete proto.clear;
  19843. }
  19844. setToStringTag(C, NAME);
  19845. O[NAME] = C;
  19846. $export($export.G + $export.W + $export.F * (C != Base), O);
  19847. if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP);
  19848. return C;
  19849. };
  19850. /***/ }),
  19851. /***/ 25645:
  19852. /***/ ((module) => {
  19853. var core = module.exports = { version: '2.6.11' };
  19854. if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
  19855. /***/ }),
  19856. /***/ 92811:
  19857. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19858. "use strict";
  19859. var $defineProperty = __webpack_require__(99275);
  19860. var createDesc = __webpack_require__(90681);
  19861. module.exports = function (object, index, value) {
  19862. if (index in object) $defineProperty.f(object, index, createDesc(0, value));
  19863. else object[index] = value;
  19864. };
  19865. /***/ }),
  19866. /***/ 741:
  19867. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19868. // optional / simple context binding
  19869. var aFunction = __webpack_require__(24963);
  19870. module.exports = function (fn, that, length) {
  19871. aFunction(fn);
  19872. if (that === undefined) return fn;
  19873. switch (length) {
  19874. case 1: return function (a) {
  19875. return fn.call(that, a);
  19876. };
  19877. case 2: return function (a, b) {
  19878. return fn.call(that, a, b);
  19879. };
  19880. case 3: return function (a, b, c) {
  19881. return fn.call(that, a, b, c);
  19882. };
  19883. }
  19884. return function (/* ...args */) {
  19885. return fn.apply(that, arguments);
  19886. };
  19887. };
  19888. /***/ }),
  19889. /***/ 53537:
  19890. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19891. "use strict";
  19892. // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
  19893. var fails = __webpack_require__(74253);
  19894. var getTime = Date.prototype.getTime;
  19895. var $toISOString = Date.prototype.toISOString;
  19896. var lz = function (num) {
  19897. return num > 9 ? num : '0' + num;
  19898. };
  19899. // PhantomJS / old WebKit has a broken implementations
  19900. module.exports = (fails(function () {
  19901. return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z';
  19902. }) || !fails(function () {
  19903. $toISOString.call(new Date(NaN));
  19904. })) ? function toISOString() {
  19905. if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value');
  19906. var d = this;
  19907. var y = d.getUTCFullYear();
  19908. var m = d.getUTCMilliseconds();
  19909. var s = y < 0 ? '-' : y > 9999 ? '+' : '';
  19910. return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) +
  19911. '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) +
  19912. 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) +
  19913. ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';
  19914. } : $toISOString;
  19915. /***/ }),
  19916. /***/ 870:
  19917. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19918. "use strict";
  19919. var anObject = __webpack_require__(27007);
  19920. var toPrimitive = __webpack_require__(21689);
  19921. var NUMBER = 'number';
  19922. module.exports = function (hint) {
  19923. if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint');
  19924. return toPrimitive(anObject(this), hint != NUMBER);
  19925. };
  19926. /***/ }),
  19927. /***/ 91355:
  19928. /***/ ((module) => {
  19929. // 7.2.1 RequireObjectCoercible(argument)
  19930. module.exports = function (it) {
  19931. if (it == undefined) throw TypeError("Can't call method on " + it);
  19932. return it;
  19933. };
  19934. /***/ }),
  19935. /***/ 67057:
  19936. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19937. // Thank's IE8 for his funny defineProperty
  19938. module.exports = !__webpack_require__(74253)(function () {
  19939. return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
  19940. });
  19941. /***/ }),
  19942. /***/ 62457:
  19943. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19944. var isObject = __webpack_require__(55286);
  19945. var document = (__webpack_require__(3816).document);
  19946. // typeof document.createElement is 'object' in old IE
  19947. var is = isObject(document) && isObject(document.createElement);
  19948. module.exports = function (it) {
  19949. return is ? document.createElement(it) : {};
  19950. };
  19951. /***/ }),
  19952. /***/ 74430:
  19953. /***/ ((module) => {
  19954. // IE 8- don't enum bug keys
  19955. module.exports = (
  19956. 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
  19957. ).split(',');
  19958. /***/ }),
  19959. /***/ 5541:
  19960. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19961. // all enumerable object keys, includes symbols
  19962. var getKeys = __webpack_require__(47184);
  19963. var gOPS = __webpack_require__(64548);
  19964. var pIE = __webpack_require__(14682);
  19965. module.exports = function (it) {
  19966. var result = getKeys(it);
  19967. var getSymbols = gOPS.f;
  19968. if (getSymbols) {
  19969. var symbols = getSymbols(it);
  19970. var isEnum = pIE.f;
  19971. var i = 0;
  19972. var key;
  19973. while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);
  19974. } return result;
  19975. };
  19976. /***/ }),
  19977. /***/ 42985:
  19978. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  19979. var global = __webpack_require__(3816);
  19980. var core = __webpack_require__(25645);
  19981. var hide = __webpack_require__(87728);
  19982. var redefine = __webpack_require__(77234);
  19983. var ctx = __webpack_require__(741);
  19984. var PROTOTYPE = 'prototype';
  19985. var $export = function (type, name, source) {
  19986. var IS_FORCED = type & $export.F;
  19987. var IS_GLOBAL = type & $export.G;
  19988. var IS_STATIC = type & $export.S;
  19989. var IS_PROTO = type & $export.P;
  19990. var IS_BIND = type & $export.B;
  19991. var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];
  19992. var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
  19993. var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
  19994. var key, own, out, exp;
  19995. if (IS_GLOBAL) source = name;
  19996. for (key in source) {
  19997. // contains in native
  19998. own = !IS_FORCED && target && target[key] !== undefined;
  19999. // export native or passed
  20000. out = (own ? target : source)[key];
  20001. // bind timers to global for call from export context
  20002. exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
  20003. // extend global
  20004. if (target) redefine(target, key, out, type & $export.U);
  20005. // export
  20006. if (exports[key] != out) hide(exports, key, exp);
  20007. if (IS_PROTO && expProto[key] != out) expProto[key] = out;
  20008. }
  20009. };
  20010. global.core = core;
  20011. // type bitmap
  20012. $export.F = 1; // forced
  20013. $export.G = 2; // global
  20014. $export.S = 4; // static
  20015. $export.P = 8; // proto
  20016. $export.B = 16; // bind
  20017. $export.W = 32; // wrap
  20018. $export.U = 64; // safe
  20019. $export.R = 128; // real proto method for `library`
  20020. module.exports = $export;
  20021. /***/ }),
  20022. /***/ 8852:
  20023. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20024. var MATCH = __webpack_require__(86314)('match');
  20025. module.exports = function (KEY) {
  20026. var re = /./;
  20027. try {
  20028. '/./'[KEY](re);
  20029. } catch (e) {
  20030. try {
  20031. re[MATCH] = false;
  20032. return !'/./'[KEY](re);
  20033. } catch (f) { /* empty */ }
  20034. } return true;
  20035. };
  20036. /***/ }),
  20037. /***/ 74253:
  20038. /***/ ((module) => {
  20039. module.exports = function (exec) {
  20040. try {
  20041. return !!exec();
  20042. } catch (e) {
  20043. return true;
  20044. }
  20045. };
  20046. /***/ }),
  20047. /***/ 28082:
  20048. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20049. "use strict";
  20050. __webpack_require__(18269);
  20051. var redefine = __webpack_require__(77234);
  20052. var hide = __webpack_require__(87728);
  20053. var fails = __webpack_require__(74253);
  20054. var defined = __webpack_require__(91355);
  20055. var wks = __webpack_require__(86314);
  20056. var regexpExec = __webpack_require__(21165);
  20057. var SPECIES = wks('species');
  20058. var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
  20059. // #replace needs built-in support for named groups.
  20060. // #match works fine because it just return the exec results, even if it has
  20061. // a "grops" property.
  20062. var re = /./;
  20063. re.exec = function () {
  20064. var result = [];
  20065. result.groups = { a: '7' };
  20066. return result;
  20067. };
  20068. return ''.replace(re, '$<a>') !== '7';
  20069. });
  20070. var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () {
  20071. // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
  20072. var re = /(?:)/;
  20073. var originalExec = re.exec;
  20074. re.exec = function () { return originalExec.apply(this, arguments); };
  20075. var result = 'ab'.split(re);
  20076. return result.length === 2 && result[0] === 'a' && result[1] === 'b';
  20077. })();
  20078. module.exports = function (KEY, length, exec) {
  20079. var SYMBOL = wks(KEY);
  20080. var DELEGATES_TO_SYMBOL = !fails(function () {
  20081. // String methods call symbol-named RegEp methods
  20082. var O = {};
  20083. O[SYMBOL] = function () { return 7; };
  20084. return ''[KEY](O) != 7;
  20085. });
  20086. var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () {
  20087. // Symbol-named RegExp methods call .exec
  20088. var execCalled = false;
  20089. var re = /a/;
  20090. re.exec = function () { execCalled = true; return null; };
  20091. if (KEY === 'split') {
  20092. // RegExp[@@split] doesn't call the regex's exec method, but first creates
  20093. // a new one. We need to return the patched regex when creating the new one.
  20094. re.constructor = {};
  20095. re.constructor[SPECIES] = function () { return re; };
  20096. }
  20097. re[SYMBOL]('');
  20098. return !execCalled;
  20099. }) : undefined;
  20100. if (
  20101. !DELEGATES_TO_SYMBOL ||
  20102. !DELEGATES_TO_EXEC ||
  20103. (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||
  20104. (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
  20105. ) {
  20106. var nativeRegExpMethod = /./[SYMBOL];
  20107. var fns = exec(
  20108. defined,
  20109. SYMBOL,
  20110. ''[KEY],
  20111. function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) {
  20112. if (regexp.exec === regexpExec) {
  20113. if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
  20114. // The native String method already delegates to @@method (this
  20115. // polyfilled function), leasing to infinite recursion.
  20116. // We avoid it by directly calling the native @@method method.
  20117. return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
  20118. }
  20119. return { done: true, value: nativeMethod.call(str, regexp, arg2) };
  20120. }
  20121. return { done: false };
  20122. }
  20123. );
  20124. var strfn = fns[0];
  20125. var rxfn = fns[1];
  20126. redefine(String.prototype, KEY, strfn);
  20127. hide(RegExp.prototype, SYMBOL, length == 2
  20128. // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
  20129. // 21.2.5.11 RegExp.prototype[@@split](string, limit)
  20130. ? function (string, arg) { return rxfn.call(string, this, arg); }
  20131. // 21.2.5.6 RegExp.prototype[@@match](string)
  20132. // 21.2.5.9 RegExp.prototype[@@search](string)
  20133. : function (string) { return rxfn.call(string, this); }
  20134. );
  20135. }
  20136. };
  20137. /***/ }),
  20138. /***/ 53218:
  20139. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20140. "use strict";
  20141. // 21.2.5.3 get RegExp.prototype.flags
  20142. var anObject = __webpack_require__(27007);
  20143. module.exports = function () {
  20144. var that = anObject(this);
  20145. var result = '';
  20146. if (that.global) result += 'g';
  20147. if (that.ignoreCase) result += 'i';
  20148. if (that.multiline) result += 'm';
  20149. if (that.unicode) result += 'u';
  20150. if (that.sticky) result += 'y';
  20151. return result;
  20152. };
  20153. /***/ }),
  20154. /***/ 13325:
  20155. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20156. "use strict";
  20157. // https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
  20158. var isArray = __webpack_require__(4302);
  20159. var isObject = __webpack_require__(55286);
  20160. var toLength = __webpack_require__(10875);
  20161. var ctx = __webpack_require__(741);
  20162. var IS_CONCAT_SPREADABLE = __webpack_require__(86314)('isConcatSpreadable');
  20163. function flattenIntoArray(target, original, source, sourceLen, start, depth, mapper, thisArg) {
  20164. var targetIndex = start;
  20165. var sourceIndex = 0;
  20166. var mapFn = mapper ? ctx(mapper, thisArg, 3) : false;
  20167. var element, spreadable;
  20168. while (sourceIndex < sourceLen) {
  20169. if (sourceIndex in source) {
  20170. element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
  20171. spreadable = false;
  20172. if (isObject(element)) {
  20173. spreadable = element[IS_CONCAT_SPREADABLE];
  20174. spreadable = spreadable !== undefined ? !!spreadable : isArray(element);
  20175. }
  20176. if (spreadable && depth > 0) {
  20177. targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1;
  20178. } else {
  20179. if (targetIndex >= 0x1fffffffffffff) throw TypeError();
  20180. target[targetIndex] = element;
  20181. }
  20182. targetIndex++;
  20183. }
  20184. sourceIndex++;
  20185. }
  20186. return targetIndex;
  20187. }
  20188. module.exports = flattenIntoArray;
  20189. /***/ }),
  20190. /***/ 3531:
  20191. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20192. var ctx = __webpack_require__(741);
  20193. var call = __webpack_require__(28851);
  20194. var isArrayIter = __webpack_require__(86555);
  20195. var anObject = __webpack_require__(27007);
  20196. var toLength = __webpack_require__(10875);
  20197. var getIterFn = __webpack_require__(69002);
  20198. var BREAK = {};
  20199. var RETURN = {};
  20200. var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {
  20201. var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);
  20202. var f = ctx(fn, that, entries ? 2 : 1);
  20203. var index = 0;
  20204. var length, step, iterator, result;
  20205. if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');
  20206. // fast case for arrays with default iterator
  20207. if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {
  20208. result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
  20209. if (result === BREAK || result === RETURN) return result;
  20210. } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {
  20211. result = call(iterator, f, step.value, entries);
  20212. if (result === BREAK || result === RETURN) return result;
  20213. }
  20214. };
  20215. exports.BREAK = BREAK;
  20216. exports.RETURN = RETURN;
  20217. /***/ }),
  20218. /***/ 40018:
  20219. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20220. module.exports = __webpack_require__(3825)('native-function-to-string', Function.toString);
  20221. /***/ }),
  20222. /***/ 3816:
  20223. /***/ ((module) => {
  20224. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  20225. var global = module.exports = typeof window != 'undefined' && window.Math == Math
  20226. ? window : typeof self != 'undefined' && self.Math == Math ? self
  20227. // eslint-disable-next-line no-new-func
  20228. : Function('return this')();
  20229. if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
  20230. /***/ }),
  20231. /***/ 79181:
  20232. /***/ ((module) => {
  20233. var hasOwnProperty = {}.hasOwnProperty;
  20234. module.exports = function (it, key) {
  20235. return hasOwnProperty.call(it, key);
  20236. };
  20237. /***/ }),
  20238. /***/ 87728:
  20239. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20240. var dP = __webpack_require__(99275);
  20241. var createDesc = __webpack_require__(90681);
  20242. module.exports = __webpack_require__(67057) ? function (object, key, value) {
  20243. return dP.f(object, key, createDesc(1, value));
  20244. } : function (object, key, value) {
  20245. object[key] = value;
  20246. return object;
  20247. };
  20248. /***/ }),
  20249. /***/ 40639:
  20250. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20251. var document = (__webpack_require__(3816).document);
  20252. module.exports = document && document.documentElement;
  20253. /***/ }),
  20254. /***/ 1734:
  20255. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20256. module.exports = !__webpack_require__(67057) && !__webpack_require__(74253)(function () {
  20257. return Object.defineProperty(__webpack_require__(62457)('div'), 'a', { get: function () { return 7; } }).a != 7;
  20258. });
  20259. /***/ }),
  20260. /***/ 40266:
  20261. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20262. var isObject = __webpack_require__(55286);
  20263. var setPrototypeOf = (__webpack_require__(27375).set);
  20264. module.exports = function (that, target, C) {
  20265. var S = target.constructor;
  20266. var P;
  20267. if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {
  20268. setPrototypeOf(that, P);
  20269. } return that;
  20270. };
  20271. /***/ }),
  20272. /***/ 97242:
  20273. /***/ ((module) => {
  20274. // fast apply, http://jsperf.lnkit.com/fast-apply/5
  20275. module.exports = function (fn, args, that) {
  20276. var un = that === undefined;
  20277. switch (args.length) {
  20278. case 0: return un ? fn()
  20279. : fn.call(that);
  20280. case 1: return un ? fn(args[0])
  20281. : fn.call(that, args[0]);
  20282. case 2: return un ? fn(args[0], args[1])
  20283. : fn.call(that, args[0], args[1]);
  20284. case 3: return un ? fn(args[0], args[1], args[2])
  20285. : fn.call(that, args[0], args[1], args[2]);
  20286. case 4: return un ? fn(args[0], args[1], args[2], args[3])
  20287. : fn.call(that, args[0], args[1], args[2], args[3]);
  20288. } return fn.apply(that, args);
  20289. };
  20290. /***/ }),
  20291. /***/ 49797:
  20292. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20293. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  20294. var cof = __webpack_require__(92032);
  20295. // eslint-disable-next-line no-prototype-builtins
  20296. module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
  20297. return cof(it) == 'String' ? it.split('') : Object(it);
  20298. };
  20299. /***/ }),
  20300. /***/ 86555:
  20301. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20302. // check on default Array iterator
  20303. var Iterators = __webpack_require__(87234);
  20304. var ITERATOR = __webpack_require__(86314)('iterator');
  20305. var ArrayProto = Array.prototype;
  20306. module.exports = function (it) {
  20307. return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
  20308. };
  20309. /***/ }),
  20310. /***/ 4302:
  20311. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20312. // 7.2.2 IsArray(argument)
  20313. var cof = __webpack_require__(92032);
  20314. module.exports = Array.isArray || function isArray(arg) {
  20315. return cof(arg) == 'Array';
  20316. };
  20317. /***/ }),
  20318. /***/ 18367:
  20319. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20320. // 20.1.2.3 Number.isInteger(number)
  20321. var isObject = __webpack_require__(55286);
  20322. var floor = Math.floor;
  20323. module.exports = function isInteger(it) {
  20324. return !isObject(it) && isFinite(it) && floor(it) === it;
  20325. };
  20326. /***/ }),
  20327. /***/ 55286:
  20328. /***/ ((module) => {
  20329. module.exports = function (it) {
  20330. return typeof it === 'object' ? it !== null : typeof it === 'function';
  20331. };
  20332. /***/ }),
  20333. /***/ 55364:
  20334. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20335. // 7.2.8 IsRegExp(argument)
  20336. var isObject = __webpack_require__(55286);
  20337. var cof = __webpack_require__(92032);
  20338. var MATCH = __webpack_require__(86314)('match');
  20339. module.exports = function (it) {
  20340. var isRegExp;
  20341. return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');
  20342. };
  20343. /***/ }),
  20344. /***/ 28851:
  20345. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20346. // call something on iterator step with safe closing on error
  20347. var anObject = __webpack_require__(27007);
  20348. module.exports = function (iterator, fn, value, entries) {
  20349. try {
  20350. return entries ? fn(anObject(value)[0], value[1]) : fn(value);
  20351. // 7.4.6 IteratorClose(iterator, completion)
  20352. } catch (e) {
  20353. var ret = iterator['return'];
  20354. if (ret !== undefined) anObject(ret.call(iterator));
  20355. throw e;
  20356. }
  20357. };
  20358. /***/ }),
  20359. /***/ 49988:
  20360. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20361. "use strict";
  20362. var create = __webpack_require__(42503);
  20363. var descriptor = __webpack_require__(90681);
  20364. var setToStringTag = __webpack_require__(22943);
  20365. var IteratorPrototype = {};
  20366. // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
  20367. __webpack_require__(87728)(IteratorPrototype, __webpack_require__(86314)('iterator'), function () { return this; });
  20368. module.exports = function (Constructor, NAME, next) {
  20369. Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
  20370. setToStringTag(Constructor, NAME + ' Iterator');
  20371. };
  20372. /***/ }),
  20373. /***/ 42923:
  20374. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20375. "use strict";
  20376. var LIBRARY = __webpack_require__(4461);
  20377. var $export = __webpack_require__(42985);
  20378. var redefine = __webpack_require__(77234);
  20379. var hide = __webpack_require__(87728);
  20380. var Iterators = __webpack_require__(87234);
  20381. var $iterCreate = __webpack_require__(49988);
  20382. var setToStringTag = __webpack_require__(22943);
  20383. var getPrototypeOf = __webpack_require__(468);
  20384. var ITERATOR = __webpack_require__(86314)('iterator');
  20385. var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
  20386. var FF_ITERATOR = '@@iterator';
  20387. var KEYS = 'keys';
  20388. var VALUES = 'values';
  20389. var returnThis = function () { return this; };
  20390. module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
  20391. $iterCreate(Constructor, NAME, next);
  20392. var getMethod = function (kind) {
  20393. if (!BUGGY && kind in proto) return proto[kind];
  20394. switch (kind) {
  20395. case KEYS: return function keys() { return new Constructor(this, kind); };
  20396. case VALUES: return function values() { return new Constructor(this, kind); };
  20397. } return function entries() { return new Constructor(this, kind); };
  20398. };
  20399. var TAG = NAME + ' Iterator';
  20400. var DEF_VALUES = DEFAULT == VALUES;
  20401. var VALUES_BUG = false;
  20402. var proto = Base.prototype;
  20403. var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
  20404. var $default = $native || getMethod(DEFAULT);
  20405. var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
  20406. var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
  20407. var methods, key, IteratorPrototype;
  20408. // Fix native
  20409. if ($anyNative) {
  20410. IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
  20411. if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
  20412. // Set @@toStringTag to native iterators
  20413. setToStringTag(IteratorPrototype, TAG, true);
  20414. // fix for some old engines
  20415. if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);
  20416. }
  20417. }
  20418. // fix Array#{values, @@iterator}.name in V8 / FF
  20419. if (DEF_VALUES && $native && $native.name !== VALUES) {
  20420. VALUES_BUG = true;
  20421. $default = function values() { return $native.call(this); };
  20422. }
  20423. // Define iterator
  20424. if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
  20425. hide(proto, ITERATOR, $default);
  20426. }
  20427. // Plug for library
  20428. Iterators[NAME] = $default;
  20429. Iterators[TAG] = returnThis;
  20430. if (DEFAULT) {
  20431. methods = {
  20432. values: DEF_VALUES ? $default : getMethod(VALUES),
  20433. keys: IS_SET ? $default : getMethod(KEYS),
  20434. entries: $entries
  20435. };
  20436. if (FORCED) for (key in methods) {
  20437. if (!(key in proto)) redefine(proto, key, methods[key]);
  20438. } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
  20439. }
  20440. return methods;
  20441. };
  20442. /***/ }),
  20443. /***/ 7462:
  20444. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20445. var ITERATOR = __webpack_require__(86314)('iterator');
  20446. var SAFE_CLOSING = false;
  20447. try {
  20448. var riter = [7][ITERATOR]();
  20449. riter['return'] = function () { SAFE_CLOSING = true; };
  20450. // eslint-disable-next-line no-throw-literal
  20451. Array.from(riter, function () { throw 2; });
  20452. } catch (e) { /* empty */ }
  20453. module.exports = function (exec, skipClosing) {
  20454. if (!skipClosing && !SAFE_CLOSING) return false;
  20455. var safe = false;
  20456. try {
  20457. var arr = [7];
  20458. var iter = arr[ITERATOR]();
  20459. iter.next = function () { return { done: safe = true }; };
  20460. arr[ITERATOR] = function () { return iter; };
  20461. exec(arr);
  20462. } catch (e) { /* empty */ }
  20463. return safe;
  20464. };
  20465. /***/ }),
  20466. /***/ 15436:
  20467. /***/ ((module) => {
  20468. module.exports = function (done, value) {
  20469. return { value: value, done: !!done };
  20470. };
  20471. /***/ }),
  20472. /***/ 87234:
  20473. /***/ ((module) => {
  20474. module.exports = {};
  20475. /***/ }),
  20476. /***/ 4461:
  20477. /***/ ((module) => {
  20478. module.exports = false;
  20479. /***/ }),
  20480. /***/ 13086:
  20481. /***/ ((module) => {
  20482. // 20.2.2.14 Math.expm1(x)
  20483. var $expm1 = Math.expm1;
  20484. module.exports = (!$expm1
  20485. // Old FF bug
  20486. || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168
  20487. // Tor Browser bug
  20488. || $expm1(-2e-17) != -2e-17
  20489. ) ? function expm1(x) {
  20490. return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1;
  20491. } : $expm1;
  20492. /***/ }),
  20493. /***/ 34934:
  20494. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20495. // 20.2.2.16 Math.fround(x)
  20496. var sign = __webpack_require__(61801);
  20497. var pow = Math.pow;
  20498. var EPSILON = pow(2, -52);
  20499. var EPSILON32 = pow(2, -23);
  20500. var MAX32 = pow(2, 127) * (2 - EPSILON32);
  20501. var MIN32 = pow(2, -126);
  20502. var roundTiesToEven = function (n) {
  20503. return n + 1 / EPSILON - 1 / EPSILON;
  20504. };
  20505. module.exports = Math.fround || function fround(x) {
  20506. var $abs = Math.abs(x);
  20507. var $sign = sign(x);
  20508. var a, result;
  20509. if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32;
  20510. a = (1 + EPSILON32 / EPSILON) * $abs;
  20511. result = a - (a - $abs);
  20512. // eslint-disable-next-line no-self-compare
  20513. if (result > MAX32 || result != result) return $sign * Infinity;
  20514. return $sign * result;
  20515. };
  20516. /***/ }),
  20517. /***/ 46206:
  20518. /***/ ((module) => {
  20519. // 20.2.2.20 Math.log1p(x)
  20520. module.exports = Math.log1p || function log1p(x) {
  20521. return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x);
  20522. };
  20523. /***/ }),
  20524. /***/ 61801:
  20525. /***/ ((module) => {
  20526. // 20.2.2.28 Math.sign(x)
  20527. module.exports = Math.sign || function sign(x) {
  20528. // eslint-disable-next-line no-self-compare
  20529. return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;
  20530. };
  20531. /***/ }),
  20532. /***/ 84728:
  20533. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20534. var META = __webpack_require__(93953)('meta');
  20535. var isObject = __webpack_require__(55286);
  20536. var has = __webpack_require__(79181);
  20537. var setDesc = (__webpack_require__(99275).f);
  20538. var id = 0;
  20539. var isExtensible = Object.isExtensible || function () {
  20540. return true;
  20541. };
  20542. var FREEZE = !__webpack_require__(74253)(function () {
  20543. return isExtensible(Object.preventExtensions({}));
  20544. });
  20545. var setMeta = function (it) {
  20546. setDesc(it, META, { value: {
  20547. i: 'O' + ++id, // object ID
  20548. w: {} // weak collections IDs
  20549. } });
  20550. };
  20551. var fastKey = function (it, create) {
  20552. // return primitive with prefix
  20553. if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
  20554. if (!has(it, META)) {
  20555. // can't set metadata to uncaught frozen object
  20556. if (!isExtensible(it)) return 'F';
  20557. // not necessary to add metadata
  20558. if (!create) return 'E';
  20559. // add missing metadata
  20560. setMeta(it);
  20561. // return object ID
  20562. } return it[META].i;
  20563. };
  20564. var getWeak = function (it, create) {
  20565. if (!has(it, META)) {
  20566. // can't set metadata to uncaught frozen object
  20567. if (!isExtensible(it)) return true;
  20568. // not necessary to add metadata
  20569. if (!create) return false;
  20570. // add missing metadata
  20571. setMeta(it);
  20572. // return hash weak collections IDs
  20573. } return it[META].w;
  20574. };
  20575. // add metadata on freeze-family methods calling
  20576. var onFreeze = function (it) {
  20577. if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);
  20578. return it;
  20579. };
  20580. var meta = module.exports = {
  20581. KEY: META,
  20582. NEED: false,
  20583. fastKey: fastKey,
  20584. getWeak: getWeak,
  20585. onFreeze: onFreeze
  20586. };
  20587. /***/ }),
  20588. /***/ 14351:
  20589. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20590. var global = __webpack_require__(3816);
  20591. var macrotask = (__webpack_require__(74193).set);
  20592. var Observer = global.MutationObserver || global.WebKitMutationObserver;
  20593. var process = global.process;
  20594. var Promise = global.Promise;
  20595. var isNode = __webpack_require__(92032)(process) == 'process';
  20596. module.exports = function () {
  20597. var head, last, notify;
  20598. var flush = function () {
  20599. var parent, fn;
  20600. if (isNode && (parent = process.domain)) parent.exit();
  20601. while (head) {
  20602. fn = head.fn;
  20603. head = head.next;
  20604. try {
  20605. fn();
  20606. } catch (e) {
  20607. if (head) notify();
  20608. else last = undefined;
  20609. throw e;
  20610. }
  20611. } last = undefined;
  20612. if (parent) parent.enter();
  20613. };
  20614. // Node.js
  20615. if (isNode) {
  20616. notify = function () {
  20617. process.nextTick(flush);
  20618. };
  20619. // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339
  20620. } else if (Observer && !(global.navigator && global.navigator.standalone)) {
  20621. var toggle = true;
  20622. var node = document.createTextNode('');
  20623. new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new
  20624. notify = function () {
  20625. node.data = toggle = !toggle;
  20626. };
  20627. // environments with maybe non-completely correct, but existent Promise
  20628. } else if (Promise && Promise.resolve) {
  20629. // Promise.resolve without an argument throws an error in LG WebOS 2
  20630. var promise = Promise.resolve(undefined);
  20631. notify = function () {
  20632. promise.then(flush);
  20633. };
  20634. // for other environments - macrotask based on:
  20635. // - setImmediate
  20636. // - MessageChannel
  20637. // - window.postMessag
  20638. // - onreadystatechange
  20639. // - setTimeout
  20640. } else {
  20641. notify = function () {
  20642. // strange IE + webpack dev server bug - use .call(global)
  20643. macrotask.call(global, flush);
  20644. };
  20645. }
  20646. return function (fn) {
  20647. var task = { fn: fn, next: undefined };
  20648. if (last) last.next = task;
  20649. if (!head) {
  20650. head = task;
  20651. notify();
  20652. } last = task;
  20653. };
  20654. };
  20655. /***/ }),
  20656. /***/ 43499:
  20657. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20658. "use strict";
  20659. // 25.4.1.5 NewPromiseCapability(C)
  20660. var aFunction = __webpack_require__(24963);
  20661. function PromiseCapability(C) {
  20662. var resolve, reject;
  20663. this.promise = new C(function ($$resolve, $$reject) {
  20664. if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
  20665. resolve = $$resolve;
  20666. reject = $$reject;
  20667. });
  20668. this.resolve = aFunction(resolve);
  20669. this.reject = aFunction(reject);
  20670. }
  20671. module.exports.f = function (C) {
  20672. return new PromiseCapability(C);
  20673. };
  20674. /***/ }),
  20675. /***/ 35345:
  20676. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20677. "use strict";
  20678. // 19.1.2.1 Object.assign(target, source, ...)
  20679. var DESCRIPTORS = __webpack_require__(67057);
  20680. var getKeys = __webpack_require__(47184);
  20681. var gOPS = __webpack_require__(64548);
  20682. var pIE = __webpack_require__(14682);
  20683. var toObject = __webpack_require__(20508);
  20684. var IObject = __webpack_require__(49797);
  20685. var $assign = Object.assign;
  20686. // should work with symbols and should have deterministic property order (V8 bug)
  20687. module.exports = !$assign || __webpack_require__(74253)(function () {
  20688. var A = {};
  20689. var B = {};
  20690. // eslint-disable-next-line no-undef
  20691. var S = Symbol();
  20692. var K = 'abcdefghijklmnopqrst';
  20693. A[S] = 7;
  20694. K.split('').forEach(function (k) { B[k] = k; });
  20695. return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
  20696. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars
  20697. var T = toObject(target);
  20698. var aLen = arguments.length;
  20699. var index = 1;
  20700. var getSymbols = gOPS.f;
  20701. var isEnum = pIE.f;
  20702. while (aLen > index) {
  20703. var S = IObject(arguments[index++]);
  20704. var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
  20705. var length = keys.length;
  20706. var j = 0;
  20707. var key;
  20708. while (length > j) {
  20709. key = keys[j++];
  20710. if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key];
  20711. }
  20712. } return T;
  20713. } : $assign;
  20714. /***/ }),
  20715. /***/ 42503:
  20716. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20717. // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
  20718. var anObject = __webpack_require__(27007);
  20719. var dPs = __webpack_require__(35588);
  20720. var enumBugKeys = __webpack_require__(74430);
  20721. var IE_PROTO = __webpack_require__(69335)('IE_PROTO');
  20722. var Empty = function () { /* empty */ };
  20723. var PROTOTYPE = 'prototype';
  20724. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  20725. var createDict = function () {
  20726. // Thrash, waste and sodomy: IE GC bug
  20727. var iframe = __webpack_require__(62457)('iframe');
  20728. var i = enumBugKeys.length;
  20729. var lt = '<';
  20730. var gt = '>';
  20731. var iframeDocument;
  20732. iframe.style.display = 'none';
  20733. (__webpack_require__(40639).appendChild)(iframe);
  20734. iframe.src = 'javascript:'; // eslint-disable-line no-script-url
  20735. // createDict = iframe.contentWindow.Object;
  20736. // html.removeChild(iframe);
  20737. iframeDocument = iframe.contentWindow.document;
  20738. iframeDocument.open();
  20739. iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
  20740. iframeDocument.close();
  20741. createDict = iframeDocument.F;
  20742. while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
  20743. return createDict();
  20744. };
  20745. module.exports = Object.create || function create(O, Properties) {
  20746. var result;
  20747. if (O !== null) {
  20748. Empty[PROTOTYPE] = anObject(O);
  20749. result = new Empty();
  20750. Empty[PROTOTYPE] = null;
  20751. // add "__proto__" for Object.getPrototypeOf polyfill
  20752. result[IE_PROTO] = O;
  20753. } else result = createDict();
  20754. return Properties === undefined ? result : dPs(result, Properties);
  20755. };
  20756. /***/ }),
  20757. /***/ 99275:
  20758. /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
  20759. var anObject = __webpack_require__(27007);
  20760. var IE8_DOM_DEFINE = __webpack_require__(1734);
  20761. var toPrimitive = __webpack_require__(21689);
  20762. var dP = Object.defineProperty;
  20763. exports.f = __webpack_require__(67057) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
  20764. anObject(O);
  20765. P = toPrimitive(P, true);
  20766. anObject(Attributes);
  20767. if (IE8_DOM_DEFINE) try {
  20768. return dP(O, P, Attributes);
  20769. } catch (e) { /* empty */ }
  20770. if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
  20771. if ('value' in Attributes) O[P] = Attributes.value;
  20772. return O;
  20773. };
  20774. /***/ }),
  20775. /***/ 35588:
  20776. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20777. var dP = __webpack_require__(99275);
  20778. var anObject = __webpack_require__(27007);
  20779. var getKeys = __webpack_require__(47184);
  20780. module.exports = __webpack_require__(67057) ? Object.defineProperties : function defineProperties(O, Properties) {
  20781. anObject(O);
  20782. var keys = getKeys(Properties);
  20783. var length = keys.length;
  20784. var i = 0;
  20785. var P;
  20786. while (length > i) dP.f(O, P = keys[i++], Properties[P]);
  20787. return O;
  20788. };
  20789. /***/ }),
  20790. /***/ 18693:
  20791. /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
  20792. var pIE = __webpack_require__(14682);
  20793. var createDesc = __webpack_require__(90681);
  20794. var toIObject = __webpack_require__(22110);
  20795. var toPrimitive = __webpack_require__(21689);
  20796. var has = __webpack_require__(79181);
  20797. var IE8_DOM_DEFINE = __webpack_require__(1734);
  20798. var gOPD = Object.getOwnPropertyDescriptor;
  20799. exports.f = __webpack_require__(67057) ? gOPD : function getOwnPropertyDescriptor(O, P) {
  20800. O = toIObject(O);
  20801. P = toPrimitive(P, true);
  20802. if (IE8_DOM_DEFINE) try {
  20803. return gOPD(O, P);
  20804. } catch (e) { /* empty */ }
  20805. if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
  20806. };
  20807. /***/ }),
  20808. /***/ 39327:
  20809. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20810. // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
  20811. var toIObject = __webpack_require__(22110);
  20812. var gOPN = (__webpack_require__(20616).f);
  20813. var toString = {}.toString;
  20814. var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
  20815. ? Object.getOwnPropertyNames(window) : [];
  20816. var getWindowNames = function (it) {
  20817. try {
  20818. return gOPN(it);
  20819. } catch (e) {
  20820. return windowNames.slice();
  20821. }
  20822. };
  20823. module.exports.f = function getOwnPropertyNames(it) {
  20824. return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
  20825. };
  20826. /***/ }),
  20827. /***/ 20616:
  20828. /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
  20829. // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
  20830. var $keys = __webpack_require__(60189);
  20831. var hiddenKeys = (__webpack_require__(74430).concat)('length', 'prototype');
  20832. exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  20833. return $keys(O, hiddenKeys);
  20834. };
  20835. /***/ }),
  20836. /***/ 64548:
  20837. /***/ ((__unused_webpack_module, exports) => {
  20838. exports.f = Object.getOwnPropertySymbols;
  20839. /***/ }),
  20840. /***/ 468:
  20841. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20842. // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
  20843. var has = __webpack_require__(79181);
  20844. var toObject = __webpack_require__(20508);
  20845. var IE_PROTO = __webpack_require__(69335)('IE_PROTO');
  20846. var ObjectProto = Object.prototype;
  20847. module.exports = Object.getPrototypeOf || function (O) {
  20848. O = toObject(O);
  20849. if (has(O, IE_PROTO)) return O[IE_PROTO];
  20850. if (typeof O.constructor == 'function' && O instanceof O.constructor) {
  20851. return O.constructor.prototype;
  20852. } return O instanceof Object ? ObjectProto : null;
  20853. };
  20854. /***/ }),
  20855. /***/ 60189:
  20856. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20857. var has = __webpack_require__(79181);
  20858. var toIObject = __webpack_require__(22110);
  20859. var arrayIndexOf = __webpack_require__(79315)(false);
  20860. var IE_PROTO = __webpack_require__(69335)('IE_PROTO');
  20861. module.exports = function (object, names) {
  20862. var O = toIObject(object);
  20863. var i = 0;
  20864. var result = [];
  20865. var key;
  20866. for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
  20867. // Don't enum bug & hidden keys
  20868. while (names.length > i) if (has(O, key = names[i++])) {
  20869. ~arrayIndexOf(result, key) || result.push(key);
  20870. }
  20871. return result;
  20872. };
  20873. /***/ }),
  20874. /***/ 47184:
  20875. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20876. // 19.1.2.14 / 15.2.3.14 Object.keys(O)
  20877. var $keys = __webpack_require__(60189);
  20878. var enumBugKeys = __webpack_require__(74430);
  20879. module.exports = Object.keys || function keys(O) {
  20880. return $keys(O, enumBugKeys);
  20881. };
  20882. /***/ }),
  20883. /***/ 14682:
  20884. /***/ ((__unused_webpack_module, exports) => {
  20885. exports.f = {}.propertyIsEnumerable;
  20886. /***/ }),
  20887. /***/ 33160:
  20888. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20889. // most Object methods by ES6 should accept primitives
  20890. var $export = __webpack_require__(42985);
  20891. var core = __webpack_require__(25645);
  20892. var fails = __webpack_require__(74253);
  20893. module.exports = function (KEY, exec) {
  20894. var fn = (core.Object || {})[KEY] || Object[KEY];
  20895. var exp = {};
  20896. exp[KEY] = exec(fn);
  20897. $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);
  20898. };
  20899. /***/ }),
  20900. /***/ 51131:
  20901. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20902. var DESCRIPTORS = __webpack_require__(67057);
  20903. var getKeys = __webpack_require__(47184);
  20904. var toIObject = __webpack_require__(22110);
  20905. var isEnum = (__webpack_require__(14682).f);
  20906. module.exports = function (isEntries) {
  20907. return function (it) {
  20908. var O = toIObject(it);
  20909. var keys = getKeys(O);
  20910. var length = keys.length;
  20911. var i = 0;
  20912. var result = [];
  20913. var key;
  20914. while (length > i) {
  20915. key = keys[i++];
  20916. if (!DESCRIPTORS || isEnum.call(O, key)) {
  20917. result.push(isEntries ? [key, O[key]] : O[key]);
  20918. }
  20919. }
  20920. return result;
  20921. };
  20922. };
  20923. /***/ }),
  20924. /***/ 57643:
  20925. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20926. // all object keys, includes non-enumerable and symbols
  20927. var gOPN = __webpack_require__(20616);
  20928. var gOPS = __webpack_require__(64548);
  20929. var anObject = __webpack_require__(27007);
  20930. var Reflect = (__webpack_require__(3816).Reflect);
  20931. module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) {
  20932. var keys = gOPN.f(anObject(it));
  20933. var getSymbols = gOPS.f;
  20934. return getSymbols ? keys.concat(getSymbols(it)) : keys;
  20935. };
  20936. /***/ }),
  20937. /***/ 47743:
  20938. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20939. var $parseFloat = (__webpack_require__(3816).parseFloat);
  20940. var $trim = (__webpack_require__(29599).trim);
  20941. module.exports = 1 / $parseFloat(__webpack_require__(84644) + '-0') !== -Infinity ? function parseFloat(str) {
  20942. var string = $trim(String(str), 3);
  20943. var result = $parseFloat(string);
  20944. return result === 0 && string.charAt(0) == '-' ? -0 : result;
  20945. } : $parseFloat;
  20946. /***/ }),
  20947. /***/ 55960:
  20948. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20949. var $parseInt = (__webpack_require__(3816).parseInt);
  20950. var $trim = (__webpack_require__(29599).trim);
  20951. var ws = __webpack_require__(84644);
  20952. var hex = /^[-+]?0[xX]/;
  20953. module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) {
  20954. var string = $trim(String(str), 3);
  20955. return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10));
  20956. } : $parseInt;
  20957. /***/ }),
  20958. /***/ 10188:
  20959. /***/ ((module) => {
  20960. module.exports = function (exec) {
  20961. try {
  20962. return { e: false, v: exec() };
  20963. } catch (e) {
  20964. return { e: true, v: e };
  20965. }
  20966. };
  20967. /***/ }),
  20968. /***/ 50094:
  20969. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20970. var anObject = __webpack_require__(27007);
  20971. var isObject = __webpack_require__(55286);
  20972. var newPromiseCapability = __webpack_require__(43499);
  20973. module.exports = function (C, x) {
  20974. anObject(C);
  20975. if (isObject(x) && x.constructor === C) return x;
  20976. var promiseCapability = newPromiseCapability.f(C);
  20977. var resolve = promiseCapability.resolve;
  20978. resolve(x);
  20979. return promiseCapability.promise;
  20980. };
  20981. /***/ }),
  20982. /***/ 90681:
  20983. /***/ ((module) => {
  20984. module.exports = function (bitmap, value) {
  20985. return {
  20986. enumerable: !(bitmap & 1),
  20987. configurable: !(bitmap & 2),
  20988. writable: !(bitmap & 4),
  20989. value: value
  20990. };
  20991. };
  20992. /***/ }),
  20993. /***/ 24408:
  20994. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  20995. var redefine = __webpack_require__(77234);
  20996. module.exports = function (target, src, safe) {
  20997. for (var key in src) redefine(target, key, src[key], safe);
  20998. return target;
  20999. };
  21000. /***/ }),
  21001. /***/ 77234:
  21002. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21003. var global = __webpack_require__(3816);
  21004. var hide = __webpack_require__(87728);
  21005. var has = __webpack_require__(79181);
  21006. var SRC = __webpack_require__(93953)('src');
  21007. var $toString = __webpack_require__(40018);
  21008. var TO_STRING = 'toString';
  21009. var TPL = ('' + $toString).split(TO_STRING);
  21010. (__webpack_require__(25645).inspectSource) = function (it) {
  21011. return $toString.call(it);
  21012. };
  21013. (module.exports = function (O, key, val, safe) {
  21014. var isFunction = typeof val == 'function';
  21015. if (isFunction) has(val, 'name') || hide(val, 'name', key);
  21016. if (O[key] === val) return;
  21017. if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
  21018. if (O === global) {
  21019. O[key] = val;
  21020. } else if (!safe) {
  21021. delete O[key];
  21022. hide(O, key, val);
  21023. } else if (O[key]) {
  21024. O[key] = val;
  21025. } else {
  21026. hide(O, key, val);
  21027. }
  21028. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  21029. })(Function.prototype, TO_STRING, function toString() {
  21030. return typeof this == 'function' && this[SRC] || $toString.call(this);
  21031. });
  21032. /***/ }),
  21033. /***/ 27787:
  21034. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21035. "use strict";
  21036. var classof = __webpack_require__(41488);
  21037. var builtinExec = RegExp.prototype.exec;
  21038. // `RegExpExec` abstract operation
  21039. // https://tc39.github.io/ecma262/#sec-regexpexec
  21040. module.exports = function (R, S) {
  21041. var exec = R.exec;
  21042. if (typeof exec === 'function') {
  21043. var result = exec.call(R, S);
  21044. if (typeof result !== 'object') {
  21045. throw new TypeError('RegExp exec method returned something other than an Object or null');
  21046. }
  21047. return result;
  21048. }
  21049. if (classof(R) !== 'RegExp') {
  21050. throw new TypeError('RegExp#exec called on incompatible receiver');
  21051. }
  21052. return builtinExec.call(R, S);
  21053. };
  21054. /***/ }),
  21055. /***/ 21165:
  21056. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21057. "use strict";
  21058. var regexpFlags = __webpack_require__(53218);
  21059. var nativeExec = RegExp.prototype.exec;
  21060. // This always refers to the native implementation, because the
  21061. // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
  21062. // which loads this file before patching the method.
  21063. var nativeReplace = String.prototype.replace;
  21064. var patchedExec = nativeExec;
  21065. var LAST_INDEX = 'lastIndex';
  21066. var UPDATES_LAST_INDEX_WRONG = (function () {
  21067. var re1 = /a/,
  21068. re2 = /b*/g;
  21069. nativeExec.call(re1, 'a');
  21070. nativeExec.call(re2, 'a');
  21071. return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0;
  21072. })();
  21073. // nonparticipating capturing group, copied from es5-shim's String#split patch.
  21074. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
  21075. var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;
  21076. if (PATCH) {
  21077. patchedExec = function exec(str) {
  21078. var re = this;
  21079. var lastIndex, reCopy, match, i;
  21080. if (NPCG_INCLUDED) {
  21081. reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re));
  21082. }
  21083. if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX];
  21084. match = nativeExec.call(re, str);
  21085. if (UPDATES_LAST_INDEX_WRONG && match) {
  21086. re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex;
  21087. }
  21088. if (NPCG_INCLUDED && match && match.length > 1) {
  21089. // Fix browsers whose `exec` methods don't consistently return `undefined`
  21090. // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
  21091. // eslint-disable-next-line no-loop-func
  21092. nativeReplace.call(match[0], reCopy, function () {
  21093. for (i = 1; i < arguments.length - 2; i++) {
  21094. if (arguments[i] === undefined) match[i] = undefined;
  21095. }
  21096. });
  21097. }
  21098. return match;
  21099. };
  21100. }
  21101. module.exports = patchedExec;
  21102. /***/ }),
  21103. /***/ 27195:
  21104. /***/ ((module) => {
  21105. // 7.2.9 SameValue(x, y)
  21106. module.exports = Object.is || function is(x, y) {
  21107. // eslint-disable-next-line no-self-compare
  21108. return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
  21109. };
  21110. /***/ }),
  21111. /***/ 27375:
  21112. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21113. // Works with __proto__ only. Old v8 can't work with null proto objects.
  21114. /* eslint-disable no-proto */
  21115. var isObject = __webpack_require__(55286);
  21116. var anObject = __webpack_require__(27007);
  21117. var check = function (O, proto) {
  21118. anObject(O);
  21119. if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
  21120. };
  21121. module.exports = {
  21122. set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
  21123. function (test, buggy, set) {
  21124. try {
  21125. set = __webpack_require__(741)(Function.call, (__webpack_require__(18693).f)(Object.prototype, '__proto__').set, 2);
  21126. set(test, []);
  21127. buggy = !(test instanceof Array);
  21128. } catch (e) { buggy = true; }
  21129. return function setPrototypeOf(O, proto) {
  21130. check(O, proto);
  21131. if (buggy) O.__proto__ = proto;
  21132. else set(O, proto);
  21133. return O;
  21134. };
  21135. }({}, false) : undefined),
  21136. check: check
  21137. };
  21138. /***/ }),
  21139. /***/ 2974:
  21140. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21141. "use strict";
  21142. var global = __webpack_require__(3816);
  21143. var dP = __webpack_require__(99275);
  21144. var DESCRIPTORS = __webpack_require__(67057);
  21145. var SPECIES = __webpack_require__(86314)('species');
  21146. module.exports = function (KEY) {
  21147. var C = global[KEY];
  21148. if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {
  21149. configurable: true,
  21150. get: function () { return this; }
  21151. });
  21152. };
  21153. /***/ }),
  21154. /***/ 22943:
  21155. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21156. var def = (__webpack_require__(99275).f);
  21157. var has = __webpack_require__(79181);
  21158. var TAG = __webpack_require__(86314)('toStringTag');
  21159. module.exports = function (it, tag, stat) {
  21160. if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
  21161. };
  21162. /***/ }),
  21163. /***/ 69335:
  21164. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21165. var shared = __webpack_require__(3825)('keys');
  21166. var uid = __webpack_require__(93953);
  21167. module.exports = function (key) {
  21168. return shared[key] || (shared[key] = uid(key));
  21169. };
  21170. /***/ }),
  21171. /***/ 3825:
  21172. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21173. var core = __webpack_require__(25645);
  21174. var global = __webpack_require__(3816);
  21175. var SHARED = '__core-js_shared__';
  21176. var store = global[SHARED] || (global[SHARED] = {});
  21177. (module.exports = function (key, value) {
  21178. return store[key] || (store[key] = value !== undefined ? value : {});
  21179. })('versions', []).push({
  21180. version: core.version,
  21181. mode: __webpack_require__(4461) ? 'pure' : 'global',
  21182. copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
  21183. });
  21184. /***/ }),
  21185. /***/ 58364:
  21186. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21187. // 7.3.20 SpeciesConstructor(O, defaultConstructor)
  21188. var anObject = __webpack_require__(27007);
  21189. var aFunction = __webpack_require__(24963);
  21190. var SPECIES = __webpack_require__(86314)('species');
  21191. module.exports = function (O, D) {
  21192. var C = anObject(O).constructor;
  21193. var S;
  21194. return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
  21195. };
  21196. /***/ }),
  21197. /***/ 77717:
  21198. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21199. "use strict";
  21200. var fails = __webpack_require__(74253);
  21201. module.exports = function (method, arg) {
  21202. return !!method && fails(function () {
  21203. // eslint-disable-next-line no-useless-call
  21204. arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null);
  21205. });
  21206. };
  21207. /***/ }),
  21208. /***/ 24496:
  21209. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21210. var toInteger = __webpack_require__(81467);
  21211. var defined = __webpack_require__(91355);
  21212. // true -> String#at
  21213. // false -> String#codePointAt
  21214. module.exports = function (TO_STRING) {
  21215. return function (that, pos) {
  21216. var s = String(defined(that));
  21217. var i = toInteger(pos);
  21218. var l = s.length;
  21219. var a, b;
  21220. if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
  21221. a = s.charCodeAt(i);
  21222. return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
  21223. ? TO_STRING ? s.charAt(i) : a
  21224. : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
  21225. };
  21226. };
  21227. /***/ }),
  21228. /***/ 42094:
  21229. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21230. // helper for String#{startsWith, endsWith, includes}
  21231. var isRegExp = __webpack_require__(55364);
  21232. var defined = __webpack_require__(91355);
  21233. module.exports = function (that, searchString, NAME) {
  21234. if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!");
  21235. return String(defined(that));
  21236. };
  21237. /***/ }),
  21238. /***/ 29395:
  21239. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21240. var $export = __webpack_require__(42985);
  21241. var fails = __webpack_require__(74253);
  21242. var defined = __webpack_require__(91355);
  21243. var quot = /"/g;
  21244. // B.2.3.2.1 CreateHTML(string, tag, attribute, value)
  21245. var createHTML = function (string, tag, attribute, value) {
  21246. var S = String(defined(string));
  21247. var p1 = '<' + tag;
  21248. if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '&quot;') + '"';
  21249. return p1 + '>' + S + '</' + tag + '>';
  21250. };
  21251. module.exports = function (NAME, exec) {
  21252. var O = {};
  21253. O[NAME] = exec(createHTML);
  21254. $export($export.P + $export.F * fails(function () {
  21255. var test = ''[NAME]('"');
  21256. return test !== test.toLowerCase() || test.split('"').length > 3;
  21257. }), 'String', O);
  21258. };
  21259. /***/ }),
  21260. /***/ 75442:
  21261. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21262. // https://github.com/tc39/proposal-string-pad-start-end
  21263. var toLength = __webpack_require__(10875);
  21264. var repeat = __webpack_require__(68595);
  21265. var defined = __webpack_require__(91355);
  21266. module.exports = function (that, maxLength, fillString, left) {
  21267. var S = String(defined(that));
  21268. var stringLength = S.length;
  21269. var fillStr = fillString === undefined ? ' ' : String(fillString);
  21270. var intMaxLength = toLength(maxLength);
  21271. if (intMaxLength <= stringLength || fillStr == '') return S;
  21272. var fillLen = intMaxLength - stringLength;
  21273. var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length));
  21274. if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen);
  21275. return left ? stringFiller + S : S + stringFiller;
  21276. };
  21277. /***/ }),
  21278. /***/ 68595:
  21279. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21280. "use strict";
  21281. var toInteger = __webpack_require__(81467);
  21282. var defined = __webpack_require__(91355);
  21283. module.exports = function repeat(count) {
  21284. var str = String(defined(this));
  21285. var res = '';
  21286. var n = toInteger(count);
  21287. if (n < 0 || n == Infinity) throw RangeError("Count can't be negative");
  21288. for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str;
  21289. return res;
  21290. };
  21291. /***/ }),
  21292. /***/ 29599:
  21293. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21294. var $export = __webpack_require__(42985);
  21295. var defined = __webpack_require__(91355);
  21296. var fails = __webpack_require__(74253);
  21297. var spaces = __webpack_require__(84644);
  21298. var space = '[' + spaces + ']';
  21299. var non = '\u200b\u0085';
  21300. var ltrim = RegExp('^' + space + space + '*');
  21301. var rtrim = RegExp(space + space + '*$');
  21302. var exporter = function (KEY, exec, ALIAS) {
  21303. var exp = {};
  21304. var FORCE = fails(function () {
  21305. return !!spaces[KEY]() || non[KEY]() != non;
  21306. });
  21307. var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY];
  21308. if (ALIAS) exp[ALIAS] = fn;
  21309. $export($export.P + $export.F * FORCE, 'String', exp);
  21310. };
  21311. // 1 -> String#trimLeft
  21312. // 2 -> String#trimRight
  21313. // 3 -> String#trim
  21314. var trim = exporter.trim = function (string, TYPE) {
  21315. string = String(defined(string));
  21316. if (TYPE & 1) string = string.replace(ltrim, '');
  21317. if (TYPE & 2) string = string.replace(rtrim, '');
  21318. return string;
  21319. };
  21320. module.exports = exporter;
  21321. /***/ }),
  21322. /***/ 84644:
  21323. /***/ ((module) => {
  21324. module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
  21325. '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
  21326. /***/ }),
  21327. /***/ 74193:
  21328. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21329. var ctx = __webpack_require__(741);
  21330. var invoke = __webpack_require__(97242);
  21331. var html = __webpack_require__(40639);
  21332. var cel = __webpack_require__(62457);
  21333. var global = __webpack_require__(3816);
  21334. var process = global.process;
  21335. var setTask = global.setImmediate;
  21336. var clearTask = global.clearImmediate;
  21337. var MessageChannel = global.MessageChannel;
  21338. var Dispatch = global.Dispatch;
  21339. var counter = 0;
  21340. var queue = {};
  21341. var ONREADYSTATECHANGE = 'onreadystatechange';
  21342. var defer, channel, port;
  21343. var run = function () {
  21344. var id = +this;
  21345. // eslint-disable-next-line no-prototype-builtins
  21346. if (queue.hasOwnProperty(id)) {
  21347. var fn = queue[id];
  21348. delete queue[id];
  21349. fn();
  21350. }
  21351. };
  21352. var listener = function (event) {
  21353. run.call(event.data);
  21354. };
  21355. // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
  21356. if (!setTask || !clearTask) {
  21357. setTask = function setImmediate(fn) {
  21358. var args = [];
  21359. var i = 1;
  21360. while (arguments.length > i) args.push(arguments[i++]);
  21361. queue[++counter] = function () {
  21362. // eslint-disable-next-line no-new-func
  21363. invoke(typeof fn == 'function' ? fn : Function(fn), args);
  21364. };
  21365. defer(counter);
  21366. return counter;
  21367. };
  21368. clearTask = function clearImmediate(id) {
  21369. delete queue[id];
  21370. };
  21371. // Node.js 0.8-
  21372. if (__webpack_require__(92032)(process) == 'process') {
  21373. defer = function (id) {
  21374. process.nextTick(ctx(run, id, 1));
  21375. };
  21376. // Sphere (JS game engine) Dispatch API
  21377. } else if (Dispatch && Dispatch.now) {
  21378. defer = function (id) {
  21379. Dispatch.now(ctx(run, id, 1));
  21380. };
  21381. // Browsers with MessageChannel, includes WebWorkers
  21382. } else if (MessageChannel) {
  21383. channel = new MessageChannel();
  21384. port = channel.port2;
  21385. channel.port1.onmessage = listener;
  21386. defer = ctx(port.postMessage, port, 1);
  21387. // Browsers with postMessage, skip WebWorkers
  21388. // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
  21389. } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {
  21390. defer = function (id) {
  21391. global.postMessage(id + '', '*');
  21392. };
  21393. global.addEventListener('message', listener, false);
  21394. // IE8-
  21395. } else if (ONREADYSTATECHANGE in cel('script')) {
  21396. defer = function (id) {
  21397. html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {
  21398. html.removeChild(this);
  21399. run.call(id);
  21400. };
  21401. };
  21402. // Rest old browsers
  21403. } else {
  21404. defer = function (id) {
  21405. setTimeout(ctx(run, id, 1), 0);
  21406. };
  21407. }
  21408. }
  21409. module.exports = {
  21410. set: setTask,
  21411. clear: clearTask
  21412. };
  21413. /***/ }),
  21414. /***/ 92337:
  21415. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21416. var toInteger = __webpack_require__(81467);
  21417. var max = Math.max;
  21418. var min = Math.min;
  21419. module.exports = function (index, length) {
  21420. index = toInteger(index);
  21421. return index < 0 ? max(index + length, 0) : min(index, length);
  21422. };
  21423. /***/ }),
  21424. /***/ 94843:
  21425. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21426. // https://tc39.github.io/ecma262/#sec-toindex
  21427. var toInteger = __webpack_require__(81467);
  21428. var toLength = __webpack_require__(10875);
  21429. module.exports = function (it) {
  21430. if (it === undefined) return 0;
  21431. var number = toInteger(it);
  21432. var length = toLength(number);
  21433. if (number !== length) throw RangeError('Wrong length!');
  21434. return length;
  21435. };
  21436. /***/ }),
  21437. /***/ 81467:
  21438. /***/ ((module) => {
  21439. // 7.1.4 ToInteger
  21440. var ceil = Math.ceil;
  21441. var floor = Math.floor;
  21442. module.exports = function (it) {
  21443. return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
  21444. };
  21445. /***/ }),
  21446. /***/ 22110:
  21447. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21448. // to indexed object, toObject with fallback for non-array-like ES3 strings
  21449. var IObject = __webpack_require__(49797);
  21450. var defined = __webpack_require__(91355);
  21451. module.exports = function (it) {
  21452. return IObject(defined(it));
  21453. };
  21454. /***/ }),
  21455. /***/ 10875:
  21456. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21457. // 7.1.15 ToLength
  21458. var toInteger = __webpack_require__(81467);
  21459. var min = Math.min;
  21460. module.exports = function (it) {
  21461. return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
  21462. };
  21463. /***/ }),
  21464. /***/ 20508:
  21465. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21466. // 7.1.13 ToObject(argument)
  21467. var defined = __webpack_require__(91355);
  21468. module.exports = function (it) {
  21469. return Object(defined(it));
  21470. };
  21471. /***/ }),
  21472. /***/ 21689:
  21473. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21474. // 7.1.1 ToPrimitive(input [, PreferredType])
  21475. var isObject = __webpack_require__(55286);
  21476. // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  21477. // and the second argument - flag - preferred type is a string
  21478. module.exports = function (it, S) {
  21479. if (!isObject(it)) return it;
  21480. var fn, val;
  21481. if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  21482. if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
  21483. if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  21484. throw TypeError("Can't convert object to primitive value");
  21485. };
  21486. /***/ }),
  21487. /***/ 78440:
  21488. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  21489. "use strict";
  21490. if (__webpack_require__(67057)) {
  21491. var LIBRARY = __webpack_require__(4461);
  21492. var global = __webpack_require__(3816);
  21493. var fails = __webpack_require__(74253);
  21494. var $export = __webpack_require__(42985);
  21495. var $typed = __webpack_require__(89383);
  21496. var $buffer = __webpack_require__(91125);
  21497. var ctx = __webpack_require__(741);
  21498. var anInstance = __webpack_require__(83328);
  21499. var propertyDesc = __webpack_require__(90681);
  21500. var hide = __webpack_require__(87728);
  21501. var redefineAll = __webpack_require__(24408);
  21502. var toInteger = __webpack_require__(81467);
  21503. var toLength = __webpack_require__(10875);
  21504. var toIndex = __webpack_require__(94843);
  21505. var toAbsoluteIndex = __webpack_require__(92337);
  21506. var toPrimitive = __webpack_require__(21689);
  21507. var has = __webpack_require__(79181);
  21508. var classof = __webpack_require__(41488);
  21509. var isObject = __webpack_require__(55286);
  21510. var toObject = __webpack_require__(20508);
  21511. var isArrayIter = __webpack_require__(86555);
  21512. var create = __webpack_require__(42503);
  21513. var getPrototypeOf = __webpack_require__(468);
  21514. var gOPN = (__webpack_require__(20616).f);
  21515. var getIterFn = __webpack_require__(69002);
  21516. var uid = __webpack_require__(93953);
  21517. var wks = __webpack_require__(86314);
  21518. var createArrayMethod = __webpack_require__(10050);
  21519. var createArrayIncludes = __webpack_require__(79315);
  21520. var speciesConstructor = __webpack_require__(58364);
  21521. var ArrayIterators = __webpack_require__(56997);
  21522. var Iterators = __webpack_require__(87234);
  21523. var $iterDetect = __webpack_require__(7462);
  21524. var setSpecies = __webpack_require__(2974);
  21525. var arrayFill = __webpack_require__(46852);
  21526. var arrayCopyWithin = __webpack_require__(5216);
  21527. var $DP = __webpack_require__(99275);
  21528. var $GOPD = __webpack_require__(18693);
  21529. var dP = $DP.f;
  21530. var gOPD = $GOPD.f;
  21531. var RangeError = global.RangeError;
  21532. var TypeError = global.TypeError;
  21533. var Uint8Array = global.Uint8Array;
  21534. var ARRAY_BUFFER = 'ArrayBuffer';
  21535. var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER;
  21536. var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';
  21537. var PROTOTYPE = 'prototype';
  21538. var ArrayProto = Array[PROTOTYPE];
  21539. var $ArrayBuffer = $buffer.ArrayBuffer;
  21540. var $DataView = $buffer.DataView;
  21541. var arrayForEach = createArrayMethod(0);
  21542. var arrayFilter = createArrayMethod(2);
  21543. var arraySome = createArrayMethod(3);
  21544. var arrayEvery = createArrayMethod(4);
  21545. var arrayFind = createArrayMethod(5);
  21546. var arrayFindIndex = createArrayMethod(6);
  21547. var arrayIncludes = createArrayIncludes(true);
  21548. var arrayIndexOf = createArrayIncludes(false);
  21549. var arrayValues = ArrayIterators.values;
  21550. var arrayKeys = ArrayIterators.keys;
  21551. var arrayEntries = ArrayIterators.entries;
  21552. var arrayLastIndexOf = ArrayProto.lastIndexOf;
  21553. var arrayReduce = ArrayProto.reduce;
  21554. var arrayReduceRight = ArrayProto.reduceRight;
  21555. var arrayJoin = ArrayProto.join;
  21556. var arraySort = ArrayProto.sort;
  21557. var arraySlice = ArrayProto.slice;
  21558. var arrayToString = ArrayProto.toString;
  21559. var arrayToLocaleString = ArrayProto.toLocaleString;
  21560. var ITERATOR = wks('iterator');
  21561. var TAG = wks('toStringTag');
  21562. var TYPED_CONSTRUCTOR = uid('typed_constructor');
  21563. var DEF_CONSTRUCTOR = uid('def_constructor');
  21564. var ALL_CONSTRUCTORS = $typed.CONSTR;
  21565. var TYPED_ARRAY = $typed.TYPED;
  21566. var VIEW = $typed.VIEW;
  21567. var WRONG_LENGTH = 'Wrong length!';
  21568. var $map = createArrayMethod(1, function (O, length) {
  21569. return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length);
  21570. });
  21571. var LITTLE_ENDIAN = fails(function () {
  21572. // eslint-disable-next-line no-undef
  21573. return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1;
  21574. });
  21575. var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () {
  21576. new Uint8Array(1).set({});
  21577. });
  21578. var toOffset = function (it, BYTES) {
  21579. var offset = toInteger(it);
  21580. if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!');
  21581. return offset;
  21582. };
  21583. var validate = function (it) {
  21584. if (isObject(it) && TYPED_ARRAY in it) return it;
  21585. throw TypeError(it + ' is not a typed array!');
  21586. };
  21587. var allocate = function (C, length) {
  21588. if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) {
  21589. throw TypeError('It is not a typed array constructor!');
  21590. } return new C(length);
  21591. };
  21592. var speciesFromList = function (O, list) {
  21593. return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list);
  21594. };
  21595. var fromList = function (C, list) {
  21596. var index = 0;
  21597. var length = list.length;
  21598. var result = allocate(C, length);
  21599. while (length > index) result[index] = list[index++];
  21600. return result;
  21601. };
  21602. var addGetter = function (it, key, internal) {
  21603. dP(it, key, { get: function () { return this._d[internal]; } });
  21604. };
  21605. var $from = function from(source /* , mapfn, thisArg */) {
  21606. var O = toObject(source);
  21607. var aLen = arguments.length;
  21608. var mapfn = aLen > 1 ? arguments[1] : undefined;
  21609. var mapping = mapfn !== undefined;
  21610. var iterFn = getIterFn(O);
  21611. var i, length, values, result, step, iterator;
  21612. if (iterFn != undefined && !isArrayIter(iterFn)) {
  21613. for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) {
  21614. values.push(step.value);
  21615. } O = values;
  21616. }
  21617. if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2);
  21618. for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) {
  21619. result[i] = mapping ? mapfn(O[i], i) : O[i];
  21620. }
  21621. return result;
  21622. };
  21623. var $of = function of(/* ...items */) {
  21624. var index = 0;
  21625. var length = arguments.length;
  21626. var result = allocate(this, length);
  21627. while (length > index) result[index] = arguments[index++];
  21628. return result;
  21629. };
  21630. // iOS Safari 6.x fails here
  21631. var TO_LOCALE_BUG = !!Uint8Array && fails(function () { arrayToLocaleString.call(new Uint8Array(1)); });
  21632. var $toLocaleString = function toLocaleString() {
  21633. return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments);
  21634. };
  21635. var proto = {
  21636. copyWithin: function copyWithin(target, start /* , end */) {
  21637. return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined);
  21638. },
  21639. every: function every(callbackfn /* , thisArg */) {
  21640. return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  21641. },
  21642. fill: function fill(value /* , start, end */) { // eslint-disable-line no-unused-vars
  21643. return arrayFill.apply(validate(this), arguments);
  21644. },
  21645. filter: function filter(callbackfn /* , thisArg */) {
  21646. return speciesFromList(this, arrayFilter(validate(this), callbackfn,
  21647. arguments.length > 1 ? arguments[1] : undefined));
  21648. },
  21649. find: function find(predicate /* , thisArg */) {
  21650. return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
  21651. },
  21652. findIndex: function findIndex(predicate /* , thisArg */) {
  21653. return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
  21654. },
  21655. forEach: function forEach(callbackfn /* , thisArg */) {
  21656. arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  21657. },
  21658. indexOf: function indexOf(searchElement /* , fromIndex */) {
  21659. return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
  21660. },
  21661. includes: function includes(searchElement /* , fromIndex */) {
  21662. return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
  21663. },
  21664. join: function join(separator) { // eslint-disable-line no-unused-vars
  21665. return arrayJoin.apply(validate(this), arguments);
  21666. },
  21667. lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { // eslint-disable-line no-unused-vars
  21668. return arrayLastIndexOf.apply(validate(this), arguments);
  21669. },
  21670. map: function map(mapfn /* , thisArg */) {
  21671. return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined);
  21672. },
  21673. reduce: function reduce(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars
  21674. return arrayReduce.apply(validate(this), arguments);
  21675. },
  21676. reduceRight: function reduceRight(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars
  21677. return arrayReduceRight.apply(validate(this), arguments);
  21678. },
  21679. reverse: function reverse() {
  21680. var that = this;
  21681. var length = validate(that).length;
  21682. var middle = Math.floor(length / 2);
  21683. var index = 0;
  21684. var value;
  21685. while (index < middle) {
  21686. value = that[index];
  21687. that[index++] = that[--length];
  21688. that[length] = value;
  21689. } return that;
  21690. },
  21691. some: function some(callbackfn /* , thisArg */) {
  21692. return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  21693. },
  21694. sort: function sort(comparefn) {
  21695. return arraySort.call(validate(this), comparefn);
  21696. },
  21697. subarray: function subarray(begin, end) {
  21698. var O = validate(this);
  21699. var length = O.length;
  21700. var $begin = toAbsoluteIndex(begin, length);
  21701. return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))(
  21702. O.buffer,
  21703. O.byteOffset + $begin * O.BYTES_PER_ELEMENT,
  21704. toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin)
  21705. );
  21706. }
  21707. };
  21708. var $slice = function slice(start, end) {
  21709. return speciesFromList(this, arraySlice.call(validate(this), start, end));
  21710. };
  21711. var $set = function set(arrayLike /* , offset */) {
  21712. validate(this);
  21713. var offset = toOffset(arguments[1], 1);
  21714. var length = this.length;
  21715. var src = toObject(arrayLike);
  21716. var len = toLength(src.length);
  21717. var index = 0;
  21718. if (len + offset > length) throw RangeError(WRONG_LENGTH);
  21719. while (index < len) this[offset + index] = src[index++];
  21720. };
  21721. var $iterators = {
  21722. entries: function entries() {
  21723. return arrayEntries.call(validate(this));
  21724. },
  21725. keys: function keys() {
  21726. return arrayKeys.call(validate(this));
  21727. },
  21728. values: function values() {
  21729. return arrayValues.call(validate(this));
  21730. }
  21731. };
  21732. var isTAIndex = function (target, key) {
  21733. return isObject(target)
  21734. && target[TYPED_ARRAY]
  21735. && typeof key != 'symbol'
  21736. && key in target
  21737. && String(+key) == String(key);
  21738. };
  21739. var $getDesc = function getOwnPropertyDescriptor(target, key) {
  21740. return isTAIndex(target, key = toPrimitive(key, true))
  21741. ? propertyDesc(2, target[key])
  21742. : gOPD(target, key);
  21743. };
  21744. var $setDesc = function defineProperty(target, key, desc) {
  21745. if (isTAIndex(target, key = toPrimitive(key, true))
  21746. && isObject(desc)
  21747. && has(desc, 'value')
  21748. && !has(desc, 'get')
  21749. && !has(desc, 'set')
  21750. // TODO: add validation descriptor w/o calling accessors
  21751. && !desc.configurable
  21752. && (!has(desc, 'writable') || desc.writable)
  21753. && (!has(desc, 'enumerable') || desc.enumerable)
  21754. ) {
  21755. target[key] = desc.value;
  21756. return target;
  21757. } return dP(target, key, desc);
  21758. };
  21759. if (!ALL_CONSTRUCTORS) {
  21760. $GOPD.f = $getDesc;
  21761. $DP.f = $setDesc;
  21762. }
  21763. $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', {
  21764. getOwnPropertyDescriptor: $getDesc,
  21765. defineProperty: $setDesc
  21766. });
  21767. if (fails(function () { arrayToString.call({}); })) {
  21768. arrayToString = arrayToLocaleString = function toString() {
  21769. return arrayJoin.call(this);
  21770. };
  21771. }
  21772. var $TypedArrayPrototype$ = redefineAll({}, proto);
  21773. redefineAll($TypedArrayPrototype$, $iterators);
  21774. hide($TypedArrayPrototype$, ITERATOR, $iterators.values);
  21775. redefineAll($TypedArrayPrototype$, {
  21776. slice: $slice,
  21777. set: $set,
  21778. constructor: function () { /* noop */ },
  21779. toString: arrayToString,
  21780. toLocaleString: $toLocaleString
  21781. });
  21782. addGetter($TypedArrayPrototype$, 'buffer', 'b');
  21783. addGetter($TypedArrayPrototype$, 'byteOffset', 'o');
  21784. addGetter($TypedArrayPrototype$, 'byteLength', 'l');
  21785. addGetter($TypedArrayPrototype$, 'length', 'e');
  21786. dP($TypedArrayPrototype$, TAG, {
  21787. get: function () { return this[TYPED_ARRAY]; }
  21788. });
  21789. // eslint-disable-next-line max-statements
  21790. module.exports = function (KEY, BYTES, wrapper, CLAMPED) {
  21791. CLAMPED = !!CLAMPED;
  21792. var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array';
  21793. var GETTER = 'get' + KEY;
  21794. var SETTER = 'set' + KEY;
  21795. var TypedArray = global[NAME];
  21796. var Base = TypedArray || {};
  21797. var TAC = TypedArray && getPrototypeOf(TypedArray);
  21798. var FORCED = !TypedArray || !$typed.ABV;
  21799. var O = {};
  21800. var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE];
  21801. var getter = function (that, index) {
  21802. var data = that._d;
  21803. return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN);
  21804. };
  21805. var setter = function (that, index, value) {
  21806. var data = that._d;
  21807. if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff;
  21808. data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN);
  21809. };
  21810. var addElement = function (that, index) {
  21811. dP(that, index, {
  21812. get: function () {
  21813. return getter(this, index);
  21814. },
  21815. set: function (value) {
  21816. return setter(this, index, value);
  21817. },
  21818. enumerable: true
  21819. });
  21820. };
  21821. if (FORCED) {
  21822. TypedArray = wrapper(function (that, data, $offset, $length) {
  21823. anInstance(that, TypedArray, NAME, '_d');
  21824. var index = 0;
  21825. var offset = 0;
  21826. var buffer, byteLength, length, klass;
  21827. if (!isObject(data)) {
  21828. length = toIndex(data);
  21829. byteLength = length * BYTES;
  21830. buffer = new $ArrayBuffer(byteLength);
  21831. } else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {
  21832. buffer = data;
  21833. offset = toOffset($offset, BYTES);
  21834. var $len = data.byteLength;
  21835. if ($length === undefined) {
  21836. if ($len % BYTES) throw RangeError(WRONG_LENGTH);
  21837. byteLength = $len - offset;
  21838. if (byteLength < 0) throw RangeError(WRONG_LENGTH);
  21839. } else {
  21840. byteLength = toLength($length) * BYTES;
  21841. if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH);
  21842. }
  21843. length = byteLength / BYTES;
  21844. } else if (TYPED_ARRAY in data) {
  21845. return fromList(TypedArray, data);
  21846. } else {
  21847. return $from.call(TypedArray, data);
  21848. }
  21849. hide(that, '_d', {
  21850. b: buffer,
  21851. o: offset,
  21852. l: byteLength,
  21853. e: length,
  21854. v: new $DataView(buffer)
  21855. });
  21856. while (index < length) addElement(that, index++);
  21857. });
  21858. TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$);
  21859. hide(TypedArrayPrototype, 'constructor', TypedArray);
  21860. } else if (!fails(function () {
  21861. TypedArray(1);
  21862. }) || !fails(function () {
  21863. new TypedArray(-1); // eslint-disable-line no-new
  21864. }) || !$iterDetect(function (iter) {
  21865. new TypedArray(); // eslint-disable-line no-new
  21866. new TypedArray(null); // eslint-disable-line no-new
  21867. new TypedArray(1.5); // eslint-disable-line no-new
  21868. new TypedArray(iter); // eslint-disable-line no-new
  21869. }, true)) {
  21870. TypedArray = wrapper(function (that, data, $offset, $length) {
  21871. anInstance(that, TypedArray, NAME);
  21872. var klass;
  21873. // `ws` module bug, temporarily remove validation length for Uint8Array
  21874. // https://github.com/websockets/ws/pull/645
  21875. if (!isObject(data)) return new Base(toIndex(data));
  21876. if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {
  21877. return $length !== undefined
  21878. ? new Base(data, toOffset($offset, BYTES), $length)
  21879. : $offset !== undefined
  21880. ? new Base(data, toOffset($offset, BYTES))
  21881. : new Base(data);
  21882. }
  21883. if (TYPED_ARRAY in data) return fromList(TypedArray, data);
  21884. return $from.call(TypedArray, data);
  21885. });
  21886. arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) {
  21887. if (!(key in TypedArray)) hide(TypedArray, key, Base[key]);
  21888. });
  21889. TypedArray[PROTOTYPE] = TypedArrayPrototype;
  21890. if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray;
  21891. }
  21892. var $nativeIterator = TypedArrayPrototype[ITERATOR];
  21893. var CORRECT_ITER_NAME = !!$nativeIterator
  21894. && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined);
  21895. var $iterator = $iterators.values;
  21896. hide(TypedArray, TYPED_CONSTRUCTOR, true);
  21897. hide(TypedArrayPrototype, TYPED_ARRAY, NAME);
  21898. hide(TypedArrayPrototype, VIEW, true);
  21899. hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray);
  21900. if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) {
  21901. dP(TypedArrayPrototype, TAG, {
  21902. get: function () { return NAME; }
  21903. });
  21904. }
  21905. O[NAME] = TypedArray;
  21906. $export($export.G + $export.W + $export.F * (TypedArray != Base), O);
  21907. $export($export.S, NAME, {
  21908. BYTES_PER_ELEMENT: BYTES
  21909. });
  21910. $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, {
  21911. from: $from,
  21912. of: $of
  21913. });
  21914. if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES);
  21915. $export($export.P, NAME, proto);
  21916. setSpecies(NAME);
  21917. $export($export.P + $export.F * FORCED_SET, NAME, { set: $set });
  21918. $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators);
  21919. if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString;
  21920. $export($export.P + $export.F * fails(function () {
  21921. new TypedArray(1).slice();
  21922. }), NAME, { slice: $slice });
  21923. $export($export.P + $export.F * (fails(function () {
  21924. return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString();
  21925. }) || !fails(function () {
  21926. TypedArrayPrototype.toLocaleString.call([1, 2]);
  21927. })), NAME, { toLocaleString: $toLocaleString });
  21928. Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator;
  21929. if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator);
  21930. };
  21931. } else module.exports = function () { /* empty */ };
  21932. /***/ }),
  21933. /***/ 91125:
  21934. /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
  21935. "use strict";
  21936. var global = __webpack_require__(3816);
  21937. var DESCRIPTORS = __webpack_require__(67057);
  21938. var LIBRARY = __webpack_require__(4461);
  21939. var $typed = __webpack_require__(89383);
  21940. var hide = __webpack_require__(87728);
  21941. var redefineAll = __webpack_require__(24408);
  21942. var fails = __webpack_require__(74253);
  21943. var anInstance = __webpack_require__(83328);
  21944. var toInteger = __webpack_require__(81467);
  21945. var toLength = __webpack_require__(10875);
  21946. var toIndex = __webpack_require__(94843);
  21947. var gOPN = (__webpack_require__(20616).f);
  21948. var dP = (__webpack_require__(99275).f);
  21949. var arrayFill = __webpack_require__(46852);
  21950. var setToStringTag = __webpack_require__(22943);
  21951. var ARRAY_BUFFER = 'ArrayBuffer';
  21952. var DATA_VIEW = 'DataView';
  21953. var PROTOTYPE = 'prototype';
  21954. var WRONG_LENGTH = 'Wrong length!';
  21955. var WRONG_INDEX = 'Wrong index!';
  21956. var $ArrayBuffer = global[ARRAY_BUFFER];
  21957. var $DataView = global[DATA_VIEW];
  21958. var Math = global.Math;
  21959. var RangeError = global.RangeError;
  21960. // eslint-disable-next-line no-shadow-restricted-names
  21961. var Infinity = global.Infinity;
  21962. var BaseBuffer = $ArrayBuffer;
  21963. var abs = Math.abs;
  21964. var pow = Math.pow;
  21965. var floor = Math.floor;
  21966. var log = Math.log;
  21967. var LN2 = Math.LN2;
  21968. var BUFFER = 'buffer';
  21969. var BYTE_LENGTH = 'byteLength';
  21970. var BYTE_OFFSET = 'byteOffset';
  21971. var $BUFFER = DESCRIPTORS ? '_b' : BUFFER;
  21972. var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH;
  21973. var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET;
  21974. // IEEE754 conversions based on https://github.com/feross/ieee754
  21975. function packIEEE754(value, mLen, nBytes) {
  21976. var buffer = new Array(nBytes);
  21977. var eLen = nBytes * 8 - mLen - 1;
  21978. var eMax = (1 << eLen) - 1;
  21979. var eBias = eMax >> 1;
  21980. var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0;
  21981. var i = 0;
  21982. var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
  21983. var e, m, c;
  21984. value = abs(value);
  21985. // eslint-disable-next-line no-self-compare
  21986. if (value != value || value === Infinity) {
  21987. // eslint-disable-next-line no-self-compare
  21988. m = value != value ? 1 : 0;
  21989. e = eMax;
  21990. } else {
  21991. e = floor(log(value) / LN2);
  21992. if (value * (c = pow(2, -e)) < 1) {
  21993. e--;
  21994. c *= 2;
  21995. }
  21996. if (e + eBias >= 1) {
  21997. value += rt / c;
  21998. } else {
  21999. value += rt * pow(2, 1 - eBias);
  22000. }
  22001. if (value * c >= 2) {
  22002. e++;
  22003. c /= 2;
  22004. }
  22005. if (e + eBias >= eMax) {
  22006. m = 0;
  22007. e = eMax;
  22008. } else if (e + eBias >= 1) {
  22009. m = (value * c - 1) * pow(2, mLen);
  22010. e = e + eBias;
  22011. } else {
  22012. m = value * pow(2, eBias - 1) * pow(2, mLen);
  22013. e = 0;
  22014. }
  22015. }
  22016. for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8);
  22017. e = e << mLen | m;
  22018. eLen += mLen;
  22019. for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8);
  22020. buffer[--i] |= s * 128;
  22021. return buffer;
  22022. }
  22023. function unpackIEEE754(buffer, mLen, nBytes) {
  22024. var eLen = nBytes * 8 - mLen - 1;
  22025. var eMax = (1 << eLen) - 1;
  22026. var eBias = eMax >> 1;
  22027. var nBits = eLen - 7;
  22028. var i = nBytes - 1;
  22029. var s = buffer[i--];
  22030. var e = s & 127;
  22031. var m;
  22032. s >>= 7;
  22033. for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8);
  22034. m = e & (1 << -nBits) - 1;
  22035. e >>= -nBits;
  22036. nBits += mLen;
  22037. for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8);
  22038. if (e === 0) {
  22039. e = 1 - eBias;
  22040. } else if (e === eMax) {
  22041. return m ? NaN : s ? -Infinity : Infinity;
  22042. } else {
  22043. m = m + pow(2, mLen);
  22044. e = e - eBias;
  22045. } return (s ? -1 : 1) * m * pow(2, e - mLen);
  22046. }
  22047. function unpackI32(bytes) {
  22048. return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0];
  22049. }
  22050. function packI8(it) {
  22051. return [it & 0xff];
  22052. }
  22053. function packI16(it) {
  22054. return [it & 0xff, it >> 8 & 0xff];
  22055. }
  22056. function packI32(it) {
  22057. return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff];
  22058. }
  22059. function packF64(it) {
  22060. return packIEEE754(it, 52, 8);
  22061. }
  22062. function packF32(it) {
  22063. return packIEEE754(it, 23, 4);
  22064. }
  22065. function addGetter(C, key, internal) {
  22066. dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } });
  22067. }
  22068. function get(view, bytes, index, isLittleEndian) {
  22069. var numIndex = +index;
  22070. var intIndex = toIndex(numIndex);
  22071. if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);
  22072. var store = view[$BUFFER]._b;
  22073. var start = intIndex + view[$OFFSET];
  22074. var pack = store.slice(start, start + bytes);
  22075. return isLittleEndian ? pack : pack.reverse();
  22076. }
  22077. function set(view, bytes, index, conversion, value, isLittleEndian) {
  22078. var numIndex = +index;
  22079. var intIndex = toIndex(numIndex);
  22080. if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);
  22081. var store = view[$BUFFER]._b;
  22082. var start = intIndex + view[$OFFSET];
  22083. var pack = conversion(+value);
  22084. for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1];
  22085. }
  22086. if (!$typed.ABV) {
  22087. $ArrayBuffer = function ArrayBuffer(length) {
  22088. anInstance(this, $ArrayBuffer, ARRAY_BUFFER);
  22089. var byteLength = toIndex(length);
  22090. this._b = arrayFill.call(new Array(byteLength), 0);
  22091. this[$LENGTH] = byteLength;
  22092. };
  22093. $DataView = function DataView(buffer, byteOffset, byteLength) {
  22094. anInstance(this, $DataView, DATA_VIEW);
  22095. anInstance(buffer, $ArrayBuffer, DATA_VIEW);
  22096. var bufferLength = buffer[$LENGTH];
  22097. var offset = toInteger(byteOffset);
  22098. if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!');
  22099. byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
  22100. if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);
  22101. this[$BUFFER] = buffer;
  22102. this[$OFFSET] = offset;
  22103. this[$LENGTH] = byteLength;
  22104. };
  22105. if (DESCRIPTORS) {
  22106. addGetter($ArrayBuffer, BYTE_LENGTH, '_l');
  22107. addGetter($DataView, BUFFER, '_b');
  22108. addGetter($DataView, BYTE_LENGTH, '_l');
  22109. addGetter($DataView, BYTE_OFFSET, '_o');
  22110. }
  22111. redefineAll($DataView[PROTOTYPE], {
  22112. getInt8: function getInt8(byteOffset) {
  22113. return get(this, 1, byteOffset)[0] << 24 >> 24;
  22114. },
  22115. getUint8: function getUint8(byteOffset) {
  22116. return get(this, 1, byteOffset)[0];
  22117. },
  22118. getInt16: function getInt16(byteOffset /* , littleEndian */) {
  22119. var bytes = get(this, 2, byteOffset, arguments[1]);
  22120. return (bytes[1] << 8 | bytes[0]) << 16 >> 16;
  22121. },
  22122. getUint16: function getUint16(byteOffset /* , littleEndian */) {
  22123. var bytes = get(this, 2, byteOffset, arguments[1]);
  22124. return bytes[1] << 8 | bytes[0];
  22125. },
  22126. getInt32: function getInt32(byteOffset /* , littleEndian */) {
  22127. return unpackI32(get(this, 4, byteOffset, arguments[1]));
  22128. },
  22129. getUint32: function getUint32(byteOffset /* , littleEndian */) {
  22130. return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0;
  22131. },
  22132. getFloat32: function getFloat32(byteOffset /* , littleEndian */) {
  22133. return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4);
  22134. },
  22135. getFloat64: function getFloat64(byteOffset /* , littleEndian */) {
  22136. return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8);
  22137. },
  22138. setInt8: function setInt8(byteOffset, value) {
  22139. set(this, 1, byteOffset, packI8, value);
  22140. },
  22141. setUint8: function setUint8(byteOffset, value) {
  22142. set(this, 1, byteOffset, packI8, value);
  22143. },
  22144. setInt16: function setInt16(byteOffset, value /* , littleEndian */) {
  22145. set(this, 2, byteOffset, packI16, value, arguments[2]);
  22146. },
  22147. setUint16: function setUint16(byteOffset, value /* , littleEndian */) {
  22148. set(this, 2, byteOffset, packI16, value, arguments[2]);
  22149. },
  22150. setInt32: function setInt32(byteOffset, value /* , littleEndian */) {
  22151. set(this, 4, byteOffset, packI32, value, arguments[2]);
  22152. },
  22153. setUint32: function setUint32(byteOffset, value /* , littleEndian */) {
  22154. set(this, 4, byteOffset, packI32, value, arguments[2]);
  22155. },
  22156. setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {
  22157. set(this, 4, byteOffset, packF32, value, arguments[2]);
  22158. },
  22159. setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {
  22160. set(this, 8, byteOffset, packF64, value, arguments[2]);
  22161. }
  22162. });
  22163. } else {
  22164. if (!fails(function () {
  22165. $ArrayBuffer(1);
  22166. }) || !fails(function () {
  22167. new $ArrayBuffer(-1); // eslint-disable-line no-new
  22168. }) || fails(function () {
  22169. new $ArrayBuffer(); // eslint-disable-line no-new
  22170. new $ArrayBuffer(1.5); // eslint-disable-line no-new
  22171. new $ArrayBuffer(NaN); // eslint-disable-line no-new
  22172. return $ArrayBuffer.name != ARRAY_BUFFER;
  22173. })) {
  22174. $ArrayBuffer = function ArrayBuffer(length) {
  22175. anInstance(this, $ArrayBuffer);
  22176. return new BaseBuffer(toIndex(length));
  22177. };
  22178. var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE];
  22179. for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) {
  22180. if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]);
  22181. }
  22182. if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer;
  22183. }
  22184. // iOS Safari 7.x bug
  22185. var view = new $DataView(new $ArrayBuffer(2));
  22186. var $setInt8 = $DataView[PROTOTYPE].setInt8;
  22187. view.setInt8(0, 2147483648);
  22188. view.setInt8(1, 2147483649);
  22189. if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], {
  22190. setInt8: function setInt8(byteOffset, value) {
  22191. $setInt8.call(this, byteOffset, value << 24 >> 24);
  22192. },
  22193. setUint8: function setUint8(byteOffset, value) {
  22194. $setInt8.call(this, byteOffset, value << 24 >> 24);
  22195. }
  22196. }, true);
  22197. }
  22198. setToStringTag($ArrayBuffer, ARRAY_BUFFER);
  22199. setToStringTag($DataView, DATA_VIEW);
  22200. hide($DataView[PROTOTYPE], $typed.VIEW, true);
  22201. exports[ARRAY_BUFFER] = $ArrayBuffer;
  22202. exports[DATA_VIEW] = $DataView;
  22203. /***/ }),
  22204. /***/ 89383:
  22205. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  22206. var global = __webpack_require__(3816);
  22207. var hide = __webpack_require__(87728);
  22208. var uid = __webpack_require__(93953);
  22209. var TYPED = uid('typed_array');
  22210. var VIEW = uid('view');
  22211. var ABV = !!(global.ArrayBuffer && global.DataView);
  22212. var CONSTR = ABV;
  22213. var i = 0;
  22214. var l = 9;
  22215. var Typed;
  22216. var TypedArrayConstructors = (
  22217. 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'
  22218. ).split(',');
  22219. while (i < l) {
  22220. if (Typed = global[TypedArrayConstructors[i++]]) {
  22221. hide(Typed.prototype, TYPED, true);
  22222. hide(Typed.prototype, VIEW, true);
  22223. } else CONSTR = false;
  22224. }
  22225. module.exports = {
  22226. ABV: ABV,
  22227. CONSTR: CONSTR,
  22228. TYPED: TYPED,
  22229. VIEW: VIEW
  22230. };
  22231. /***/ }),
  22232. /***/ 93953:
  22233. /***/ ((module) => {
  22234. var id = 0;
  22235. var px = Math.random();
  22236. module.exports = function (key) {
  22237. return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
  22238. };
  22239. /***/ }),
  22240. /***/ 30575:
  22241. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  22242. var global = __webpack_require__(3816);
  22243. var navigator = global.navigator;
  22244. module.exports = navigator && navigator.userAgent || '';
  22245. /***/ }),
  22246. /***/ 1616:
  22247. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  22248. var isObject = __webpack_require__(55286);
  22249. module.exports = function (it, TYPE) {
  22250. if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');
  22251. return it;
  22252. };
  22253. /***/ }),
  22254. /***/ 36074:
  22255. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  22256. var global = __webpack_require__(3816);
  22257. var core = __webpack_require__(25645);
  22258. var LIBRARY = __webpack_require__(4461);
  22259. var wksExt = __webpack_require__(28787);
  22260. var defineProperty = (__webpack_require__(99275).f);
  22261. module.exports = function (name) {
  22262. var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
  22263. if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
  22264. };
  22265. /***/ }),
  22266. /***/ 28787:
  22267. /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
  22268. exports.f = __webpack_require__(86314);
  22269. /***/ }),
  22270. /***/ 86314:
  22271. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  22272. var store = __webpack_require__(3825)('wks');
  22273. var uid = __webpack_require__(93953);
  22274. var Symbol = (__webpack_require__(3816).Symbol);
  22275. var USE_SYMBOL = typeof Symbol == 'function';
  22276. var $exports = module.exports = function (name) {
  22277. return store[name] || (store[name] =
  22278. USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
  22279. };
  22280. $exports.store = store;
  22281. /***/ }),
  22282. /***/ 69002:
  22283. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  22284. var classof = __webpack_require__(41488);
  22285. var ITERATOR = __webpack_require__(86314)('iterator');
  22286. var Iterators = __webpack_require__(87234);
  22287. module.exports = (__webpack_require__(25645).getIteratorMethod) = function (it) {
  22288. if (it != undefined) return it[ITERATOR]
  22289. || it['@@iterator']
  22290. || Iterators[classof(it)];
  22291. };
  22292. /***/ }),
  22293. /***/ 32000:
  22294. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22295. // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
  22296. var $export = __webpack_require__(42985);
  22297. $export($export.P, 'Array', { copyWithin: __webpack_require__(5216) });
  22298. __webpack_require__(17722)('copyWithin');
  22299. /***/ }),
  22300. /***/ 15745:
  22301. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22302. "use strict";
  22303. var $export = __webpack_require__(42985);
  22304. var $every = __webpack_require__(10050)(4);
  22305. $export($export.P + $export.F * !__webpack_require__(77717)([].every, true), 'Array', {
  22306. // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg])
  22307. every: function every(callbackfn /* , thisArg */) {
  22308. return $every(this, callbackfn, arguments[1]);
  22309. }
  22310. });
  22311. /***/ }),
  22312. /***/ 48977:
  22313. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22314. // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
  22315. var $export = __webpack_require__(42985);
  22316. $export($export.P, 'Array', { fill: __webpack_require__(46852) });
  22317. __webpack_require__(17722)('fill');
  22318. /***/ }),
  22319. /***/ 98837:
  22320. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22321. "use strict";
  22322. var $export = __webpack_require__(42985);
  22323. var $filter = __webpack_require__(10050)(2);
  22324. $export($export.P + $export.F * !__webpack_require__(77717)([].filter, true), 'Array', {
  22325. // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg])
  22326. filter: function filter(callbackfn /* , thisArg */) {
  22327. return $filter(this, callbackfn, arguments[1]);
  22328. }
  22329. });
  22330. /***/ }),
  22331. /***/ 94899:
  22332. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22333. "use strict";
  22334. // 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)
  22335. var $export = __webpack_require__(42985);
  22336. var $find = __webpack_require__(10050)(6);
  22337. var KEY = 'findIndex';
  22338. var forced = true;
  22339. // Shouldn't skip holes
  22340. if (KEY in []) Array(1)[KEY](function () { forced = false; });
  22341. $export($export.P + $export.F * forced, 'Array', {
  22342. findIndex: function findIndex(callbackfn /* , that = undefined */) {
  22343. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  22344. }
  22345. });
  22346. __webpack_require__(17722)(KEY);
  22347. /***/ }),
  22348. /***/ 52310:
  22349. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22350. "use strict";
  22351. // 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)
  22352. var $export = __webpack_require__(42985);
  22353. var $find = __webpack_require__(10050)(5);
  22354. var KEY = 'find';
  22355. var forced = true;
  22356. // Shouldn't skip holes
  22357. if (KEY in []) Array(1)[KEY](function () { forced = false; });
  22358. $export($export.P + $export.F * forced, 'Array', {
  22359. find: function find(callbackfn /* , that = undefined */) {
  22360. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  22361. }
  22362. });
  22363. __webpack_require__(17722)(KEY);
  22364. /***/ }),
  22365. /***/ 24336:
  22366. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22367. "use strict";
  22368. var $export = __webpack_require__(42985);
  22369. var $forEach = __webpack_require__(10050)(0);
  22370. var STRICT = __webpack_require__(77717)([].forEach, true);
  22371. $export($export.P + $export.F * !STRICT, 'Array', {
  22372. // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg])
  22373. forEach: function forEach(callbackfn /* , thisArg */) {
  22374. return $forEach(this, callbackfn, arguments[1]);
  22375. }
  22376. });
  22377. /***/ }),
  22378. /***/ 30522:
  22379. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22380. "use strict";
  22381. var ctx = __webpack_require__(741);
  22382. var $export = __webpack_require__(42985);
  22383. var toObject = __webpack_require__(20508);
  22384. var call = __webpack_require__(28851);
  22385. var isArrayIter = __webpack_require__(86555);
  22386. var toLength = __webpack_require__(10875);
  22387. var createProperty = __webpack_require__(92811);
  22388. var getIterFn = __webpack_require__(69002);
  22389. $export($export.S + $export.F * !__webpack_require__(7462)(function (iter) { Array.from(iter); }), 'Array', {
  22390. // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
  22391. from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
  22392. var O = toObject(arrayLike);
  22393. var C = typeof this == 'function' ? this : Array;
  22394. var aLen = arguments.length;
  22395. var mapfn = aLen > 1 ? arguments[1] : undefined;
  22396. var mapping = mapfn !== undefined;
  22397. var index = 0;
  22398. var iterFn = getIterFn(O);
  22399. var length, result, step, iterator;
  22400. if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
  22401. // if object isn't iterable or it's array with default iterator - use simple case
  22402. if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {
  22403. for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {
  22404. createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
  22405. }
  22406. } else {
  22407. length = toLength(O.length);
  22408. for (result = new C(length); length > index; index++) {
  22409. createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
  22410. }
  22411. }
  22412. result.length = index;
  22413. return result;
  22414. }
  22415. });
  22416. /***/ }),
  22417. /***/ 23369:
  22418. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22419. "use strict";
  22420. var $export = __webpack_require__(42985);
  22421. var $indexOf = __webpack_require__(79315)(false);
  22422. var $native = [].indexOf;
  22423. var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0;
  22424. $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(77717)($native)), 'Array', {
  22425. // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex])
  22426. indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
  22427. return NEGATIVE_ZERO
  22428. // convert -0 to +0
  22429. ? $native.apply(this, arguments) || 0
  22430. : $indexOf(this, searchElement, arguments[1]);
  22431. }
  22432. });
  22433. /***/ }),
  22434. /***/ 20774:
  22435. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22436. // 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
  22437. var $export = __webpack_require__(42985);
  22438. $export($export.S, 'Array', { isArray: __webpack_require__(4302) });
  22439. /***/ }),
  22440. /***/ 56997:
  22441. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  22442. "use strict";
  22443. var addToUnscopables = __webpack_require__(17722);
  22444. var step = __webpack_require__(15436);
  22445. var Iterators = __webpack_require__(87234);
  22446. var toIObject = __webpack_require__(22110);
  22447. // 22.1.3.4 Array.prototype.entries()
  22448. // 22.1.3.13 Array.prototype.keys()
  22449. // 22.1.3.29 Array.prototype.values()
  22450. // 22.1.3.30 Array.prototype[@@iterator]()
  22451. module.exports = __webpack_require__(42923)(Array, 'Array', function (iterated, kind) {
  22452. this._t = toIObject(iterated); // target
  22453. this._i = 0; // next index
  22454. this._k = kind; // kind
  22455. // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
  22456. }, function () {
  22457. var O = this._t;
  22458. var kind = this._k;
  22459. var index = this._i++;
  22460. if (!O || index >= O.length) {
  22461. this._t = undefined;
  22462. return step(1);
  22463. }
  22464. if (kind == 'keys') return step(0, index);
  22465. if (kind == 'values') return step(0, O[index]);
  22466. return step(0, [index, O[index]]);
  22467. }, 'values');
  22468. // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
  22469. Iterators.Arguments = Iterators.Array;
  22470. addToUnscopables('keys');
  22471. addToUnscopables('values');
  22472. addToUnscopables('entries');
  22473. /***/ }),
  22474. /***/ 87842:
  22475. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22476. "use strict";
  22477. // 22.1.3.13 Array.prototype.join(separator)
  22478. var $export = __webpack_require__(42985);
  22479. var toIObject = __webpack_require__(22110);
  22480. var arrayJoin = [].join;
  22481. // fallback for not array-like strings
  22482. $export($export.P + $export.F * (__webpack_require__(49797) != Object || !__webpack_require__(77717)(arrayJoin)), 'Array', {
  22483. join: function join(separator) {
  22484. return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator);
  22485. }
  22486. });
  22487. /***/ }),
  22488. /***/ 99564:
  22489. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22490. "use strict";
  22491. var $export = __webpack_require__(42985);
  22492. var toIObject = __webpack_require__(22110);
  22493. var toInteger = __webpack_require__(81467);
  22494. var toLength = __webpack_require__(10875);
  22495. var $native = [].lastIndexOf;
  22496. var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0;
  22497. $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(77717)($native)), 'Array', {
  22498. // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex])
  22499. lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
  22500. // convert -0 to +0
  22501. if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0;
  22502. var O = toIObject(this);
  22503. var length = toLength(O.length);
  22504. var index = length - 1;
  22505. if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1]));
  22506. if (index < 0) index = length + index;
  22507. for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0;
  22508. return -1;
  22509. }
  22510. });
  22511. /***/ }),
  22512. /***/ 19371:
  22513. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22514. "use strict";
  22515. var $export = __webpack_require__(42985);
  22516. var $map = __webpack_require__(10050)(1);
  22517. $export($export.P + $export.F * !__webpack_require__(77717)([].map, true), 'Array', {
  22518. // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg])
  22519. map: function map(callbackfn /* , thisArg */) {
  22520. return $map(this, callbackfn, arguments[1]);
  22521. }
  22522. });
  22523. /***/ }),
  22524. /***/ 58295:
  22525. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22526. "use strict";
  22527. var $export = __webpack_require__(42985);
  22528. var createProperty = __webpack_require__(92811);
  22529. // WebKit Array.of isn't generic
  22530. $export($export.S + $export.F * __webpack_require__(74253)(function () {
  22531. function F() { /* empty */ }
  22532. return !(Array.of.call(F) instanceof F);
  22533. }), 'Array', {
  22534. // 22.1.2.3 Array.of( ...items)
  22535. of: function of(/* ...args */) {
  22536. var index = 0;
  22537. var aLen = arguments.length;
  22538. var result = new (typeof this == 'function' ? this : Array)(aLen);
  22539. while (aLen > index) createProperty(result, index, arguments[index++]);
  22540. result.length = aLen;
  22541. return result;
  22542. }
  22543. });
  22544. /***/ }),
  22545. /***/ 3750:
  22546. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22547. "use strict";
  22548. var $export = __webpack_require__(42985);
  22549. var $reduce = __webpack_require__(37628);
  22550. $export($export.P + $export.F * !__webpack_require__(77717)([].reduceRight, true), 'Array', {
  22551. // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue])
  22552. reduceRight: function reduceRight(callbackfn /* , initialValue */) {
  22553. return $reduce(this, callbackfn, arguments.length, arguments[1], true);
  22554. }
  22555. });
  22556. /***/ }),
  22557. /***/ 33057:
  22558. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22559. "use strict";
  22560. var $export = __webpack_require__(42985);
  22561. var $reduce = __webpack_require__(37628);
  22562. $export($export.P + $export.F * !__webpack_require__(77717)([].reduce, true), 'Array', {
  22563. // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue])
  22564. reduce: function reduce(callbackfn /* , initialValue */) {
  22565. return $reduce(this, callbackfn, arguments.length, arguments[1], false);
  22566. }
  22567. });
  22568. /***/ }),
  22569. /***/ 50110:
  22570. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22571. "use strict";
  22572. var $export = __webpack_require__(42985);
  22573. var html = __webpack_require__(40639);
  22574. var cof = __webpack_require__(92032);
  22575. var toAbsoluteIndex = __webpack_require__(92337);
  22576. var toLength = __webpack_require__(10875);
  22577. var arraySlice = [].slice;
  22578. // fallback for not array-like ES3 strings and DOM objects
  22579. $export($export.P + $export.F * __webpack_require__(74253)(function () {
  22580. if (html) arraySlice.call(html);
  22581. }), 'Array', {
  22582. slice: function slice(begin, end) {
  22583. var len = toLength(this.length);
  22584. var klass = cof(this);
  22585. end = end === undefined ? len : end;
  22586. if (klass == 'Array') return arraySlice.call(this, begin, end);
  22587. var start = toAbsoluteIndex(begin, len);
  22588. var upTo = toAbsoluteIndex(end, len);
  22589. var size = toLength(upTo - start);
  22590. var cloned = new Array(size);
  22591. var i = 0;
  22592. for (; i < size; i++) cloned[i] = klass == 'String'
  22593. ? this.charAt(start + i)
  22594. : this[start + i];
  22595. return cloned;
  22596. }
  22597. });
  22598. /***/ }),
  22599. /***/ 26773:
  22600. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22601. "use strict";
  22602. var $export = __webpack_require__(42985);
  22603. var $some = __webpack_require__(10050)(3);
  22604. $export($export.P + $export.F * !__webpack_require__(77717)([].some, true), 'Array', {
  22605. // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg])
  22606. some: function some(callbackfn /* , thisArg */) {
  22607. return $some(this, callbackfn, arguments[1]);
  22608. }
  22609. });
  22610. /***/ }),
  22611. /***/ 20075:
  22612. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22613. "use strict";
  22614. var $export = __webpack_require__(42985);
  22615. var aFunction = __webpack_require__(24963);
  22616. var toObject = __webpack_require__(20508);
  22617. var fails = __webpack_require__(74253);
  22618. var $sort = [].sort;
  22619. var test = [1, 2, 3];
  22620. $export($export.P + $export.F * (fails(function () {
  22621. // IE8-
  22622. test.sort(undefined);
  22623. }) || !fails(function () {
  22624. // V8 bug
  22625. test.sort(null);
  22626. // Old WebKit
  22627. }) || !__webpack_require__(77717)($sort)), 'Array', {
  22628. // 22.1.3.25 Array.prototype.sort(comparefn)
  22629. sort: function sort(comparefn) {
  22630. return comparefn === undefined
  22631. ? $sort.call(toObject(this))
  22632. : $sort.call(toObject(this), aFunction(comparefn));
  22633. }
  22634. });
  22635. /***/ }),
  22636. /***/ 31842:
  22637. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22638. __webpack_require__(2974)('Array');
  22639. /***/ }),
  22640. /***/ 81822:
  22641. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22642. // 20.3.3.1 / 15.9.4.4 Date.now()
  22643. var $export = __webpack_require__(42985);
  22644. $export($export.S, 'Date', { now: function () { return new Date().getTime(); } });
  22645. /***/ }),
  22646. /***/ 91031:
  22647. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22648. // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
  22649. var $export = __webpack_require__(42985);
  22650. var toISOString = __webpack_require__(53537);
  22651. // PhantomJS / old WebKit has a broken implementations
  22652. $export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', {
  22653. toISOString: toISOString
  22654. });
  22655. /***/ }),
  22656. /***/ 19977:
  22657. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22658. "use strict";
  22659. var $export = __webpack_require__(42985);
  22660. var toObject = __webpack_require__(20508);
  22661. var toPrimitive = __webpack_require__(21689);
  22662. $export($export.P + $export.F * __webpack_require__(74253)(function () {
  22663. return new Date(NaN).toJSON() !== null
  22664. || Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1;
  22665. }), 'Date', {
  22666. // eslint-disable-next-line no-unused-vars
  22667. toJSON: function toJSON(key) {
  22668. var O = toObject(this);
  22669. var pv = toPrimitive(O);
  22670. return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString();
  22671. }
  22672. });
  22673. /***/ }),
  22674. /***/ 41560:
  22675. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22676. var TO_PRIMITIVE = __webpack_require__(86314)('toPrimitive');
  22677. var proto = Date.prototype;
  22678. if (!(TO_PRIMITIVE in proto)) __webpack_require__(87728)(proto, TO_PRIMITIVE, __webpack_require__(870));
  22679. /***/ }),
  22680. /***/ 46331:
  22681. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22682. var DateProto = Date.prototype;
  22683. var INVALID_DATE = 'Invalid Date';
  22684. var TO_STRING = 'toString';
  22685. var $toString = DateProto[TO_STRING];
  22686. var getTime = DateProto.getTime;
  22687. if (new Date(NaN) + '' != INVALID_DATE) {
  22688. __webpack_require__(77234)(DateProto, TO_STRING, function toString() {
  22689. var value = getTime.call(this);
  22690. // eslint-disable-next-line no-self-compare
  22691. return value === value ? $toString.call(this) : INVALID_DATE;
  22692. });
  22693. }
  22694. /***/ }),
  22695. /***/ 39730:
  22696. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22697. // 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)
  22698. var $export = __webpack_require__(42985);
  22699. $export($export.P, 'Function', { bind: __webpack_require__(34398) });
  22700. /***/ }),
  22701. /***/ 48377:
  22702. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22703. "use strict";
  22704. var isObject = __webpack_require__(55286);
  22705. var getPrototypeOf = __webpack_require__(468);
  22706. var HAS_INSTANCE = __webpack_require__(86314)('hasInstance');
  22707. var FunctionProto = Function.prototype;
  22708. // 19.2.3.6 Function.prototype[@@hasInstance](V)
  22709. if (!(HAS_INSTANCE in FunctionProto)) (__webpack_require__(99275).f)(FunctionProto, HAS_INSTANCE, { value: function (O) {
  22710. if (typeof this != 'function' || !isObject(O)) return false;
  22711. if (!isObject(this.prototype)) return O instanceof this;
  22712. // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:
  22713. while (O = getPrototypeOf(O)) if (this.prototype === O) return true;
  22714. return false;
  22715. } });
  22716. /***/ }),
  22717. /***/ 6059:
  22718. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22719. var dP = (__webpack_require__(99275).f);
  22720. var FProto = Function.prototype;
  22721. var nameRE = /^\s*function ([^ (]*)/;
  22722. var NAME = 'name';
  22723. // 19.2.4.2 name
  22724. NAME in FProto || __webpack_require__(67057) && dP(FProto, NAME, {
  22725. configurable: true,
  22726. get: function () {
  22727. try {
  22728. return ('' + this).match(nameRE)[1];
  22729. } catch (e) {
  22730. return '';
  22731. }
  22732. }
  22733. });
  22734. /***/ }),
  22735. /***/ 88416:
  22736. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  22737. "use strict";
  22738. var strong = __webpack_require__(9824);
  22739. var validate = __webpack_require__(1616);
  22740. var MAP = 'Map';
  22741. // 23.1 Map Objects
  22742. module.exports = __webpack_require__(45795)(MAP, function (get) {
  22743. return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
  22744. }, {
  22745. // 23.1.3.6 Map.prototype.get(key)
  22746. get: function get(key) {
  22747. var entry = strong.getEntry(validate(this, MAP), key);
  22748. return entry && entry.v;
  22749. },
  22750. // 23.1.3.9 Map.prototype.set(key, value)
  22751. set: function set(key, value) {
  22752. return strong.def(validate(this, MAP), key === 0 ? 0 : key, value);
  22753. }
  22754. }, strong, true);
  22755. /***/ }),
  22756. /***/ 76503:
  22757. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22758. // 20.2.2.3 Math.acosh(x)
  22759. var $export = __webpack_require__(42985);
  22760. var log1p = __webpack_require__(46206);
  22761. var sqrt = Math.sqrt;
  22762. var $acosh = Math.acosh;
  22763. $export($export.S + $export.F * !($acosh
  22764. // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509
  22765. && Math.floor($acosh(Number.MAX_VALUE)) == 710
  22766. // Tor Browser bug: Math.acosh(Infinity) -> NaN
  22767. && $acosh(Infinity) == Infinity
  22768. ), 'Math', {
  22769. acosh: function acosh(x) {
  22770. return (x = +x) < 1 ? NaN : x > 94906265.62425156
  22771. ? Math.log(x) + Math.LN2
  22772. : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1));
  22773. }
  22774. });
  22775. /***/ }),
  22776. /***/ 66786:
  22777. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22778. // 20.2.2.5 Math.asinh(x)
  22779. var $export = __webpack_require__(42985);
  22780. var $asinh = Math.asinh;
  22781. function asinh(x) {
  22782. return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1));
  22783. }
  22784. // Tor Browser bug: Math.asinh(0) -> -0
  22785. $export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh });
  22786. /***/ }),
  22787. /***/ 50932:
  22788. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22789. // 20.2.2.7 Math.atanh(x)
  22790. var $export = __webpack_require__(42985);
  22791. var $atanh = Math.atanh;
  22792. // Tor Browser bug: Math.atanh(-0) -> 0
  22793. $export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', {
  22794. atanh: function atanh(x) {
  22795. return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;
  22796. }
  22797. });
  22798. /***/ }),
  22799. /***/ 57526:
  22800. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22801. // 20.2.2.9 Math.cbrt(x)
  22802. var $export = __webpack_require__(42985);
  22803. var sign = __webpack_require__(61801);
  22804. $export($export.S, 'Math', {
  22805. cbrt: function cbrt(x) {
  22806. return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3);
  22807. }
  22808. });
  22809. /***/ }),
  22810. /***/ 21591:
  22811. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22812. // 20.2.2.11 Math.clz32(x)
  22813. var $export = __webpack_require__(42985);
  22814. $export($export.S, 'Math', {
  22815. clz32: function clz32(x) {
  22816. return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32;
  22817. }
  22818. });
  22819. /***/ }),
  22820. /***/ 9073:
  22821. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22822. // 20.2.2.12 Math.cosh(x)
  22823. var $export = __webpack_require__(42985);
  22824. var exp = Math.exp;
  22825. $export($export.S, 'Math', {
  22826. cosh: function cosh(x) {
  22827. return (exp(x = +x) + exp(-x)) / 2;
  22828. }
  22829. });
  22830. /***/ }),
  22831. /***/ 80347:
  22832. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22833. // 20.2.2.14 Math.expm1(x)
  22834. var $export = __webpack_require__(42985);
  22835. var $expm1 = __webpack_require__(13086);
  22836. $export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 });
  22837. /***/ }),
  22838. /***/ 30579:
  22839. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22840. // 20.2.2.16 Math.fround(x)
  22841. var $export = __webpack_require__(42985);
  22842. $export($export.S, 'Math', { fround: __webpack_require__(34934) });
  22843. /***/ }),
  22844. /***/ 4669:
  22845. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22846. // 20.2.2.17 Math.hypot([value1[, value2[, … ]]])
  22847. var $export = __webpack_require__(42985);
  22848. var abs = Math.abs;
  22849. $export($export.S, 'Math', {
  22850. hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars
  22851. var sum = 0;
  22852. var i = 0;
  22853. var aLen = arguments.length;
  22854. var larg = 0;
  22855. var arg, div;
  22856. while (i < aLen) {
  22857. arg = abs(arguments[i++]);
  22858. if (larg < arg) {
  22859. div = larg / arg;
  22860. sum = sum * div * div + 1;
  22861. larg = arg;
  22862. } else if (arg > 0) {
  22863. div = arg / larg;
  22864. sum += div * div;
  22865. } else sum += arg;
  22866. }
  22867. return larg === Infinity ? Infinity : larg * Math.sqrt(sum);
  22868. }
  22869. });
  22870. /***/ }),
  22871. /***/ 67710:
  22872. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22873. // 20.2.2.18 Math.imul(x, y)
  22874. var $export = __webpack_require__(42985);
  22875. var $imul = Math.imul;
  22876. // some WebKit versions fails with big numbers, some has wrong arity
  22877. $export($export.S + $export.F * __webpack_require__(74253)(function () {
  22878. return $imul(0xffffffff, 5) != -5 || $imul.length != 2;
  22879. }), 'Math', {
  22880. imul: function imul(x, y) {
  22881. var UINT16 = 0xffff;
  22882. var xn = +x;
  22883. var yn = +y;
  22884. var xl = UINT16 & xn;
  22885. var yl = UINT16 & yn;
  22886. return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0);
  22887. }
  22888. });
  22889. /***/ }),
  22890. /***/ 45789:
  22891. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22892. // 20.2.2.21 Math.log10(x)
  22893. var $export = __webpack_require__(42985);
  22894. $export($export.S, 'Math', {
  22895. log10: function log10(x) {
  22896. return Math.log(x) * Math.LOG10E;
  22897. }
  22898. });
  22899. /***/ }),
  22900. /***/ 33514:
  22901. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22902. // 20.2.2.20 Math.log1p(x)
  22903. var $export = __webpack_require__(42985);
  22904. $export($export.S, 'Math', { log1p: __webpack_require__(46206) });
  22905. /***/ }),
  22906. /***/ 99978:
  22907. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22908. // 20.2.2.22 Math.log2(x)
  22909. var $export = __webpack_require__(42985);
  22910. $export($export.S, 'Math', {
  22911. log2: function log2(x) {
  22912. return Math.log(x) / Math.LN2;
  22913. }
  22914. });
  22915. /***/ }),
  22916. /***/ 58472:
  22917. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22918. // 20.2.2.28 Math.sign(x)
  22919. var $export = __webpack_require__(42985);
  22920. $export($export.S, 'Math', { sign: __webpack_require__(61801) });
  22921. /***/ }),
  22922. /***/ 86946:
  22923. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22924. // 20.2.2.30 Math.sinh(x)
  22925. var $export = __webpack_require__(42985);
  22926. var expm1 = __webpack_require__(13086);
  22927. var exp = Math.exp;
  22928. // V8 near Chromium 38 has a problem with very small numbers
  22929. $export($export.S + $export.F * __webpack_require__(74253)(function () {
  22930. return !Math.sinh(-2e-17) != -2e-17;
  22931. }), 'Math', {
  22932. sinh: function sinh(x) {
  22933. return Math.abs(x = +x) < 1
  22934. ? (expm1(x) - expm1(-x)) / 2
  22935. : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2);
  22936. }
  22937. });
  22938. /***/ }),
  22939. /***/ 35068:
  22940. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22941. // 20.2.2.33 Math.tanh(x)
  22942. var $export = __webpack_require__(42985);
  22943. var expm1 = __webpack_require__(13086);
  22944. var exp = Math.exp;
  22945. $export($export.S, 'Math', {
  22946. tanh: function tanh(x) {
  22947. var a = expm1(x = +x);
  22948. var b = expm1(-x);
  22949. return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));
  22950. }
  22951. });
  22952. /***/ }),
  22953. /***/ 413:
  22954. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22955. // 20.2.2.34 Math.trunc(x)
  22956. var $export = __webpack_require__(42985);
  22957. $export($export.S, 'Math', {
  22958. trunc: function trunc(it) {
  22959. return (it > 0 ? Math.floor : Math.ceil)(it);
  22960. }
  22961. });
  22962. /***/ }),
  22963. /***/ 11246:
  22964. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  22965. "use strict";
  22966. var global = __webpack_require__(3816);
  22967. var has = __webpack_require__(79181);
  22968. var cof = __webpack_require__(92032);
  22969. var inheritIfRequired = __webpack_require__(40266);
  22970. var toPrimitive = __webpack_require__(21689);
  22971. var fails = __webpack_require__(74253);
  22972. var gOPN = (__webpack_require__(20616).f);
  22973. var gOPD = (__webpack_require__(18693).f);
  22974. var dP = (__webpack_require__(99275).f);
  22975. var $trim = (__webpack_require__(29599).trim);
  22976. var NUMBER = 'Number';
  22977. var $Number = global[NUMBER];
  22978. var Base = $Number;
  22979. var proto = $Number.prototype;
  22980. // Opera ~12 has broken Object#toString
  22981. var BROKEN_COF = cof(__webpack_require__(42503)(proto)) == NUMBER;
  22982. var TRIM = 'trim' in String.prototype;
  22983. // 7.1.3 ToNumber(argument)
  22984. var toNumber = function (argument) {
  22985. var it = toPrimitive(argument, false);
  22986. if (typeof it == 'string' && it.length > 2) {
  22987. it = TRIM ? it.trim() : $trim(it, 3);
  22988. var first = it.charCodeAt(0);
  22989. var third, radix, maxCode;
  22990. if (first === 43 || first === 45) {
  22991. third = it.charCodeAt(2);
  22992. if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
  22993. } else if (first === 48) {
  22994. switch (it.charCodeAt(1)) {
  22995. case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i
  22996. case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i
  22997. default: return +it;
  22998. }
  22999. for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) {
  23000. code = digits.charCodeAt(i);
  23001. // parseInt parses a string to a first unavailable symbol
  23002. // but ToNumber should return NaN if a string contains unavailable symbols
  23003. if (code < 48 || code > maxCode) return NaN;
  23004. } return parseInt(digits, radix);
  23005. }
  23006. } return +it;
  23007. };
  23008. if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) {
  23009. $Number = function Number(value) {
  23010. var it = arguments.length < 1 ? 0 : value;
  23011. var that = this;
  23012. return that instanceof $Number
  23013. // check on 1..constructor(foo) case
  23014. && (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER)
  23015. ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it);
  23016. };
  23017. for (var keys = __webpack_require__(67057) ? gOPN(Base) : (
  23018. // ES3:
  23019. 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
  23020. // ES6 (in case, if modules with ES6 Number statics required before):
  23021. 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
  23022. 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
  23023. ).split(','), j = 0, key; keys.length > j; j++) {
  23024. if (has(Base, key = keys[j]) && !has($Number, key)) {
  23025. dP($Number, key, gOPD(Base, key));
  23026. }
  23027. }
  23028. $Number.prototype = proto;
  23029. proto.constructor = $Number;
  23030. __webpack_require__(77234)(global, NUMBER, $Number);
  23031. }
  23032. /***/ }),
  23033. /***/ 75972:
  23034. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23035. // 20.1.2.1 Number.EPSILON
  23036. var $export = __webpack_require__(42985);
  23037. $export($export.S, 'Number', { EPSILON: Math.pow(2, -52) });
  23038. /***/ }),
  23039. /***/ 53403:
  23040. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23041. // 20.1.2.2 Number.isFinite(number)
  23042. var $export = __webpack_require__(42985);
  23043. var _isFinite = (__webpack_require__(3816).isFinite);
  23044. $export($export.S, 'Number', {
  23045. isFinite: function isFinite(it) {
  23046. return typeof it == 'number' && _isFinite(it);
  23047. }
  23048. });
  23049. /***/ }),
  23050. /***/ 92516:
  23051. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23052. // 20.1.2.3 Number.isInteger(number)
  23053. var $export = __webpack_require__(42985);
  23054. $export($export.S, 'Number', { isInteger: __webpack_require__(18367) });
  23055. /***/ }),
  23056. /***/ 49371:
  23057. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23058. // 20.1.2.4 Number.isNaN(number)
  23059. var $export = __webpack_require__(42985);
  23060. $export($export.S, 'Number', {
  23061. isNaN: function isNaN(number) {
  23062. // eslint-disable-next-line no-self-compare
  23063. return number != number;
  23064. }
  23065. });
  23066. /***/ }),
  23067. /***/ 86479:
  23068. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23069. // 20.1.2.5 Number.isSafeInteger(number)
  23070. var $export = __webpack_require__(42985);
  23071. var isInteger = __webpack_require__(18367);
  23072. var abs = Math.abs;
  23073. $export($export.S, 'Number', {
  23074. isSafeInteger: function isSafeInteger(number) {
  23075. return isInteger(number) && abs(number) <= 0x1fffffffffffff;
  23076. }
  23077. });
  23078. /***/ }),
  23079. /***/ 91736:
  23080. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23081. // 20.1.2.6 Number.MAX_SAFE_INTEGER
  23082. var $export = __webpack_require__(42985);
  23083. $export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff });
  23084. /***/ }),
  23085. /***/ 51889:
  23086. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23087. // 20.1.2.10 Number.MIN_SAFE_INTEGER
  23088. var $export = __webpack_require__(42985);
  23089. $export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff });
  23090. /***/ }),
  23091. /***/ 65177:
  23092. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23093. var $export = __webpack_require__(42985);
  23094. var $parseFloat = __webpack_require__(47743);
  23095. // 20.1.2.12 Number.parseFloat(string)
  23096. $export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat });
  23097. /***/ }),
  23098. /***/ 81246:
  23099. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23100. var $export = __webpack_require__(42985);
  23101. var $parseInt = __webpack_require__(55960);
  23102. // 20.1.2.13 Number.parseInt(string, radix)
  23103. $export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt });
  23104. /***/ }),
  23105. /***/ 30726:
  23106. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23107. "use strict";
  23108. var $export = __webpack_require__(42985);
  23109. var toInteger = __webpack_require__(81467);
  23110. var aNumberValue = __webpack_require__(83365);
  23111. var repeat = __webpack_require__(68595);
  23112. var $toFixed = 1.0.toFixed;
  23113. var floor = Math.floor;
  23114. var data = [0, 0, 0, 0, 0, 0];
  23115. var ERROR = 'Number.toFixed: incorrect invocation!';
  23116. var ZERO = '0';
  23117. var multiply = function (n, c) {
  23118. var i = -1;
  23119. var c2 = c;
  23120. while (++i < 6) {
  23121. c2 += n * data[i];
  23122. data[i] = c2 % 1e7;
  23123. c2 = floor(c2 / 1e7);
  23124. }
  23125. };
  23126. var divide = function (n) {
  23127. var i = 6;
  23128. var c = 0;
  23129. while (--i >= 0) {
  23130. c += data[i];
  23131. data[i] = floor(c / n);
  23132. c = (c % n) * 1e7;
  23133. }
  23134. };
  23135. var numToString = function () {
  23136. var i = 6;
  23137. var s = '';
  23138. while (--i >= 0) {
  23139. if (s !== '' || i === 0 || data[i] !== 0) {
  23140. var t = String(data[i]);
  23141. s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t;
  23142. }
  23143. } return s;
  23144. };
  23145. var pow = function (x, n, acc) {
  23146. return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);
  23147. };
  23148. var log = function (x) {
  23149. var n = 0;
  23150. var x2 = x;
  23151. while (x2 >= 4096) {
  23152. n += 12;
  23153. x2 /= 4096;
  23154. }
  23155. while (x2 >= 2) {
  23156. n += 1;
  23157. x2 /= 2;
  23158. } return n;
  23159. };
  23160. $export($export.P + $export.F * (!!$toFixed && (
  23161. 0.00008.toFixed(3) !== '0.000' ||
  23162. 0.9.toFixed(0) !== '1' ||
  23163. 1.255.toFixed(2) !== '1.25' ||
  23164. 1000000000000000128.0.toFixed(0) !== '1000000000000000128'
  23165. ) || !__webpack_require__(74253)(function () {
  23166. // V8 ~ Android 4.3-
  23167. $toFixed.call({});
  23168. })), 'Number', {
  23169. toFixed: function toFixed(fractionDigits) {
  23170. var x = aNumberValue(this, ERROR);
  23171. var f = toInteger(fractionDigits);
  23172. var s = '';
  23173. var m = ZERO;
  23174. var e, z, j, k;
  23175. if (f < 0 || f > 20) throw RangeError(ERROR);
  23176. // eslint-disable-next-line no-self-compare
  23177. if (x != x) return 'NaN';
  23178. if (x <= -1e21 || x >= 1e21) return String(x);
  23179. if (x < 0) {
  23180. s = '-';
  23181. x = -x;
  23182. }
  23183. if (x > 1e-21) {
  23184. e = log(x * pow(2, 69, 1)) - 69;
  23185. z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1);
  23186. z *= 0x10000000000000;
  23187. e = 52 - e;
  23188. if (e > 0) {
  23189. multiply(0, z);
  23190. j = f;
  23191. while (j >= 7) {
  23192. multiply(1e7, 0);
  23193. j -= 7;
  23194. }
  23195. multiply(pow(10, j, 1), 0);
  23196. j = e - 1;
  23197. while (j >= 23) {
  23198. divide(1 << 23);
  23199. j -= 23;
  23200. }
  23201. divide(1 << j);
  23202. multiply(1, 1);
  23203. divide(2);
  23204. m = numToString();
  23205. } else {
  23206. multiply(0, z);
  23207. multiply(1 << -e, 0);
  23208. m = numToString() + repeat.call(ZERO, f);
  23209. }
  23210. }
  23211. if (f > 0) {
  23212. k = m.length;
  23213. m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f));
  23214. } else {
  23215. m = s + m;
  23216. } return m;
  23217. }
  23218. });
  23219. /***/ }),
  23220. /***/ 1901:
  23221. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23222. "use strict";
  23223. var $export = __webpack_require__(42985);
  23224. var $fails = __webpack_require__(74253);
  23225. var aNumberValue = __webpack_require__(83365);
  23226. var $toPrecision = 1.0.toPrecision;
  23227. $export($export.P + $export.F * ($fails(function () {
  23228. // IE7-
  23229. return $toPrecision.call(1, undefined) !== '1';
  23230. }) || !$fails(function () {
  23231. // V8 ~ Android 4.3-
  23232. $toPrecision.call({});
  23233. })), 'Number', {
  23234. toPrecision: function toPrecision(precision) {
  23235. var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!');
  23236. return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision);
  23237. }
  23238. });
  23239. /***/ }),
  23240. /***/ 75115:
  23241. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23242. // 19.1.3.1 Object.assign(target, source)
  23243. var $export = __webpack_require__(42985);
  23244. $export($export.S + $export.F, 'Object', { assign: __webpack_require__(35345) });
  23245. /***/ }),
  23246. /***/ 68132:
  23247. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23248. var $export = __webpack_require__(42985);
  23249. // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
  23250. $export($export.S, 'Object', { create: __webpack_require__(42503) });
  23251. /***/ }),
  23252. /***/ 37470:
  23253. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23254. var $export = __webpack_require__(42985);
  23255. // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)
  23256. $export($export.S + $export.F * !__webpack_require__(67057), 'Object', { defineProperties: __webpack_require__(35588) });
  23257. /***/ }),
  23258. /***/ 48388:
  23259. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23260. var $export = __webpack_require__(42985);
  23261. // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
  23262. $export($export.S + $export.F * !__webpack_require__(67057), 'Object', { defineProperty: (__webpack_require__(99275).f) });
  23263. /***/ }),
  23264. /***/ 89375:
  23265. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23266. // 19.1.2.5 Object.freeze(O)
  23267. var isObject = __webpack_require__(55286);
  23268. var meta = (__webpack_require__(84728).onFreeze);
  23269. __webpack_require__(33160)('freeze', function ($freeze) {
  23270. return function freeze(it) {
  23271. return $freeze && isObject(it) ? $freeze(meta(it)) : it;
  23272. };
  23273. });
  23274. /***/ }),
  23275. /***/ 94882:
  23276. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23277. // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
  23278. var toIObject = __webpack_require__(22110);
  23279. var $getOwnPropertyDescriptor = (__webpack_require__(18693).f);
  23280. __webpack_require__(33160)('getOwnPropertyDescriptor', function () {
  23281. return function getOwnPropertyDescriptor(it, key) {
  23282. return $getOwnPropertyDescriptor(toIObject(it), key);
  23283. };
  23284. });
  23285. /***/ }),
  23286. /***/ 79622:
  23287. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23288. // 19.1.2.7 Object.getOwnPropertyNames(O)
  23289. __webpack_require__(33160)('getOwnPropertyNames', function () {
  23290. return (__webpack_require__(39327).f);
  23291. });
  23292. /***/ }),
  23293. /***/ 41520:
  23294. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23295. // 19.1.2.9 Object.getPrototypeOf(O)
  23296. var toObject = __webpack_require__(20508);
  23297. var $getPrototypeOf = __webpack_require__(468);
  23298. __webpack_require__(33160)('getPrototypeOf', function () {
  23299. return function getPrototypeOf(it) {
  23300. return $getPrototypeOf(toObject(it));
  23301. };
  23302. });
  23303. /***/ }),
  23304. /***/ 49892:
  23305. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23306. // 19.1.2.11 Object.isExtensible(O)
  23307. var isObject = __webpack_require__(55286);
  23308. __webpack_require__(33160)('isExtensible', function ($isExtensible) {
  23309. return function isExtensible(it) {
  23310. return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false;
  23311. };
  23312. });
  23313. /***/ }),
  23314. /***/ 64157:
  23315. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23316. // 19.1.2.12 Object.isFrozen(O)
  23317. var isObject = __webpack_require__(55286);
  23318. __webpack_require__(33160)('isFrozen', function ($isFrozen) {
  23319. return function isFrozen(it) {
  23320. return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;
  23321. };
  23322. });
  23323. /***/ }),
  23324. /***/ 35095:
  23325. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23326. // 19.1.2.13 Object.isSealed(O)
  23327. var isObject = __webpack_require__(55286);
  23328. __webpack_require__(33160)('isSealed', function ($isSealed) {
  23329. return function isSealed(it) {
  23330. return isObject(it) ? $isSealed ? $isSealed(it) : false : true;
  23331. };
  23332. });
  23333. /***/ }),
  23334. /***/ 99176:
  23335. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23336. // 19.1.3.10 Object.is(value1, value2)
  23337. var $export = __webpack_require__(42985);
  23338. $export($export.S, 'Object', { is: __webpack_require__(27195) });
  23339. /***/ }),
  23340. /***/ 27476:
  23341. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23342. // 19.1.2.14 Object.keys(O)
  23343. var toObject = __webpack_require__(20508);
  23344. var $keys = __webpack_require__(47184);
  23345. __webpack_require__(33160)('keys', function () {
  23346. return function keys(it) {
  23347. return $keys(toObject(it));
  23348. };
  23349. });
  23350. /***/ }),
  23351. /***/ 84672:
  23352. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23353. // 19.1.2.15 Object.preventExtensions(O)
  23354. var isObject = __webpack_require__(55286);
  23355. var meta = (__webpack_require__(84728).onFreeze);
  23356. __webpack_require__(33160)('preventExtensions', function ($preventExtensions) {
  23357. return function preventExtensions(it) {
  23358. return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it;
  23359. };
  23360. });
  23361. /***/ }),
  23362. /***/ 43533:
  23363. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23364. // 19.1.2.17 Object.seal(O)
  23365. var isObject = __webpack_require__(55286);
  23366. var meta = (__webpack_require__(84728).onFreeze);
  23367. __webpack_require__(33160)('seal', function ($seal) {
  23368. return function seal(it) {
  23369. return $seal && isObject(it) ? $seal(meta(it)) : it;
  23370. };
  23371. });
  23372. /***/ }),
  23373. /***/ 68838:
  23374. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23375. // 19.1.3.19 Object.setPrototypeOf(O, proto)
  23376. var $export = __webpack_require__(42985);
  23377. $export($export.S, 'Object', { setPrototypeOf: (__webpack_require__(27375).set) });
  23378. /***/ }),
  23379. /***/ 96253:
  23380. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23381. "use strict";
  23382. // 19.1.3.6 Object.prototype.toString()
  23383. var classof = __webpack_require__(41488);
  23384. var test = {};
  23385. test[__webpack_require__(86314)('toStringTag')] = 'z';
  23386. if (test + '' != '[object z]') {
  23387. __webpack_require__(77234)(Object.prototype, 'toString', function toString() {
  23388. return '[object ' + classof(this) + ']';
  23389. }, true);
  23390. }
  23391. /***/ }),
  23392. /***/ 64299:
  23393. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23394. var $export = __webpack_require__(42985);
  23395. var $parseFloat = __webpack_require__(47743);
  23396. // 18.2.4 parseFloat(string)
  23397. $export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat });
  23398. /***/ }),
  23399. /***/ 71084:
  23400. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23401. var $export = __webpack_require__(42985);
  23402. var $parseInt = __webpack_require__(55960);
  23403. // 18.2.5 parseInt(string, radix)
  23404. $export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt });
  23405. /***/ }),
  23406. /***/ 40851:
  23407. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23408. "use strict";
  23409. var LIBRARY = __webpack_require__(4461);
  23410. var global = __webpack_require__(3816);
  23411. var ctx = __webpack_require__(741);
  23412. var classof = __webpack_require__(41488);
  23413. var $export = __webpack_require__(42985);
  23414. var isObject = __webpack_require__(55286);
  23415. var aFunction = __webpack_require__(24963);
  23416. var anInstance = __webpack_require__(83328);
  23417. var forOf = __webpack_require__(3531);
  23418. var speciesConstructor = __webpack_require__(58364);
  23419. var task = (__webpack_require__(74193).set);
  23420. var microtask = __webpack_require__(14351)();
  23421. var newPromiseCapabilityModule = __webpack_require__(43499);
  23422. var perform = __webpack_require__(10188);
  23423. var userAgent = __webpack_require__(30575);
  23424. var promiseResolve = __webpack_require__(50094);
  23425. var PROMISE = 'Promise';
  23426. var TypeError = global.TypeError;
  23427. var process = global.process;
  23428. var versions = process && process.versions;
  23429. var v8 = versions && versions.v8 || '';
  23430. var $Promise = global[PROMISE];
  23431. var isNode = classof(process) == 'process';
  23432. var empty = function () { /* empty */ };
  23433. var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;
  23434. var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;
  23435. var USE_NATIVE = !!function () {
  23436. try {
  23437. // correct subclassing with @@species support
  23438. var promise = $Promise.resolve(1);
  23439. var FakePromise = (promise.constructor = {})[__webpack_require__(86314)('species')] = function (exec) {
  23440. exec(empty, empty);
  23441. };
  23442. // unhandled rejections tracking support, NodeJS Promise without it fails @@species test
  23443. return (isNode || typeof PromiseRejectionEvent == 'function')
  23444. && promise.then(empty) instanceof FakePromise
  23445. // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
  23446. // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
  23447. // we can't detect it synchronously, so just check versions
  23448. && v8.indexOf('6.6') !== 0
  23449. && userAgent.indexOf('Chrome/66') === -1;
  23450. } catch (e) { /* empty */ }
  23451. }();
  23452. // helpers
  23453. var isThenable = function (it) {
  23454. var then;
  23455. return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
  23456. };
  23457. var notify = function (promise, isReject) {
  23458. if (promise._n) return;
  23459. promise._n = true;
  23460. var chain = promise._c;
  23461. microtask(function () {
  23462. var value = promise._v;
  23463. var ok = promise._s == 1;
  23464. var i = 0;
  23465. var run = function (reaction) {
  23466. var handler = ok ? reaction.ok : reaction.fail;
  23467. var resolve = reaction.resolve;
  23468. var reject = reaction.reject;
  23469. var domain = reaction.domain;
  23470. var result, then, exited;
  23471. try {
  23472. if (handler) {
  23473. if (!ok) {
  23474. if (promise._h == 2) onHandleUnhandled(promise);
  23475. promise._h = 1;
  23476. }
  23477. if (handler === true) result = value;
  23478. else {
  23479. if (domain) domain.enter();
  23480. result = handler(value); // may throw
  23481. if (domain) {
  23482. domain.exit();
  23483. exited = true;
  23484. }
  23485. }
  23486. if (result === reaction.promise) {
  23487. reject(TypeError('Promise-chain cycle'));
  23488. } else if (then = isThenable(result)) {
  23489. then.call(result, resolve, reject);
  23490. } else resolve(result);
  23491. } else reject(value);
  23492. } catch (e) {
  23493. if (domain && !exited) domain.exit();
  23494. reject(e);
  23495. }
  23496. };
  23497. while (chain.length > i) run(chain[i++]); // variable length - can't use forEach
  23498. promise._c = [];
  23499. promise._n = false;
  23500. if (isReject && !promise._h) onUnhandled(promise);
  23501. });
  23502. };
  23503. var onUnhandled = function (promise) {
  23504. task.call(global, function () {
  23505. var value = promise._v;
  23506. var unhandled = isUnhandled(promise);
  23507. var result, handler, console;
  23508. if (unhandled) {
  23509. result = perform(function () {
  23510. if (isNode) {
  23511. process.emit('unhandledRejection', value, promise);
  23512. } else if (handler = global.onunhandledrejection) {
  23513. handler({ promise: promise, reason: value });
  23514. } else if ((console = global.console) && console.error) {
  23515. console.error('Unhandled promise rejection', value);
  23516. }
  23517. });
  23518. // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
  23519. promise._h = isNode || isUnhandled(promise) ? 2 : 1;
  23520. } promise._a = undefined;
  23521. if (unhandled && result.e) throw result.v;
  23522. });
  23523. };
  23524. var isUnhandled = function (promise) {
  23525. return promise._h !== 1 && (promise._a || promise._c).length === 0;
  23526. };
  23527. var onHandleUnhandled = function (promise) {
  23528. task.call(global, function () {
  23529. var handler;
  23530. if (isNode) {
  23531. process.emit('rejectionHandled', promise);
  23532. } else if (handler = global.onrejectionhandled) {
  23533. handler({ promise: promise, reason: promise._v });
  23534. }
  23535. });
  23536. };
  23537. var $reject = function (value) {
  23538. var promise = this;
  23539. if (promise._d) return;
  23540. promise._d = true;
  23541. promise = promise._w || promise; // unwrap
  23542. promise._v = value;
  23543. promise._s = 2;
  23544. if (!promise._a) promise._a = promise._c.slice();
  23545. notify(promise, true);
  23546. };
  23547. var $resolve = function (value) {
  23548. var promise = this;
  23549. var then;
  23550. if (promise._d) return;
  23551. promise._d = true;
  23552. promise = promise._w || promise; // unwrap
  23553. try {
  23554. if (promise === value) throw TypeError("Promise can't be resolved itself");
  23555. if (then = isThenable(value)) {
  23556. microtask(function () {
  23557. var wrapper = { _w: promise, _d: false }; // wrap
  23558. try {
  23559. then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));
  23560. } catch (e) {
  23561. $reject.call(wrapper, e);
  23562. }
  23563. });
  23564. } else {
  23565. promise._v = value;
  23566. promise._s = 1;
  23567. notify(promise, false);
  23568. }
  23569. } catch (e) {
  23570. $reject.call({ _w: promise, _d: false }, e); // wrap
  23571. }
  23572. };
  23573. // constructor polyfill
  23574. if (!USE_NATIVE) {
  23575. // 25.4.3.1 Promise(executor)
  23576. $Promise = function Promise(executor) {
  23577. anInstance(this, $Promise, PROMISE, '_h');
  23578. aFunction(executor);
  23579. Internal.call(this);
  23580. try {
  23581. executor(ctx($resolve, this, 1), ctx($reject, this, 1));
  23582. } catch (err) {
  23583. $reject.call(this, err);
  23584. }
  23585. };
  23586. // eslint-disable-next-line no-unused-vars
  23587. Internal = function Promise(executor) {
  23588. this._c = []; // <- awaiting reactions
  23589. this._a = undefined; // <- checked in isUnhandled reactions
  23590. this._s = 0; // <- state
  23591. this._d = false; // <- done
  23592. this._v = undefined; // <- value
  23593. this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled
  23594. this._n = false; // <- notify
  23595. };
  23596. Internal.prototype = __webpack_require__(24408)($Promise.prototype, {
  23597. // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)
  23598. then: function then(onFulfilled, onRejected) {
  23599. var reaction = newPromiseCapability(speciesConstructor(this, $Promise));
  23600. reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
  23601. reaction.fail = typeof onRejected == 'function' && onRejected;
  23602. reaction.domain = isNode ? process.domain : undefined;
  23603. this._c.push(reaction);
  23604. if (this._a) this._a.push(reaction);
  23605. if (this._s) notify(this, false);
  23606. return reaction.promise;
  23607. },
  23608. // 25.4.5.1 Promise.prototype.catch(onRejected)
  23609. 'catch': function (onRejected) {
  23610. return this.then(undefined, onRejected);
  23611. }
  23612. });
  23613. OwnPromiseCapability = function () {
  23614. var promise = new Internal();
  23615. this.promise = promise;
  23616. this.resolve = ctx($resolve, promise, 1);
  23617. this.reject = ctx($reject, promise, 1);
  23618. };
  23619. newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
  23620. return C === $Promise || C === Wrapper
  23621. ? new OwnPromiseCapability(C)
  23622. : newGenericPromiseCapability(C);
  23623. };
  23624. }
  23625. $export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise });
  23626. __webpack_require__(22943)($Promise, PROMISE);
  23627. __webpack_require__(2974)(PROMISE);
  23628. Wrapper = __webpack_require__(25645)[PROMISE];
  23629. // statics
  23630. $export($export.S + $export.F * !USE_NATIVE, PROMISE, {
  23631. // 25.4.4.5 Promise.reject(r)
  23632. reject: function reject(r) {
  23633. var capability = newPromiseCapability(this);
  23634. var $$reject = capability.reject;
  23635. $$reject(r);
  23636. return capability.promise;
  23637. }
  23638. });
  23639. $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {
  23640. // 25.4.4.6 Promise.resolve(x)
  23641. resolve: function resolve(x) {
  23642. return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x);
  23643. }
  23644. });
  23645. $export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(7462)(function (iter) {
  23646. $Promise.all(iter)['catch'](empty);
  23647. })), PROMISE, {
  23648. // 25.4.4.1 Promise.all(iterable)
  23649. all: function all(iterable) {
  23650. var C = this;
  23651. var capability = newPromiseCapability(C);
  23652. var resolve = capability.resolve;
  23653. var reject = capability.reject;
  23654. var result = perform(function () {
  23655. var values = [];
  23656. var index = 0;
  23657. var remaining = 1;
  23658. forOf(iterable, false, function (promise) {
  23659. var $index = index++;
  23660. var alreadyCalled = false;
  23661. values.push(undefined);
  23662. remaining++;
  23663. C.resolve(promise).then(function (value) {
  23664. if (alreadyCalled) return;
  23665. alreadyCalled = true;
  23666. values[$index] = value;
  23667. --remaining || resolve(values);
  23668. }, reject);
  23669. });
  23670. --remaining || resolve(values);
  23671. });
  23672. if (result.e) reject(result.v);
  23673. return capability.promise;
  23674. },
  23675. // 25.4.4.4 Promise.race(iterable)
  23676. race: function race(iterable) {
  23677. var C = this;
  23678. var capability = newPromiseCapability(C);
  23679. var reject = capability.reject;
  23680. var result = perform(function () {
  23681. forOf(iterable, false, function (promise) {
  23682. C.resolve(promise).then(capability.resolve, reject);
  23683. });
  23684. });
  23685. if (result.e) reject(result.v);
  23686. return capability.promise;
  23687. }
  23688. });
  23689. /***/ }),
  23690. /***/ 21572:
  23691. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23692. // 26.1.1 Reflect.apply(target, thisArgument, argumentsList)
  23693. var $export = __webpack_require__(42985);
  23694. var aFunction = __webpack_require__(24963);
  23695. var anObject = __webpack_require__(27007);
  23696. var rApply = ((__webpack_require__(3816).Reflect) || {}).apply;
  23697. var fApply = Function.apply;
  23698. // MS Edge argumentsList argument is optional
  23699. $export($export.S + $export.F * !__webpack_require__(74253)(function () {
  23700. rApply(function () { /* empty */ });
  23701. }), 'Reflect', {
  23702. apply: function apply(target, thisArgument, argumentsList) {
  23703. var T = aFunction(target);
  23704. var L = anObject(argumentsList);
  23705. return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L);
  23706. }
  23707. });
  23708. /***/ }),
  23709. /***/ 82139:
  23710. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23711. // 26.1.2 Reflect.construct(target, argumentsList [, newTarget])
  23712. var $export = __webpack_require__(42985);
  23713. var create = __webpack_require__(42503);
  23714. var aFunction = __webpack_require__(24963);
  23715. var anObject = __webpack_require__(27007);
  23716. var isObject = __webpack_require__(55286);
  23717. var fails = __webpack_require__(74253);
  23718. var bind = __webpack_require__(34398);
  23719. var rConstruct = ((__webpack_require__(3816).Reflect) || {}).construct;
  23720. // MS Edge supports only 2 arguments and argumentsList argument is optional
  23721. // FF Nightly sets third argument as `new.target`, but does not create `this` from it
  23722. var NEW_TARGET_BUG = fails(function () {
  23723. function F() { /* empty */ }
  23724. return !(rConstruct(function () { /* empty */ }, [], F) instanceof F);
  23725. });
  23726. var ARGS_BUG = !fails(function () {
  23727. rConstruct(function () { /* empty */ });
  23728. });
  23729. $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', {
  23730. construct: function construct(Target, args /* , newTarget */) {
  23731. aFunction(Target);
  23732. anObject(args);
  23733. var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
  23734. if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget);
  23735. if (Target == newTarget) {
  23736. // w/o altered newTarget, optimization for 0-4 arguments
  23737. switch (args.length) {
  23738. case 0: return new Target();
  23739. case 1: return new Target(args[0]);
  23740. case 2: return new Target(args[0], args[1]);
  23741. case 3: return new Target(args[0], args[1], args[2]);
  23742. case 4: return new Target(args[0], args[1], args[2], args[3]);
  23743. }
  23744. // w/o altered newTarget, lot of arguments case
  23745. var $args = [null];
  23746. $args.push.apply($args, args);
  23747. return new (bind.apply(Target, $args))();
  23748. }
  23749. // with altered newTarget, not support built-in constructors
  23750. var proto = newTarget.prototype;
  23751. var instance = create(isObject(proto) ? proto : Object.prototype);
  23752. var result = Function.apply.call(Target, instance, args);
  23753. return isObject(result) ? result : instance;
  23754. }
  23755. });
  23756. /***/ }),
  23757. /***/ 10685:
  23758. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23759. // 26.1.3 Reflect.defineProperty(target, propertyKey, attributes)
  23760. var dP = __webpack_require__(99275);
  23761. var $export = __webpack_require__(42985);
  23762. var anObject = __webpack_require__(27007);
  23763. var toPrimitive = __webpack_require__(21689);
  23764. // MS Edge has broken Reflect.defineProperty - throwing instead of returning false
  23765. $export($export.S + $export.F * __webpack_require__(74253)(function () {
  23766. // eslint-disable-next-line no-undef
  23767. Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 });
  23768. }), 'Reflect', {
  23769. defineProperty: function defineProperty(target, propertyKey, attributes) {
  23770. anObject(target);
  23771. propertyKey = toPrimitive(propertyKey, true);
  23772. anObject(attributes);
  23773. try {
  23774. dP.f(target, propertyKey, attributes);
  23775. return true;
  23776. } catch (e) {
  23777. return false;
  23778. }
  23779. }
  23780. });
  23781. /***/ }),
  23782. /***/ 85535:
  23783. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23784. // 26.1.4 Reflect.deleteProperty(target, propertyKey)
  23785. var $export = __webpack_require__(42985);
  23786. var gOPD = (__webpack_require__(18693).f);
  23787. var anObject = __webpack_require__(27007);
  23788. $export($export.S, 'Reflect', {
  23789. deleteProperty: function deleteProperty(target, propertyKey) {
  23790. var desc = gOPD(anObject(target), propertyKey);
  23791. return desc && !desc.configurable ? false : delete target[propertyKey];
  23792. }
  23793. });
  23794. /***/ }),
  23795. /***/ 17347:
  23796. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23797. "use strict";
  23798. // 26.1.5 Reflect.enumerate(target)
  23799. var $export = __webpack_require__(42985);
  23800. var anObject = __webpack_require__(27007);
  23801. var Enumerate = function (iterated) {
  23802. this._t = anObject(iterated); // target
  23803. this._i = 0; // next index
  23804. var keys = this._k = []; // keys
  23805. var key;
  23806. for (key in iterated) keys.push(key);
  23807. };
  23808. __webpack_require__(49988)(Enumerate, 'Object', function () {
  23809. var that = this;
  23810. var keys = that._k;
  23811. var key;
  23812. do {
  23813. if (that._i >= keys.length) return { value: undefined, done: true };
  23814. } while (!((key = keys[that._i++]) in that._t));
  23815. return { value: key, done: false };
  23816. });
  23817. $export($export.S, 'Reflect', {
  23818. enumerate: function enumerate(target) {
  23819. return new Enumerate(target);
  23820. }
  23821. });
  23822. /***/ }),
  23823. /***/ 96633:
  23824. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23825. // 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey)
  23826. var gOPD = __webpack_require__(18693);
  23827. var $export = __webpack_require__(42985);
  23828. var anObject = __webpack_require__(27007);
  23829. $export($export.S, 'Reflect', {
  23830. getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) {
  23831. return gOPD.f(anObject(target), propertyKey);
  23832. }
  23833. });
  23834. /***/ }),
  23835. /***/ 68989:
  23836. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23837. // 26.1.8 Reflect.getPrototypeOf(target)
  23838. var $export = __webpack_require__(42985);
  23839. var getProto = __webpack_require__(468);
  23840. var anObject = __webpack_require__(27007);
  23841. $export($export.S, 'Reflect', {
  23842. getPrototypeOf: function getPrototypeOf(target) {
  23843. return getProto(anObject(target));
  23844. }
  23845. });
  23846. /***/ }),
  23847. /***/ 83049:
  23848. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23849. // 26.1.6 Reflect.get(target, propertyKey [, receiver])
  23850. var gOPD = __webpack_require__(18693);
  23851. var getPrototypeOf = __webpack_require__(468);
  23852. var has = __webpack_require__(79181);
  23853. var $export = __webpack_require__(42985);
  23854. var isObject = __webpack_require__(55286);
  23855. var anObject = __webpack_require__(27007);
  23856. function get(target, propertyKey /* , receiver */) {
  23857. var receiver = arguments.length < 3 ? target : arguments[2];
  23858. var desc, proto;
  23859. if (anObject(target) === receiver) return target[propertyKey];
  23860. if (desc = gOPD.f(target, propertyKey)) return has(desc, 'value')
  23861. ? desc.value
  23862. : desc.get !== undefined
  23863. ? desc.get.call(receiver)
  23864. : undefined;
  23865. if (isObject(proto = getPrototypeOf(target))) return get(proto, propertyKey, receiver);
  23866. }
  23867. $export($export.S, 'Reflect', { get: get });
  23868. /***/ }),
  23869. /***/ 78270:
  23870. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23871. // 26.1.9 Reflect.has(target, propertyKey)
  23872. var $export = __webpack_require__(42985);
  23873. $export($export.S, 'Reflect', {
  23874. has: function has(target, propertyKey) {
  23875. return propertyKey in target;
  23876. }
  23877. });
  23878. /***/ }),
  23879. /***/ 64510:
  23880. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23881. // 26.1.10 Reflect.isExtensible(target)
  23882. var $export = __webpack_require__(42985);
  23883. var anObject = __webpack_require__(27007);
  23884. var $isExtensible = Object.isExtensible;
  23885. $export($export.S, 'Reflect', {
  23886. isExtensible: function isExtensible(target) {
  23887. anObject(target);
  23888. return $isExtensible ? $isExtensible(target) : true;
  23889. }
  23890. });
  23891. /***/ }),
  23892. /***/ 73984:
  23893. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23894. // 26.1.11 Reflect.ownKeys(target)
  23895. var $export = __webpack_require__(42985);
  23896. $export($export.S, 'Reflect', { ownKeys: __webpack_require__(57643) });
  23897. /***/ }),
  23898. /***/ 75769:
  23899. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23900. // 26.1.12 Reflect.preventExtensions(target)
  23901. var $export = __webpack_require__(42985);
  23902. var anObject = __webpack_require__(27007);
  23903. var $preventExtensions = Object.preventExtensions;
  23904. $export($export.S, 'Reflect', {
  23905. preventExtensions: function preventExtensions(target) {
  23906. anObject(target);
  23907. try {
  23908. if ($preventExtensions) $preventExtensions(target);
  23909. return true;
  23910. } catch (e) {
  23911. return false;
  23912. }
  23913. }
  23914. });
  23915. /***/ }),
  23916. /***/ 96014:
  23917. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23918. // 26.1.14 Reflect.setPrototypeOf(target, proto)
  23919. var $export = __webpack_require__(42985);
  23920. var setProto = __webpack_require__(27375);
  23921. if (setProto) $export($export.S, 'Reflect', {
  23922. setPrototypeOf: function setPrototypeOf(target, proto) {
  23923. setProto.check(target, proto);
  23924. try {
  23925. setProto.set(target, proto);
  23926. return true;
  23927. } catch (e) {
  23928. return false;
  23929. }
  23930. }
  23931. });
  23932. /***/ }),
  23933. /***/ 50055:
  23934. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23935. // 26.1.13 Reflect.set(target, propertyKey, V [, receiver])
  23936. var dP = __webpack_require__(99275);
  23937. var gOPD = __webpack_require__(18693);
  23938. var getPrototypeOf = __webpack_require__(468);
  23939. var has = __webpack_require__(79181);
  23940. var $export = __webpack_require__(42985);
  23941. var createDesc = __webpack_require__(90681);
  23942. var anObject = __webpack_require__(27007);
  23943. var isObject = __webpack_require__(55286);
  23944. function set(target, propertyKey, V /* , receiver */) {
  23945. var receiver = arguments.length < 4 ? target : arguments[3];
  23946. var ownDesc = gOPD.f(anObject(target), propertyKey);
  23947. var existingDescriptor, proto;
  23948. if (!ownDesc) {
  23949. if (isObject(proto = getPrototypeOf(target))) {
  23950. return set(proto, propertyKey, V, receiver);
  23951. }
  23952. ownDesc = createDesc(0);
  23953. }
  23954. if (has(ownDesc, 'value')) {
  23955. if (ownDesc.writable === false || !isObject(receiver)) return false;
  23956. if (existingDescriptor = gOPD.f(receiver, propertyKey)) {
  23957. if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false;
  23958. existingDescriptor.value = V;
  23959. dP.f(receiver, propertyKey, existingDescriptor);
  23960. } else dP.f(receiver, propertyKey, createDesc(0, V));
  23961. return true;
  23962. }
  23963. return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true);
  23964. }
  23965. $export($export.S, 'Reflect', { set: set });
  23966. /***/ }),
  23967. /***/ 83946:
  23968. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  23969. var global = __webpack_require__(3816);
  23970. var inheritIfRequired = __webpack_require__(40266);
  23971. var dP = (__webpack_require__(99275).f);
  23972. var gOPN = (__webpack_require__(20616).f);
  23973. var isRegExp = __webpack_require__(55364);
  23974. var $flags = __webpack_require__(53218);
  23975. var $RegExp = global.RegExp;
  23976. var Base = $RegExp;
  23977. var proto = $RegExp.prototype;
  23978. var re1 = /a/g;
  23979. var re2 = /a/g;
  23980. // "new" creates a new object, old webkit buggy here
  23981. var CORRECT_NEW = new $RegExp(re1) !== re1;
  23982. if (__webpack_require__(67057) && (!CORRECT_NEW || __webpack_require__(74253)(function () {
  23983. re2[__webpack_require__(86314)('match')] = false;
  23984. // RegExp constructor can alter flags and IsRegExp works correct with @@match
  23985. return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i';
  23986. }))) {
  23987. $RegExp = function RegExp(p, f) {
  23988. var tiRE = this instanceof $RegExp;
  23989. var piRE = isRegExp(p);
  23990. var fiU = f === undefined;
  23991. return !tiRE && piRE && p.constructor === $RegExp && fiU ? p
  23992. : inheritIfRequired(CORRECT_NEW
  23993. ? new Base(piRE && !fiU ? p.source : p, f)
  23994. : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f)
  23995. , tiRE ? this : proto, $RegExp);
  23996. };
  23997. var proxy = function (key) {
  23998. key in $RegExp || dP($RegExp, key, {
  23999. configurable: true,
  24000. get: function () { return Base[key]; },
  24001. set: function (it) { Base[key] = it; }
  24002. });
  24003. };
  24004. for (var keys = gOPN(Base), i = 0; keys.length > i;) proxy(keys[i++]);
  24005. proto.constructor = $RegExp;
  24006. $RegExp.prototype = proto;
  24007. __webpack_require__(77234)(global, 'RegExp', $RegExp);
  24008. }
  24009. __webpack_require__(2974)('RegExp');
  24010. /***/ }),
  24011. /***/ 18269:
  24012. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24013. "use strict";
  24014. var regexpExec = __webpack_require__(21165);
  24015. __webpack_require__(42985)({
  24016. target: 'RegExp',
  24017. proto: true,
  24018. forced: regexpExec !== /./.exec
  24019. }, {
  24020. exec: regexpExec
  24021. });
  24022. /***/ }),
  24023. /***/ 76774:
  24024. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24025. // 21.2.5.3 get RegExp.prototype.flags()
  24026. if (__webpack_require__(67057) && /./g.flags != 'g') (__webpack_require__(99275).f)(RegExp.prototype, 'flags', {
  24027. configurable: true,
  24028. get: __webpack_require__(53218)
  24029. });
  24030. /***/ }),
  24031. /***/ 21466:
  24032. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24033. "use strict";
  24034. var anObject = __webpack_require__(27007);
  24035. var toLength = __webpack_require__(10875);
  24036. var advanceStringIndex = __webpack_require__(76793);
  24037. var regExpExec = __webpack_require__(27787);
  24038. // @@match logic
  24039. __webpack_require__(28082)('match', 1, function (defined, MATCH, $match, maybeCallNative) {
  24040. return [
  24041. // `String.prototype.match` method
  24042. // https://tc39.github.io/ecma262/#sec-string.prototype.match
  24043. function match(regexp) {
  24044. var O = defined(this);
  24045. var fn = regexp == undefined ? undefined : regexp[MATCH];
  24046. return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
  24047. },
  24048. // `RegExp.prototype[@@match]` method
  24049. // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match
  24050. function (regexp) {
  24051. var res = maybeCallNative($match, regexp, this);
  24052. if (res.done) return res.value;
  24053. var rx = anObject(regexp);
  24054. var S = String(this);
  24055. if (!rx.global) return regExpExec(rx, S);
  24056. var fullUnicode = rx.unicode;
  24057. rx.lastIndex = 0;
  24058. var A = [];
  24059. var n = 0;
  24060. var result;
  24061. while ((result = regExpExec(rx, S)) !== null) {
  24062. var matchStr = String(result[0]);
  24063. A[n] = matchStr;
  24064. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  24065. n++;
  24066. }
  24067. return n === 0 ? null : A;
  24068. }
  24069. ];
  24070. });
  24071. /***/ }),
  24072. /***/ 59357:
  24073. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24074. "use strict";
  24075. var anObject = __webpack_require__(27007);
  24076. var toObject = __webpack_require__(20508);
  24077. var toLength = __webpack_require__(10875);
  24078. var toInteger = __webpack_require__(81467);
  24079. var advanceStringIndex = __webpack_require__(76793);
  24080. var regExpExec = __webpack_require__(27787);
  24081. var max = Math.max;
  24082. var min = Math.min;
  24083. var floor = Math.floor;
  24084. var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g;
  24085. var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g;
  24086. var maybeToString = function (it) {
  24087. return it === undefined ? it : String(it);
  24088. };
  24089. // @@replace logic
  24090. __webpack_require__(28082)('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) {
  24091. return [
  24092. // `String.prototype.replace` method
  24093. // https://tc39.github.io/ecma262/#sec-string.prototype.replace
  24094. function replace(searchValue, replaceValue) {
  24095. var O = defined(this);
  24096. var fn = searchValue == undefined ? undefined : searchValue[REPLACE];
  24097. return fn !== undefined
  24098. ? fn.call(searchValue, O, replaceValue)
  24099. : $replace.call(String(O), searchValue, replaceValue);
  24100. },
  24101. // `RegExp.prototype[@@replace]` method
  24102. // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
  24103. function (regexp, replaceValue) {
  24104. var res = maybeCallNative($replace, regexp, this, replaceValue);
  24105. if (res.done) return res.value;
  24106. var rx = anObject(regexp);
  24107. var S = String(this);
  24108. var functionalReplace = typeof replaceValue === 'function';
  24109. if (!functionalReplace) replaceValue = String(replaceValue);
  24110. var global = rx.global;
  24111. if (global) {
  24112. var fullUnicode = rx.unicode;
  24113. rx.lastIndex = 0;
  24114. }
  24115. var results = [];
  24116. while (true) {
  24117. var result = regExpExec(rx, S);
  24118. if (result === null) break;
  24119. results.push(result);
  24120. if (!global) break;
  24121. var matchStr = String(result[0]);
  24122. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  24123. }
  24124. var accumulatedResult = '';
  24125. var nextSourcePosition = 0;
  24126. for (var i = 0; i < results.length; i++) {
  24127. result = results[i];
  24128. var matched = String(result[0]);
  24129. var position = max(min(toInteger(result.index), S.length), 0);
  24130. var captures = [];
  24131. // NOTE: This is equivalent to
  24132. // captures = result.slice(1).map(maybeToString)
  24133. // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
  24134. // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
  24135. // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
  24136. for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
  24137. var namedCaptures = result.groups;
  24138. if (functionalReplace) {
  24139. var replacerArgs = [matched].concat(captures, position, S);
  24140. if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
  24141. var replacement = String(replaceValue.apply(undefined, replacerArgs));
  24142. } else {
  24143. replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
  24144. }
  24145. if (position >= nextSourcePosition) {
  24146. accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
  24147. nextSourcePosition = position + matched.length;
  24148. }
  24149. }
  24150. return accumulatedResult + S.slice(nextSourcePosition);
  24151. }
  24152. ];
  24153. // https://tc39.github.io/ecma262/#sec-getsubstitution
  24154. function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
  24155. var tailPos = position + matched.length;
  24156. var m = captures.length;
  24157. var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
  24158. if (namedCaptures !== undefined) {
  24159. namedCaptures = toObject(namedCaptures);
  24160. symbols = SUBSTITUTION_SYMBOLS;
  24161. }
  24162. return $replace.call(replacement, symbols, function (match, ch) {
  24163. var capture;
  24164. switch (ch.charAt(0)) {
  24165. case '$': return '$';
  24166. case '&': return matched;
  24167. case '`': return str.slice(0, position);
  24168. case "'": return str.slice(tailPos);
  24169. case '<':
  24170. capture = namedCaptures[ch.slice(1, -1)];
  24171. break;
  24172. default: // \d\d?
  24173. var n = +ch;
  24174. if (n === 0) return match;
  24175. if (n > m) {
  24176. var f = floor(n / 10);
  24177. if (f === 0) return match;
  24178. if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
  24179. return match;
  24180. }
  24181. capture = captures[n - 1];
  24182. }
  24183. return capture === undefined ? '' : capture;
  24184. });
  24185. }
  24186. });
  24187. /***/ }),
  24188. /***/ 76142:
  24189. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24190. "use strict";
  24191. var anObject = __webpack_require__(27007);
  24192. var sameValue = __webpack_require__(27195);
  24193. var regExpExec = __webpack_require__(27787);
  24194. // @@search logic
  24195. __webpack_require__(28082)('search', 1, function (defined, SEARCH, $search, maybeCallNative) {
  24196. return [
  24197. // `String.prototype.search` method
  24198. // https://tc39.github.io/ecma262/#sec-string.prototype.search
  24199. function search(regexp) {
  24200. var O = defined(this);
  24201. var fn = regexp == undefined ? undefined : regexp[SEARCH];
  24202. return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
  24203. },
  24204. // `RegExp.prototype[@@search]` method
  24205. // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search
  24206. function (regexp) {
  24207. var res = maybeCallNative($search, regexp, this);
  24208. if (res.done) return res.value;
  24209. var rx = anObject(regexp);
  24210. var S = String(this);
  24211. var previousLastIndex = rx.lastIndex;
  24212. if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
  24213. var result = regExpExec(rx, S);
  24214. if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
  24215. return result === null ? -1 : result.index;
  24216. }
  24217. ];
  24218. });
  24219. /***/ }),
  24220. /***/ 51876:
  24221. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24222. "use strict";
  24223. var isRegExp = __webpack_require__(55364);
  24224. var anObject = __webpack_require__(27007);
  24225. var speciesConstructor = __webpack_require__(58364);
  24226. var advanceStringIndex = __webpack_require__(76793);
  24227. var toLength = __webpack_require__(10875);
  24228. var callRegExpExec = __webpack_require__(27787);
  24229. var regexpExec = __webpack_require__(21165);
  24230. var fails = __webpack_require__(74253);
  24231. var $min = Math.min;
  24232. var $push = [].push;
  24233. var $SPLIT = 'split';
  24234. var LENGTH = 'length';
  24235. var LAST_INDEX = 'lastIndex';
  24236. var MAX_UINT32 = 0xffffffff;
  24237. // babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
  24238. var SUPPORTS_Y = !fails(function () { RegExp(MAX_UINT32, 'y'); });
  24239. // @@split logic
  24240. __webpack_require__(28082)('split', 2, function (defined, SPLIT, $split, maybeCallNative) {
  24241. var internalSplit;
  24242. if (
  24243. 'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||
  24244. 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||
  24245. 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||
  24246. '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||
  24247. '.'[$SPLIT](/()()/)[LENGTH] > 1 ||
  24248. ''[$SPLIT](/.?/)[LENGTH]
  24249. ) {
  24250. // based on es5-shim implementation, need to rework it
  24251. internalSplit = function (separator, limit) {
  24252. var string = String(this);
  24253. if (separator === undefined && limit === 0) return [];
  24254. // If `separator` is not a regex, use native split
  24255. if (!isRegExp(separator)) return $split.call(string, separator, limit);
  24256. var output = [];
  24257. var flags = (separator.ignoreCase ? 'i' : '') +
  24258. (separator.multiline ? 'm' : '') +
  24259. (separator.unicode ? 'u' : '') +
  24260. (separator.sticky ? 'y' : '');
  24261. var lastLastIndex = 0;
  24262. var splitLimit = limit === undefined ? MAX_UINT32 : limit >>> 0;
  24263. // Make `global` and avoid `lastIndex` issues by working with a copy
  24264. var separatorCopy = new RegExp(separator.source, flags + 'g');
  24265. var match, lastIndex, lastLength;
  24266. while (match = regexpExec.call(separatorCopy, string)) {
  24267. lastIndex = separatorCopy[LAST_INDEX];
  24268. if (lastIndex > lastLastIndex) {
  24269. output.push(string.slice(lastLastIndex, match.index));
  24270. if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1));
  24271. lastLength = match[0][LENGTH];
  24272. lastLastIndex = lastIndex;
  24273. if (output[LENGTH] >= splitLimit) break;
  24274. }
  24275. if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop
  24276. }
  24277. if (lastLastIndex === string[LENGTH]) {
  24278. if (lastLength || !separatorCopy.test('')) output.push('');
  24279. } else output.push(string.slice(lastLastIndex));
  24280. return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;
  24281. };
  24282. // Chakra, V8
  24283. } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) {
  24284. internalSplit = function (separator, limit) {
  24285. return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit);
  24286. };
  24287. } else {
  24288. internalSplit = $split;
  24289. }
  24290. return [
  24291. // `String.prototype.split` method
  24292. // https://tc39.github.io/ecma262/#sec-string.prototype.split
  24293. function split(separator, limit) {
  24294. var O = defined(this);
  24295. var splitter = separator == undefined ? undefined : separator[SPLIT];
  24296. return splitter !== undefined
  24297. ? splitter.call(separator, O, limit)
  24298. : internalSplit.call(String(O), separator, limit);
  24299. },
  24300. // `RegExp.prototype[@@split]` method
  24301. // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split
  24302. //
  24303. // NOTE: This cannot be properly polyfilled in engines that don't support
  24304. // the 'y' flag.
  24305. function (regexp, limit) {
  24306. var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split);
  24307. if (res.done) return res.value;
  24308. var rx = anObject(regexp);
  24309. var S = String(this);
  24310. var C = speciesConstructor(rx, RegExp);
  24311. var unicodeMatching = rx.unicode;
  24312. var flags = (rx.ignoreCase ? 'i' : '') +
  24313. (rx.multiline ? 'm' : '') +
  24314. (rx.unicode ? 'u' : '') +
  24315. (SUPPORTS_Y ? 'y' : 'g');
  24316. // ^(? + rx + ) is needed, in combination with some S slicing, to
  24317. // simulate the 'y' flag.
  24318. var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);
  24319. var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
  24320. if (lim === 0) return [];
  24321. if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
  24322. var p = 0;
  24323. var q = 0;
  24324. var A = [];
  24325. while (q < S.length) {
  24326. splitter.lastIndex = SUPPORTS_Y ? q : 0;
  24327. var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q));
  24328. var e;
  24329. if (
  24330. z === null ||
  24331. (e = $min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p
  24332. ) {
  24333. q = advanceStringIndex(S, q, unicodeMatching);
  24334. } else {
  24335. A.push(S.slice(p, q));
  24336. if (A.length === lim) return A;
  24337. for (var i = 1; i <= z.length - 1; i++) {
  24338. A.push(z[i]);
  24339. if (A.length === lim) return A;
  24340. }
  24341. q = p = e;
  24342. }
  24343. }
  24344. A.push(S.slice(p));
  24345. return A;
  24346. }
  24347. ];
  24348. });
  24349. /***/ }),
  24350. /***/ 66108:
  24351. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24352. "use strict";
  24353. __webpack_require__(76774);
  24354. var anObject = __webpack_require__(27007);
  24355. var $flags = __webpack_require__(53218);
  24356. var DESCRIPTORS = __webpack_require__(67057);
  24357. var TO_STRING = 'toString';
  24358. var $toString = /./[TO_STRING];
  24359. var define = function (fn) {
  24360. __webpack_require__(77234)(RegExp.prototype, TO_STRING, fn, true);
  24361. };
  24362. // 21.2.5.14 RegExp.prototype.toString()
  24363. if (__webpack_require__(74253)(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) {
  24364. define(function toString() {
  24365. var R = anObject(this);
  24366. return '/'.concat(R.source, '/',
  24367. 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined);
  24368. });
  24369. // FF44- RegExp#toString has a wrong name
  24370. } else if ($toString.name != TO_STRING) {
  24371. define(function toString() {
  24372. return $toString.call(this);
  24373. });
  24374. }
  24375. /***/ }),
  24376. /***/ 98184:
  24377. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  24378. "use strict";
  24379. var strong = __webpack_require__(9824);
  24380. var validate = __webpack_require__(1616);
  24381. var SET = 'Set';
  24382. // 23.2 Set Objects
  24383. module.exports = __webpack_require__(45795)(SET, function (get) {
  24384. return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
  24385. }, {
  24386. // 23.2.3.1 Set.prototype.add(value)
  24387. add: function add(value) {
  24388. return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value);
  24389. }
  24390. }, strong);
  24391. /***/ }),
  24392. /***/ 40856:
  24393. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24394. "use strict";
  24395. // B.2.3.2 String.prototype.anchor(name)
  24396. __webpack_require__(29395)('anchor', function (createHTML) {
  24397. return function anchor(name) {
  24398. return createHTML(this, 'a', 'name', name);
  24399. };
  24400. });
  24401. /***/ }),
  24402. /***/ 80703:
  24403. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24404. "use strict";
  24405. // B.2.3.3 String.prototype.big()
  24406. __webpack_require__(29395)('big', function (createHTML) {
  24407. return function big() {
  24408. return createHTML(this, 'big', '', '');
  24409. };
  24410. });
  24411. /***/ }),
  24412. /***/ 91539:
  24413. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24414. "use strict";
  24415. // B.2.3.4 String.prototype.blink()
  24416. __webpack_require__(29395)('blink', function (createHTML) {
  24417. return function blink() {
  24418. return createHTML(this, 'blink', '', '');
  24419. };
  24420. });
  24421. /***/ }),
  24422. /***/ 5292:
  24423. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24424. "use strict";
  24425. // B.2.3.5 String.prototype.bold()
  24426. __webpack_require__(29395)('bold', function (createHTML) {
  24427. return function bold() {
  24428. return createHTML(this, 'b', '', '');
  24429. };
  24430. });
  24431. /***/ }),
  24432. /***/ 29539:
  24433. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24434. "use strict";
  24435. var $export = __webpack_require__(42985);
  24436. var $at = __webpack_require__(24496)(false);
  24437. $export($export.P, 'String', {
  24438. // 21.1.3.3 String.prototype.codePointAt(pos)
  24439. codePointAt: function codePointAt(pos) {
  24440. return $at(this, pos);
  24441. }
  24442. });
  24443. /***/ }),
  24444. /***/ 96620:
  24445. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24446. "use strict";
  24447. // 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])
  24448. var $export = __webpack_require__(42985);
  24449. var toLength = __webpack_require__(10875);
  24450. var context = __webpack_require__(42094);
  24451. var ENDS_WITH = 'endsWith';
  24452. var $endsWith = ''[ENDS_WITH];
  24453. $export($export.P + $export.F * __webpack_require__(8852)(ENDS_WITH), 'String', {
  24454. endsWith: function endsWith(searchString /* , endPosition = @length */) {
  24455. var that = context(this, searchString, ENDS_WITH);
  24456. var endPosition = arguments.length > 1 ? arguments[1] : undefined;
  24457. var len = toLength(that.length);
  24458. var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len);
  24459. var search = String(searchString);
  24460. return $endsWith
  24461. ? $endsWith.call(that, search, end)
  24462. : that.slice(end - search.length, end) === search;
  24463. }
  24464. });
  24465. /***/ }),
  24466. /***/ 45177:
  24467. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24468. "use strict";
  24469. // B.2.3.6 String.prototype.fixed()
  24470. __webpack_require__(29395)('fixed', function (createHTML) {
  24471. return function fixed() {
  24472. return createHTML(this, 'tt', '', '');
  24473. };
  24474. });
  24475. /***/ }),
  24476. /***/ 73694:
  24477. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24478. "use strict";
  24479. // B.2.3.7 String.prototype.fontcolor(color)
  24480. __webpack_require__(29395)('fontcolor', function (createHTML) {
  24481. return function fontcolor(color) {
  24482. return createHTML(this, 'font', 'color', color);
  24483. };
  24484. });
  24485. /***/ }),
  24486. /***/ 37648:
  24487. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24488. "use strict";
  24489. // B.2.3.8 String.prototype.fontsize(size)
  24490. __webpack_require__(29395)('fontsize', function (createHTML) {
  24491. return function fontsize(size) {
  24492. return createHTML(this, 'font', 'size', size);
  24493. };
  24494. });
  24495. /***/ }),
  24496. /***/ 50191:
  24497. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24498. var $export = __webpack_require__(42985);
  24499. var toAbsoluteIndex = __webpack_require__(92337);
  24500. var fromCharCode = String.fromCharCode;
  24501. var $fromCodePoint = String.fromCodePoint;
  24502. // length should be 1, old FF problem
  24503. $export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {
  24504. // 21.1.2.2 String.fromCodePoint(...codePoints)
  24505. fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars
  24506. var res = [];
  24507. var aLen = arguments.length;
  24508. var i = 0;
  24509. var code;
  24510. while (aLen > i) {
  24511. code = +arguments[i++];
  24512. if (toAbsoluteIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point');
  24513. res.push(code < 0x10000
  24514. ? fromCharCode(code)
  24515. : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00)
  24516. );
  24517. } return res.join('');
  24518. }
  24519. });
  24520. /***/ }),
  24521. /***/ 62850:
  24522. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24523. "use strict";
  24524. // 21.1.3.7 String.prototype.includes(searchString, position = 0)
  24525. var $export = __webpack_require__(42985);
  24526. var context = __webpack_require__(42094);
  24527. var INCLUDES = 'includes';
  24528. $export($export.P + $export.F * __webpack_require__(8852)(INCLUDES), 'String', {
  24529. includes: function includes(searchString /* , position = 0 */) {
  24530. return !!~context(this, searchString, INCLUDES)
  24531. .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);
  24532. }
  24533. });
  24534. /***/ }),
  24535. /***/ 27795:
  24536. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24537. "use strict";
  24538. // B.2.3.9 String.prototype.italics()
  24539. __webpack_require__(29395)('italics', function (createHTML) {
  24540. return function italics() {
  24541. return createHTML(this, 'i', '', '');
  24542. };
  24543. });
  24544. /***/ }),
  24545. /***/ 39115:
  24546. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24547. "use strict";
  24548. var $at = __webpack_require__(24496)(true);
  24549. // 21.1.3.27 String.prototype[@@iterator]()
  24550. __webpack_require__(42923)(String, 'String', function (iterated) {
  24551. this._t = String(iterated); // target
  24552. this._i = 0; // next index
  24553. // 21.1.5.2.1 %StringIteratorPrototype%.next()
  24554. }, function () {
  24555. var O = this._t;
  24556. var index = this._i;
  24557. var point;
  24558. if (index >= O.length) return { value: undefined, done: true };
  24559. point = $at(O, index);
  24560. this._i += point.length;
  24561. return { value: point, done: false };
  24562. });
  24563. /***/ }),
  24564. /***/ 4531:
  24565. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24566. "use strict";
  24567. // B.2.3.10 String.prototype.link(url)
  24568. __webpack_require__(29395)('link', function (createHTML) {
  24569. return function link(url) {
  24570. return createHTML(this, 'a', 'href', url);
  24571. };
  24572. });
  24573. /***/ }),
  24574. /***/ 98306:
  24575. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24576. var $export = __webpack_require__(42985);
  24577. var toIObject = __webpack_require__(22110);
  24578. var toLength = __webpack_require__(10875);
  24579. $export($export.S, 'String', {
  24580. // 21.1.2.4 String.raw(callSite, ...substitutions)
  24581. raw: function raw(callSite) {
  24582. var tpl = toIObject(callSite.raw);
  24583. var len = toLength(tpl.length);
  24584. var aLen = arguments.length;
  24585. var res = [];
  24586. var i = 0;
  24587. while (len > i) {
  24588. res.push(String(tpl[i++]));
  24589. if (i < aLen) res.push(String(arguments[i]));
  24590. } return res.join('');
  24591. }
  24592. });
  24593. /***/ }),
  24594. /***/ 10823:
  24595. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24596. var $export = __webpack_require__(42985);
  24597. $export($export.P, 'String', {
  24598. // 21.1.3.13 String.prototype.repeat(count)
  24599. repeat: __webpack_require__(68595)
  24600. });
  24601. /***/ }),
  24602. /***/ 23605:
  24603. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24604. "use strict";
  24605. // B.2.3.11 String.prototype.small()
  24606. __webpack_require__(29395)('small', function (createHTML) {
  24607. return function small() {
  24608. return createHTML(this, 'small', '', '');
  24609. };
  24610. });
  24611. /***/ }),
  24612. /***/ 17732:
  24613. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24614. "use strict";
  24615. // 21.1.3.18 String.prototype.startsWith(searchString [, position ])
  24616. var $export = __webpack_require__(42985);
  24617. var toLength = __webpack_require__(10875);
  24618. var context = __webpack_require__(42094);
  24619. var STARTS_WITH = 'startsWith';
  24620. var $startsWith = ''[STARTS_WITH];
  24621. $export($export.P + $export.F * __webpack_require__(8852)(STARTS_WITH), 'String', {
  24622. startsWith: function startsWith(searchString /* , position = 0 */) {
  24623. var that = context(this, searchString, STARTS_WITH);
  24624. var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length));
  24625. var search = String(searchString);
  24626. return $startsWith
  24627. ? $startsWith.call(that, search, index)
  24628. : that.slice(index, index + search.length) === search;
  24629. }
  24630. });
  24631. /***/ }),
  24632. /***/ 6780:
  24633. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24634. "use strict";
  24635. // B.2.3.12 String.prototype.strike()
  24636. __webpack_require__(29395)('strike', function (createHTML) {
  24637. return function strike() {
  24638. return createHTML(this, 'strike', '', '');
  24639. };
  24640. });
  24641. /***/ }),
  24642. /***/ 69937:
  24643. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24644. "use strict";
  24645. // B.2.3.13 String.prototype.sub()
  24646. __webpack_require__(29395)('sub', function (createHTML) {
  24647. return function sub() {
  24648. return createHTML(this, 'sub', '', '');
  24649. };
  24650. });
  24651. /***/ }),
  24652. /***/ 10511:
  24653. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24654. "use strict";
  24655. // B.2.3.14 String.prototype.sup()
  24656. __webpack_require__(29395)('sup', function (createHTML) {
  24657. return function sup() {
  24658. return createHTML(this, 'sup', '', '');
  24659. };
  24660. });
  24661. /***/ }),
  24662. /***/ 64564:
  24663. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24664. "use strict";
  24665. // 21.1.3.25 String.prototype.trim()
  24666. __webpack_require__(29599)('trim', function ($trim) {
  24667. return function trim() {
  24668. return $trim(this, 3);
  24669. };
  24670. });
  24671. /***/ }),
  24672. /***/ 95767:
  24673. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24674. "use strict";
  24675. // ECMAScript 6 symbols shim
  24676. var global = __webpack_require__(3816);
  24677. var has = __webpack_require__(79181);
  24678. var DESCRIPTORS = __webpack_require__(67057);
  24679. var $export = __webpack_require__(42985);
  24680. var redefine = __webpack_require__(77234);
  24681. var META = (__webpack_require__(84728).KEY);
  24682. var $fails = __webpack_require__(74253);
  24683. var shared = __webpack_require__(3825);
  24684. var setToStringTag = __webpack_require__(22943);
  24685. var uid = __webpack_require__(93953);
  24686. var wks = __webpack_require__(86314);
  24687. var wksExt = __webpack_require__(28787);
  24688. var wksDefine = __webpack_require__(36074);
  24689. var enumKeys = __webpack_require__(5541);
  24690. var isArray = __webpack_require__(4302);
  24691. var anObject = __webpack_require__(27007);
  24692. var isObject = __webpack_require__(55286);
  24693. var toObject = __webpack_require__(20508);
  24694. var toIObject = __webpack_require__(22110);
  24695. var toPrimitive = __webpack_require__(21689);
  24696. var createDesc = __webpack_require__(90681);
  24697. var _create = __webpack_require__(42503);
  24698. var gOPNExt = __webpack_require__(39327);
  24699. var $GOPD = __webpack_require__(18693);
  24700. var $GOPS = __webpack_require__(64548);
  24701. var $DP = __webpack_require__(99275);
  24702. var $keys = __webpack_require__(47184);
  24703. var gOPD = $GOPD.f;
  24704. var dP = $DP.f;
  24705. var gOPN = gOPNExt.f;
  24706. var $Symbol = global.Symbol;
  24707. var $JSON = global.JSON;
  24708. var _stringify = $JSON && $JSON.stringify;
  24709. var PROTOTYPE = 'prototype';
  24710. var HIDDEN = wks('_hidden');
  24711. var TO_PRIMITIVE = wks('toPrimitive');
  24712. var isEnum = {}.propertyIsEnumerable;
  24713. var SymbolRegistry = shared('symbol-registry');
  24714. var AllSymbols = shared('symbols');
  24715. var OPSymbols = shared('op-symbols');
  24716. var ObjectProto = Object[PROTOTYPE];
  24717. var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f;
  24718. var QObject = global.QObject;
  24719. // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
  24720. var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
  24721. // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
  24722. var setSymbolDesc = DESCRIPTORS && $fails(function () {
  24723. return _create(dP({}, 'a', {
  24724. get: function () { return dP(this, 'a', { value: 7 }).a; }
  24725. })).a != 7;
  24726. }) ? function (it, key, D) {
  24727. var protoDesc = gOPD(ObjectProto, key);
  24728. if (protoDesc) delete ObjectProto[key];
  24729. dP(it, key, D);
  24730. if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);
  24731. } : dP;
  24732. var wrap = function (tag) {
  24733. var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
  24734. sym._k = tag;
  24735. return sym;
  24736. };
  24737. var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {
  24738. return typeof it == 'symbol';
  24739. } : function (it) {
  24740. return it instanceof $Symbol;
  24741. };
  24742. var $defineProperty = function defineProperty(it, key, D) {
  24743. if (it === ObjectProto) $defineProperty(OPSymbols, key, D);
  24744. anObject(it);
  24745. key = toPrimitive(key, true);
  24746. anObject(D);
  24747. if (has(AllSymbols, key)) {
  24748. if (!D.enumerable) {
  24749. if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));
  24750. it[HIDDEN][key] = true;
  24751. } else {
  24752. if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;
  24753. D = _create(D, { enumerable: createDesc(0, false) });
  24754. } return setSymbolDesc(it, key, D);
  24755. } return dP(it, key, D);
  24756. };
  24757. var $defineProperties = function defineProperties(it, P) {
  24758. anObject(it);
  24759. var keys = enumKeys(P = toIObject(P));
  24760. var i = 0;
  24761. var l = keys.length;
  24762. var key;
  24763. while (l > i) $defineProperty(it, key = keys[i++], P[key]);
  24764. return it;
  24765. };
  24766. var $create = function create(it, P) {
  24767. return P === undefined ? _create(it) : $defineProperties(_create(it), P);
  24768. };
  24769. var $propertyIsEnumerable = function propertyIsEnumerable(key) {
  24770. var E = isEnum.call(this, key = toPrimitive(key, true));
  24771. if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;
  24772. return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
  24773. };
  24774. var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
  24775. it = toIObject(it);
  24776. key = toPrimitive(key, true);
  24777. if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;
  24778. var D = gOPD(it, key);
  24779. if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
  24780. return D;
  24781. };
  24782. var $getOwnPropertyNames = function getOwnPropertyNames(it) {
  24783. var names = gOPN(toIObject(it));
  24784. var result = [];
  24785. var i = 0;
  24786. var key;
  24787. while (names.length > i) {
  24788. if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);
  24789. } return result;
  24790. };
  24791. var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
  24792. var IS_OP = it === ObjectProto;
  24793. var names = gOPN(IS_OP ? OPSymbols : toIObject(it));
  24794. var result = [];
  24795. var i = 0;
  24796. var key;
  24797. while (names.length > i) {
  24798. if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);
  24799. } return result;
  24800. };
  24801. // 19.4.1.1 Symbol([description])
  24802. if (!USE_NATIVE) {
  24803. $Symbol = function Symbol() {
  24804. if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');
  24805. var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
  24806. var $set = function (value) {
  24807. if (this === ObjectProto) $set.call(OPSymbols, value);
  24808. if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
  24809. setSymbolDesc(this, tag, createDesc(1, value));
  24810. };
  24811. if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });
  24812. return wrap(tag);
  24813. };
  24814. redefine($Symbol[PROTOTYPE], 'toString', function toString() {
  24815. return this._k;
  24816. });
  24817. $GOPD.f = $getOwnPropertyDescriptor;
  24818. $DP.f = $defineProperty;
  24819. (__webpack_require__(20616).f) = gOPNExt.f = $getOwnPropertyNames;
  24820. (__webpack_require__(14682).f) = $propertyIsEnumerable;
  24821. $GOPS.f = $getOwnPropertySymbols;
  24822. if (DESCRIPTORS && !__webpack_require__(4461)) {
  24823. redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
  24824. }
  24825. wksExt.f = function (name) {
  24826. return wrap(wks(name));
  24827. };
  24828. }
  24829. $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });
  24830. for (var es6Symbols = (
  24831. // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
  24832. 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
  24833. ).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);
  24834. for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);
  24835. $export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
  24836. // 19.4.2.1 Symbol.for(key)
  24837. 'for': function (key) {
  24838. return has(SymbolRegistry, key += '')
  24839. ? SymbolRegistry[key]
  24840. : SymbolRegistry[key] = $Symbol(key);
  24841. },
  24842. // 19.4.2.5 Symbol.keyFor(sym)
  24843. keyFor: function keyFor(sym) {
  24844. if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');
  24845. for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;
  24846. },
  24847. useSetter: function () { setter = true; },
  24848. useSimple: function () { setter = false; }
  24849. });
  24850. $export($export.S + $export.F * !USE_NATIVE, 'Object', {
  24851. // 19.1.2.2 Object.create(O [, Properties])
  24852. create: $create,
  24853. // 19.1.2.4 Object.defineProperty(O, P, Attributes)
  24854. defineProperty: $defineProperty,
  24855. // 19.1.2.3 Object.defineProperties(O, Properties)
  24856. defineProperties: $defineProperties,
  24857. // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
  24858. getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
  24859. // 19.1.2.7 Object.getOwnPropertyNames(O)
  24860. getOwnPropertyNames: $getOwnPropertyNames,
  24861. // 19.1.2.8 Object.getOwnPropertySymbols(O)
  24862. getOwnPropertySymbols: $getOwnPropertySymbols
  24863. });
  24864. // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
  24865. // https://bugs.chromium.org/p/v8/issues/detail?id=3443
  24866. var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); });
  24867. $export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', {
  24868. getOwnPropertySymbols: function getOwnPropertySymbols(it) {
  24869. return $GOPS.f(toObject(it));
  24870. }
  24871. });
  24872. // 24.3.2 JSON.stringify(value [, replacer [, space]])
  24873. $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
  24874. var S = $Symbol();
  24875. // MS Edge converts symbol values to JSON as {}
  24876. // WebKit converts symbol values to JSON as null
  24877. // V8 throws on boxed symbols
  24878. return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';
  24879. })), 'JSON', {
  24880. stringify: function stringify(it) {
  24881. var args = [it];
  24882. var i = 1;
  24883. var replacer, $replacer;
  24884. while (arguments.length > i) args.push(arguments[i++]);
  24885. $replacer = replacer = args[1];
  24886. if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
  24887. if (!isArray(replacer)) replacer = function (key, value) {
  24888. if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
  24889. if (!isSymbol(value)) return value;
  24890. };
  24891. args[1] = replacer;
  24892. return _stringify.apply($JSON, args);
  24893. }
  24894. });
  24895. // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
  24896. $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(87728)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
  24897. // 19.4.3.5 Symbol.prototype[@@toStringTag]
  24898. setToStringTag($Symbol, 'Symbol');
  24899. // 20.2.1.9 Math[@@toStringTag]
  24900. setToStringTag(Math, 'Math', true);
  24901. // 24.3.3 JSON[@@toStringTag]
  24902. setToStringTag(global.JSON, 'JSON', true);
  24903. /***/ }),
  24904. /***/ 30142:
  24905. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24906. "use strict";
  24907. var $export = __webpack_require__(42985);
  24908. var $typed = __webpack_require__(89383);
  24909. var buffer = __webpack_require__(91125);
  24910. var anObject = __webpack_require__(27007);
  24911. var toAbsoluteIndex = __webpack_require__(92337);
  24912. var toLength = __webpack_require__(10875);
  24913. var isObject = __webpack_require__(55286);
  24914. var ArrayBuffer = (__webpack_require__(3816).ArrayBuffer);
  24915. var speciesConstructor = __webpack_require__(58364);
  24916. var $ArrayBuffer = buffer.ArrayBuffer;
  24917. var $DataView = buffer.DataView;
  24918. var $isView = $typed.ABV && ArrayBuffer.isView;
  24919. var $slice = $ArrayBuffer.prototype.slice;
  24920. var VIEW = $typed.VIEW;
  24921. var ARRAY_BUFFER = 'ArrayBuffer';
  24922. $export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { ArrayBuffer: $ArrayBuffer });
  24923. $export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, {
  24924. // 24.1.3.1 ArrayBuffer.isView(arg)
  24925. isView: function isView(it) {
  24926. return $isView && $isView(it) || isObject(it) && VIEW in it;
  24927. }
  24928. });
  24929. $export($export.P + $export.U + $export.F * __webpack_require__(74253)(function () {
  24930. return !new $ArrayBuffer(2).slice(1, undefined).byteLength;
  24931. }), ARRAY_BUFFER, {
  24932. // 24.1.4.3 ArrayBuffer.prototype.slice(start, end)
  24933. slice: function slice(start, end) {
  24934. if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix
  24935. var len = anObject(this).byteLength;
  24936. var first = toAbsoluteIndex(start, len);
  24937. var fin = toAbsoluteIndex(end === undefined ? len : end, len);
  24938. var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first));
  24939. var viewS = new $DataView(this);
  24940. var viewT = new $DataView(result);
  24941. var index = 0;
  24942. while (first < fin) {
  24943. viewT.setUint8(index++, viewS.getUint8(first++));
  24944. } return result;
  24945. }
  24946. });
  24947. __webpack_require__(2974)(ARRAY_BUFFER);
  24948. /***/ }),
  24949. /***/ 1786:
  24950. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24951. var $export = __webpack_require__(42985);
  24952. $export($export.G + $export.W + $export.F * !(__webpack_require__(89383).ABV), {
  24953. DataView: (__webpack_require__(91125).DataView)
  24954. });
  24955. /***/ }),
  24956. /***/ 70162:
  24957. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24958. __webpack_require__(78440)('Float32', 4, function (init) {
  24959. return function Float32Array(data, byteOffset, length) {
  24960. return init(this, data, byteOffset, length);
  24961. };
  24962. });
  24963. /***/ }),
  24964. /***/ 33834:
  24965. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24966. __webpack_require__(78440)('Float64', 8, function (init) {
  24967. return function Float64Array(data, byteOffset, length) {
  24968. return init(this, data, byteOffset, length);
  24969. };
  24970. });
  24971. /***/ }),
  24972. /***/ 74821:
  24973. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24974. __webpack_require__(78440)('Int16', 2, function (init) {
  24975. return function Int16Array(data, byteOffset, length) {
  24976. return init(this, data, byteOffset, length);
  24977. };
  24978. });
  24979. /***/ }),
  24980. /***/ 81303:
  24981. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24982. __webpack_require__(78440)('Int32', 4, function (init) {
  24983. return function Int32Array(data, byteOffset, length) {
  24984. return init(this, data, byteOffset, length);
  24985. };
  24986. });
  24987. /***/ }),
  24988. /***/ 75368:
  24989. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24990. __webpack_require__(78440)('Int8', 1, function (init) {
  24991. return function Int8Array(data, byteOffset, length) {
  24992. return init(this, data, byteOffset, length);
  24993. };
  24994. });
  24995. /***/ }),
  24996. /***/ 79103:
  24997. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  24998. __webpack_require__(78440)('Uint16', 2, function (init) {
  24999. return function Uint16Array(data, byteOffset, length) {
  25000. return init(this, data, byteOffset, length);
  25001. };
  25002. });
  25003. /***/ }),
  25004. /***/ 83318:
  25005. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  25006. __webpack_require__(78440)('Uint32', 4, function (init) {
  25007. return function Uint32Array(data, byteOffset, length) {
  25008. return init(this, data, byteOffset, length);
  25009. };
  25010. });
  25011. /***/ }),
  25012. /***/ 46964:
  25013. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  25014. __webpack_require__(78440)('Uint8', 1, function (init) {
  25015. return function Uint8Array(data, byteOffset, length) {
  25016. return init(this, data, byteOffset, length);
  25017. };
  25018. });
  25019. /***/ }),
  25020. /***/ 62152:
  25021. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  25022. __webpack_require__(78440)('Uint8', 1, function (init) {
  25023. return function Uint8ClampedArray(data, byteOffset, length) {
  25024. return init(this, data, byteOffset, length);
  25025. };
  25026. }, true);
  25027. /***/ }),
  25028. /***/ 30147:
  25029. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  25030. "use strict";
  25031. var global = __webpack_require__(3816);
  25032. var each = __webpack_require__(10050)(0);
  25033. var redefine = __webpack_require__(77234);
  25034. var meta = __webpack_require__(84728);
  25035. var assign = __webpack_require__(35345);
  25036. var weak = __webpack_require__(23657);
  25037. var isObject = __webpack_require__(55286);
  25038. var validate = __webpack_require__(1616);
  25039. var NATIVE_WEAK_MAP = __webpack_require__(1616);
  25040. var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global;
  25041. var WEAK_MAP = 'WeakMap';
  25042. var getWeak = meta.getWeak;
  25043. var isExtensible = Object.isExtensible;
  25044. var uncaughtFrozenStore = weak.ufstore;
  25045. var InternalMap;
  25046. var wrapper = function (get) {
  25047. return function WeakMap() {
  25048. return get(this, arguments.length > 0 ? arguments[0] : undefined);
  25049. };
  25050. };
  25051. var methods = {
  25052. // 23.3.3.3 WeakMap.prototype.get(key)
  25053. get: function get(key) {
  25054. if (isObject(key)) {
  25055. var data = getWeak(key);
  25056. if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key);
  25057. return data ? data[this._i] : undefined;
  25058. }
  25059. },
  25060. // 23.3.3.5 WeakMap.prototype.set(key, value)
  25061. set: function set(key, value) {
  25062. return weak.def(validate(this, WEAK_MAP), key, value);
  25063. }
  25064. };
  25065. // 23.3 WeakMap Objects
  25066. var $WeakMap = module.exports = __webpack_require__(45795)(WEAK_MAP, wrapper, methods, weak, true, true);
  25067. // IE11 WeakMap frozen keys fix
  25068. if (NATIVE_WEAK_MAP && IS_IE11) {
  25069. InternalMap = weak.getConstructor(wrapper, WEAK_MAP);
  25070. assign(InternalMap.prototype, methods);
  25071. meta.NEED = true;
  25072. each(['delete', 'has', 'get', 'set'], function (key) {
  25073. var proto = $WeakMap.prototype;
  25074. var method = proto[key];
  25075. redefine(proto, key, function (a, b) {
  25076. // store frozen objects on internal weakmap shim
  25077. if (isObject(a) && !isExtensible(a)) {
  25078. if (!this._f) this._f = new InternalMap();
  25079. var result = this._f[key](a, b);
  25080. return key == 'set' ? this : result;
  25081. // store all the rest on native weakmap
  25082. } return method.call(this, a, b);
  25083. });
  25084. });
  25085. }
  25086. /***/ }),
  25087. /***/ 59192:
  25088. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  25089. "use strict";
  25090. var weak = __webpack_require__(23657);
  25091. var validate = __webpack_require__(1616);
  25092. var WEAK_SET = 'WeakSet';
  25093. // 23.4 WeakSet Objects
  25094. __webpack_require__(45795)(WEAK_SET, function (get) {
  25095. return function WeakSet() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
  25096. }, {
  25097. // 23.4.3.1 WeakSet.prototype.add(value)
  25098. add: function add(value) {
  25099. return weak.def(validate(this, WEAK_SET), value, true);
  25100. }
  25101. }, weak, false, true);
  25102. /***/ }),
  25103. /***/ 1268:
  25104. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  25105. "use strict";
  25106. // https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap
  25107. var $export = __webpack_require__(42985);
  25108. var flattenIntoArray = __webpack_require__(13325);
  25109. var toObject = __webpack_require__(20508);
  25110. var toLength = __webpack_require__(10875);
  25111. var aFunction = __webpack_require__(24963);
  25112. var arraySpeciesCreate = __webpack_require__(16886);
  25113. $export($export.P, 'Array', {
  25114. flatMap: function flatMap(callbackfn /* , thisArg */) {
  25115. var O = toObject(this);
  25116. var sourceLen, A;
  25117. aFunction(callbackfn);
  25118. sourceLen = toLength(O.length);
  25119. A = arraySpeciesCreate(O, 0);
  25120. flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments[1]);
  25121. return A;
  25122. }
  25123. });
  25124. __webpack_require__(17722)('flatMap');
  25125. /***/ }),
  25126. /***/ 62773:
  25127. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  25128. "use strict";
  25129. // https://github.com/tc39/Array.prototype.includes
  25130. var $export = __webpack_require__(42985);
  25131. var $includes = __webpack_require__(79315)(true);
  25132. $export($export.P, 'Array', {
  25133. includes: function includes(el /* , fromIndex = 0 */) {
  25134. return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  25135. }
  25136. });
  25137. __webpack_require__(17722)('includes');
  25138. /***/ }),
  25139. /***/ 83276:
  25140. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  25141. // https://github.com/tc39/proposal-object-values-entries
  25142. var $export = __webpack_require__(42985);
  25143. var $entries = __webpack_require__(51131)(true);
  25144. $export($export.S, 'Object', {
  25145. entries: function entries(it) {
  25146. return $entries(it);
  25147. }
  25148. });
  25149. /***/ }),
  25150. /***/ 98351:
  25151. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  25152. // https://github.com/tc39/proposal-object-getownpropertydescriptors
  25153. var $export = __webpack_require__(42985);
  25154. var ownKeys = __webpack_require__(57643);
  25155. var toIObject = __webpack_require__(22110);
  25156. var gOPD = __webpack_require__(18693);
  25157. var createProperty = __webpack_require__(92811);
  25158. $export($export.S, 'Object', {
  25159. getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
  25160. var O = toIObject(object);
  25161. var getDesc = gOPD.f;
  25162. var keys = ownKeys(O);
  25163. var result = {};
  25164. var i = 0;
  25165. var key, desc;
  25166. while (keys.length > i) {
  25167. desc = getDesc(O, key = keys[i++]);
  25168. if (desc !== undefined) createProperty(result, key, desc);
  25169. }
  25170. return result;
  25171. }
  25172. });
  25173. /***/ }),
  25174. /***/ 96409:
  25175. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  25176. // https://github.com/tc39/proposal-object-values-entries
  25177. var $export = __webpack_require__(42985);
  25178. var $values = __webpack_require__(51131)(false);
  25179. $export($export.S, 'Object', {
  25180. values: function values(it) {
  25181. return $values(it);
  25182. }
  25183. });
  25184. /***/ }),
  25185. /***/ 9865:
  25186. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  25187. "use strict";
  25188. // https://github.com/tc39/proposal-promise-finally
  25189. var $export = __webpack_require__(42985);
  25190. var core = __webpack_require__(25645);
  25191. var global = __webpack_require__(3816);
  25192. var speciesConstructor = __webpack_require__(58364);
  25193. var promiseResolve = __webpack_require__(50094);
  25194. $export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) {
  25195. var C = speciesConstructor(this, core.Promise || global.Promise);
  25196. var isFunction = typeof onFinally == 'function';
  25197. return this.then(
  25198. isFunction ? function (x) {
  25199. return promiseResolve(C, onFinally()).then(function () { return x; });
  25200. } : onFinally,
  25201. isFunction ? function (e) {
  25202. return promiseResolve(C, onFinally()).then(function () { throw e; });
  25203. } : onFinally
  25204. );
  25205. } });
  25206. /***/ }),
  25207. /***/ 92770:
  25208. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  25209. "use strict";
  25210. // https://github.com/tc39/proposal-string-pad-start-end
  25211. var $export = __webpack_require__(42985);
  25212. var $pad = __webpack_require__(75442);
  25213. var userAgent = __webpack_require__(30575);
  25214. // https://github.com/zloirock/core-js/issues/280
  25215. var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent);
  25216. $export($export.P + $export.F * WEBKIT_BUG, 'String', {
  25217. padEnd: function padEnd(maxLength /* , fillString = ' ' */) {
  25218. return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);
  25219. }
  25220. });
  25221. /***/ }),
  25222. /***/ 41784:
  25223. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  25224. "use strict";
  25225. // https://github.com/tc39/proposal-string-pad-start-end
  25226. var $export = __webpack_require__(42985);
  25227. var $pad = __webpack_require__(75442);
  25228. var userAgent = __webpack_require__(30575);
  25229. // https://github.com/zloirock/core-js/issues/280
  25230. var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent);
  25231. $export($export.P + $export.F * WEBKIT_BUG, 'String', {
  25232. padStart: function padStart(maxLength /* , fillString = ' ' */) {
  25233. return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);
  25234. }
  25235. });
  25236. /***/ }),
  25237. /***/ 65869:
  25238. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  25239. "use strict";
  25240. // https://github.com/sebmarkbage/ecmascript-string-left-right-trim
  25241. __webpack_require__(29599)('trimLeft', function ($trim) {
  25242. return function trimLeft() {
  25243. return $trim(this, 1);
  25244. };
  25245. }, 'trimStart');
  25246. /***/ }),
  25247. /***/ 94325:
  25248. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  25249. "use strict";
  25250. // https://github.com/sebmarkbage/ecmascript-string-left-right-trim
  25251. __webpack_require__(29599)('trimRight', function ($trim) {
  25252. return function trimRight() {
  25253. return $trim(this, 2);
  25254. };
  25255. }, 'trimEnd');
  25256. /***/ }),
  25257. /***/ 79665:
  25258. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  25259. __webpack_require__(36074)('asyncIterator');
  25260. /***/ }),
  25261. /***/ 91181:
  25262. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  25263. var $iterators = __webpack_require__(56997);
  25264. var getKeys = __webpack_require__(47184);
  25265. var redefine = __webpack_require__(77234);
  25266. var global = __webpack_require__(3816);
  25267. var hide = __webpack_require__(87728);
  25268. var Iterators = __webpack_require__(87234);
  25269. var wks = __webpack_require__(86314);
  25270. var ITERATOR = wks('iterator');
  25271. var TO_STRING_TAG = wks('toStringTag');
  25272. var ArrayValues = Iterators.Array;
  25273. var DOMIterables = {
  25274. CSSRuleList: true, // TODO: Not spec compliant, should be false.
  25275. CSSStyleDeclaration: false,
  25276. CSSValueList: false,
  25277. ClientRectList: false,
  25278. DOMRectList: false,
  25279. DOMStringList: false,
  25280. DOMTokenList: true,
  25281. DataTransferItemList: false,
  25282. FileList: false,
  25283. HTMLAllCollection: false,
  25284. HTMLCollection: false,
  25285. HTMLFormElement: false,
  25286. HTMLSelectElement: false,
  25287. MediaList: true, // TODO: Not spec compliant, should be false.
  25288. MimeTypeArray: false,
  25289. NamedNodeMap: false,
  25290. NodeList: true,
  25291. PaintRequestList: false,
  25292. Plugin: false,
  25293. PluginArray: false,
  25294. SVGLengthList: false,
  25295. SVGNumberList: false,
  25296. SVGPathSegList: false,
  25297. SVGPointList: false,
  25298. SVGStringList: false,
  25299. SVGTransformList: false,
  25300. SourceBufferList: false,
  25301. StyleSheetList: true, // TODO: Not spec compliant, should be false.
  25302. TextTrackCueList: false,
  25303. TextTrackList: false,
  25304. TouchList: false
  25305. };
  25306. for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {
  25307. var NAME = collections[i];
  25308. var explicit = DOMIterables[NAME];
  25309. var Collection = global[NAME];
  25310. var proto = Collection && Collection.prototype;
  25311. var key;
  25312. if (proto) {
  25313. if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);
  25314. if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
  25315. Iterators[NAME] = ArrayValues;
  25316. if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);
  25317. }
  25318. }
  25319. /***/ }),
  25320. /***/ 84633:
  25321. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  25322. var $export = __webpack_require__(42985);
  25323. var $task = __webpack_require__(74193);
  25324. $export($export.G + $export.B, {
  25325. setImmediate: $task.set,
  25326. clearImmediate: $task.clear
  25327. });
  25328. /***/ }),
  25329. /***/ 32564:
  25330. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  25331. // ie9- setTimeout & setInterval additional parameters fix
  25332. var global = __webpack_require__(3816);
  25333. var $export = __webpack_require__(42985);
  25334. var userAgent = __webpack_require__(30575);
  25335. var slice = [].slice;
  25336. var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check
  25337. var wrap = function (set) {
  25338. return function (fn, time /* , ...args */) {
  25339. var boundArgs = arguments.length > 2;
  25340. var args = boundArgs ? slice.call(arguments, 2) : false;
  25341. return set(boundArgs ? function () {
  25342. // eslint-disable-next-line no-new-func
  25343. (typeof fn == 'function' ? fn : Function(fn)).apply(this, args);
  25344. } : fn, time);
  25345. };
  25346. };
  25347. $export($export.G + $export.B + $export.F * MSIE, {
  25348. setTimeout: wrap(global.setTimeout),
  25349. setInterval: wrap(global.setInterval)
  25350. });
  25351. /***/ }),
  25352. /***/ 96337:
  25353. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  25354. __webpack_require__(32564);
  25355. __webpack_require__(84633);
  25356. __webpack_require__(91181);
  25357. module.exports = __webpack_require__(25645);
  25358. /***/ }),
  25359. /***/ 39735:
  25360. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  25361. "use strict";
  25362. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  25363. /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
  25364. /* harmony export */ });
  25365. /* harmony import */ var _css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8081);
  25366. /* harmony import */ var _css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
  25367. /* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23645);
  25368. /* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
  25369. /* harmony import */ var _css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(61667);
  25370. /* harmony import */ var _css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2__);
  25371. // Imports
  25372. var ___CSS_LOADER_URL_IMPORT_0___ = new URL(/* asset import */ __webpack_require__(17735), __webpack_require__.b);
  25373. var ___CSS_LOADER_URL_IMPORT_1___ = new URL(/* asset import */ __webpack_require__(56089), __webpack_require__.b);
  25374. var ___CSS_LOADER_URL_IMPORT_2___ = new URL(/* asset import */ __webpack_require__(46050), __webpack_require__.b);
  25375. var ___CSS_LOADER_URL_IMPORT_3___ = new URL(/* asset import */ __webpack_require__(71090), __webpack_require__.b);
  25376. var ___CSS_LOADER_URL_IMPORT_4___ = new URL(/* asset import */ __webpack_require__(96192), __webpack_require__.b);
  25377. var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
  25378. var ___CSS_LOADER_URL_REPLACEMENT_0___ = _css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_0___);
  25379. var ___CSS_LOADER_URL_REPLACEMENT_1___ = _css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_1___);
  25380. var ___CSS_LOADER_URL_REPLACEMENT_2___ = _css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_2___);
  25381. var ___CSS_LOADER_URL_REPLACEMENT_3___ = _css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_3___);
  25382. var ___CSS_LOADER_URL_REPLACEMENT_4___ = _css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_4___);
  25383. // Module
  25384. ___CSS_LOADER_EXPORT___.push([module.id, "/* The lint marker gutter */\n.CodeMirror-lint-markers {\n width: 16px;\n}\n\n.CodeMirror-lint-tooltip {\n background-color: #ffd;\n border: 1px solid black;\n border-radius: 4px 4px 4px 4px;\n color: black;\n font-family: monospace;\n font-size: 10pt;\n overflow: hidden;\n padding: 2px 5px;\n position: fixed;\n white-space: pre;\n white-space: pre-wrap;\n z-index: 100;\n max-width: 600px;\n opacity: 0;\n transition: opacity .4s;\n -moz-transition: opacity .4s;\n -webkit-transition: opacity .4s;\n -o-transition: opacity .4s;\n -ms-transition: opacity .4s;\n}\n\n.CodeMirror-lint-mark {\n background-position: left bottom;\n background-repeat: repeat-x;\n}\n\n.CodeMirror-lint-mark-warning {\n background-image: url(" + ___CSS_LOADER_URL_REPLACEMENT_0___ + ");\n}\n\n.CodeMirror-lint-mark-error {\n background-image: url(" + ___CSS_LOADER_URL_REPLACEMENT_1___ + ");\n}\n\n.CodeMirror-lint-marker {\n background-position: center center;\n background-repeat: no-repeat;\n cursor: pointer;\n display: inline-block;\n height: 16px;\n width: 16px;\n vertical-align: middle;\n position: relative;\n}\n\n.CodeMirror-lint-message {\n padding-left: 18px;\n background-position: top left;\n background-repeat: no-repeat;\n}\n\n.CodeMirror-lint-marker-warning, .CodeMirror-lint-message-warning {\n background-image: url(" + ___CSS_LOADER_URL_REPLACEMENT_2___ + ");\n}\n\n.CodeMirror-lint-marker-error, .CodeMirror-lint-message-error {\n background-image: url(" + ___CSS_LOADER_URL_REPLACEMENT_3___ + ");\n}\n\n.CodeMirror-lint-marker-multiple {\n background-image: url(" + ___CSS_LOADER_URL_REPLACEMENT_4___ + ");\n background-repeat: no-repeat;\n background-position: right bottom;\n width: 100%; height: 100%;\n}\n\n.CodeMirror-lint-line-error {\n background-color: rgba(183, 76, 81, 0.08);\n}\n\n.CodeMirror-lint-line-warning {\n background-color: rgba(255, 211, 0, 0.1);\n}\n", ""]);
  25385. // Exports
  25386. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
  25387. /***/ }),
  25388. /***/ 23645:
  25389. /***/ ((module) => {
  25390. "use strict";
  25391. /*
  25392. MIT License http://www.opensource.org/licenses/mit-license.php
  25393. Author Tobias Koppers @sokra
  25394. */
  25395. module.exports = function (cssWithMappingToString) {
  25396. var list = []; // return the list of modules as css string
  25397. list.toString = function toString() {
  25398. return this.map(function (item) {
  25399. var content = "";
  25400. var needLayer = typeof item[5] !== "undefined";
  25401. if (item[4]) {
  25402. content += "@supports (".concat(item[4], ") {");
  25403. }
  25404. if (item[2]) {
  25405. content += "@media ".concat(item[2], " {");
  25406. }
  25407. if (needLayer) {
  25408. content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {");
  25409. }
  25410. content += cssWithMappingToString(item);
  25411. if (needLayer) {
  25412. content += "}";
  25413. }
  25414. if (item[2]) {
  25415. content += "}";
  25416. }
  25417. if (item[4]) {
  25418. content += "}";
  25419. }
  25420. return content;
  25421. }).join("");
  25422. }; // import a list of modules into the list
  25423. list.i = function i(modules, media, dedupe, supports, layer) {
  25424. if (typeof modules === "string") {
  25425. modules = [[null, modules, undefined]];
  25426. }
  25427. var alreadyImportedModules = {};
  25428. if (dedupe) {
  25429. for (var k = 0; k < this.length; k++) {
  25430. var id = this[k][0];
  25431. if (id != null) {
  25432. alreadyImportedModules[id] = true;
  25433. }
  25434. }
  25435. }
  25436. for (var _k = 0; _k < modules.length; _k++) {
  25437. var item = [].concat(modules[_k]);
  25438. if (dedupe && alreadyImportedModules[item[0]]) {
  25439. continue;
  25440. }
  25441. if (typeof layer !== "undefined") {
  25442. if (typeof item[5] === "undefined") {
  25443. item[5] = layer;
  25444. } else {
  25445. item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}");
  25446. item[5] = layer;
  25447. }
  25448. }
  25449. if (media) {
  25450. if (!item[2]) {
  25451. item[2] = media;
  25452. } else {
  25453. item[1] = "@media ".concat(item[2], " {").concat(item[1], "}");
  25454. item[2] = media;
  25455. }
  25456. }
  25457. if (supports) {
  25458. if (!item[4]) {
  25459. item[4] = "".concat(supports);
  25460. } else {
  25461. item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}");
  25462. item[4] = supports;
  25463. }
  25464. }
  25465. list.push(item);
  25466. }
  25467. };
  25468. return list;
  25469. };
  25470. /***/ }),
  25471. /***/ 61667:
  25472. /***/ ((module) => {
  25473. "use strict";
  25474. module.exports = function (url, options) {
  25475. if (!options) {
  25476. options = {};
  25477. }
  25478. if (!url) {
  25479. return url;
  25480. }
  25481. url = String(url.__esModule ? url.default : url); // If url is already wrapped in quotes, remove them
  25482. if (/^['"].*['"]$/.test(url)) {
  25483. url = url.slice(1, -1);
  25484. }
  25485. if (options.hash) {
  25486. url += options.hash;
  25487. } // Should url be wrapped?
  25488. // See https://drafts.csswg.org/css-values-3/#urls
  25489. if (/["'() \t\n]|(%20)/.test(url) || options.needQuotes) {
  25490. return "\"".concat(url.replace(/"/g, '\\"').replace(/\n/g, "\\n"), "\"");
  25491. }
  25492. return url;
  25493. };
  25494. /***/ }),
  25495. /***/ 8081:
  25496. /***/ ((module) => {
  25497. "use strict";
  25498. module.exports = function (i) {
  25499. return i[1];
  25500. };
  25501. /***/ }),
  25502. /***/ 20296:
  25503. /***/ ((module) => {
  25504. /**
  25505. * Returns a function, that, as long as it continues to be invoked, will not
  25506. * be triggered. The function will be called after it stops being called for
  25507. * N milliseconds. If `immediate` is passed, trigger the function on the
  25508. * leading edge, instead of the trailing. The function also has a property 'clear'
  25509. * that is a function which will clear the timer to prevent previously scheduled executions.
  25510. *
  25511. * @source underscore.js
  25512. * @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/
  25513. * @param {Function} function to wrap
  25514. * @param {Number} timeout in ms (`100`)
  25515. * @param {Boolean} whether to execute at the beginning (`false`)
  25516. * @api public
  25517. */
  25518. function debounce(func, wait, immediate){
  25519. var timeout, args, context, timestamp, result;
  25520. if (null == wait) wait = 100;
  25521. function later() {
  25522. var last = Date.now() - timestamp;
  25523. if (last < wait && last >= 0) {
  25524. timeout = setTimeout(later, wait - last);
  25525. } else {
  25526. timeout = null;
  25527. if (!immediate) {
  25528. result = func.apply(context, args);
  25529. context = args = null;
  25530. }
  25531. }
  25532. };
  25533. var debounced = function(){
  25534. context = this;
  25535. args = arguments;
  25536. timestamp = Date.now();
  25537. var callNow = immediate && !timeout;
  25538. if (!timeout) timeout = setTimeout(later, wait);
  25539. if (callNow) {
  25540. result = func.apply(context, args);
  25541. context = args = null;
  25542. }
  25543. return result;
  25544. };
  25545. debounced.clear = function() {
  25546. if (timeout) {
  25547. clearTimeout(timeout);
  25548. timeout = null;
  25549. }
  25550. };
  25551. debounced.flush = function() {
  25552. if (timeout) {
  25553. result = func.apply(context, args);
  25554. context = args = null;
  25555. clearTimeout(timeout);
  25556. timeout = null;
  25557. }
  25558. };
  25559. return debounced;
  25560. };
  25561. // Adds compatibility for ES modules
  25562. debounce.debounce = debounce;
  25563. module.exports = debounce;
  25564. /***/ }),
  25565. /***/ 32025:
  25566. /***/ ((module) => {
  25567. (function webpackUniversalModuleDefinition(root, factory) {
  25568. if(true)
  25569. module.exports = factory();
  25570. else { var i, a; }
  25571. })(self, function() {
  25572. return /******/ (function() { // webpackBootstrap
  25573. /******/ var __webpack_modules__ = ({
  25574. /***/ 3099:
  25575. /***/ (function(module) {
  25576. module.exports = function (it) {
  25577. if (typeof it != 'function') {
  25578. throw TypeError(String(it) + ' is not a function');
  25579. } return it;
  25580. };
  25581. /***/ }),
  25582. /***/ 6077:
  25583. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_703__) {
  25584. var isObject = __nested_webpack_require_703__(111);
  25585. module.exports = function (it) {
  25586. if (!isObject(it) && it !== null) {
  25587. throw TypeError("Can't set " + String(it) + ' as a prototype');
  25588. } return it;
  25589. };
  25590. /***/ }),
  25591. /***/ 1223:
  25592. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_1001__) {
  25593. var wellKnownSymbol = __nested_webpack_require_1001__(5112);
  25594. var create = __nested_webpack_require_1001__(30);
  25595. var definePropertyModule = __nested_webpack_require_1001__(3070);
  25596. var UNSCOPABLES = wellKnownSymbol('unscopables');
  25597. var ArrayPrototype = Array.prototype;
  25598. // Array.prototype[@@unscopables]
  25599. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  25600. if (ArrayPrototype[UNSCOPABLES] == undefined) {
  25601. definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
  25602. configurable: true,
  25603. value: create(null)
  25604. });
  25605. }
  25606. // add a key to Array.prototype[@@unscopables]
  25607. module.exports = function (key) {
  25608. ArrayPrototype[UNSCOPABLES][key] = true;
  25609. };
  25610. /***/ }),
  25611. /***/ 1530:
  25612. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_1715__) {
  25613. "use strict";
  25614. var charAt = __nested_webpack_require_1715__(8710).charAt;
  25615. // `AdvanceStringIndex` abstract operation
  25616. // https://tc39.es/ecma262/#sec-advancestringindex
  25617. module.exports = function (S, index, unicode) {
  25618. return index + (unicode ? charAt(S, index).length : 1);
  25619. };
  25620. /***/ }),
  25621. /***/ 5787:
  25622. /***/ (function(module) {
  25623. module.exports = function (it, Constructor, name) {
  25624. if (!(it instanceof Constructor)) {
  25625. throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');
  25626. } return it;
  25627. };
  25628. /***/ }),
  25629. /***/ 9670:
  25630. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_2317__) {
  25631. var isObject = __nested_webpack_require_2317__(111);
  25632. module.exports = function (it) {
  25633. if (!isObject(it)) {
  25634. throw TypeError(String(it) + ' is not an object');
  25635. } return it;
  25636. };
  25637. /***/ }),
  25638. /***/ 4019:
  25639. /***/ (function(module) {
  25640. module.exports = typeof ArrayBuffer !== 'undefined' && typeof DataView !== 'undefined';
  25641. /***/ }),
  25642. /***/ 260:
  25643. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_2726__) {
  25644. "use strict";
  25645. var NATIVE_ARRAY_BUFFER = __nested_webpack_require_2726__(4019);
  25646. var DESCRIPTORS = __nested_webpack_require_2726__(9781);
  25647. var global = __nested_webpack_require_2726__(7854);
  25648. var isObject = __nested_webpack_require_2726__(111);
  25649. var has = __nested_webpack_require_2726__(6656);
  25650. var classof = __nested_webpack_require_2726__(648);
  25651. var createNonEnumerableProperty = __nested_webpack_require_2726__(8880);
  25652. var redefine = __nested_webpack_require_2726__(1320);
  25653. var defineProperty = __nested_webpack_require_2726__(3070).f;
  25654. var getPrototypeOf = __nested_webpack_require_2726__(9518);
  25655. var setPrototypeOf = __nested_webpack_require_2726__(7674);
  25656. var wellKnownSymbol = __nested_webpack_require_2726__(5112);
  25657. var uid = __nested_webpack_require_2726__(9711);
  25658. var Int8Array = global.Int8Array;
  25659. var Int8ArrayPrototype = Int8Array && Int8Array.prototype;
  25660. var Uint8ClampedArray = global.Uint8ClampedArray;
  25661. var Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;
  25662. var TypedArray = Int8Array && getPrototypeOf(Int8Array);
  25663. var TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf(Int8ArrayPrototype);
  25664. var ObjectPrototype = Object.prototype;
  25665. var isPrototypeOf = ObjectPrototype.isPrototypeOf;
  25666. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  25667. var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
  25668. // Fixing native typed arrays in Opera Presto crashes the browser, see #595
  25669. var NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(global.opera) !== 'Opera';
  25670. var TYPED_ARRAY_TAG_REQIRED = false;
  25671. var NAME;
  25672. var TypedArrayConstructorsList = {
  25673. Int8Array: 1,
  25674. Uint8Array: 1,
  25675. Uint8ClampedArray: 1,
  25676. Int16Array: 2,
  25677. Uint16Array: 2,
  25678. Int32Array: 4,
  25679. Uint32Array: 4,
  25680. Float32Array: 4,
  25681. Float64Array: 8
  25682. };
  25683. var BigIntArrayConstructorsList = {
  25684. BigInt64Array: 8,
  25685. BigUint64Array: 8
  25686. };
  25687. var isView = function isView(it) {
  25688. if (!isObject(it)) return false;
  25689. var klass = classof(it);
  25690. return klass === 'DataView'
  25691. || has(TypedArrayConstructorsList, klass)
  25692. || has(BigIntArrayConstructorsList, klass);
  25693. };
  25694. var isTypedArray = function (it) {
  25695. if (!isObject(it)) return false;
  25696. var klass = classof(it);
  25697. return has(TypedArrayConstructorsList, klass)
  25698. || has(BigIntArrayConstructorsList, klass);
  25699. };
  25700. var aTypedArray = function (it) {
  25701. if (isTypedArray(it)) return it;
  25702. throw TypeError('Target is not a typed array');
  25703. };
  25704. var aTypedArrayConstructor = function (C) {
  25705. if (setPrototypeOf) {
  25706. if (isPrototypeOf.call(TypedArray, C)) return C;
  25707. } else for (var ARRAY in TypedArrayConstructorsList) if (has(TypedArrayConstructorsList, NAME)) {
  25708. var TypedArrayConstructor = global[ARRAY];
  25709. if (TypedArrayConstructor && (C === TypedArrayConstructor || isPrototypeOf.call(TypedArrayConstructor, C))) {
  25710. return C;
  25711. }
  25712. } throw TypeError('Target is not a typed array constructor');
  25713. };
  25714. var exportTypedArrayMethod = function (KEY, property, forced) {
  25715. if (!DESCRIPTORS) return;
  25716. if (forced) for (var ARRAY in TypedArrayConstructorsList) {
  25717. var TypedArrayConstructor = global[ARRAY];
  25718. if (TypedArrayConstructor && has(TypedArrayConstructor.prototype, KEY)) {
  25719. delete TypedArrayConstructor.prototype[KEY];
  25720. }
  25721. }
  25722. if (!TypedArrayPrototype[KEY] || forced) {
  25723. redefine(TypedArrayPrototype, KEY, forced ? property
  25724. : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property);
  25725. }
  25726. };
  25727. var exportTypedArrayStaticMethod = function (KEY, property, forced) {
  25728. var ARRAY, TypedArrayConstructor;
  25729. if (!DESCRIPTORS) return;
  25730. if (setPrototypeOf) {
  25731. if (forced) for (ARRAY in TypedArrayConstructorsList) {
  25732. TypedArrayConstructor = global[ARRAY];
  25733. if (TypedArrayConstructor && has(TypedArrayConstructor, KEY)) {
  25734. delete TypedArrayConstructor[KEY];
  25735. }
  25736. }
  25737. if (!TypedArray[KEY] || forced) {
  25738. // V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable
  25739. try {
  25740. return redefine(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && Int8Array[KEY] || property);
  25741. } catch (error) { /* empty */ }
  25742. } else return;
  25743. }
  25744. for (ARRAY in TypedArrayConstructorsList) {
  25745. TypedArrayConstructor = global[ARRAY];
  25746. if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {
  25747. redefine(TypedArrayConstructor, KEY, property);
  25748. }
  25749. }
  25750. };
  25751. for (NAME in TypedArrayConstructorsList) {
  25752. if (!global[NAME]) NATIVE_ARRAY_BUFFER_VIEWS = false;
  25753. }
  25754. // WebKit bug - typed arrays constructors prototype is Object.prototype
  25755. if (!NATIVE_ARRAY_BUFFER_VIEWS || typeof TypedArray != 'function' || TypedArray === Function.prototype) {
  25756. // eslint-disable-next-line no-shadow -- safe
  25757. TypedArray = function TypedArray() {
  25758. throw TypeError('Incorrect invocation');
  25759. };
  25760. if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
  25761. if (global[NAME]) setPrototypeOf(global[NAME], TypedArray);
  25762. }
  25763. }
  25764. if (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) {
  25765. TypedArrayPrototype = TypedArray.prototype;
  25766. if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
  25767. if (global[NAME]) setPrototypeOf(global[NAME].prototype, TypedArrayPrototype);
  25768. }
  25769. }
  25770. // WebKit bug - one more object in Uint8ClampedArray prototype chain
  25771. if (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {
  25772. setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);
  25773. }
  25774. if (DESCRIPTORS && !has(TypedArrayPrototype, TO_STRING_TAG)) {
  25775. TYPED_ARRAY_TAG_REQIRED = true;
  25776. defineProperty(TypedArrayPrototype, TO_STRING_TAG, { get: function () {
  25777. return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;
  25778. } });
  25779. for (NAME in TypedArrayConstructorsList) if (global[NAME]) {
  25780. createNonEnumerableProperty(global[NAME], TYPED_ARRAY_TAG, NAME);
  25781. }
  25782. }
  25783. module.exports = {
  25784. NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,
  25785. TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQIRED && TYPED_ARRAY_TAG,
  25786. aTypedArray: aTypedArray,
  25787. aTypedArrayConstructor: aTypedArrayConstructor,
  25788. exportTypedArrayMethod: exportTypedArrayMethod,
  25789. exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,
  25790. isView: isView,
  25791. isTypedArray: isTypedArray,
  25792. TypedArray: TypedArray,
  25793. TypedArrayPrototype: TypedArrayPrototype
  25794. };
  25795. /***/ }),
  25796. /***/ 3331:
  25797. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_8934__) {
  25798. "use strict";
  25799. var global = __nested_webpack_require_8934__(7854);
  25800. var DESCRIPTORS = __nested_webpack_require_8934__(9781);
  25801. var NATIVE_ARRAY_BUFFER = __nested_webpack_require_8934__(4019);
  25802. var createNonEnumerableProperty = __nested_webpack_require_8934__(8880);
  25803. var redefineAll = __nested_webpack_require_8934__(2248);
  25804. var fails = __nested_webpack_require_8934__(7293);
  25805. var anInstance = __nested_webpack_require_8934__(5787);
  25806. var toInteger = __nested_webpack_require_8934__(9958);
  25807. var toLength = __nested_webpack_require_8934__(7466);
  25808. var toIndex = __nested_webpack_require_8934__(7067);
  25809. var IEEE754 = __nested_webpack_require_8934__(1179);
  25810. var getPrototypeOf = __nested_webpack_require_8934__(9518);
  25811. var setPrototypeOf = __nested_webpack_require_8934__(7674);
  25812. var getOwnPropertyNames = __nested_webpack_require_8934__(8006).f;
  25813. var defineProperty = __nested_webpack_require_8934__(3070).f;
  25814. var arrayFill = __nested_webpack_require_8934__(1285);
  25815. var setToStringTag = __nested_webpack_require_8934__(8003);
  25816. var InternalStateModule = __nested_webpack_require_8934__(9909);
  25817. var getInternalState = InternalStateModule.get;
  25818. var setInternalState = InternalStateModule.set;
  25819. var ARRAY_BUFFER = 'ArrayBuffer';
  25820. var DATA_VIEW = 'DataView';
  25821. var PROTOTYPE = 'prototype';
  25822. var WRONG_LENGTH = 'Wrong length';
  25823. var WRONG_INDEX = 'Wrong index';
  25824. var NativeArrayBuffer = global[ARRAY_BUFFER];
  25825. var $ArrayBuffer = NativeArrayBuffer;
  25826. var $DataView = global[DATA_VIEW];
  25827. var $DataViewPrototype = $DataView && $DataView[PROTOTYPE];
  25828. var ObjectPrototype = Object.prototype;
  25829. var RangeError = global.RangeError;
  25830. var packIEEE754 = IEEE754.pack;
  25831. var unpackIEEE754 = IEEE754.unpack;
  25832. var packInt8 = function (number) {
  25833. return [number & 0xFF];
  25834. };
  25835. var packInt16 = function (number) {
  25836. return [number & 0xFF, number >> 8 & 0xFF];
  25837. };
  25838. var packInt32 = function (number) {
  25839. return [number & 0xFF, number >> 8 & 0xFF, number >> 16 & 0xFF, number >> 24 & 0xFF];
  25840. };
  25841. var unpackInt32 = function (buffer) {
  25842. return buffer[3] << 24 | buffer[2] << 16 | buffer[1] << 8 | buffer[0];
  25843. };
  25844. var packFloat32 = function (number) {
  25845. return packIEEE754(number, 23, 4);
  25846. };
  25847. var packFloat64 = function (number) {
  25848. return packIEEE754(number, 52, 8);
  25849. };
  25850. var addGetter = function (Constructor, key) {
  25851. defineProperty(Constructor[PROTOTYPE], key, { get: function () { return getInternalState(this)[key]; } });
  25852. };
  25853. var get = function (view, count, index, isLittleEndian) {
  25854. var intIndex = toIndex(index);
  25855. var store = getInternalState(view);
  25856. if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);
  25857. var bytes = getInternalState(store.buffer).bytes;
  25858. var start = intIndex + store.byteOffset;
  25859. var pack = bytes.slice(start, start + count);
  25860. return isLittleEndian ? pack : pack.reverse();
  25861. };
  25862. var set = function (view, count, index, conversion, value, isLittleEndian) {
  25863. var intIndex = toIndex(index);
  25864. var store = getInternalState(view);
  25865. if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);
  25866. var bytes = getInternalState(store.buffer).bytes;
  25867. var start = intIndex + store.byteOffset;
  25868. var pack = conversion(+value);
  25869. for (var i = 0; i < count; i++) bytes[start + i] = pack[isLittleEndian ? i : count - i - 1];
  25870. };
  25871. if (!NATIVE_ARRAY_BUFFER) {
  25872. $ArrayBuffer = function ArrayBuffer(length) {
  25873. anInstance(this, $ArrayBuffer, ARRAY_BUFFER);
  25874. var byteLength = toIndex(length);
  25875. setInternalState(this, {
  25876. bytes: arrayFill.call(new Array(byteLength), 0),
  25877. byteLength: byteLength
  25878. });
  25879. if (!DESCRIPTORS) this.byteLength = byteLength;
  25880. };
  25881. $DataView = function DataView(buffer, byteOffset, byteLength) {
  25882. anInstance(this, $DataView, DATA_VIEW);
  25883. anInstance(buffer, $ArrayBuffer, DATA_VIEW);
  25884. var bufferLength = getInternalState(buffer).byteLength;
  25885. var offset = toInteger(byteOffset);
  25886. if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset');
  25887. byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
  25888. if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);
  25889. setInternalState(this, {
  25890. buffer: buffer,
  25891. byteLength: byteLength,
  25892. byteOffset: offset
  25893. });
  25894. if (!DESCRIPTORS) {
  25895. this.buffer = buffer;
  25896. this.byteLength = byteLength;
  25897. this.byteOffset = offset;
  25898. }
  25899. };
  25900. if (DESCRIPTORS) {
  25901. addGetter($ArrayBuffer, 'byteLength');
  25902. addGetter($DataView, 'buffer');
  25903. addGetter($DataView, 'byteLength');
  25904. addGetter($DataView, 'byteOffset');
  25905. }
  25906. redefineAll($DataView[PROTOTYPE], {
  25907. getInt8: function getInt8(byteOffset) {
  25908. return get(this, 1, byteOffset)[0] << 24 >> 24;
  25909. },
  25910. getUint8: function getUint8(byteOffset) {
  25911. return get(this, 1, byteOffset)[0];
  25912. },
  25913. getInt16: function getInt16(byteOffset /* , littleEndian */) {
  25914. var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);
  25915. return (bytes[1] << 8 | bytes[0]) << 16 >> 16;
  25916. },
  25917. getUint16: function getUint16(byteOffset /* , littleEndian */) {
  25918. var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);
  25919. return bytes[1] << 8 | bytes[0];
  25920. },
  25921. getInt32: function getInt32(byteOffset /* , littleEndian */) {
  25922. return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined));
  25923. },
  25924. getUint32: function getUint32(byteOffset /* , littleEndian */) {
  25925. return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)) >>> 0;
  25926. },
  25927. getFloat32: function getFloat32(byteOffset /* , littleEndian */) {
  25928. return unpackIEEE754(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 23);
  25929. },
  25930. getFloat64: function getFloat64(byteOffset /* , littleEndian */) {
  25931. return unpackIEEE754(get(this, 8, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 52);
  25932. },
  25933. setInt8: function setInt8(byteOffset, value) {
  25934. set(this, 1, byteOffset, packInt8, value);
  25935. },
  25936. setUint8: function setUint8(byteOffset, value) {
  25937. set(this, 1, byteOffset, packInt8, value);
  25938. },
  25939. setInt16: function setInt16(byteOffset, value /* , littleEndian */) {
  25940. set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);
  25941. },
  25942. setUint16: function setUint16(byteOffset, value /* , littleEndian */) {
  25943. set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);
  25944. },
  25945. setInt32: function setInt32(byteOffset, value /* , littleEndian */) {
  25946. set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);
  25947. },
  25948. setUint32: function setUint32(byteOffset, value /* , littleEndian */) {
  25949. set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);
  25950. },
  25951. setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {
  25952. set(this, 4, byteOffset, packFloat32, value, arguments.length > 2 ? arguments[2] : undefined);
  25953. },
  25954. setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {
  25955. set(this, 8, byteOffset, packFloat64, value, arguments.length > 2 ? arguments[2] : undefined);
  25956. }
  25957. });
  25958. } else {
  25959. /* eslint-disable no-new -- required for testing */
  25960. if (!fails(function () {
  25961. NativeArrayBuffer(1);
  25962. }) || !fails(function () {
  25963. new NativeArrayBuffer(-1);
  25964. }) || fails(function () {
  25965. new NativeArrayBuffer();
  25966. new NativeArrayBuffer(1.5);
  25967. new NativeArrayBuffer(NaN);
  25968. return NativeArrayBuffer.name != ARRAY_BUFFER;
  25969. })) {
  25970. /* eslint-enable no-new -- required for testing */
  25971. $ArrayBuffer = function ArrayBuffer(length) {
  25972. anInstance(this, $ArrayBuffer);
  25973. return new NativeArrayBuffer(toIndex(length));
  25974. };
  25975. var ArrayBufferPrototype = $ArrayBuffer[PROTOTYPE] = NativeArrayBuffer[PROTOTYPE];
  25976. for (var keys = getOwnPropertyNames(NativeArrayBuffer), j = 0, key; keys.length > j;) {
  25977. if (!((key = keys[j++]) in $ArrayBuffer)) {
  25978. createNonEnumerableProperty($ArrayBuffer, key, NativeArrayBuffer[key]);
  25979. }
  25980. }
  25981. ArrayBufferPrototype.constructor = $ArrayBuffer;
  25982. }
  25983. // WebKit bug - the same parent prototype for typed arrays and data view
  25984. if (setPrototypeOf && getPrototypeOf($DataViewPrototype) !== ObjectPrototype) {
  25985. setPrototypeOf($DataViewPrototype, ObjectPrototype);
  25986. }
  25987. // iOS Safari 7.x bug
  25988. var testView = new $DataView(new $ArrayBuffer(2));
  25989. var nativeSetInt8 = $DataViewPrototype.setInt8;
  25990. testView.setInt8(0, 2147483648);
  25991. testView.setInt8(1, 2147483649);
  25992. if (testView.getInt8(0) || !testView.getInt8(1)) redefineAll($DataViewPrototype, {
  25993. setInt8: function setInt8(byteOffset, value) {
  25994. nativeSetInt8.call(this, byteOffset, value << 24 >> 24);
  25995. },
  25996. setUint8: function setUint8(byteOffset, value) {
  25997. nativeSetInt8.call(this, byteOffset, value << 24 >> 24);
  25998. }
  25999. }, { unsafe: true });
  26000. }
  26001. setToStringTag($ArrayBuffer, ARRAY_BUFFER);
  26002. setToStringTag($DataView, DATA_VIEW);
  26003. module.exports = {
  26004. ArrayBuffer: $ArrayBuffer,
  26005. DataView: $DataView
  26006. };
  26007. /***/ }),
  26008. /***/ 1048:
  26009. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_17881__) {
  26010. "use strict";
  26011. var toObject = __nested_webpack_require_17881__(7908);
  26012. var toAbsoluteIndex = __nested_webpack_require_17881__(1400);
  26013. var toLength = __nested_webpack_require_17881__(7466);
  26014. var min = Math.min;
  26015. // `Array.prototype.copyWithin` method implementation
  26016. // https://tc39.es/ecma262/#sec-array.prototype.copywithin
  26017. module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {
  26018. var O = toObject(this);
  26019. var len = toLength(O.length);
  26020. var to = toAbsoluteIndex(target, len);
  26021. var from = toAbsoluteIndex(start, len);
  26022. var end = arguments.length > 2 ? arguments[2] : undefined;
  26023. var count = min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);
  26024. var inc = 1;
  26025. if (from < to && to < from + count) {
  26026. inc = -1;
  26027. from += count - 1;
  26028. to += count - 1;
  26029. }
  26030. while (count-- > 0) {
  26031. if (from in O) O[to] = O[from];
  26032. else delete O[to];
  26033. to += inc;
  26034. from += inc;
  26035. } return O;
  26036. };
  26037. /***/ }),
  26038. /***/ 1285:
  26039. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_18911__) {
  26040. "use strict";
  26041. var toObject = __nested_webpack_require_18911__(7908);
  26042. var toAbsoluteIndex = __nested_webpack_require_18911__(1400);
  26043. var toLength = __nested_webpack_require_18911__(7466);
  26044. // `Array.prototype.fill` method implementation
  26045. // https://tc39.es/ecma262/#sec-array.prototype.fill
  26046. module.exports = function fill(value /* , start = 0, end = @length */) {
  26047. var O = toObject(this);
  26048. var length = toLength(O.length);
  26049. var argumentsLength = arguments.length;
  26050. var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);
  26051. var end = argumentsLength > 2 ? arguments[2] : undefined;
  26052. var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
  26053. while (endPos > index) O[index++] = value;
  26054. return O;
  26055. };
  26056. /***/ }),
  26057. /***/ 8533:
  26058. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_19717__) {
  26059. "use strict";
  26060. var $forEach = __nested_webpack_require_19717__(2092).forEach;
  26061. var arrayMethodIsStrict = __nested_webpack_require_19717__(9341);
  26062. var STRICT_METHOD = arrayMethodIsStrict('forEach');
  26063. // `Array.prototype.forEach` method implementation
  26064. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  26065. module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
  26066. return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  26067. } : [].forEach;
  26068. /***/ }),
  26069. /***/ 8457:
  26070. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_20278__) {
  26071. "use strict";
  26072. var bind = __nested_webpack_require_20278__(9974);
  26073. var toObject = __nested_webpack_require_20278__(7908);
  26074. var callWithSafeIterationClosing = __nested_webpack_require_20278__(3411);
  26075. var isArrayIteratorMethod = __nested_webpack_require_20278__(7659);
  26076. var toLength = __nested_webpack_require_20278__(7466);
  26077. var createProperty = __nested_webpack_require_20278__(6135);
  26078. var getIteratorMethod = __nested_webpack_require_20278__(1246);
  26079. // `Array.from` method implementation
  26080. // https://tc39.es/ecma262/#sec-array.from
  26081. module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
  26082. var O = toObject(arrayLike);
  26083. var C = typeof this == 'function' ? this : Array;
  26084. var argumentsLength = arguments.length;
  26085. var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
  26086. var mapping = mapfn !== undefined;
  26087. var iteratorMethod = getIteratorMethod(O);
  26088. var index = 0;
  26089. var length, result, step, iterator, next, value;
  26090. if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);
  26091. // if the target is not iterable or it's an array with the default iterator - use a simple case
  26092. if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {
  26093. iterator = iteratorMethod.call(O);
  26094. next = iterator.next;
  26095. result = new C();
  26096. for (;!(step = next.call(iterator)).done; index++) {
  26097. value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
  26098. createProperty(result, index, value);
  26099. }
  26100. } else {
  26101. length = toLength(O.length);
  26102. result = new C(length);
  26103. for (;length > index; index++) {
  26104. value = mapping ? mapfn(O[index], index) : O[index];
  26105. createProperty(result, index, value);
  26106. }
  26107. }
  26108. result.length = index;
  26109. return result;
  26110. };
  26111. /***/ }),
  26112. /***/ 1318:
  26113. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_22092__) {
  26114. var toIndexedObject = __nested_webpack_require_22092__(5656);
  26115. var toLength = __nested_webpack_require_22092__(7466);
  26116. var toAbsoluteIndex = __nested_webpack_require_22092__(1400);
  26117. // `Array.prototype.{ indexOf, includes }` methods implementation
  26118. var createMethod = function (IS_INCLUDES) {
  26119. return function ($this, el, fromIndex) {
  26120. var O = toIndexedObject($this);
  26121. var length = toLength(O.length);
  26122. var index = toAbsoluteIndex(fromIndex, length);
  26123. var value;
  26124. // Array#includes uses SameValueZero equality algorithm
  26125. // eslint-disable-next-line no-self-compare -- NaN check
  26126. if (IS_INCLUDES && el != el) while (length > index) {
  26127. value = O[index++];
  26128. // eslint-disable-next-line no-self-compare -- NaN check
  26129. if (value != value) return true;
  26130. // Array#indexOf ignores holes, Array#includes - not
  26131. } else for (;length > index; index++) {
  26132. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  26133. } return !IS_INCLUDES && -1;
  26134. };
  26135. };
  26136. module.exports = {
  26137. // `Array.prototype.includes` method
  26138. // https://tc39.es/ecma262/#sec-array.prototype.includes
  26139. includes: createMethod(true),
  26140. // `Array.prototype.indexOf` method
  26141. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  26142. indexOf: createMethod(false)
  26143. };
  26144. /***/ }),
  26145. /***/ 2092:
  26146. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_23446__) {
  26147. var bind = __nested_webpack_require_23446__(9974);
  26148. var IndexedObject = __nested_webpack_require_23446__(8361);
  26149. var toObject = __nested_webpack_require_23446__(7908);
  26150. var toLength = __nested_webpack_require_23446__(7466);
  26151. var arraySpeciesCreate = __nested_webpack_require_23446__(5417);
  26152. var push = [].push;
  26153. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation
  26154. var createMethod = function (TYPE) {
  26155. var IS_MAP = TYPE == 1;
  26156. var IS_FILTER = TYPE == 2;
  26157. var IS_SOME = TYPE == 3;
  26158. var IS_EVERY = TYPE == 4;
  26159. var IS_FIND_INDEX = TYPE == 6;
  26160. var IS_FILTER_OUT = TYPE == 7;
  26161. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  26162. return function ($this, callbackfn, that, specificCreate) {
  26163. var O = toObject($this);
  26164. var self = IndexedObject(O);
  26165. var boundFunction = bind(callbackfn, that, 3);
  26166. var length = toLength(self.length);
  26167. var index = 0;
  26168. var create = specificCreate || arraySpeciesCreate;
  26169. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;
  26170. var value, result;
  26171. for (;length > index; index++) if (NO_HOLES || index in self) {
  26172. value = self[index];
  26173. result = boundFunction(value, index, O);
  26174. if (TYPE) {
  26175. if (IS_MAP) target[index] = result; // map
  26176. else if (result) switch (TYPE) {
  26177. case 3: return true; // some
  26178. case 5: return value; // find
  26179. case 6: return index; // findIndex
  26180. case 2: push.call(target, value); // filter
  26181. } else switch (TYPE) {
  26182. case 4: return false; // every
  26183. case 7: push.call(target, value); // filterOut
  26184. }
  26185. }
  26186. }
  26187. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  26188. };
  26189. };
  26190. module.exports = {
  26191. // `Array.prototype.forEach` method
  26192. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  26193. forEach: createMethod(0),
  26194. // `Array.prototype.map` method
  26195. // https://tc39.es/ecma262/#sec-array.prototype.map
  26196. map: createMethod(1),
  26197. // `Array.prototype.filter` method
  26198. // https://tc39.es/ecma262/#sec-array.prototype.filter
  26199. filter: createMethod(2),
  26200. // `Array.prototype.some` method
  26201. // https://tc39.es/ecma262/#sec-array.prototype.some
  26202. some: createMethod(3),
  26203. // `Array.prototype.every` method
  26204. // https://tc39.es/ecma262/#sec-array.prototype.every
  26205. every: createMethod(4),
  26206. // `Array.prototype.find` method
  26207. // https://tc39.es/ecma262/#sec-array.prototype.find
  26208. find: createMethod(5),
  26209. // `Array.prototype.findIndex` method
  26210. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  26211. findIndex: createMethod(6),
  26212. // `Array.prototype.filterOut` method
  26213. // https://github.com/tc39/proposal-array-filtering
  26214. filterOut: createMethod(7)
  26215. };
  26216. /***/ }),
  26217. /***/ 6583:
  26218. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_26271__) {
  26219. "use strict";
  26220. var toIndexedObject = __nested_webpack_require_26271__(5656);
  26221. var toInteger = __nested_webpack_require_26271__(9958);
  26222. var toLength = __nested_webpack_require_26271__(7466);
  26223. var arrayMethodIsStrict = __nested_webpack_require_26271__(9341);
  26224. var min = Math.min;
  26225. var nativeLastIndexOf = [].lastIndexOf;
  26226. var NEGATIVE_ZERO = !!nativeLastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;
  26227. var STRICT_METHOD = arrayMethodIsStrict('lastIndexOf');
  26228. var FORCED = NEGATIVE_ZERO || !STRICT_METHOD;
  26229. // `Array.prototype.lastIndexOf` method implementation
  26230. // https://tc39.es/ecma262/#sec-array.prototype.lastindexof
  26231. module.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
  26232. // convert -0 to +0
  26233. if (NEGATIVE_ZERO) return nativeLastIndexOf.apply(this, arguments) || 0;
  26234. var O = toIndexedObject(this);
  26235. var length = toLength(O.length);
  26236. var index = length - 1;
  26237. if (arguments.length > 1) index = min(index, toInteger(arguments[1]));
  26238. if (index < 0) index = length + index;
  26239. for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;
  26240. return -1;
  26241. } : nativeLastIndexOf;
  26242. /***/ }),
  26243. /***/ 1194:
  26244. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_27452__) {
  26245. var fails = __nested_webpack_require_27452__(7293);
  26246. var wellKnownSymbol = __nested_webpack_require_27452__(5112);
  26247. var V8_VERSION = __nested_webpack_require_27452__(7392);
  26248. var SPECIES = wellKnownSymbol('species');
  26249. module.exports = function (METHOD_NAME) {
  26250. // We can't use this feature detection in V8 since it causes
  26251. // deoptimization and serious performance degradation
  26252. // https://github.com/zloirock/core-js/issues/677
  26253. return V8_VERSION >= 51 || !fails(function () {
  26254. var array = [];
  26255. var constructor = array.constructor = {};
  26256. constructor[SPECIES] = function () {
  26257. return { foo: 1 };
  26258. };
  26259. return array[METHOD_NAME](Boolean).foo !== 1;
  26260. });
  26261. };
  26262. /***/ }),
  26263. /***/ 9341:
  26264. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_28188__) {
  26265. "use strict";
  26266. var fails = __nested_webpack_require_28188__(7293);
  26267. module.exports = function (METHOD_NAME, argument) {
  26268. var method = [][METHOD_NAME];
  26269. return !!method && fails(function () {
  26270. // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing
  26271. method.call(null, argument || function () { throw 1; }, 1);
  26272. });
  26273. };
  26274. /***/ }),
  26275. /***/ 3671:
  26276. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_28629__) {
  26277. var aFunction = __nested_webpack_require_28629__(3099);
  26278. var toObject = __nested_webpack_require_28629__(7908);
  26279. var IndexedObject = __nested_webpack_require_28629__(8361);
  26280. var toLength = __nested_webpack_require_28629__(7466);
  26281. // `Array.prototype.{ reduce, reduceRight }` methods implementation
  26282. var createMethod = function (IS_RIGHT) {
  26283. return function (that, callbackfn, argumentsLength, memo) {
  26284. aFunction(callbackfn);
  26285. var O = toObject(that);
  26286. var self = IndexedObject(O);
  26287. var length = toLength(O.length);
  26288. var index = IS_RIGHT ? length - 1 : 0;
  26289. var i = IS_RIGHT ? -1 : 1;
  26290. if (argumentsLength < 2) while (true) {
  26291. if (index in self) {
  26292. memo = self[index];
  26293. index += i;
  26294. break;
  26295. }
  26296. index += i;
  26297. if (IS_RIGHT ? index < 0 : length <= index) {
  26298. throw TypeError('Reduce of empty array with no initial value');
  26299. }
  26300. }
  26301. for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
  26302. memo = callbackfn(memo, self[index], index, O);
  26303. }
  26304. return memo;
  26305. };
  26306. };
  26307. module.exports = {
  26308. // `Array.prototype.reduce` method
  26309. // https://tc39.es/ecma262/#sec-array.prototype.reduce
  26310. left: createMethod(false),
  26311. // `Array.prototype.reduceRight` method
  26312. // https://tc39.es/ecma262/#sec-array.prototype.reduceright
  26313. right: createMethod(true)
  26314. };
  26315. /***/ }),
  26316. /***/ 5417:
  26317. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_30017__) {
  26318. var isObject = __nested_webpack_require_30017__(111);
  26319. var isArray = __nested_webpack_require_30017__(3157);
  26320. var wellKnownSymbol = __nested_webpack_require_30017__(5112);
  26321. var SPECIES = wellKnownSymbol('species');
  26322. // `ArraySpeciesCreate` abstract operation
  26323. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  26324. module.exports = function (originalArray, length) {
  26325. var C;
  26326. if (isArray(originalArray)) {
  26327. C = originalArray.constructor;
  26328. // cross-realm fallback
  26329. if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
  26330. else if (isObject(C)) {
  26331. C = C[SPECIES];
  26332. if (C === null) C = undefined;
  26333. }
  26334. } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
  26335. };
  26336. /***/ }),
  26337. /***/ 3411:
  26338. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_30798__) {
  26339. var anObject = __nested_webpack_require_30798__(9670);
  26340. var iteratorClose = __nested_webpack_require_30798__(9212);
  26341. // call something on iterator step with safe closing on error
  26342. module.exports = function (iterator, fn, value, ENTRIES) {
  26343. try {
  26344. return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
  26345. // 7.4.6 IteratorClose(iterator, completion)
  26346. } catch (error) {
  26347. iteratorClose(iterator);
  26348. throw error;
  26349. }
  26350. };
  26351. /***/ }),
  26352. /***/ 7072:
  26353. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_31303__) {
  26354. var wellKnownSymbol = __nested_webpack_require_31303__(5112);
  26355. var ITERATOR = wellKnownSymbol('iterator');
  26356. var SAFE_CLOSING = false;
  26357. try {
  26358. var called = 0;
  26359. var iteratorWithReturn = {
  26360. next: function () {
  26361. return { done: !!called++ };
  26362. },
  26363. 'return': function () {
  26364. SAFE_CLOSING = true;
  26365. }
  26366. };
  26367. iteratorWithReturn[ITERATOR] = function () {
  26368. return this;
  26369. };
  26370. // eslint-disable-next-line no-throw-literal -- required for testing
  26371. Array.from(iteratorWithReturn, function () { throw 2; });
  26372. } catch (error) { /* empty */ }
  26373. module.exports = function (exec, SKIP_CLOSING) {
  26374. if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
  26375. var ITERATION_SUPPORT = false;
  26376. try {
  26377. var object = {};
  26378. object[ITERATOR] = function () {
  26379. return {
  26380. next: function () {
  26381. return { done: ITERATION_SUPPORT = true };
  26382. }
  26383. };
  26384. };
  26385. exec(object);
  26386. } catch (error) { /* empty */ }
  26387. return ITERATION_SUPPORT;
  26388. };
  26389. /***/ }),
  26390. /***/ 4326:
  26391. /***/ (function(module) {
  26392. var toString = {}.toString;
  26393. module.exports = function (it) {
  26394. return toString.call(it).slice(8, -1);
  26395. };
  26396. /***/ }),
  26397. /***/ 648:
  26398. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_32503__) {
  26399. var TO_STRING_TAG_SUPPORT = __nested_webpack_require_32503__(1694);
  26400. var classofRaw = __nested_webpack_require_32503__(4326);
  26401. var wellKnownSymbol = __nested_webpack_require_32503__(5112);
  26402. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  26403. // ES3 wrong here
  26404. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
  26405. // fallback for IE11 Script Access Denied error
  26406. var tryGet = function (it, key) {
  26407. try {
  26408. return it[key];
  26409. } catch (error) { /* empty */ }
  26410. };
  26411. // getting tag from ES6+ `Object.prototype.toString`
  26412. module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
  26413. var O, tag, result;
  26414. return it === undefined ? 'Undefined' : it === null ? 'Null'
  26415. // @@toStringTag case
  26416. : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag
  26417. // builtinTag case
  26418. : CORRECT_ARGUMENTS ? classofRaw(O)
  26419. // ES3 arguments fallback
  26420. : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
  26421. };
  26422. /***/ }),
  26423. /***/ 9920:
  26424. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_33565__) {
  26425. var has = __nested_webpack_require_33565__(6656);
  26426. var ownKeys = __nested_webpack_require_33565__(3887);
  26427. var getOwnPropertyDescriptorModule = __nested_webpack_require_33565__(1236);
  26428. var definePropertyModule = __nested_webpack_require_33565__(3070);
  26429. module.exports = function (target, source) {
  26430. var keys = ownKeys(source);
  26431. var defineProperty = definePropertyModule.f;
  26432. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  26433. for (var i = 0; i < keys.length; i++) {
  26434. var key = keys[i];
  26435. if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  26436. }
  26437. };
  26438. /***/ }),
  26439. /***/ 8544:
  26440. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_34217__) {
  26441. var fails = __nested_webpack_require_34217__(7293);
  26442. module.exports = !fails(function () {
  26443. function F() { /* empty */ }
  26444. F.prototype.constructor = null;
  26445. return Object.getPrototypeOf(new F()) !== F.prototype;
  26446. });
  26447. /***/ }),
  26448. /***/ 4994:
  26449. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_34520__) {
  26450. "use strict";
  26451. var IteratorPrototype = __nested_webpack_require_34520__(3383).IteratorPrototype;
  26452. var create = __nested_webpack_require_34520__(30);
  26453. var createPropertyDescriptor = __nested_webpack_require_34520__(9114);
  26454. var setToStringTag = __nested_webpack_require_34520__(8003);
  26455. var Iterators = __nested_webpack_require_34520__(7497);
  26456. var returnThis = function () { return this; };
  26457. module.exports = function (IteratorConstructor, NAME, next) {
  26458. var TO_STRING_TAG = NAME + ' Iterator';
  26459. IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });
  26460. setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
  26461. Iterators[TO_STRING_TAG] = returnThis;
  26462. return IteratorConstructor;
  26463. };
  26464. /***/ }),
  26465. /***/ 8880:
  26466. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_35290__) {
  26467. var DESCRIPTORS = __nested_webpack_require_35290__(9781);
  26468. var definePropertyModule = __nested_webpack_require_35290__(3070);
  26469. var createPropertyDescriptor = __nested_webpack_require_35290__(9114);
  26470. module.exports = DESCRIPTORS ? function (object, key, value) {
  26471. return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
  26472. } : function (object, key, value) {
  26473. object[key] = value;
  26474. return object;
  26475. };
  26476. /***/ }),
  26477. /***/ 9114:
  26478. /***/ (function(module) {
  26479. module.exports = function (bitmap, value) {
  26480. return {
  26481. enumerable: !(bitmap & 1),
  26482. configurable: !(bitmap & 2),
  26483. writable: !(bitmap & 4),
  26484. value: value
  26485. };
  26486. };
  26487. /***/ }),
  26488. /***/ 6135:
  26489. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_35996__) {
  26490. "use strict";
  26491. var toPrimitive = __nested_webpack_require_35996__(7593);
  26492. var definePropertyModule = __nested_webpack_require_35996__(3070);
  26493. var createPropertyDescriptor = __nested_webpack_require_35996__(9114);
  26494. module.exports = function (object, key, value) {
  26495. var propertyKey = toPrimitive(key);
  26496. if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
  26497. else object[propertyKey] = value;
  26498. };
  26499. /***/ }),
  26500. /***/ 654:
  26501. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_36503__) {
  26502. "use strict";
  26503. var $ = __nested_webpack_require_36503__(2109);
  26504. var createIteratorConstructor = __nested_webpack_require_36503__(4994);
  26505. var getPrototypeOf = __nested_webpack_require_36503__(9518);
  26506. var setPrototypeOf = __nested_webpack_require_36503__(7674);
  26507. var setToStringTag = __nested_webpack_require_36503__(8003);
  26508. var createNonEnumerableProperty = __nested_webpack_require_36503__(8880);
  26509. var redefine = __nested_webpack_require_36503__(1320);
  26510. var wellKnownSymbol = __nested_webpack_require_36503__(5112);
  26511. var IS_PURE = __nested_webpack_require_36503__(1913);
  26512. var Iterators = __nested_webpack_require_36503__(7497);
  26513. var IteratorsCore = __nested_webpack_require_36503__(3383);
  26514. var IteratorPrototype = IteratorsCore.IteratorPrototype;
  26515. var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
  26516. var ITERATOR = wellKnownSymbol('iterator');
  26517. var KEYS = 'keys';
  26518. var VALUES = 'values';
  26519. var ENTRIES = 'entries';
  26520. var returnThis = function () { return this; };
  26521. module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
  26522. createIteratorConstructor(IteratorConstructor, NAME, next);
  26523. var getIterationMethod = function (KIND) {
  26524. if (KIND === DEFAULT && defaultIterator) return defaultIterator;
  26525. if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
  26526. switch (KIND) {
  26527. case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
  26528. case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
  26529. case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
  26530. } return function () { return new IteratorConstructor(this); };
  26531. };
  26532. var TO_STRING_TAG = NAME + ' Iterator';
  26533. var INCORRECT_VALUES_NAME = false;
  26534. var IterablePrototype = Iterable.prototype;
  26535. var nativeIterator = IterablePrototype[ITERATOR]
  26536. || IterablePrototype['@@iterator']
  26537. || DEFAULT && IterablePrototype[DEFAULT];
  26538. var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
  26539. var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
  26540. var CurrentIteratorPrototype, methods, KEY;
  26541. // fix native
  26542. if (anyNativeIterator) {
  26543. CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
  26544. if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
  26545. if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
  26546. if (setPrototypeOf) {
  26547. setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
  26548. } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {
  26549. createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);
  26550. }
  26551. }
  26552. // Set @@toStringTag to native iterators
  26553. setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
  26554. if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;
  26555. }
  26556. }
  26557. // fix Array#{values, @@iterator}.name in V8 / FF
  26558. if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
  26559. INCORRECT_VALUES_NAME = true;
  26560. defaultIterator = function values() { return nativeIterator.call(this); };
  26561. }
  26562. // define iterator
  26563. if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {
  26564. createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);
  26565. }
  26566. Iterators[NAME] = defaultIterator;
  26567. // export additional methods
  26568. if (DEFAULT) {
  26569. methods = {
  26570. values: getIterationMethod(VALUES),
  26571. keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
  26572. entries: getIterationMethod(ENTRIES)
  26573. };
  26574. if (FORCED) for (KEY in methods) {
  26575. if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
  26576. redefine(IterablePrototype, KEY, methods[KEY]);
  26577. }
  26578. } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
  26579. }
  26580. return methods;
  26581. };
  26582. /***/ }),
  26583. /***/ 9781:
  26584. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_40475__) {
  26585. var fails = __nested_webpack_require_40475__(7293);
  26586. // Detect IE8's incomplete defineProperty implementation
  26587. module.exports = !fails(function () {
  26588. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
  26589. });
  26590. /***/ }),
  26591. /***/ 317:
  26592. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_40795__) {
  26593. var global = __nested_webpack_require_40795__(7854);
  26594. var isObject = __nested_webpack_require_40795__(111);
  26595. var document = global.document;
  26596. // typeof document.createElement is 'object' in old IE
  26597. var EXISTS = isObject(document) && isObject(document.createElement);
  26598. module.exports = function (it) {
  26599. return EXISTS ? document.createElement(it) : {};
  26600. };
  26601. /***/ }),
  26602. /***/ 8324:
  26603. /***/ (function(module) {
  26604. // iterable DOM collections
  26605. // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
  26606. module.exports = {
  26607. CSSRuleList: 0,
  26608. CSSStyleDeclaration: 0,
  26609. CSSValueList: 0,
  26610. ClientRectList: 0,
  26611. DOMRectList: 0,
  26612. DOMStringList: 0,
  26613. DOMTokenList: 1,
  26614. DataTransferItemList: 0,
  26615. FileList: 0,
  26616. HTMLAllCollection: 0,
  26617. HTMLCollection: 0,
  26618. HTMLFormElement: 0,
  26619. HTMLSelectElement: 0,
  26620. MediaList: 0,
  26621. MimeTypeArray: 0,
  26622. NamedNodeMap: 0,
  26623. NodeList: 1,
  26624. PaintRequestList: 0,
  26625. Plugin: 0,
  26626. PluginArray: 0,
  26627. SVGLengthList: 0,
  26628. SVGNumberList: 0,
  26629. SVGPathSegList: 0,
  26630. SVGPointList: 0,
  26631. SVGStringList: 0,
  26632. SVGTransformList: 0,
  26633. SourceBufferList: 0,
  26634. StyleSheetList: 0,
  26635. TextTrackCueList: 0,
  26636. TextTrackList: 0,
  26637. TouchList: 0
  26638. };
  26639. /***/ }),
  26640. /***/ 8113:
  26641. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_42025__) {
  26642. var getBuiltIn = __nested_webpack_require_42025__(5005);
  26643. module.exports = getBuiltIn('navigator', 'userAgent') || '';
  26644. /***/ }),
  26645. /***/ 7392:
  26646. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_42230__) {
  26647. var global = __nested_webpack_require_42230__(7854);
  26648. var userAgent = __nested_webpack_require_42230__(8113);
  26649. var process = global.process;
  26650. var versions = process && process.versions;
  26651. var v8 = versions && versions.v8;
  26652. var match, version;
  26653. if (v8) {
  26654. match = v8.split('.');
  26655. version = match[0] + match[1];
  26656. } else if (userAgent) {
  26657. match = userAgent.match(/Edge\/(\d+)/);
  26658. if (!match || match[1] >= 74) {
  26659. match = userAgent.match(/Chrome\/(\d+)/);
  26660. if (match) version = match[1];
  26661. }
  26662. }
  26663. module.exports = version && +version;
  26664. /***/ }),
  26665. /***/ 748:
  26666. /***/ (function(module) {
  26667. // IE8- don't enum bug keys
  26668. module.exports = [
  26669. 'constructor',
  26670. 'hasOwnProperty',
  26671. 'isPrototypeOf',
  26672. 'propertyIsEnumerable',
  26673. 'toLocaleString',
  26674. 'toString',
  26675. 'valueOf'
  26676. ];
  26677. /***/ }),
  26678. /***/ 2109:
  26679. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_43065__) {
  26680. var global = __nested_webpack_require_43065__(7854);
  26681. var getOwnPropertyDescriptor = __nested_webpack_require_43065__(1236).f;
  26682. var createNonEnumerableProperty = __nested_webpack_require_43065__(8880);
  26683. var redefine = __nested_webpack_require_43065__(1320);
  26684. var setGlobal = __nested_webpack_require_43065__(3505);
  26685. var copyConstructorProperties = __nested_webpack_require_43065__(9920);
  26686. var isForced = __nested_webpack_require_43065__(4705);
  26687. /*
  26688. options.target - name of the target object
  26689. options.global - target is the global object
  26690. options.stat - export as static methods of target
  26691. options.proto - export as prototype methods of target
  26692. options.real - real prototype method for the `pure` version
  26693. options.forced - export even if the native feature is available
  26694. options.bind - bind methods to the target, required for the `pure` version
  26695. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  26696. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  26697. options.sham - add a flag to not completely full polyfills
  26698. options.enumerable - export as enumerable property
  26699. options.noTargetGet - prevent calling a getter on target
  26700. */
  26701. module.exports = function (options, source) {
  26702. var TARGET = options.target;
  26703. var GLOBAL = options.global;
  26704. var STATIC = options.stat;
  26705. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  26706. if (GLOBAL) {
  26707. target = global;
  26708. } else if (STATIC) {
  26709. target = global[TARGET] || setGlobal(TARGET, {});
  26710. } else {
  26711. target = (global[TARGET] || {}).prototype;
  26712. }
  26713. if (target) for (key in source) {
  26714. sourceProperty = source[key];
  26715. if (options.noTargetGet) {
  26716. descriptor = getOwnPropertyDescriptor(target, key);
  26717. targetProperty = descriptor && descriptor.value;
  26718. } else targetProperty = target[key];
  26719. FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  26720. // contained in target
  26721. if (!FORCED && targetProperty !== undefined) {
  26722. if (typeof sourceProperty === typeof targetProperty) continue;
  26723. copyConstructorProperties(sourceProperty, targetProperty);
  26724. }
  26725. // add a flag to not completely full polyfills
  26726. if (options.sham || (targetProperty && targetProperty.sham)) {
  26727. createNonEnumerableProperty(sourceProperty, 'sham', true);
  26728. }
  26729. // extend global
  26730. redefine(target, key, sourceProperty, options);
  26731. }
  26732. };
  26733. /***/ }),
  26734. /***/ 7293:
  26735. /***/ (function(module) {
  26736. module.exports = function (exec) {
  26737. try {
  26738. return !!exec();
  26739. } catch (error) {
  26740. return true;
  26741. }
  26742. };
  26743. /***/ }),
  26744. /***/ 7007:
  26745. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_45726__) {
  26746. "use strict";
  26747. // TODO: Remove from `core-js@4` since it's moved to entry points
  26748. __nested_webpack_require_45726__(4916);
  26749. var redefine = __nested_webpack_require_45726__(1320);
  26750. var fails = __nested_webpack_require_45726__(7293);
  26751. var wellKnownSymbol = __nested_webpack_require_45726__(5112);
  26752. var regexpExec = __nested_webpack_require_45726__(2261);
  26753. var createNonEnumerableProperty = __nested_webpack_require_45726__(8880);
  26754. var SPECIES = wellKnownSymbol('species');
  26755. var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
  26756. // #replace needs built-in support for named groups.
  26757. // #match works fine because it just return the exec results, even if it has
  26758. // a "grops" property.
  26759. var re = /./;
  26760. re.exec = function () {
  26761. var result = [];
  26762. result.groups = { a: '7' };
  26763. return result;
  26764. };
  26765. return ''.replace(re, '$<a>') !== '7';
  26766. });
  26767. // IE <= 11 replaces $0 with the whole match, as if it was $&
  26768. // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
  26769. var REPLACE_KEEPS_$0 = (function () {
  26770. return 'a'.replace(/./, '$0') === '$0';
  26771. })();
  26772. var REPLACE = wellKnownSymbol('replace');
  26773. // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
  26774. var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
  26775. if (/./[REPLACE]) {
  26776. return /./[REPLACE]('a', '$0') === '';
  26777. }
  26778. return false;
  26779. })();
  26780. // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
  26781. // Weex JS has frozen built-in prototypes, so use try / catch wrapper
  26782. var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
  26783. // eslint-disable-next-line regexp/no-empty-group -- required for testing
  26784. var re = /(?:)/;
  26785. var originalExec = re.exec;
  26786. re.exec = function () { return originalExec.apply(this, arguments); };
  26787. var result = 'ab'.split(re);
  26788. return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
  26789. });
  26790. module.exports = function (KEY, length, exec, sham) {
  26791. var SYMBOL = wellKnownSymbol(KEY);
  26792. var DELEGATES_TO_SYMBOL = !fails(function () {
  26793. // String methods call symbol-named RegEp methods
  26794. var O = {};
  26795. O[SYMBOL] = function () { return 7; };
  26796. return ''[KEY](O) != 7;
  26797. });
  26798. var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
  26799. // Symbol-named RegExp methods call .exec
  26800. var execCalled = false;
  26801. var re = /a/;
  26802. if (KEY === 'split') {
  26803. // We can't use real regex here since it causes deoptimization
  26804. // and serious performance degradation in V8
  26805. // https://github.com/zloirock/core-js/issues/306
  26806. re = {};
  26807. // RegExp[@@split] doesn't call the regex's exec method, but first creates
  26808. // a new one. We need to return the patched regex when creating the new one.
  26809. re.constructor = {};
  26810. re.constructor[SPECIES] = function () { return re; };
  26811. re.flags = '';
  26812. re[SYMBOL] = /./[SYMBOL];
  26813. }
  26814. re.exec = function () { execCalled = true; return null; };
  26815. re[SYMBOL]('');
  26816. return !execCalled;
  26817. });
  26818. if (
  26819. !DELEGATES_TO_SYMBOL ||
  26820. !DELEGATES_TO_EXEC ||
  26821. (KEY === 'replace' && !(
  26822. REPLACE_SUPPORTS_NAMED_GROUPS &&
  26823. REPLACE_KEEPS_$0 &&
  26824. !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
  26825. )) ||
  26826. (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
  26827. ) {
  26828. var nativeRegExpMethod = /./[SYMBOL];
  26829. var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
  26830. if (regexp.exec === regexpExec) {
  26831. if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
  26832. // The native String method already delegates to @@method (this
  26833. // polyfilled function), leasing to infinite recursion.
  26834. // We avoid it by directly calling the native @@method method.
  26835. return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
  26836. }
  26837. return { done: true, value: nativeMethod.call(str, regexp, arg2) };
  26838. }
  26839. return { done: false };
  26840. }, {
  26841. REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,
  26842. REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
  26843. });
  26844. var stringMethod = methods[0];
  26845. var regexMethod = methods[1];
  26846. redefine(String.prototype, KEY, stringMethod);
  26847. redefine(RegExp.prototype, SYMBOL, length == 2
  26848. // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
  26849. // 21.2.5.11 RegExp.prototype[@@split](string, limit)
  26850. ? function (string, arg) { return regexMethod.call(string, this, arg); }
  26851. // 21.2.5.6 RegExp.prototype[@@match](string)
  26852. // 21.2.5.9 RegExp.prototype[@@search](string)
  26853. : function (string) { return regexMethod.call(string, this); }
  26854. );
  26855. }
  26856. if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);
  26857. };
  26858. /***/ }),
  26859. /***/ 9974:
  26860. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_50488__) {
  26861. var aFunction = __nested_webpack_require_50488__(3099);
  26862. // optional / simple context binding
  26863. module.exports = function (fn, that, length) {
  26864. aFunction(fn);
  26865. if (that === undefined) return fn;
  26866. switch (length) {
  26867. case 0: return function () {
  26868. return fn.call(that);
  26869. };
  26870. case 1: return function (a) {
  26871. return fn.call(that, a);
  26872. };
  26873. case 2: return function (a, b) {
  26874. return fn.call(that, a, b);
  26875. };
  26876. case 3: return function (a, b, c) {
  26877. return fn.call(that, a, b, c);
  26878. };
  26879. }
  26880. return function (/* ...args */) {
  26881. return fn.apply(that, arguments);
  26882. };
  26883. };
  26884. /***/ }),
  26885. /***/ 5005:
  26886. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_51177__) {
  26887. var path = __nested_webpack_require_51177__(857);
  26888. var global = __nested_webpack_require_51177__(7854);
  26889. var aFunction = function (variable) {
  26890. return typeof variable == 'function' ? variable : undefined;
  26891. };
  26892. module.exports = function (namespace, method) {
  26893. return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])
  26894. : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];
  26895. };
  26896. /***/ }),
  26897. /***/ 1246:
  26898. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_51701__) {
  26899. var classof = __nested_webpack_require_51701__(648);
  26900. var Iterators = __nested_webpack_require_51701__(7497);
  26901. var wellKnownSymbol = __nested_webpack_require_51701__(5112);
  26902. var ITERATOR = wellKnownSymbol('iterator');
  26903. module.exports = function (it) {
  26904. if (it != undefined) return it[ITERATOR]
  26905. || it['@@iterator']
  26906. || Iterators[classof(it)];
  26907. };
  26908. /***/ }),
  26909. /***/ 8554:
  26910. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_52112__) {
  26911. var anObject = __nested_webpack_require_52112__(9670);
  26912. var getIteratorMethod = __nested_webpack_require_52112__(1246);
  26913. module.exports = function (it) {
  26914. var iteratorMethod = getIteratorMethod(it);
  26915. if (typeof iteratorMethod != 'function') {
  26916. throw TypeError(String(it) + ' is not iterable');
  26917. } return anObject(iteratorMethod.call(it));
  26918. };
  26919. /***/ }),
  26920. /***/ 647:
  26921. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_52531__) {
  26922. var toObject = __nested_webpack_require_52531__(7908);
  26923. var floor = Math.floor;
  26924. var replace = ''.replace;
  26925. var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g;
  26926. var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g;
  26927. // https://tc39.es/ecma262/#sec-getsubstitution
  26928. module.exports = function (matched, str, position, captures, namedCaptures, replacement) {
  26929. var tailPos = position + matched.length;
  26930. var m = captures.length;
  26931. var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
  26932. if (namedCaptures !== undefined) {
  26933. namedCaptures = toObject(namedCaptures);
  26934. symbols = SUBSTITUTION_SYMBOLS;
  26935. }
  26936. return replace.call(replacement, symbols, function (match, ch) {
  26937. var capture;
  26938. switch (ch.charAt(0)) {
  26939. case '$': return '$';
  26940. case '&': return matched;
  26941. case '`': return str.slice(0, position);
  26942. case "'": return str.slice(tailPos);
  26943. case '<':
  26944. capture = namedCaptures[ch.slice(1, -1)];
  26945. break;
  26946. default: // \d\d?
  26947. var n = +ch;
  26948. if (n === 0) return match;
  26949. if (n > m) {
  26950. var f = floor(n / 10);
  26951. if (f === 0) return match;
  26952. if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
  26953. return match;
  26954. }
  26955. capture = captures[n - 1];
  26956. }
  26957. return capture === undefined ? '' : capture;
  26958. });
  26959. };
  26960. /***/ }),
  26961. /***/ 7854:
  26962. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_53970__) {
  26963. var check = function (it) {
  26964. return it && it.Math == Math && it;
  26965. };
  26966. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  26967. module.exports =
  26968. /* global globalThis -- safe */
  26969. check(typeof globalThis == 'object' && globalThis) ||
  26970. check(typeof window == 'object' && window) ||
  26971. check(typeof self == 'object' && self) ||
  26972. check(typeof __nested_webpack_require_53970__.g == 'object' && __nested_webpack_require_53970__.g) ||
  26973. // eslint-disable-next-line no-new-func -- fallback
  26974. (function () { return this; })() || Function('return this')();
  26975. /***/ }),
  26976. /***/ 6656:
  26977. /***/ (function(module) {
  26978. var hasOwnProperty = {}.hasOwnProperty;
  26979. module.exports = function (it, key) {
  26980. return hasOwnProperty.call(it, key);
  26981. };
  26982. /***/ }),
  26983. /***/ 3501:
  26984. /***/ (function(module) {
  26985. module.exports = {};
  26986. /***/ }),
  26987. /***/ 490:
  26988. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_54852__) {
  26989. var getBuiltIn = __nested_webpack_require_54852__(5005);
  26990. module.exports = getBuiltIn('document', 'documentElement');
  26991. /***/ }),
  26992. /***/ 4664:
  26993. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_55056__) {
  26994. var DESCRIPTORS = __nested_webpack_require_55056__(9781);
  26995. var fails = __nested_webpack_require_55056__(7293);
  26996. var createElement = __nested_webpack_require_55056__(317);
  26997. // Thank's IE8 for his funny defineProperty
  26998. module.exports = !DESCRIPTORS && !fails(function () {
  26999. return Object.defineProperty(createElement('div'), 'a', {
  27000. get: function () { return 7; }
  27001. }).a != 7;
  27002. });
  27003. /***/ }),
  27004. /***/ 1179:
  27005. /***/ (function(module) {
  27006. // IEEE754 conversions based on https://github.com/feross/ieee754
  27007. var abs = Math.abs;
  27008. var pow = Math.pow;
  27009. var floor = Math.floor;
  27010. var log = Math.log;
  27011. var LN2 = Math.LN2;
  27012. var pack = function (number, mantissaLength, bytes) {
  27013. var buffer = new Array(bytes);
  27014. var exponentLength = bytes * 8 - mantissaLength - 1;
  27015. var eMax = (1 << exponentLength) - 1;
  27016. var eBias = eMax >> 1;
  27017. var rt = mantissaLength === 23 ? pow(2, -24) - pow(2, -77) : 0;
  27018. var sign = number < 0 || number === 0 && 1 / number < 0 ? 1 : 0;
  27019. var index = 0;
  27020. var exponent, mantissa, c;
  27021. number = abs(number);
  27022. // eslint-disable-next-line no-self-compare -- NaN check
  27023. if (number != number || number === Infinity) {
  27024. // eslint-disable-next-line no-self-compare -- NaN check
  27025. mantissa = number != number ? 1 : 0;
  27026. exponent = eMax;
  27027. } else {
  27028. exponent = floor(log(number) / LN2);
  27029. if (number * (c = pow(2, -exponent)) < 1) {
  27030. exponent--;
  27031. c *= 2;
  27032. }
  27033. if (exponent + eBias >= 1) {
  27034. number += rt / c;
  27035. } else {
  27036. number += rt * pow(2, 1 - eBias);
  27037. }
  27038. if (number * c >= 2) {
  27039. exponent++;
  27040. c /= 2;
  27041. }
  27042. if (exponent + eBias >= eMax) {
  27043. mantissa = 0;
  27044. exponent = eMax;
  27045. } else if (exponent + eBias >= 1) {
  27046. mantissa = (number * c - 1) * pow(2, mantissaLength);
  27047. exponent = exponent + eBias;
  27048. } else {
  27049. mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength);
  27050. exponent = 0;
  27051. }
  27052. }
  27053. for (; mantissaLength >= 8; buffer[index++] = mantissa & 255, mantissa /= 256, mantissaLength -= 8);
  27054. exponent = exponent << mantissaLength | mantissa;
  27055. exponentLength += mantissaLength;
  27056. for (; exponentLength > 0; buffer[index++] = exponent & 255, exponent /= 256, exponentLength -= 8);
  27057. buffer[--index] |= sign * 128;
  27058. return buffer;
  27059. };
  27060. var unpack = function (buffer, mantissaLength) {
  27061. var bytes = buffer.length;
  27062. var exponentLength = bytes * 8 - mantissaLength - 1;
  27063. var eMax = (1 << exponentLength) - 1;
  27064. var eBias = eMax >> 1;
  27065. var nBits = exponentLength - 7;
  27066. var index = bytes - 1;
  27067. var sign = buffer[index--];
  27068. var exponent = sign & 127;
  27069. var mantissa;
  27070. sign >>= 7;
  27071. for (; nBits > 0; exponent = exponent * 256 + buffer[index], index--, nBits -= 8);
  27072. mantissa = exponent & (1 << -nBits) - 1;
  27073. exponent >>= -nBits;
  27074. nBits += mantissaLength;
  27075. for (; nBits > 0; mantissa = mantissa * 256 + buffer[index], index--, nBits -= 8);
  27076. if (exponent === 0) {
  27077. exponent = 1 - eBias;
  27078. } else if (exponent === eMax) {
  27079. return mantissa ? NaN : sign ? -Infinity : Infinity;
  27080. } else {
  27081. mantissa = mantissa + pow(2, mantissaLength);
  27082. exponent = exponent - eBias;
  27083. } return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength);
  27084. };
  27085. module.exports = {
  27086. pack: pack,
  27087. unpack: unpack
  27088. };
  27089. /***/ }),
  27090. /***/ 8361:
  27091. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_58329__) {
  27092. var fails = __nested_webpack_require_58329__(7293);
  27093. var classof = __nested_webpack_require_58329__(4326);
  27094. var split = ''.split;
  27095. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  27096. module.exports = fails(function () {
  27097. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  27098. // eslint-disable-next-line no-prototype-builtins -- safe
  27099. return !Object('z').propertyIsEnumerable(0);
  27100. }) ? function (it) {
  27101. return classof(it) == 'String' ? split.call(it, '') : Object(it);
  27102. } : Object;
  27103. /***/ }),
  27104. /***/ 9587:
  27105. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_58925__) {
  27106. var isObject = __nested_webpack_require_58925__(111);
  27107. var setPrototypeOf = __nested_webpack_require_58925__(7674);
  27108. // makes subclassing work correct for wrapped built-ins
  27109. module.exports = function ($this, dummy, Wrapper) {
  27110. var NewTarget, NewTargetPrototype;
  27111. if (
  27112. // it can work only with native `setPrototypeOf`
  27113. setPrototypeOf &&
  27114. // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
  27115. typeof (NewTarget = dummy.constructor) == 'function' &&
  27116. NewTarget !== Wrapper &&
  27117. isObject(NewTargetPrototype = NewTarget.prototype) &&
  27118. NewTargetPrototype !== Wrapper.prototype
  27119. ) setPrototypeOf($this, NewTargetPrototype);
  27120. return $this;
  27121. };
  27122. /***/ }),
  27123. /***/ 2788:
  27124. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_59686__) {
  27125. var store = __nested_webpack_require_59686__(5465);
  27126. var functionToString = Function.toString;
  27127. // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
  27128. if (typeof store.inspectSource != 'function') {
  27129. store.inspectSource = function (it) {
  27130. return functionToString.call(it);
  27131. };
  27132. }
  27133. module.exports = store.inspectSource;
  27134. /***/ }),
  27135. /***/ 9909:
  27136. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_60112__) {
  27137. var NATIVE_WEAK_MAP = __nested_webpack_require_60112__(8536);
  27138. var global = __nested_webpack_require_60112__(7854);
  27139. var isObject = __nested_webpack_require_60112__(111);
  27140. var createNonEnumerableProperty = __nested_webpack_require_60112__(8880);
  27141. var objectHas = __nested_webpack_require_60112__(6656);
  27142. var shared = __nested_webpack_require_60112__(5465);
  27143. var sharedKey = __nested_webpack_require_60112__(6200);
  27144. var hiddenKeys = __nested_webpack_require_60112__(3501);
  27145. var WeakMap = global.WeakMap;
  27146. var set, get, has;
  27147. var enforce = function (it) {
  27148. return has(it) ? get(it) : set(it, {});
  27149. };
  27150. var getterFor = function (TYPE) {
  27151. return function (it) {
  27152. var state;
  27153. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  27154. throw TypeError('Incompatible receiver, ' + TYPE + ' required');
  27155. } return state;
  27156. };
  27157. };
  27158. if (NATIVE_WEAK_MAP) {
  27159. var store = shared.state || (shared.state = new WeakMap());
  27160. var wmget = store.get;
  27161. var wmhas = store.has;
  27162. var wmset = store.set;
  27163. set = function (it, metadata) {
  27164. metadata.facade = it;
  27165. wmset.call(store, it, metadata);
  27166. return metadata;
  27167. };
  27168. get = function (it) {
  27169. return wmget.call(store, it) || {};
  27170. };
  27171. has = function (it) {
  27172. return wmhas.call(store, it);
  27173. };
  27174. } else {
  27175. var STATE = sharedKey('state');
  27176. hiddenKeys[STATE] = true;
  27177. set = function (it, metadata) {
  27178. metadata.facade = it;
  27179. createNonEnumerableProperty(it, STATE, metadata);
  27180. return metadata;
  27181. };
  27182. get = function (it) {
  27183. return objectHas(it, STATE) ? it[STATE] : {};
  27184. };
  27185. has = function (it) {
  27186. return objectHas(it, STATE);
  27187. };
  27188. }
  27189. module.exports = {
  27190. set: set,
  27191. get: get,
  27192. has: has,
  27193. enforce: enforce,
  27194. getterFor: getterFor
  27195. };
  27196. /***/ }),
  27197. /***/ 7659:
  27198. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_61804__) {
  27199. var wellKnownSymbol = __nested_webpack_require_61804__(5112);
  27200. var Iterators = __nested_webpack_require_61804__(7497);
  27201. var ITERATOR = wellKnownSymbol('iterator');
  27202. var ArrayPrototype = Array.prototype;
  27203. // check on default Array iterator
  27204. module.exports = function (it) {
  27205. return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
  27206. };
  27207. /***/ }),
  27208. /***/ 3157:
  27209. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_62240__) {
  27210. var classof = __nested_webpack_require_62240__(4326);
  27211. // `IsArray` abstract operation
  27212. // https://tc39.es/ecma262/#sec-isarray
  27213. module.exports = Array.isArray || function isArray(arg) {
  27214. return classof(arg) == 'Array';
  27215. };
  27216. /***/ }),
  27217. /***/ 4705:
  27218. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_62548__) {
  27219. var fails = __nested_webpack_require_62548__(7293);
  27220. var replacement = /#|\.prototype\./;
  27221. var isForced = function (feature, detection) {
  27222. var value = data[normalize(feature)];
  27223. return value == POLYFILL ? true
  27224. : value == NATIVE ? false
  27225. : typeof detection == 'function' ? fails(detection)
  27226. : !!detection;
  27227. };
  27228. var normalize = isForced.normalize = function (string) {
  27229. return String(string).replace(replacement, '.').toLowerCase();
  27230. };
  27231. var data = isForced.data = {};
  27232. var NATIVE = isForced.NATIVE = 'N';
  27233. var POLYFILL = isForced.POLYFILL = 'P';
  27234. module.exports = isForced;
  27235. /***/ }),
  27236. /***/ 111:
  27237. /***/ (function(module) {
  27238. module.exports = function (it) {
  27239. return typeof it === 'object' ? it !== null : typeof it === 'function';
  27240. };
  27241. /***/ }),
  27242. /***/ 1913:
  27243. /***/ (function(module) {
  27244. module.exports = false;
  27245. /***/ }),
  27246. /***/ 7850:
  27247. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_63453__) {
  27248. var isObject = __nested_webpack_require_63453__(111);
  27249. var classof = __nested_webpack_require_63453__(4326);
  27250. var wellKnownSymbol = __nested_webpack_require_63453__(5112);
  27251. var MATCH = wellKnownSymbol('match');
  27252. // `IsRegExp` abstract operation
  27253. // https://tc39.es/ecma262/#sec-isregexp
  27254. module.exports = function (it) {
  27255. var isRegExp;
  27256. return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');
  27257. };
  27258. /***/ }),
  27259. /***/ 9212:
  27260. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_63953__) {
  27261. var anObject = __nested_webpack_require_63953__(9670);
  27262. module.exports = function (iterator) {
  27263. var returnMethod = iterator['return'];
  27264. if (returnMethod !== undefined) {
  27265. return anObject(returnMethod.call(iterator)).value;
  27266. }
  27267. };
  27268. /***/ }),
  27269. /***/ 3383:
  27270. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_64274__) {
  27271. "use strict";
  27272. var fails = __nested_webpack_require_64274__(7293);
  27273. var getPrototypeOf = __nested_webpack_require_64274__(9518);
  27274. var createNonEnumerableProperty = __nested_webpack_require_64274__(8880);
  27275. var has = __nested_webpack_require_64274__(6656);
  27276. var wellKnownSymbol = __nested_webpack_require_64274__(5112);
  27277. var IS_PURE = __nested_webpack_require_64274__(1913);
  27278. var ITERATOR = wellKnownSymbol('iterator');
  27279. var BUGGY_SAFARI_ITERATORS = false;
  27280. var returnThis = function () { return this; };
  27281. // `%IteratorPrototype%` object
  27282. // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
  27283. var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
  27284. if ([].keys) {
  27285. arrayIterator = [].keys();
  27286. // Safari 8 has buggy iterators w/o `next`
  27287. if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
  27288. else {
  27289. PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
  27290. if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
  27291. }
  27292. }
  27293. var NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {
  27294. var test = {};
  27295. // FF44- legacy iterators case
  27296. return IteratorPrototype[ITERATOR].call(test) !== test;
  27297. });
  27298. if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};
  27299. // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
  27300. if ((!IS_PURE || NEW_ITERATOR_PROTOTYPE) && !has(IteratorPrototype, ITERATOR)) {
  27301. createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);
  27302. }
  27303. module.exports = {
  27304. IteratorPrototype: IteratorPrototype,
  27305. BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
  27306. };
  27307. /***/ }),
  27308. /***/ 7497:
  27309. /***/ (function(module) {
  27310. module.exports = {};
  27311. /***/ }),
  27312. /***/ 133:
  27313. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_65970__) {
  27314. var fails = __nested_webpack_require_65970__(7293);
  27315. module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
  27316. // Chrome 38 Symbol has incorrect toString conversion
  27317. /* global Symbol -- required for testing */
  27318. return !String(Symbol());
  27319. });
  27320. /***/ }),
  27321. /***/ 590:
  27322. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_66314__) {
  27323. var fails = __nested_webpack_require_66314__(7293);
  27324. var wellKnownSymbol = __nested_webpack_require_66314__(5112);
  27325. var IS_PURE = __nested_webpack_require_66314__(1913);
  27326. var ITERATOR = wellKnownSymbol('iterator');
  27327. module.exports = !fails(function () {
  27328. var url = new URL('b?a=1&b=2&c=3', 'http://a');
  27329. var searchParams = url.searchParams;
  27330. var result = '';
  27331. url.pathname = 'c%20d';
  27332. searchParams.forEach(function (value, key) {
  27333. searchParams['delete']('b');
  27334. result += key + value;
  27335. });
  27336. return (IS_PURE && !url.toJSON)
  27337. || !searchParams.sort
  27338. || url.href !== 'http://a/c%20d?a=1&c=3'
  27339. || searchParams.get('c') !== '3'
  27340. || String(new URLSearchParams('?a=1')) !== 'a=1'
  27341. || !searchParams[ITERATOR]
  27342. // throws in Edge
  27343. || new URL('https://a@b').username !== 'a'
  27344. || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'
  27345. // not punycoded in Edge
  27346. || new URL('http://тест').host !== 'xn--e1aybc'
  27347. // not escaped in Chrome 62-
  27348. || new URL('http://a#б').hash !== '#%D0%B1'
  27349. // fails in Chrome 66-
  27350. || result !== 'a1c3'
  27351. // throws in Safari
  27352. || new URL('http://x', undefined).host !== 'x';
  27353. });
  27354. /***/ }),
  27355. /***/ 8536:
  27356. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_67534__) {
  27357. var global = __nested_webpack_require_67534__(7854);
  27358. var inspectSource = __nested_webpack_require_67534__(2788);
  27359. var WeakMap = global.WeakMap;
  27360. module.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
  27361. /***/ }),
  27362. /***/ 1574:
  27363. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_67846__) {
  27364. "use strict";
  27365. var DESCRIPTORS = __nested_webpack_require_67846__(9781);
  27366. var fails = __nested_webpack_require_67846__(7293);
  27367. var objectKeys = __nested_webpack_require_67846__(1956);
  27368. var getOwnPropertySymbolsModule = __nested_webpack_require_67846__(5181);
  27369. var propertyIsEnumerableModule = __nested_webpack_require_67846__(5296);
  27370. var toObject = __nested_webpack_require_67846__(7908);
  27371. var IndexedObject = __nested_webpack_require_67846__(8361);
  27372. var nativeAssign = Object.assign;
  27373. var defineProperty = Object.defineProperty;
  27374. // `Object.assign` method
  27375. // https://tc39.es/ecma262/#sec-object.assign
  27376. module.exports = !nativeAssign || fails(function () {
  27377. // should have correct order of operations (Edge bug)
  27378. if (DESCRIPTORS && nativeAssign({ b: 1 }, nativeAssign(defineProperty({}, 'a', {
  27379. enumerable: true,
  27380. get: function () {
  27381. defineProperty(this, 'b', {
  27382. value: 3,
  27383. enumerable: false
  27384. });
  27385. }
  27386. }), { b: 2 })).b !== 1) return true;
  27387. // should work with symbols and should have deterministic property order (V8 bug)
  27388. var A = {};
  27389. var B = {};
  27390. /* global Symbol -- required for testing */
  27391. var symbol = Symbol();
  27392. var alphabet = 'abcdefghijklmnopqrst';
  27393. A[symbol] = 7;
  27394. alphabet.split('').forEach(function (chr) { B[chr] = chr; });
  27395. return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;
  27396. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
  27397. var T = toObject(target);
  27398. var argumentsLength = arguments.length;
  27399. var index = 1;
  27400. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  27401. var propertyIsEnumerable = propertyIsEnumerableModule.f;
  27402. while (argumentsLength > index) {
  27403. var S = IndexedObject(arguments[index++]);
  27404. var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
  27405. var length = keys.length;
  27406. var j = 0;
  27407. var key;
  27408. while (length > j) {
  27409. key = keys[j++];
  27410. if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];
  27411. }
  27412. } return T;
  27413. } : nativeAssign;
  27414. /***/ }),
  27415. /***/ 30:
  27416. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_69941__) {
  27417. var anObject = __nested_webpack_require_69941__(9670);
  27418. var defineProperties = __nested_webpack_require_69941__(6048);
  27419. var enumBugKeys = __nested_webpack_require_69941__(748);
  27420. var hiddenKeys = __nested_webpack_require_69941__(3501);
  27421. var html = __nested_webpack_require_69941__(490);
  27422. var documentCreateElement = __nested_webpack_require_69941__(317);
  27423. var sharedKey = __nested_webpack_require_69941__(6200);
  27424. var GT = '>';
  27425. var LT = '<';
  27426. var PROTOTYPE = 'prototype';
  27427. var SCRIPT = 'script';
  27428. var IE_PROTO = sharedKey('IE_PROTO');
  27429. var EmptyConstructor = function () { /* empty */ };
  27430. var scriptTag = function (content) {
  27431. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  27432. };
  27433. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  27434. var NullProtoObjectViaActiveX = function (activeXDocument) {
  27435. activeXDocument.write(scriptTag(''));
  27436. activeXDocument.close();
  27437. var temp = activeXDocument.parentWindow.Object;
  27438. activeXDocument = null; // avoid memory leak
  27439. return temp;
  27440. };
  27441. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  27442. var NullProtoObjectViaIFrame = function () {
  27443. // Thrash, waste and sodomy: IE GC bug
  27444. var iframe = documentCreateElement('iframe');
  27445. var JS = 'java' + SCRIPT + ':';
  27446. var iframeDocument;
  27447. iframe.style.display = 'none';
  27448. html.appendChild(iframe);
  27449. // https://github.com/zloirock/core-js/issues/475
  27450. iframe.src = String(JS);
  27451. iframeDocument = iframe.contentWindow.document;
  27452. iframeDocument.open();
  27453. iframeDocument.write(scriptTag('document.F=Object'));
  27454. iframeDocument.close();
  27455. return iframeDocument.F;
  27456. };
  27457. // Check for document.domain and active x support
  27458. // No need to use active x approach when document.domain is not set
  27459. // see https://github.com/es-shims/es5-shim/issues/150
  27460. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  27461. // avoid IE GC bug
  27462. var activeXDocument;
  27463. var NullProtoObject = function () {
  27464. try {
  27465. /* global ActiveXObject -- old IE */
  27466. activeXDocument = document.domain && new ActiveXObject('htmlfile');
  27467. } catch (error) { /* ignore */ }
  27468. NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
  27469. var length = enumBugKeys.length;
  27470. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  27471. return NullProtoObject();
  27472. };
  27473. hiddenKeys[IE_PROTO] = true;
  27474. // `Object.create` method
  27475. // https://tc39.es/ecma262/#sec-object.create
  27476. module.exports = Object.create || function create(O, Properties) {
  27477. var result;
  27478. if (O !== null) {
  27479. EmptyConstructor[PROTOTYPE] = anObject(O);
  27480. result = new EmptyConstructor();
  27481. EmptyConstructor[PROTOTYPE] = null;
  27482. // add "__proto__" for Object.getPrototypeOf polyfill
  27483. result[IE_PROTO] = O;
  27484. } else result = NullProtoObject();
  27485. return Properties === undefined ? result : defineProperties(result, Properties);
  27486. };
  27487. /***/ }),
  27488. /***/ 6048:
  27489. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_72835__) {
  27490. var DESCRIPTORS = __nested_webpack_require_72835__(9781);
  27491. var definePropertyModule = __nested_webpack_require_72835__(3070);
  27492. var anObject = __nested_webpack_require_72835__(9670);
  27493. var objectKeys = __nested_webpack_require_72835__(1956);
  27494. // `Object.defineProperties` method
  27495. // https://tc39.es/ecma262/#sec-object.defineproperties
  27496. module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {
  27497. anObject(O);
  27498. var keys = objectKeys(Properties);
  27499. var length = keys.length;
  27500. var index = 0;
  27501. var key;
  27502. while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);
  27503. return O;
  27504. };
  27505. /***/ }),
  27506. /***/ 3070:
  27507. /***/ (function(__unused_webpack_module, exports, __nested_webpack_require_73525__) {
  27508. var DESCRIPTORS = __nested_webpack_require_73525__(9781);
  27509. var IE8_DOM_DEFINE = __nested_webpack_require_73525__(4664);
  27510. var anObject = __nested_webpack_require_73525__(9670);
  27511. var toPrimitive = __nested_webpack_require_73525__(7593);
  27512. var nativeDefineProperty = Object.defineProperty;
  27513. // `Object.defineProperty` method
  27514. // https://tc39.es/ecma262/#sec-object.defineproperty
  27515. exports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
  27516. anObject(O);
  27517. P = toPrimitive(P, true);
  27518. anObject(Attributes);
  27519. if (IE8_DOM_DEFINE) try {
  27520. return nativeDefineProperty(O, P, Attributes);
  27521. } catch (error) { /* empty */ }
  27522. if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
  27523. if ('value' in Attributes) O[P] = Attributes.value;
  27524. return O;
  27525. };
  27526. /***/ }),
  27527. /***/ 1236:
  27528. /***/ (function(__unused_webpack_module, exports, __nested_webpack_require_74380__) {
  27529. var DESCRIPTORS = __nested_webpack_require_74380__(9781);
  27530. var propertyIsEnumerableModule = __nested_webpack_require_74380__(5296);
  27531. var createPropertyDescriptor = __nested_webpack_require_74380__(9114);
  27532. var toIndexedObject = __nested_webpack_require_74380__(5656);
  27533. var toPrimitive = __nested_webpack_require_74380__(7593);
  27534. var has = __nested_webpack_require_74380__(6656);
  27535. var IE8_DOM_DEFINE = __nested_webpack_require_74380__(4664);
  27536. var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  27537. // `Object.getOwnPropertyDescriptor` method
  27538. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  27539. exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  27540. O = toIndexedObject(O);
  27541. P = toPrimitive(P, true);
  27542. if (IE8_DOM_DEFINE) try {
  27543. return nativeGetOwnPropertyDescriptor(O, P);
  27544. } catch (error) { /* empty */ }
  27545. if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);
  27546. };
  27547. /***/ }),
  27548. /***/ 8006:
  27549. /***/ (function(__unused_webpack_module, exports, __nested_webpack_require_75368__) {
  27550. var internalObjectKeys = __nested_webpack_require_75368__(6324);
  27551. var enumBugKeys = __nested_webpack_require_75368__(748);
  27552. var hiddenKeys = enumBugKeys.concat('length', 'prototype');
  27553. // `Object.getOwnPropertyNames` method
  27554. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  27555. exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  27556. return internalObjectKeys(O, hiddenKeys);
  27557. };
  27558. /***/ }),
  27559. /***/ 5181:
  27560. /***/ (function(__unused_webpack_module, exports) {
  27561. exports.f = Object.getOwnPropertySymbols;
  27562. /***/ }),
  27563. /***/ 9518:
  27564. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_75966__) {
  27565. var has = __nested_webpack_require_75966__(6656);
  27566. var toObject = __nested_webpack_require_75966__(7908);
  27567. var sharedKey = __nested_webpack_require_75966__(6200);
  27568. var CORRECT_PROTOTYPE_GETTER = __nested_webpack_require_75966__(8544);
  27569. var IE_PROTO = sharedKey('IE_PROTO');
  27570. var ObjectPrototype = Object.prototype;
  27571. // `Object.getPrototypeOf` method
  27572. // https://tc39.es/ecma262/#sec-object.getprototypeof
  27573. module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {
  27574. O = toObject(O);
  27575. if (has(O, IE_PROTO)) return O[IE_PROTO];
  27576. if (typeof O.constructor == 'function' && O instanceof O.constructor) {
  27577. return O.constructor.prototype;
  27578. } return O instanceof Object ? ObjectPrototype : null;
  27579. };
  27580. /***/ }),
  27581. /***/ 6324:
  27582. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_76729__) {
  27583. var has = __nested_webpack_require_76729__(6656);
  27584. var toIndexedObject = __nested_webpack_require_76729__(5656);
  27585. var indexOf = __nested_webpack_require_76729__(1318).indexOf;
  27586. var hiddenKeys = __nested_webpack_require_76729__(3501);
  27587. module.exports = function (object, names) {
  27588. var O = toIndexedObject(object);
  27589. var i = 0;
  27590. var result = [];
  27591. var key;
  27592. for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
  27593. // Don't enum bug & hidden keys
  27594. while (names.length > i) if (has(O, key = names[i++])) {
  27595. ~indexOf(result, key) || result.push(key);
  27596. }
  27597. return result;
  27598. };
  27599. /***/ }),
  27600. /***/ 1956:
  27601. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_77369__) {
  27602. var internalObjectKeys = __nested_webpack_require_77369__(6324);
  27603. var enumBugKeys = __nested_webpack_require_77369__(748);
  27604. // `Object.keys` method
  27605. // https://tc39.es/ecma262/#sec-object.keys
  27606. module.exports = Object.keys || function keys(O) {
  27607. return internalObjectKeys(O, enumBugKeys);
  27608. };
  27609. /***/ }),
  27610. /***/ 5296:
  27611. /***/ (function(__unused_webpack_module, exports) {
  27612. "use strict";
  27613. var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
  27614. var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  27615. // Nashorn ~ JDK8 bug
  27616. var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
  27617. // `Object.prototype.propertyIsEnumerable` method implementation
  27618. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  27619. exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  27620. var descriptor = getOwnPropertyDescriptor(this, V);
  27621. return !!descriptor && descriptor.enumerable;
  27622. } : nativePropertyIsEnumerable;
  27623. /***/ }),
  27624. /***/ 7674:
  27625. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_78394__) {
  27626. /* eslint-disable no-proto -- safe */
  27627. var anObject = __nested_webpack_require_78394__(9670);
  27628. var aPossiblePrototype = __nested_webpack_require_78394__(6077);
  27629. // `Object.setPrototypeOf` method
  27630. // https://tc39.es/ecma262/#sec-object.setprototypeof
  27631. // Works with __proto__ only. Old v8 can't work with null proto objects.
  27632. module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
  27633. var CORRECT_SETTER = false;
  27634. var test = {};
  27635. var setter;
  27636. try {
  27637. setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
  27638. setter.call(test, []);
  27639. CORRECT_SETTER = test instanceof Array;
  27640. } catch (error) { /* empty */ }
  27641. return function setPrototypeOf(O, proto) {
  27642. anObject(O);
  27643. aPossiblePrototype(proto);
  27644. if (CORRECT_SETTER) setter.call(O, proto);
  27645. else O.__proto__ = proto;
  27646. return O;
  27647. };
  27648. }() : undefined);
  27649. /***/ }),
  27650. /***/ 288:
  27651. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_79325__) {
  27652. "use strict";
  27653. var TO_STRING_TAG_SUPPORT = __nested_webpack_require_79325__(1694);
  27654. var classof = __nested_webpack_require_79325__(648);
  27655. // `Object.prototype.toString` method implementation
  27656. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  27657. module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {
  27658. return '[object ' + classof(this) + ']';
  27659. };
  27660. /***/ }),
  27661. /***/ 3887:
  27662. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_79769__) {
  27663. var getBuiltIn = __nested_webpack_require_79769__(5005);
  27664. var getOwnPropertyNamesModule = __nested_webpack_require_79769__(8006);
  27665. var getOwnPropertySymbolsModule = __nested_webpack_require_79769__(5181);
  27666. var anObject = __nested_webpack_require_79769__(9670);
  27667. // all object keys, includes non-enumerable and symbols
  27668. module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  27669. var keys = getOwnPropertyNamesModule.f(anObject(it));
  27670. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  27671. return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
  27672. };
  27673. /***/ }),
  27674. /***/ 857:
  27675. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_80406__) {
  27676. var global = __nested_webpack_require_80406__(7854);
  27677. module.exports = global;
  27678. /***/ }),
  27679. /***/ 2248:
  27680. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_80571__) {
  27681. var redefine = __nested_webpack_require_80571__(1320);
  27682. module.exports = function (target, src, options) {
  27683. for (var key in src) redefine(target, key, src[key], options);
  27684. return target;
  27685. };
  27686. /***/ }),
  27687. /***/ 1320:
  27688. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_80849__) {
  27689. var global = __nested_webpack_require_80849__(7854);
  27690. var createNonEnumerableProperty = __nested_webpack_require_80849__(8880);
  27691. var has = __nested_webpack_require_80849__(6656);
  27692. var setGlobal = __nested_webpack_require_80849__(3505);
  27693. var inspectSource = __nested_webpack_require_80849__(2788);
  27694. var InternalStateModule = __nested_webpack_require_80849__(9909);
  27695. var getInternalState = InternalStateModule.get;
  27696. var enforceInternalState = InternalStateModule.enforce;
  27697. var TEMPLATE = String(String).split('String');
  27698. (module.exports = function (O, key, value, options) {
  27699. var unsafe = options ? !!options.unsafe : false;
  27700. var simple = options ? !!options.enumerable : false;
  27701. var noTargetGet = options ? !!options.noTargetGet : false;
  27702. var state;
  27703. if (typeof value == 'function') {
  27704. if (typeof key == 'string' && !has(value, 'name')) {
  27705. createNonEnumerableProperty(value, 'name', key);
  27706. }
  27707. state = enforceInternalState(value);
  27708. if (!state.source) {
  27709. state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
  27710. }
  27711. }
  27712. if (O === global) {
  27713. if (simple) O[key] = value;
  27714. else setGlobal(key, value);
  27715. return;
  27716. } else if (!unsafe) {
  27717. delete O[key];
  27718. } else if (!noTargetGet && O[key]) {
  27719. simple = true;
  27720. }
  27721. if (simple) O[key] = value;
  27722. else createNonEnumerableProperty(O, key, value);
  27723. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  27724. })(Function.prototype, 'toString', function toString() {
  27725. return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
  27726. });
  27727. /***/ }),
  27728. /***/ 7651:
  27729. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_82466__) {
  27730. var classof = __nested_webpack_require_82466__(4326);
  27731. var regexpExec = __nested_webpack_require_82466__(2261);
  27732. // `RegExpExec` abstract operation
  27733. // https://tc39.es/ecma262/#sec-regexpexec
  27734. module.exports = function (R, S) {
  27735. var exec = R.exec;
  27736. if (typeof exec === 'function') {
  27737. var result = exec.call(R, S);
  27738. if (typeof result !== 'object') {
  27739. throw TypeError('RegExp exec method returned something other than an Object or null');
  27740. }
  27741. return result;
  27742. }
  27743. if (classof(R) !== 'RegExp') {
  27744. throw TypeError('RegExp#exec called on incompatible receiver');
  27745. }
  27746. return regexpExec.call(R, S);
  27747. };
  27748. /***/ }),
  27749. /***/ 2261:
  27750. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_83158__) {
  27751. "use strict";
  27752. var regexpFlags = __nested_webpack_require_83158__(7066);
  27753. var stickyHelpers = __nested_webpack_require_83158__(2999);
  27754. var nativeExec = RegExp.prototype.exec;
  27755. // This always refers to the native implementation, because the
  27756. // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
  27757. // which loads this file before patching the method.
  27758. var nativeReplace = String.prototype.replace;
  27759. var patchedExec = nativeExec;
  27760. var UPDATES_LAST_INDEX_WRONG = (function () {
  27761. var re1 = /a/;
  27762. var re2 = /b*/g;
  27763. nativeExec.call(re1, 'a');
  27764. nativeExec.call(re2, 'a');
  27765. return re1.lastIndex !== 0 || re2.lastIndex !== 0;
  27766. })();
  27767. var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET;
  27768. // nonparticipating capturing group, copied from es5-shim's String#split patch.
  27769. // eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing
  27770. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
  27771. var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y;
  27772. if (PATCH) {
  27773. patchedExec = function exec(str) {
  27774. var re = this;
  27775. var lastIndex, reCopy, match, i;
  27776. var sticky = UNSUPPORTED_Y && re.sticky;
  27777. var flags = regexpFlags.call(re);
  27778. var source = re.source;
  27779. var charsAdded = 0;
  27780. var strCopy = str;
  27781. if (sticky) {
  27782. flags = flags.replace('y', '');
  27783. if (flags.indexOf('g') === -1) {
  27784. flags += 'g';
  27785. }
  27786. strCopy = String(str).slice(re.lastIndex);
  27787. // Support anchored sticky behavior.
  27788. if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) {
  27789. source = '(?: ' + source + ')';
  27790. strCopy = ' ' + strCopy;
  27791. charsAdded++;
  27792. }
  27793. // ^(? + rx + ) is needed, in combination with some str slicing, to
  27794. // simulate the 'y' flag.
  27795. reCopy = new RegExp('^(?:' + source + ')', flags);
  27796. }
  27797. if (NPCG_INCLUDED) {
  27798. reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
  27799. }
  27800. if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
  27801. match = nativeExec.call(sticky ? reCopy : re, strCopy);
  27802. if (sticky) {
  27803. if (match) {
  27804. match.input = match.input.slice(charsAdded);
  27805. match[0] = match[0].slice(charsAdded);
  27806. match.index = re.lastIndex;
  27807. re.lastIndex += match[0].length;
  27808. } else re.lastIndex = 0;
  27809. } else if (UPDATES_LAST_INDEX_WRONG && match) {
  27810. re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
  27811. }
  27812. if (NPCG_INCLUDED && match && match.length > 1) {
  27813. // Fix browsers whose `exec` methods don't consistently return `undefined`
  27814. // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
  27815. nativeReplace.call(match[0], reCopy, function () {
  27816. for (i = 1; i < arguments.length - 2; i++) {
  27817. if (arguments[i] === undefined) match[i] = undefined;
  27818. }
  27819. });
  27820. }
  27821. return match;
  27822. };
  27823. }
  27824. module.exports = patchedExec;
  27825. /***/ }),
  27826. /***/ 7066:
  27827. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_86176__) {
  27828. "use strict";
  27829. var anObject = __nested_webpack_require_86176__(9670);
  27830. // `RegExp.prototype.flags` getter implementation
  27831. // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
  27832. module.exports = function () {
  27833. var that = anObject(this);
  27834. var result = '';
  27835. if (that.global) result += 'g';
  27836. if (that.ignoreCase) result += 'i';
  27837. if (that.multiline) result += 'm';
  27838. if (that.dotAll) result += 's';
  27839. if (that.unicode) result += 'u';
  27840. if (that.sticky) result += 'y';
  27841. return result;
  27842. };
  27843. /***/ }),
  27844. /***/ 2999:
  27845. /***/ (function(__unused_webpack_module, exports, __nested_webpack_require_86753__) {
  27846. "use strict";
  27847. var fails = __nested_webpack_require_86753__(7293);
  27848. // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
  27849. // so we use an intermediate function.
  27850. function RE(s, f) {
  27851. return RegExp(s, f);
  27852. }
  27853. exports.UNSUPPORTED_Y = fails(function () {
  27854. // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
  27855. var re = RE('a', 'y');
  27856. re.lastIndex = 2;
  27857. return re.exec('abcd') != null;
  27858. });
  27859. exports.BROKEN_CARET = fails(function () {
  27860. // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
  27861. var re = RE('^r', 'gy');
  27862. re.lastIndex = 2;
  27863. return re.exec('str') != null;
  27864. });
  27865. /***/ }),
  27866. /***/ 4488:
  27867. /***/ (function(module) {
  27868. // `RequireObjectCoercible` abstract operation
  27869. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  27870. module.exports = function (it) {
  27871. if (it == undefined) throw TypeError("Can't call method on " + it);
  27872. return it;
  27873. };
  27874. /***/ }),
  27875. /***/ 3505:
  27876. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_87737__) {
  27877. var global = __nested_webpack_require_87737__(7854);
  27878. var createNonEnumerableProperty = __nested_webpack_require_87737__(8880);
  27879. module.exports = function (key, value) {
  27880. try {
  27881. createNonEnumerableProperty(global, key, value);
  27882. } catch (error) {
  27883. global[key] = value;
  27884. } return value;
  27885. };
  27886. /***/ }),
  27887. /***/ 6340:
  27888. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_88106__) {
  27889. "use strict";
  27890. var getBuiltIn = __nested_webpack_require_88106__(5005);
  27891. var definePropertyModule = __nested_webpack_require_88106__(3070);
  27892. var wellKnownSymbol = __nested_webpack_require_88106__(5112);
  27893. var DESCRIPTORS = __nested_webpack_require_88106__(9781);
  27894. var SPECIES = wellKnownSymbol('species');
  27895. module.exports = function (CONSTRUCTOR_NAME) {
  27896. var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
  27897. var defineProperty = definePropertyModule.f;
  27898. if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {
  27899. defineProperty(Constructor, SPECIES, {
  27900. configurable: true,
  27901. get: function () { return this; }
  27902. });
  27903. }
  27904. };
  27905. /***/ }),
  27906. /***/ 8003:
  27907. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_88786__) {
  27908. var defineProperty = __nested_webpack_require_88786__(3070).f;
  27909. var has = __nested_webpack_require_88786__(6656);
  27910. var wellKnownSymbol = __nested_webpack_require_88786__(5112);
  27911. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  27912. module.exports = function (it, TAG, STATIC) {
  27913. if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
  27914. defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });
  27915. }
  27916. };
  27917. /***/ }),
  27918. /***/ 6200:
  27919. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_89271__) {
  27920. var shared = __nested_webpack_require_89271__(2309);
  27921. var uid = __nested_webpack_require_89271__(9711);
  27922. var keys = shared('keys');
  27923. module.exports = function (key) {
  27924. return keys[key] || (keys[key] = uid(key));
  27925. };
  27926. /***/ }),
  27927. /***/ 5465:
  27928. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_89559__) {
  27929. var global = __nested_webpack_require_89559__(7854);
  27930. var setGlobal = __nested_webpack_require_89559__(3505);
  27931. var SHARED = '__core-js_shared__';
  27932. var store = global[SHARED] || setGlobal(SHARED, {});
  27933. module.exports = store;
  27934. /***/ }),
  27935. /***/ 2309:
  27936. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_89855__) {
  27937. var IS_PURE = __nested_webpack_require_89855__(1913);
  27938. var store = __nested_webpack_require_89855__(5465);
  27939. (module.exports = function (key, value) {
  27940. return store[key] || (store[key] = value !== undefined ? value : {});
  27941. })('versions', []).push({
  27942. version: '3.9.0',
  27943. mode: IS_PURE ? 'pure' : 'global',
  27944. copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
  27945. });
  27946. /***/ }),
  27947. /***/ 6707:
  27948. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_90288__) {
  27949. var anObject = __nested_webpack_require_90288__(9670);
  27950. var aFunction = __nested_webpack_require_90288__(3099);
  27951. var wellKnownSymbol = __nested_webpack_require_90288__(5112);
  27952. var SPECIES = wellKnownSymbol('species');
  27953. // `SpeciesConstructor` abstract operation
  27954. // https://tc39.es/ecma262/#sec-speciesconstructor
  27955. module.exports = function (O, defaultConstructor) {
  27956. var C = anObject(O).constructor;
  27957. var S;
  27958. return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S);
  27959. };
  27960. /***/ }),
  27961. /***/ 8710:
  27962. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_90863__) {
  27963. var toInteger = __nested_webpack_require_90863__(9958);
  27964. var requireObjectCoercible = __nested_webpack_require_90863__(4488);
  27965. // `String.prototype.{ codePointAt, at }` methods implementation
  27966. var createMethod = function (CONVERT_TO_STRING) {
  27967. return function ($this, pos) {
  27968. var S = String(requireObjectCoercible($this));
  27969. var position = toInteger(pos);
  27970. var size = S.length;
  27971. var first, second;
  27972. if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
  27973. first = S.charCodeAt(position);
  27974. return first < 0xD800 || first > 0xDBFF || position + 1 === size
  27975. || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
  27976. ? CONVERT_TO_STRING ? S.charAt(position) : first
  27977. : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
  27978. };
  27979. };
  27980. module.exports = {
  27981. // `String.prototype.codePointAt` method
  27982. // https://tc39.es/ecma262/#sec-string.prototype.codepointat
  27983. codeAt: createMethod(false),
  27984. // `String.prototype.at` method
  27985. // https://github.com/mathiasbynens/String.prototype.at
  27986. charAt: createMethod(true)
  27987. };
  27988. /***/ }),
  27989. /***/ 3197:
  27990. /***/ (function(module) {
  27991. "use strict";
  27992. // based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js
  27993. var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
  27994. var base = 36;
  27995. var tMin = 1;
  27996. var tMax = 26;
  27997. var skew = 38;
  27998. var damp = 700;
  27999. var initialBias = 72;
  28000. var initialN = 128; // 0x80
  28001. var delimiter = '-'; // '\x2D'
  28002. var regexNonASCII = /[^\0-\u007E]/; // non-ASCII chars
  28003. var regexSeparators = /[.\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
  28004. var OVERFLOW_ERROR = 'Overflow: input needs wider integers to process';
  28005. var baseMinusTMin = base - tMin;
  28006. var floor = Math.floor;
  28007. var stringFromCharCode = String.fromCharCode;
  28008. /**
  28009. * Creates an array containing the numeric code points of each Unicode
  28010. * character in the string. While JavaScript uses UCS-2 internally,
  28011. * this function will convert a pair of surrogate halves (each of which
  28012. * UCS-2 exposes as separate characters) into a single code point,
  28013. * matching UTF-16.
  28014. */
  28015. var ucs2decode = function (string) {
  28016. var output = [];
  28017. var counter = 0;
  28018. var length = string.length;
  28019. while (counter < length) {
  28020. var value = string.charCodeAt(counter++);
  28021. if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
  28022. // It's a high surrogate, and there is a next character.
  28023. var extra = string.charCodeAt(counter++);
  28024. if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.
  28025. output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
  28026. } else {
  28027. // It's an unmatched surrogate; only append this code unit, in case the
  28028. // next code unit is the high surrogate of a surrogate pair.
  28029. output.push(value);
  28030. counter--;
  28031. }
  28032. } else {
  28033. output.push(value);
  28034. }
  28035. }
  28036. return output;
  28037. };
  28038. /**
  28039. * Converts a digit/integer into a basic code point.
  28040. */
  28041. var digitToBasic = function (digit) {
  28042. // 0..25 map to ASCII a..z or A..Z
  28043. // 26..35 map to ASCII 0..9
  28044. return digit + 22 + 75 * (digit < 26);
  28045. };
  28046. /**
  28047. * Bias adaptation function as per section 3.4 of RFC 3492.
  28048. * https://tools.ietf.org/html/rfc3492#section-3.4
  28049. */
  28050. var adapt = function (delta, numPoints, firstTime) {
  28051. var k = 0;
  28052. delta = firstTime ? floor(delta / damp) : delta >> 1;
  28053. delta += floor(delta / numPoints);
  28054. for (; delta > baseMinusTMin * tMax >> 1; k += base) {
  28055. delta = floor(delta / baseMinusTMin);
  28056. }
  28057. return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
  28058. };
  28059. /**
  28060. * Converts a string of Unicode symbols (e.g. a domain name label) to a
  28061. * Punycode string of ASCII-only symbols.
  28062. */
  28063. // eslint-disable-next-line max-statements -- TODO
  28064. var encode = function (input) {
  28065. var output = [];
  28066. // Convert the input in UCS-2 to an array of Unicode code points.
  28067. input = ucs2decode(input);
  28068. // Cache the length.
  28069. var inputLength = input.length;
  28070. // Initialize the state.
  28071. var n = initialN;
  28072. var delta = 0;
  28073. var bias = initialBias;
  28074. var i, currentValue;
  28075. // Handle the basic code points.
  28076. for (i = 0; i < input.length; i++) {
  28077. currentValue = input[i];
  28078. if (currentValue < 0x80) {
  28079. output.push(stringFromCharCode(currentValue));
  28080. }
  28081. }
  28082. var basicLength = output.length; // number of basic code points.
  28083. var handledCPCount = basicLength; // number of code points that have been handled;
  28084. // Finish the basic string with a delimiter unless it's empty.
  28085. if (basicLength) {
  28086. output.push(delimiter);
  28087. }
  28088. // Main encoding loop:
  28089. while (handledCPCount < inputLength) {
  28090. // All non-basic code points < n have been handled already. Find the next larger one:
  28091. var m = maxInt;
  28092. for (i = 0; i < input.length; i++) {
  28093. currentValue = input[i];
  28094. if (currentValue >= n && currentValue < m) {
  28095. m = currentValue;
  28096. }
  28097. }
  28098. // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, but guard against overflow.
  28099. var handledCPCountPlusOne = handledCPCount + 1;
  28100. if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
  28101. throw RangeError(OVERFLOW_ERROR);
  28102. }
  28103. delta += (m - n) * handledCPCountPlusOne;
  28104. n = m;
  28105. for (i = 0; i < input.length; i++) {
  28106. currentValue = input[i];
  28107. if (currentValue < n && ++delta > maxInt) {
  28108. throw RangeError(OVERFLOW_ERROR);
  28109. }
  28110. if (currentValue == n) {
  28111. // Represent delta as a generalized variable-length integer.
  28112. var q = delta;
  28113. for (var k = base; /* no condition */; k += base) {
  28114. var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
  28115. if (q < t) break;
  28116. var qMinusT = q - t;
  28117. var baseMinusT = base - t;
  28118. output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT)));
  28119. q = floor(qMinusT / baseMinusT);
  28120. }
  28121. output.push(stringFromCharCode(digitToBasic(q)));
  28122. bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
  28123. delta = 0;
  28124. ++handledCPCount;
  28125. }
  28126. }
  28127. ++delta;
  28128. ++n;
  28129. }
  28130. return output.join('');
  28131. };
  28132. module.exports = function (input) {
  28133. var encoded = [];
  28134. var labels = input.toLowerCase().replace(regexSeparators, '\u002E').split('.');
  28135. var i, label;
  28136. for (i = 0; i < labels.length; i++) {
  28137. label = labels[i];
  28138. encoded.push(regexNonASCII.test(label) ? 'xn--' + encode(label) : label);
  28139. }
  28140. return encoded.join('.');
  28141. };
  28142. /***/ }),
  28143. /***/ 6091:
  28144. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_97360__) {
  28145. var fails = __nested_webpack_require_97360__(7293);
  28146. var whitespaces = __nested_webpack_require_97360__(1361);
  28147. var non = '\u200B\u0085\u180E';
  28148. // check that a method works with the correct list
  28149. // of whitespaces and has a correct name
  28150. module.exports = function (METHOD_NAME) {
  28151. return fails(function () {
  28152. return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;
  28153. });
  28154. };
  28155. /***/ }),
  28156. /***/ 3111:
  28157. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_97868__) {
  28158. var requireObjectCoercible = __nested_webpack_require_97868__(4488);
  28159. var whitespaces = __nested_webpack_require_97868__(1361);
  28160. var whitespace = '[' + whitespaces + ']';
  28161. var ltrim = RegExp('^' + whitespace + whitespace + '*');
  28162. var rtrim = RegExp(whitespace + whitespace + '*$');
  28163. // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
  28164. var createMethod = function (TYPE) {
  28165. return function ($this) {
  28166. var string = String(requireObjectCoercible($this));
  28167. if (TYPE & 1) string = string.replace(ltrim, '');
  28168. if (TYPE & 2) string = string.replace(rtrim, '');
  28169. return string;
  28170. };
  28171. };
  28172. module.exports = {
  28173. // `String.prototype.{ trimLeft, trimStart }` methods
  28174. // https://tc39.es/ecma262/#sec-string.prototype.trimstart
  28175. start: createMethod(1),
  28176. // `String.prototype.{ trimRight, trimEnd }` methods
  28177. // https://tc39.es/ecma262/#sec-string.prototype.trimend
  28178. end: createMethod(2),
  28179. // `String.prototype.trim` method
  28180. // https://tc39.es/ecma262/#sec-string.prototype.trim
  28181. trim: createMethod(3)
  28182. };
  28183. /***/ }),
  28184. /***/ 1400:
  28185. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_98992__) {
  28186. var toInteger = __nested_webpack_require_98992__(9958);
  28187. var max = Math.max;
  28188. var min = Math.min;
  28189. // Helper for a popular repeating case of the spec:
  28190. // Let integer be ? ToInteger(index).
  28191. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  28192. module.exports = function (index, length) {
  28193. var integer = toInteger(index);
  28194. return integer < 0 ? max(integer + length, 0) : min(integer, length);
  28195. };
  28196. /***/ }),
  28197. /***/ 7067:
  28198. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_99521__) {
  28199. var toInteger = __nested_webpack_require_99521__(9958);
  28200. var toLength = __nested_webpack_require_99521__(7466);
  28201. // `ToIndex` abstract operation
  28202. // https://tc39.es/ecma262/#sec-toindex
  28203. module.exports = function (it) {
  28204. if (it === undefined) return 0;
  28205. var number = toInteger(it);
  28206. var length = toLength(number);
  28207. if (number !== length) throw RangeError('Wrong length or index');
  28208. return length;
  28209. };
  28210. /***/ }),
  28211. /***/ 5656:
  28212. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_99996__) {
  28213. // toObject with fallback for non-array-like ES3 strings
  28214. var IndexedObject = __nested_webpack_require_99996__(8361);
  28215. var requireObjectCoercible = __nested_webpack_require_99996__(4488);
  28216. module.exports = function (it) {
  28217. return IndexedObject(requireObjectCoercible(it));
  28218. };
  28219. /***/ }),
  28220. /***/ 9958:
  28221. /***/ (function(module) {
  28222. var ceil = Math.ceil;
  28223. var floor = Math.floor;
  28224. // `ToInteger` abstract operation
  28225. // https://tc39.es/ecma262/#sec-tointeger
  28226. module.exports = function (argument) {
  28227. return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
  28228. };
  28229. /***/ }),
  28230. /***/ 7466:
  28231. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_100645__) {
  28232. var toInteger = __nested_webpack_require_100645__(9958);
  28233. var min = Math.min;
  28234. // `ToLength` abstract operation
  28235. // https://tc39.es/ecma262/#sec-tolength
  28236. module.exports = function (argument) {
  28237. return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  28238. };
  28239. /***/ }),
  28240. /***/ 7908:
  28241. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_101032__) {
  28242. var requireObjectCoercible = __nested_webpack_require_101032__(4488);
  28243. // `ToObject` abstract operation
  28244. // https://tc39.es/ecma262/#sec-toobject
  28245. module.exports = function (argument) {
  28246. return Object(requireObjectCoercible(argument));
  28247. };
  28248. /***/ }),
  28249. /***/ 4590:
  28250. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_101355__) {
  28251. var toPositiveInteger = __nested_webpack_require_101355__(3002);
  28252. module.exports = function (it, BYTES) {
  28253. var offset = toPositiveInteger(it);
  28254. if (offset % BYTES) throw RangeError('Wrong offset');
  28255. return offset;
  28256. };
  28257. /***/ }),
  28258. /***/ 3002:
  28259. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_101660__) {
  28260. var toInteger = __nested_webpack_require_101660__(9958);
  28261. module.exports = function (it) {
  28262. var result = toInteger(it);
  28263. if (result < 0) throw RangeError("The argument can't be less than 0");
  28264. return result;
  28265. };
  28266. /***/ }),
  28267. /***/ 7593:
  28268. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_101959__) {
  28269. var isObject = __nested_webpack_require_101959__(111);
  28270. // `ToPrimitive` abstract operation
  28271. // https://tc39.es/ecma262/#sec-toprimitive
  28272. // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  28273. // and the second argument - flag - preferred type is a string
  28274. module.exports = function (input, PREFERRED_STRING) {
  28275. if (!isObject(input)) return input;
  28276. var fn, val;
  28277. if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  28278. if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
  28279. if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  28280. throw TypeError("Can't convert object to primitive value");
  28281. };
  28282. /***/ }),
  28283. /***/ 1694:
  28284. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_102821__) {
  28285. var wellKnownSymbol = __nested_webpack_require_102821__(5112);
  28286. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  28287. var test = {};
  28288. test[TO_STRING_TAG] = 'z';
  28289. module.exports = String(test) === '[object z]';
  28290. /***/ }),
  28291. /***/ 9843:
  28292. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_103114__) {
  28293. "use strict";
  28294. var $ = __nested_webpack_require_103114__(2109);
  28295. var global = __nested_webpack_require_103114__(7854);
  28296. var DESCRIPTORS = __nested_webpack_require_103114__(9781);
  28297. var TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = __nested_webpack_require_103114__(3832);
  28298. var ArrayBufferViewCore = __nested_webpack_require_103114__(260);
  28299. var ArrayBufferModule = __nested_webpack_require_103114__(3331);
  28300. var anInstance = __nested_webpack_require_103114__(5787);
  28301. var createPropertyDescriptor = __nested_webpack_require_103114__(9114);
  28302. var createNonEnumerableProperty = __nested_webpack_require_103114__(8880);
  28303. var toLength = __nested_webpack_require_103114__(7466);
  28304. var toIndex = __nested_webpack_require_103114__(7067);
  28305. var toOffset = __nested_webpack_require_103114__(4590);
  28306. var toPrimitive = __nested_webpack_require_103114__(7593);
  28307. var has = __nested_webpack_require_103114__(6656);
  28308. var classof = __nested_webpack_require_103114__(648);
  28309. var isObject = __nested_webpack_require_103114__(111);
  28310. var create = __nested_webpack_require_103114__(30);
  28311. var setPrototypeOf = __nested_webpack_require_103114__(7674);
  28312. var getOwnPropertyNames = __nested_webpack_require_103114__(8006).f;
  28313. var typedArrayFrom = __nested_webpack_require_103114__(7321);
  28314. var forEach = __nested_webpack_require_103114__(2092).forEach;
  28315. var setSpecies = __nested_webpack_require_103114__(6340);
  28316. var definePropertyModule = __nested_webpack_require_103114__(3070);
  28317. var getOwnPropertyDescriptorModule = __nested_webpack_require_103114__(1236);
  28318. var InternalStateModule = __nested_webpack_require_103114__(9909);
  28319. var inheritIfRequired = __nested_webpack_require_103114__(9587);
  28320. var getInternalState = InternalStateModule.get;
  28321. var setInternalState = InternalStateModule.set;
  28322. var nativeDefineProperty = definePropertyModule.f;
  28323. var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  28324. var round = Math.round;
  28325. var RangeError = global.RangeError;
  28326. var ArrayBuffer = ArrayBufferModule.ArrayBuffer;
  28327. var DataView = ArrayBufferModule.DataView;
  28328. var NATIVE_ARRAY_BUFFER_VIEWS = ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;
  28329. var TYPED_ARRAY_TAG = ArrayBufferViewCore.TYPED_ARRAY_TAG;
  28330. var TypedArray = ArrayBufferViewCore.TypedArray;
  28331. var TypedArrayPrototype = ArrayBufferViewCore.TypedArrayPrototype;
  28332. var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
  28333. var isTypedArray = ArrayBufferViewCore.isTypedArray;
  28334. var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';
  28335. var WRONG_LENGTH = 'Wrong length';
  28336. var fromList = function (C, list) {
  28337. var index = 0;
  28338. var length = list.length;
  28339. var result = new (aTypedArrayConstructor(C))(length);
  28340. while (length > index) result[index] = list[index++];
  28341. return result;
  28342. };
  28343. var addGetter = function (it, key) {
  28344. nativeDefineProperty(it, key, { get: function () {
  28345. return getInternalState(this)[key];
  28346. } });
  28347. };
  28348. var isArrayBuffer = function (it) {
  28349. var klass;
  28350. return it instanceof ArrayBuffer || (klass = classof(it)) == 'ArrayBuffer' || klass == 'SharedArrayBuffer';
  28351. };
  28352. var isTypedArrayIndex = function (target, key) {
  28353. return isTypedArray(target)
  28354. && typeof key != 'symbol'
  28355. && key in target
  28356. && String(+key) == String(key);
  28357. };
  28358. var wrappedGetOwnPropertyDescriptor = function getOwnPropertyDescriptor(target, key) {
  28359. return isTypedArrayIndex(target, key = toPrimitive(key, true))
  28360. ? createPropertyDescriptor(2, target[key])
  28361. : nativeGetOwnPropertyDescriptor(target, key);
  28362. };
  28363. var wrappedDefineProperty = function defineProperty(target, key, descriptor) {
  28364. if (isTypedArrayIndex(target, key = toPrimitive(key, true))
  28365. && isObject(descriptor)
  28366. && has(descriptor, 'value')
  28367. && !has(descriptor, 'get')
  28368. && !has(descriptor, 'set')
  28369. // TODO: add validation descriptor w/o calling accessors
  28370. && !descriptor.configurable
  28371. && (!has(descriptor, 'writable') || descriptor.writable)
  28372. && (!has(descriptor, 'enumerable') || descriptor.enumerable)
  28373. ) {
  28374. target[key] = descriptor.value;
  28375. return target;
  28376. } return nativeDefineProperty(target, key, descriptor);
  28377. };
  28378. if (DESCRIPTORS) {
  28379. if (!NATIVE_ARRAY_BUFFER_VIEWS) {
  28380. getOwnPropertyDescriptorModule.f = wrappedGetOwnPropertyDescriptor;
  28381. definePropertyModule.f = wrappedDefineProperty;
  28382. addGetter(TypedArrayPrototype, 'buffer');
  28383. addGetter(TypedArrayPrototype, 'byteOffset');
  28384. addGetter(TypedArrayPrototype, 'byteLength');
  28385. addGetter(TypedArrayPrototype, 'length');
  28386. }
  28387. $({ target: 'Object', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, {
  28388. getOwnPropertyDescriptor: wrappedGetOwnPropertyDescriptor,
  28389. defineProperty: wrappedDefineProperty
  28390. });
  28391. module.exports = function (TYPE, wrapper, CLAMPED) {
  28392. var BYTES = TYPE.match(/\d+$/)[0] / 8;
  28393. var CONSTRUCTOR_NAME = TYPE + (CLAMPED ? 'Clamped' : '') + 'Array';
  28394. var GETTER = 'get' + TYPE;
  28395. var SETTER = 'set' + TYPE;
  28396. var NativeTypedArrayConstructor = global[CONSTRUCTOR_NAME];
  28397. var TypedArrayConstructor = NativeTypedArrayConstructor;
  28398. var TypedArrayConstructorPrototype = TypedArrayConstructor && TypedArrayConstructor.prototype;
  28399. var exported = {};
  28400. var getter = function (that, index) {
  28401. var data = getInternalState(that);
  28402. return data.view[GETTER](index * BYTES + data.byteOffset, true);
  28403. };
  28404. var setter = function (that, index, value) {
  28405. var data = getInternalState(that);
  28406. if (CLAMPED) value = (value = round(value)) < 0 ? 0 : value > 0xFF ? 0xFF : value & 0xFF;
  28407. data.view[SETTER](index * BYTES + data.byteOffset, value, true);
  28408. };
  28409. var addElement = function (that, index) {
  28410. nativeDefineProperty(that, index, {
  28411. get: function () {
  28412. return getter(this, index);
  28413. },
  28414. set: function (value) {
  28415. return setter(this, index, value);
  28416. },
  28417. enumerable: true
  28418. });
  28419. };
  28420. if (!NATIVE_ARRAY_BUFFER_VIEWS) {
  28421. TypedArrayConstructor = wrapper(function (that, data, offset, $length) {
  28422. anInstance(that, TypedArrayConstructor, CONSTRUCTOR_NAME);
  28423. var index = 0;
  28424. var byteOffset = 0;
  28425. var buffer, byteLength, length;
  28426. if (!isObject(data)) {
  28427. length = toIndex(data);
  28428. byteLength = length * BYTES;
  28429. buffer = new ArrayBuffer(byteLength);
  28430. } else if (isArrayBuffer(data)) {
  28431. buffer = data;
  28432. byteOffset = toOffset(offset, BYTES);
  28433. var $len = data.byteLength;
  28434. if ($length === undefined) {
  28435. if ($len % BYTES) throw RangeError(WRONG_LENGTH);
  28436. byteLength = $len - byteOffset;
  28437. if (byteLength < 0) throw RangeError(WRONG_LENGTH);
  28438. } else {
  28439. byteLength = toLength($length) * BYTES;
  28440. if (byteLength + byteOffset > $len) throw RangeError(WRONG_LENGTH);
  28441. }
  28442. length = byteLength / BYTES;
  28443. } else if (isTypedArray(data)) {
  28444. return fromList(TypedArrayConstructor, data);
  28445. } else {
  28446. return typedArrayFrom.call(TypedArrayConstructor, data);
  28447. }
  28448. setInternalState(that, {
  28449. buffer: buffer,
  28450. byteOffset: byteOffset,
  28451. byteLength: byteLength,
  28452. length: length,
  28453. view: new DataView(buffer)
  28454. });
  28455. while (index < length) addElement(that, index++);
  28456. });
  28457. if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);
  28458. TypedArrayConstructorPrototype = TypedArrayConstructor.prototype = create(TypedArrayPrototype);
  28459. } else if (TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS) {
  28460. TypedArrayConstructor = wrapper(function (dummy, data, typedArrayOffset, $length) {
  28461. anInstance(dummy, TypedArrayConstructor, CONSTRUCTOR_NAME);
  28462. return inheritIfRequired(function () {
  28463. if (!isObject(data)) return new NativeTypedArrayConstructor(toIndex(data));
  28464. if (isArrayBuffer(data)) return $length !== undefined
  28465. ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES), $length)
  28466. : typedArrayOffset !== undefined
  28467. ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES))
  28468. : new NativeTypedArrayConstructor(data);
  28469. if (isTypedArray(data)) return fromList(TypedArrayConstructor, data);
  28470. return typedArrayFrom.call(TypedArrayConstructor, data);
  28471. }(), dummy, TypedArrayConstructor);
  28472. });
  28473. if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);
  28474. forEach(getOwnPropertyNames(NativeTypedArrayConstructor), function (key) {
  28475. if (!(key in TypedArrayConstructor)) {
  28476. createNonEnumerableProperty(TypedArrayConstructor, key, NativeTypedArrayConstructor[key]);
  28477. }
  28478. });
  28479. TypedArrayConstructor.prototype = TypedArrayConstructorPrototype;
  28480. }
  28481. if (TypedArrayConstructorPrototype.constructor !== TypedArrayConstructor) {
  28482. createNonEnumerableProperty(TypedArrayConstructorPrototype, 'constructor', TypedArrayConstructor);
  28483. }
  28484. if (TYPED_ARRAY_TAG) {
  28485. createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_TAG, CONSTRUCTOR_NAME);
  28486. }
  28487. exported[CONSTRUCTOR_NAME] = TypedArrayConstructor;
  28488. $({
  28489. global: true, forced: TypedArrayConstructor != NativeTypedArrayConstructor, sham: !NATIVE_ARRAY_BUFFER_VIEWS
  28490. }, exported);
  28491. if (!(BYTES_PER_ELEMENT in TypedArrayConstructor)) {
  28492. createNonEnumerableProperty(TypedArrayConstructor, BYTES_PER_ELEMENT, BYTES);
  28493. }
  28494. if (!(BYTES_PER_ELEMENT in TypedArrayConstructorPrototype)) {
  28495. createNonEnumerableProperty(TypedArrayConstructorPrototype, BYTES_PER_ELEMENT, BYTES);
  28496. }
  28497. setSpecies(CONSTRUCTOR_NAME);
  28498. };
  28499. } else module.exports = function () { /* empty */ };
  28500. /***/ }),
  28501. /***/ 3832:
  28502. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_112503__) {
  28503. /* eslint-disable no-new -- required for testing */
  28504. var global = __nested_webpack_require_112503__(7854);
  28505. var fails = __nested_webpack_require_112503__(7293);
  28506. var checkCorrectnessOfIteration = __nested_webpack_require_112503__(7072);
  28507. var NATIVE_ARRAY_BUFFER_VIEWS = __nested_webpack_require_112503__(260).NATIVE_ARRAY_BUFFER_VIEWS;
  28508. var ArrayBuffer = global.ArrayBuffer;
  28509. var Int8Array = global.Int8Array;
  28510. module.exports = !NATIVE_ARRAY_BUFFER_VIEWS || !fails(function () {
  28511. Int8Array(1);
  28512. }) || !fails(function () {
  28513. new Int8Array(-1);
  28514. }) || !checkCorrectnessOfIteration(function (iterable) {
  28515. new Int8Array();
  28516. new Int8Array(null);
  28517. new Int8Array(1.5);
  28518. new Int8Array(iterable);
  28519. }, true) || fails(function () {
  28520. // Safari (11+) bug - a reason why even Safari 13 should load a typed array polyfill
  28521. return new Int8Array(new ArrayBuffer(2), 1, undefined).length !== 1;
  28522. });
  28523. /***/ }),
  28524. /***/ 3074:
  28525. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_113426__) {
  28526. var aTypedArrayConstructor = __nested_webpack_require_113426__(260).aTypedArrayConstructor;
  28527. var speciesConstructor = __nested_webpack_require_113426__(6707);
  28528. module.exports = function (instance, list) {
  28529. var C = speciesConstructor(instance, instance.constructor);
  28530. var index = 0;
  28531. var length = list.length;
  28532. var result = new (aTypedArrayConstructor(C))(length);
  28533. while (length > index) result[index] = list[index++];
  28534. return result;
  28535. };
  28536. /***/ }),
  28537. /***/ 7321:
  28538. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_113940__) {
  28539. var toObject = __nested_webpack_require_113940__(7908);
  28540. var toLength = __nested_webpack_require_113940__(7466);
  28541. var getIteratorMethod = __nested_webpack_require_113940__(1246);
  28542. var isArrayIteratorMethod = __nested_webpack_require_113940__(7659);
  28543. var bind = __nested_webpack_require_113940__(9974);
  28544. var aTypedArrayConstructor = __nested_webpack_require_113940__(260).aTypedArrayConstructor;
  28545. module.exports = function from(source /* , mapfn, thisArg */) {
  28546. var O = toObject(source);
  28547. var argumentsLength = arguments.length;
  28548. var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
  28549. var mapping = mapfn !== undefined;
  28550. var iteratorMethod = getIteratorMethod(O);
  28551. var i, length, result, step, iterator, next;
  28552. if (iteratorMethod != undefined && !isArrayIteratorMethod(iteratorMethod)) {
  28553. iterator = iteratorMethod.call(O);
  28554. next = iterator.next;
  28555. O = [];
  28556. while (!(step = next.call(iterator)).done) {
  28557. O.push(step.value);
  28558. }
  28559. }
  28560. if (mapping && argumentsLength > 2) {
  28561. mapfn = bind(mapfn, arguments[2], 2);
  28562. }
  28563. length = toLength(O.length);
  28564. result = new (aTypedArrayConstructor(this))(length);
  28565. for (i = 0; length > i; i++) {
  28566. result[i] = mapping ? mapfn(O[i], i) : O[i];
  28567. }
  28568. return result;
  28569. };
  28570. /***/ }),
  28571. /***/ 9711:
  28572. /***/ (function(module) {
  28573. var id = 0;
  28574. var postfix = Math.random();
  28575. module.exports = function (key) {
  28576. return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
  28577. };
  28578. /***/ }),
  28579. /***/ 3307:
  28580. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_115419__) {
  28581. var NATIVE_SYMBOL = __nested_webpack_require_115419__(133);
  28582. module.exports = NATIVE_SYMBOL
  28583. /* global Symbol -- safe */
  28584. && !Symbol.sham
  28585. && typeof Symbol.iterator == 'symbol';
  28586. /***/ }),
  28587. /***/ 5112:
  28588. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_115685__) {
  28589. var global = __nested_webpack_require_115685__(7854);
  28590. var shared = __nested_webpack_require_115685__(2309);
  28591. var has = __nested_webpack_require_115685__(6656);
  28592. var uid = __nested_webpack_require_115685__(9711);
  28593. var NATIVE_SYMBOL = __nested_webpack_require_115685__(133);
  28594. var USE_SYMBOL_AS_UID = __nested_webpack_require_115685__(3307);
  28595. var WellKnownSymbolsStore = shared('wks');
  28596. var Symbol = global.Symbol;
  28597. var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;
  28598. module.exports = function (name) {
  28599. if (!has(WellKnownSymbolsStore, name)) {
  28600. if (NATIVE_SYMBOL && has(Symbol, name)) WellKnownSymbolsStore[name] = Symbol[name];
  28601. else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
  28602. } return WellKnownSymbolsStore[name];
  28603. };
  28604. /***/ }),
  28605. /***/ 1361:
  28606. /***/ (function(module) {
  28607. // a string of all valid unicode whitespaces
  28608. module.exports = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
  28609. '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
  28610. /***/ }),
  28611. /***/ 8264:
  28612. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_116785__) {
  28613. "use strict";
  28614. var $ = __nested_webpack_require_116785__(2109);
  28615. var global = __nested_webpack_require_116785__(7854);
  28616. var arrayBufferModule = __nested_webpack_require_116785__(3331);
  28617. var setSpecies = __nested_webpack_require_116785__(6340);
  28618. var ARRAY_BUFFER = 'ArrayBuffer';
  28619. var ArrayBuffer = arrayBufferModule[ARRAY_BUFFER];
  28620. var NativeArrayBuffer = global[ARRAY_BUFFER];
  28621. // `ArrayBuffer` constructor
  28622. // https://tc39.es/ecma262/#sec-arraybuffer-constructor
  28623. $({ global: true, forced: NativeArrayBuffer !== ArrayBuffer }, {
  28624. ArrayBuffer: ArrayBuffer
  28625. });
  28626. setSpecies(ARRAY_BUFFER);
  28627. /***/ }),
  28628. /***/ 2222:
  28629. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_117427__) {
  28630. "use strict";
  28631. var $ = __nested_webpack_require_117427__(2109);
  28632. var fails = __nested_webpack_require_117427__(7293);
  28633. var isArray = __nested_webpack_require_117427__(3157);
  28634. var isObject = __nested_webpack_require_117427__(111);
  28635. var toObject = __nested_webpack_require_117427__(7908);
  28636. var toLength = __nested_webpack_require_117427__(7466);
  28637. var createProperty = __nested_webpack_require_117427__(6135);
  28638. var arraySpeciesCreate = __nested_webpack_require_117427__(5417);
  28639. var arrayMethodHasSpeciesSupport = __nested_webpack_require_117427__(1194);
  28640. var wellKnownSymbol = __nested_webpack_require_117427__(5112);
  28641. var V8_VERSION = __nested_webpack_require_117427__(7392);
  28642. var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
  28643. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
  28644. var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
  28645. // We can't use this feature detection in V8 since it causes
  28646. // deoptimization and serious performance degradation
  28647. // https://github.com/zloirock/core-js/issues/679
  28648. var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {
  28649. var array = [];
  28650. array[IS_CONCAT_SPREADABLE] = false;
  28651. return array.concat()[0] !== array;
  28652. });
  28653. var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
  28654. var isConcatSpreadable = function (O) {
  28655. if (!isObject(O)) return false;
  28656. var spreadable = O[IS_CONCAT_SPREADABLE];
  28657. return spreadable !== undefined ? !!spreadable : isArray(O);
  28658. };
  28659. var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
  28660. // `Array.prototype.concat` method
  28661. // https://tc39.es/ecma262/#sec-array.prototype.concat
  28662. // with adding support of @@isConcatSpreadable and @@species
  28663. $({ target: 'Array', proto: true, forced: FORCED }, {
  28664. // eslint-disable-next-line no-unused-vars -- required for `.length`
  28665. concat: function concat(arg) {
  28666. var O = toObject(this);
  28667. var A = arraySpeciesCreate(O, 0);
  28668. var n = 0;
  28669. var i, k, length, len, E;
  28670. for (i = -1, length = arguments.length; i < length; i++) {
  28671. E = i === -1 ? O : arguments[i];
  28672. if (isConcatSpreadable(E)) {
  28673. len = toLength(E.length);
  28674. if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  28675. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  28676. } else {
  28677. if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  28678. createProperty(A, n++, E);
  28679. }
  28680. }
  28681. A.length = n;
  28682. return A;
  28683. }
  28684. });
  28685. /***/ }),
  28686. /***/ 7327:
  28687. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_119834__) {
  28688. "use strict";
  28689. var $ = __nested_webpack_require_119834__(2109);
  28690. var $filter = __nested_webpack_require_119834__(2092).filter;
  28691. var arrayMethodHasSpeciesSupport = __nested_webpack_require_119834__(1194);
  28692. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
  28693. // `Array.prototype.filter` method
  28694. // https://tc39.es/ecma262/#sec-array.prototype.filter
  28695. // with adding support of @@species
  28696. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  28697. filter: function filter(callbackfn /* , thisArg */) {
  28698. return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  28699. }
  28700. });
  28701. /***/ }),
  28702. /***/ 2772:
  28703. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_120523__) {
  28704. "use strict";
  28705. var $ = __nested_webpack_require_120523__(2109);
  28706. var $indexOf = __nested_webpack_require_120523__(1318).indexOf;
  28707. var arrayMethodIsStrict = __nested_webpack_require_120523__(9341);
  28708. var nativeIndexOf = [].indexOf;
  28709. var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;
  28710. var STRICT_METHOD = arrayMethodIsStrict('indexOf');
  28711. // `Array.prototype.indexOf` method
  28712. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  28713. $({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD }, {
  28714. indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
  28715. return NEGATIVE_ZERO
  28716. // convert -0 to +0
  28717. ? nativeIndexOf.apply(this, arguments) || 0
  28718. : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);
  28719. }
  28720. });
  28721. /***/ }),
  28722. /***/ 6992:
  28723. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_121364__) {
  28724. "use strict";
  28725. var toIndexedObject = __nested_webpack_require_121364__(5656);
  28726. var addToUnscopables = __nested_webpack_require_121364__(1223);
  28727. var Iterators = __nested_webpack_require_121364__(7497);
  28728. var InternalStateModule = __nested_webpack_require_121364__(9909);
  28729. var defineIterator = __nested_webpack_require_121364__(654);
  28730. var ARRAY_ITERATOR = 'Array Iterator';
  28731. var setInternalState = InternalStateModule.set;
  28732. var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
  28733. // `Array.prototype.entries` method
  28734. // https://tc39.es/ecma262/#sec-array.prototype.entries
  28735. // `Array.prototype.keys` method
  28736. // https://tc39.es/ecma262/#sec-array.prototype.keys
  28737. // `Array.prototype.values` method
  28738. // https://tc39.es/ecma262/#sec-array.prototype.values
  28739. // `Array.prototype[@@iterator]` method
  28740. // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
  28741. // `CreateArrayIterator` internal method
  28742. // https://tc39.es/ecma262/#sec-createarrayiterator
  28743. module.exports = defineIterator(Array, 'Array', function (iterated, kind) {
  28744. setInternalState(this, {
  28745. type: ARRAY_ITERATOR,
  28746. target: toIndexedObject(iterated), // target
  28747. index: 0, // next index
  28748. kind: kind // kind
  28749. });
  28750. // `%ArrayIteratorPrototype%.next` method
  28751. // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
  28752. }, function () {
  28753. var state = getInternalState(this);
  28754. var target = state.target;
  28755. var kind = state.kind;
  28756. var index = state.index++;
  28757. if (!target || index >= target.length) {
  28758. state.target = undefined;
  28759. return { value: undefined, done: true };
  28760. }
  28761. if (kind == 'keys') return { value: index, done: false };
  28762. if (kind == 'values') return { value: target[index], done: false };
  28763. return { value: [index, target[index]], done: false };
  28764. }, 'values');
  28765. // argumentsList[@@iterator] is %ArrayProto_values%
  28766. // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
  28767. // https://tc39.es/ecma262/#sec-createmappedargumentsobject
  28768. Iterators.Arguments = Iterators.Array;
  28769. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  28770. addToUnscopables('keys');
  28771. addToUnscopables('values');
  28772. addToUnscopables('entries');
  28773. /***/ }),
  28774. /***/ 1249:
  28775. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_123565__) {
  28776. "use strict";
  28777. var $ = __nested_webpack_require_123565__(2109);
  28778. var $map = __nested_webpack_require_123565__(2092).map;
  28779. var arrayMethodHasSpeciesSupport = __nested_webpack_require_123565__(1194);
  28780. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
  28781. // `Array.prototype.map` method
  28782. // https://tc39.es/ecma262/#sec-array.prototype.map
  28783. // with adding support of @@species
  28784. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  28785. map: function map(callbackfn /* , thisArg */) {
  28786. return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  28787. }
  28788. });
  28789. /***/ }),
  28790. /***/ 7042:
  28791. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_124230__) {
  28792. "use strict";
  28793. var $ = __nested_webpack_require_124230__(2109);
  28794. var isObject = __nested_webpack_require_124230__(111);
  28795. var isArray = __nested_webpack_require_124230__(3157);
  28796. var toAbsoluteIndex = __nested_webpack_require_124230__(1400);
  28797. var toLength = __nested_webpack_require_124230__(7466);
  28798. var toIndexedObject = __nested_webpack_require_124230__(5656);
  28799. var createProperty = __nested_webpack_require_124230__(6135);
  28800. var wellKnownSymbol = __nested_webpack_require_124230__(5112);
  28801. var arrayMethodHasSpeciesSupport = __nested_webpack_require_124230__(1194);
  28802. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');
  28803. var SPECIES = wellKnownSymbol('species');
  28804. var nativeSlice = [].slice;
  28805. var max = Math.max;
  28806. // `Array.prototype.slice` method
  28807. // https://tc39.es/ecma262/#sec-array.prototype.slice
  28808. // fallback for not array-like ES3 strings and DOM objects
  28809. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  28810. slice: function slice(start, end) {
  28811. var O = toIndexedObject(this);
  28812. var length = toLength(O.length);
  28813. var k = toAbsoluteIndex(start, length);
  28814. var fin = toAbsoluteIndex(end === undefined ? length : end, length);
  28815. // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
  28816. var Constructor, result, n;
  28817. if (isArray(O)) {
  28818. Constructor = O.constructor;
  28819. // cross-realm fallback
  28820. if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {
  28821. Constructor = undefined;
  28822. } else if (isObject(Constructor)) {
  28823. Constructor = Constructor[SPECIES];
  28824. if (Constructor === null) Constructor = undefined;
  28825. }
  28826. if (Constructor === Array || Constructor === undefined) {
  28827. return nativeSlice.call(O, k, fin);
  28828. }
  28829. }
  28830. result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));
  28831. for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
  28832. result.length = n;
  28833. return result;
  28834. }
  28835. });
  28836. /***/ }),
  28837. /***/ 561:
  28838. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_126211__) {
  28839. "use strict";
  28840. var $ = __nested_webpack_require_126211__(2109);
  28841. var toAbsoluteIndex = __nested_webpack_require_126211__(1400);
  28842. var toInteger = __nested_webpack_require_126211__(9958);
  28843. var toLength = __nested_webpack_require_126211__(7466);
  28844. var toObject = __nested_webpack_require_126211__(7908);
  28845. var arraySpeciesCreate = __nested_webpack_require_126211__(5417);
  28846. var createProperty = __nested_webpack_require_126211__(6135);
  28847. var arrayMethodHasSpeciesSupport = __nested_webpack_require_126211__(1194);
  28848. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');
  28849. var max = Math.max;
  28850. var min = Math.min;
  28851. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
  28852. var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';
  28853. // `Array.prototype.splice` method
  28854. // https://tc39.es/ecma262/#sec-array.prototype.splice
  28855. // with adding support of @@species
  28856. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  28857. splice: function splice(start, deleteCount /* , ...items */) {
  28858. var O = toObject(this);
  28859. var len = toLength(O.length);
  28860. var actualStart = toAbsoluteIndex(start, len);
  28861. var argumentsLength = arguments.length;
  28862. var insertCount, actualDeleteCount, A, k, from, to;
  28863. if (argumentsLength === 0) {
  28864. insertCount = actualDeleteCount = 0;
  28865. } else if (argumentsLength === 1) {
  28866. insertCount = 0;
  28867. actualDeleteCount = len - actualStart;
  28868. } else {
  28869. insertCount = argumentsLength - 2;
  28870. actualDeleteCount = min(max(toInteger(deleteCount), 0), len - actualStart);
  28871. }
  28872. if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {
  28873. throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);
  28874. }
  28875. A = arraySpeciesCreate(O, actualDeleteCount);
  28876. for (k = 0; k < actualDeleteCount; k++) {
  28877. from = actualStart + k;
  28878. if (from in O) createProperty(A, k, O[from]);
  28879. }
  28880. A.length = actualDeleteCount;
  28881. if (insertCount < actualDeleteCount) {
  28882. for (k = actualStart; k < len - actualDeleteCount; k++) {
  28883. from = k + actualDeleteCount;
  28884. to = k + insertCount;
  28885. if (from in O) O[to] = O[from];
  28886. else delete O[to];
  28887. }
  28888. for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];
  28889. } else if (insertCount > actualDeleteCount) {
  28890. for (k = len - actualDeleteCount; k > actualStart; k--) {
  28891. from = k + actualDeleteCount - 1;
  28892. to = k + insertCount - 1;
  28893. if (from in O) O[to] = O[from];
  28894. else delete O[to];
  28895. }
  28896. }
  28897. for (k = 0; k < insertCount; k++) {
  28898. O[k + actualStart] = arguments[k + 2];
  28899. }
  28900. O.length = len - actualDeleteCount + insertCount;
  28901. return A;
  28902. }
  28903. });
  28904. /***/ }),
  28905. /***/ 8309:
  28906. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_128857__) {
  28907. var DESCRIPTORS = __nested_webpack_require_128857__(9781);
  28908. var defineProperty = __nested_webpack_require_128857__(3070).f;
  28909. var FunctionPrototype = Function.prototype;
  28910. var FunctionPrototypeToString = FunctionPrototype.toString;
  28911. var nameRE = /^\s*function ([^ (]*)/;
  28912. var NAME = 'name';
  28913. // Function instances `.name` property
  28914. // https://tc39.es/ecma262/#sec-function-instances-name
  28915. if (DESCRIPTORS && !(NAME in FunctionPrototype)) {
  28916. defineProperty(FunctionPrototype, NAME, {
  28917. configurable: true,
  28918. get: function () {
  28919. try {
  28920. return FunctionPrototypeToString.call(this).match(nameRE)[1];
  28921. } catch (error) {
  28922. return '';
  28923. }
  28924. }
  28925. });
  28926. }
  28927. /***/ }),
  28928. /***/ 489:
  28929. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_129614__) {
  28930. var $ = __nested_webpack_require_129614__(2109);
  28931. var fails = __nested_webpack_require_129614__(7293);
  28932. var toObject = __nested_webpack_require_129614__(7908);
  28933. var nativeGetPrototypeOf = __nested_webpack_require_129614__(9518);
  28934. var CORRECT_PROTOTYPE_GETTER = __nested_webpack_require_129614__(8544);
  28935. var FAILS_ON_PRIMITIVES = fails(function () { nativeGetPrototypeOf(1); });
  28936. // `Object.getPrototypeOf` method
  28937. // https://tc39.es/ecma262/#sec-object.getprototypeof
  28938. $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PROTOTYPE_GETTER }, {
  28939. getPrototypeOf: function getPrototypeOf(it) {
  28940. return nativeGetPrototypeOf(toObject(it));
  28941. }
  28942. });
  28943. /***/ }),
  28944. /***/ 1539:
  28945. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_130327__) {
  28946. var TO_STRING_TAG_SUPPORT = __nested_webpack_require_130327__(1694);
  28947. var redefine = __nested_webpack_require_130327__(1320);
  28948. var toString = __nested_webpack_require_130327__(288);
  28949. // `Object.prototype.toString` method
  28950. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  28951. if (!TO_STRING_TAG_SUPPORT) {
  28952. redefine(Object.prototype, 'toString', toString, { unsafe: true });
  28953. }
  28954. /***/ }),
  28955. /***/ 4916:
  28956. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_130780__) {
  28957. "use strict";
  28958. var $ = __nested_webpack_require_130780__(2109);
  28959. var exec = __nested_webpack_require_130780__(2261);
  28960. // `RegExp.prototype.exec` method
  28961. // https://tc39.es/ecma262/#sec-regexp.prototype.exec
  28962. $({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
  28963. exec: exec
  28964. });
  28965. /***/ }),
  28966. /***/ 9714:
  28967. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_131156__) {
  28968. "use strict";
  28969. var redefine = __nested_webpack_require_131156__(1320);
  28970. var anObject = __nested_webpack_require_131156__(9670);
  28971. var fails = __nested_webpack_require_131156__(7293);
  28972. var flags = __nested_webpack_require_131156__(7066);
  28973. var TO_STRING = 'toString';
  28974. var RegExpPrototype = RegExp.prototype;
  28975. var nativeToString = RegExpPrototype[TO_STRING];
  28976. var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
  28977. // FF44- RegExp#toString has a wrong name
  28978. var INCORRECT_NAME = nativeToString.name != TO_STRING;
  28979. // `RegExp.prototype.toString` method
  28980. // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
  28981. if (NOT_GENERIC || INCORRECT_NAME) {
  28982. redefine(RegExp.prototype, TO_STRING, function toString() {
  28983. var R = anObject(this);
  28984. var p = String(R.source);
  28985. var rf = R.flags;
  28986. var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf);
  28987. return '/' + p + '/' + f;
  28988. }, { unsafe: true });
  28989. }
  28990. /***/ }),
  28991. /***/ 8783:
  28992. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_132221__) {
  28993. "use strict";
  28994. var charAt = __nested_webpack_require_132221__(8710).charAt;
  28995. var InternalStateModule = __nested_webpack_require_132221__(9909);
  28996. var defineIterator = __nested_webpack_require_132221__(654);
  28997. var STRING_ITERATOR = 'String Iterator';
  28998. var setInternalState = InternalStateModule.set;
  28999. var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);
  29000. // `String.prototype[@@iterator]` method
  29001. // https://tc39.es/ecma262/#sec-string.prototype-@@iterator
  29002. defineIterator(String, 'String', function (iterated) {
  29003. setInternalState(this, {
  29004. type: STRING_ITERATOR,
  29005. string: String(iterated),
  29006. index: 0
  29007. });
  29008. // `%StringIteratorPrototype%.next` method
  29009. // https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next
  29010. }, function next() {
  29011. var state = getInternalState(this);
  29012. var string = state.string;
  29013. var index = state.index;
  29014. var point;
  29015. if (index >= string.length) return { value: undefined, done: true };
  29016. point = charAt(string, index);
  29017. state.index += point.length;
  29018. return { value: point, done: false };
  29019. });
  29020. /***/ }),
  29021. /***/ 4723:
  29022. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_133333__) {
  29023. "use strict";
  29024. var fixRegExpWellKnownSymbolLogic = __nested_webpack_require_133333__(7007);
  29025. var anObject = __nested_webpack_require_133333__(9670);
  29026. var toLength = __nested_webpack_require_133333__(7466);
  29027. var requireObjectCoercible = __nested_webpack_require_133333__(4488);
  29028. var advanceStringIndex = __nested_webpack_require_133333__(1530);
  29029. var regExpExec = __nested_webpack_require_133333__(7651);
  29030. // @@match logic
  29031. fixRegExpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {
  29032. return [
  29033. // `String.prototype.match` method
  29034. // https://tc39.es/ecma262/#sec-string.prototype.match
  29035. function match(regexp) {
  29036. var O = requireObjectCoercible(this);
  29037. var matcher = regexp == undefined ? undefined : regexp[MATCH];
  29038. return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
  29039. },
  29040. // `RegExp.prototype[@@match]` method
  29041. // https://tc39.es/ecma262/#sec-regexp.prototype-@@match
  29042. function (regexp) {
  29043. var res = maybeCallNative(nativeMatch, regexp, this);
  29044. if (res.done) return res.value;
  29045. var rx = anObject(regexp);
  29046. var S = String(this);
  29047. if (!rx.global) return regExpExec(rx, S);
  29048. var fullUnicode = rx.unicode;
  29049. rx.lastIndex = 0;
  29050. var A = [];
  29051. var n = 0;
  29052. var result;
  29053. while ((result = regExpExec(rx, S)) !== null) {
  29054. var matchStr = String(result[0]);
  29055. A[n] = matchStr;
  29056. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  29057. n++;
  29058. }
  29059. return n === 0 ? null : A;
  29060. }
  29061. ];
  29062. });
  29063. /***/ }),
  29064. /***/ 5306:
  29065. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_134975__) {
  29066. "use strict";
  29067. var fixRegExpWellKnownSymbolLogic = __nested_webpack_require_134975__(7007);
  29068. var anObject = __nested_webpack_require_134975__(9670);
  29069. var toLength = __nested_webpack_require_134975__(7466);
  29070. var toInteger = __nested_webpack_require_134975__(9958);
  29071. var requireObjectCoercible = __nested_webpack_require_134975__(4488);
  29072. var advanceStringIndex = __nested_webpack_require_134975__(1530);
  29073. var getSubstitution = __nested_webpack_require_134975__(647);
  29074. var regExpExec = __nested_webpack_require_134975__(7651);
  29075. var max = Math.max;
  29076. var min = Math.min;
  29077. var maybeToString = function (it) {
  29078. return it === undefined ? it : String(it);
  29079. };
  29080. // @@replace logic
  29081. fixRegExpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {
  29082. var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;
  29083. var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0;
  29084. var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
  29085. return [
  29086. // `String.prototype.replace` method
  29087. // https://tc39.es/ecma262/#sec-string.prototype.replace
  29088. function replace(searchValue, replaceValue) {
  29089. var O = requireObjectCoercible(this);
  29090. var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
  29091. return replacer !== undefined
  29092. ? replacer.call(searchValue, O, replaceValue)
  29093. : nativeReplace.call(String(O), searchValue, replaceValue);
  29094. },
  29095. // `RegExp.prototype[@@replace]` method
  29096. // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
  29097. function (regexp, replaceValue) {
  29098. if (
  29099. (!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||
  29100. (typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1)
  29101. ) {
  29102. var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
  29103. if (res.done) return res.value;
  29104. }
  29105. var rx = anObject(regexp);
  29106. var S = String(this);
  29107. var functionalReplace = typeof replaceValue === 'function';
  29108. if (!functionalReplace) replaceValue = String(replaceValue);
  29109. var global = rx.global;
  29110. if (global) {
  29111. var fullUnicode = rx.unicode;
  29112. rx.lastIndex = 0;
  29113. }
  29114. var results = [];
  29115. while (true) {
  29116. var result = regExpExec(rx, S);
  29117. if (result === null) break;
  29118. results.push(result);
  29119. if (!global) break;
  29120. var matchStr = String(result[0]);
  29121. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  29122. }
  29123. var accumulatedResult = '';
  29124. var nextSourcePosition = 0;
  29125. for (var i = 0; i < results.length; i++) {
  29126. result = results[i];
  29127. var matched = String(result[0]);
  29128. var position = max(min(toInteger(result.index), S.length), 0);
  29129. var captures = [];
  29130. // NOTE: This is equivalent to
  29131. // captures = result.slice(1).map(maybeToString)
  29132. // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
  29133. // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
  29134. // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
  29135. for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
  29136. var namedCaptures = result.groups;
  29137. if (functionalReplace) {
  29138. var replacerArgs = [matched].concat(captures, position, S);
  29139. if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
  29140. var replacement = String(replaceValue.apply(undefined, replacerArgs));
  29141. } else {
  29142. replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
  29143. }
  29144. if (position >= nextSourcePosition) {
  29145. accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
  29146. nextSourcePosition = position + matched.length;
  29147. }
  29148. }
  29149. return accumulatedResult + S.slice(nextSourcePosition);
  29150. }
  29151. ];
  29152. });
  29153. /***/ }),
  29154. /***/ 3123:
  29155. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_139010__) {
  29156. "use strict";
  29157. var fixRegExpWellKnownSymbolLogic = __nested_webpack_require_139010__(7007);
  29158. var isRegExp = __nested_webpack_require_139010__(7850);
  29159. var anObject = __nested_webpack_require_139010__(9670);
  29160. var requireObjectCoercible = __nested_webpack_require_139010__(4488);
  29161. var speciesConstructor = __nested_webpack_require_139010__(6707);
  29162. var advanceStringIndex = __nested_webpack_require_139010__(1530);
  29163. var toLength = __nested_webpack_require_139010__(7466);
  29164. var callRegExpExec = __nested_webpack_require_139010__(7651);
  29165. var regexpExec = __nested_webpack_require_139010__(2261);
  29166. var fails = __nested_webpack_require_139010__(7293);
  29167. var arrayPush = [].push;
  29168. var min = Math.min;
  29169. var MAX_UINT32 = 0xFFFFFFFF;
  29170. // babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
  29171. var SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); });
  29172. // @@split logic
  29173. fixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) {
  29174. var internalSplit;
  29175. if (
  29176. 'abbc'.split(/(b)*/)[1] == 'c' ||
  29177. // eslint-disable-next-line regexp/no-empty-group -- required for testing
  29178. 'test'.split(/(?:)/, -1).length != 4 ||
  29179. 'ab'.split(/(?:ab)*/).length != 2 ||
  29180. '.'.split(/(.?)(.?)/).length != 4 ||
  29181. // eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing
  29182. '.'.split(/()()/).length > 1 ||
  29183. ''.split(/.?/).length
  29184. ) {
  29185. // based on es5-shim implementation, need to rework it
  29186. internalSplit = function (separator, limit) {
  29187. var string = String(requireObjectCoercible(this));
  29188. var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
  29189. if (lim === 0) return [];
  29190. if (separator === undefined) return [string];
  29191. // If `separator` is not a regex, use native split
  29192. if (!isRegExp(separator)) {
  29193. return nativeSplit.call(string, separator, lim);
  29194. }
  29195. var output = [];
  29196. var flags = (separator.ignoreCase ? 'i' : '') +
  29197. (separator.multiline ? 'm' : '') +
  29198. (separator.unicode ? 'u' : '') +
  29199. (separator.sticky ? 'y' : '');
  29200. var lastLastIndex = 0;
  29201. // Make `global` and avoid `lastIndex` issues by working with a copy
  29202. var separatorCopy = new RegExp(separator.source, flags + 'g');
  29203. var match, lastIndex, lastLength;
  29204. while (match = regexpExec.call(separatorCopy, string)) {
  29205. lastIndex = separatorCopy.lastIndex;
  29206. if (lastIndex > lastLastIndex) {
  29207. output.push(string.slice(lastLastIndex, match.index));
  29208. if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));
  29209. lastLength = match[0].length;
  29210. lastLastIndex = lastIndex;
  29211. if (output.length >= lim) break;
  29212. }
  29213. if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
  29214. }
  29215. if (lastLastIndex === string.length) {
  29216. if (lastLength || !separatorCopy.test('')) output.push('');
  29217. } else output.push(string.slice(lastLastIndex));
  29218. return output.length > lim ? output.slice(0, lim) : output;
  29219. };
  29220. // Chakra, V8
  29221. } else if ('0'.split(undefined, 0).length) {
  29222. internalSplit = function (separator, limit) {
  29223. return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);
  29224. };
  29225. } else internalSplit = nativeSplit;
  29226. return [
  29227. // `String.prototype.split` method
  29228. // https://tc39.es/ecma262/#sec-string.prototype.split
  29229. function split(separator, limit) {
  29230. var O = requireObjectCoercible(this);
  29231. var splitter = separator == undefined ? undefined : separator[SPLIT];
  29232. return splitter !== undefined
  29233. ? splitter.call(separator, O, limit)
  29234. : internalSplit.call(String(O), separator, limit);
  29235. },
  29236. // `RegExp.prototype[@@split]` method
  29237. // https://tc39.es/ecma262/#sec-regexp.prototype-@@split
  29238. //
  29239. // NOTE: This cannot be properly polyfilled in engines that don't support
  29240. // the 'y' flag.
  29241. function (regexp, limit) {
  29242. var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit);
  29243. if (res.done) return res.value;
  29244. var rx = anObject(regexp);
  29245. var S = String(this);
  29246. var C = speciesConstructor(rx, RegExp);
  29247. var unicodeMatching = rx.unicode;
  29248. var flags = (rx.ignoreCase ? 'i' : '') +
  29249. (rx.multiline ? 'm' : '') +
  29250. (rx.unicode ? 'u' : '') +
  29251. (SUPPORTS_Y ? 'y' : 'g');
  29252. // ^(? + rx + ) is needed, in combination with some S slicing, to
  29253. // simulate the 'y' flag.
  29254. var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);
  29255. var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
  29256. if (lim === 0) return [];
  29257. if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
  29258. var p = 0;
  29259. var q = 0;
  29260. var A = [];
  29261. while (q < S.length) {
  29262. splitter.lastIndex = SUPPORTS_Y ? q : 0;
  29263. var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q));
  29264. var e;
  29265. if (
  29266. z === null ||
  29267. (e = min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p
  29268. ) {
  29269. q = advanceStringIndex(S, q, unicodeMatching);
  29270. } else {
  29271. A.push(S.slice(p, q));
  29272. if (A.length === lim) return A;
  29273. for (var i = 1; i <= z.length - 1; i++) {
  29274. A.push(z[i]);
  29275. if (A.length === lim) return A;
  29276. }
  29277. q = p = e;
  29278. }
  29279. }
  29280. A.push(S.slice(p));
  29281. return A;
  29282. }
  29283. ];
  29284. }, !SUPPORTS_Y);
  29285. /***/ }),
  29286. /***/ 3210:
  29287. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_144619__) {
  29288. "use strict";
  29289. var $ = __nested_webpack_require_144619__(2109);
  29290. var $trim = __nested_webpack_require_144619__(3111).trim;
  29291. var forcedStringTrimMethod = __nested_webpack_require_144619__(6091);
  29292. // `String.prototype.trim` method
  29293. // https://tc39.es/ecma262/#sec-string.prototype.trim
  29294. $({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
  29295. trim: function trim() {
  29296. return $trim(this);
  29297. }
  29298. });
  29299. /***/ }),
  29300. /***/ 2990:
  29301. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_145111__) {
  29302. "use strict";
  29303. var ArrayBufferViewCore = __nested_webpack_require_145111__(260);
  29304. var $copyWithin = __nested_webpack_require_145111__(1048);
  29305. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29306. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29307. // `%TypedArray%.prototype.copyWithin` method
  29308. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.copywithin
  29309. exportTypedArrayMethod('copyWithin', function copyWithin(target, start /* , end */) {
  29310. return $copyWithin.call(aTypedArray(this), target, start, arguments.length > 2 ? arguments[2] : undefined);
  29311. });
  29312. /***/ }),
  29313. /***/ 8927:
  29314. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_145777__) {
  29315. "use strict";
  29316. var ArrayBufferViewCore = __nested_webpack_require_145777__(260);
  29317. var $every = __nested_webpack_require_145777__(2092).every;
  29318. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29319. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29320. // `%TypedArray%.prototype.every` method
  29321. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.every
  29322. exportTypedArrayMethod('every', function every(callbackfn /* , thisArg */) {
  29323. return $every(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  29324. });
  29325. /***/ }),
  29326. /***/ 3105:
  29327. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_146412__) {
  29328. "use strict";
  29329. var ArrayBufferViewCore = __nested_webpack_require_146412__(260);
  29330. var $fill = __nested_webpack_require_146412__(1285);
  29331. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29332. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29333. // `%TypedArray%.prototype.fill` method
  29334. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill
  29335. // eslint-disable-next-line no-unused-vars -- required for `.length`
  29336. exportTypedArrayMethod('fill', function fill(value /* , start, end */) {
  29337. return $fill.apply(aTypedArray(this), arguments);
  29338. });
  29339. /***/ }),
  29340. /***/ 5035:
  29341. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_147058__) {
  29342. "use strict";
  29343. var ArrayBufferViewCore = __nested_webpack_require_147058__(260);
  29344. var $filter = __nested_webpack_require_147058__(2092).filter;
  29345. var fromSpeciesAndList = __nested_webpack_require_147058__(3074);
  29346. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29347. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29348. // `%TypedArray%.prototype.filter` method
  29349. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.filter
  29350. exportTypedArrayMethod('filter', function filter(callbackfn /* , thisArg */) {
  29351. var list = $filter(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  29352. return fromSpeciesAndList(this, list);
  29353. });
  29354. /***/ }),
  29355. /***/ 7174:
  29356. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_147797__) {
  29357. "use strict";
  29358. var ArrayBufferViewCore = __nested_webpack_require_147797__(260);
  29359. var $findIndex = __nested_webpack_require_147797__(2092).findIndex;
  29360. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29361. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29362. // `%TypedArray%.prototype.findIndex` method
  29363. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.findindex
  29364. exportTypedArrayMethod('findIndex', function findIndex(predicate /* , thisArg */) {
  29365. return $findIndex(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
  29366. });
  29367. /***/ }),
  29368. /***/ 4345:
  29369. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_148458__) {
  29370. "use strict";
  29371. var ArrayBufferViewCore = __nested_webpack_require_148458__(260);
  29372. var $find = __nested_webpack_require_148458__(2092).find;
  29373. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29374. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29375. // `%TypedArray%.prototype.find` method
  29376. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.find
  29377. exportTypedArrayMethod('find', function find(predicate /* , thisArg */) {
  29378. return $find(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
  29379. });
  29380. /***/ }),
  29381. /***/ 2846:
  29382. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_149084__) {
  29383. "use strict";
  29384. var ArrayBufferViewCore = __nested_webpack_require_149084__(260);
  29385. var $forEach = __nested_webpack_require_149084__(2092).forEach;
  29386. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29387. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29388. // `%TypedArray%.prototype.forEach` method
  29389. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.foreach
  29390. exportTypedArrayMethod('forEach', function forEach(callbackfn /* , thisArg */) {
  29391. $forEach(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  29392. });
  29393. /***/ }),
  29394. /***/ 4731:
  29395. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_149726__) {
  29396. "use strict";
  29397. var ArrayBufferViewCore = __nested_webpack_require_149726__(260);
  29398. var $includes = __nested_webpack_require_149726__(1318).includes;
  29399. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29400. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29401. // `%TypedArray%.prototype.includes` method
  29402. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.includes
  29403. exportTypedArrayMethod('includes', function includes(searchElement /* , fromIndex */) {
  29404. return $includes(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
  29405. });
  29406. /***/ }),
  29407. /***/ 7209:
  29408. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_150390__) {
  29409. "use strict";
  29410. var ArrayBufferViewCore = __nested_webpack_require_150390__(260);
  29411. var $indexOf = __nested_webpack_require_150390__(1318).indexOf;
  29412. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29413. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29414. // `%TypedArray%.prototype.indexOf` method
  29415. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.indexof
  29416. exportTypedArrayMethod('indexOf', function indexOf(searchElement /* , fromIndex */) {
  29417. return $indexOf(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
  29418. });
  29419. /***/ }),
  29420. /***/ 6319:
  29421. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_151047__) {
  29422. "use strict";
  29423. var global = __nested_webpack_require_151047__(7854);
  29424. var ArrayBufferViewCore = __nested_webpack_require_151047__(260);
  29425. var ArrayIterators = __nested_webpack_require_151047__(6992);
  29426. var wellKnownSymbol = __nested_webpack_require_151047__(5112);
  29427. var ITERATOR = wellKnownSymbol('iterator');
  29428. var Uint8Array = global.Uint8Array;
  29429. var arrayValues = ArrayIterators.values;
  29430. var arrayKeys = ArrayIterators.keys;
  29431. var arrayEntries = ArrayIterators.entries;
  29432. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29433. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29434. var nativeTypedArrayIterator = Uint8Array && Uint8Array.prototype[ITERATOR];
  29435. var CORRECT_ITER_NAME = !!nativeTypedArrayIterator
  29436. && (nativeTypedArrayIterator.name == 'values' || nativeTypedArrayIterator.name == undefined);
  29437. var typedArrayValues = function values() {
  29438. return arrayValues.call(aTypedArray(this));
  29439. };
  29440. // `%TypedArray%.prototype.entries` method
  29441. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.entries
  29442. exportTypedArrayMethod('entries', function entries() {
  29443. return arrayEntries.call(aTypedArray(this));
  29444. });
  29445. // `%TypedArray%.prototype.keys` method
  29446. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys
  29447. exportTypedArrayMethod('keys', function keys() {
  29448. return arrayKeys.call(aTypedArray(this));
  29449. });
  29450. // `%TypedArray%.prototype.values` method
  29451. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.values
  29452. exportTypedArrayMethod('values', typedArrayValues, !CORRECT_ITER_NAME);
  29453. // `%TypedArray%.prototype[@@iterator]` method
  29454. // https://tc39.es/ecma262/#sec-%typedarray%.prototype-@@iterator
  29455. exportTypedArrayMethod(ITERATOR, typedArrayValues, !CORRECT_ITER_NAME);
  29456. /***/ }),
  29457. /***/ 8867:
  29458. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_152782__) {
  29459. "use strict";
  29460. var ArrayBufferViewCore = __nested_webpack_require_152782__(260);
  29461. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29462. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29463. var $join = [].join;
  29464. // `%TypedArray%.prototype.join` method
  29465. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.join
  29466. // eslint-disable-next-line no-unused-vars -- required for `.length`
  29467. exportTypedArrayMethod('join', function join(separator) {
  29468. return $join.apply(aTypedArray(this), arguments);
  29469. });
  29470. /***/ }),
  29471. /***/ 7789:
  29472. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_153395__) {
  29473. "use strict";
  29474. var ArrayBufferViewCore = __nested_webpack_require_153395__(260);
  29475. var $lastIndexOf = __nested_webpack_require_153395__(6583);
  29476. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29477. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29478. // `%TypedArray%.prototype.lastIndexOf` method
  29479. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.lastindexof
  29480. // eslint-disable-next-line no-unused-vars -- required for `.length`
  29481. exportTypedArrayMethod('lastIndexOf', function lastIndexOf(searchElement /* , fromIndex */) {
  29482. return $lastIndexOf.apply(aTypedArray(this), arguments);
  29483. });
  29484. /***/ }),
  29485. /***/ 3739:
  29486. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_154090__) {
  29487. "use strict";
  29488. var ArrayBufferViewCore = __nested_webpack_require_154090__(260);
  29489. var $map = __nested_webpack_require_154090__(2092).map;
  29490. var speciesConstructor = __nested_webpack_require_154090__(6707);
  29491. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29492. var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
  29493. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29494. // `%TypedArray%.prototype.map` method
  29495. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.map
  29496. exportTypedArrayMethod('map', function map(mapfn /* , thisArg */) {
  29497. return $map(aTypedArray(this), mapfn, arguments.length > 1 ? arguments[1] : undefined, function (O, length) {
  29498. return new (aTypedArrayConstructor(speciesConstructor(O, O.constructor)))(length);
  29499. });
  29500. });
  29501. /***/ }),
  29502. /***/ 4483:
  29503. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_154941__) {
  29504. "use strict";
  29505. var ArrayBufferViewCore = __nested_webpack_require_154941__(260);
  29506. var $reduceRight = __nested_webpack_require_154941__(3671).right;
  29507. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29508. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29509. // `%TypedArray%.prototype.reduceRicht` method
  29510. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduceright
  29511. exportTypedArrayMethod('reduceRight', function reduceRight(callbackfn /* , initialValue */) {
  29512. return $reduceRight(aTypedArray(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
  29513. });
  29514. /***/ }),
  29515. /***/ 9368:
  29516. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_155635__) {
  29517. "use strict";
  29518. var ArrayBufferViewCore = __nested_webpack_require_155635__(260);
  29519. var $reduce = __nested_webpack_require_155635__(3671).left;
  29520. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29521. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29522. // `%TypedArray%.prototype.reduce` method
  29523. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduce
  29524. exportTypedArrayMethod('reduce', function reduce(callbackfn /* , initialValue */) {
  29525. return $reduce(aTypedArray(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
  29526. });
  29527. /***/ }),
  29528. /***/ 2056:
  29529. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_156298__) {
  29530. "use strict";
  29531. var ArrayBufferViewCore = __nested_webpack_require_156298__(260);
  29532. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29533. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29534. var floor = Math.floor;
  29535. // `%TypedArray%.prototype.reverse` method
  29536. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.reverse
  29537. exportTypedArrayMethod('reverse', function reverse() {
  29538. var that = this;
  29539. var length = aTypedArray(that).length;
  29540. var middle = floor(length / 2);
  29541. var index = 0;
  29542. var value;
  29543. while (index < middle) {
  29544. value = that[index];
  29545. that[index++] = that[--length];
  29546. that[length] = value;
  29547. } return that;
  29548. });
  29549. /***/ }),
  29550. /***/ 3462:
  29551. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_157051__) {
  29552. "use strict";
  29553. var ArrayBufferViewCore = __nested_webpack_require_157051__(260);
  29554. var toLength = __nested_webpack_require_157051__(7466);
  29555. var toOffset = __nested_webpack_require_157051__(4590);
  29556. var toObject = __nested_webpack_require_157051__(7908);
  29557. var fails = __nested_webpack_require_157051__(7293);
  29558. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29559. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29560. var FORCED = fails(function () {
  29561. /* global Int8Array -- safe */
  29562. new Int8Array(1).set({});
  29563. });
  29564. // `%TypedArray%.prototype.set` method
  29565. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.set
  29566. exportTypedArrayMethod('set', function set(arrayLike /* , offset */) {
  29567. aTypedArray(this);
  29568. var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);
  29569. var length = this.length;
  29570. var src = toObject(arrayLike);
  29571. var len = toLength(src.length);
  29572. var index = 0;
  29573. if (len + offset > length) throw RangeError('Wrong length');
  29574. while (index < len) this[offset + index] = src[index++];
  29575. }, FORCED);
  29576. /***/ }),
  29577. /***/ 678:
  29578. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_158136__) {
  29579. "use strict";
  29580. var ArrayBufferViewCore = __nested_webpack_require_158136__(260);
  29581. var speciesConstructor = __nested_webpack_require_158136__(6707);
  29582. var fails = __nested_webpack_require_158136__(7293);
  29583. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29584. var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
  29585. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29586. var $slice = [].slice;
  29587. var FORCED = fails(function () {
  29588. /* global Int8Array -- safe */
  29589. new Int8Array(1).slice();
  29590. });
  29591. // `%TypedArray%.prototype.slice` method
  29592. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice
  29593. exportTypedArrayMethod('slice', function slice(start, end) {
  29594. var list = $slice.call(aTypedArray(this), start, end);
  29595. var C = speciesConstructor(this, this.constructor);
  29596. var index = 0;
  29597. var length = list.length;
  29598. var result = new (aTypedArrayConstructor(C))(length);
  29599. while (length > index) result[index] = list[index++];
  29600. return result;
  29601. }, FORCED);
  29602. /***/ }),
  29603. /***/ 7462:
  29604. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_159191__) {
  29605. "use strict";
  29606. var ArrayBufferViewCore = __nested_webpack_require_159191__(260);
  29607. var $some = __nested_webpack_require_159191__(2092).some;
  29608. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29609. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29610. // `%TypedArray%.prototype.some` method
  29611. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.some
  29612. exportTypedArrayMethod('some', function some(callbackfn /* , thisArg */) {
  29613. return $some(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  29614. });
  29615. /***/ }),
  29616. /***/ 3824:
  29617. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_159819__) {
  29618. "use strict";
  29619. var ArrayBufferViewCore = __nested_webpack_require_159819__(260);
  29620. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29621. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29622. var $sort = [].sort;
  29623. // `%TypedArray%.prototype.sort` method
  29624. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort
  29625. exportTypedArrayMethod('sort', function sort(comparefn) {
  29626. return $sort.call(aTypedArray(this), comparefn);
  29627. });
  29628. /***/ }),
  29629. /***/ 5021:
  29630. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_160362__) {
  29631. "use strict";
  29632. var ArrayBufferViewCore = __nested_webpack_require_160362__(260);
  29633. var toLength = __nested_webpack_require_160362__(7466);
  29634. var toAbsoluteIndex = __nested_webpack_require_160362__(1400);
  29635. var speciesConstructor = __nested_webpack_require_160362__(6707);
  29636. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29637. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29638. // `%TypedArray%.prototype.subarray` method
  29639. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.subarray
  29640. exportTypedArrayMethod('subarray', function subarray(begin, end) {
  29641. var O = aTypedArray(this);
  29642. var length = O.length;
  29643. var beginIndex = toAbsoluteIndex(begin, length);
  29644. return new (speciesConstructor(O, O.constructor))(
  29645. O.buffer,
  29646. O.byteOffset + beginIndex * O.BYTES_PER_ELEMENT,
  29647. toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - beginIndex)
  29648. );
  29649. });
  29650. /***/ }),
  29651. /***/ 2974:
  29652. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_161310__) {
  29653. "use strict";
  29654. var global = __nested_webpack_require_161310__(7854);
  29655. var ArrayBufferViewCore = __nested_webpack_require_161310__(260);
  29656. var fails = __nested_webpack_require_161310__(7293);
  29657. var Int8Array = global.Int8Array;
  29658. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  29659. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  29660. var $toLocaleString = [].toLocaleString;
  29661. var $slice = [].slice;
  29662. // iOS Safari 6.x fails here
  29663. var TO_LOCALE_STRING_BUG = !!Int8Array && fails(function () {
  29664. $toLocaleString.call(new Int8Array(1));
  29665. });
  29666. var FORCED = fails(function () {
  29667. return [1, 2].toLocaleString() != new Int8Array([1, 2]).toLocaleString();
  29668. }) || !fails(function () {
  29669. Int8Array.prototype.toLocaleString.call([1, 2]);
  29670. });
  29671. // `%TypedArray%.prototype.toLocaleString` method
  29672. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring
  29673. exportTypedArrayMethod('toLocaleString', function toLocaleString() {
  29674. return $toLocaleString.apply(TO_LOCALE_STRING_BUG ? $slice.call(aTypedArray(this)) : aTypedArray(this), arguments);
  29675. }, FORCED);
  29676. /***/ }),
  29677. /***/ 5016:
  29678. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_162445__) {
  29679. "use strict";
  29680. var exportTypedArrayMethod = __nested_webpack_require_162445__(260).exportTypedArrayMethod;
  29681. var fails = __nested_webpack_require_162445__(7293);
  29682. var global = __nested_webpack_require_162445__(7854);
  29683. var Uint8Array = global.Uint8Array;
  29684. var Uint8ArrayPrototype = Uint8Array && Uint8Array.prototype || {};
  29685. var arrayToString = [].toString;
  29686. var arrayJoin = [].join;
  29687. if (fails(function () { arrayToString.call({}); })) {
  29688. arrayToString = function toString() {
  29689. return arrayJoin.call(this);
  29690. };
  29691. }
  29692. var IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString != arrayToString;
  29693. // `%TypedArray%.prototype.toString` method
  29694. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.tostring
  29695. exportTypedArrayMethod('toString', arrayToString, IS_NOT_ARRAY_METHOD);
  29696. /***/ }),
  29697. /***/ 2472:
  29698. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_163286__) {
  29699. var createTypedArrayConstructor = __nested_webpack_require_163286__(9843);
  29700. // `Uint8Array` constructor
  29701. // https://tc39.es/ecma262/#sec-typedarray-objects
  29702. createTypedArrayConstructor('Uint8', function (init) {
  29703. return function Uint8Array(data, byteOffset, length) {
  29704. return init(this, data, byteOffset, length);
  29705. };
  29706. });
  29707. /***/ }),
  29708. /***/ 4747:
  29709. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_163713__) {
  29710. var global = __nested_webpack_require_163713__(7854);
  29711. var DOMIterables = __nested_webpack_require_163713__(8324);
  29712. var forEach = __nested_webpack_require_163713__(8533);
  29713. var createNonEnumerableProperty = __nested_webpack_require_163713__(8880);
  29714. for (var COLLECTION_NAME in DOMIterables) {
  29715. var Collection = global[COLLECTION_NAME];
  29716. var CollectionPrototype = Collection && Collection.prototype;
  29717. // some Chrome versions have non-configurable methods on DOMTokenList
  29718. if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
  29719. createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
  29720. } catch (error) {
  29721. CollectionPrototype.forEach = forEach;
  29722. }
  29723. }
  29724. /***/ }),
  29725. /***/ 3948:
  29726. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_164461__) {
  29727. var global = __nested_webpack_require_164461__(7854);
  29728. var DOMIterables = __nested_webpack_require_164461__(8324);
  29729. var ArrayIteratorMethods = __nested_webpack_require_164461__(6992);
  29730. var createNonEnumerableProperty = __nested_webpack_require_164461__(8880);
  29731. var wellKnownSymbol = __nested_webpack_require_164461__(5112);
  29732. var ITERATOR = wellKnownSymbol('iterator');
  29733. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  29734. var ArrayValues = ArrayIteratorMethods.values;
  29735. for (var COLLECTION_NAME in DOMIterables) {
  29736. var Collection = global[COLLECTION_NAME];
  29737. var CollectionPrototype = Collection && Collection.prototype;
  29738. if (CollectionPrototype) {
  29739. // some Chrome versions have non-configurable methods on DOMTokenList
  29740. if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
  29741. createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
  29742. } catch (error) {
  29743. CollectionPrototype[ITERATOR] = ArrayValues;
  29744. }
  29745. if (!CollectionPrototype[TO_STRING_TAG]) {
  29746. createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
  29747. }
  29748. if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
  29749. // some Chrome versions have non-configurable methods on DOMTokenList
  29750. if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
  29751. createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
  29752. } catch (error) {
  29753. CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
  29754. }
  29755. }
  29756. }
  29757. }
  29758. /***/ }),
  29759. /***/ 1637:
  29760. /***/ (function(module, __unused_webpack_exports, __nested_webpack_require_166049__) {
  29761. "use strict";
  29762. // TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
  29763. __nested_webpack_require_166049__(6992);
  29764. var $ = __nested_webpack_require_166049__(2109);
  29765. var getBuiltIn = __nested_webpack_require_166049__(5005);
  29766. var USE_NATIVE_URL = __nested_webpack_require_166049__(590);
  29767. var redefine = __nested_webpack_require_166049__(1320);
  29768. var redefineAll = __nested_webpack_require_166049__(2248);
  29769. var setToStringTag = __nested_webpack_require_166049__(8003);
  29770. var createIteratorConstructor = __nested_webpack_require_166049__(4994);
  29771. var InternalStateModule = __nested_webpack_require_166049__(9909);
  29772. var anInstance = __nested_webpack_require_166049__(5787);
  29773. var hasOwn = __nested_webpack_require_166049__(6656);
  29774. var bind = __nested_webpack_require_166049__(9974);
  29775. var classof = __nested_webpack_require_166049__(648);
  29776. var anObject = __nested_webpack_require_166049__(9670);
  29777. var isObject = __nested_webpack_require_166049__(111);
  29778. var create = __nested_webpack_require_166049__(30);
  29779. var createPropertyDescriptor = __nested_webpack_require_166049__(9114);
  29780. var getIterator = __nested_webpack_require_166049__(8554);
  29781. var getIteratorMethod = __nested_webpack_require_166049__(1246);
  29782. var wellKnownSymbol = __nested_webpack_require_166049__(5112);
  29783. var $fetch = getBuiltIn('fetch');
  29784. var Headers = getBuiltIn('Headers');
  29785. var ITERATOR = wellKnownSymbol('iterator');
  29786. var URL_SEARCH_PARAMS = 'URLSearchParams';
  29787. var URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';
  29788. var setInternalState = InternalStateModule.set;
  29789. var getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS);
  29790. var getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR);
  29791. var plus = /\+/g;
  29792. var sequences = Array(4);
  29793. var percentSequence = function (bytes) {
  29794. return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\da-f]{2}){' + bytes + '})', 'gi'));
  29795. };
  29796. var percentDecode = function (sequence) {
  29797. try {
  29798. return decodeURIComponent(sequence);
  29799. } catch (error) {
  29800. return sequence;
  29801. }
  29802. };
  29803. var deserialize = function (it) {
  29804. var result = it.replace(plus, ' ');
  29805. var bytes = 4;
  29806. try {
  29807. return decodeURIComponent(result);
  29808. } catch (error) {
  29809. while (bytes) {
  29810. result = result.replace(percentSequence(bytes--), percentDecode);
  29811. }
  29812. return result;
  29813. }
  29814. };
  29815. var find = /[!'()~]|%20/g;
  29816. var replace = {
  29817. '!': '%21',
  29818. "'": '%27',
  29819. '(': '%28',
  29820. ')': '%29',
  29821. '~': '%7E',
  29822. '%20': '+'
  29823. };
  29824. var replacer = function (match) {
  29825. return replace[match];
  29826. };
  29827. var serialize = function (it) {
  29828. return encodeURIComponent(it).replace(find, replacer);
  29829. };
  29830. var parseSearchParams = function (result, query) {
  29831. if (query) {
  29832. var attributes = query.split('&');
  29833. var index = 0;
  29834. var attribute, entry;
  29835. while (index < attributes.length) {
  29836. attribute = attributes[index++];
  29837. if (attribute.length) {
  29838. entry = attribute.split('=');
  29839. result.push({
  29840. key: deserialize(entry.shift()),
  29841. value: deserialize(entry.join('='))
  29842. });
  29843. }
  29844. }
  29845. }
  29846. };
  29847. var updateSearchParams = function (query) {
  29848. this.entries.length = 0;
  29849. parseSearchParams(this.entries, query);
  29850. };
  29851. var validateArgumentsLength = function (passed, required) {
  29852. if (passed < required) throw TypeError('Not enough arguments');
  29853. };
  29854. var URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {
  29855. setInternalState(this, {
  29856. type: URL_SEARCH_PARAMS_ITERATOR,
  29857. iterator: getIterator(getInternalParamsState(params).entries),
  29858. kind: kind
  29859. });
  29860. }, 'Iterator', function next() {
  29861. var state = getInternalIteratorState(this);
  29862. var kind = state.kind;
  29863. var step = state.iterator.next();
  29864. var entry = step.value;
  29865. if (!step.done) {
  29866. step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];
  29867. } return step;
  29868. });
  29869. // `URLSearchParams` constructor
  29870. // https://url.spec.whatwg.org/#interface-urlsearchparams
  29871. var URLSearchParamsConstructor = function URLSearchParams(/* init */) {
  29872. anInstance(this, URLSearchParamsConstructor, URL_SEARCH_PARAMS);
  29873. var init = arguments.length > 0 ? arguments[0] : undefined;
  29874. var that = this;
  29875. var entries = [];
  29876. var iteratorMethod, iterator, next, step, entryIterator, entryNext, first, second, key;
  29877. setInternalState(that, {
  29878. type: URL_SEARCH_PARAMS,
  29879. entries: entries,
  29880. updateURL: function () { /* empty */ },
  29881. updateSearchParams: updateSearchParams
  29882. });
  29883. if (init !== undefined) {
  29884. if (isObject(init)) {
  29885. iteratorMethod = getIteratorMethod(init);
  29886. if (typeof iteratorMethod === 'function') {
  29887. iterator = iteratorMethod.call(init);
  29888. next = iterator.next;
  29889. while (!(step = next.call(iterator)).done) {
  29890. entryIterator = getIterator(anObject(step.value));
  29891. entryNext = entryIterator.next;
  29892. if (
  29893. (first = entryNext.call(entryIterator)).done ||
  29894. (second = entryNext.call(entryIterator)).done ||
  29895. !entryNext.call(entryIterator).done
  29896. ) throw TypeError('Expected sequence with length 2');
  29897. entries.push({ key: first.value + '', value: second.value + '' });
  29898. }
  29899. } else for (key in init) if (hasOwn(init, key)) entries.push({ key: key, value: init[key] + '' });
  29900. } else {
  29901. parseSearchParams(entries, typeof init === 'string' ? init.charAt(0) === '?' ? init.slice(1) : init : init + '');
  29902. }
  29903. }
  29904. };
  29905. var URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;
  29906. redefineAll(URLSearchParamsPrototype, {
  29907. // `URLSearchParams.prototype.append` method
  29908. // https://url.spec.whatwg.org/#dom-urlsearchparams-append
  29909. append: function append(name, value) {
  29910. validateArgumentsLength(arguments.length, 2);
  29911. var state = getInternalParamsState(this);
  29912. state.entries.push({ key: name + '', value: value + '' });
  29913. state.updateURL();
  29914. },
  29915. // `URLSearchParams.prototype.delete` method
  29916. // https://url.spec.whatwg.org/#dom-urlsearchparams-delete
  29917. 'delete': function (name) {
  29918. validateArgumentsLength(arguments.length, 1);
  29919. var state = getInternalParamsState(this);
  29920. var entries = state.entries;
  29921. var key = name + '';
  29922. var index = 0;
  29923. while (index < entries.length) {
  29924. if (entries[index].key === key) entries.splice(index, 1);
  29925. else index++;
  29926. }
  29927. state.updateURL();
  29928. },
  29929. // `URLSearchParams.prototype.get` method
  29930. // https://url.spec.whatwg.org/#dom-urlsearchparams-get
  29931. get: function get(name) {
  29932. validateArgumentsLength(arguments.length, 1);
  29933. var entries = getInternalParamsState(this).entries;
  29934. var key = name + '';
  29935. var index = 0;
  29936. for (; index < entries.length; index++) {
  29937. if (entries[index].key === key) return entries[index].value;
  29938. }
  29939. return null;
  29940. },
  29941. // `URLSearchParams.prototype.getAll` method
  29942. // https://url.spec.whatwg.org/#dom-urlsearchparams-getall
  29943. getAll: function getAll(name) {
  29944. validateArgumentsLength(arguments.length, 1);
  29945. var entries = getInternalParamsState(this).entries;
  29946. var key = name + '';
  29947. var result = [];
  29948. var index = 0;
  29949. for (; index < entries.length; index++) {
  29950. if (entries[index].key === key) result.push(entries[index].value);
  29951. }
  29952. return result;
  29953. },
  29954. // `URLSearchParams.prototype.has` method
  29955. // https://url.spec.whatwg.org/#dom-urlsearchparams-has
  29956. has: function has(name) {
  29957. validateArgumentsLength(arguments.length, 1);
  29958. var entries = getInternalParamsState(this).entries;
  29959. var key = name + '';
  29960. var index = 0;
  29961. while (index < entries.length) {
  29962. if (entries[index++].key === key) return true;
  29963. }
  29964. return false;
  29965. },
  29966. // `URLSearchParams.prototype.set` method
  29967. // https://url.spec.whatwg.org/#dom-urlsearchparams-set
  29968. set: function set(name, value) {
  29969. validateArgumentsLength(arguments.length, 1);
  29970. var state = getInternalParamsState(this);
  29971. var entries = state.entries;
  29972. var found = false;
  29973. var key = name + '';
  29974. var val = value + '';
  29975. var index = 0;
  29976. var entry;
  29977. for (; index < entries.length; index++) {
  29978. entry = entries[index];
  29979. if (entry.key === key) {
  29980. if (found) entries.splice(index--, 1);
  29981. else {
  29982. found = true;
  29983. entry.value = val;
  29984. }
  29985. }
  29986. }
  29987. if (!found) entries.push({ key: key, value: val });
  29988. state.updateURL();
  29989. },
  29990. // `URLSearchParams.prototype.sort` method
  29991. // https://url.spec.whatwg.org/#dom-urlsearchparams-sort
  29992. sort: function sort() {
  29993. var state = getInternalParamsState(this);
  29994. var entries = state.entries;
  29995. // Array#sort is not stable in some engines
  29996. var slice = entries.slice();
  29997. var entry, entriesIndex, sliceIndex;
  29998. entries.length = 0;
  29999. for (sliceIndex = 0; sliceIndex < slice.length; sliceIndex++) {
  30000. entry = slice[sliceIndex];
  30001. for (entriesIndex = 0; entriesIndex < sliceIndex; entriesIndex++) {
  30002. if (entries[entriesIndex].key > entry.key) {
  30003. entries.splice(entriesIndex, 0, entry);
  30004. break;
  30005. }
  30006. }
  30007. if (entriesIndex === sliceIndex) entries.push(entry);
  30008. }
  30009. state.updateURL();
  30010. },
  30011. // `URLSearchParams.prototype.forEach` method
  30012. forEach: function forEach(callback /* , thisArg */) {
  30013. var entries = getInternalParamsState(this).entries;
  30014. var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined, 3);
  30015. var index = 0;
  30016. var entry;
  30017. while (index < entries.length) {
  30018. entry = entries[index++];
  30019. boundFunction(entry.value, entry.key, this);
  30020. }
  30021. },
  30022. // `URLSearchParams.prototype.keys` method
  30023. keys: function keys() {
  30024. return new URLSearchParamsIterator(this, 'keys');
  30025. },
  30026. // `URLSearchParams.prototype.values` method
  30027. values: function values() {
  30028. return new URLSearchParamsIterator(this, 'values');
  30029. },
  30030. // `URLSearchParams.prototype.entries` method
  30031. entries: function entries() {
  30032. return new URLSearchParamsIterator(this, 'entries');
  30033. }
  30034. }, { enumerable: true });
  30035. // `URLSearchParams.prototype[@@iterator]` method
  30036. redefine(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries);
  30037. // `URLSearchParams.prototype.toString` method
  30038. // https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior
  30039. redefine(URLSearchParamsPrototype, 'toString', function toString() {
  30040. var entries = getInternalParamsState(this).entries;
  30041. var result = [];
  30042. var index = 0;
  30043. var entry;
  30044. while (index < entries.length) {
  30045. entry = entries[index++];
  30046. result.push(serialize(entry.key) + '=' + serialize(entry.value));
  30047. } return result.join('&');
  30048. }, { enumerable: true });
  30049. setToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS);
  30050. $({ global: true, forced: !USE_NATIVE_URL }, {
  30051. URLSearchParams: URLSearchParamsConstructor
  30052. });
  30053. // Wrap `fetch` for correct work with polyfilled `URLSearchParams`
  30054. // https://github.com/zloirock/core-js/issues/674
  30055. if (!USE_NATIVE_URL && typeof $fetch == 'function' && typeof Headers == 'function') {
  30056. $({ global: true, enumerable: true, forced: true }, {
  30057. fetch: function fetch(input /* , init */) {
  30058. var args = [input];
  30059. var init, body, headers;
  30060. if (arguments.length > 1) {
  30061. init = arguments[1];
  30062. if (isObject(init)) {
  30063. body = init.body;
  30064. if (classof(body) === URL_SEARCH_PARAMS) {
  30065. headers = init.headers ? new Headers(init.headers) : new Headers();
  30066. if (!headers.has('content-type')) {
  30067. headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
  30068. }
  30069. init = create(init, {
  30070. body: createPropertyDescriptor(0, String(body)),
  30071. headers: createPropertyDescriptor(0, headers)
  30072. });
  30073. }
  30074. }
  30075. args.push(init);
  30076. } return $fetch.apply(this, args);
  30077. }
  30078. });
  30079. }
  30080. module.exports = {
  30081. URLSearchParams: URLSearchParamsConstructor,
  30082. getState: getInternalParamsState
  30083. };
  30084. /***/ }),
  30085. /***/ 285:
  30086. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __nested_webpack_require_177789__) {
  30087. "use strict";
  30088. // TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
  30089. __nested_webpack_require_177789__(8783);
  30090. var $ = __nested_webpack_require_177789__(2109);
  30091. var DESCRIPTORS = __nested_webpack_require_177789__(9781);
  30092. var USE_NATIVE_URL = __nested_webpack_require_177789__(590);
  30093. var global = __nested_webpack_require_177789__(7854);
  30094. var defineProperties = __nested_webpack_require_177789__(6048);
  30095. var redefine = __nested_webpack_require_177789__(1320);
  30096. var anInstance = __nested_webpack_require_177789__(5787);
  30097. var has = __nested_webpack_require_177789__(6656);
  30098. var assign = __nested_webpack_require_177789__(1574);
  30099. var arrayFrom = __nested_webpack_require_177789__(8457);
  30100. var codeAt = __nested_webpack_require_177789__(8710).codeAt;
  30101. var toASCII = __nested_webpack_require_177789__(3197);
  30102. var setToStringTag = __nested_webpack_require_177789__(8003);
  30103. var URLSearchParamsModule = __nested_webpack_require_177789__(1637);
  30104. var InternalStateModule = __nested_webpack_require_177789__(9909);
  30105. var NativeURL = global.URL;
  30106. var URLSearchParams = URLSearchParamsModule.URLSearchParams;
  30107. var getInternalSearchParamsState = URLSearchParamsModule.getState;
  30108. var setInternalState = InternalStateModule.set;
  30109. var getInternalURLState = InternalStateModule.getterFor('URL');
  30110. var floor = Math.floor;
  30111. var pow = Math.pow;
  30112. var INVALID_AUTHORITY = 'Invalid authority';
  30113. var INVALID_SCHEME = 'Invalid scheme';
  30114. var INVALID_HOST = 'Invalid host';
  30115. var INVALID_PORT = 'Invalid port';
  30116. var ALPHA = /[A-Za-z]/;
  30117. var ALPHANUMERIC = /[\d+-.A-Za-z]/;
  30118. var DIGIT = /\d/;
  30119. var HEX_START = /^(0x|0X)/;
  30120. var OCT = /^[0-7]+$/;
  30121. var DEC = /^\d+$/;
  30122. var HEX = /^[\dA-Fa-f]+$/;
  30123. /* eslint-disable no-control-regex -- safe */
  30124. var FORBIDDEN_HOST_CODE_POINT = /[\u0000\t\u000A\u000D #%/:?@[\\]]/;
  30125. var FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\u0000\t\u000A\u000D #/:?@[\\]]/;
  30126. var LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g;
  30127. var TAB_AND_NEW_LINE = /[\t\u000A\u000D]/g;
  30128. /* eslint-enable no-control-regex -- safe */
  30129. var EOF;
  30130. var parseHost = function (url, input) {
  30131. var result, codePoints, index;
  30132. if (input.charAt(0) == '[') {
  30133. if (input.charAt(input.length - 1) != ']') return INVALID_HOST;
  30134. result = parseIPv6(input.slice(1, -1));
  30135. if (!result) return INVALID_HOST;
  30136. url.host = result;
  30137. // opaque host
  30138. } else if (!isSpecial(url)) {
  30139. if (FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(input)) return INVALID_HOST;
  30140. result = '';
  30141. codePoints = arrayFrom(input);
  30142. for (index = 0; index < codePoints.length; index++) {
  30143. result += percentEncode(codePoints[index], C0ControlPercentEncodeSet);
  30144. }
  30145. url.host = result;
  30146. } else {
  30147. input = toASCII(input);
  30148. if (FORBIDDEN_HOST_CODE_POINT.test(input)) return INVALID_HOST;
  30149. result = parseIPv4(input);
  30150. if (result === null) return INVALID_HOST;
  30151. url.host = result;
  30152. }
  30153. };
  30154. var parseIPv4 = function (input) {
  30155. var parts = input.split('.');
  30156. var partsLength, numbers, index, part, radix, number, ipv4;
  30157. if (parts.length && parts[parts.length - 1] == '') {
  30158. parts.pop();
  30159. }
  30160. partsLength = parts.length;
  30161. if (partsLength > 4) return input;
  30162. numbers = [];
  30163. for (index = 0; index < partsLength; index++) {
  30164. part = parts[index];
  30165. if (part == '') return input;
  30166. radix = 10;
  30167. if (part.length > 1 && part.charAt(0) == '0') {
  30168. radix = HEX_START.test(part) ? 16 : 8;
  30169. part = part.slice(radix == 8 ? 1 : 2);
  30170. }
  30171. if (part === '') {
  30172. number = 0;
  30173. } else {
  30174. if (!(radix == 10 ? DEC : radix == 8 ? OCT : HEX).test(part)) return input;
  30175. number = parseInt(part, radix);
  30176. }
  30177. numbers.push(number);
  30178. }
  30179. for (index = 0; index < partsLength; index++) {
  30180. number = numbers[index];
  30181. if (index == partsLength - 1) {
  30182. if (number >= pow(256, 5 - partsLength)) return null;
  30183. } else if (number > 255) return null;
  30184. }
  30185. ipv4 = numbers.pop();
  30186. for (index = 0; index < numbers.length; index++) {
  30187. ipv4 += numbers[index] * pow(256, 3 - index);
  30188. }
  30189. return ipv4;
  30190. };
  30191. // eslint-disable-next-line max-statements -- TODO
  30192. var parseIPv6 = function (input) {
  30193. var address = [0, 0, 0, 0, 0, 0, 0, 0];
  30194. var pieceIndex = 0;
  30195. var compress = null;
  30196. var pointer = 0;
  30197. var value, length, numbersSeen, ipv4Piece, number, swaps, swap;
  30198. var char = function () {
  30199. return input.charAt(pointer);
  30200. };
  30201. if (char() == ':') {
  30202. if (input.charAt(1) != ':') return;
  30203. pointer += 2;
  30204. pieceIndex++;
  30205. compress = pieceIndex;
  30206. }
  30207. while (char()) {
  30208. if (pieceIndex == 8) return;
  30209. if (char() == ':') {
  30210. if (compress !== null) return;
  30211. pointer++;
  30212. pieceIndex++;
  30213. compress = pieceIndex;
  30214. continue;
  30215. }
  30216. value = length = 0;
  30217. while (length < 4 && HEX.test(char())) {
  30218. value = value * 16 + parseInt(char(), 16);
  30219. pointer++;
  30220. length++;
  30221. }
  30222. if (char() == '.') {
  30223. if (length == 0) return;
  30224. pointer -= length;
  30225. if (pieceIndex > 6) return;
  30226. numbersSeen = 0;
  30227. while (char()) {
  30228. ipv4Piece = null;
  30229. if (numbersSeen > 0) {
  30230. if (char() == '.' && numbersSeen < 4) pointer++;
  30231. else return;
  30232. }
  30233. if (!DIGIT.test(char())) return;
  30234. while (DIGIT.test(char())) {
  30235. number = parseInt(char(), 10);
  30236. if (ipv4Piece === null) ipv4Piece = number;
  30237. else if (ipv4Piece == 0) return;
  30238. else ipv4Piece = ipv4Piece * 10 + number;
  30239. if (ipv4Piece > 255) return;
  30240. pointer++;
  30241. }
  30242. address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece;
  30243. numbersSeen++;
  30244. if (numbersSeen == 2 || numbersSeen == 4) pieceIndex++;
  30245. }
  30246. if (numbersSeen != 4) return;
  30247. break;
  30248. } else if (char() == ':') {
  30249. pointer++;
  30250. if (!char()) return;
  30251. } else if (char()) return;
  30252. address[pieceIndex++] = value;
  30253. }
  30254. if (compress !== null) {
  30255. swaps = pieceIndex - compress;
  30256. pieceIndex = 7;
  30257. while (pieceIndex != 0 && swaps > 0) {
  30258. swap = address[pieceIndex];
  30259. address[pieceIndex--] = address[compress + swaps - 1];
  30260. address[compress + --swaps] = swap;
  30261. }
  30262. } else if (pieceIndex != 8) return;
  30263. return address;
  30264. };
  30265. var findLongestZeroSequence = function (ipv6) {
  30266. var maxIndex = null;
  30267. var maxLength = 1;
  30268. var currStart = null;
  30269. var currLength = 0;
  30270. var index = 0;
  30271. for (; index < 8; index++) {
  30272. if (ipv6[index] !== 0) {
  30273. if (currLength > maxLength) {
  30274. maxIndex = currStart;
  30275. maxLength = currLength;
  30276. }
  30277. currStart = null;
  30278. currLength = 0;
  30279. } else {
  30280. if (currStart === null) currStart = index;
  30281. ++currLength;
  30282. }
  30283. }
  30284. if (currLength > maxLength) {
  30285. maxIndex = currStart;
  30286. maxLength = currLength;
  30287. }
  30288. return maxIndex;
  30289. };
  30290. var serializeHost = function (host) {
  30291. var result, index, compress, ignore0;
  30292. // ipv4
  30293. if (typeof host == 'number') {
  30294. result = [];
  30295. for (index = 0; index < 4; index++) {
  30296. result.unshift(host % 256);
  30297. host = floor(host / 256);
  30298. } return result.join('.');
  30299. // ipv6
  30300. } else if (typeof host == 'object') {
  30301. result = '';
  30302. compress = findLongestZeroSequence(host);
  30303. for (index = 0; index < 8; index++) {
  30304. if (ignore0 && host[index] === 0) continue;
  30305. if (ignore0) ignore0 = false;
  30306. if (compress === index) {
  30307. result += index ? ':' : '::';
  30308. ignore0 = true;
  30309. } else {
  30310. result += host[index].toString(16);
  30311. if (index < 7) result += ':';
  30312. }
  30313. }
  30314. return '[' + result + ']';
  30315. } return host;
  30316. };
  30317. var C0ControlPercentEncodeSet = {};
  30318. var fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, {
  30319. ' ': 1, '"': 1, '<': 1, '>': 1, '`': 1
  30320. });
  30321. var pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, {
  30322. '#': 1, '?': 1, '{': 1, '}': 1
  30323. });
  30324. var userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, {
  30325. '/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\': 1, ']': 1, '^': 1, '|': 1
  30326. });
  30327. var percentEncode = function (char, set) {
  30328. var code = codeAt(char, 0);
  30329. return code > 0x20 && code < 0x7F && !has(set, char) ? char : encodeURIComponent(char);
  30330. };
  30331. var specialSchemes = {
  30332. ftp: 21,
  30333. file: null,
  30334. http: 80,
  30335. https: 443,
  30336. ws: 80,
  30337. wss: 443
  30338. };
  30339. var isSpecial = function (url) {
  30340. return has(specialSchemes, url.scheme);
  30341. };
  30342. var includesCredentials = function (url) {
  30343. return url.username != '' || url.password != '';
  30344. };
  30345. var cannotHaveUsernamePasswordPort = function (url) {
  30346. return !url.host || url.cannotBeABaseURL || url.scheme == 'file';
  30347. };
  30348. var isWindowsDriveLetter = function (string, normalized) {
  30349. var second;
  30350. return string.length == 2 && ALPHA.test(string.charAt(0))
  30351. && ((second = string.charAt(1)) == ':' || (!normalized && second == '|'));
  30352. };
  30353. var startsWithWindowsDriveLetter = function (string) {
  30354. var third;
  30355. return string.length > 1 && isWindowsDriveLetter(string.slice(0, 2)) && (
  30356. string.length == 2 ||
  30357. ((third = string.charAt(2)) === '/' || third === '\\' || third === '?' || third === '#')
  30358. );
  30359. };
  30360. var shortenURLsPath = function (url) {
  30361. var path = url.path;
  30362. var pathSize = path.length;
  30363. if (pathSize && (url.scheme != 'file' || pathSize != 1 || !isWindowsDriveLetter(path[0], true))) {
  30364. path.pop();
  30365. }
  30366. };
  30367. var isSingleDot = function (segment) {
  30368. return segment === '.' || segment.toLowerCase() === '%2e';
  30369. };
  30370. var isDoubleDot = function (segment) {
  30371. segment = segment.toLowerCase();
  30372. return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e';
  30373. };
  30374. // States:
  30375. var SCHEME_START = {};
  30376. var SCHEME = {};
  30377. var NO_SCHEME = {};
  30378. var SPECIAL_RELATIVE_OR_AUTHORITY = {};
  30379. var PATH_OR_AUTHORITY = {};
  30380. var RELATIVE = {};
  30381. var RELATIVE_SLASH = {};
  30382. var SPECIAL_AUTHORITY_SLASHES = {};
  30383. var SPECIAL_AUTHORITY_IGNORE_SLASHES = {};
  30384. var AUTHORITY = {};
  30385. var HOST = {};
  30386. var HOSTNAME = {};
  30387. var PORT = {};
  30388. var FILE = {};
  30389. var FILE_SLASH = {};
  30390. var FILE_HOST = {};
  30391. var PATH_START = {};
  30392. var PATH = {};
  30393. var CANNOT_BE_A_BASE_URL_PATH = {};
  30394. var QUERY = {};
  30395. var FRAGMENT = {};
  30396. // eslint-disable-next-line max-statements -- TODO
  30397. var parseURL = function (url, input, stateOverride, base) {
  30398. var state = stateOverride || SCHEME_START;
  30399. var pointer = 0;
  30400. var buffer = '';
  30401. var seenAt = false;
  30402. var seenBracket = false;
  30403. var seenPasswordToken = false;
  30404. var codePoints, char, bufferCodePoints, failure;
  30405. if (!stateOverride) {
  30406. url.scheme = '';
  30407. url.username = '';
  30408. url.password = '';
  30409. url.host = null;
  30410. url.port = null;
  30411. url.path = [];
  30412. url.query = null;
  30413. url.fragment = null;
  30414. url.cannotBeABaseURL = false;
  30415. input = input.replace(LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE, '');
  30416. }
  30417. input = input.replace(TAB_AND_NEW_LINE, '');
  30418. codePoints = arrayFrom(input);
  30419. while (pointer <= codePoints.length) {
  30420. char = codePoints[pointer];
  30421. switch (state) {
  30422. case SCHEME_START:
  30423. if (char && ALPHA.test(char)) {
  30424. buffer += char.toLowerCase();
  30425. state = SCHEME;
  30426. } else if (!stateOverride) {
  30427. state = NO_SCHEME;
  30428. continue;
  30429. } else return INVALID_SCHEME;
  30430. break;
  30431. case SCHEME:
  30432. if (char && (ALPHANUMERIC.test(char) || char == '+' || char == '-' || char == '.')) {
  30433. buffer += char.toLowerCase();
  30434. } else if (char == ':') {
  30435. if (stateOverride && (
  30436. (isSpecial(url) != has(specialSchemes, buffer)) ||
  30437. (buffer == 'file' && (includesCredentials(url) || url.port !== null)) ||
  30438. (url.scheme == 'file' && !url.host)
  30439. )) return;
  30440. url.scheme = buffer;
  30441. if (stateOverride) {
  30442. if (isSpecial(url) && specialSchemes[url.scheme] == url.port) url.port = null;
  30443. return;
  30444. }
  30445. buffer = '';
  30446. if (url.scheme == 'file') {
  30447. state = FILE;
  30448. } else if (isSpecial(url) && base && base.scheme == url.scheme) {
  30449. state = SPECIAL_RELATIVE_OR_AUTHORITY;
  30450. } else if (isSpecial(url)) {
  30451. state = SPECIAL_AUTHORITY_SLASHES;
  30452. } else if (codePoints[pointer + 1] == '/') {
  30453. state = PATH_OR_AUTHORITY;
  30454. pointer++;
  30455. } else {
  30456. url.cannotBeABaseURL = true;
  30457. url.path.push('');
  30458. state = CANNOT_BE_A_BASE_URL_PATH;
  30459. }
  30460. } else if (!stateOverride) {
  30461. buffer = '';
  30462. state = NO_SCHEME;
  30463. pointer = 0;
  30464. continue;
  30465. } else return INVALID_SCHEME;
  30466. break;
  30467. case NO_SCHEME:
  30468. if (!base || (base.cannotBeABaseURL && char != '#')) return INVALID_SCHEME;
  30469. if (base.cannotBeABaseURL && char == '#') {
  30470. url.scheme = base.scheme;
  30471. url.path = base.path.slice();
  30472. url.query = base.query;
  30473. url.fragment = '';
  30474. url.cannotBeABaseURL = true;
  30475. state = FRAGMENT;
  30476. break;
  30477. }
  30478. state = base.scheme == 'file' ? FILE : RELATIVE;
  30479. continue;
  30480. case SPECIAL_RELATIVE_OR_AUTHORITY:
  30481. if (char == '/' && codePoints[pointer + 1] == '/') {
  30482. state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
  30483. pointer++;
  30484. } else {
  30485. state = RELATIVE;
  30486. continue;
  30487. } break;
  30488. case PATH_OR_AUTHORITY:
  30489. if (char == '/') {
  30490. state = AUTHORITY;
  30491. break;
  30492. } else {
  30493. state = PATH;
  30494. continue;
  30495. }
  30496. case RELATIVE:
  30497. url.scheme = base.scheme;
  30498. if (char == EOF) {
  30499. url.username = base.username;
  30500. url.password = base.password;
  30501. url.host = base.host;
  30502. url.port = base.port;
  30503. url.path = base.path.slice();
  30504. url.query = base.query;
  30505. } else if (char == '/' || (char == '\\' && isSpecial(url))) {
  30506. state = RELATIVE_SLASH;
  30507. } else if (char == '?') {
  30508. url.username = base.username;
  30509. url.password = base.password;
  30510. url.host = base.host;
  30511. url.port = base.port;
  30512. url.path = base.path.slice();
  30513. url.query = '';
  30514. state = QUERY;
  30515. } else if (char == '#') {
  30516. url.username = base.username;
  30517. url.password = base.password;
  30518. url.host = base.host;
  30519. url.port = base.port;
  30520. url.path = base.path.slice();
  30521. url.query = base.query;
  30522. url.fragment = '';
  30523. state = FRAGMENT;
  30524. } else {
  30525. url.username = base.username;
  30526. url.password = base.password;
  30527. url.host = base.host;
  30528. url.port = base.port;
  30529. url.path = base.path.slice();
  30530. url.path.pop();
  30531. state = PATH;
  30532. continue;
  30533. } break;
  30534. case RELATIVE_SLASH:
  30535. if (isSpecial(url) && (char == '/' || char == '\\')) {
  30536. state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
  30537. } else if (char == '/') {
  30538. state = AUTHORITY;
  30539. } else {
  30540. url.username = base.username;
  30541. url.password = base.password;
  30542. url.host = base.host;
  30543. url.port = base.port;
  30544. state = PATH;
  30545. continue;
  30546. } break;
  30547. case SPECIAL_AUTHORITY_SLASHES:
  30548. state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
  30549. if (char != '/' || buffer.charAt(pointer + 1) != '/') continue;
  30550. pointer++;
  30551. break;
  30552. case SPECIAL_AUTHORITY_IGNORE_SLASHES:
  30553. if (char != '/' && char != '\\') {
  30554. state = AUTHORITY;
  30555. continue;
  30556. } break;
  30557. case AUTHORITY:
  30558. if (char == '@') {
  30559. if (seenAt) buffer = '%40' + buffer;
  30560. seenAt = true;
  30561. bufferCodePoints = arrayFrom(buffer);
  30562. for (var i = 0; i < bufferCodePoints.length; i++) {
  30563. var codePoint = bufferCodePoints[i];
  30564. if (codePoint == ':' && !seenPasswordToken) {
  30565. seenPasswordToken = true;
  30566. continue;
  30567. }
  30568. var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet);
  30569. if (seenPasswordToken) url.password += encodedCodePoints;
  30570. else url.username += encodedCodePoints;
  30571. }
  30572. buffer = '';
  30573. } else if (
  30574. char == EOF || char == '/' || char == '?' || char == '#' ||
  30575. (char == '\\' && isSpecial(url))
  30576. ) {
  30577. if (seenAt && buffer == '') return INVALID_AUTHORITY;
  30578. pointer -= arrayFrom(buffer).length + 1;
  30579. buffer = '';
  30580. state = HOST;
  30581. } else buffer += char;
  30582. break;
  30583. case HOST:
  30584. case HOSTNAME:
  30585. if (stateOverride && url.scheme == 'file') {
  30586. state = FILE_HOST;
  30587. continue;
  30588. } else if (char == ':' && !seenBracket) {
  30589. if (buffer == '') return INVALID_HOST;
  30590. failure = parseHost(url, buffer);
  30591. if (failure) return failure;
  30592. buffer = '';
  30593. state = PORT;
  30594. if (stateOverride == HOSTNAME) return;
  30595. } else if (
  30596. char == EOF || char == '/' || char == '?' || char == '#' ||
  30597. (char == '\\' && isSpecial(url))
  30598. ) {
  30599. if (isSpecial(url) && buffer == '') return INVALID_HOST;
  30600. if (stateOverride && buffer == '' && (includesCredentials(url) || url.port !== null)) return;
  30601. failure = parseHost(url, buffer);
  30602. if (failure) return failure;
  30603. buffer = '';
  30604. state = PATH_START;
  30605. if (stateOverride) return;
  30606. continue;
  30607. } else {
  30608. if (char == '[') seenBracket = true;
  30609. else if (char == ']') seenBracket = false;
  30610. buffer += char;
  30611. } break;
  30612. case PORT:
  30613. if (DIGIT.test(char)) {
  30614. buffer += char;
  30615. } else if (
  30616. char == EOF || char == '/' || char == '?' || char == '#' ||
  30617. (char == '\\' && isSpecial(url)) ||
  30618. stateOverride
  30619. ) {
  30620. if (buffer != '') {
  30621. var port = parseInt(buffer, 10);
  30622. if (port > 0xFFFF) return INVALID_PORT;
  30623. url.port = (isSpecial(url) && port === specialSchemes[url.scheme]) ? null : port;
  30624. buffer = '';
  30625. }
  30626. if (stateOverride) return;
  30627. state = PATH_START;
  30628. continue;
  30629. } else return INVALID_PORT;
  30630. break;
  30631. case FILE:
  30632. url.scheme = 'file';
  30633. if (char == '/' || char == '\\') state = FILE_SLASH;
  30634. else if (base && base.scheme == 'file') {
  30635. if (char == EOF) {
  30636. url.host = base.host;
  30637. url.path = base.path.slice();
  30638. url.query = base.query;
  30639. } else if (char == '?') {
  30640. url.host = base.host;
  30641. url.path = base.path.slice();
  30642. url.query = '';
  30643. state = QUERY;
  30644. } else if (char == '#') {
  30645. url.host = base.host;
  30646. url.path = base.path.slice();
  30647. url.query = base.query;
  30648. url.fragment = '';
  30649. state = FRAGMENT;
  30650. } else {
  30651. if (!startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {
  30652. url.host = base.host;
  30653. url.path = base.path.slice();
  30654. shortenURLsPath(url);
  30655. }
  30656. state = PATH;
  30657. continue;
  30658. }
  30659. } else {
  30660. state = PATH;
  30661. continue;
  30662. } break;
  30663. case FILE_SLASH:
  30664. if (char == '/' || char == '\\') {
  30665. state = FILE_HOST;
  30666. break;
  30667. }
  30668. if (base && base.scheme == 'file' && !startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {
  30669. if (isWindowsDriveLetter(base.path[0], true)) url.path.push(base.path[0]);
  30670. else url.host = base.host;
  30671. }
  30672. state = PATH;
  30673. continue;
  30674. case FILE_HOST:
  30675. if (char == EOF || char == '/' || char == '\\' || char == '?' || char == '#') {
  30676. if (!stateOverride && isWindowsDriveLetter(buffer)) {
  30677. state = PATH;
  30678. } else if (buffer == '') {
  30679. url.host = '';
  30680. if (stateOverride) return;
  30681. state = PATH_START;
  30682. } else {
  30683. failure = parseHost(url, buffer);
  30684. if (failure) return failure;
  30685. if (url.host == 'localhost') url.host = '';
  30686. if (stateOverride) return;
  30687. buffer = '';
  30688. state = PATH_START;
  30689. } continue;
  30690. } else buffer += char;
  30691. break;
  30692. case PATH_START:
  30693. if (isSpecial(url)) {
  30694. state = PATH;
  30695. if (char != '/' && char != '\\') continue;
  30696. } else if (!stateOverride && char == '?') {
  30697. url.query = '';
  30698. state = QUERY;
  30699. } else if (!stateOverride && char == '#') {
  30700. url.fragment = '';
  30701. state = FRAGMENT;
  30702. } else if (char != EOF) {
  30703. state = PATH;
  30704. if (char != '/') continue;
  30705. } break;
  30706. case PATH:
  30707. if (
  30708. char == EOF || char == '/' ||
  30709. (char == '\\' && isSpecial(url)) ||
  30710. (!stateOverride && (char == '?' || char == '#'))
  30711. ) {
  30712. if (isDoubleDot(buffer)) {
  30713. shortenURLsPath(url);
  30714. if (char != '/' && !(char == '\\' && isSpecial(url))) {
  30715. url.path.push('');
  30716. }
  30717. } else if (isSingleDot(buffer)) {
  30718. if (char != '/' && !(char == '\\' && isSpecial(url))) {
  30719. url.path.push('');
  30720. }
  30721. } else {
  30722. if (url.scheme == 'file' && !url.path.length && isWindowsDriveLetter(buffer)) {
  30723. if (url.host) url.host = '';
  30724. buffer = buffer.charAt(0) + ':'; // normalize windows drive letter
  30725. }
  30726. url.path.push(buffer);
  30727. }
  30728. buffer = '';
  30729. if (url.scheme == 'file' && (char == EOF || char == '?' || char == '#')) {
  30730. while (url.path.length > 1 && url.path[0] === '') {
  30731. url.path.shift();
  30732. }
  30733. }
  30734. if (char == '?') {
  30735. url.query = '';
  30736. state = QUERY;
  30737. } else if (char == '#') {
  30738. url.fragment = '';
  30739. state = FRAGMENT;
  30740. }
  30741. } else {
  30742. buffer += percentEncode(char, pathPercentEncodeSet);
  30743. } break;
  30744. case CANNOT_BE_A_BASE_URL_PATH:
  30745. if (char == '?') {
  30746. url.query = '';
  30747. state = QUERY;
  30748. } else if (char == '#') {
  30749. url.fragment = '';
  30750. state = FRAGMENT;
  30751. } else if (char != EOF) {
  30752. url.path[0] += percentEncode(char, C0ControlPercentEncodeSet);
  30753. } break;
  30754. case QUERY:
  30755. if (!stateOverride && char == '#') {
  30756. url.fragment = '';
  30757. state = FRAGMENT;
  30758. } else if (char != EOF) {
  30759. if (char == "'" && isSpecial(url)) url.query += '%27';
  30760. else if (char == '#') url.query += '%23';
  30761. else url.query += percentEncode(char, C0ControlPercentEncodeSet);
  30762. } break;
  30763. case FRAGMENT:
  30764. if (char != EOF) url.fragment += percentEncode(char, fragmentPercentEncodeSet);
  30765. break;
  30766. }
  30767. pointer++;
  30768. }
  30769. };
  30770. // `URL` constructor
  30771. // https://url.spec.whatwg.org/#url-class
  30772. var URLConstructor = function URL(url /* , base */) {
  30773. var that = anInstance(this, URLConstructor, 'URL');
  30774. var base = arguments.length > 1 ? arguments[1] : undefined;
  30775. var urlString = String(url);
  30776. var state = setInternalState(that, { type: 'URL' });
  30777. var baseState, failure;
  30778. if (base !== undefined) {
  30779. if (base instanceof URLConstructor) baseState = getInternalURLState(base);
  30780. else {
  30781. failure = parseURL(baseState = {}, String(base));
  30782. if (failure) throw TypeError(failure);
  30783. }
  30784. }
  30785. failure = parseURL(state, urlString, null, baseState);
  30786. if (failure) throw TypeError(failure);
  30787. var searchParams = state.searchParams = new URLSearchParams();
  30788. var searchParamsState = getInternalSearchParamsState(searchParams);
  30789. searchParamsState.updateSearchParams(state.query);
  30790. searchParamsState.updateURL = function () {
  30791. state.query = String(searchParams) || null;
  30792. };
  30793. if (!DESCRIPTORS) {
  30794. that.href = serializeURL.call(that);
  30795. that.origin = getOrigin.call(that);
  30796. that.protocol = getProtocol.call(that);
  30797. that.username = getUsername.call(that);
  30798. that.password = getPassword.call(that);
  30799. that.host = getHost.call(that);
  30800. that.hostname = getHostname.call(that);
  30801. that.port = getPort.call(that);
  30802. that.pathname = getPathname.call(that);
  30803. that.search = getSearch.call(that);
  30804. that.searchParams = getSearchParams.call(that);
  30805. that.hash = getHash.call(that);
  30806. }
  30807. };
  30808. var URLPrototype = URLConstructor.prototype;
  30809. var serializeURL = function () {
  30810. var url = getInternalURLState(this);
  30811. var scheme = url.scheme;
  30812. var username = url.username;
  30813. var password = url.password;
  30814. var host = url.host;
  30815. var port = url.port;
  30816. var path = url.path;
  30817. var query = url.query;
  30818. var fragment = url.fragment;
  30819. var output = scheme + ':';
  30820. if (host !== null) {
  30821. output += '//';
  30822. if (includesCredentials(url)) {
  30823. output += username + (password ? ':' + password : '') + '@';
  30824. }
  30825. output += serializeHost(host);
  30826. if (port !== null) output += ':' + port;
  30827. } else if (scheme == 'file') output += '//';
  30828. output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';
  30829. if (query !== null) output += '?' + query;
  30830. if (fragment !== null) output += '#' + fragment;
  30831. return output;
  30832. };
  30833. var getOrigin = function () {
  30834. var url = getInternalURLState(this);
  30835. var scheme = url.scheme;
  30836. var port = url.port;
  30837. if (scheme == 'blob') try {
  30838. return new URL(scheme.path[0]).origin;
  30839. } catch (error) {
  30840. return 'null';
  30841. }
  30842. if (scheme == 'file' || !isSpecial(url)) return 'null';
  30843. return scheme + '://' + serializeHost(url.host) + (port !== null ? ':' + port : '');
  30844. };
  30845. var getProtocol = function () {
  30846. return getInternalURLState(this).scheme + ':';
  30847. };
  30848. var getUsername = function () {
  30849. return getInternalURLState(this).username;
  30850. };
  30851. var getPassword = function () {
  30852. return getInternalURLState(this).password;
  30853. };
  30854. var getHost = function () {
  30855. var url = getInternalURLState(this);
  30856. var host = url.host;
  30857. var port = url.port;
  30858. return host === null ? ''
  30859. : port === null ? serializeHost(host)
  30860. : serializeHost(host) + ':' + port;
  30861. };
  30862. var getHostname = function () {
  30863. var host = getInternalURLState(this).host;
  30864. return host === null ? '' : serializeHost(host);
  30865. };
  30866. var getPort = function () {
  30867. var port = getInternalURLState(this).port;
  30868. return port === null ? '' : String(port);
  30869. };
  30870. var getPathname = function () {
  30871. var url = getInternalURLState(this);
  30872. var path = url.path;
  30873. return url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';
  30874. };
  30875. var getSearch = function () {
  30876. var query = getInternalURLState(this).query;
  30877. return query ? '?' + query : '';
  30878. };
  30879. var getSearchParams = function () {
  30880. return getInternalURLState(this).searchParams;
  30881. };
  30882. var getHash = function () {
  30883. var fragment = getInternalURLState(this).fragment;
  30884. return fragment ? '#' + fragment : '';
  30885. };
  30886. var accessorDescriptor = function (getter, setter) {
  30887. return { get: getter, set: setter, configurable: true, enumerable: true };
  30888. };
  30889. if (DESCRIPTORS) {
  30890. defineProperties(URLPrototype, {
  30891. // `URL.prototype.href` accessors pair
  30892. // https://url.spec.whatwg.org/#dom-url-href
  30893. href: accessorDescriptor(serializeURL, function (href) {
  30894. var url = getInternalURLState(this);
  30895. var urlString = String(href);
  30896. var failure = parseURL(url, urlString);
  30897. if (failure) throw TypeError(failure);
  30898. getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);
  30899. }),
  30900. // `URL.prototype.origin` getter
  30901. // https://url.spec.whatwg.org/#dom-url-origin
  30902. origin: accessorDescriptor(getOrigin),
  30903. // `URL.prototype.protocol` accessors pair
  30904. // https://url.spec.whatwg.org/#dom-url-protocol
  30905. protocol: accessorDescriptor(getProtocol, function (protocol) {
  30906. var url = getInternalURLState(this);
  30907. parseURL(url, String(protocol) + ':', SCHEME_START);
  30908. }),
  30909. // `URL.prototype.username` accessors pair
  30910. // https://url.spec.whatwg.org/#dom-url-username
  30911. username: accessorDescriptor(getUsername, function (username) {
  30912. var url = getInternalURLState(this);
  30913. var codePoints = arrayFrom(String(username));
  30914. if (cannotHaveUsernamePasswordPort(url)) return;
  30915. url.username = '';
  30916. for (var i = 0; i < codePoints.length; i++) {
  30917. url.username += percentEncode(codePoints[i], userinfoPercentEncodeSet);
  30918. }
  30919. }),
  30920. // `URL.prototype.password` accessors pair
  30921. // https://url.spec.whatwg.org/#dom-url-password
  30922. password: accessorDescriptor(getPassword, function (password) {
  30923. var url = getInternalURLState(this);
  30924. var codePoints = arrayFrom(String(password));
  30925. if (cannotHaveUsernamePasswordPort(url)) return;
  30926. url.password = '';
  30927. for (var i = 0; i < codePoints.length; i++) {
  30928. url.password += percentEncode(codePoints[i], userinfoPercentEncodeSet);
  30929. }
  30930. }),
  30931. // `URL.prototype.host` accessors pair
  30932. // https://url.spec.whatwg.org/#dom-url-host
  30933. host: accessorDescriptor(getHost, function (host) {
  30934. var url = getInternalURLState(this);
  30935. if (url.cannotBeABaseURL) return;
  30936. parseURL(url, String(host), HOST);
  30937. }),
  30938. // `URL.prototype.hostname` accessors pair
  30939. // https://url.spec.whatwg.org/#dom-url-hostname
  30940. hostname: accessorDescriptor(getHostname, function (hostname) {
  30941. var url = getInternalURLState(this);
  30942. if (url.cannotBeABaseURL) return;
  30943. parseURL(url, String(hostname), HOSTNAME);
  30944. }),
  30945. // `URL.prototype.port` accessors pair
  30946. // https://url.spec.whatwg.org/#dom-url-port
  30947. port: accessorDescriptor(getPort, function (port) {
  30948. var url = getInternalURLState(this);
  30949. if (cannotHaveUsernamePasswordPort(url)) return;
  30950. port = String(port);
  30951. if (port == '') url.port = null;
  30952. else parseURL(url, port, PORT);
  30953. }),
  30954. // `URL.prototype.pathname` accessors pair
  30955. // https://url.spec.whatwg.org/#dom-url-pathname
  30956. pathname: accessorDescriptor(getPathname, function (pathname) {
  30957. var url = getInternalURLState(this);
  30958. if (url.cannotBeABaseURL) return;
  30959. url.path = [];
  30960. parseURL(url, pathname + '', PATH_START);
  30961. }),
  30962. // `URL.prototype.search` accessors pair
  30963. // https://url.spec.whatwg.org/#dom-url-search
  30964. search: accessorDescriptor(getSearch, function (search) {
  30965. var url = getInternalURLState(this);
  30966. search = String(search);
  30967. if (search == '') {
  30968. url.query = null;
  30969. } else {
  30970. if ('?' == search.charAt(0)) search = search.slice(1);
  30971. url.query = '';
  30972. parseURL(url, search, QUERY);
  30973. }
  30974. getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);
  30975. }),
  30976. // `URL.prototype.searchParams` getter
  30977. // https://url.spec.whatwg.org/#dom-url-searchparams
  30978. searchParams: accessorDescriptor(getSearchParams),
  30979. // `URL.prototype.hash` accessors pair
  30980. // https://url.spec.whatwg.org/#dom-url-hash
  30981. hash: accessorDescriptor(getHash, function (hash) {
  30982. var url = getInternalURLState(this);
  30983. hash = String(hash);
  30984. if (hash == '') {
  30985. url.fragment = null;
  30986. return;
  30987. }
  30988. if ('#' == hash.charAt(0)) hash = hash.slice(1);
  30989. url.fragment = '';
  30990. parseURL(url, hash, FRAGMENT);
  30991. })
  30992. });
  30993. }
  30994. // `URL.prototype.toJSON` method
  30995. // https://url.spec.whatwg.org/#dom-url-tojson
  30996. redefine(URLPrototype, 'toJSON', function toJSON() {
  30997. return serializeURL.call(this);
  30998. }, { enumerable: true });
  30999. // `URL.prototype.toString` method
  31000. // https://url.spec.whatwg.org/#URL-stringification-behavior
  31001. redefine(URLPrototype, 'toString', function toString() {
  31002. return serializeURL.call(this);
  31003. }, { enumerable: true });
  31004. if (NativeURL) {
  31005. var nativeCreateObjectURL = NativeURL.createObjectURL;
  31006. var nativeRevokeObjectURL = NativeURL.revokeObjectURL;
  31007. // `URL.createObjectURL` method
  31008. // https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL
  31009. // eslint-disable-next-line no-unused-vars -- required for `.length`
  31010. if (nativeCreateObjectURL) redefine(URLConstructor, 'createObjectURL', function createObjectURL(blob) {
  31011. return nativeCreateObjectURL.apply(NativeURL, arguments);
  31012. });
  31013. // `URL.revokeObjectURL` method
  31014. // https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL
  31015. // eslint-disable-next-line no-unused-vars -- required for `.length`
  31016. if (nativeRevokeObjectURL) redefine(URLConstructor, 'revokeObjectURL', function revokeObjectURL(url) {
  31017. return nativeRevokeObjectURL.apply(NativeURL, arguments);
  31018. });
  31019. }
  31020. setToStringTag(URLConstructor, 'URL');
  31021. $({ global: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, {
  31022. URL: URLConstructor
  31023. });
  31024. /***/ })
  31025. /******/ });
  31026. /************************************************************************/
  31027. /******/ // The module cache
  31028. /******/ var __webpack_module_cache__ = {};
  31029. /******/
  31030. /******/ // The require function
  31031. /******/ function __nested_webpack_require_210484__(moduleId) {
  31032. /******/ // Check if module is in cache
  31033. /******/ if(__webpack_module_cache__[moduleId]) {
  31034. /******/ return __webpack_module_cache__[moduleId].exports;
  31035. /******/ }
  31036. /******/ // Create a new module (and put it into the cache)
  31037. /******/ var module = __webpack_module_cache__[moduleId] = {
  31038. /******/ // no module.id needed
  31039. /******/ // no module.loaded needed
  31040. /******/ exports: {}
  31041. /******/ };
  31042. /******/
  31043. /******/ // Execute the module function
  31044. /******/ __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_210484__);
  31045. /******/
  31046. /******/ // Return the exports of the module
  31047. /******/ return module.exports;
  31048. /******/ }
  31049. /******/
  31050. /************************************************************************/
  31051. /******/ /* webpack/runtime/define property getters */
  31052. /******/ !function() {
  31053. /******/ // define getter functions for harmony exports
  31054. /******/ __nested_webpack_require_210484__.d = function(exports, definition) {
  31055. /******/ for(var key in definition) {
  31056. /******/ if(__nested_webpack_require_210484__.o(definition, key) && !__nested_webpack_require_210484__.o(exports, key)) {
  31057. /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
  31058. /******/ }
  31059. /******/ }
  31060. /******/ };
  31061. /******/ }();
  31062. /******/
  31063. /******/ /* webpack/runtime/global */
  31064. /******/ !function() {
  31065. /******/ __nested_webpack_require_210484__.g = (function() {
  31066. /******/ if (typeof globalThis === 'object') return globalThis;
  31067. /******/ try {
  31068. /******/ return this || new Function('return this')();
  31069. /******/ } catch (e) {
  31070. /******/ if (typeof window === 'object') return window;
  31071. /******/ }
  31072. /******/ })();
  31073. /******/ }();
  31074. /******/
  31075. /******/ /* webpack/runtime/hasOwnProperty shorthand */
  31076. /******/ !function() {
  31077. /******/ __nested_webpack_require_210484__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
  31078. /******/ }();
  31079. /******/
  31080. /******/ /* webpack/runtime/make namespace object */
  31081. /******/ !function() {
  31082. /******/ // define __esModule on exports
  31083. /******/ __nested_webpack_require_210484__.r = function(exports) {
  31084. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  31085. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  31086. /******/ }
  31087. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  31088. /******/ };
  31089. /******/ }();
  31090. /******/
  31091. /************************************************************************/
  31092. var __webpack_exports__ = {};
  31093. // This entry need to be wrapped in an IIFE because it need to be in strict mode.
  31094. !function() {
  31095. "use strict";
  31096. // ESM COMPAT FLAG
  31097. __nested_webpack_require_210484__.r(__webpack_exports__);
  31098. // EXPORTS
  31099. __nested_webpack_require_210484__.d(__webpack_exports__, {
  31100. "Dropzone": function() { return /* reexport */ Dropzone; },
  31101. "default": function() { return /* binding */ dropzone_dist; }
  31102. });
  31103. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js
  31104. var es_array_concat = __nested_webpack_require_210484__(2222);
  31105. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.filter.js
  31106. var es_array_filter = __nested_webpack_require_210484__(7327);
  31107. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.index-of.js
  31108. var es_array_index_of = __nested_webpack_require_210484__(2772);
  31109. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.iterator.js
  31110. var es_array_iterator = __nested_webpack_require_210484__(6992);
  31111. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.map.js
  31112. var es_array_map = __nested_webpack_require_210484__(1249);
  31113. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.slice.js
  31114. var es_array_slice = __nested_webpack_require_210484__(7042);
  31115. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.splice.js
  31116. var es_array_splice = __nested_webpack_require_210484__(561);
  31117. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array-buffer.constructor.js
  31118. var es_array_buffer_constructor = __nested_webpack_require_210484__(8264);
  31119. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.function.name.js
  31120. var es_function_name = __nested_webpack_require_210484__(8309);
  31121. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.get-prototype-of.js
  31122. var es_object_get_prototype_of = __nested_webpack_require_210484__(489);
  31123. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.to-string.js
  31124. var es_object_to_string = __nested_webpack_require_210484__(1539);
  31125. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.exec.js
  31126. var es_regexp_exec = __nested_webpack_require_210484__(4916);
  31127. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.to-string.js
  31128. var es_regexp_to_string = __nested_webpack_require_210484__(9714);
  31129. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.iterator.js
  31130. var es_string_iterator = __nested_webpack_require_210484__(8783);
  31131. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.match.js
  31132. var es_string_match = __nested_webpack_require_210484__(4723);
  31133. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.replace.js
  31134. var es_string_replace = __nested_webpack_require_210484__(5306);
  31135. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.split.js
  31136. var es_string_split = __nested_webpack_require_210484__(3123);
  31137. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.trim.js
  31138. var es_string_trim = __nested_webpack_require_210484__(3210);
  31139. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.uint8-array.js
  31140. var es_typed_array_uint8_array = __nested_webpack_require_210484__(2472);
  31141. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.copy-within.js
  31142. var es_typed_array_copy_within = __nested_webpack_require_210484__(2990);
  31143. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.every.js
  31144. var es_typed_array_every = __nested_webpack_require_210484__(8927);
  31145. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.fill.js
  31146. var es_typed_array_fill = __nested_webpack_require_210484__(3105);
  31147. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.filter.js
  31148. var es_typed_array_filter = __nested_webpack_require_210484__(5035);
  31149. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.find.js
  31150. var es_typed_array_find = __nested_webpack_require_210484__(4345);
  31151. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.find-index.js
  31152. var es_typed_array_find_index = __nested_webpack_require_210484__(7174);
  31153. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.for-each.js
  31154. var es_typed_array_for_each = __nested_webpack_require_210484__(2846);
  31155. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.includes.js
  31156. var es_typed_array_includes = __nested_webpack_require_210484__(4731);
  31157. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.index-of.js
  31158. var es_typed_array_index_of = __nested_webpack_require_210484__(7209);
  31159. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.iterator.js
  31160. var es_typed_array_iterator = __nested_webpack_require_210484__(6319);
  31161. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.join.js
  31162. var es_typed_array_join = __nested_webpack_require_210484__(8867);
  31163. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.last-index-of.js
  31164. var es_typed_array_last_index_of = __nested_webpack_require_210484__(7789);
  31165. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.map.js
  31166. var es_typed_array_map = __nested_webpack_require_210484__(3739);
  31167. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.reduce.js
  31168. var es_typed_array_reduce = __nested_webpack_require_210484__(9368);
  31169. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.reduce-right.js
  31170. var es_typed_array_reduce_right = __nested_webpack_require_210484__(4483);
  31171. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.reverse.js
  31172. var es_typed_array_reverse = __nested_webpack_require_210484__(2056);
  31173. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.set.js
  31174. var es_typed_array_set = __nested_webpack_require_210484__(3462);
  31175. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.slice.js
  31176. var es_typed_array_slice = __nested_webpack_require_210484__(678);
  31177. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.some.js
  31178. var es_typed_array_some = __nested_webpack_require_210484__(7462);
  31179. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.sort.js
  31180. var es_typed_array_sort = __nested_webpack_require_210484__(3824);
  31181. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.subarray.js
  31182. var es_typed_array_subarray = __nested_webpack_require_210484__(5021);
  31183. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.to-locale-string.js
  31184. var es_typed_array_to_locale_string = __nested_webpack_require_210484__(2974);
  31185. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.to-string.js
  31186. var es_typed_array_to_string = __nested_webpack_require_210484__(5016);
  31187. // EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.for-each.js
  31188. var web_dom_collections_for_each = __nested_webpack_require_210484__(4747);
  31189. // EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.iterator.js
  31190. var web_dom_collections_iterator = __nested_webpack_require_210484__(3948);
  31191. // EXTERNAL MODULE: ./node_modules/core-js/modules/web.url.js
  31192. var web_url = __nested_webpack_require_210484__(285);
  31193. ;// CONCATENATED MODULE: ./src/emitter.js
  31194. function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
  31195. function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
  31196. function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
  31197. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  31198. function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  31199. function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
  31200. // The Emitter class provides the ability to call `.on()` on Dropzone to listen
  31201. // to events.
  31202. // It is strongly based on component's emitter class, and I removed the
  31203. // functionality because of the dependency hell with different frameworks.
  31204. var Emitter = /*#__PURE__*/function () {
  31205. function Emitter() {
  31206. _classCallCheck(this, Emitter);
  31207. }
  31208. _createClass(Emitter, [{
  31209. key: "on",
  31210. value: // Add an event listener for given event
  31211. function on(event, fn) {
  31212. this._callbacks = this._callbacks || {}; // Create namespace for this event
  31213. if (!this._callbacks[event]) {
  31214. this._callbacks[event] = [];
  31215. }
  31216. this._callbacks[event].push(fn);
  31217. return this;
  31218. }
  31219. }, {
  31220. key: "emit",
  31221. value: function emit(event) {
  31222. this._callbacks = this._callbacks || {};
  31223. var callbacks = this._callbacks[event];
  31224. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  31225. args[_key - 1] = arguments[_key];
  31226. }
  31227. if (callbacks) {
  31228. var _iterator = _createForOfIteratorHelper(callbacks, true),
  31229. _step;
  31230. try {
  31231. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  31232. var callback = _step.value;
  31233. callback.apply(this, args);
  31234. }
  31235. } catch (err) {
  31236. _iterator.e(err);
  31237. } finally {
  31238. _iterator.f();
  31239. }
  31240. } // trigger a corresponding DOM event
  31241. if (this.element) {
  31242. this.element.dispatchEvent(this.makeEvent("dropzone:" + event, {
  31243. args: args
  31244. }));
  31245. }
  31246. return this;
  31247. }
  31248. }, {
  31249. key: "makeEvent",
  31250. value: function makeEvent(eventName, detail) {
  31251. var params = {
  31252. bubbles: true,
  31253. cancelable: true,
  31254. detail: detail
  31255. };
  31256. if (typeof window.CustomEvent === "function") {
  31257. return new CustomEvent(eventName, params);
  31258. } else {
  31259. // IE 11 support
  31260. // https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent
  31261. var evt = document.createEvent("CustomEvent");
  31262. evt.initCustomEvent(eventName, params.bubbles, params.cancelable, params.detail);
  31263. return evt;
  31264. }
  31265. } // Remove event listener for given event. If fn is not provided, all event
  31266. // listeners for that event will be removed. If neither is provided, all
  31267. // event listeners will be removed.
  31268. }, {
  31269. key: "off",
  31270. value: function off(event, fn) {
  31271. if (!this._callbacks || arguments.length === 0) {
  31272. this._callbacks = {};
  31273. return this;
  31274. } // specific event
  31275. var callbacks = this._callbacks[event];
  31276. if (!callbacks) {
  31277. return this;
  31278. } // remove all handlers
  31279. if (arguments.length === 1) {
  31280. delete this._callbacks[event];
  31281. return this;
  31282. } // remove specific handler
  31283. for (var i = 0; i < callbacks.length; i++) {
  31284. var callback = callbacks[i];
  31285. if (callback === fn) {
  31286. callbacks.splice(i, 1);
  31287. break;
  31288. }
  31289. }
  31290. return this;
  31291. }
  31292. }]);
  31293. return Emitter;
  31294. }();
  31295. ;// CONCATENATED MODULE: ./src/preview-template.html
  31296. // Module
  31297. var code = "<div class=\"dz-preview dz-file-preview\"> <div class=\"dz-image\"><img data-dz-thumbnail/></div> <div class=\"dz-details\"> <div class=\"dz-size\"><span data-dz-size></span></div> <div class=\"dz-filename\"><span data-dz-name></span></div> </div> <div class=\"dz-progress\"> <span class=\"dz-upload\" data-dz-uploadprogress></span> </div> <div class=\"dz-error-message\"><span data-dz-errormessage></span></div> <div class=\"dz-success-mark\"> <svg width=\"54px\" height=\"54px\" viewBox=\"0 0 54 54\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"> <title>Check</title> <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\"> <path d=\"M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z\" stroke-opacity=\"0.198794158\" stroke=\"#747474\" fill-opacity=\"0.816519475\" fill=\"#FFFFFF\"></path> </g> </svg> </div> <div class=\"dz-error-mark\"> <svg width=\"54px\" height=\"54px\" viewBox=\"0 0 54 54\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"> <title>Error</title> <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\"> <g stroke=\"#747474\" stroke-opacity=\"0.198794158\" fill=\"#FFFFFF\" fill-opacity=\"0.816519475\"> <path d=\"M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z\"></path> </g> </g> </svg> </div> </div> ";
  31298. // Exports
  31299. /* harmony default export */ var preview_template = (code);
  31300. ;// CONCATENATED MODULE: ./src/options.js
  31301. function options_createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = options_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
  31302. function options_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return options_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return options_arrayLikeToArray(o, minLen); }
  31303. function options_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
  31304. var defaultOptions = {
  31305. /**
  31306. * Has to be specified on elements other than form (or when the form
  31307. * doesn't have an `action` attribute). You can also
  31308. * provide a function that will be called with `files` and
  31309. * must return the url (since `v3.12.0`)
  31310. */
  31311. url: null,
  31312. /**
  31313. * Can be changed to `"put"` if necessary. You can also provide a function
  31314. * that will be called with `files` and must return the method (since `v3.12.0`).
  31315. */
  31316. method: "post",
  31317. /**
  31318. * Will be set on the XHRequest.
  31319. */
  31320. withCredentials: false,
  31321. /**
  31322. * The timeout for the XHR requests in milliseconds (since `v4.4.0`).
  31323. * If set to null or 0, no timeout is going to be set.
  31324. */
  31325. timeout: null,
  31326. /**
  31327. * How many file uploads to process in parallel (See the
  31328. * Enqueuing file uploads documentation section for more info)
  31329. */
  31330. parallelUploads: 2,
  31331. /**
  31332. * Whether to send multiple files in one request. If
  31333. * this it set to true, then the fallback file input element will
  31334. * have the `multiple` attribute as well. This option will
  31335. * also trigger additional events (like `processingmultiple`). See the events
  31336. * documentation section for more information.
  31337. */
  31338. uploadMultiple: false,
  31339. /**
  31340. * Whether you want files to be uploaded in chunks to your server. This can't be
  31341. * used in combination with `uploadMultiple`.
  31342. *
  31343. * See [chunksUploaded](#config-chunksUploaded) for the callback to finalise an upload.
  31344. */
  31345. chunking: false,
  31346. /**
  31347. * If `chunking` is enabled, this defines whether **every** file should be chunked,
  31348. * even if the file size is below chunkSize. This means, that the additional chunk
  31349. * form data will be submitted and the `chunksUploaded` callback will be invoked.
  31350. */
  31351. forceChunking: false,
  31352. /**
  31353. * If `chunking` is `true`, then this defines the chunk size in bytes.
  31354. */
  31355. chunkSize: 2000000,
  31356. /**
  31357. * If `true`, the individual chunks of a file are being uploaded simultaneously.
  31358. */
  31359. parallelChunkUploads: false,
  31360. /**
  31361. * Whether a chunk should be retried if it fails.
  31362. */
  31363. retryChunks: false,
  31364. /**
  31365. * If `retryChunks` is true, how many times should it be retried.
  31366. */
  31367. retryChunksLimit: 3,
  31368. /**
  31369. * The maximum filesize (in bytes) that is allowed to be uploaded.
  31370. */
  31371. maxFilesize: 256,
  31372. /**
  31373. * The name of the file param that gets transferred.
  31374. * **NOTE**: If you have the option `uploadMultiple` set to `true`, then
  31375. * Dropzone will append `[]` to the name.
  31376. */
  31377. paramName: "file",
  31378. /**
  31379. * Whether thumbnails for images should be generated
  31380. */
  31381. createImageThumbnails: true,
  31382. /**
  31383. * In MB. When the filename exceeds this limit, the thumbnail will not be generated.
  31384. */
  31385. maxThumbnailFilesize: 10,
  31386. /**
  31387. * If `null`, the ratio of the image will be used to calculate it.
  31388. */
  31389. thumbnailWidth: 120,
  31390. /**
  31391. * The same as `thumbnailWidth`. If both are null, images will not be resized.
  31392. */
  31393. thumbnailHeight: 120,
  31394. /**
  31395. * How the images should be scaled down in case both, `thumbnailWidth` and `thumbnailHeight` are provided.
  31396. * Can be either `contain` or `crop`.
  31397. */
  31398. thumbnailMethod: "crop",
  31399. /**
  31400. * If set, images will be resized to these dimensions before being **uploaded**.
  31401. * If only one, `resizeWidth` **or** `resizeHeight` is provided, the original aspect
  31402. * ratio of the file will be preserved.
  31403. *
  31404. * The `options.transformFile` function uses these options, so if the `transformFile` function
  31405. * is overridden, these options don't do anything.
  31406. */
  31407. resizeWidth: null,
  31408. /**
  31409. * See `resizeWidth`.
  31410. */
  31411. resizeHeight: null,
  31412. /**
  31413. * The mime type of the resized image (before it gets uploaded to the server).
  31414. * If `null` the original mime type will be used. To force jpeg, for example, use `image/jpeg`.
  31415. * See `resizeWidth` for more information.
  31416. */
  31417. resizeMimeType: null,
  31418. /**
  31419. * The quality of the resized images. See `resizeWidth`.
  31420. */
  31421. resizeQuality: 0.8,
  31422. /**
  31423. * How the images should be scaled down in case both, `resizeWidth` and `resizeHeight` are provided.
  31424. * Can be either `contain` or `crop`.
  31425. */
  31426. resizeMethod: "contain",
  31427. /**
  31428. * The base that is used to calculate the **displayed** filesize. You can
  31429. * change this to 1024 if you would rather display kibibytes, mebibytes,
  31430. * etc... 1024 is technically incorrect, because `1024 bytes` are `1 kibibyte`
  31431. * not `1 kilobyte`. You can change this to `1024` if you don't care about
  31432. * validity.
  31433. */
  31434. filesizeBase: 1000,
  31435. /**
  31436. * If not `null` defines how many files this Dropzone handles. If it exceeds,
  31437. * the event `maxfilesexceeded` will be called. The dropzone element gets the
  31438. * class `dz-max-files-reached` accordingly so you can provide visual
  31439. * feedback.
  31440. */
  31441. maxFiles: null,
  31442. /**
  31443. * An optional object to send additional headers to the server. Eg:
  31444. * `{ "My-Awesome-Header": "header value" }`
  31445. */
  31446. headers: null,
  31447. /**
  31448. * If `true`, the dropzone element itself will be clickable, if `false`
  31449. * nothing will be clickable.
  31450. *
  31451. * You can also pass an HTML element, a CSS selector (for multiple elements)
  31452. * or an array of those. In that case, all of those elements will trigger an
  31453. * upload when clicked.
  31454. */
  31455. clickable: true,
  31456. /**
  31457. * Whether hidden files in directories should be ignored.
  31458. */
  31459. ignoreHiddenFiles: true,
  31460. /**
  31461. * The default implementation of `accept` checks the file's mime type or
  31462. * extension against this list. This is a comma separated list of mime
  31463. * types or file extensions.
  31464. *
  31465. * Eg.: `image/*,application/pdf,.psd`
  31466. *
  31467. * If the Dropzone is `clickable` this option will also be used as
  31468. * [`accept`](https://developer.mozilla.org/en-US/docs/HTML/Element/input#attr-accept)
  31469. * parameter on the hidden file input as well.
  31470. */
  31471. acceptedFiles: null,
  31472. /**
  31473. * **Deprecated!**
  31474. * Use acceptedFiles instead.
  31475. */
  31476. acceptedMimeTypes: null,
  31477. /**
  31478. * If false, files will be added to the queue but the queue will not be
  31479. * processed automatically.
  31480. * This can be useful if you need some additional user input before sending
  31481. * files (or if you want want all files sent at once).
  31482. * If you're ready to send the file simply call `myDropzone.processQueue()`.
  31483. *
  31484. * See the [enqueuing file uploads](#enqueuing-file-uploads) documentation
  31485. * section for more information.
  31486. */
  31487. autoProcessQueue: true,
  31488. /**
  31489. * If false, files added to the dropzone will not be queued by default.
  31490. * You'll have to call `enqueueFile(file)` manually.
  31491. */
  31492. autoQueue: true,
  31493. /**
  31494. * If `true`, this will add a link to every file preview to remove or cancel (if
  31495. * already uploading) the file. The `dictCancelUpload`, `dictCancelUploadConfirmation`
  31496. * and `dictRemoveFile` options are used for the wording.
  31497. */
  31498. addRemoveLinks: false,
  31499. /**
  31500. * Defines where to display the file previews – if `null` the
  31501. * Dropzone element itself is used. Can be a plain `HTMLElement` or a CSS
  31502. * selector. The element should have the `dropzone-previews` class so
  31503. * the previews are displayed properly.
  31504. */
  31505. previewsContainer: null,
  31506. /**
  31507. * Set this to `true` if you don't want previews to be shown.
  31508. */
  31509. disablePreviews: false,
  31510. /**
  31511. * This is the element the hidden input field (which is used when clicking on the
  31512. * dropzone to trigger file selection) will be appended to. This might
  31513. * be important in case you use frameworks to switch the content of your page.
  31514. *
  31515. * Can be a selector string, or an element directly.
  31516. */
  31517. hiddenInputContainer: "body",
  31518. /**
  31519. * If null, no capture type will be specified
  31520. * If camera, mobile devices will skip the file selection and choose camera
  31521. * If microphone, mobile devices will skip the file selection and choose the microphone
  31522. * If camcorder, mobile devices will skip the file selection and choose the camera in video mode
  31523. * On apple devices multiple must be set to false. AcceptedFiles may need to
  31524. * be set to an appropriate mime type (e.g. "image/*", "audio/*", or "video/*").
  31525. */
  31526. capture: null,
  31527. /**
  31528. * **Deprecated**. Use `renameFile` instead.
  31529. */
  31530. renameFilename: null,
  31531. /**
  31532. * A function that is invoked before the file is uploaded to the server and renames the file.
  31533. * This function gets the `File` as argument and can use the `file.name`. The actual name of the
  31534. * file that gets used during the upload can be accessed through `file.upload.filename`.
  31535. */
  31536. renameFile: null,
  31537. /**
  31538. * If `true` the fallback will be forced. This is very useful to test your server
  31539. * implementations first and make sure that everything works as
  31540. * expected without dropzone if you experience problems, and to test
  31541. * how your fallbacks will look.
  31542. */
  31543. forceFallback: false,
  31544. /**
  31545. * The text used before any files are dropped.
  31546. */
  31547. dictDefaultMessage: "Drop files here to upload",
  31548. /**
  31549. * The text that replaces the default message text it the browser is not supported.
  31550. */
  31551. dictFallbackMessage: "Your browser does not support drag'n'drop file uploads.",
  31552. /**
  31553. * The text that will be added before the fallback form.
  31554. * If you provide a fallback element yourself, or if this option is `null` this will
  31555. * be ignored.
  31556. */
  31557. dictFallbackText: "Please use the fallback form below to upload your files like in the olden days.",
  31558. /**
  31559. * If the filesize is too big.
  31560. * `{{filesize}}` and `{{maxFilesize}}` will be replaced with the respective configuration values.
  31561. */
  31562. dictFileTooBig: "File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",
  31563. /**
  31564. * If the file doesn't match the file type.
  31565. */
  31566. dictInvalidFileType: "You can't upload files of this type.",
  31567. /**
  31568. * If the server response was invalid.
  31569. * `{{statusCode}}` will be replaced with the servers status code.
  31570. */
  31571. dictResponseError: "Server responded with {{statusCode}} code.",
  31572. /**
  31573. * If `addRemoveLinks` is true, the text to be used for the cancel upload link.
  31574. */
  31575. dictCancelUpload: "Cancel upload",
  31576. /**
  31577. * The text that is displayed if an upload was manually canceled
  31578. */
  31579. dictUploadCanceled: "Upload canceled.",
  31580. /**
  31581. * If `addRemoveLinks` is true, the text to be used for confirmation when cancelling upload.
  31582. */
  31583. dictCancelUploadConfirmation: "Are you sure you want to cancel this upload?",
  31584. /**
  31585. * If `addRemoveLinks` is true, the text to be used to remove a file.
  31586. */
  31587. dictRemoveFile: "Remove file",
  31588. /**
  31589. * If this is not null, then the user will be prompted before removing a file.
  31590. */
  31591. dictRemoveFileConfirmation: null,
  31592. /**
  31593. * Displayed if `maxFiles` is st and exceeded.
  31594. * The string `{{maxFiles}}` will be replaced by the configuration value.
  31595. */
  31596. dictMaxFilesExceeded: "You can not upload any more files.",
  31597. /**
  31598. * Allows you to translate the different units. Starting with `tb` for terabytes and going down to
  31599. * `b` for bytes.
  31600. */
  31601. dictFileSizeUnits: {
  31602. tb: "TB",
  31603. gb: "GB",
  31604. mb: "MB",
  31605. kb: "KB",
  31606. b: "b"
  31607. },
  31608. /**
  31609. * Called when dropzone initialized
  31610. * You can add event listeners here
  31611. */
  31612. init: function init() {},
  31613. /**
  31614. * Can be an **object** of additional parameters to transfer to the server, **or** a `Function`
  31615. * that gets invoked with the `files`, `xhr` and, if it's a chunked upload, `chunk` arguments. In case
  31616. * of a function, this needs to return a map.
  31617. *
  31618. * The default implementation does nothing for normal uploads, but adds relevant information for
  31619. * chunked uploads.
  31620. *
  31621. * This is the same as adding hidden input fields in the form element.
  31622. */
  31623. params: function params(files, xhr, chunk) {
  31624. if (chunk) {
  31625. return {
  31626. dzuuid: chunk.file.upload.uuid,
  31627. dzchunkindex: chunk.index,
  31628. dztotalfilesize: chunk.file.size,
  31629. dzchunksize: this.options.chunkSize,
  31630. dztotalchunkcount: chunk.file.upload.totalChunkCount,
  31631. dzchunkbyteoffset: chunk.index * this.options.chunkSize
  31632. };
  31633. }
  31634. },
  31635. /**
  31636. * A function that gets a [file](https://developer.mozilla.org/en-US/docs/DOM/File)
  31637. * and a `done` function as parameters.
  31638. *
  31639. * If the done function is invoked without arguments, the file is "accepted" and will
  31640. * be processed. If you pass an error message, the file is rejected, and the error
  31641. * message will be displayed.
  31642. * This function will not be called if the file is too big or doesn't match the mime types.
  31643. */
  31644. accept: function accept(file, done) {
  31645. return done();
  31646. },
  31647. /**
  31648. * The callback that will be invoked when all chunks have been uploaded for a file.
  31649. * It gets the file for which the chunks have been uploaded as the first parameter,
  31650. * and the `done` function as second. `done()` needs to be invoked when everything
  31651. * needed to finish the upload process is done.
  31652. */
  31653. chunksUploaded: function chunksUploaded(file, done) {
  31654. done();
  31655. },
  31656. /**
  31657. * Gets called when the browser is not supported.
  31658. * The default implementation shows the fallback input field and adds
  31659. * a text.
  31660. */
  31661. fallback: function fallback() {
  31662. // This code should pass in IE7... :(
  31663. var messageElement;
  31664. this.element.className = "".concat(this.element.className, " dz-browser-not-supported");
  31665. var _iterator = options_createForOfIteratorHelper(this.element.getElementsByTagName("div"), true),
  31666. _step;
  31667. try {
  31668. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  31669. var child = _step.value;
  31670. if (/(^| )dz-message($| )/.test(child.className)) {
  31671. messageElement = child;
  31672. child.className = "dz-message"; // Removes the 'dz-default' class
  31673. break;
  31674. }
  31675. }
  31676. } catch (err) {
  31677. _iterator.e(err);
  31678. } finally {
  31679. _iterator.f();
  31680. }
  31681. if (!messageElement) {
  31682. messageElement = Dropzone.createElement('<div class="dz-message"><span></span></div>');
  31683. this.element.appendChild(messageElement);
  31684. }
  31685. var span = messageElement.getElementsByTagName("span")[0];
  31686. if (span) {
  31687. if (span.textContent != null) {
  31688. span.textContent = this.options.dictFallbackMessage;
  31689. } else if (span.innerText != null) {
  31690. span.innerText = this.options.dictFallbackMessage;
  31691. }
  31692. }
  31693. return this.element.appendChild(this.getFallbackForm());
  31694. },
  31695. /**
  31696. * Gets called to calculate the thumbnail dimensions.
  31697. *
  31698. * It gets `file`, `width` and `height` (both may be `null`) as parameters and must return an object containing:
  31699. *
  31700. * - `srcWidth` & `srcHeight` (required)
  31701. * - `trgWidth` & `trgHeight` (required)
  31702. * - `srcX` & `srcY` (optional, default `0`)
  31703. * - `trgX` & `trgY` (optional, default `0`)
  31704. *
  31705. * Those values are going to be used by `ctx.drawImage()`.
  31706. */
  31707. resize: function resize(file, width, height, resizeMethod) {
  31708. var info = {
  31709. srcX: 0,
  31710. srcY: 0,
  31711. srcWidth: file.width,
  31712. srcHeight: file.height
  31713. };
  31714. var srcRatio = file.width / file.height; // Automatically calculate dimensions if not specified
  31715. if (width == null && height == null) {
  31716. width = info.srcWidth;
  31717. height = info.srcHeight;
  31718. } else if (width == null) {
  31719. width = height * srcRatio;
  31720. } else if (height == null) {
  31721. height = width / srcRatio;
  31722. } // Make sure images aren't upscaled
  31723. width = Math.min(width, info.srcWidth);
  31724. height = Math.min(height, info.srcHeight);
  31725. var trgRatio = width / height;
  31726. if (info.srcWidth > width || info.srcHeight > height) {
  31727. // Image is bigger and needs rescaling
  31728. if (resizeMethod === "crop") {
  31729. if (srcRatio > trgRatio) {
  31730. info.srcHeight = file.height;
  31731. info.srcWidth = info.srcHeight * trgRatio;
  31732. } else {
  31733. info.srcWidth = file.width;
  31734. info.srcHeight = info.srcWidth / trgRatio;
  31735. }
  31736. } else if (resizeMethod === "contain") {
  31737. // Method 'contain'
  31738. if (srcRatio > trgRatio) {
  31739. height = width / srcRatio;
  31740. } else {
  31741. width = height * srcRatio;
  31742. }
  31743. } else {
  31744. throw new Error("Unknown resizeMethod '".concat(resizeMethod, "'"));
  31745. }
  31746. }
  31747. info.srcX = (file.width - info.srcWidth) / 2;
  31748. info.srcY = (file.height - info.srcHeight) / 2;
  31749. info.trgWidth = width;
  31750. info.trgHeight = height;
  31751. return info;
  31752. },
  31753. /**
  31754. * Can be used to transform the file (for example, resize an image if necessary).
  31755. *
  31756. * The default implementation uses `resizeWidth` and `resizeHeight` (if provided) and resizes
  31757. * images according to those dimensions.
  31758. *
  31759. * Gets the `file` as the first parameter, and a `done()` function as the second, that needs
  31760. * to be invoked with the file when the transformation is done.
  31761. */
  31762. transformFile: function transformFile(file, done) {
  31763. if ((this.options.resizeWidth || this.options.resizeHeight) && file.type.match(/image.*/)) {
  31764. return this.resizeImage(file, this.options.resizeWidth, this.options.resizeHeight, this.options.resizeMethod, done);
  31765. } else {
  31766. return done(file);
  31767. }
  31768. },
  31769. /**
  31770. * A string that contains the template used for each dropped
  31771. * file. Change it to fulfill your needs but make sure to properly
  31772. * provide all elements.
  31773. *
  31774. * If you want to use an actual HTML element instead of providing a String
  31775. * as a config option, you could create a div with the id `tpl`,
  31776. * put the template inside it and provide the element like this:
  31777. *
  31778. * document
  31779. * .querySelector('#tpl')
  31780. * .innerHTML
  31781. *
  31782. */
  31783. previewTemplate: preview_template,
  31784. /*
  31785. Those functions register themselves to the events on init and handle all
  31786. the user interface specific stuff. Overwriting them won't break the upload
  31787. but can break the way it's displayed.
  31788. You can overwrite them if you don't like the default behavior. If you just
  31789. want to add an additional event handler, register it on the dropzone object
  31790. and don't overwrite those options.
  31791. */
  31792. // Those are self explanatory and simply concern the DragnDrop.
  31793. drop: function drop(e) {
  31794. return this.element.classList.remove("dz-drag-hover");
  31795. },
  31796. dragstart: function dragstart(e) {},
  31797. dragend: function dragend(e) {
  31798. return this.element.classList.remove("dz-drag-hover");
  31799. },
  31800. dragenter: function dragenter(e) {
  31801. return this.element.classList.add("dz-drag-hover");
  31802. },
  31803. dragover: function dragover(e) {
  31804. return this.element.classList.add("dz-drag-hover");
  31805. },
  31806. dragleave: function dragleave(e) {
  31807. return this.element.classList.remove("dz-drag-hover");
  31808. },
  31809. paste: function paste(e) {},
  31810. // Called whenever there are no files left in the dropzone anymore, and the
  31811. // dropzone should be displayed as if in the initial state.
  31812. reset: function reset() {
  31813. return this.element.classList.remove("dz-started");
  31814. },
  31815. // Called when a file is added to the queue
  31816. // Receives `file`
  31817. addedfile: function addedfile(file) {
  31818. var _this = this;
  31819. if (this.element === this.previewsContainer) {
  31820. this.element.classList.add("dz-started");
  31821. }
  31822. if (this.previewsContainer && !this.options.disablePreviews) {
  31823. file.previewElement = Dropzone.createElement(this.options.previewTemplate.trim());
  31824. file.previewTemplate = file.previewElement; // Backwards compatibility
  31825. this.previewsContainer.appendChild(file.previewElement);
  31826. var _iterator2 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-name]"), true),
  31827. _step2;
  31828. try {
  31829. for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
  31830. var node = _step2.value;
  31831. node.textContent = file.name;
  31832. }
  31833. } catch (err) {
  31834. _iterator2.e(err);
  31835. } finally {
  31836. _iterator2.f();
  31837. }
  31838. var _iterator3 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-size]"), true),
  31839. _step3;
  31840. try {
  31841. for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
  31842. node = _step3.value;
  31843. node.innerHTML = this.filesize(file.size);
  31844. }
  31845. } catch (err) {
  31846. _iterator3.e(err);
  31847. } finally {
  31848. _iterator3.f();
  31849. }
  31850. if (this.options.addRemoveLinks) {
  31851. file._removeLink = Dropzone.createElement("<a class=\"dz-remove\" href=\"javascript:undefined;\" data-dz-remove>".concat(this.options.dictRemoveFile, "</a>"));
  31852. file.previewElement.appendChild(file._removeLink);
  31853. }
  31854. var removeFileEvent = function removeFileEvent(e) {
  31855. e.preventDefault();
  31856. e.stopPropagation();
  31857. if (file.status === Dropzone.UPLOADING) {
  31858. return Dropzone.confirm(_this.options.dictCancelUploadConfirmation, function () {
  31859. return _this.removeFile(file);
  31860. });
  31861. } else {
  31862. if (_this.options.dictRemoveFileConfirmation) {
  31863. return Dropzone.confirm(_this.options.dictRemoveFileConfirmation, function () {
  31864. return _this.removeFile(file);
  31865. });
  31866. } else {
  31867. return _this.removeFile(file);
  31868. }
  31869. }
  31870. };
  31871. var _iterator4 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-remove]"), true),
  31872. _step4;
  31873. try {
  31874. for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
  31875. var removeLink = _step4.value;
  31876. removeLink.addEventListener("click", removeFileEvent);
  31877. }
  31878. } catch (err) {
  31879. _iterator4.e(err);
  31880. } finally {
  31881. _iterator4.f();
  31882. }
  31883. }
  31884. },
  31885. // Called whenever a file is removed.
  31886. removedfile: function removedfile(file) {
  31887. if (file.previewElement != null && file.previewElement.parentNode != null) {
  31888. file.previewElement.parentNode.removeChild(file.previewElement);
  31889. }
  31890. return this._updateMaxFilesReachedClass();
  31891. },
  31892. // Called when a thumbnail has been generated
  31893. // Receives `file` and `dataUrl`
  31894. thumbnail: function thumbnail(file, dataUrl) {
  31895. if (file.previewElement) {
  31896. file.previewElement.classList.remove("dz-file-preview");
  31897. var _iterator5 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-thumbnail]"), true),
  31898. _step5;
  31899. try {
  31900. for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
  31901. var thumbnailElement = _step5.value;
  31902. thumbnailElement.alt = file.name;
  31903. thumbnailElement.src = dataUrl;
  31904. }
  31905. } catch (err) {
  31906. _iterator5.e(err);
  31907. } finally {
  31908. _iterator5.f();
  31909. }
  31910. return setTimeout(function () {
  31911. return file.previewElement.classList.add("dz-image-preview");
  31912. }, 1);
  31913. }
  31914. },
  31915. // Called whenever an error occurs
  31916. // Receives `file` and `message`
  31917. error: function error(file, message) {
  31918. if (file.previewElement) {
  31919. file.previewElement.classList.add("dz-error");
  31920. if (typeof message !== "string" && message.error) {
  31921. message = message.error;
  31922. }
  31923. var _iterator6 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-errormessage]"), true),
  31924. _step6;
  31925. try {
  31926. for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
  31927. var node = _step6.value;
  31928. node.textContent = message;
  31929. }
  31930. } catch (err) {
  31931. _iterator6.e(err);
  31932. } finally {
  31933. _iterator6.f();
  31934. }
  31935. }
  31936. },
  31937. errormultiple: function errormultiple() {},
  31938. // Called when a file gets processed. Since there is a cue, not all added
  31939. // files are processed immediately.
  31940. // Receives `file`
  31941. processing: function processing(file) {
  31942. if (file.previewElement) {
  31943. file.previewElement.classList.add("dz-processing");
  31944. if (file._removeLink) {
  31945. return file._removeLink.innerHTML = this.options.dictCancelUpload;
  31946. }
  31947. }
  31948. },
  31949. processingmultiple: function processingmultiple() {},
  31950. // Called whenever the upload progress gets updated.
  31951. // Receives `file`, `progress` (percentage 0-100) and `bytesSent`.
  31952. // To get the total number of bytes of the file, use `file.size`
  31953. uploadprogress: function uploadprogress(file, progress, bytesSent) {
  31954. if (file.previewElement) {
  31955. var _iterator7 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-uploadprogress]"), true),
  31956. _step7;
  31957. try {
  31958. for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
  31959. var node = _step7.value;
  31960. node.nodeName === "PROGRESS" ? node.value = progress : node.style.width = "".concat(progress, "%");
  31961. }
  31962. } catch (err) {
  31963. _iterator7.e(err);
  31964. } finally {
  31965. _iterator7.f();
  31966. }
  31967. }
  31968. },
  31969. // Called whenever the total upload progress gets updated.
  31970. // Called with totalUploadProgress (0-100), totalBytes and totalBytesSent
  31971. totaluploadprogress: function totaluploadprogress() {},
  31972. // Called just before the file is sent. Gets the `xhr` object as second
  31973. // parameter, so you can modify it (for example to add a CSRF token) and a
  31974. // `formData` object to add additional information.
  31975. sending: function sending() {},
  31976. sendingmultiple: function sendingmultiple() {},
  31977. // When the complete upload is finished and successful
  31978. // Receives `file`
  31979. success: function success(file) {
  31980. if (file.previewElement) {
  31981. return file.previewElement.classList.add("dz-success");
  31982. }
  31983. },
  31984. successmultiple: function successmultiple() {},
  31985. // When the upload is canceled.
  31986. canceled: function canceled(file) {
  31987. return this.emit("error", file, this.options.dictUploadCanceled);
  31988. },
  31989. canceledmultiple: function canceledmultiple() {},
  31990. // When the upload is finished, either with success or an error.
  31991. // Receives `file`
  31992. complete: function complete(file) {
  31993. if (file._removeLink) {
  31994. file._removeLink.innerHTML = this.options.dictRemoveFile;
  31995. }
  31996. if (file.previewElement) {
  31997. return file.previewElement.classList.add("dz-complete");
  31998. }
  31999. },
  32000. completemultiple: function completemultiple() {},
  32001. maxfilesexceeded: function maxfilesexceeded() {},
  32002. maxfilesreached: function maxfilesreached() {},
  32003. queuecomplete: function queuecomplete() {},
  32004. addedfiles: function addedfiles() {}
  32005. };
  32006. /* harmony default export */ var src_options = (defaultOptions);
  32007. ;// CONCATENATED MODULE: ./src/dropzone.js
  32008. function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
  32009. function dropzone_createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = dropzone_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
  32010. function dropzone_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return dropzone_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return dropzone_arrayLikeToArray(o, minLen); }
  32011. function dropzone_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
  32012. function dropzone_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  32013. function dropzone_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  32014. function dropzone_createClass(Constructor, protoProps, staticProps) { if (protoProps) dropzone_defineProperties(Constructor.prototype, protoProps); if (staticProps) dropzone_defineProperties(Constructor, staticProps); return Constructor; }
  32015. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
  32016. function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
  32017. function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
  32018. function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
  32019. function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  32020. function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  32021. function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
  32022. var Dropzone = /*#__PURE__*/function (_Emitter) {
  32023. _inherits(Dropzone, _Emitter);
  32024. var _super = _createSuper(Dropzone);
  32025. function Dropzone(el, options) {
  32026. var _this;
  32027. dropzone_classCallCheck(this, Dropzone);
  32028. _this = _super.call(this);
  32029. var fallback, left;
  32030. _this.element = el; // For backwards compatibility since the version was in the prototype previously
  32031. _this.version = Dropzone.version;
  32032. _this.clickableElements = [];
  32033. _this.listeners = [];
  32034. _this.files = []; // All files
  32035. if (typeof _this.element === "string") {
  32036. _this.element = document.querySelector(_this.element);
  32037. } // Not checking if instance of HTMLElement or Element since IE9 is extremely weird.
  32038. if (!_this.element || _this.element.nodeType == null) {
  32039. throw new Error("Invalid dropzone element.");
  32040. }
  32041. if (_this.element.dropzone) {
  32042. throw new Error("Dropzone already attached.");
  32043. } // Now add this dropzone to the instances.
  32044. Dropzone.instances.push(_assertThisInitialized(_this)); // Put the dropzone inside the element itself.
  32045. _this.element.dropzone = _assertThisInitialized(_this);
  32046. var elementOptions = (left = Dropzone.optionsForElement(_this.element)) != null ? left : {};
  32047. _this.options = Dropzone.extend({}, src_options, elementOptions, options != null ? options : {});
  32048. _this.options.previewTemplate = _this.options.previewTemplate.replace(/\n*/g, ""); // If the browser failed, just call the fallback and leave
  32049. if (_this.options.forceFallback || !Dropzone.isBrowserSupported()) {
  32050. return _possibleConstructorReturn(_this, _this.options.fallback.call(_assertThisInitialized(_this)));
  32051. } // @options.url = @element.getAttribute "action" unless @options.url?
  32052. if (_this.options.url == null) {
  32053. _this.options.url = _this.element.getAttribute("action");
  32054. }
  32055. if (!_this.options.url) {
  32056. throw new Error("No URL provided.");
  32057. }
  32058. if (_this.options.acceptedFiles && _this.options.acceptedMimeTypes) {
  32059. throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");
  32060. }
  32061. if (_this.options.uploadMultiple && _this.options.chunking) {
  32062. throw new Error("You cannot set both: uploadMultiple and chunking.");
  32063. } // Backwards compatibility
  32064. if (_this.options.acceptedMimeTypes) {
  32065. _this.options.acceptedFiles = _this.options.acceptedMimeTypes;
  32066. delete _this.options.acceptedMimeTypes;
  32067. } // Backwards compatibility
  32068. if (_this.options.renameFilename != null) {
  32069. _this.options.renameFile = function (file) {
  32070. return _this.options.renameFilename.call(_assertThisInitialized(_this), file.name, file);
  32071. };
  32072. }
  32073. if (typeof _this.options.method === "string") {
  32074. _this.options.method = _this.options.method.toUpperCase();
  32075. }
  32076. if ((fallback = _this.getExistingFallback()) && fallback.parentNode) {
  32077. // Remove the fallback
  32078. fallback.parentNode.removeChild(fallback);
  32079. } // Display previews in the previewsContainer element or the Dropzone element unless explicitly set to false
  32080. if (_this.options.previewsContainer !== false) {
  32081. if (_this.options.previewsContainer) {
  32082. _this.previewsContainer = Dropzone.getElement(_this.options.previewsContainer, "previewsContainer");
  32083. } else {
  32084. _this.previewsContainer = _this.element;
  32085. }
  32086. }
  32087. if (_this.options.clickable) {
  32088. if (_this.options.clickable === true) {
  32089. _this.clickableElements = [_this.element];
  32090. } else {
  32091. _this.clickableElements = Dropzone.getElements(_this.options.clickable, "clickable");
  32092. }
  32093. }
  32094. _this.init();
  32095. return _this;
  32096. } // Returns all files that have been accepted
  32097. dropzone_createClass(Dropzone, [{
  32098. key: "getAcceptedFiles",
  32099. value: function getAcceptedFiles() {
  32100. return this.files.filter(function (file) {
  32101. return file.accepted;
  32102. }).map(function (file) {
  32103. return file;
  32104. });
  32105. } // Returns all files that have been rejected
  32106. // Not sure when that's going to be useful, but added for completeness.
  32107. }, {
  32108. key: "getRejectedFiles",
  32109. value: function getRejectedFiles() {
  32110. return this.files.filter(function (file) {
  32111. return !file.accepted;
  32112. }).map(function (file) {
  32113. return file;
  32114. });
  32115. }
  32116. }, {
  32117. key: "getFilesWithStatus",
  32118. value: function getFilesWithStatus(status) {
  32119. return this.files.filter(function (file) {
  32120. return file.status === status;
  32121. }).map(function (file) {
  32122. return file;
  32123. });
  32124. } // Returns all files that are in the queue
  32125. }, {
  32126. key: "getQueuedFiles",
  32127. value: function getQueuedFiles() {
  32128. return this.getFilesWithStatus(Dropzone.QUEUED);
  32129. }
  32130. }, {
  32131. key: "getUploadingFiles",
  32132. value: function getUploadingFiles() {
  32133. return this.getFilesWithStatus(Dropzone.UPLOADING);
  32134. }
  32135. }, {
  32136. key: "getAddedFiles",
  32137. value: function getAddedFiles() {
  32138. return this.getFilesWithStatus(Dropzone.ADDED);
  32139. } // Files that are either queued or uploading
  32140. }, {
  32141. key: "getActiveFiles",
  32142. value: function getActiveFiles() {
  32143. return this.files.filter(function (file) {
  32144. return file.status === Dropzone.UPLOADING || file.status === Dropzone.QUEUED;
  32145. }).map(function (file) {
  32146. return file;
  32147. });
  32148. } // The function that gets called when Dropzone is initialized. You
  32149. // can (and should) setup event listeners inside this function.
  32150. }, {
  32151. key: "init",
  32152. value: function init() {
  32153. var _this2 = this;
  32154. // In case it isn't set already
  32155. if (this.element.tagName === "form") {
  32156. this.element.setAttribute("enctype", "multipart/form-data");
  32157. }
  32158. if (this.element.classList.contains("dropzone") && !this.element.querySelector(".dz-message")) {
  32159. this.element.appendChild(Dropzone.createElement("<div class=\"dz-default dz-message\"><button class=\"dz-button\" type=\"button\">".concat(this.options.dictDefaultMessage, "</button></div>")));
  32160. }
  32161. if (this.clickableElements.length) {
  32162. var setupHiddenFileInput = function setupHiddenFileInput() {
  32163. if (_this2.hiddenFileInput) {
  32164. _this2.hiddenFileInput.parentNode.removeChild(_this2.hiddenFileInput);
  32165. }
  32166. _this2.hiddenFileInput = document.createElement("input");
  32167. _this2.hiddenFileInput.setAttribute("type", "file");
  32168. if (_this2.options.maxFiles === null || _this2.options.maxFiles > 1) {
  32169. _this2.hiddenFileInput.setAttribute("multiple", "multiple");
  32170. }
  32171. _this2.hiddenFileInput.className = "dz-hidden-input";
  32172. if (_this2.options.acceptedFiles !== null) {
  32173. _this2.hiddenFileInput.setAttribute("accept", _this2.options.acceptedFiles);
  32174. }
  32175. if (_this2.options.capture !== null) {
  32176. _this2.hiddenFileInput.setAttribute("capture", _this2.options.capture);
  32177. } // Making sure that no one can "tab" into this field.
  32178. _this2.hiddenFileInput.setAttribute("tabindex", "-1"); // Not setting `display="none"` because some browsers don't accept clicks
  32179. // on elements that aren't displayed.
  32180. _this2.hiddenFileInput.style.visibility = "hidden";
  32181. _this2.hiddenFileInput.style.position = "absolute";
  32182. _this2.hiddenFileInput.style.top = "0";
  32183. _this2.hiddenFileInput.style.left = "0";
  32184. _this2.hiddenFileInput.style.height = "0";
  32185. _this2.hiddenFileInput.style.width = "0";
  32186. Dropzone.getElement(_this2.options.hiddenInputContainer, "hiddenInputContainer").appendChild(_this2.hiddenFileInput);
  32187. _this2.hiddenFileInput.addEventListener("change", function () {
  32188. var files = _this2.hiddenFileInput.files;
  32189. if (files.length) {
  32190. var _iterator = dropzone_createForOfIteratorHelper(files, true),
  32191. _step;
  32192. try {
  32193. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  32194. var file = _step.value;
  32195. _this2.addFile(file);
  32196. }
  32197. } catch (err) {
  32198. _iterator.e(err);
  32199. } finally {
  32200. _iterator.f();
  32201. }
  32202. }
  32203. _this2.emit("addedfiles", files);
  32204. setupHiddenFileInput();
  32205. });
  32206. };
  32207. setupHiddenFileInput();
  32208. }
  32209. this.URL = window.URL !== null ? window.URL : window.webkitURL; // Setup all event listeners on the Dropzone object itself.
  32210. // They're not in @setupEventListeners() because they shouldn't be removed
  32211. // again when the dropzone gets disabled.
  32212. var _iterator2 = dropzone_createForOfIteratorHelper(this.events, true),
  32213. _step2;
  32214. try {
  32215. for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
  32216. var eventName = _step2.value;
  32217. this.on(eventName, this.options[eventName]);
  32218. }
  32219. } catch (err) {
  32220. _iterator2.e(err);
  32221. } finally {
  32222. _iterator2.f();
  32223. }
  32224. this.on("uploadprogress", function () {
  32225. return _this2.updateTotalUploadProgress();
  32226. });
  32227. this.on("removedfile", function () {
  32228. return _this2.updateTotalUploadProgress();
  32229. });
  32230. this.on("canceled", function (file) {
  32231. return _this2.emit("complete", file);
  32232. }); // Emit a `queuecomplete` event if all files finished uploading.
  32233. this.on("complete", function (file) {
  32234. if (_this2.getAddedFiles().length === 0 && _this2.getUploadingFiles().length === 0 && _this2.getQueuedFiles().length === 0) {
  32235. // This needs to be deferred so that `queuecomplete` really triggers after `complete`
  32236. return setTimeout(function () {
  32237. return _this2.emit("queuecomplete");
  32238. }, 0);
  32239. }
  32240. });
  32241. var containsFiles = function containsFiles(e) {
  32242. if (e.dataTransfer.types) {
  32243. // Because e.dataTransfer.types is an Object in
  32244. // IE, we need to iterate like this instead of
  32245. // using e.dataTransfer.types.some()
  32246. for (var i = 0; i < e.dataTransfer.types.length; i++) {
  32247. if (e.dataTransfer.types[i] === "Files") return true;
  32248. }
  32249. }
  32250. return false;
  32251. };
  32252. var noPropagation = function noPropagation(e) {
  32253. // If there are no files, we don't want to stop
  32254. // propagation so we don't interfere with other
  32255. // drag and drop behaviour.
  32256. if (!containsFiles(e)) return;
  32257. e.stopPropagation();
  32258. if (e.preventDefault) {
  32259. return e.preventDefault();
  32260. } else {
  32261. return e.returnValue = false;
  32262. }
  32263. }; // Create the listeners
  32264. this.listeners = [{
  32265. element: this.element,
  32266. events: {
  32267. dragstart: function dragstart(e) {
  32268. return _this2.emit("dragstart", e);
  32269. },
  32270. dragenter: function dragenter(e) {
  32271. noPropagation(e);
  32272. return _this2.emit("dragenter", e);
  32273. },
  32274. dragover: function dragover(e) {
  32275. // Makes it possible to drag files from chrome's download bar
  32276. // http://stackoverflow.com/questions/19526430/drag-and-drop-file-uploads-from-chrome-downloads-bar
  32277. // Try is required to prevent bug in Internet Explorer 11 (SCRIPT65535 exception)
  32278. var efct;
  32279. try {
  32280. efct = e.dataTransfer.effectAllowed;
  32281. } catch (error) {}
  32282. e.dataTransfer.dropEffect = "move" === efct || "linkMove" === efct ? "move" : "copy";
  32283. noPropagation(e);
  32284. return _this2.emit("dragover", e);
  32285. },
  32286. dragleave: function dragleave(e) {
  32287. return _this2.emit("dragleave", e);
  32288. },
  32289. drop: function drop(e) {
  32290. noPropagation(e);
  32291. return _this2.drop(e);
  32292. },
  32293. dragend: function dragend(e) {
  32294. return _this2.emit("dragend", e);
  32295. }
  32296. } // This is disabled right now, because the browsers don't implement it properly.
  32297. // "paste": (e) =>
  32298. // noPropagation e
  32299. // @paste e
  32300. }];
  32301. this.clickableElements.forEach(function (clickableElement) {
  32302. return _this2.listeners.push({
  32303. element: clickableElement,
  32304. events: {
  32305. click: function click(evt) {
  32306. // Only the actual dropzone or the message element should trigger file selection
  32307. if (clickableElement !== _this2.element || evt.target === _this2.element || Dropzone.elementInside(evt.target, _this2.element.querySelector(".dz-message"))) {
  32308. _this2.hiddenFileInput.click(); // Forward the click
  32309. }
  32310. return true;
  32311. }
  32312. }
  32313. });
  32314. });
  32315. this.enable();
  32316. return this.options.init.call(this);
  32317. } // Not fully tested yet
  32318. }, {
  32319. key: "destroy",
  32320. value: function destroy() {
  32321. this.disable();
  32322. this.removeAllFiles(true);
  32323. if (this.hiddenFileInput != null ? this.hiddenFileInput.parentNode : undefined) {
  32324. this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput);
  32325. this.hiddenFileInput = null;
  32326. }
  32327. delete this.element.dropzone;
  32328. return Dropzone.instances.splice(Dropzone.instances.indexOf(this), 1);
  32329. }
  32330. }, {
  32331. key: "updateTotalUploadProgress",
  32332. value: function updateTotalUploadProgress() {
  32333. var totalUploadProgress;
  32334. var totalBytesSent = 0;
  32335. var totalBytes = 0;
  32336. var activeFiles = this.getActiveFiles();
  32337. if (activeFiles.length) {
  32338. var _iterator3 = dropzone_createForOfIteratorHelper(this.getActiveFiles(), true),
  32339. _step3;
  32340. try {
  32341. for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
  32342. var file = _step3.value;
  32343. totalBytesSent += file.upload.bytesSent;
  32344. totalBytes += file.upload.total;
  32345. }
  32346. } catch (err) {
  32347. _iterator3.e(err);
  32348. } finally {
  32349. _iterator3.f();
  32350. }
  32351. totalUploadProgress = 100 * totalBytesSent / totalBytes;
  32352. } else {
  32353. totalUploadProgress = 100;
  32354. }
  32355. return this.emit("totaluploadprogress", totalUploadProgress, totalBytes, totalBytesSent);
  32356. } // @options.paramName can be a function taking one parameter rather than a string.
  32357. // A parameter name for a file is obtained simply by calling this with an index number.
  32358. }, {
  32359. key: "_getParamName",
  32360. value: function _getParamName(n) {
  32361. if (typeof this.options.paramName === "function") {
  32362. return this.options.paramName(n);
  32363. } else {
  32364. return "".concat(this.options.paramName).concat(this.options.uploadMultiple ? "[".concat(n, "]") : "");
  32365. }
  32366. } // If @options.renameFile is a function,
  32367. // the function will be used to rename the file.name before appending it to the formData
  32368. }, {
  32369. key: "_renameFile",
  32370. value: function _renameFile(file) {
  32371. if (typeof this.options.renameFile !== "function") {
  32372. return file.name;
  32373. }
  32374. return this.options.renameFile(file);
  32375. } // Returns a form that can be used as fallback if the browser does not support DragnDrop
  32376. //
  32377. // If the dropzone is already a form, only the input field and button are returned. Otherwise a complete form element is provided.
  32378. // This code has to pass in IE7 :(
  32379. }, {
  32380. key: "getFallbackForm",
  32381. value: function getFallbackForm() {
  32382. var existingFallback, form;
  32383. if (existingFallback = this.getExistingFallback()) {
  32384. return existingFallback;
  32385. }
  32386. var fieldsString = '<div class="dz-fallback">';
  32387. if (this.options.dictFallbackText) {
  32388. fieldsString += "<p>".concat(this.options.dictFallbackText, "</p>");
  32389. }
  32390. fieldsString += "<input type=\"file\" name=\"".concat(this._getParamName(0), "\" ").concat(this.options.uploadMultiple ? 'multiple="multiple"' : undefined, " /><input type=\"submit\" value=\"Upload!\"></div>");
  32391. var fields = Dropzone.createElement(fieldsString);
  32392. if (this.element.tagName !== "FORM") {
  32393. form = Dropzone.createElement("<form action=\"".concat(this.options.url, "\" enctype=\"multipart/form-data\" method=\"").concat(this.options.method, "\"></form>"));
  32394. form.appendChild(fields);
  32395. } else {
  32396. // Make sure that the enctype and method attributes are set properly
  32397. this.element.setAttribute("enctype", "multipart/form-data");
  32398. this.element.setAttribute("method", this.options.method);
  32399. }
  32400. return form != null ? form : fields;
  32401. } // Returns the fallback elements if they exist already
  32402. //
  32403. // This code has to pass in IE7 :(
  32404. }, {
  32405. key: "getExistingFallback",
  32406. value: function getExistingFallback() {
  32407. var getFallback = function getFallback(elements) {
  32408. var _iterator4 = dropzone_createForOfIteratorHelper(elements, true),
  32409. _step4;
  32410. try {
  32411. for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
  32412. var el = _step4.value;
  32413. if (/(^| )fallback($| )/.test(el.className)) {
  32414. return el;
  32415. }
  32416. }
  32417. } catch (err) {
  32418. _iterator4.e(err);
  32419. } finally {
  32420. _iterator4.f();
  32421. }
  32422. };
  32423. for (var _i = 0, _arr = ["div", "form"]; _i < _arr.length; _i++) {
  32424. var tagName = _arr[_i];
  32425. var fallback;
  32426. if (fallback = getFallback(this.element.getElementsByTagName(tagName))) {
  32427. return fallback;
  32428. }
  32429. }
  32430. } // Activates all listeners stored in @listeners
  32431. }, {
  32432. key: "setupEventListeners",
  32433. value: function setupEventListeners() {
  32434. return this.listeners.map(function (elementListeners) {
  32435. return function () {
  32436. var result = [];
  32437. for (var event in elementListeners.events) {
  32438. var listener = elementListeners.events[event];
  32439. result.push(elementListeners.element.addEventListener(event, listener, false));
  32440. }
  32441. return result;
  32442. }();
  32443. });
  32444. } // Deactivates all listeners stored in @listeners
  32445. }, {
  32446. key: "removeEventListeners",
  32447. value: function removeEventListeners() {
  32448. return this.listeners.map(function (elementListeners) {
  32449. return function () {
  32450. var result = [];
  32451. for (var event in elementListeners.events) {
  32452. var listener = elementListeners.events[event];
  32453. result.push(elementListeners.element.removeEventListener(event, listener, false));
  32454. }
  32455. return result;
  32456. }();
  32457. });
  32458. } // Removes all event listeners and cancels all files in the queue or being processed.
  32459. }, {
  32460. key: "disable",
  32461. value: function disable() {
  32462. var _this3 = this;
  32463. this.clickableElements.forEach(function (element) {
  32464. return element.classList.remove("dz-clickable");
  32465. });
  32466. this.removeEventListeners();
  32467. this.disabled = true;
  32468. return this.files.map(function (file) {
  32469. return _this3.cancelUpload(file);
  32470. });
  32471. }
  32472. }, {
  32473. key: "enable",
  32474. value: function enable() {
  32475. delete this.disabled;
  32476. this.clickableElements.forEach(function (element) {
  32477. return element.classList.add("dz-clickable");
  32478. });
  32479. return this.setupEventListeners();
  32480. } // Returns a nicely formatted filesize
  32481. }, {
  32482. key: "filesize",
  32483. value: function filesize(size) {
  32484. var selectedSize = 0;
  32485. var selectedUnit = "b";
  32486. if (size > 0) {
  32487. var units = ["tb", "gb", "mb", "kb", "b"];
  32488. for (var i = 0; i < units.length; i++) {
  32489. var unit = units[i];
  32490. var cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10;
  32491. if (size >= cutoff) {
  32492. selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i);
  32493. selectedUnit = unit;
  32494. break;
  32495. }
  32496. }
  32497. selectedSize = Math.round(10 * selectedSize) / 10; // Cutting of digits
  32498. }
  32499. return "<strong>".concat(selectedSize, "</strong> ").concat(this.options.dictFileSizeUnits[selectedUnit]);
  32500. } // Adds or removes the `dz-max-files-reached` class from the form.
  32501. }, {
  32502. key: "_updateMaxFilesReachedClass",
  32503. value: function _updateMaxFilesReachedClass() {
  32504. if (this.options.maxFiles != null && this.getAcceptedFiles().length >= this.options.maxFiles) {
  32505. if (this.getAcceptedFiles().length === this.options.maxFiles) {
  32506. this.emit("maxfilesreached", this.files);
  32507. }
  32508. return this.element.classList.add("dz-max-files-reached");
  32509. } else {
  32510. return this.element.classList.remove("dz-max-files-reached");
  32511. }
  32512. }
  32513. }, {
  32514. key: "drop",
  32515. value: function drop(e) {
  32516. if (!e.dataTransfer) {
  32517. return;
  32518. }
  32519. this.emit("drop", e); // Convert the FileList to an Array
  32520. // This is necessary for IE11
  32521. var files = [];
  32522. for (var i = 0; i < e.dataTransfer.files.length; i++) {
  32523. files[i] = e.dataTransfer.files[i];
  32524. } // Even if it's a folder, files.length will contain the folders.
  32525. if (files.length) {
  32526. var items = e.dataTransfer.items;
  32527. if (items && items.length && items[0].webkitGetAsEntry != null) {
  32528. // The browser supports dropping of folders, so handle items instead of files
  32529. this._addFilesFromItems(items);
  32530. } else {
  32531. this.handleFiles(files);
  32532. }
  32533. }
  32534. this.emit("addedfiles", files);
  32535. }
  32536. }, {
  32537. key: "paste",
  32538. value: function paste(e) {
  32539. if (__guard__(e != null ? e.clipboardData : undefined, function (x) {
  32540. return x.items;
  32541. }) == null) {
  32542. return;
  32543. }
  32544. this.emit("paste", e);
  32545. var items = e.clipboardData.items;
  32546. if (items.length) {
  32547. return this._addFilesFromItems(items);
  32548. }
  32549. }
  32550. }, {
  32551. key: "handleFiles",
  32552. value: function handleFiles(files) {
  32553. var _iterator5 = dropzone_createForOfIteratorHelper(files, true),
  32554. _step5;
  32555. try {
  32556. for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
  32557. var file = _step5.value;
  32558. this.addFile(file);
  32559. }
  32560. } catch (err) {
  32561. _iterator5.e(err);
  32562. } finally {
  32563. _iterator5.f();
  32564. }
  32565. } // When a folder is dropped (or files are pasted), items must be handled
  32566. // instead of files.
  32567. }, {
  32568. key: "_addFilesFromItems",
  32569. value: function _addFilesFromItems(items) {
  32570. var _this4 = this;
  32571. return function () {
  32572. var result = [];
  32573. var _iterator6 = dropzone_createForOfIteratorHelper(items, true),
  32574. _step6;
  32575. try {
  32576. for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
  32577. var item = _step6.value;
  32578. var entry;
  32579. if (item.webkitGetAsEntry != null && (entry = item.webkitGetAsEntry())) {
  32580. if (entry.isFile) {
  32581. result.push(_this4.addFile(item.getAsFile()));
  32582. } else if (entry.isDirectory) {
  32583. // Append all files from that directory to files
  32584. result.push(_this4._addFilesFromDirectory(entry, entry.name));
  32585. } else {
  32586. result.push(undefined);
  32587. }
  32588. } else if (item.getAsFile != null) {
  32589. if (item.kind == null || item.kind === "file") {
  32590. result.push(_this4.addFile(item.getAsFile()));
  32591. } else {
  32592. result.push(undefined);
  32593. }
  32594. } else {
  32595. result.push(undefined);
  32596. }
  32597. }
  32598. } catch (err) {
  32599. _iterator6.e(err);
  32600. } finally {
  32601. _iterator6.f();
  32602. }
  32603. return result;
  32604. }();
  32605. } // Goes through the directory, and adds each file it finds recursively
  32606. }, {
  32607. key: "_addFilesFromDirectory",
  32608. value: function _addFilesFromDirectory(directory, path) {
  32609. var _this5 = this;
  32610. var dirReader = directory.createReader();
  32611. var errorHandler = function errorHandler(error) {
  32612. return __guardMethod__(console, "log", function (o) {
  32613. return o.log(error);
  32614. });
  32615. };
  32616. var readEntries = function readEntries() {
  32617. return dirReader.readEntries(function (entries) {
  32618. if (entries.length > 0) {
  32619. var _iterator7 = dropzone_createForOfIteratorHelper(entries, true),
  32620. _step7;
  32621. try {
  32622. for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
  32623. var entry = _step7.value;
  32624. if (entry.isFile) {
  32625. entry.file(function (file) {
  32626. if (_this5.options.ignoreHiddenFiles && file.name.substring(0, 1) === ".") {
  32627. return;
  32628. }
  32629. file.fullPath = "".concat(path, "/").concat(file.name);
  32630. return _this5.addFile(file);
  32631. });
  32632. } else if (entry.isDirectory) {
  32633. _this5._addFilesFromDirectory(entry, "".concat(path, "/").concat(entry.name));
  32634. }
  32635. } // Recursively call readEntries() again, since browser only handle
  32636. // the first 100 entries.
  32637. // See: https://developer.mozilla.org/en-US/docs/Web/API/DirectoryReader#readEntries
  32638. } catch (err) {
  32639. _iterator7.e(err);
  32640. } finally {
  32641. _iterator7.f();
  32642. }
  32643. readEntries();
  32644. }
  32645. return null;
  32646. }, errorHandler);
  32647. };
  32648. return readEntries();
  32649. } // If `done()` is called without argument the file is accepted
  32650. // If you call it with an error message, the file is rejected
  32651. // (This allows for asynchronous validation)
  32652. //
  32653. // This function checks the filesize, and if the file.type passes the
  32654. // `acceptedFiles` check.
  32655. }, {
  32656. key: "accept",
  32657. value: function accept(file, done) {
  32658. if (this.options.maxFilesize && file.size > this.options.maxFilesize * 1024 * 1024) {
  32659. done(this.options.dictFileTooBig.replace("{{filesize}}", Math.round(file.size / 1024 / 10.24) / 100).replace("{{maxFilesize}}", this.options.maxFilesize));
  32660. } else if (!Dropzone.isValidFile(file, this.options.acceptedFiles)) {
  32661. done(this.options.dictInvalidFileType);
  32662. } else if (this.options.maxFiles != null && this.getAcceptedFiles().length >= this.options.maxFiles) {
  32663. done(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}", this.options.maxFiles));
  32664. this.emit("maxfilesexceeded", file);
  32665. } else {
  32666. this.options.accept.call(this, file, done);
  32667. }
  32668. }
  32669. }, {
  32670. key: "addFile",
  32671. value: function addFile(file) {
  32672. var _this6 = this;
  32673. file.upload = {
  32674. uuid: Dropzone.uuidv4(),
  32675. progress: 0,
  32676. // Setting the total upload size to file.size for the beginning
  32677. // It's actual different than the size to be transmitted.
  32678. total: file.size,
  32679. bytesSent: 0,
  32680. filename: this._renameFile(file) // Not setting chunking information here, because the acutal data — and
  32681. // thus the chunks — might change if `options.transformFile` is set
  32682. // and does something to the data.
  32683. };
  32684. this.files.push(file);
  32685. file.status = Dropzone.ADDED;
  32686. this.emit("addedfile", file);
  32687. this._enqueueThumbnail(file);
  32688. this.accept(file, function (error) {
  32689. if (error) {
  32690. file.accepted = false;
  32691. _this6._errorProcessing([file], error); // Will set the file.status
  32692. } else {
  32693. file.accepted = true;
  32694. if (_this6.options.autoQueue) {
  32695. _this6.enqueueFile(file);
  32696. } // Will set .accepted = true
  32697. }
  32698. _this6._updateMaxFilesReachedClass();
  32699. });
  32700. } // Wrapper for enqueueFile
  32701. }, {
  32702. key: "enqueueFiles",
  32703. value: function enqueueFiles(files) {
  32704. var _iterator8 = dropzone_createForOfIteratorHelper(files, true),
  32705. _step8;
  32706. try {
  32707. for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
  32708. var file = _step8.value;
  32709. this.enqueueFile(file);
  32710. }
  32711. } catch (err) {
  32712. _iterator8.e(err);
  32713. } finally {
  32714. _iterator8.f();
  32715. }
  32716. return null;
  32717. }
  32718. }, {
  32719. key: "enqueueFile",
  32720. value: function enqueueFile(file) {
  32721. var _this7 = this;
  32722. if (file.status === Dropzone.ADDED && file.accepted === true) {
  32723. file.status = Dropzone.QUEUED;
  32724. if (this.options.autoProcessQueue) {
  32725. return setTimeout(function () {
  32726. return _this7.processQueue();
  32727. }, 0); // Deferring the call
  32728. }
  32729. } else {
  32730. throw new Error("This file can't be queued because it has already been processed or was rejected.");
  32731. }
  32732. }
  32733. }, {
  32734. key: "_enqueueThumbnail",
  32735. value: function _enqueueThumbnail(file) {
  32736. var _this8 = this;
  32737. if (this.options.createImageThumbnails && file.type.match(/image.*/) && file.size <= this.options.maxThumbnailFilesize * 1024 * 1024) {
  32738. this._thumbnailQueue.push(file);
  32739. return setTimeout(function () {
  32740. return _this8._processThumbnailQueue();
  32741. }, 0); // Deferring the call
  32742. }
  32743. }
  32744. }, {
  32745. key: "_processThumbnailQueue",
  32746. value: function _processThumbnailQueue() {
  32747. var _this9 = this;
  32748. if (this._processingThumbnail || this._thumbnailQueue.length === 0) {
  32749. return;
  32750. }
  32751. this._processingThumbnail = true;
  32752. var file = this._thumbnailQueue.shift();
  32753. return this.createThumbnail(file, this.options.thumbnailWidth, this.options.thumbnailHeight, this.options.thumbnailMethod, true, function (dataUrl) {
  32754. _this9.emit("thumbnail", file, dataUrl);
  32755. _this9._processingThumbnail = false;
  32756. return _this9._processThumbnailQueue();
  32757. });
  32758. } // Can be called by the user to remove a file
  32759. }, {
  32760. key: "removeFile",
  32761. value: function removeFile(file) {
  32762. if (file.status === Dropzone.UPLOADING) {
  32763. this.cancelUpload(file);
  32764. }
  32765. this.files = without(this.files, file);
  32766. this.emit("removedfile", file);
  32767. if (this.files.length === 0) {
  32768. return this.emit("reset");
  32769. }
  32770. } // Removes all files that aren't currently processed from the list
  32771. }, {
  32772. key: "removeAllFiles",
  32773. value: function removeAllFiles(cancelIfNecessary) {
  32774. // Create a copy of files since removeFile() changes the @files array.
  32775. if (cancelIfNecessary == null) {
  32776. cancelIfNecessary = false;
  32777. }
  32778. var _iterator9 = dropzone_createForOfIteratorHelper(this.files.slice(), true),
  32779. _step9;
  32780. try {
  32781. for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
  32782. var file = _step9.value;
  32783. if (file.status !== Dropzone.UPLOADING || cancelIfNecessary) {
  32784. this.removeFile(file);
  32785. }
  32786. }
  32787. } catch (err) {
  32788. _iterator9.e(err);
  32789. } finally {
  32790. _iterator9.f();
  32791. }
  32792. return null;
  32793. } // Resizes an image before it gets sent to the server. This function is the default behavior of
  32794. // `options.transformFile` if `resizeWidth` or `resizeHeight` are set. The callback is invoked with
  32795. // the resized blob.
  32796. }, {
  32797. key: "resizeImage",
  32798. value: function resizeImage(file, width, height, resizeMethod, callback) {
  32799. var _this10 = this;
  32800. return this.createThumbnail(file, width, height, resizeMethod, true, function (dataUrl, canvas) {
  32801. if (canvas == null) {
  32802. // The image has not been resized
  32803. return callback(file);
  32804. } else {
  32805. var resizeMimeType = _this10.options.resizeMimeType;
  32806. if (resizeMimeType == null) {
  32807. resizeMimeType = file.type;
  32808. }
  32809. var resizedDataURL = canvas.toDataURL(resizeMimeType, _this10.options.resizeQuality);
  32810. if (resizeMimeType === "image/jpeg" || resizeMimeType === "image/jpg") {
  32811. // Now add the original EXIF information
  32812. resizedDataURL = ExifRestore.restore(file.dataURL, resizedDataURL);
  32813. }
  32814. return callback(Dropzone.dataURItoBlob(resizedDataURL));
  32815. }
  32816. });
  32817. }
  32818. }, {
  32819. key: "createThumbnail",
  32820. value: function createThumbnail(file, width, height, resizeMethod, fixOrientation, callback) {
  32821. var _this11 = this;
  32822. var fileReader = new FileReader();
  32823. fileReader.onload = function () {
  32824. file.dataURL = fileReader.result; // Don't bother creating a thumbnail for SVG images since they're vector
  32825. if (file.type === "image/svg+xml") {
  32826. if (callback != null) {
  32827. callback(fileReader.result);
  32828. }
  32829. return;
  32830. }
  32831. _this11.createThumbnailFromUrl(file, width, height, resizeMethod, fixOrientation, callback);
  32832. };
  32833. fileReader.readAsDataURL(file);
  32834. } // `mockFile` needs to have these attributes:
  32835. //
  32836. // { name: 'name', size: 12345, imageUrl: '' }
  32837. //
  32838. // `callback` will be invoked when the image has been downloaded and displayed.
  32839. // `crossOrigin` will be added to the `img` tag when accessing the file.
  32840. }, {
  32841. key: "displayExistingFile",
  32842. value: function displayExistingFile(mockFile, imageUrl, callback, crossOrigin) {
  32843. var _this12 = this;
  32844. var resizeThumbnail = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
  32845. this.emit("addedfile", mockFile);
  32846. this.emit("complete", mockFile);
  32847. if (!resizeThumbnail) {
  32848. this.emit("thumbnail", mockFile, imageUrl);
  32849. if (callback) callback();
  32850. } else {
  32851. var onDone = function onDone(thumbnail) {
  32852. _this12.emit("thumbnail", mockFile, thumbnail);
  32853. if (callback) callback();
  32854. };
  32855. mockFile.dataURL = imageUrl;
  32856. this.createThumbnailFromUrl(mockFile, this.options.thumbnailWidth, this.options.thumbnailHeight, this.options.thumbnailMethod, this.options.fixOrientation, onDone, crossOrigin);
  32857. }
  32858. }
  32859. }, {
  32860. key: "createThumbnailFromUrl",
  32861. value: function createThumbnailFromUrl(file, width, height, resizeMethod, fixOrientation, callback, crossOrigin) {
  32862. var _this13 = this;
  32863. // Not using `new Image` here because of a bug in latest Chrome versions.
  32864. // See https://github.com/enyo/dropzone/pull/226
  32865. var img = document.createElement("img");
  32866. if (crossOrigin) {
  32867. img.crossOrigin = crossOrigin;
  32868. } // fixOrientation is not needed anymore with browsers handling imageOrientation
  32869. fixOrientation = getComputedStyle(document.body)["imageOrientation"] == "from-image" ? false : fixOrientation;
  32870. img.onload = function () {
  32871. var loadExif = function loadExif(callback) {
  32872. return callback(1);
  32873. };
  32874. if (typeof EXIF !== "undefined" && EXIF !== null && fixOrientation) {
  32875. loadExif = function loadExif(callback) {
  32876. return EXIF.getData(img, function () {
  32877. return callback(EXIF.getTag(this, "Orientation"));
  32878. });
  32879. };
  32880. }
  32881. return loadExif(function (orientation) {
  32882. file.width = img.width;
  32883. file.height = img.height;
  32884. var resizeInfo = _this13.options.resize.call(_this13, file, width, height, resizeMethod);
  32885. var canvas = document.createElement("canvas");
  32886. var ctx = canvas.getContext("2d");
  32887. canvas.width = resizeInfo.trgWidth;
  32888. canvas.height = resizeInfo.trgHeight;
  32889. if (orientation > 4) {
  32890. canvas.width = resizeInfo.trgHeight;
  32891. canvas.height = resizeInfo.trgWidth;
  32892. }
  32893. switch (orientation) {
  32894. case 2:
  32895. // horizontal flip
  32896. ctx.translate(canvas.width, 0);
  32897. ctx.scale(-1, 1);
  32898. break;
  32899. case 3:
  32900. // 180° rotate left
  32901. ctx.translate(canvas.width, canvas.height);
  32902. ctx.rotate(Math.PI);
  32903. break;
  32904. case 4:
  32905. // vertical flip
  32906. ctx.translate(0, canvas.height);
  32907. ctx.scale(1, -1);
  32908. break;
  32909. case 5:
  32910. // vertical flip + 90 rotate right
  32911. ctx.rotate(0.5 * Math.PI);
  32912. ctx.scale(1, -1);
  32913. break;
  32914. case 6:
  32915. // 90° rotate right
  32916. ctx.rotate(0.5 * Math.PI);
  32917. ctx.translate(0, -canvas.width);
  32918. break;
  32919. case 7:
  32920. // horizontal flip + 90 rotate right
  32921. ctx.rotate(0.5 * Math.PI);
  32922. ctx.translate(canvas.height, -canvas.width);
  32923. ctx.scale(-1, 1);
  32924. break;
  32925. case 8:
  32926. // 90° rotate left
  32927. ctx.rotate(-0.5 * Math.PI);
  32928. ctx.translate(-canvas.height, 0);
  32929. break;
  32930. } // This is a bugfix for iOS' scaling bug.
  32931. drawImageIOSFix(ctx, img, resizeInfo.srcX != null ? resizeInfo.srcX : 0, resizeInfo.srcY != null ? resizeInfo.srcY : 0, resizeInfo.srcWidth, resizeInfo.srcHeight, resizeInfo.trgX != null ? resizeInfo.trgX : 0, resizeInfo.trgY != null ? resizeInfo.trgY : 0, resizeInfo.trgWidth, resizeInfo.trgHeight);
  32932. var thumbnail = canvas.toDataURL("image/png");
  32933. if (callback != null) {
  32934. return callback(thumbnail, canvas);
  32935. }
  32936. });
  32937. };
  32938. if (callback != null) {
  32939. img.onerror = callback;
  32940. }
  32941. return img.src = file.dataURL;
  32942. } // Goes through the queue and processes files if there aren't too many already.
  32943. }, {
  32944. key: "processQueue",
  32945. value: function processQueue() {
  32946. var parallelUploads = this.options.parallelUploads;
  32947. var processingLength = this.getUploadingFiles().length;
  32948. var i = processingLength; // There are already at least as many files uploading than should be
  32949. if (processingLength >= parallelUploads) {
  32950. return;
  32951. }
  32952. var queuedFiles = this.getQueuedFiles();
  32953. if (!(queuedFiles.length > 0)) {
  32954. return;
  32955. }
  32956. if (this.options.uploadMultiple) {
  32957. // The files should be uploaded in one request
  32958. return this.processFiles(queuedFiles.slice(0, parallelUploads - processingLength));
  32959. } else {
  32960. while (i < parallelUploads) {
  32961. if (!queuedFiles.length) {
  32962. return;
  32963. } // Nothing left to process
  32964. this.processFile(queuedFiles.shift());
  32965. i++;
  32966. }
  32967. }
  32968. } // Wrapper for `processFiles`
  32969. }, {
  32970. key: "processFile",
  32971. value: function processFile(file) {
  32972. return this.processFiles([file]);
  32973. } // Loads the file, then calls finishedLoading()
  32974. }, {
  32975. key: "processFiles",
  32976. value: function processFiles(files) {
  32977. var _iterator10 = dropzone_createForOfIteratorHelper(files, true),
  32978. _step10;
  32979. try {
  32980. for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
  32981. var file = _step10.value;
  32982. file.processing = true; // Backwards compatibility
  32983. file.status = Dropzone.UPLOADING;
  32984. this.emit("processing", file);
  32985. }
  32986. } catch (err) {
  32987. _iterator10.e(err);
  32988. } finally {
  32989. _iterator10.f();
  32990. }
  32991. if (this.options.uploadMultiple) {
  32992. this.emit("processingmultiple", files);
  32993. }
  32994. return this.uploadFiles(files);
  32995. }
  32996. }, {
  32997. key: "_getFilesWithXhr",
  32998. value: function _getFilesWithXhr(xhr) {
  32999. var files;
  33000. return files = this.files.filter(function (file) {
  33001. return file.xhr === xhr;
  33002. }).map(function (file) {
  33003. return file;
  33004. });
  33005. } // Cancels the file upload and sets the status to CANCELED
  33006. // **if** the file is actually being uploaded.
  33007. // If it's still in the queue, the file is being removed from it and the status
  33008. // set to CANCELED.
  33009. }, {
  33010. key: "cancelUpload",
  33011. value: function cancelUpload(file) {
  33012. if (file.status === Dropzone.UPLOADING) {
  33013. var groupedFiles = this._getFilesWithXhr(file.xhr);
  33014. var _iterator11 = dropzone_createForOfIteratorHelper(groupedFiles, true),
  33015. _step11;
  33016. try {
  33017. for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
  33018. var groupedFile = _step11.value;
  33019. groupedFile.status = Dropzone.CANCELED;
  33020. }
  33021. } catch (err) {
  33022. _iterator11.e(err);
  33023. } finally {
  33024. _iterator11.f();
  33025. }
  33026. if (typeof file.xhr !== "undefined") {
  33027. file.xhr.abort();
  33028. }
  33029. var _iterator12 = dropzone_createForOfIteratorHelper(groupedFiles, true),
  33030. _step12;
  33031. try {
  33032. for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
  33033. var _groupedFile = _step12.value;
  33034. this.emit("canceled", _groupedFile);
  33035. }
  33036. } catch (err) {
  33037. _iterator12.e(err);
  33038. } finally {
  33039. _iterator12.f();
  33040. }
  33041. if (this.options.uploadMultiple) {
  33042. this.emit("canceledmultiple", groupedFiles);
  33043. }
  33044. } else if (file.status === Dropzone.ADDED || file.status === Dropzone.QUEUED) {
  33045. file.status = Dropzone.CANCELED;
  33046. this.emit("canceled", file);
  33047. if (this.options.uploadMultiple) {
  33048. this.emit("canceledmultiple", [file]);
  33049. }
  33050. }
  33051. if (this.options.autoProcessQueue) {
  33052. return this.processQueue();
  33053. }
  33054. }
  33055. }, {
  33056. key: "resolveOption",
  33057. value: function resolveOption(option) {
  33058. if (typeof option === "function") {
  33059. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  33060. args[_key - 1] = arguments[_key];
  33061. }
  33062. return option.apply(this, args);
  33063. }
  33064. return option;
  33065. }
  33066. }, {
  33067. key: "uploadFile",
  33068. value: function uploadFile(file) {
  33069. return this.uploadFiles([file]);
  33070. }
  33071. }, {
  33072. key: "uploadFiles",
  33073. value: function uploadFiles(files) {
  33074. var _this14 = this;
  33075. this._transformFiles(files, function (transformedFiles) {
  33076. if (_this14.options.chunking) {
  33077. // Chunking is not allowed to be used with `uploadMultiple` so we know
  33078. // that there is only __one__file.
  33079. var transformedFile = transformedFiles[0];
  33080. files[0].upload.chunked = _this14.options.chunking && (_this14.options.forceChunking || transformedFile.size > _this14.options.chunkSize);
  33081. files[0].upload.totalChunkCount = Math.ceil(transformedFile.size / _this14.options.chunkSize);
  33082. }
  33083. if (files[0].upload.chunked) {
  33084. // This file should be sent in chunks!
  33085. // If the chunking option is set, we **know** that there can only be **one** file, since
  33086. // uploadMultiple is not allowed with this option.
  33087. var file = files[0];
  33088. var _transformedFile = transformedFiles[0];
  33089. var startedChunkCount = 0;
  33090. file.upload.chunks = [];
  33091. var handleNextChunk = function handleNextChunk() {
  33092. var chunkIndex = 0; // Find the next item in file.upload.chunks that is not defined yet.
  33093. while (file.upload.chunks[chunkIndex] !== undefined) {
  33094. chunkIndex++;
  33095. } // This means, that all chunks have already been started.
  33096. if (chunkIndex >= file.upload.totalChunkCount) return;
  33097. startedChunkCount++;
  33098. var start = chunkIndex * _this14.options.chunkSize;
  33099. var end = Math.min(start + _this14.options.chunkSize, _transformedFile.size);
  33100. var dataBlock = {
  33101. name: _this14._getParamName(0),
  33102. data: _transformedFile.webkitSlice ? _transformedFile.webkitSlice(start, end) : _transformedFile.slice(start, end),
  33103. filename: file.upload.filename,
  33104. chunkIndex: chunkIndex
  33105. };
  33106. file.upload.chunks[chunkIndex] = {
  33107. file: file,
  33108. index: chunkIndex,
  33109. dataBlock: dataBlock,
  33110. // In case we want to retry.
  33111. status: Dropzone.UPLOADING,
  33112. progress: 0,
  33113. retries: 0 // The number of times this block has been retried.
  33114. };
  33115. _this14._uploadData(files, [dataBlock]);
  33116. };
  33117. file.upload.finishedChunkUpload = function (chunk, response) {
  33118. var allFinished = true;
  33119. chunk.status = Dropzone.SUCCESS; // Clear the data from the chunk
  33120. chunk.dataBlock = null; // Leaving this reference to xhr intact here will cause memory leaks in some browsers
  33121. chunk.xhr = null;
  33122. for (var i = 0; i < file.upload.totalChunkCount; i++) {
  33123. if (file.upload.chunks[i] === undefined) {
  33124. return handleNextChunk();
  33125. }
  33126. if (file.upload.chunks[i].status !== Dropzone.SUCCESS) {
  33127. allFinished = false;
  33128. }
  33129. }
  33130. if (allFinished) {
  33131. _this14.options.chunksUploaded(file, function () {
  33132. _this14._finished(files, response, null);
  33133. });
  33134. }
  33135. };
  33136. if (_this14.options.parallelChunkUploads) {
  33137. for (var i = 0; i < file.upload.totalChunkCount; i++) {
  33138. handleNextChunk();
  33139. }
  33140. } else {
  33141. handleNextChunk();
  33142. }
  33143. } else {
  33144. var dataBlocks = [];
  33145. for (var _i2 = 0; _i2 < files.length; _i2++) {
  33146. dataBlocks[_i2] = {
  33147. name: _this14._getParamName(_i2),
  33148. data: transformedFiles[_i2],
  33149. filename: files[_i2].upload.filename
  33150. };
  33151. }
  33152. _this14._uploadData(files, dataBlocks);
  33153. }
  33154. });
  33155. } /// Returns the right chunk for given file and xhr
  33156. }, {
  33157. key: "_getChunk",
  33158. value: function _getChunk(file, xhr) {
  33159. for (var i = 0; i < file.upload.totalChunkCount; i++) {
  33160. if (file.upload.chunks[i] !== undefined && file.upload.chunks[i].xhr === xhr) {
  33161. return file.upload.chunks[i];
  33162. }
  33163. }
  33164. } // This function actually uploads the file(s) to the server.
  33165. // If dataBlocks contains the actual data to upload (meaning, that this could either be transformed
  33166. // files, or individual chunks for chunked upload).
  33167. }, {
  33168. key: "_uploadData",
  33169. value: function _uploadData(files, dataBlocks) {
  33170. var _this15 = this;
  33171. var xhr = new XMLHttpRequest(); // Put the xhr object in the file objects to be able to reference it later.
  33172. var _iterator13 = dropzone_createForOfIteratorHelper(files, true),
  33173. _step13;
  33174. try {
  33175. for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
  33176. var file = _step13.value;
  33177. file.xhr = xhr;
  33178. }
  33179. } catch (err) {
  33180. _iterator13.e(err);
  33181. } finally {
  33182. _iterator13.f();
  33183. }
  33184. if (files[0].upload.chunked) {
  33185. // Put the xhr object in the right chunk object, so it can be associated later, and found with _getChunk
  33186. files[0].upload.chunks[dataBlocks[0].chunkIndex].xhr = xhr;
  33187. }
  33188. var method = this.resolveOption(this.options.method, files);
  33189. var url = this.resolveOption(this.options.url, files);
  33190. xhr.open(method, url, true); // Setting the timeout after open because of IE11 issue: https://gitlab.com/meno/dropzone/issues/8
  33191. var timeout = this.resolveOption(this.options.timeout, files);
  33192. if (timeout) xhr.timeout = this.resolveOption(this.options.timeout, files); // Has to be after `.open()`. See https://github.com/enyo/dropzone/issues/179
  33193. xhr.withCredentials = !!this.options.withCredentials;
  33194. xhr.onload = function (e) {
  33195. _this15._finishedUploading(files, xhr, e);
  33196. };
  33197. xhr.ontimeout = function () {
  33198. _this15._handleUploadError(files, xhr, "Request timedout after ".concat(_this15.options.timeout / 1000, " seconds"));
  33199. };
  33200. xhr.onerror = function () {
  33201. _this15._handleUploadError(files, xhr);
  33202. }; // Some browsers do not have the .upload property
  33203. var progressObj = xhr.upload != null ? xhr.upload : xhr;
  33204. progressObj.onprogress = function (e) {
  33205. return _this15._updateFilesUploadProgress(files, xhr, e);
  33206. };
  33207. var headers = {
  33208. Accept: "application/json",
  33209. "Cache-Control": "no-cache",
  33210. "X-Requested-With": "XMLHttpRequest"
  33211. };
  33212. if (this.options.headers) {
  33213. Dropzone.extend(headers, this.options.headers);
  33214. }
  33215. for (var headerName in headers) {
  33216. var headerValue = headers[headerName];
  33217. if (headerValue) {
  33218. xhr.setRequestHeader(headerName, headerValue);
  33219. }
  33220. }
  33221. var formData = new FormData(); // Adding all @options parameters
  33222. if (this.options.params) {
  33223. var additionalParams = this.options.params;
  33224. if (typeof additionalParams === "function") {
  33225. additionalParams = additionalParams.call(this, files, xhr, files[0].upload.chunked ? this._getChunk(files[0], xhr) : null);
  33226. }
  33227. for (var key in additionalParams) {
  33228. var value = additionalParams[key];
  33229. if (Array.isArray(value)) {
  33230. // The additional parameter contains an array,
  33231. // so lets iterate over it to attach each value
  33232. // individually.
  33233. for (var i = 0; i < value.length; i++) {
  33234. formData.append(key, value[i]);
  33235. }
  33236. } else {
  33237. formData.append(key, value);
  33238. }
  33239. }
  33240. } // Let the user add additional data if necessary
  33241. var _iterator14 = dropzone_createForOfIteratorHelper(files, true),
  33242. _step14;
  33243. try {
  33244. for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
  33245. var _file = _step14.value;
  33246. this.emit("sending", _file, xhr, formData);
  33247. }
  33248. } catch (err) {
  33249. _iterator14.e(err);
  33250. } finally {
  33251. _iterator14.f();
  33252. }
  33253. if (this.options.uploadMultiple) {
  33254. this.emit("sendingmultiple", files, xhr, formData);
  33255. }
  33256. this._addFormElementData(formData); // Finally add the files
  33257. // Has to be last because some servers (eg: S3) expect the file to be the last parameter
  33258. for (var _i3 = 0; _i3 < dataBlocks.length; _i3++) {
  33259. var dataBlock = dataBlocks[_i3];
  33260. formData.append(dataBlock.name, dataBlock.data, dataBlock.filename);
  33261. }
  33262. this.submitRequest(xhr, formData, files);
  33263. } // Transforms all files with this.options.transformFile and invokes done with the transformed files when done.
  33264. }, {
  33265. key: "_transformFiles",
  33266. value: function _transformFiles(files, done) {
  33267. var _this16 = this;
  33268. var transformedFiles = []; // Clumsy way of handling asynchronous calls, until I get to add a proper Future library.
  33269. var doneCounter = 0;
  33270. var _loop = function _loop(i) {
  33271. _this16.options.transformFile.call(_this16, files[i], function (transformedFile) {
  33272. transformedFiles[i] = transformedFile;
  33273. if (++doneCounter === files.length) {
  33274. done(transformedFiles);
  33275. }
  33276. });
  33277. };
  33278. for (var i = 0; i < files.length; i++) {
  33279. _loop(i);
  33280. }
  33281. } // Takes care of adding other input elements of the form to the AJAX request
  33282. }, {
  33283. key: "_addFormElementData",
  33284. value: function _addFormElementData(formData) {
  33285. // Take care of other input elements
  33286. if (this.element.tagName === "FORM") {
  33287. var _iterator15 = dropzone_createForOfIteratorHelper(this.element.querySelectorAll("input, textarea, select, button"), true),
  33288. _step15;
  33289. try {
  33290. for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
  33291. var input = _step15.value;
  33292. var inputName = input.getAttribute("name");
  33293. var inputType = input.getAttribute("type");
  33294. if (inputType) inputType = inputType.toLowerCase(); // If the input doesn't have a name, we can't use it.
  33295. if (typeof inputName === "undefined" || inputName === null) continue;
  33296. if (input.tagName === "SELECT" && input.hasAttribute("multiple")) {
  33297. // Possibly multiple values
  33298. var _iterator16 = dropzone_createForOfIteratorHelper(input.options, true),
  33299. _step16;
  33300. try {
  33301. for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {
  33302. var option = _step16.value;
  33303. if (option.selected) {
  33304. formData.append(inputName, option.value);
  33305. }
  33306. }
  33307. } catch (err) {
  33308. _iterator16.e(err);
  33309. } finally {
  33310. _iterator16.f();
  33311. }
  33312. } else if (!inputType || inputType !== "checkbox" && inputType !== "radio" || input.checked) {
  33313. formData.append(inputName, input.value);
  33314. }
  33315. }
  33316. } catch (err) {
  33317. _iterator15.e(err);
  33318. } finally {
  33319. _iterator15.f();
  33320. }
  33321. }
  33322. } // Invoked when there is new progress information about given files.
  33323. // If e is not provided, it is assumed that the upload is finished.
  33324. }, {
  33325. key: "_updateFilesUploadProgress",
  33326. value: function _updateFilesUploadProgress(files, xhr, e) {
  33327. if (!files[0].upload.chunked) {
  33328. // Handle file uploads without chunking
  33329. var _iterator17 = dropzone_createForOfIteratorHelper(files, true),
  33330. _step17;
  33331. try {
  33332. for (_iterator17.s(); !(_step17 = _iterator17.n()).done;) {
  33333. var file = _step17.value;
  33334. if (file.upload.total && file.upload.bytesSent && file.upload.bytesSent == file.upload.total) {
  33335. // If both, the `total` and `bytesSent` have already been set, and
  33336. // they are equal (meaning progress is at 100%), we can skip this
  33337. // file, since an upload progress shouldn't go down.
  33338. continue;
  33339. }
  33340. if (e) {
  33341. file.upload.progress = 100 * e.loaded / e.total;
  33342. file.upload.total = e.total;
  33343. file.upload.bytesSent = e.loaded;
  33344. } else {
  33345. // No event, so we're at 100%
  33346. file.upload.progress = 100;
  33347. file.upload.bytesSent = file.upload.total;
  33348. }
  33349. this.emit("uploadprogress", file, file.upload.progress, file.upload.bytesSent);
  33350. }
  33351. } catch (err) {
  33352. _iterator17.e(err);
  33353. } finally {
  33354. _iterator17.f();
  33355. }
  33356. } else {
  33357. // Handle chunked file uploads
  33358. // Chunked upload is not compatible with uploading multiple files in one
  33359. // request, so we know there's only one file.
  33360. var _file2 = files[0]; // Since this is a chunked upload, we need to update the appropriate chunk
  33361. // progress.
  33362. var chunk = this._getChunk(_file2, xhr);
  33363. if (e) {
  33364. chunk.progress = 100 * e.loaded / e.total;
  33365. chunk.total = e.total;
  33366. chunk.bytesSent = e.loaded;
  33367. } else {
  33368. // No event, so we're at 100%
  33369. chunk.progress = 100;
  33370. chunk.bytesSent = chunk.total;
  33371. } // Now tally the *file* upload progress from its individual chunks
  33372. _file2.upload.progress = 0;
  33373. _file2.upload.total = 0;
  33374. _file2.upload.bytesSent = 0;
  33375. for (var i = 0; i < _file2.upload.totalChunkCount; i++) {
  33376. if (_file2.upload.chunks[i] && typeof _file2.upload.chunks[i].progress !== "undefined") {
  33377. _file2.upload.progress += _file2.upload.chunks[i].progress;
  33378. _file2.upload.total += _file2.upload.chunks[i].total;
  33379. _file2.upload.bytesSent += _file2.upload.chunks[i].bytesSent;
  33380. }
  33381. } // Since the process is a percentage, we need to divide by the amount of
  33382. // chunks we've used.
  33383. _file2.upload.progress = _file2.upload.progress / _file2.upload.totalChunkCount;
  33384. this.emit("uploadprogress", _file2, _file2.upload.progress, _file2.upload.bytesSent);
  33385. }
  33386. }
  33387. }, {
  33388. key: "_finishedUploading",
  33389. value: function _finishedUploading(files, xhr, e) {
  33390. var response;
  33391. if (files[0].status === Dropzone.CANCELED) {
  33392. return;
  33393. }
  33394. if (xhr.readyState !== 4) {
  33395. return;
  33396. }
  33397. if (xhr.responseType !== "arraybuffer" && xhr.responseType !== "blob") {
  33398. response = xhr.responseText;
  33399. if (xhr.getResponseHeader("content-type") && ~xhr.getResponseHeader("content-type").indexOf("application/json")) {
  33400. try {
  33401. response = JSON.parse(response);
  33402. } catch (error) {
  33403. e = error;
  33404. response = "Invalid JSON response from server.";
  33405. }
  33406. }
  33407. }
  33408. this._updateFilesUploadProgress(files, xhr);
  33409. if (!(200 <= xhr.status && xhr.status < 300)) {
  33410. this._handleUploadError(files, xhr, response);
  33411. } else {
  33412. if (files[0].upload.chunked) {
  33413. files[0].upload.finishedChunkUpload(this._getChunk(files[0], xhr), response);
  33414. } else {
  33415. this._finished(files, response, e);
  33416. }
  33417. }
  33418. }
  33419. }, {
  33420. key: "_handleUploadError",
  33421. value: function _handleUploadError(files, xhr, response) {
  33422. if (files[0].status === Dropzone.CANCELED) {
  33423. return;
  33424. }
  33425. if (files[0].upload.chunked && this.options.retryChunks) {
  33426. var chunk = this._getChunk(files[0], xhr);
  33427. if (chunk.retries++ < this.options.retryChunksLimit) {
  33428. this._uploadData(files, [chunk.dataBlock]);
  33429. return;
  33430. } else {
  33431. console.warn("Retried this chunk too often. Giving up.");
  33432. }
  33433. }
  33434. this._errorProcessing(files, response || this.options.dictResponseError.replace("{{statusCode}}", xhr.status), xhr);
  33435. }
  33436. }, {
  33437. key: "submitRequest",
  33438. value: function submitRequest(xhr, formData, files) {
  33439. if (xhr.readyState != 1) {
  33440. console.warn("Cannot send this request because the XMLHttpRequest.readyState is not OPENED.");
  33441. return;
  33442. }
  33443. xhr.send(formData);
  33444. } // Called internally when processing is finished.
  33445. // Individual callbacks have to be called in the appropriate sections.
  33446. }, {
  33447. key: "_finished",
  33448. value: function _finished(files, responseText, e) {
  33449. var _iterator18 = dropzone_createForOfIteratorHelper(files, true),
  33450. _step18;
  33451. try {
  33452. for (_iterator18.s(); !(_step18 = _iterator18.n()).done;) {
  33453. var file = _step18.value;
  33454. file.status = Dropzone.SUCCESS;
  33455. this.emit("success", file, responseText, e);
  33456. this.emit("complete", file);
  33457. }
  33458. } catch (err) {
  33459. _iterator18.e(err);
  33460. } finally {
  33461. _iterator18.f();
  33462. }
  33463. if (this.options.uploadMultiple) {
  33464. this.emit("successmultiple", files, responseText, e);
  33465. this.emit("completemultiple", files);
  33466. }
  33467. if (this.options.autoProcessQueue) {
  33468. return this.processQueue();
  33469. }
  33470. } // Called internally when processing is finished.
  33471. // Individual callbacks have to be called in the appropriate sections.
  33472. }, {
  33473. key: "_errorProcessing",
  33474. value: function _errorProcessing(files, message, xhr) {
  33475. var _iterator19 = dropzone_createForOfIteratorHelper(files, true),
  33476. _step19;
  33477. try {
  33478. for (_iterator19.s(); !(_step19 = _iterator19.n()).done;) {
  33479. var file = _step19.value;
  33480. file.status = Dropzone.ERROR;
  33481. this.emit("error", file, message, xhr);
  33482. this.emit("complete", file);
  33483. }
  33484. } catch (err) {
  33485. _iterator19.e(err);
  33486. } finally {
  33487. _iterator19.f();
  33488. }
  33489. if (this.options.uploadMultiple) {
  33490. this.emit("errormultiple", files, message, xhr);
  33491. this.emit("completemultiple", files);
  33492. }
  33493. if (this.options.autoProcessQueue) {
  33494. return this.processQueue();
  33495. }
  33496. }
  33497. }], [{
  33498. key: "initClass",
  33499. value: function initClass() {
  33500. // Exposing the emitter class, mainly for tests
  33501. this.prototype.Emitter = Emitter;
  33502. /*
  33503. This is a list of all available events you can register on a dropzone object.
  33504. You can register an event handler like this:
  33505. dropzone.on("dragEnter", function() { });
  33506. */
  33507. this.prototype.events = ["drop", "dragstart", "dragend", "dragenter", "dragover", "dragleave", "addedfile", "addedfiles", "removedfile", "thumbnail", "error", "errormultiple", "processing", "processingmultiple", "uploadprogress", "totaluploadprogress", "sending", "sendingmultiple", "success", "successmultiple", "canceled", "canceledmultiple", "complete", "completemultiple", "reset", "maxfilesexceeded", "maxfilesreached", "queuecomplete"];
  33508. this.prototype._thumbnailQueue = [];
  33509. this.prototype._processingThumbnail = false;
  33510. } // global utility
  33511. }, {
  33512. key: "extend",
  33513. value: function extend(target) {
  33514. for (var _len2 = arguments.length, objects = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  33515. objects[_key2 - 1] = arguments[_key2];
  33516. }
  33517. for (var _i4 = 0, _objects = objects; _i4 < _objects.length; _i4++) {
  33518. var object = _objects[_i4];
  33519. for (var key in object) {
  33520. var val = object[key];
  33521. target[key] = val;
  33522. }
  33523. }
  33524. return target;
  33525. }
  33526. }, {
  33527. key: "uuidv4",
  33528. value: function uuidv4() {
  33529. return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {
  33530. var r = Math.random() * 16 | 0,
  33531. v = c === "x" ? r : r & 0x3 | 0x8;
  33532. return v.toString(16);
  33533. });
  33534. }
  33535. }]);
  33536. return Dropzone;
  33537. }(Emitter);
  33538. Dropzone.initClass();
  33539. Dropzone.version = "5.9.3"; // This is a map of options for your different dropzones. Add configurations
  33540. // to this object for your different dropzone elemens.
  33541. //
  33542. // Example:
  33543. //
  33544. // Dropzone.options.myDropzoneElementId = { maxFilesize: 1 };
  33545. //
  33546. // To disable autoDiscover for a specific element, you can set `false` as an option:
  33547. //
  33548. // Dropzone.options.myDisabledElementId = false;
  33549. //
  33550. // And in html:
  33551. //
  33552. // <form action="/upload" id="my-dropzone-element-id" class="dropzone"></form>
  33553. Dropzone.options = {}; // Returns the options for an element or undefined if none available.
  33554. Dropzone.optionsForElement = function (element) {
  33555. // Get the `Dropzone.options.elementId` for this element if it exists
  33556. if (element.getAttribute("id")) {
  33557. return Dropzone.options[camelize(element.getAttribute("id"))];
  33558. } else {
  33559. return undefined;
  33560. }
  33561. }; // Holds a list of all dropzone instances
  33562. Dropzone.instances = []; // Returns the dropzone for given element if any
  33563. Dropzone.forElement = function (element) {
  33564. if (typeof element === "string") {
  33565. element = document.querySelector(element);
  33566. }
  33567. if ((element != null ? element.dropzone : undefined) == null) {
  33568. throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");
  33569. }
  33570. return element.dropzone;
  33571. }; // Set to false if you don't want Dropzone to automatically find and attach to .dropzone elements.
  33572. Dropzone.autoDiscover = true; // Looks for all .dropzone elements and creates a dropzone for them
  33573. Dropzone.discover = function () {
  33574. var dropzones;
  33575. if (document.querySelectorAll) {
  33576. dropzones = document.querySelectorAll(".dropzone");
  33577. } else {
  33578. dropzones = []; // IE :(
  33579. var checkElements = function checkElements(elements) {
  33580. return function () {
  33581. var result = [];
  33582. var _iterator20 = dropzone_createForOfIteratorHelper(elements, true),
  33583. _step20;
  33584. try {
  33585. for (_iterator20.s(); !(_step20 = _iterator20.n()).done;) {
  33586. var el = _step20.value;
  33587. if (/(^| )dropzone($| )/.test(el.className)) {
  33588. result.push(dropzones.push(el));
  33589. } else {
  33590. result.push(undefined);
  33591. }
  33592. }
  33593. } catch (err) {
  33594. _iterator20.e(err);
  33595. } finally {
  33596. _iterator20.f();
  33597. }
  33598. return result;
  33599. }();
  33600. };
  33601. checkElements(document.getElementsByTagName("div"));
  33602. checkElements(document.getElementsByTagName("form"));
  33603. }
  33604. return function () {
  33605. var result = [];
  33606. var _iterator21 = dropzone_createForOfIteratorHelper(dropzones, true),
  33607. _step21;
  33608. try {
  33609. for (_iterator21.s(); !(_step21 = _iterator21.n()).done;) {
  33610. var dropzone = _step21.value;
  33611. // Create a dropzone unless auto discover has been disabled for specific element
  33612. if (Dropzone.optionsForElement(dropzone) !== false) {
  33613. result.push(new Dropzone(dropzone));
  33614. } else {
  33615. result.push(undefined);
  33616. }
  33617. }
  33618. } catch (err) {
  33619. _iterator21.e(err);
  33620. } finally {
  33621. _iterator21.f();
  33622. }
  33623. return result;
  33624. }();
  33625. }; // Some browsers support drag and drog functionality, but not correctly.
  33626. //
  33627. // So I created a blocklist of userAgents. Yes, yes. Browser sniffing, I know.
  33628. // But what to do when browsers *theoretically* support an API, but crash
  33629. // when using it.
  33630. //
  33631. // This is a list of regular expressions tested against navigator.userAgent
  33632. //
  33633. // ** It should only be used on browser that *do* support the API, but
  33634. // incorrectly **
  33635. Dropzone.blockedBrowsers = [// The mac os and windows phone version of opera 12 seems to have a problem with the File drag'n'drop API.
  33636. /opera.*(Macintosh|Windows Phone).*version\/12/i]; // Checks if the browser is supported
  33637. Dropzone.isBrowserSupported = function () {
  33638. var capableBrowser = true;
  33639. if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData && document.querySelector) {
  33640. if (!("classList" in document.createElement("a"))) {
  33641. capableBrowser = false;
  33642. } else {
  33643. if (Dropzone.blacklistedBrowsers !== undefined) {
  33644. // Since this has been renamed, this makes sure we don't break older
  33645. // configuration.
  33646. Dropzone.blockedBrowsers = Dropzone.blacklistedBrowsers;
  33647. } // The browser supports the API, but may be blocked.
  33648. var _iterator22 = dropzone_createForOfIteratorHelper(Dropzone.blockedBrowsers, true),
  33649. _step22;
  33650. try {
  33651. for (_iterator22.s(); !(_step22 = _iterator22.n()).done;) {
  33652. var regex = _step22.value;
  33653. if (regex.test(navigator.userAgent)) {
  33654. capableBrowser = false;
  33655. continue;
  33656. }
  33657. }
  33658. } catch (err) {
  33659. _iterator22.e(err);
  33660. } finally {
  33661. _iterator22.f();
  33662. }
  33663. }
  33664. } else {
  33665. capableBrowser = false;
  33666. }
  33667. return capableBrowser;
  33668. };
  33669. Dropzone.dataURItoBlob = function (dataURI) {
  33670. // convert base64 to raw binary data held in a string
  33671. // doesn't handle URLEncoded DataURIs - see SO answer #6850276 for code that does this
  33672. var byteString = atob(dataURI.split(",")[1]); // separate out the mime component
  33673. var mimeString = dataURI.split(",")[0].split(":")[1].split(";")[0]; // write the bytes of the string to an ArrayBuffer
  33674. var ab = new ArrayBuffer(byteString.length);
  33675. var ia = new Uint8Array(ab);
  33676. for (var i = 0, end = byteString.length, asc = 0 <= end; asc ? i <= end : i >= end; asc ? i++ : i--) {
  33677. ia[i] = byteString.charCodeAt(i);
  33678. } // write the ArrayBuffer to a blob
  33679. return new Blob([ab], {
  33680. type: mimeString
  33681. });
  33682. }; // Returns an array without the rejected item
  33683. var without = function without(list, rejectedItem) {
  33684. return list.filter(function (item) {
  33685. return item !== rejectedItem;
  33686. }).map(function (item) {
  33687. return item;
  33688. });
  33689. }; // abc-def_ghi -> abcDefGhi
  33690. var camelize = function camelize(str) {
  33691. return str.replace(/[\-_](\w)/g, function (match) {
  33692. return match.charAt(1).toUpperCase();
  33693. });
  33694. }; // Creates an element from string
  33695. Dropzone.createElement = function (string) {
  33696. var div = document.createElement("div");
  33697. div.innerHTML = string;
  33698. return div.childNodes[0];
  33699. }; // Tests if given element is inside (or simply is) the container
  33700. Dropzone.elementInside = function (element, container) {
  33701. if (element === container) {
  33702. return true;
  33703. } // Coffeescript doesn't support do/while loops
  33704. while (element = element.parentNode) {
  33705. if (element === container) {
  33706. return true;
  33707. }
  33708. }
  33709. return false;
  33710. };
  33711. Dropzone.getElement = function (el, name) {
  33712. var element;
  33713. if (typeof el === "string") {
  33714. element = document.querySelector(el);
  33715. } else if (el.nodeType != null) {
  33716. element = el;
  33717. }
  33718. if (element == null) {
  33719. throw new Error("Invalid `".concat(name, "` option provided. Please provide a CSS selector or a plain HTML element."));
  33720. }
  33721. return element;
  33722. };
  33723. Dropzone.getElements = function (els, name) {
  33724. var el, elements;
  33725. if (els instanceof Array) {
  33726. elements = [];
  33727. try {
  33728. var _iterator23 = dropzone_createForOfIteratorHelper(els, true),
  33729. _step23;
  33730. try {
  33731. for (_iterator23.s(); !(_step23 = _iterator23.n()).done;) {
  33732. el = _step23.value;
  33733. elements.push(this.getElement(el, name));
  33734. }
  33735. } catch (err) {
  33736. _iterator23.e(err);
  33737. } finally {
  33738. _iterator23.f();
  33739. }
  33740. } catch (e) {
  33741. elements = null;
  33742. }
  33743. } else if (typeof els === "string") {
  33744. elements = [];
  33745. var _iterator24 = dropzone_createForOfIteratorHelper(document.querySelectorAll(els), true),
  33746. _step24;
  33747. try {
  33748. for (_iterator24.s(); !(_step24 = _iterator24.n()).done;) {
  33749. el = _step24.value;
  33750. elements.push(el);
  33751. }
  33752. } catch (err) {
  33753. _iterator24.e(err);
  33754. } finally {
  33755. _iterator24.f();
  33756. }
  33757. } else if (els.nodeType != null) {
  33758. elements = [els];
  33759. }
  33760. if (elements == null || !elements.length) {
  33761. throw new Error("Invalid `".concat(name, "` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));
  33762. }
  33763. return elements;
  33764. }; // Asks the user the question and calls accepted or rejected accordingly
  33765. //
  33766. // The default implementation just uses `window.confirm` and then calls the
  33767. // appropriate callback.
  33768. Dropzone.confirm = function (question, accepted, rejected) {
  33769. if (window.confirm(question)) {
  33770. return accepted();
  33771. } else if (rejected != null) {
  33772. return rejected();
  33773. }
  33774. }; // Validates the mime type like this:
  33775. //
  33776. // https://developer.mozilla.org/en-US/docs/HTML/Element/input#attr-accept
  33777. Dropzone.isValidFile = function (file, acceptedFiles) {
  33778. if (!acceptedFiles) {
  33779. return true;
  33780. } // If there are no accepted mime types, it's OK
  33781. acceptedFiles = acceptedFiles.split(",");
  33782. var mimeType = file.type;
  33783. var baseMimeType = mimeType.replace(/\/.*$/, "");
  33784. var _iterator25 = dropzone_createForOfIteratorHelper(acceptedFiles, true),
  33785. _step25;
  33786. try {
  33787. for (_iterator25.s(); !(_step25 = _iterator25.n()).done;) {
  33788. var validType = _step25.value;
  33789. validType = validType.trim();
  33790. if (validType.charAt(0) === ".") {
  33791. if (file.name.toLowerCase().indexOf(validType.toLowerCase(), file.name.length - validType.length) !== -1) {
  33792. return true;
  33793. }
  33794. } else if (/\/\*$/.test(validType)) {
  33795. // This is something like a image/* mime type
  33796. if (baseMimeType === validType.replace(/\/.*$/, "")) {
  33797. return true;
  33798. }
  33799. } else {
  33800. if (mimeType === validType) {
  33801. return true;
  33802. }
  33803. }
  33804. }
  33805. } catch (err) {
  33806. _iterator25.e(err);
  33807. } finally {
  33808. _iterator25.f();
  33809. }
  33810. return false;
  33811. }; // Augment jQuery
  33812. if (typeof jQuery !== "undefined" && jQuery !== null) {
  33813. jQuery.fn.dropzone = function (options) {
  33814. return this.each(function () {
  33815. return new Dropzone(this, options);
  33816. });
  33817. };
  33818. } // Dropzone file status codes
  33819. Dropzone.ADDED = "added";
  33820. Dropzone.QUEUED = "queued"; // For backwards compatibility. Now, if a file is accepted, it's either queued
  33821. // or uploading.
  33822. Dropzone.ACCEPTED = Dropzone.QUEUED;
  33823. Dropzone.UPLOADING = "uploading";
  33824. Dropzone.PROCESSING = Dropzone.UPLOADING; // alias
  33825. Dropzone.CANCELED = "canceled";
  33826. Dropzone.ERROR = "error";
  33827. Dropzone.SUCCESS = "success";
  33828. /*
  33829. Bugfix for iOS 6 and 7
  33830. Source: http://stackoverflow.com/questions/11929099/html5-canvas-drawimage-ratio-bug-ios
  33831. based on the work of https://github.com/stomita/ios-imagefile-megapixel
  33832. */
  33833. // Detecting vertical squash in loaded image.
  33834. // Fixes a bug which squash image vertically while drawing into canvas for some images.
  33835. // This is a bug in iOS6 devices. This function from https://github.com/stomita/ios-imagefile-megapixel
  33836. var detectVerticalSquash = function detectVerticalSquash(img) {
  33837. var iw = img.naturalWidth;
  33838. var ih = img.naturalHeight;
  33839. var canvas = document.createElement("canvas");
  33840. canvas.width = 1;
  33841. canvas.height = ih;
  33842. var ctx = canvas.getContext("2d");
  33843. ctx.drawImage(img, 0, 0);
  33844. var _ctx$getImageData = ctx.getImageData(1, 0, 1, ih),
  33845. data = _ctx$getImageData.data; // search image edge pixel position in case it is squashed vertically.
  33846. var sy = 0;
  33847. var ey = ih;
  33848. var py = ih;
  33849. while (py > sy) {
  33850. var alpha = data[(py - 1) * 4 + 3];
  33851. if (alpha === 0) {
  33852. ey = py;
  33853. } else {
  33854. sy = py;
  33855. }
  33856. py = ey + sy >> 1;
  33857. }
  33858. var ratio = py / ih;
  33859. if (ratio === 0) {
  33860. return 1;
  33861. } else {
  33862. return ratio;
  33863. }
  33864. }; // A replacement for context.drawImage
  33865. // (args are for source and destination).
  33866. var drawImageIOSFix = function drawImageIOSFix(ctx, img, sx, sy, sw, sh, dx, dy, dw, dh) {
  33867. var vertSquashRatio = detectVerticalSquash(img);
  33868. return ctx.drawImage(img, sx, sy, sw, sh, dx, dy, dw, dh / vertSquashRatio);
  33869. }; // Based on MinifyJpeg
  33870. // Source: http://www.perry.cz/files/ExifRestorer.js
  33871. // http://elicon.blog57.fc2.com/blog-entry-206.html
  33872. var ExifRestore = /*#__PURE__*/function () {
  33873. function ExifRestore() {
  33874. dropzone_classCallCheck(this, ExifRestore);
  33875. }
  33876. dropzone_createClass(ExifRestore, null, [{
  33877. key: "initClass",
  33878. value: function initClass() {
  33879. this.KEY_STR = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
  33880. }
  33881. }, {
  33882. key: "encode64",
  33883. value: function encode64(input) {
  33884. var output = "";
  33885. var chr1 = undefined;
  33886. var chr2 = undefined;
  33887. var chr3 = "";
  33888. var enc1 = undefined;
  33889. var enc2 = undefined;
  33890. var enc3 = undefined;
  33891. var enc4 = "";
  33892. var i = 0;
  33893. while (true) {
  33894. chr1 = input[i++];
  33895. chr2 = input[i++];
  33896. chr3 = input[i++];
  33897. enc1 = chr1 >> 2;
  33898. enc2 = (chr1 & 3) << 4 | chr2 >> 4;
  33899. enc3 = (chr2 & 15) << 2 | chr3 >> 6;
  33900. enc4 = chr3 & 63;
  33901. if (isNaN(chr2)) {
  33902. enc3 = enc4 = 64;
  33903. } else if (isNaN(chr3)) {
  33904. enc4 = 64;
  33905. }
  33906. output = output + this.KEY_STR.charAt(enc1) + this.KEY_STR.charAt(enc2) + this.KEY_STR.charAt(enc3) + this.KEY_STR.charAt(enc4);
  33907. chr1 = chr2 = chr3 = "";
  33908. enc1 = enc2 = enc3 = enc4 = "";
  33909. if (!(i < input.length)) {
  33910. break;
  33911. }
  33912. }
  33913. return output;
  33914. }
  33915. }, {
  33916. key: "restore",
  33917. value: function restore(origFileBase64, resizedFileBase64) {
  33918. if (!origFileBase64.match("data:image/jpeg;base64,")) {
  33919. return resizedFileBase64;
  33920. }
  33921. var rawImage = this.decode64(origFileBase64.replace("data:image/jpeg;base64,", ""));
  33922. var segments = this.slice2Segments(rawImage);
  33923. var image = this.exifManipulation(resizedFileBase64, segments);
  33924. return "data:image/jpeg;base64,".concat(this.encode64(image));
  33925. }
  33926. }, {
  33927. key: "exifManipulation",
  33928. value: function exifManipulation(resizedFileBase64, segments) {
  33929. var exifArray = this.getExifArray(segments);
  33930. var newImageArray = this.insertExif(resizedFileBase64, exifArray);
  33931. var aBuffer = new Uint8Array(newImageArray);
  33932. return aBuffer;
  33933. }
  33934. }, {
  33935. key: "getExifArray",
  33936. value: function getExifArray(segments) {
  33937. var seg = undefined;
  33938. var x = 0;
  33939. while (x < segments.length) {
  33940. seg = segments[x];
  33941. if (seg[0] === 255 & seg[1] === 225) {
  33942. return seg;
  33943. }
  33944. x++;
  33945. }
  33946. return [];
  33947. }
  33948. }, {
  33949. key: "insertExif",
  33950. value: function insertExif(resizedFileBase64, exifArray) {
  33951. var imageData = resizedFileBase64.replace("data:image/jpeg;base64,", "");
  33952. var buf = this.decode64(imageData);
  33953. var separatePoint = buf.indexOf(255, 3);
  33954. var mae = buf.slice(0, separatePoint);
  33955. var ato = buf.slice(separatePoint);
  33956. var array = mae;
  33957. array = array.concat(exifArray);
  33958. array = array.concat(ato);
  33959. return array;
  33960. }
  33961. }, {
  33962. key: "slice2Segments",
  33963. value: function slice2Segments(rawImageArray) {
  33964. var head = 0;
  33965. var segments = [];
  33966. while (true) {
  33967. var length;
  33968. if (rawImageArray[head] === 255 & rawImageArray[head + 1] === 218) {
  33969. break;
  33970. }
  33971. if (rawImageArray[head] === 255 & rawImageArray[head + 1] === 216) {
  33972. head += 2;
  33973. } else {
  33974. length = rawImageArray[head + 2] * 256 + rawImageArray[head + 3];
  33975. var endPoint = head + length + 2;
  33976. var seg = rawImageArray.slice(head, endPoint);
  33977. segments.push(seg);
  33978. head = endPoint;
  33979. }
  33980. if (head > rawImageArray.length) {
  33981. break;
  33982. }
  33983. }
  33984. return segments;
  33985. }
  33986. }, {
  33987. key: "decode64",
  33988. value: function decode64(input) {
  33989. var output = "";
  33990. var chr1 = undefined;
  33991. var chr2 = undefined;
  33992. var chr3 = "";
  33993. var enc1 = undefined;
  33994. var enc2 = undefined;
  33995. var enc3 = undefined;
  33996. var enc4 = "";
  33997. var i = 0;
  33998. var buf = []; // remove all characters that are not A-Z, a-z, 0-9, +, /, or =
  33999. var base64test = /[^A-Za-z0-9\+\/\=]/g;
  34000. if (base64test.exec(input)) {
  34001. console.warn("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding.");
  34002. }
  34003. input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
  34004. while (true) {
  34005. enc1 = this.KEY_STR.indexOf(input.charAt(i++));
  34006. enc2 = this.KEY_STR.indexOf(input.charAt(i++));
  34007. enc3 = this.KEY_STR.indexOf(input.charAt(i++));
  34008. enc4 = this.KEY_STR.indexOf(input.charAt(i++));
  34009. chr1 = enc1 << 2 | enc2 >> 4;
  34010. chr2 = (enc2 & 15) << 4 | enc3 >> 2;
  34011. chr3 = (enc3 & 3) << 6 | enc4;
  34012. buf.push(chr1);
  34013. if (enc3 !== 64) {
  34014. buf.push(chr2);
  34015. }
  34016. if (enc4 !== 64) {
  34017. buf.push(chr3);
  34018. }
  34019. chr1 = chr2 = chr3 = "";
  34020. enc1 = enc2 = enc3 = enc4 = "";
  34021. if (!(i < input.length)) {
  34022. break;
  34023. }
  34024. }
  34025. return buf;
  34026. }
  34027. }]);
  34028. return ExifRestore;
  34029. }();
  34030. ExifRestore.initClass();
  34031. /*
  34032. * contentloaded.js
  34033. *
  34034. * Author: Diego Perini (diego.perini at gmail.com)
  34035. * Summary: cross-browser wrapper for DOMContentLoaded
  34036. * Updated: 20101020
  34037. * License: MIT
  34038. * Version: 1.2
  34039. *
  34040. * URL:
  34041. * http://javascript.nwbox.com/ContentLoaded/
  34042. * http://javascript.nwbox.com/ContentLoaded/MIT-LICENSE
  34043. */
  34044. // @win window reference
  34045. // @fn function reference
  34046. var contentLoaded = function contentLoaded(win, fn) {
  34047. var done = false;
  34048. var top = true;
  34049. var doc = win.document;
  34050. var root = doc.documentElement;
  34051. var add = doc.addEventListener ? "addEventListener" : "attachEvent";
  34052. var rem = doc.addEventListener ? "removeEventListener" : "detachEvent";
  34053. var pre = doc.addEventListener ? "" : "on";
  34054. var init = function init(e) {
  34055. if (e.type === "readystatechange" && doc.readyState !== "complete") {
  34056. return;
  34057. }
  34058. (e.type === "load" ? win : doc)[rem](pre + e.type, init, false);
  34059. if (!done && (done = true)) {
  34060. return fn.call(win, e.type || e);
  34061. }
  34062. };
  34063. var poll = function poll() {
  34064. try {
  34065. root.doScroll("left");
  34066. } catch (e) {
  34067. setTimeout(poll, 50);
  34068. return;
  34069. }
  34070. return init("poll");
  34071. };
  34072. if (doc.readyState !== "complete") {
  34073. if (doc.createEventObject && root.doScroll) {
  34074. try {
  34075. top = !win.frameElement;
  34076. } catch (error) {}
  34077. if (top) {
  34078. poll();
  34079. }
  34080. }
  34081. doc[add](pre + "DOMContentLoaded", init, false);
  34082. doc[add](pre + "readystatechange", init, false);
  34083. return win[add](pre + "load", init, false);
  34084. }
  34085. }; // As a single function to be able to write tests.
  34086. Dropzone._autoDiscoverFunction = function () {
  34087. if (Dropzone.autoDiscover) {
  34088. return Dropzone.discover();
  34089. }
  34090. };
  34091. contentLoaded(window, Dropzone._autoDiscoverFunction);
  34092. function __guard__(value, transform) {
  34093. return typeof value !== "undefined" && value !== null ? transform(value) : undefined;
  34094. }
  34095. function __guardMethod__(obj, methodName, transform) {
  34096. if (typeof obj !== "undefined" && obj !== null && typeof obj[methodName] === "function") {
  34097. return transform(obj, methodName);
  34098. } else {
  34099. return undefined;
  34100. }
  34101. }
  34102. ;// CONCATENATED MODULE: ./tool/dropzone.dist.js
  34103. /// Make Dropzone a global variable.
  34104. window.Dropzone = Dropzone;
  34105. /* harmony default export */ var dropzone_dist = (Dropzone);
  34106. }();
  34107. /******/ return __webpack_exports__;
  34108. /******/ })()
  34109. ;
  34110. });
  34111. /***/ }),
  34112. /***/ 26729:
  34113. /***/ ((module) => {
  34114. "use strict";
  34115. var has = Object.prototype.hasOwnProperty
  34116. , prefix = '~';
  34117. /**
  34118. * Constructor to create a storage for our `EE` objects.
  34119. * An `Events` instance is a plain object whose properties are event names.
  34120. *
  34121. * @constructor
  34122. * @private
  34123. */
  34124. function Events() {}
  34125. //
  34126. // We try to not inherit from `Object.prototype`. In some engines creating an
  34127. // instance in this way is faster than calling `Object.create(null)` directly.
  34128. // If `Object.create(null)` is not supported we prefix the event names with a
  34129. // character to make sure that the built-in object properties are not
  34130. // overridden or used as an attack vector.
  34131. //
  34132. if (Object.create) {
  34133. Events.prototype = Object.create(null);
  34134. //
  34135. // This hack is needed because the `__proto__` property is still inherited in
  34136. // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.
  34137. //
  34138. if (!new Events().__proto__) prefix = false;
  34139. }
  34140. /**
  34141. * Representation of a single event listener.
  34142. *
  34143. * @param {Function} fn The listener function.
  34144. * @param {*} context The context to invoke the listener with.
  34145. * @param {Boolean} [once=false] Specify if the listener is a one-time listener.
  34146. * @constructor
  34147. * @private
  34148. */
  34149. function EE(fn, context, once) {
  34150. this.fn = fn;
  34151. this.context = context;
  34152. this.once = once || false;
  34153. }
  34154. /**
  34155. * Add a listener for a given event.
  34156. *
  34157. * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
  34158. * @param {(String|Symbol)} event The event name.
  34159. * @param {Function} fn The listener function.
  34160. * @param {*} context The context to invoke the listener with.
  34161. * @param {Boolean} once Specify if the listener is a one-time listener.
  34162. * @returns {EventEmitter}
  34163. * @private
  34164. */
  34165. function addListener(emitter, event, fn, context, once) {
  34166. if (typeof fn !== 'function') {
  34167. throw new TypeError('The listener must be a function');
  34168. }
  34169. var listener = new EE(fn, context || emitter, once)
  34170. , evt = prefix ? prefix + event : event;
  34171. if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;
  34172. else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);
  34173. else emitter._events[evt] = [emitter._events[evt], listener];
  34174. return emitter;
  34175. }
  34176. /**
  34177. * Clear event by name.
  34178. *
  34179. * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
  34180. * @param {(String|Symbol)} evt The Event name.
  34181. * @private
  34182. */
  34183. function clearEvent(emitter, evt) {
  34184. if (--emitter._eventsCount === 0) emitter._events = new Events();
  34185. else delete emitter._events[evt];
  34186. }
  34187. /**
  34188. * Minimal `EventEmitter` interface that is molded against the Node.js
  34189. * `EventEmitter` interface.
  34190. *
  34191. * @constructor
  34192. * @public
  34193. */
  34194. function EventEmitter() {
  34195. this._events = new Events();
  34196. this._eventsCount = 0;
  34197. }
  34198. /**
  34199. * Return an array listing the events for which the emitter has registered
  34200. * listeners.
  34201. *
  34202. * @returns {Array}
  34203. * @public
  34204. */
  34205. EventEmitter.prototype.eventNames = function eventNames() {
  34206. var names = []
  34207. , events
  34208. , name;
  34209. if (this._eventsCount === 0) return names;
  34210. for (name in (events = this._events)) {
  34211. if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);
  34212. }
  34213. if (Object.getOwnPropertySymbols) {
  34214. return names.concat(Object.getOwnPropertySymbols(events));
  34215. }
  34216. return names;
  34217. };
  34218. /**
  34219. * Return the listeners registered for a given event.
  34220. *
  34221. * @param {(String|Symbol)} event The event name.
  34222. * @returns {Array} The registered listeners.
  34223. * @public
  34224. */
  34225. EventEmitter.prototype.listeners = function listeners(event) {
  34226. var evt = prefix ? prefix + event : event
  34227. , handlers = this._events[evt];
  34228. if (!handlers) return [];
  34229. if (handlers.fn) return [handlers.fn];
  34230. for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {
  34231. ee[i] = handlers[i].fn;
  34232. }
  34233. return ee;
  34234. };
  34235. /**
  34236. * Return the number of listeners listening to a given event.
  34237. *
  34238. * @param {(String|Symbol)} event The event name.
  34239. * @returns {Number} The number of listeners.
  34240. * @public
  34241. */
  34242. EventEmitter.prototype.listenerCount = function listenerCount(event) {
  34243. var evt = prefix ? prefix + event : event
  34244. , listeners = this._events[evt];
  34245. if (!listeners) return 0;
  34246. if (listeners.fn) return 1;
  34247. return listeners.length;
  34248. };
  34249. /**
  34250. * Calls each of the listeners registered for a given event.
  34251. *
  34252. * @param {(String|Symbol)} event The event name.
  34253. * @returns {Boolean} `true` if the event had listeners, else `false`.
  34254. * @public
  34255. */
  34256. EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
  34257. var evt = prefix ? prefix + event : event;
  34258. if (!this._events[evt]) return false;
  34259. var listeners = this._events[evt]
  34260. , len = arguments.length
  34261. , args
  34262. , i;
  34263. if (listeners.fn) {
  34264. if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);
  34265. switch (len) {
  34266. case 1: return listeners.fn.call(listeners.context), true;
  34267. case 2: return listeners.fn.call(listeners.context, a1), true;
  34268. case 3: return listeners.fn.call(listeners.context, a1, a2), true;
  34269. case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;
  34270. case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;
  34271. case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
  34272. }
  34273. for (i = 1, args = new Array(len -1); i < len; i++) {
  34274. args[i - 1] = arguments[i];
  34275. }
  34276. listeners.fn.apply(listeners.context, args);
  34277. } else {
  34278. var length = listeners.length
  34279. , j;
  34280. for (i = 0; i < length; i++) {
  34281. if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);
  34282. switch (len) {
  34283. case 1: listeners[i].fn.call(listeners[i].context); break;
  34284. case 2: listeners[i].fn.call(listeners[i].context, a1); break;
  34285. case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;
  34286. case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;
  34287. default:
  34288. if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {
  34289. args[j - 1] = arguments[j];
  34290. }
  34291. listeners[i].fn.apply(listeners[i].context, args);
  34292. }
  34293. }
  34294. }
  34295. return true;
  34296. };
  34297. /**
  34298. * Add a listener for a given event.
  34299. *
  34300. * @param {(String|Symbol)} event The event name.
  34301. * @param {Function} fn The listener function.
  34302. * @param {*} [context=this] The context to invoke the listener with.
  34303. * @returns {EventEmitter} `this`.
  34304. * @public
  34305. */
  34306. EventEmitter.prototype.on = function on(event, fn, context) {
  34307. return addListener(this, event, fn, context, false);
  34308. };
  34309. /**
  34310. * Add a one-time listener for a given event.
  34311. *
  34312. * @param {(String|Symbol)} event The event name.
  34313. * @param {Function} fn The listener function.
  34314. * @param {*} [context=this] The context to invoke the listener with.
  34315. * @returns {EventEmitter} `this`.
  34316. * @public
  34317. */
  34318. EventEmitter.prototype.once = function once(event, fn, context) {
  34319. return addListener(this, event, fn, context, true);
  34320. };
  34321. /**
  34322. * Remove the listeners of a given event.
  34323. *
  34324. * @param {(String|Symbol)} event The event name.
  34325. * @param {Function} fn Only remove the listeners that match this function.
  34326. * @param {*} context Only remove the listeners that have this context.
  34327. * @param {Boolean} once Only remove one-time listeners.
  34328. * @returns {EventEmitter} `this`.
  34329. * @public
  34330. */
  34331. EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {
  34332. var evt = prefix ? prefix + event : event;
  34333. if (!this._events[evt]) return this;
  34334. if (!fn) {
  34335. clearEvent(this, evt);
  34336. return this;
  34337. }
  34338. var listeners = this._events[evt];
  34339. if (listeners.fn) {
  34340. if (
  34341. listeners.fn === fn &&
  34342. (!once || listeners.once) &&
  34343. (!context || listeners.context === context)
  34344. ) {
  34345. clearEvent(this, evt);
  34346. }
  34347. } else {
  34348. for (var i = 0, events = [], length = listeners.length; i < length; i++) {
  34349. if (
  34350. listeners[i].fn !== fn ||
  34351. (once && !listeners[i].once) ||
  34352. (context && listeners[i].context !== context)
  34353. ) {
  34354. events.push(listeners[i]);
  34355. }
  34356. }
  34357. //
  34358. // Reset the array, or remove it completely if we have no more listeners.
  34359. //
  34360. if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;
  34361. else clearEvent(this, evt);
  34362. }
  34363. return this;
  34364. };
  34365. /**
  34366. * Remove all listeners, or those of the specified event.
  34367. *
  34368. * @param {(String|Symbol)} [event] The event name.
  34369. * @returns {EventEmitter} `this`.
  34370. * @public
  34371. */
  34372. EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {
  34373. var evt;
  34374. if (event) {
  34375. evt = prefix ? prefix + event : event;
  34376. if (this._events[evt]) clearEvent(this, evt);
  34377. } else {
  34378. this._events = new Events();
  34379. this._eventsCount = 0;
  34380. }
  34381. return this;
  34382. };
  34383. //
  34384. // Alias methods names because people roll like that.
  34385. //
  34386. EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
  34387. EventEmitter.prototype.addListener = EventEmitter.prototype.on;
  34388. //
  34389. // Expose the prefix.
  34390. //
  34391. EventEmitter.prefixed = prefix;
  34392. //
  34393. // Allow `EventEmitter` to be imported as module namespace.
  34394. //
  34395. EventEmitter.EventEmitter = EventEmitter;
  34396. //
  34397. // Expose the module.
  34398. //
  34399. if (true) {
  34400. module.exports = EventEmitter;
  34401. }
  34402. /***/ }),
  34403. /***/ 17187:
  34404. /***/ ((module) => {
  34405. "use strict";
  34406. // Copyright Joyent, Inc. and other Node contributors.
  34407. //
  34408. // Permission is hereby granted, free of charge, to any person obtaining a
  34409. // copy of this software and associated documentation files (the
  34410. // "Software"), to deal in the Software without restriction, including
  34411. // without limitation the rights to use, copy, modify, merge, publish,
  34412. // distribute, sublicense, and/or sell copies of the Software, and to permit
  34413. // persons to whom the Software is furnished to do so, subject to the
  34414. // following conditions:
  34415. //
  34416. // The above copyright notice and this permission notice shall be included
  34417. // in all copies or substantial portions of the Software.
  34418. //
  34419. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  34420. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  34421. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  34422. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  34423. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  34424. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  34425. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  34426. var R = typeof Reflect === 'object' ? Reflect : null
  34427. var ReflectApply = R && typeof R.apply === 'function'
  34428. ? R.apply
  34429. : function ReflectApply(target, receiver, args) {
  34430. return Function.prototype.apply.call(target, receiver, args);
  34431. }
  34432. var ReflectOwnKeys
  34433. if (R && typeof R.ownKeys === 'function') {
  34434. ReflectOwnKeys = R.ownKeys
  34435. } else if (Object.getOwnPropertySymbols) {
  34436. ReflectOwnKeys = function ReflectOwnKeys(target) {
  34437. return Object.getOwnPropertyNames(target)
  34438. .concat(Object.getOwnPropertySymbols(target));
  34439. };
  34440. } else {
  34441. ReflectOwnKeys = function ReflectOwnKeys(target) {
  34442. return Object.getOwnPropertyNames(target);
  34443. };
  34444. }
  34445. function ProcessEmitWarning(warning) {
  34446. if (console && console.warn) console.warn(warning);
  34447. }
  34448. var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {
  34449. return value !== value;
  34450. }
  34451. function EventEmitter() {
  34452. EventEmitter.init.call(this);
  34453. }
  34454. module.exports = EventEmitter;
  34455. module.exports.once = once;
  34456. // Backwards-compat with node 0.10.x
  34457. EventEmitter.EventEmitter = EventEmitter;
  34458. EventEmitter.prototype._events = undefined;
  34459. EventEmitter.prototype._eventsCount = 0;
  34460. EventEmitter.prototype._maxListeners = undefined;
  34461. // By default EventEmitters will print a warning if more than 10 listeners are
  34462. // added to it. This is a useful default which helps finding memory leaks.
  34463. var defaultMaxListeners = 10;
  34464. function checkListener(listener) {
  34465. if (typeof listener !== 'function') {
  34466. throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
  34467. }
  34468. }
  34469. Object.defineProperty(EventEmitter, 'defaultMaxListeners', {
  34470. enumerable: true,
  34471. get: function() {
  34472. return defaultMaxListeners;
  34473. },
  34474. set: function(arg) {
  34475. if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {
  34476. throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.');
  34477. }
  34478. defaultMaxListeners = arg;
  34479. }
  34480. });
  34481. EventEmitter.init = function() {
  34482. if (this._events === undefined ||
  34483. this._events === Object.getPrototypeOf(this)._events) {
  34484. this._events = Object.create(null);
  34485. this._eventsCount = 0;
  34486. }
  34487. this._maxListeners = this._maxListeners || undefined;
  34488. };
  34489. // Obviously not all Emitters should be limited to 10. This function allows
  34490. // that to be increased. Set to zero for unlimited.
  34491. EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
  34492. if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {
  34493. throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.');
  34494. }
  34495. this._maxListeners = n;
  34496. return this;
  34497. };
  34498. function _getMaxListeners(that) {
  34499. if (that._maxListeners === undefined)
  34500. return EventEmitter.defaultMaxListeners;
  34501. return that._maxListeners;
  34502. }
  34503. EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
  34504. return _getMaxListeners(this);
  34505. };
  34506. EventEmitter.prototype.emit = function emit(type) {
  34507. var args = [];
  34508. for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);
  34509. var doError = (type === 'error');
  34510. var events = this._events;
  34511. if (events !== undefined)
  34512. doError = (doError && events.error === undefined);
  34513. else if (!doError)
  34514. return false;
  34515. // If there is no 'error' event listener then throw.
  34516. if (doError) {
  34517. var er;
  34518. if (args.length > 0)
  34519. er = args[0];
  34520. if (er instanceof Error) {
  34521. // Note: The comments on the `throw` lines are intentional, they show
  34522. // up in Node's output if this results in an unhandled exception.
  34523. throw er; // Unhandled 'error' event
  34524. }
  34525. // At least give some kind of context to the user
  34526. var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));
  34527. err.context = er;
  34528. throw err; // Unhandled 'error' event
  34529. }
  34530. var handler = events[type];
  34531. if (handler === undefined)
  34532. return false;
  34533. if (typeof handler === 'function') {
  34534. ReflectApply(handler, this, args);
  34535. } else {
  34536. var len = handler.length;
  34537. var listeners = arrayClone(handler, len);
  34538. for (var i = 0; i < len; ++i)
  34539. ReflectApply(listeners[i], this, args);
  34540. }
  34541. return true;
  34542. };
  34543. function _addListener(target, type, listener, prepend) {
  34544. var m;
  34545. var events;
  34546. var existing;
  34547. checkListener(listener);
  34548. events = target._events;
  34549. if (events === undefined) {
  34550. events = target._events = Object.create(null);
  34551. target._eventsCount = 0;
  34552. } else {
  34553. // To avoid recursion in the case that type === "newListener"! Before
  34554. // adding it to the listeners, first emit "newListener".
  34555. if (events.newListener !== undefined) {
  34556. target.emit('newListener', type,
  34557. listener.listener ? listener.listener : listener);
  34558. // Re-assign `events` because a newListener handler could have caused the
  34559. // this._events to be assigned to a new object
  34560. events = target._events;
  34561. }
  34562. existing = events[type];
  34563. }
  34564. if (existing === undefined) {
  34565. // Optimize the case of one listener. Don't need the extra array object.
  34566. existing = events[type] = listener;
  34567. ++target._eventsCount;
  34568. } else {
  34569. if (typeof existing === 'function') {
  34570. // Adding the second element, need to change to array.
  34571. existing = events[type] =
  34572. prepend ? [listener, existing] : [existing, listener];
  34573. // If we've already got an array, just append.
  34574. } else if (prepend) {
  34575. existing.unshift(listener);
  34576. } else {
  34577. existing.push(listener);
  34578. }
  34579. // Check for listener leak
  34580. m = _getMaxListeners(target);
  34581. if (m > 0 && existing.length > m && !existing.warned) {
  34582. existing.warned = true;
  34583. // No error code for this since it is a Warning
  34584. // eslint-disable-next-line no-restricted-syntax
  34585. var w = new Error('Possible EventEmitter memory leak detected. ' +
  34586. existing.length + ' ' + String(type) + ' listeners ' +
  34587. 'added. Use emitter.setMaxListeners() to ' +
  34588. 'increase limit');
  34589. w.name = 'MaxListenersExceededWarning';
  34590. w.emitter = target;
  34591. w.type = type;
  34592. w.count = existing.length;
  34593. ProcessEmitWarning(w);
  34594. }
  34595. }
  34596. return target;
  34597. }
  34598. EventEmitter.prototype.addListener = function addListener(type, listener) {
  34599. return _addListener(this, type, listener, false);
  34600. };
  34601. EventEmitter.prototype.on = EventEmitter.prototype.addListener;
  34602. EventEmitter.prototype.prependListener =
  34603. function prependListener(type, listener) {
  34604. return _addListener(this, type, listener, true);
  34605. };
  34606. function onceWrapper() {
  34607. if (!this.fired) {
  34608. this.target.removeListener(this.type, this.wrapFn);
  34609. this.fired = true;
  34610. if (arguments.length === 0)
  34611. return this.listener.call(this.target);
  34612. return this.listener.apply(this.target, arguments);
  34613. }
  34614. }
  34615. function _onceWrap(target, type, listener) {
  34616. var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };
  34617. var wrapped = onceWrapper.bind(state);
  34618. wrapped.listener = listener;
  34619. state.wrapFn = wrapped;
  34620. return wrapped;
  34621. }
  34622. EventEmitter.prototype.once = function once(type, listener) {
  34623. checkListener(listener);
  34624. this.on(type, _onceWrap(this, type, listener));
  34625. return this;
  34626. };
  34627. EventEmitter.prototype.prependOnceListener =
  34628. function prependOnceListener(type, listener) {
  34629. checkListener(listener);
  34630. this.prependListener(type, _onceWrap(this, type, listener));
  34631. return this;
  34632. };
  34633. // Emits a 'removeListener' event if and only if the listener was removed.
  34634. EventEmitter.prototype.removeListener =
  34635. function removeListener(type, listener) {
  34636. var list, events, position, i, originalListener;
  34637. checkListener(listener);
  34638. events = this._events;
  34639. if (events === undefined)
  34640. return this;
  34641. list = events[type];
  34642. if (list === undefined)
  34643. return this;
  34644. if (list === listener || list.listener === listener) {
  34645. if (--this._eventsCount === 0)
  34646. this._events = Object.create(null);
  34647. else {
  34648. delete events[type];
  34649. if (events.removeListener)
  34650. this.emit('removeListener', type, list.listener || listener);
  34651. }
  34652. } else if (typeof list !== 'function') {
  34653. position = -1;
  34654. for (i = list.length - 1; i >= 0; i--) {
  34655. if (list[i] === listener || list[i].listener === listener) {
  34656. originalListener = list[i].listener;
  34657. position = i;
  34658. break;
  34659. }
  34660. }
  34661. if (position < 0)
  34662. return this;
  34663. if (position === 0)
  34664. list.shift();
  34665. else {
  34666. spliceOne(list, position);
  34667. }
  34668. if (list.length === 1)
  34669. events[type] = list[0];
  34670. if (events.removeListener !== undefined)
  34671. this.emit('removeListener', type, originalListener || listener);
  34672. }
  34673. return this;
  34674. };
  34675. EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
  34676. EventEmitter.prototype.removeAllListeners =
  34677. function removeAllListeners(type) {
  34678. var listeners, events, i;
  34679. events = this._events;
  34680. if (events === undefined)
  34681. return this;
  34682. // not listening for removeListener, no need to emit
  34683. if (events.removeListener === undefined) {
  34684. if (arguments.length === 0) {
  34685. this._events = Object.create(null);
  34686. this._eventsCount = 0;
  34687. } else if (events[type] !== undefined) {
  34688. if (--this._eventsCount === 0)
  34689. this._events = Object.create(null);
  34690. else
  34691. delete events[type];
  34692. }
  34693. return this;
  34694. }
  34695. // emit removeListener for all listeners on all events
  34696. if (arguments.length === 0) {
  34697. var keys = Object.keys(events);
  34698. var key;
  34699. for (i = 0; i < keys.length; ++i) {
  34700. key = keys[i];
  34701. if (key === 'removeListener') continue;
  34702. this.removeAllListeners(key);
  34703. }
  34704. this.removeAllListeners('removeListener');
  34705. this._events = Object.create(null);
  34706. this._eventsCount = 0;
  34707. return this;
  34708. }
  34709. listeners = events[type];
  34710. if (typeof listeners === 'function') {
  34711. this.removeListener(type, listeners);
  34712. } else if (listeners !== undefined) {
  34713. // LIFO order
  34714. for (i = listeners.length - 1; i >= 0; i--) {
  34715. this.removeListener(type, listeners[i]);
  34716. }
  34717. }
  34718. return this;
  34719. };
  34720. function _listeners(target, type, unwrap) {
  34721. var events = target._events;
  34722. if (events === undefined)
  34723. return [];
  34724. var evlistener = events[type];
  34725. if (evlistener === undefined)
  34726. return [];
  34727. if (typeof evlistener === 'function')
  34728. return unwrap ? [evlistener.listener || evlistener] : [evlistener];
  34729. return unwrap ?
  34730. unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
  34731. }
  34732. EventEmitter.prototype.listeners = function listeners(type) {
  34733. return _listeners(this, type, true);
  34734. };
  34735. EventEmitter.prototype.rawListeners = function rawListeners(type) {
  34736. return _listeners(this, type, false);
  34737. };
  34738. EventEmitter.listenerCount = function(emitter, type) {
  34739. if (typeof emitter.listenerCount === 'function') {
  34740. return emitter.listenerCount(type);
  34741. } else {
  34742. return listenerCount.call(emitter, type);
  34743. }
  34744. };
  34745. EventEmitter.prototype.listenerCount = listenerCount;
  34746. function listenerCount(type) {
  34747. var events = this._events;
  34748. if (events !== undefined) {
  34749. var evlistener = events[type];
  34750. if (typeof evlistener === 'function') {
  34751. return 1;
  34752. } else if (evlistener !== undefined) {
  34753. return evlistener.length;
  34754. }
  34755. }
  34756. return 0;
  34757. }
  34758. EventEmitter.prototype.eventNames = function eventNames() {
  34759. return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
  34760. };
  34761. function arrayClone(arr, n) {
  34762. var copy = new Array(n);
  34763. for (var i = 0; i < n; ++i)
  34764. copy[i] = arr[i];
  34765. return copy;
  34766. }
  34767. function spliceOne(list, index) {
  34768. for (; index + 1 < list.length; index++)
  34769. list[index] = list[index + 1];
  34770. list.pop();
  34771. }
  34772. function unwrapListeners(arr) {
  34773. var ret = new Array(arr.length);
  34774. for (var i = 0; i < ret.length; ++i) {
  34775. ret[i] = arr[i].listener || arr[i];
  34776. }
  34777. return ret;
  34778. }
  34779. function once(emitter, name) {
  34780. return new Promise(function (resolve, reject) {
  34781. function errorListener(err) {
  34782. emitter.removeListener(name, resolver);
  34783. reject(err);
  34784. }
  34785. function resolver() {
  34786. if (typeof emitter.removeListener === 'function') {
  34787. emitter.removeListener('error', errorListener);
  34788. }
  34789. resolve([].slice.call(arguments));
  34790. };
  34791. eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });
  34792. if (name !== 'error') {
  34793. addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });
  34794. }
  34795. });
  34796. }
  34797. function addErrorHandlerIfEventEmitter(emitter, handler, flags) {
  34798. if (typeof emitter.on === 'function') {
  34799. eventTargetAgnosticAddListener(emitter, 'error', handler, flags);
  34800. }
  34801. }
  34802. function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
  34803. if (typeof emitter.on === 'function') {
  34804. if (flags.once) {
  34805. emitter.once(name, listener);
  34806. } else {
  34807. emitter.on(name, listener);
  34808. }
  34809. } else if (typeof emitter.addEventListener === 'function') {
  34810. // EventTarget does not have `error` event semantics like Node
  34811. // EventEmitters, we do not listen for `error` events here.
  34812. emitter.addEventListener(name, function wrapListener(arg) {
  34813. // IE does not have builtin `{ once: true }` support so we
  34814. // have to do it manually.
  34815. if (flags.once) {
  34816. emitter.removeEventListener(name, wrapListener);
  34817. }
  34818. listener(arg);
  34819. });
  34820. } else {
  34821. throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
  34822. }
  34823. }
  34824. /***/ }),
  34825. /***/ 35369:
  34826. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  34827. "use strict";
  34828. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  34829. /* harmony export */ "ZP": () => (__WEBPACK_DEFAULT_EXPORT__)
  34830. /* harmony export */ });
  34831. /* unused harmony exports Collection, Iterable, List, Map, OrderedMap, OrderedSet, Range, Record, Repeat, Seq, Set, Stack, fromJS, get, getIn, has, hasIn, hash, is, isAssociative, isCollection, isImmutable, isIndexed, isKeyed, isList, isMap, isOrdered, isOrderedMap, isOrderedSet, isPlainObject, isRecord, isSeq, isSet, isStack, isValueObject, merge, mergeDeep, mergeDeepWith, mergeWith, remove, removeIn, set, setIn, update, updateIn, version */
  34832. /**
  34833. * MIT License
  34834. *
  34835. * Copyright (c) 2014-present, Lee Byron and other contributors.
  34836. *
  34837. * Permission is hereby granted, free of charge, to any person obtaining a copy
  34838. * of this software and associated documentation files (the "Software"), to deal
  34839. * in the Software without restriction, including without limitation the rights
  34840. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  34841. * copies of the Software, and to permit persons to whom the Software is
  34842. * furnished to do so, subject to the following conditions:
  34843. *
  34844. * The above copyright notice and this permission notice shall be included in all
  34845. * copies or substantial portions of the Software.
  34846. *
  34847. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  34848. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  34849. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  34850. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  34851. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  34852. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  34853. * SOFTWARE.
  34854. */
  34855. var DELETE = 'delete';
  34856. // Constants describing the size of trie nodes.
  34857. var SHIFT = 5; // Resulted in best performance after ______?
  34858. var SIZE = 1 << SHIFT;
  34859. var MASK = SIZE - 1;
  34860. // A consistent shared value representing "not set" which equals nothing other
  34861. // than itself, and nothing that could be provided externally.
  34862. var NOT_SET = {};
  34863. // Boolean references, Rough equivalent of `bool &`.
  34864. function MakeRef() {
  34865. return { value: false };
  34866. }
  34867. function SetRef(ref) {
  34868. if (ref) {
  34869. ref.value = true;
  34870. }
  34871. }
  34872. // A function which returns a value representing an "owner" for transient writes
  34873. // to tries. The return value will only ever equal itself, and will not equal
  34874. // the return of any subsequent call of this function.
  34875. function OwnerID() {}
  34876. function ensureSize(iter) {
  34877. if (iter.size === undefined) {
  34878. iter.size = iter.__iterate(returnTrue);
  34879. }
  34880. return iter.size;
  34881. }
  34882. function wrapIndex(iter, index) {
  34883. // This implements "is array index" which the ECMAString spec defines as:
  34884. //
  34885. // A String property name P is an array index if and only if
  34886. // ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal
  34887. // to 2^32−1.
  34888. //
  34889. // http://www.ecma-international.org/ecma-262/6.0/#sec-array-exotic-objects
  34890. if (typeof index !== 'number') {
  34891. var uint32Index = index >>> 0; // N >>> 0 is shorthand for ToUint32
  34892. if ('' + uint32Index !== index || uint32Index === 4294967295) {
  34893. return NaN;
  34894. }
  34895. index = uint32Index;
  34896. }
  34897. return index < 0 ? ensureSize(iter) + index : index;
  34898. }
  34899. function returnTrue() {
  34900. return true;
  34901. }
  34902. function wholeSlice(begin, end, size) {
  34903. return (
  34904. ((begin === 0 && !isNeg(begin)) ||
  34905. (size !== undefined && begin <= -size)) &&
  34906. (end === undefined || (size !== undefined && end >= size))
  34907. );
  34908. }
  34909. function resolveBegin(begin, size) {
  34910. return resolveIndex(begin, size, 0);
  34911. }
  34912. function resolveEnd(end, size) {
  34913. return resolveIndex(end, size, size);
  34914. }
  34915. function resolveIndex(index, size, defaultIndex) {
  34916. // Sanitize indices using this shorthand for ToInt32(argument)
  34917. // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32
  34918. return index === undefined
  34919. ? defaultIndex
  34920. : isNeg(index)
  34921. ? size === Infinity
  34922. ? size
  34923. : Math.max(0, size + index) | 0
  34924. : size === undefined || size === index
  34925. ? index
  34926. : Math.min(size, index) | 0;
  34927. }
  34928. function isNeg(value) {
  34929. // Account for -0 which is negative, but not less than 0.
  34930. return value < 0 || (value === 0 && 1 / value === -Infinity);
  34931. }
  34932. var IS_COLLECTION_SYMBOL = '@@__IMMUTABLE_ITERABLE__@@';
  34933. function isCollection(maybeCollection) {
  34934. return Boolean(maybeCollection && maybeCollection[IS_COLLECTION_SYMBOL]);
  34935. }
  34936. var IS_KEYED_SYMBOL = '@@__IMMUTABLE_KEYED__@@';
  34937. function isKeyed(maybeKeyed) {
  34938. return Boolean(maybeKeyed && maybeKeyed[IS_KEYED_SYMBOL]);
  34939. }
  34940. var IS_INDEXED_SYMBOL = '@@__IMMUTABLE_INDEXED__@@';
  34941. function isIndexed(maybeIndexed) {
  34942. return Boolean(maybeIndexed && maybeIndexed[IS_INDEXED_SYMBOL]);
  34943. }
  34944. function isAssociative(maybeAssociative) {
  34945. return isKeyed(maybeAssociative) || isIndexed(maybeAssociative);
  34946. }
  34947. var Collection = function Collection(value) {
  34948. return isCollection(value) ? value : Seq(value);
  34949. };
  34950. var KeyedCollection = /*@__PURE__*/(function (Collection) {
  34951. function KeyedCollection(value) {
  34952. return isKeyed(value) ? value : KeyedSeq(value);
  34953. }
  34954. if ( Collection ) KeyedCollection.__proto__ = Collection;
  34955. KeyedCollection.prototype = Object.create( Collection && Collection.prototype );
  34956. KeyedCollection.prototype.constructor = KeyedCollection;
  34957. return KeyedCollection;
  34958. }(Collection));
  34959. var IndexedCollection = /*@__PURE__*/(function (Collection) {
  34960. function IndexedCollection(value) {
  34961. return isIndexed(value) ? value : IndexedSeq(value);
  34962. }
  34963. if ( Collection ) IndexedCollection.__proto__ = Collection;
  34964. IndexedCollection.prototype = Object.create( Collection && Collection.prototype );
  34965. IndexedCollection.prototype.constructor = IndexedCollection;
  34966. return IndexedCollection;
  34967. }(Collection));
  34968. var SetCollection = /*@__PURE__*/(function (Collection) {
  34969. function SetCollection(value) {
  34970. return isCollection(value) && !isAssociative(value) ? value : SetSeq(value);
  34971. }
  34972. if ( Collection ) SetCollection.__proto__ = Collection;
  34973. SetCollection.prototype = Object.create( Collection && Collection.prototype );
  34974. SetCollection.prototype.constructor = SetCollection;
  34975. return SetCollection;
  34976. }(Collection));
  34977. Collection.Keyed = KeyedCollection;
  34978. Collection.Indexed = IndexedCollection;
  34979. Collection.Set = SetCollection;
  34980. var IS_SEQ_SYMBOL = '@@__IMMUTABLE_SEQ__@@';
  34981. function isSeq(maybeSeq) {
  34982. return Boolean(maybeSeq && maybeSeq[IS_SEQ_SYMBOL]);
  34983. }
  34984. var IS_RECORD_SYMBOL = '@@__IMMUTABLE_RECORD__@@';
  34985. function isRecord(maybeRecord) {
  34986. return Boolean(maybeRecord && maybeRecord[IS_RECORD_SYMBOL]);
  34987. }
  34988. function isImmutable(maybeImmutable) {
  34989. return isCollection(maybeImmutable) || isRecord(maybeImmutable);
  34990. }
  34991. var IS_ORDERED_SYMBOL = '@@__IMMUTABLE_ORDERED__@@';
  34992. function isOrdered(maybeOrdered) {
  34993. return Boolean(maybeOrdered && maybeOrdered[IS_ORDERED_SYMBOL]);
  34994. }
  34995. var ITERATE_KEYS = 0;
  34996. var ITERATE_VALUES = 1;
  34997. var ITERATE_ENTRIES = 2;
  34998. var REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
  34999. var FAUX_ITERATOR_SYMBOL = '@@iterator';
  35000. var ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL;
  35001. var Iterator = function Iterator(next) {
  35002. this.next = next;
  35003. };
  35004. Iterator.prototype.toString = function toString () {
  35005. return '[Iterator]';
  35006. };
  35007. Iterator.KEYS = ITERATE_KEYS;
  35008. Iterator.VALUES = ITERATE_VALUES;
  35009. Iterator.ENTRIES = ITERATE_ENTRIES;
  35010. Iterator.prototype.inspect = Iterator.prototype.toSource = function () {
  35011. return this.toString();
  35012. };
  35013. Iterator.prototype[ITERATOR_SYMBOL] = function () {
  35014. return this;
  35015. };
  35016. function iteratorValue(type, k, v, iteratorResult) {
  35017. var value = type === 0 ? k : type === 1 ? v : [k, v];
  35018. iteratorResult
  35019. ? (iteratorResult.value = value)
  35020. : (iteratorResult = {
  35021. value: value,
  35022. done: false,
  35023. });
  35024. return iteratorResult;
  35025. }
  35026. function iteratorDone() {
  35027. return { value: undefined, done: true };
  35028. }
  35029. function hasIterator(maybeIterable) {
  35030. if (Array.isArray(maybeIterable)) {
  35031. // IE11 trick as it does not support `Symbol.iterator`
  35032. return true;
  35033. }
  35034. return !!getIteratorFn(maybeIterable);
  35035. }
  35036. function isIterator(maybeIterator) {
  35037. return maybeIterator && typeof maybeIterator.next === 'function';
  35038. }
  35039. function getIterator(iterable) {
  35040. var iteratorFn = getIteratorFn(iterable);
  35041. return iteratorFn && iteratorFn.call(iterable);
  35042. }
  35043. function getIteratorFn(iterable) {
  35044. var iteratorFn =
  35045. iterable &&
  35046. ((REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) ||
  35047. iterable[FAUX_ITERATOR_SYMBOL]);
  35048. if (typeof iteratorFn === 'function') {
  35049. return iteratorFn;
  35050. }
  35051. }
  35052. function isEntriesIterable(maybeIterable) {
  35053. var iteratorFn = getIteratorFn(maybeIterable);
  35054. return iteratorFn && iteratorFn === maybeIterable.entries;
  35055. }
  35056. function isKeysIterable(maybeIterable) {
  35057. var iteratorFn = getIteratorFn(maybeIterable);
  35058. return iteratorFn && iteratorFn === maybeIterable.keys;
  35059. }
  35060. var hasOwnProperty = Object.prototype.hasOwnProperty;
  35061. function isArrayLike(value) {
  35062. if (Array.isArray(value) || typeof value === 'string') {
  35063. return true;
  35064. }
  35065. return (
  35066. value &&
  35067. typeof value === 'object' &&
  35068. Number.isInteger(value.length) &&
  35069. value.length >= 0 &&
  35070. (value.length === 0
  35071. ? // Only {length: 0} is considered Array-like.
  35072. Object.keys(value).length === 1
  35073. : // An object is only Array-like if it has a property where the last value
  35074. // in the array-like may be found (which could be undefined).
  35075. value.hasOwnProperty(value.length - 1))
  35076. );
  35077. }
  35078. var Seq = /*@__PURE__*/(function (Collection) {
  35079. function Seq(value) {
  35080. return value === null || value === undefined
  35081. ? emptySequence()
  35082. : isImmutable(value)
  35083. ? value.toSeq()
  35084. : seqFromValue(value);
  35085. }
  35086. if ( Collection ) Seq.__proto__ = Collection;
  35087. Seq.prototype = Object.create( Collection && Collection.prototype );
  35088. Seq.prototype.constructor = Seq;
  35089. Seq.prototype.toSeq = function toSeq () {
  35090. return this;
  35091. };
  35092. Seq.prototype.toString = function toString () {
  35093. return this.__toString('Seq {', '}');
  35094. };
  35095. Seq.prototype.cacheResult = function cacheResult () {
  35096. if (!this._cache && this.__iterateUncached) {
  35097. this._cache = this.entrySeq().toArray();
  35098. this.size = this._cache.length;
  35099. }
  35100. return this;
  35101. };
  35102. // abstract __iterateUncached(fn, reverse)
  35103. Seq.prototype.__iterate = function __iterate (fn, reverse) {
  35104. var cache = this._cache;
  35105. if (cache) {
  35106. var size = cache.length;
  35107. var i = 0;
  35108. while (i !== size) {
  35109. var entry = cache[reverse ? size - ++i : i++];
  35110. if (fn(entry[1], entry[0], this) === false) {
  35111. break;
  35112. }
  35113. }
  35114. return i;
  35115. }
  35116. return this.__iterateUncached(fn, reverse);
  35117. };
  35118. // abstract __iteratorUncached(type, reverse)
  35119. Seq.prototype.__iterator = function __iterator (type, reverse) {
  35120. var cache = this._cache;
  35121. if (cache) {
  35122. var size = cache.length;
  35123. var i = 0;
  35124. return new Iterator(function () {
  35125. if (i === size) {
  35126. return iteratorDone();
  35127. }
  35128. var entry = cache[reverse ? size - ++i : i++];
  35129. return iteratorValue(type, entry[0], entry[1]);
  35130. });
  35131. }
  35132. return this.__iteratorUncached(type, reverse);
  35133. };
  35134. return Seq;
  35135. }(Collection));
  35136. var KeyedSeq = /*@__PURE__*/(function (Seq) {
  35137. function KeyedSeq(value) {
  35138. return value === null || value === undefined
  35139. ? emptySequence().toKeyedSeq()
  35140. : isCollection(value)
  35141. ? isKeyed(value)
  35142. ? value.toSeq()
  35143. : value.fromEntrySeq()
  35144. : isRecord(value)
  35145. ? value.toSeq()
  35146. : keyedSeqFromValue(value);
  35147. }
  35148. if ( Seq ) KeyedSeq.__proto__ = Seq;
  35149. KeyedSeq.prototype = Object.create( Seq && Seq.prototype );
  35150. KeyedSeq.prototype.constructor = KeyedSeq;
  35151. KeyedSeq.prototype.toKeyedSeq = function toKeyedSeq () {
  35152. return this;
  35153. };
  35154. return KeyedSeq;
  35155. }(Seq));
  35156. var IndexedSeq = /*@__PURE__*/(function (Seq) {
  35157. function IndexedSeq(value) {
  35158. return value === null || value === undefined
  35159. ? emptySequence()
  35160. : isCollection(value)
  35161. ? isKeyed(value)
  35162. ? value.entrySeq()
  35163. : value.toIndexedSeq()
  35164. : isRecord(value)
  35165. ? value.toSeq().entrySeq()
  35166. : indexedSeqFromValue(value);
  35167. }
  35168. if ( Seq ) IndexedSeq.__proto__ = Seq;
  35169. IndexedSeq.prototype = Object.create( Seq && Seq.prototype );
  35170. IndexedSeq.prototype.constructor = IndexedSeq;
  35171. IndexedSeq.of = function of (/*...values*/) {
  35172. return IndexedSeq(arguments);
  35173. };
  35174. IndexedSeq.prototype.toIndexedSeq = function toIndexedSeq () {
  35175. return this;
  35176. };
  35177. IndexedSeq.prototype.toString = function toString () {
  35178. return this.__toString('Seq [', ']');
  35179. };
  35180. return IndexedSeq;
  35181. }(Seq));
  35182. var SetSeq = /*@__PURE__*/(function (Seq) {
  35183. function SetSeq(value) {
  35184. return (
  35185. isCollection(value) && !isAssociative(value) ? value : IndexedSeq(value)
  35186. ).toSetSeq();
  35187. }
  35188. if ( Seq ) SetSeq.__proto__ = Seq;
  35189. SetSeq.prototype = Object.create( Seq && Seq.prototype );
  35190. SetSeq.prototype.constructor = SetSeq;
  35191. SetSeq.of = function of (/*...values*/) {
  35192. return SetSeq(arguments);
  35193. };
  35194. SetSeq.prototype.toSetSeq = function toSetSeq () {
  35195. return this;
  35196. };
  35197. return SetSeq;
  35198. }(Seq));
  35199. Seq.isSeq = isSeq;
  35200. Seq.Keyed = KeyedSeq;
  35201. Seq.Set = SetSeq;
  35202. Seq.Indexed = IndexedSeq;
  35203. Seq.prototype[IS_SEQ_SYMBOL] = true;
  35204. // #pragma Root Sequences
  35205. var ArraySeq = /*@__PURE__*/(function (IndexedSeq) {
  35206. function ArraySeq(array) {
  35207. this._array = array;
  35208. this.size = array.length;
  35209. }
  35210. if ( IndexedSeq ) ArraySeq.__proto__ = IndexedSeq;
  35211. ArraySeq.prototype = Object.create( IndexedSeq && IndexedSeq.prototype );
  35212. ArraySeq.prototype.constructor = ArraySeq;
  35213. ArraySeq.prototype.get = function get (index, notSetValue) {
  35214. return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue;
  35215. };
  35216. ArraySeq.prototype.__iterate = function __iterate (fn, reverse) {
  35217. var array = this._array;
  35218. var size = array.length;
  35219. var i = 0;
  35220. while (i !== size) {
  35221. var ii = reverse ? size - ++i : i++;
  35222. if (fn(array[ii], ii, this) === false) {
  35223. break;
  35224. }
  35225. }
  35226. return i;
  35227. };
  35228. ArraySeq.prototype.__iterator = function __iterator (type, reverse) {
  35229. var array = this._array;
  35230. var size = array.length;
  35231. var i = 0;
  35232. return new Iterator(function () {
  35233. if (i === size) {
  35234. return iteratorDone();
  35235. }
  35236. var ii = reverse ? size - ++i : i++;
  35237. return iteratorValue(type, ii, array[ii]);
  35238. });
  35239. };
  35240. return ArraySeq;
  35241. }(IndexedSeq));
  35242. var ObjectSeq = /*@__PURE__*/(function (KeyedSeq) {
  35243. function ObjectSeq(object) {
  35244. var keys = Object.keys(object);
  35245. this._object = object;
  35246. this._keys = keys;
  35247. this.size = keys.length;
  35248. }
  35249. if ( KeyedSeq ) ObjectSeq.__proto__ = KeyedSeq;
  35250. ObjectSeq.prototype = Object.create( KeyedSeq && KeyedSeq.prototype );
  35251. ObjectSeq.prototype.constructor = ObjectSeq;
  35252. ObjectSeq.prototype.get = function get (key, notSetValue) {
  35253. if (notSetValue !== undefined && !this.has(key)) {
  35254. return notSetValue;
  35255. }
  35256. return this._object[key];
  35257. };
  35258. ObjectSeq.prototype.has = function has (key) {
  35259. return hasOwnProperty.call(this._object, key);
  35260. };
  35261. ObjectSeq.prototype.__iterate = function __iterate (fn, reverse) {
  35262. var object = this._object;
  35263. var keys = this._keys;
  35264. var size = keys.length;
  35265. var i = 0;
  35266. while (i !== size) {
  35267. var key = keys[reverse ? size - ++i : i++];
  35268. if (fn(object[key], key, this) === false) {
  35269. break;
  35270. }
  35271. }
  35272. return i;
  35273. };
  35274. ObjectSeq.prototype.__iterator = function __iterator (type, reverse) {
  35275. var object = this._object;
  35276. var keys = this._keys;
  35277. var size = keys.length;
  35278. var i = 0;
  35279. return new Iterator(function () {
  35280. if (i === size) {
  35281. return iteratorDone();
  35282. }
  35283. var key = keys[reverse ? size - ++i : i++];
  35284. return iteratorValue(type, key, object[key]);
  35285. });
  35286. };
  35287. return ObjectSeq;
  35288. }(KeyedSeq));
  35289. ObjectSeq.prototype[IS_ORDERED_SYMBOL] = true;
  35290. var CollectionSeq = /*@__PURE__*/(function (IndexedSeq) {
  35291. function CollectionSeq(collection) {
  35292. this._collection = collection;
  35293. this.size = collection.length || collection.size;
  35294. }
  35295. if ( IndexedSeq ) CollectionSeq.__proto__ = IndexedSeq;
  35296. CollectionSeq.prototype = Object.create( IndexedSeq && IndexedSeq.prototype );
  35297. CollectionSeq.prototype.constructor = CollectionSeq;
  35298. CollectionSeq.prototype.__iterateUncached = function __iterateUncached (fn, reverse) {
  35299. if (reverse) {
  35300. return this.cacheResult().__iterate(fn, reverse);
  35301. }
  35302. var collection = this._collection;
  35303. var iterator = getIterator(collection);
  35304. var iterations = 0;
  35305. if (isIterator(iterator)) {
  35306. var step;
  35307. while (!(step = iterator.next()).done) {
  35308. if (fn(step.value, iterations++, this) === false) {
  35309. break;
  35310. }
  35311. }
  35312. }
  35313. return iterations;
  35314. };
  35315. CollectionSeq.prototype.__iteratorUncached = function __iteratorUncached (type, reverse) {
  35316. if (reverse) {
  35317. return this.cacheResult().__iterator(type, reverse);
  35318. }
  35319. var collection = this._collection;
  35320. var iterator = getIterator(collection);
  35321. if (!isIterator(iterator)) {
  35322. return new Iterator(iteratorDone);
  35323. }
  35324. var iterations = 0;
  35325. return new Iterator(function () {
  35326. var step = iterator.next();
  35327. return step.done ? step : iteratorValue(type, iterations++, step.value);
  35328. });
  35329. };
  35330. return CollectionSeq;
  35331. }(IndexedSeq));
  35332. // # pragma Helper functions
  35333. var EMPTY_SEQ;
  35334. function emptySequence() {
  35335. return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([]));
  35336. }
  35337. function keyedSeqFromValue(value) {
  35338. var seq = maybeIndexedSeqFromValue(value);
  35339. if (seq) {
  35340. return seq.fromEntrySeq();
  35341. }
  35342. if (typeof value === 'object') {
  35343. return new ObjectSeq(value);
  35344. }
  35345. throw new TypeError(
  35346. 'Expected Array or collection object of [k, v] entries, or keyed object: ' +
  35347. value
  35348. );
  35349. }
  35350. function indexedSeqFromValue(value) {
  35351. var seq = maybeIndexedSeqFromValue(value);
  35352. if (seq) {
  35353. return seq;
  35354. }
  35355. throw new TypeError(
  35356. 'Expected Array or collection object of values: ' + value
  35357. );
  35358. }
  35359. function seqFromValue(value) {
  35360. var seq = maybeIndexedSeqFromValue(value);
  35361. if (seq) {
  35362. return isEntriesIterable(value)
  35363. ? seq.fromEntrySeq()
  35364. : isKeysIterable(value)
  35365. ? seq.toSetSeq()
  35366. : seq;
  35367. }
  35368. if (typeof value === 'object') {
  35369. return new ObjectSeq(value);
  35370. }
  35371. throw new TypeError(
  35372. 'Expected Array or collection object of values, or keyed object: ' + value
  35373. );
  35374. }
  35375. function maybeIndexedSeqFromValue(value) {
  35376. return isArrayLike(value)
  35377. ? new ArraySeq(value)
  35378. : hasIterator(value)
  35379. ? new CollectionSeq(value)
  35380. : undefined;
  35381. }
  35382. var IS_MAP_SYMBOL = '@@__IMMUTABLE_MAP__@@';
  35383. function isMap(maybeMap) {
  35384. return Boolean(maybeMap && maybeMap[IS_MAP_SYMBOL]);
  35385. }
  35386. function isOrderedMap(maybeOrderedMap) {
  35387. return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap);
  35388. }
  35389. function isValueObject(maybeValue) {
  35390. return Boolean(
  35391. maybeValue &&
  35392. typeof maybeValue.equals === 'function' &&
  35393. typeof maybeValue.hashCode === 'function'
  35394. );
  35395. }
  35396. /**
  35397. * An extension of the "same-value" algorithm as [described for use by ES6 Map
  35398. * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality)
  35399. *
  35400. * NaN is considered the same as NaN, however -0 and 0 are considered the same
  35401. * value, which is different from the algorithm described by
  35402. * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
  35403. *
  35404. * This is extended further to allow Objects to describe the values they
  35405. * represent, by way of `valueOf` or `equals` (and `hashCode`).
  35406. *
  35407. * Note: because of this extension, the key equality of Immutable.Map and the
  35408. * value equality of Immutable.Set will differ from ES6 Map and Set.
  35409. *
  35410. * ### Defining custom values
  35411. *
  35412. * The easiest way to describe the value an object represents is by implementing
  35413. * `valueOf`. For example, `Date` represents a value by returning a unix
  35414. * timestamp for `valueOf`:
  35415. *
  35416. * var date1 = new Date(1234567890000); // Fri Feb 13 2009 ...
  35417. * var date2 = new Date(1234567890000);
  35418. * date1.valueOf(); // 1234567890000
  35419. * assert( date1 !== date2 );
  35420. * assert( Immutable.is( date1, date2 ) );
  35421. *
  35422. * Note: overriding `valueOf` may have other implications if you use this object
  35423. * where JavaScript expects a primitive, such as implicit string coercion.
  35424. *
  35425. * For more complex types, especially collections, implementing `valueOf` may
  35426. * not be performant. An alternative is to implement `equals` and `hashCode`.
  35427. *
  35428. * `equals` takes another object, presumably of similar type, and returns true
  35429. * if it is equal. Equality is symmetrical, so the same result should be
  35430. * returned if this and the argument are flipped.
  35431. *
  35432. * assert( a.equals(b) === b.equals(a) );
  35433. *
  35434. * `hashCode` returns a 32bit integer number representing the object which will
  35435. * be used to determine how to store the value object in a Map or Set. You must
  35436. * provide both or neither methods, one must not exist without the other.
  35437. *
  35438. * Also, an important relationship between these methods must be upheld: if two
  35439. * values are equal, they *must* return the same hashCode. If the values are not
  35440. * equal, they might have the same hashCode; this is called a hash collision,
  35441. * and while undesirable for performance reasons, it is acceptable.
  35442. *
  35443. * if (a.equals(b)) {
  35444. * assert( a.hashCode() === b.hashCode() );
  35445. * }
  35446. *
  35447. * All Immutable collections are Value Objects: they implement `equals()`
  35448. * and `hashCode()`.
  35449. */
  35450. function is(valueA, valueB) {
  35451. if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {
  35452. return true;
  35453. }
  35454. if (!valueA || !valueB) {
  35455. return false;
  35456. }
  35457. if (
  35458. typeof valueA.valueOf === 'function' &&
  35459. typeof valueB.valueOf === 'function'
  35460. ) {
  35461. valueA = valueA.valueOf();
  35462. valueB = valueB.valueOf();
  35463. if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {
  35464. return true;
  35465. }
  35466. if (!valueA || !valueB) {
  35467. return false;
  35468. }
  35469. }
  35470. return !!(
  35471. isValueObject(valueA) &&
  35472. isValueObject(valueB) &&
  35473. valueA.equals(valueB)
  35474. );
  35475. }
  35476. var imul =
  35477. typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2
  35478. ? Math.imul
  35479. : function imul(a, b) {
  35480. a |= 0; // int
  35481. b |= 0; // int
  35482. var c = a & 0xffff;
  35483. var d = b & 0xffff;
  35484. // Shift by 0 fixes the sign on the high part.
  35485. return (c * d + ((((a >>> 16) * d + c * (b >>> 16)) << 16) >>> 0)) | 0; // int
  35486. };
  35487. // v8 has an optimization for storing 31-bit signed numbers.
  35488. // Values which have either 00 or 11 as the high order bits qualify.
  35489. // This function drops the highest order bit in a signed number, maintaining
  35490. // the sign bit.
  35491. function smi(i32) {
  35492. return ((i32 >>> 1) & 0x40000000) | (i32 & 0xbfffffff);
  35493. }
  35494. var defaultValueOf = Object.prototype.valueOf;
  35495. function hash(o) {
  35496. if (o == null) {
  35497. return hashNullish(o);
  35498. }
  35499. if (typeof o.hashCode === 'function') {
  35500. // Drop any high bits from accidentally long hash codes.
  35501. return smi(o.hashCode(o));
  35502. }
  35503. var v = valueOf(o);
  35504. if (v == null) {
  35505. return hashNullish(v);
  35506. }
  35507. switch (typeof v) {
  35508. case 'boolean':
  35509. // The hash values for built-in constants are a 1 value for each 5-byte
  35510. // shift region expect for the first, which encodes the value. This
  35511. // reduces the odds of a hash collision for these common values.
  35512. return v ? 0x42108421 : 0x42108420;
  35513. case 'number':
  35514. return hashNumber(v);
  35515. case 'string':
  35516. return v.length > STRING_HASH_CACHE_MIN_STRLEN
  35517. ? cachedHashString(v)
  35518. : hashString(v);
  35519. case 'object':
  35520. case 'function':
  35521. return hashJSObj(v);
  35522. case 'symbol':
  35523. return hashSymbol(v);
  35524. default:
  35525. if (typeof v.toString === 'function') {
  35526. return hashString(v.toString());
  35527. }
  35528. throw new Error('Value type ' + typeof v + ' cannot be hashed.');
  35529. }
  35530. }
  35531. function hashNullish(nullish) {
  35532. return nullish === null ? 0x42108422 : /* undefined */ 0x42108423;
  35533. }
  35534. // Compress arbitrarily large numbers into smi hashes.
  35535. function hashNumber(n) {
  35536. if (n !== n || n === Infinity) {
  35537. return 0;
  35538. }
  35539. var hash = n | 0;
  35540. if (hash !== n) {
  35541. hash ^= n * 0xffffffff;
  35542. }
  35543. while (n > 0xffffffff) {
  35544. n /= 0xffffffff;
  35545. hash ^= n;
  35546. }
  35547. return smi(hash);
  35548. }
  35549. function cachedHashString(string) {
  35550. var hashed = stringHashCache[string];
  35551. if (hashed === undefined) {
  35552. hashed = hashString(string);
  35553. if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) {
  35554. STRING_HASH_CACHE_SIZE = 0;
  35555. stringHashCache = {};
  35556. }
  35557. STRING_HASH_CACHE_SIZE++;
  35558. stringHashCache[string] = hashed;
  35559. }
  35560. return hashed;
  35561. }
  35562. // http://jsperf.com/hashing-strings
  35563. function hashString(string) {
  35564. // This is the hash from JVM
  35565. // The hash code for a string is computed as
  35566. // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1],
  35567. // where s[i] is the ith character of the string and n is the length of
  35568. // the string. We "mod" the result to make it between 0 (inclusive) and 2^31
  35569. // (exclusive) by dropping high bits.
  35570. var hashed = 0;
  35571. for (var ii = 0; ii < string.length; ii++) {
  35572. hashed = (31 * hashed + string.charCodeAt(ii)) | 0;
  35573. }
  35574. return smi(hashed);
  35575. }
  35576. function hashSymbol(sym) {
  35577. var hashed = symbolMap[sym];
  35578. if (hashed !== undefined) {
  35579. return hashed;
  35580. }
  35581. hashed = nextHash();
  35582. symbolMap[sym] = hashed;
  35583. return hashed;
  35584. }
  35585. function hashJSObj(obj) {
  35586. var hashed;
  35587. if (usingWeakMap) {
  35588. hashed = weakMap.get(obj);
  35589. if (hashed !== undefined) {
  35590. return hashed;
  35591. }
  35592. }
  35593. hashed = obj[UID_HASH_KEY];
  35594. if (hashed !== undefined) {
  35595. return hashed;
  35596. }
  35597. if (!canDefineProperty) {
  35598. hashed = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY];
  35599. if (hashed !== undefined) {
  35600. return hashed;
  35601. }
  35602. hashed = getIENodeHash(obj);
  35603. if (hashed !== undefined) {
  35604. return hashed;
  35605. }
  35606. }
  35607. hashed = nextHash();
  35608. if (usingWeakMap) {
  35609. weakMap.set(obj, hashed);
  35610. } else if (isExtensible !== undefined && isExtensible(obj) === false) {
  35611. throw new Error('Non-extensible objects are not allowed as keys.');
  35612. } else if (canDefineProperty) {
  35613. Object.defineProperty(obj, UID_HASH_KEY, {
  35614. enumerable: false,
  35615. configurable: false,
  35616. writable: false,
  35617. value: hashed,
  35618. });
  35619. } else if (
  35620. obj.propertyIsEnumerable !== undefined &&
  35621. obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable
  35622. ) {
  35623. // Since we can't define a non-enumerable property on the object
  35624. // we'll hijack one of the less-used non-enumerable properties to
  35625. // save our hash on it. Since this is a function it will not show up in
  35626. // `JSON.stringify` which is what we want.
  35627. obj.propertyIsEnumerable = function () {
  35628. return this.constructor.prototype.propertyIsEnumerable.apply(
  35629. this,
  35630. arguments
  35631. );
  35632. };
  35633. obj.propertyIsEnumerable[UID_HASH_KEY] = hashed;
  35634. } else if (obj.nodeType !== undefined) {
  35635. // At this point we couldn't get the IE `uniqueID` to use as a hash
  35636. // and we couldn't use a non-enumerable property to exploit the
  35637. // dontEnum bug so we simply add the `UID_HASH_KEY` on the node
  35638. // itself.
  35639. obj[UID_HASH_KEY] = hashed;
  35640. } else {
  35641. throw new Error('Unable to set a non-enumerable property on object.');
  35642. }
  35643. return hashed;
  35644. }
  35645. // Get references to ES5 object methods.
  35646. var isExtensible = Object.isExtensible;
  35647. // True if Object.defineProperty works as expected. IE8 fails this test.
  35648. var canDefineProperty = (function () {
  35649. try {
  35650. Object.defineProperty({}, '@', {});
  35651. return true;
  35652. } catch (e) {
  35653. return false;
  35654. }
  35655. })();
  35656. // IE has a `uniqueID` property on DOM nodes. We can construct the hash from it
  35657. // and avoid memory leaks from the IE cloneNode bug.
  35658. function getIENodeHash(node) {
  35659. if (node && node.nodeType > 0) {
  35660. switch (node.nodeType) {
  35661. case 1: // Element
  35662. return node.uniqueID;
  35663. case 9: // Document
  35664. return node.documentElement && node.documentElement.uniqueID;
  35665. }
  35666. }
  35667. }
  35668. function valueOf(obj) {
  35669. return obj.valueOf !== defaultValueOf && typeof obj.valueOf === 'function'
  35670. ? obj.valueOf(obj)
  35671. : obj;
  35672. }
  35673. function nextHash() {
  35674. var nextHash = ++_objHashUID;
  35675. if (_objHashUID & 0x40000000) {
  35676. _objHashUID = 0;
  35677. }
  35678. return nextHash;
  35679. }
  35680. // If possible, use a WeakMap.
  35681. var usingWeakMap = typeof WeakMap === 'function';
  35682. var weakMap;
  35683. if (usingWeakMap) {
  35684. weakMap = new WeakMap();
  35685. }
  35686. var symbolMap = Object.create(null);
  35687. var _objHashUID = 0;
  35688. var UID_HASH_KEY = '__immutablehash__';
  35689. if (typeof Symbol === 'function') {
  35690. UID_HASH_KEY = Symbol(UID_HASH_KEY);
  35691. }
  35692. var STRING_HASH_CACHE_MIN_STRLEN = 16;
  35693. var STRING_HASH_CACHE_MAX_SIZE = 255;
  35694. var STRING_HASH_CACHE_SIZE = 0;
  35695. var stringHashCache = {};
  35696. var ToKeyedSequence = /*@__PURE__*/(function (KeyedSeq) {
  35697. function ToKeyedSequence(indexed, useKeys) {
  35698. this._iter = indexed;
  35699. this._useKeys = useKeys;
  35700. this.size = indexed.size;
  35701. }
  35702. if ( KeyedSeq ) ToKeyedSequence.__proto__ = KeyedSeq;
  35703. ToKeyedSequence.prototype = Object.create( KeyedSeq && KeyedSeq.prototype );
  35704. ToKeyedSequence.prototype.constructor = ToKeyedSequence;
  35705. ToKeyedSequence.prototype.get = function get (key, notSetValue) {
  35706. return this._iter.get(key, notSetValue);
  35707. };
  35708. ToKeyedSequence.prototype.has = function has (key) {
  35709. return this._iter.has(key);
  35710. };
  35711. ToKeyedSequence.prototype.valueSeq = function valueSeq () {
  35712. return this._iter.valueSeq();
  35713. };
  35714. ToKeyedSequence.prototype.reverse = function reverse () {
  35715. var this$1$1 = this;
  35716. var reversedSequence = reverseFactory(this, true);
  35717. if (!this._useKeys) {
  35718. reversedSequence.valueSeq = function () { return this$1$1._iter.toSeq().reverse(); };
  35719. }
  35720. return reversedSequence;
  35721. };
  35722. ToKeyedSequence.prototype.map = function map (mapper, context) {
  35723. var this$1$1 = this;
  35724. var mappedSequence = mapFactory(this, mapper, context);
  35725. if (!this._useKeys) {
  35726. mappedSequence.valueSeq = function () { return this$1$1._iter.toSeq().map(mapper, context); };
  35727. }
  35728. return mappedSequence;
  35729. };
  35730. ToKeyedSequence.prototype.__iterate = function __iterate (fn, reverse) {
  35731. var this$1$1 = this;
  35732. return this._iter.__iterate(function (v, k) { return fn(v, k, this$1$1); }, reverse);
  35733. };
  35734. ToKeyedSequence.prototype.__iterator = function __iterator (type, reverse) {
  35735. return this._iter.__iterator(type, reverse);
  35736. };
  35737. return ToKeyedSequence;
  35738. }(KeyedSeq));
  35739. ToKeyedSequence.prototype[IS_ORDERED_SYMBOL] = true;
  35740. var ToIndexedSequence = /*@__PURE__*/(function (IndexedSeq) {
  35741. function ToIndexedSequence(iter) {
  35742. this._iter = iter;
  35743. this.size = iter.size;
  35744. }
  35745. if ( IndexedSeq ) ToIndexedSequence.__proto__ = IndexedSeq;
  35746. ToIndexedSequence.prototype = Object.create( IndexedSeq && IndexedSeq.prototype );
  35747. ToIndexedSequence.prototype.constructor = ToIndexedSequence;
  35748. ToIndexedSequence.prototype.includes = function includes (value) {
  35749. return this._iter.includes(value);
  35750. };
  35751. ToIndexedSequence.prototype.__iterate = function __iterate (fn, reverse) {
  35752. var this$1$1 = this;
  35753. var i = 0;
  35754. reverse && ensureSize(this);
  35755. return this._iter.__iterate(
  35756. function (v) { return fn(v, reverse ? this$1$1.size - ++i : i++, this$1$1); },
  35757. reverse
  35758. );
  35759. };
  35760. ToIndexedSequence.prototype.__iterator = function __iterator (type, reverse) {
  35761. var this$1$1 = this;
  35762. var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);
  35763. var i = 0;
  35764. reverse && ensureSize(this);
  35765. return new Iterator(function () {
  35766. var step = iterator.next();
  35767. return step.done
  35768. ? step
  35769. : iteratorValue(
  35770. type,
  35771. reverse ? this$1$1.size - ++i : i++,
  35772. step.value,
  35773. step
  35774. );
  35775. });
  35776. };
  35777. return ToIndexedSequence;
  35778. }(IndexedSeq));
  35779. var ToSetSequence = /*@__PURE__*/(function (SetSeq) {
  35780. function ToSetSequence(iter) {
  35781. this._iter = iter;
  35782. this.size = iter.size;
  35783. }
  35784. if ( SetSeq ) ToSetSequence.__proto__ = SetSeq;
  35785. ToSetSequence.prototype = Object.create( SetSeq && SetSeq.prototype );
  35786. ToSetSequence.prototype.constructor = ToSetSequence;
  35787. ToSetSequence.prototype.has = function has (key) {
  35788. return this._iter.includes(key);
  35789. };
  35790. ToSetSequence.prototype.__iterate = function __iterate (fn, reverse) {
  35791. var this$1$1 = this;
  35792. return this._iter.__iterate(function (v) { return fn(v, v, this$1$1); }, reverse);
  35793. };
  35794. ToSetSequence.prototype.__iterator = function __iterator (type, reverse) {
  35795. var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);
  35796. return new Iterator(function () {
  35797. var step = iterator.next();
  35798. return step.done
  35799. ? step
  35800. : iteratorValue(type, step.value, step.value, step);
  35801. });
  35802. };
  35803. return ToSetSequence;
  35804. }(SetSeq));
  35805. var FromEntriesSequence = /*@__PURE__*/(function (KeyedSeq) {
  35806. function FromEntriesSequence(entries) {
  35807. this._iter = entries;
  35808. this.size = entries.size;
  35809. }
  35810. if ( KeyedSeq ) FromEntriesSequence.__proto__ = KeyedSeq;
  35811. FromEntriesSequence.prototype = Object.create( KeyedSeq && KeyedSeq.prototype );
  35812. FromEntriesSequence.prototype.constructor = FromEntriesSequence;
  35813. FromEntriesSequence.prototype.entrySeq = function entrySeq () {
  35814. return this._iter.toSeq();
  35815. };
  35816. FromEntriesSequence.prototype.__iterate = function __iterate (fn, reverse) {
  35817. var this$1$1 = this;
  35818. return this._iter.__iterate(function (entry) {
  35819. // Check if entry exists first so array access doesn't throw for holes
  35820. // in the parent iteration.
  35821. if (entry) {
  35822. validateEntry(entry);
  35823. var indexedCollection = isCollection(entry);
  35824. return fn(
  35825. indexedCollection ? entry.get(1) : entry[1],
  35826. indexedCollection ? entry.get(0) : entry[0],
  35827. this$1$1
  35828. );
  35829. }
  35830. }, reverse);
  35831. };
  35832. FromEntriesSequence.prototype.__iterator = function __iterator (type, reverse) {
  35833. var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);
  35834. return new Iterator(function () {
  35835. while (true) {
  35836. var step = iterator.next();
  35837. if (step.done) {
  35838. return step;
  35839. }
  35840. var entry = step.value;
  35841. // Check if entry exists first so array access doesn't throw for holes
  35842. // in the parent iteration.
  35843. if (entry) {
  35844. validateEntry(entry);
  35845. var indexedCollection = isCollection(entry);
  35846. return iteratorValue(
  35847. type,
  35848. indexedCollection ? entry.get(0) : entry[0],
  35849. indexedCollection ? entry.get(1) : entry[1],
  35850. step
  35851. );
  35852. }
  35853. }
  35854. });
  35855. };
  35856. return FromEntriesSequence;
  35857. }(KeyedSeq));
  35858. ToIndexedSequence.prototype.cacheResult =
  35859. ToKeyedSequence.prototype.cacheResult =
  35860. ToSetSequence.prototype.cacheResult =
  35861. FromEntriesSequence.prototype.cacheResult =
  35862. cacheResultThrough;
  35863. function flipFactory(collection) {
  35864. var flipSequence = makeSequence(collection);
  35865. flipSequence._iter = collection;
  35866. flipSequence.size = collection.size;
  35867. flipSequence.flip = function () { return collection; };
  35868. flipSequence.reverse = function () {
  35869. var reversedSequence = collection.reverse.apply(this); // super.reverse()
  35870. reversedSequence.flip = function () { return collection.reverse(); };
  35871. return reversedSequence;
  35872. };
  35873. flipSequence.has = function (key) { return collection.includes(key); };
  35874. flipSequence.includes = function (key) { return collection.has(key); };
  35875. flipSequence.cacheResult = cacheResultThrough;
  35876. flipSequence.__iterateUncached = function (fn, reverse) {
  35877. var this$1$1 = this;
  35878. return collection.__iterate(function (v, k) { return fn(k, v, this$1$1) !== false; }, reverse);
  35879. };
  35880. flipSequence.__iteratorUncached = function (type, reverse) {
  35881. if (type === ITERATE_ENTRIES) {
  35882. var iterator = collection.__iterator(type, reverse);
  35883. return new Iterator(function () {
  35884. var step = iterator.next();
  35885. if (!step.done) {
  35886. var k = step.value[0];
  35887. step.value[0] = step.value[1];
  35888. step.value[1] = k;
  35889. }
  35890. return step;
  35891. });
  35892. }
  35893. return collection.__iterator(
  35894. type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES,
  35895. reverse
  35896. );
  35897. };
  35898. return flipSequence;
  35899. }
  35900. function mapFactory(collection, mapper, context) {
  35901. var mappedSequence = makeSequence(collection);
  35902. mappedSequence.size = collection.size;
  35903. mappedSequence.has = function (key) { return collection.has(key); };
  35904. mappedSequence.get = function (key, notSetValue) {
  35905. var v = collection.get(key, NOT_SET);
  35906. return v === NOT_SET
  35907. ? notSetValue
  35908. : mapper.call(context, v, key, collection);
  35909. };
  35910. mappedSequence.__iterateUncached = function (fn, reverse) {
  35911. var this$1$1 = this;
  35912. return collection.__iterate(
  35913. function (v, k, c) { return fn(mapper.call(context, v, k, c), k, this$1$1) !== false; },
  35914. reverse
  35915. );
  35916. };
  35917. mappedSequence.__iteratorUncached = function (type, reverse) {
  35918. var iterator = collection.__iterator(ITERATE_ENTRIES, reverse);
  35919. return new Iterator(function () {
  35920. var step = iterator.next();
  35921. if (step.done) {
  35922. return step;
  35923. }
  35924. var entry = step.value;
  35925. var key = entry[0];
  35926. return iteratorValue(
  35927. type,
  35928. key,
  35929. mapper.call(context, entry[1], key, collection),
  35930. step
  35931. );
  35932. });
  35933. };
  35934. return mappedSequence;
  35935. }
  35936. function reverseFactory(collection, useKeys) {
  35937. var this$1$1 = this;
  35938. var reversedSequence = makeSequence(collection);
  35939. reversedSequence._iter = collection;
  35940. reversedSequence.size = collection.size;
  35941. reversedSequence.reverse = function () { return collection; };
  35942. if (collection.flip) {
  35943. reversedSequence.flip = function () {
  35944. var flipSequence = flipFactory(collection);
  35945. flipSequence.reverse = function () { return collection.flip(); };
  35946. return flipSequence;
  35947. };
  35948. }
  35949. reversedSequence.get = function (key, notSetValue) { return collection.get(useKeys ? key : -1 - key, notSetValue); };
  35950. reversedSequence.has = function (key) { return collection.has(useKeys ? key : -1 - key); };
  35951. reversedSequence.includes = function (value) { return collection.includes(value); };
  35952. reversedSequence.cacheResult = cacheResultThrough;
  35953. reversedSequence.__iterate = function (fn, reverse) {
  35954. var this$1$1 = this;
  35955. var i = 0;
  35956. reverse && ensureSize(collection);
  35957. return collection.__iterate(
  35958. function (v, k) { return fn(v, useKeys ? k : reverse ? this$1$1.size - ++i : i++, this$1$1); },
  35959. !reverse
  35960. );
  35961. };
  35962. reversedSequence.__iterator = function (type, reverse) {
  35963. var i = 0;
  35964. reverse && ensureSize(collection);
  35965. var iterator = collection.__iterator(ITERATE_ENTRIES, !reverse);
  35966. return new Iterator(function () {
  35967. var step = iterator.next();
  35968. if (step.done) {
  35969. return step;
  35970. }
  35971. var entry = step.value;
  35972. return iteratorValue(
  35973. type,
  35974. useKeys ? entry[0] : reverse ? this$1$1.size - ++i : i++,
  35975. entry[1],
  35976. step
  35977. );
  35978. });
  35979. };
  35980. return reversedSequence;
  35981. }
  35982. function filterFactory(collection, predicate, context, useKeys) {
  35983. var filterSequence = makeSequence(collection);
  35984. if (useKeys) {
  35985. filterSequence.has = function (key) {
  35986. var v = collection.get(key, NOT_SET);
  35987. return v !== NOT_SET && !!predicate.call(context, v, key, collection);
  35988. };
  35989. filterSequence.get = function (key, notSetValue) {
  35990. var v = collection.get(key, NOT_SET);
  35991. return v !== NOT_SET && predicate.call(context, v, key, collection)
  35992. ? v
  35993. : notSetValue;
  35994. };
  35995. }
  35996. filterSequence.__iterateUncached = function (fn, reverse) {
  35997. var this$1$1 = this;
  35998. var iterations = 0;
  35999. collection.__iterate(function (v, k, c) {
  36000. if (predicate.call(context, v, k, c)) {
  36001. iterations++;
  36002. return fn(v, useKeys ? k : iterations - 1, this$1$1);
  36003. }
  36004. }, reverse);
  36005. return iterations;
  36006. };
  36007. filterSequence.__iteratorUncached = function (type, reverse) {
  36008. var iterator = collection.__iterator(ITERATE_ENTRIES, reverse);
  36009. var iterations = 0;
  36010. return new Iterator(function () {
  36011. while (true) {
  36012. var step = iterator.next();
  36013. if (step.done) {
  36014. return step;
  36015. }
  36016. var entry = step.value;
  36017. var key = entry[0];
  36018. var value = entry[1];
  36019. if (predicate.call(context, value, key, collection)) {
  36020. return iteratorValue(type, useKeys ? key : iterations++, value, step);
  36021. }
  36022. }
  36023. });
  36024. };
  36025. return filterSequence;
  36026. }
  36027. function countByFactory(collection, grouper, context) {
  36028. var groups = Map().asMutable();
  36029. collection.__iterate(function (v, k) {
  36030. groups.update(grouper.call(context, v, k, collection), 0, function (a) { return a + 1; });
  36031. });
  36032. return groups.asImmutable();
  36033. }
  36034. function groupByFactory(collection, grouper, context) {
  36035. var isKeyedIter = isKeyed(collection);
  36036. var groups = (isOrdered(collection) ? OrderedMap() : Map()).asMutable();
  36037. collection.__iterate(function (v, k) {
  36038. groups.update(
  36039. grouper.call(context, v, k, collection),
  36040. function (a) { return ((a = a || []), a.push(isKeyedIter ? [k, v] : v), a); }
  36041. );
  36042. });
  36043. var coerce = collectionClass(collection);
  36044. return groups.map(function (arr) { return reify(collection, coerce(arr)); }).asImmutable();
  36045. }
  36046. function sliceFactory(collection, begin, end, useKeys) {
  36047. var originalSize = collection.size;
  36048. if (wholeSlice(begin, end, originalSize)) {
  36049. return collection;
  36050. }
  36051. var resolvedBegin = resolveBegin(begin, originalSize);
  36052. var resolvedEnd = resolveEnd(end, originalSize);
  36053. // begin or end will be NaN if they were provided as negative numbers and
  36054. // this collection's size is unknown. In that case, cache first so there is
  36055. // a known size and these do not resolve to NaN.
  36056. if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) {
  36057. return sliceFactory(collection.toSeq().cacheResult(), begin, end, useKeys);
  36058. }
  36059. // Note: resolvedEnd is undefined when the original sequence's length is
  36060. // unknown and this slice did not supply an end and should contain all
  36061. // elements after resolvedBegin.
  36062. // In that case, resolvedSize will be NaN and sliceSize will remain undefined.
  36063. var resolvedSize = resolvedEnd - resolvedBegin;
  36064. var sliceSize;
  36065. if (resolvedSize === resolvedSize) {
  36066. sliceSize = resolvedSize < 0 ? 0 : resolvedSize;
  36067. }
  36068. var sliceSeq = makeSequence(collection);
  36069. // If collection.size is undefined, the size of the realized sliceSeq is
  36070. // unknown at this point unless the number of items to slice is 0
  36071. sliceSeq.size =
  36072. sliceSize === 0 ? sliceSize : (collection.size && sliceSize) || undefined;
  36073. if (!useKeys && isSeq(collection) && sliceSize >= 0) {
  36074. sliceSeq.get = function (index, notSetValue) {
  36075. index = wrapIndex(this, index);
  36076. return index >= 0 && index < sliceSize
  36077. ? collection.get(index + resolvedBegin, notSetValue)
  36078. : notSetValue;
  36079. };
  36080. }
  36081. sliceSeq.__iterateUncached = function (fn, reverse) {
  36082. var this$1$1 = this;
  36083. if (sliceSize === 0) {
  36084. return 0;
  36085. }
  36086. if (reverse) {
  36087. return this.cacheResult().__iterate(fn, reverse);
  36088. }
  36089. var skipped = 0;
  36090. var isSkipping = true;
  36091. var iterations = 0;
  36092. collection.__iterate(function (v, k) {
  36093. if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) {
  36094. iterations++;
  36095. return (
  36096. fn(v, useKeys ? k : iterations - 1, this$1$1) !== false &&
  36097. iterations !== sliceSize
  36098. );
  36099. }
  36100. });
  36101. return iterations;
  36102. };
  36103. sliceSeq.__iteratorUncached = function (type, reverse) {
  36104. if (sliceSize !== 0 && reverse) {
  36105. return this.cacheResult().__iterator(type, reverse);
  36106. }
  36107. // Don't bother instantiating parent iterator if taking 0.
  36108. if (sliceSize === 0) {
  36109. return new Iterator(iteratorDone);
  36110. }
  36111. var iterator = collection.__iterator(type, reverse);
  36112. var skipped = 0;
  36113. var iterations = 0;
  36114. return new Iterator(function () {
  36115. while (skipped++ < resolvedBegin) {
  36116. iterator.next();
  36117. }
  36118. if (++iterations > sliceSize) {
  36119. return iteratorDone();
  36120. }
  36121. var step = iterator.next();
  36122. if (useKeys || type === ITERATE_VALUES || step.done) {
  36123. return step;
  36124. }
  36125. if (type === ITERATE_KEYS) {
  36126. return iteratorValue(type, iterations - 1, undefined, step);
  36127. }
  36128. return iteratorValue(type, iterations - 1, step.value[1], step);
  36129. });
  36130. };
  36131. return sliceSeq;
  36132. }
  36133. function takeWhileFactory(collection, predicate, context) {
  36134. var takeSequence = makeSequence(collection);
  36135. takeSequence.__iterateUncached = function (fn, reverse) {
  36136. var this$1$1 = this;
  36137. if (reverse) {
  36138. return this.cacheResult().__iterate(fn, reverse);
  36139. }
  36140. var iterations = 0;
  36141. collection.__iterate(
  36142. function (v, k, c) { return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$1$1); }
  36143. );
  36144. return iterations;
  36145. };
  36146. takeSequence.__iteratorUncached = function (type, reverse) {
  36147. var this$1$1 = this;
  36148. if (reverse) {
  36149. return this.cacheResult().__iterator(type, reverse);
  36150. }
  36151. var iterator = collection.__iterator(ITERATE_ENTRIES, reverse);
  36152. var iterating = true;
  36153. return new Iterator(function () {
  36154. if (!iterating) {
  36155. return iteratorDone();
  36156. }
  36157. var step = iterator.next();
  36158. if (step.done) {
  36159. return step;
  36160. }
  36161. var entry = step.value;
  36162. var k = entry[0];
  36163. var v = entry[1];
  36164. if (!predicate.call(context, v, k, this$1$1)) {
  36165. iterating = false;
  36166. return iteratorDone();
  36167. }
  36168. return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step);
  36169. });
  36170. };
  36171. return takeSequence;
  36172. }
  36173. function skipWhileFactory(collection, predicate, context, useKeys) {
  36174. var skipSequence = makeSequence(collection);
  36175. skipSequence.__iterateUncached = function (fn, reverse) {
  36176. var this$1$1 = this;
  36177. if (reverse) {
  36178. return this.cacheResult().__iterate(fn, reverse);
  36179. }
  36180. var isSkipping = true;
  36181. var iterations = 0;
  36182. collection.__iterate(function (v, k, c) {
  36183. if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) {
  36184. iterations++;
  36185. return fn(v, useKeys ? k : iterations - 1, this$1$1);
  36186. }
  36187. });
  36188. return iterations;
  36189. };
  36190. skipSequence.__iteratorUncached = function (type, reverse) {
  36191. var this$1$1 = this;
  36192. if (reverse) {
  36193. return this.cacheResult().__iterator(type, reverse);
  36194. }
  36195. var iterator = collection.__iterator(ITERATE_ENTRIES, reverse);
  36196. var skipping = true;
  36197. var iterations = 0;
  36198. return new Iterator(function () {
  36199. var step;
  36200. var k;
  36201. var v;
  36202. do {
  36203. step = iterator.next();
  36204. if (step.done) {
  36205. if (useKeys || type === ITERATE_VALUES) {
  36206. return step;
  36207. }
  36208. if (type === ITERATE_KEYS) {
  36209. return iteratorValue(type, iterations++, undefined, step);
  36210. }
  36211. return iteratorValue(type, iterations++, step.value[1], step);
  36212. }
  36213. var entry = step.value;
  36214. k = entry[0];
  36215. v = entry[1];
  36216. skipping && (skipping = predicate.call(context, v, k, this$1$1));
  36217. } while (skipping);
  36218. return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step);
  36219. });
  36220. };
  36221. return skipSequence;
  36222. }
  36223. function concatFactory(collection, values) {
  36224. var isKeyedCollection = isKeyed(collection);
  36225. var iters = [collection]
  36226. .concat(values)
  36227. .map(function (v) {
  36228. if (!isCollection(v)) {
  36229. v = isKeyedCollection
  36230. ? keyedSeqFromValue(v)
  36231. : indexedSeqFromValue(Array.isArray(v) ? v : [v]);
  36232. } else if (isKeyedCollection) {
  36233. v = KeyedCollection(v);
  36234. }
  36235. return v;
  36236. })
  36237. .filter(function (v) { return v.size !== 0; });
  36238. if (iters.length === 0) {
  36239. return collection;
  36240. }
  36241. if (iters.length === 1) {
  36242. var singleton = iters[0];
  36243. if (
  36244. singleton === collection ||
  36245. (isKeyedCollection && isKeyed(singleton)) ||
  36246. (isIndexed(collection) && isIndexed(singleton))
  36247. ) {
  36248. return singleton;
  36249. }
  36250. }
  36251. var concatSeq = new ArraySeq(iters);
  36252. if (isKeyedCollection) {
  36253. concatSeq = concatSeq.toKeyedSeq();
  36254. } else if (!isIndexed(collection)) {
  36255. concatSeq = concatSeq.toSetSeq();
  36256. }
  36257. concatSeq = concatSeq.flatten(true);
  36258. concatSeq.size = iters.reduce(function (sum, seq) {
  36259. if (sum !== undefined) {
  36260. var size = seq.size;
  36261. if (size !== undefined) {
  36262. return sum + size;
  36263. }
  36264. }
  36265. }, 0);
  36266. return concatSeq;
  36267. }
  36268. function flattenFactory(collection, depth, useKeys) {
  36269. var flatSequence = makeSequence(collection);
  36270. flatSequence.__iterateUncached = function (fn, reverse) {
  36271. if (reverse) {
  36272. return this.cacheResult().__iterate(fn, reverse);
  36273. }
  36274. var iterations = 0;
  36275. var stopped = false;
  36276. function flatDeep(iter, currentDepth) {
  36277. iter.__iterate(function (v, k) {
  36278. if ((!depth || currentDepth < depth) && isCollection(v)) {
  36279. flatDeep(v, currentDepth + 1);
  36280. } else {
  36281. iterations++;
  36282. if (fn(v, useKeys ? k : iterations - 1, flatSequence) === false) {
  36283. stopped = true;
  36284. }
  36285. }
  36286. return !stopped;
  36287. }, reverse);
  36288. }
  36289. flatDeep(collection, 0);
  36290. return iterations;
  36291. };
  36292. flatSequence.__iteratorUncached = function (type, reverse) {
  36293. if (reverse) {
  36294. return this.cacheResult().__iterator(type, reverse);
  36295. }
  36296. var iterator = collection.__iterator(type, reverse);
  36297. var stack = [];
  36298. var iterations = 0;
  36299. return new Iterator(function () {
  36300. while (iterator) {
  36301. var step = iterator.next();
  36302. if (step.done !== false) {
  36303. iterator = stack.pop();
  36304. continue;
  36305. }
  36306. var v = step.value;
  36307. if (type === ITERATE_ENTRIES) {
  36308. v = v[1];
  36309. }
  36310. if ((!depth || stack.length < depth) && isCollection(v)) {
  36311. stack.push(iterator);
  36312. iterator = v.__iterator(type, reverse);
  36313. } else {
  36314. return useKeys ? step : iteratorValue(type, iterations++, v, step);
  36315. }
  36316. }
  36317. return iteratorDone();
  36318. });
  36319. };
  36320. return flatSequence;
  36321. }
  36322. function flatMapFactory(collection, mapper, context) {
  36323. var coerce = collectionClass(collection);
  36324. return collection
  36325. .toSeq()
  36326. .map(function (v, k) { return coerce(mapper.call(context, v, k, collection)); })
  36327. .flatten(true);
  36328. }
  36329. function interposeFactory(collection, separator) {
  36330. var interposedSequence = makeSequence(collection);
  36331. interposedSequence.size = collection.size && collection.size * 2 - 1;
  36332. interposedSequence.__iterateUncached = function (fn, reverse) {
  36333. var this$1$1 = this;
  36334. var iterations = 0;
  36335. collection.__iterate(
  36336. function (v) { return (!iterations || fn(separator, iterations++, this$1$1) !== false) &&
  36337. fn(v, iterations++, this$1$1) !== false; },
  36338. reverse
  36339. );
  36340. return iterations;
  36341. };
  36342. interposedSequence.__iteratorUncached = function (type, reverse) {
  36343. var iterator = collection.__iterator(ITERATE_VALUES, reverse);
  36344. var iterations = 0;
  36345. var step;
  36346. return new Iterator(function () {
  36347. if (!step || iterations % 2) {
  36348. step = iterator.next();
  36349. if (step.done) {
  36350. return step;
  36351. }
  36352. }
  36353. return iterations % 2
  36354. ? iteratorValue(type, iterations++, separator)
  36355. : iteratorValue(type, iterations++, step.value, step);
  36356. });
  36357. };
  36358. return interposedSequence;
  36359. }
  36360. function sortFactory(collection, comparator, mapper) {
  36361. if (!comparator) {
  36362. comparator = defaultComparator;
  36363. }
  36364. var isKeyedCollection = isKeyed(collection);
  36365. var index = 0;
  36366. var entries = collection
  36367. .toSeq()
  36368. .map(function (v, k) { return [k, v, index++, mapper ? mapper(v, k, collection) : v]; })
  36369. .valueSeq()
  36370. .toArray();
  36371. entries
  36372. .sort(function (a, b) { return comparator(a[3], b[3]) || a[2] - b[2]; })
  36373. .forEach(
  36374. isKeyedCollection
  36375. ? function (v, i) {
  36376. entries[i].length = 2;
  36377. }
  36378. : function (v, i) {
  36379. entries[i] = v[1];
  36380. }
  36381. );
  36382. return isKeyedCollection
  36383. ? KeyedSeq(entries)
  36384. : isIndexed(collection)
  36385. ? IndexedSeq(entries)
  36386. : SetSeq(entries);
  36387. }
  36388. function maxFactory(collection, comparator, mapper) {
  36389. if (!comparator) {
  36390. comparator = defaultComparator;
  36391. }
  36392. if (mapper) {
  36393. var entry = collection
  36394. .toSeq()
  36395. .map(function (v, k) { return [v, mapper(v, k, collection)]; })
  36396. .reduce(function (a, b) { return (maxCompare(comparator, a[1], b[1]) ? b : a); });
  36397. return entry && entry[0];
  36398. }
  36399. return collection.reduce(function (a, b) { return (maxCompare(comparator, a, b) ? b : a); });
  36400. }
  36401. function maxCompare(comparator, a, b) {
  36402. var comp = comparator(b, a);
  36403. // b is considered the new max if the comparator declares them equal, but
  36404. // they are not equal and b is in fact a nullish value.
  36405. return (
  36406. (comp === 0 && b !== a && (b === undefined || b === null || b !== b)) ||
  36407. comp > 0
  36408. );
  36409. }
  36410. function zipWithFactory(keyIter, zipper, iters, zipAll) {
  36411. var zipSequence = makeSequence(keyIter);
  36412. var sizes = new ArraySeq(iters).map(function (i) { return i.size; });
  36413. zipSequence.size = zipAll ? sizes.max() : sizes.min();
  36414. // Note: this a generic base implementation of __iterate in terms of
  36415. // __iterator which may be more generically useful in the future.
  36416. zipSequence.__iterate = function (fn, reverse) {
  36417. /* generic:
  36418. var iterator = this.__iterator(ITERATE_ENTRIES, reverse);
  36419. var step;
  36420. var iterations = 0;
  36421. while (!(step = iterator.next()).done) {
  36422. iterations++;
  36423. if (fn(step.value[1], step.value[0], this) === false) {
  36424. break;
  36425. }
  36426. }
  36427. return iterations;
  36428. */
  36429. // indexed:
  36430. var iterator = this.__iterator(ITERATE_VALUES, reverse);
  36431. var step;
  36432. var iterations = 0;
  36433. while (!(step = iterator.next()).done) {
  36434. if (fn(step.value, iterations++, this) === false) {
  36435. break;
  36436. }
  36437. }
  36438. return iterations;
  36439. };
  36440. zipSequence.__iteratorUncached = function (type, reverse) {
  36441. var iterators = iters.map(
  36442. function (i) { return ((i = Collection(i)), getIterator(reverse ? i.reverse() : i)); }
  36443. );
  36444. var iterations = 0;
  36445. var isDone = false;
  36446. return new Iterator(function () {
  36447. var steps;
  36448. if (!isDone) {
  36449. steps = iterators.map(function (i) { return i.next(); });
  36450. isDone = zipAll ? steps.every(function (s) { return s.done; }) : steps.some(function (s) { return s.done; });
  36451. }
  36452. if (isDone) {
  36453. return iteratorDone();
  36454. }
  36455. return iteratorValue(
  36456. type,
  36457. iterations++,
  36458. zipper.apply(
  36459. null,
  36460. steps.map(function (s) { return s.value; })
  36461. )
  36462. );
  36463. });
  36464. };
  36465. return zipSequence;
  36466. }
  36467. // #pragma Helper Functions
  36468. function reify(iter, seq) {
  36469. return iter === seq ? iter : isSeq(iter) ? seq : iter.constructor(seq);
  36470. }
  36471. function validateEntry(entry) {
  36472. if (entry !== Object(entry)) {
  36473. throw new TypeError('Expected [K, V] tuple: ' + entry);
  36474. }
  36475. }
  36476. function collectionClass(collection) {
  36477. return isKeyed(collection)
  36478. ? KeyedCollection
  36479. : isIndexed(collection)
  36480. ? IndexedCollection
  36481. : SetCollection;
  36482. }
  36483. function makeSequence(collection) {
  36484. return Object.create(
  36485. (isKeyed(collection)
  36486. ? KeyedSeq
  36487. : isIndexed(collection)
  36488. ? IndexedSeq
  36489. : SetSeq
  36490. ).prototype
  36491. );
  36492. }
  36493. function cacheResultThrough() {
  36494. if (this._iter.cacheResult) {
  36495. this._iter.cacheResult();
  36496. this.size = this._iter.size;
  36497. return this;
  36498. }
  36499. return Seq.prototype.cacheResult.call(this);
  36500. }
  36501. function defaultComparator(a, b) {
  36502. if (a === undefined && b === undefined) {
  36503. return 0;
  36504. }
  36505. if (a === undefined) {
  36506. return 1;
  36507. }
  36508. if (b === undefined) {
  36509. return -1;
  36510. }
  36511. return a > b ? 1 : a < b ? -1 : 0;
  36512. }
  36513. function arrCopy(arr, offset) {
  36514. offset = offset || 0;
  36515. var len = Math.max(0, arr.length - offset);
  36516. var newArr = new Array(len);
  36517. for (var ii = 0; ii < len; ii++) {
  36518. newArr[ii] = arr[ii + offset];
  36519. }
  36520. return newArr;
  36521. }
  36522. function invariant(condition, error) {
  36523. if (!condition) { throw new Error(error); }
  36524. }
  36525. function assertNotInfinite(size) {
  36526. invariant(
  36527. size !== Infinity,
  36528. 'Cannot perform this action with an infinite size.'
  36529. );
  36530. }
  36531. function coerceKeyPath(keyPath) {
  36532. if (isArrayLike(keyPath) && typeof keyPath !== 'string') {
  36533. return keyPath;
  36534. }
  36535. if (isOrdered(keyPath)) {
  36536. return keyPath.toArray();
  36537. }
  36538. throw new TypeError(
  36539. 'Invalid keyPath: expected Ordered Collection or Array: ' + keyPath
  36540. );
  36541. }
  36542. var toString = Object.prototype.toString;
  36543. function isPlainObject(value) {
  36544. // The base prototype's toString deals with Argument objects and native namespaces like Math
  36545. if (
  36546. !value ||
  36547. typeof value !== 'object' ||
  36548. toString.call(value) !== '[object Object]'
  36549. ) {
  36550. return false;
  36551. }
  36552. var proto = Object.getPrototypeOf(value);
  36553. if (proto === null) {
  36554. return true;
  36555. }
  36556. // Iteratively going up the prototype chain is needed for cross-realm environments (differing contexts, iframes, etc)
  36557. var parentProto = proto;
  36558. var nextProto = Object.getPrototypeOf(proto);
  36559. while (nextProto !== null) {
  36560. parentProto = nextProto;
  36561. nextProto = Object.getPrototypeOf(parentProto);
  36562. }
  36563. return parentProto === proto;
  36564. }
  36565. /**
  36566. * Returns true if the value is a potentially-persistent data structure, either
  36567. * provided by Immutable.js or a plain Array or Object.
  36568. */
  36569. function isDataStructure(value) {
  36570. return (
  36571. typeof value === 'object' &&
  36572. (isImmutable(value) || Array.isArray(value) || isPlainObject(value))
  36573. );
  36574. }
  36575. function quoteString(value) {
  36576. try {
  36577. return typeof value === 'string' ? JSON.stringify(value) : String(value);
  36578. } catch (_ignoreError) {
  36579. return JSON.stringify(value);
  36580. }
  36581. }
  36582. function has(collection, key) {
  36583. return isImmutable(collection)
  36584. ? collection.has(key)
  36585. : isDataStructure(collection) && hasOwnProperty.call(collection, key);
  36586. }
  36587. function get(collection, key, notSetValue) {
  36588. return isImmutable(collection)
  36589. ? collection.get(key, notSetValue)
  36590. : !has(collection, key)
  36591. ? notSetValue
  36592. : typeof collection.get === 'function'
  36593. ? collection.get(key)
  36594. : collection[key];
  36595. }
  36596. function shallowCopy(from) {
  36597. if (Array.isArray(from)) {
  36598. return arrCopy(from);
  36599. }
  36600. var to = {};
  36601. for (var key in from) {
  36602. if (hasOwnProperty.call(from, key)) {
  36603. to[key] = from[key];
  36604. }
  36605. }
  36606. return to;
  36607. }
  36608. function remove(collection, key) {
  36609. if (!isDataStructure(collection)) {
  36610. throw new TypeError(
  36611. 'Cannot update non-data-structure value: ' + collection
  36612. );
  36613. }
  36614. if (isImmutable(collection)) {
  36615. if (!collection.remove) {
  36616. throw new TypeError(
  36617. 'Cannot update immutable value without .remove() method: ' + collection
  36618. );
  36619. }
  36620. return collection.remove(key);
  36621. }
  36622. if (!hasOwnProperty.call(collection, key)) {
  36623. return collection;
  36624. }
  36625. var collectionCopy = shallowCopy(collection);
  36626. if (Array.isArray(collectionCopy)) {
  36627. collectionCopy.splice(key, 1);
  36628. } else {
  36629. delete collectionCopy[key];
  36630. }
  36631. return collectionCopy;
  36632. }
  36633. function set(collection, key, value) {
  36634. if (!isDataStructure(collection)) {
  36635. throw new TypeError(
  36636. 'Cannot update non-data-structure value: ' + collection
  36637. );
  36638. }
  36639. if (isImmutable(collection)) {
  36640. if (!collection.set) {
  36641. throw new TypeError(
  36642. 'Cannot update immutable value without .set() method: ' + collection
  36643. );
  36644. }
  36645. return collection.set(key, value);
  36646. }
  36647. if (hasOwnProperty.call(collection, key) && value === collection[key]) {
  36648. return collection;
  36649. }
  36650. var collectionCopy = shallowCopy(collection);
  36651. collectionCopy[key] = value;
  36652. return collectionCopy;
  36653. }
  36654. function updateIn$1(collection, keyPath, notSetValue, updater) {
  36655. if (!updater) {
  36656. updater = notSetValue;
  36657. notSetValue = undefined;
  36658. }
  36659. var updatedValue = updateInDeeply(
  36660. isImmutable(collection),
  36661. collection,
  36662. coerceKeyPath(keyPath),
  36663. 0,
  36664. notSetValue,
  36665. updater
  36666. );
  36667. return updatedValue === NOT_SET ? notSetValue : updatedValue;
  36668. }
  36669. function updateInDeeply(
  36670. inImmutable,
  36671. existing,
  36672. keyPath,
  36673. i,
  36674. notSetValue,
  36675. updater
  36676. ) {
  36677. var wasNotSet = existing === NOT_SET;
  36678. if (i === keyPath.length) {
  36679. var existingValue = wasNotSet ? notSetValue : existing;
  36680. var newValue = updater(existingValue);
  36681. return newValue === existingValue ? existing : newValue;
  36682. }
  36683. if (!wasNotSet && !isDataStructure(existing)) {
  36684. throw new TypeError(
  36685. 'Cannot update within non-data-structure value in path [' +
  36686. keyPath.slice(0, i).map(quoteString) +
  36687. ']: ' +
  36688. existing
  36689. );
  36690. }
  36691. var key = keyPath[i];
  36692. var nextExisting = wasNotSet ? NOT_SET : get(existing, key, NOT_SET);
  36693. var nextUpdated = updateInDeeply(
  36694. nextExisting === NOT_SET ? inImmutable : isImmutable(nextExisting),
  36695. nextExisting,
  36696. keyPath,
  36697. i + 1,
  36698. notSetValue,
  36699. updater
  36700. );
  36701. return nextUpdated === nextExisting
  36702. ? existing
  36703. : nextUpdated === NOT_SET
  36704. ? remove(existing, key)
  36705. : set(
  36706. wasNotSet ? (inImmutable ? emptyMap() : {}) : existing,
  36707. key,
  36708. nextUpdated
  36709. );
  36710. }
  36711. function setIn$1(collection, keyPath, value) {
  36712. return updateIn$1(collection, keyPath, NOT_SET, function () { return value; });
  36713. }
  36714. function setIn(keyPath, v) {
  36715. return setIn$1(this, keyPath, v);
  36716. }
  36717. function removeIn(collection, keyPath) {
  36718. return updateIn$1(collection, keyPath, function () { return NOT_SET; });
  36719. }
  36720. function deleteIn(keyPath) {
  36721. return removeIn(this, keyPath);
  36722. }
  36723. function update$1(collection, key, notSetValue, updater) {
  36724. return updateIn$1(collection, [key], notSetValue, updater);
  36725. }
  36726. function update(key, notSetValue, updater) {
  36727. return arguments.length === 1
  36728. ? key(this)
  36729. : update$1(this, key, notSetValue, updater);
  36730. }
  36731. function updateIn(keyPath, notSetValue, updater) {
  36732. return updateIn$1(this, keyPath, notSetValue, updater);
  36733. }
  36734. function merge$1() {
  36735. var iters = [], len = arguments.length;
  36736. while ( len-- ) iters[ len ] = arguments[ len ];
  36737. return mergeIntoKeyedWith(this, iters);
  36738. }
  36739. function mergeWith$1(merger) {
  36740. var iters = [], len = arguments.length - 1;
  36741. while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ];
  36742. if (typeof merger !== 'function') {
  36743. throw new TypeError('Invalid merger function: ' + merger);
  36744. }
  36745. return mergeIntoKeyedWith(this, iters, merger);
  36746. }
  36747. function mergeIntoKeyedWith(collection, collections, merger) {
  36748. var iters = [];
  36749. for (var ii = 0; ii < collections.length; ii++) {
  36750. var collection$1 = KeyedCollection(collections[ii]);
  36751. if (collection$1.size !== 0) {
  36752. iters.push(collection$1);
  36753. }
  36754. }
  36755. if (iters.length === 0) {
  36756. return collection;
  36757. }
  36758. if (
  36759. collection.toSeq().size === 0 &&
  36760. !collection.__ownerID &&
  36761. iters.length === 1
  36762. ) {
  36763. return collection.constructor(iters[0]);
  36764. }
  36765. return collection.withMutations(function (collection) {
  36766. var mergeIntoCollection = merger
  36767. ? function (value, key) {
  36768. update$1(collection, key, NOT_SET, function (oldVal) { return oldVal === NOT_SET ? value : merger(oldVal, value, key); }
  36769. );
  36770. }
  36771. : function (value, key) {
  36772. collection.set(key, value);
  36773. };
  36774. for (var ii = 0; ii < iters.length; ii++) {
  36775. iters[ii].forEach(mergeIntoCollection);
  36776. }
  36777. });
  36778. }
  36779. function merge(collection) {
  36780. var sources = [], len = arguments.length - 1;
  36781. while ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ];
  36782. return mergeWithSources(collection, sources);
  36783. }
  36784. function mergeWith(merger, collection) {
  36785. var sources = [], len = arguments.length - 2;
  36786. while ( len-- > 0 ) sources[ len ] = arguments[ len + 2 ];
  36787. return mergeWithSources(collection, sources, merger);
  36788. }
  36789. function mergeDeep$1(collection) {
  36790. var sources = [], len = arguments.length - 1;
  36791. while ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ];
  36792. return mergeDeepWithSources(collection, sources);
  36793. }
  36794. function mergeDeepWith$1(merger, collection) {
  36795. var sources = [], len = arguments.length - 2;
  36796. while ( len-- > 0 ) sources[ len ] = arguments[ len + 2 ];
  36797. return mergeDeepWithSources(collection, sources, merger);
  36798. }
  36799. function mergeDeepWithSources(collection, sources, merger) {
  36800. return mergeWithSources(collection, sources, deepMergerWith(merger));
  36801. }
  36802. function mergeWithSources(collection, sources, merger) {
  36803. if (!isDataStructure(collection)) {
  36804. throw new TypeError(
  36805. 'Cannot merge into non-data-structure value: ' + collection
  36806. );
  36807. }
  36808. if (isImmutable(collection)) {
  36809. return typeof merger === 'function' && collection.mergeWith
  36810. ? collection.mergeWith.apply(collection, [ merger ].concat( sources ))
  36811. : collection.merge
  36812. ? collection.merge.apply(collection, sources)
  36813. : collection.concat.apply(collection, sources);
  36814. }
  36815. var isArray = Array.isArray(collection);
  36816. var merged = collection;
  36817. var Collection = isArray ? IndexedCollection : KeyedCollection;
  36818. var mergeItem = isArray
  36819. ? function (value) {
  36820. // Copy on write
  36821. if (merged === collection) {
  36822. merged = shallowCopy(merged);
  36823. }
  36824. merged.push(value);
  36825. }
  36826. : function (value, key) {
  36827. var hasVal = hasOwnProperty.call(merged, key);
  36828. var nextVal =
  36829. hasVal && merger ? merger(merged[key], value, key) : value;
  36830. if (!hasVal || nextVal !== merged[key]) {
  36831. // Copy on write
  36832. if (merged === collection) {
  36833. merged = shallowCopy(merged);
  36834. }
  36835. merged[key] = nextVal;
  36836. }
  36837. };
  36838. for (var i = 0; i < sources.length; i++) {
  36839. Collection(sources[i]).forEach(mergeItem);
  36840. }
  36841. return merged;
  36842. }
  36843. function deepMergerWith(merger) {
  36844. function deepMerger(oldValue, newValue, key) {
  36845. return isDataStructure(oldValue) &&
  36846. isDataStructure(newValue) &&
  36847. areMergeable(oldValue, newValue)
  36848. ? mergeWithSources(oldValue, [newValue], deepMerger)
  36849. : merger
  36850. ? merger(oldValue, newValue, key)
  36851. : newValue;
  36852. }
  36853. return deepMerger;
  36854. }
  36855. /**
  36856. * It's unclear what the desired behavior is for merging two collections that
  36857. * fall into separate categories between keyed, indexed, or set-like, so we only
  36858. * consider them mergeable if they fall into the same category.
  36859. */
  36860. function areMergeable(oldDataStructure, newDataStructure) {
  36861. var oldSeq = Seq(oldDataStructure);
  36862. var newSeq = Seq(newDataStructure);
  36863. // This logic assumes that a sequence can only fall into one of the three
  36864. // categories mentioned above (since there's no `isSetLike()` method).
  36865. return (
  36866. isIndexed(oldSeq) === isIndexed(newSeq) &&
  36867. isKeyed(oldSeq) === isKeyed(newSeq)
  36868. );
  36869. }
  36870. function mergeDeep() {
  36871. var iters = [], len = arguments.length;
  36872. while ( len-- ) iters[ len ] = arguments[ len ];
  36873. return mergeDeepWithSources(this, iters);
  36874. }
  36875. function mergeDeepWith(merger) {
  36876. var iters = [], len = arguments.length - 1;
  36877. while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ];
  36878. return mergeDeepWithSources(this, iters, merger);
  36879. }
  36880. function mergeIn(keyPath) {
  36881. var iters = [], len = arguments.length - 1;
  36882. while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ];
  36883. return updateIn$1(this, keyPath, emptyMap(), function (m) { return mergeWithSources(m, iters); });
  36884. }
  36885. function mergeDeepIn(keyPath) {
  36886. var iters = [], len = arguments.length - 1;
  36887. while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ];
  36888. return updateIn$1(this, keyPath, emptyMap(), function (m) { return mergeDeepWithSources(m, iters); }
  36889. );
  36890. }
  36891. function withMutations(fn) {
  36892. var mutable = this.asMutable();
  36893. fn(mutable);
  36894. return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this;
  36895. }
  36896. function asMutable() {
  36897. return this.__ownerID ? this : this.__ensureOwner(new OwnerID());
  36898. }
  36899. function asImmutable() {
  36900. return this.__ensureOwner();
  36901. }
  36902. function wasAltered() {
  36903. return this.__altered;
  36904. }
  36905. var Map = /*@__PURE__*/(function (KeyedCollection) {
  36906. function Map(value) {
  36907. return value === null || value === undefined
  36908. ? emptyMap()
  36909. : isMap(value) && !isOrdered(value)
  36910. ? value
  36911. : emptyMap().withMutations(function (map) {
  36912. var iter = KeyedCollection(value);
  36913. assertNotInfinite(iter.size);
  36914. iter.forEach(function (v, k) { return map.set(k, v); });
  36915. });
  36916. }
  36917. if ( KeyedCollection ) Map.__proto__ = KeyedCollection;
  36918. Map.prototype = Object.create( KeyedCollection && KeyedCollection.prototype );
  36919. Map.prototype.constructor = Map;
  36920. Map.of = function of () {
  36921. var keyValues = [], len = arguments.length;
  36922. while ( len-- ) keyValues[ len ] = arguments[ len ];
  36923. return emptyMap().withMutations(function (map) {
  36924. for (var i = 0; i < keyValues.length; i += 2) {
  36925. if (i + 1 >= keyValues.length) {
  36926. throw new Error('Missing value for key: ' + keyValues[i]);
  36927. }
  36928. map.set(keyValues[i], keyValues[i + 1]);
  36929. }
  36930. });
  36931. };
  36932. Map.prototype.toString = function toString () {
  36933. return this.__toString('Map {', '}');
  36934. };
  36935. // @pragma Access
  36936. Map.prototype.get = function get (k, notSetValue) {
  36937. return this._root
  36938. ? this._root.get(0, undefined, k, notSetValue)
  36939. : notSetValue;
  36940. };
  36941. // @pragma Modification
  36942. Map.prototype.set = function set (k, v) {
  36943. return updateMap(this, k, v);
  36944. };
  36945. Map.prototype.remove = function remove (k) {
  36946. return updateMap(this, k, NOT_SET);
  36947. };
  36948. Map.prototype.deleteAll = function deleteAll (keys) {
  36949. var collection = Collection(keys);
  36950. if (collection.size === 0) {
  36951. return this;
  36952. }
  36953. return this.withMutations(function (map) {
  36954. collection.forEach(function (key) { return map.remove(key); });
  36955. });
  36956. };
  36957. Map.prototype.clear = function clear () {
  36958. if (this.size === 0) {
  36959. return this;
  36960. }
  36961. if (this.__ownerID) {
  36962. this.size = 0;
  36963. this._root = null;
  36964. this.__hash = undefined;
  36965. this.__altered = true;
  36966. return this;
  36967. }
  36968. return emptyMap();
  36969. };
  36970. // @pragma Composition
  36971. Map.prototype.sort = function sort (comparator) {
  36972. // Late binding
  36973. return OrderedMap(sortFactory(this, comparator));
  36974. };
  36975. Map.prototype.sortBy = function sortBy (mapper, comparator) {
  36976. // Late binding
  36977. return OrderedMap(sortFactory(this, comparator, mapper));
  36978. };
  36979. Map.prototype.map = function map (mapper, context) {
  36980. var this$1$1 = this;
  36981. return this.withMutations(function (map) {
  36982. map.forEach(function (value, key) {
  36983. map.set(key, mapper.call(context, value, key, this$1$1));
  36984. });
  36985. });
  36986. };
  36987. // @pragma Mutability
  36988. Map.prototype.__iterator = function __iterator (type, reverse) {
  36989. return new MapIterator(this, type, reverse);
  36990. };
  36991. Map.prototype.__iterate = function __iterate (fn, reverse) {
  36992. var this$1$1 = this;
  36993. var iterations = 0;
  36994. this._root &&
  36995. this._root.iterate(function (entry) {
  36996. iterations++;
  36997. return fn(entry[1], entry[0], this$1$1);
  36998. }, reverse);
  36999. return iterations;
  37000. };
  37001. Map.prototype.__ensureOwner = function __ensureOwner (ownerID) {
  37002. if (ownerID === this.__ownerID) {
  37003. return this;
  37004. }
  37005. if (!ownerID) {
  37006. if (this.size === 0) {
  37007. return emptyMap();
  37008. }
  37009. this.__ownerID = ownerID;
  37010. this.__altered = false;
  37011. return this;
  37012. }
  37013. return makeMap(this.size, this._root, ownerID, this.__hash);
  37014. };
  37015. return Map;
  37016. }(KeyedCollection));
  37017. Map.isMap = isMap;
  37018. var MapPrototype = Map.prototype;
  37019. MapPrototype[IS_MAP_SYMBOL] = true;
  37020. MapPrototype[DELETE] = MapPrototype.remove;
  37021. MapPrototype.removeAll = MapPrototype.deleteAll;
  37022. MapPrototype.setIn = setIn;
  37023. MapPrototype.removeIn = MapPrototype.deleteIn = deleteIn;
  37024. MapPrototype.update = update;
  37025. MapPrototype.updateIn = updateIn;
  37026. MapPrototype.merge = MapPrototype.concat = merge$1;
  37027. MapPrototype.mergeWith = mergeWith$1;
  37028. MapPrototype.mergeDeep = mergeDeep;
  37029. MapPrototype.mergeDeepWith = mergeDeepWith;
  37030. MapPrototype.mergeIn = mergeIn;
  37031. MapPrototype.mergeDeepIn = mergeDeepIn;
  37032. MapPrototype.withMutations = withMutations;
  37033. MapPrototype.wasAltered = wasAltered;
  37034. MapPrototype.asImmutable = asImmutable;
  37035. MapPrototype['@@transducer/init'] = MapPrototype.asMutable = asMutable;
  37036. MapPrototype['@@transducer/step'] = function (result, arr) {
  37037. return result.set(arr[0], arr[1]);
  37038. };
  37039. MapPrototype['@@transducer/result'] = function (obj) {
  37040. return obj.asImmutable();
  37041. };
  37042. // #pragma Trie Nodes
  37043. var ArrayMapNode = function ArrayMapNode(ownerID, entries) {
  37044. this.ownerID = ownerID;
  37045. this.entries = entries;
  37046. };
  37047. ArrayMapNode.prototype.get = function get (shift, keyHash, key, notSetValue) {
  37048. var entries = this.entries;
  37049. for (var ii = 0, len = entries.length; ii < len; ii++) {
  37050. if (is(key, entries[ii][0])) {
  37051. return entries[ii][1];
  37052. }
  37053. }
  37054. return notSetValue;
  37055. };
  37056. ArrayMapNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
  37057. var removed = value === NOT_SET;
  37058. var entries = this.entries;
  37059. var idx = 0;
  37060. var len = entries.length;
  37061. for (; idx < len; idx++) {
  37062. if (is(key, entries[idx][0])) {
  37063. break;
  37064. }
  37065. }
  37066. var exists = idx < len;
  37067. if (exists ? entries[idx][1] === value : removed) {
  37068. return this;
  37069. }
  37070. SetRef(didAlter);
  37071. (removed || !exists) && SetRef(didChangeSize);
  37072. if (removed && entries.length === 1) {
  37073. return; // undefined
  37074. }
  37075. if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) {
  37076. return createNodes(ownerID, entries, key, value);
  37077. }
  37078. var isEditable = ownerID && ownerID === this.ownerID;
  37079. var newEntries = isEditable ? entries : arrCopy(entries);
  37080. if (exists) {
  37081. if (removed) {
  37082. idx === len - 1
  37083. ? newEntries.pop()
  37084. : (newEntries[idx] = newEntries.pop());
  37085. } else {
  37086. newEntries[idx] = [key, value];
  37087. }
  37088. } else {
  37089. newEntries.push([key, value]);
  37090. }
  37091. if (isEditable) {
  37092. this.entries = newEntries;
  37093. return this;
  37094. }
  37095. return new ArrayMapNode(ownerID, newEntries);
  37096. };
  37097. var BitmapIndexedNode = function BitmapIndexedNode(ownerID, bitmap, nodes) {
  37098. this.ownerID = ownerID;
  37099. this.bitmap = bitmap;
  37100. this.nodes = nodes;
  37101. };
  37102. BitmapIndexedNode.prototype.get = function get (shift, keyHash, key, notSetValue) {
  37103. if (keyHash === undefined) {
  37104. keyHash = hash(key);
  37105. }
  37106. var bit = 1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK);
  37107. var bitmap = this.bitmap;
  37108. return (bitmap & bit) === 0
  37109. ? notSetValue
  37110. : this.nodes[popCount(bitmap & (bit - 1))].get(
  37111. shift + SHIFT,
  37112. keyHash,
  37113. key,
  37114. notSetValue
  37115. );
  37116. };
  37117. BitmapIndexedNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
  37118. if (keyHash === undefined) {
  37119. keyHash = hash(key);
  37120. }
  37121. var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;
  37122. var bit = 1 << keyHashFrag;
  37123. var bitmap = this.bitmap;
  37124. var exists = (bitmap & bit) !== 0;
  37125. if (!exists && value === NOT_SET) {
  37126. return this;
  37127. }
  37128. var idx = popCount(bitmap & (bit - 1));
  37129. var nodes = this.nodes;
  37130. var node = exists ? nodes[idx] : undefined;
  37131. var newNode = updateNode(
  37132. node,
  37133. ownerID,
  37134. shift + SHIFT,
  37135. keyHash,
  37136. key,
  37137. value,
  37138. didChangeSize,
  37139. didAlter
  37140. );
  37141. if (newNode === node) {
  37142. return this;
  37143. }
  37144. if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) {
  37145. return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode);
  37146. }
  37147. if (
  37148. exists &&
  37149. !newNode &&
  37150. nodes.length === 2 &&
  37151. isLeafNode(nodes[idx ^ 1])
  37152. ) {
  37153. return nodes[idx ^ 1];
  37154. }
  37155. if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) {
  37156. return newNode;
  37157. }
  37158. var isEditable = ownerID && ownerID === this.ownerID;
  37159. var newBitmap = exists ? (newNode ? bitmap : bitmap ^ bit) : bitmap | bit;
  37160. var newNodes = exists
  37161. ? newNode
  37162. ? setAt(nodes, idx, newNode, isEditable)
  37163. : spliceOut(nodes, idx, isEditable)
  37164. : spliceIn(nodes, idx, newNode, isEditable);
  37165. if (isEditable) {
  37166. this.bitmap = newBitmap;
  37167. this.nodes = newNodes;
  37168. return this;
  37169. }
  37170. return new BitmapIndexedNode(ownerID, newBitmap, newNodes);
  37171. };
  37172. var HashArrayMapNode = function HashArrayMapNode(ownerID, count, nodes) {
  37173. this.ownerID = ownerID;
  37174. this.count = count;
  37175. this.nodes = nodes;
  37176. };
  37177. HashArrayMapNode.prototype.get = function get (shift, keyHash, key, notSetValue) {
  37178. if (keyHash === undefined) {
  37179. keyHash = hash(key);
  37180. }
  37181. var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;
  37182. var node = this.nodes[idx];
  37183. return node
  37184. ? node.get(shift + SHIFT, keyHash, key, notSetValue)
  37185. : notSetValue;
  37186. };
  37187. HashArrayMapNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
  37188. if (keyHash === undefined) {
  37189. keyHash = hash(key);
  37190. }
  37191. var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;
  37192. var removed = value === NOT_SET;
  37193. var nodes = this.nodes;
  37194. var node = nodes[idx];
  37195. if (removed && !node) {
  37196. return this;
  37197. }
  37198. var newNode = updateNode(
  37199. node,
  37200. ownerID,
  37201. shift + SHIFT,
  37202. keyHash,
  37203. key,
  37204. value,
  37205. didChangeSize,
  37206. didAlter
  37207. );
  37208. if (newNode === node) {
  37209. return this;
  37210. }
  37211. var newCount = this.count;
  37212. if (!node) {
  37213. newCount++;
  37214. } else if (!newNode) {
  37215. newCount--;
  37216. if (newCount < MIN_HASH_ARRAY_MAP_SIZE) {
  37217. return packNodes(ownerID, nodes, newCount, idx);
  37218. }
  37219. }
  37220. var isEditable = ownerID && ownerID === this.ownerID;
  37221. var newNodes = setAt(nodes, idx, newNode, isEditable);
  37222. if (isEditable) {
  37223. this.count = newCount;
  37224. this.nodes = newNodes;
  37225. return this;
  37226. }
  37227. return new HashArrayMapNode(ownerID, newCount, newNodes);
  37228. };
  37229. var HashCollisionNode = function HashCollisionNode(ownerID, keyHash, entries) {
  37230. this.ownerID = ownerID;
  37231. this.keyHash = keyHash;
  37232. this.entries = entries;
  37233. };
  37234. HashCollisionNode.prototype.get = function get (shift, keyHash, key, notSetValue) {
  37235. var entries = this.entries;
  37236. for (var ii = 0, len = entries.length; ii < len; ii++) {
  37237. if (is(key, entries[ii][0])) {
  37238. return entries[ii][1];
  37239. }
  37240. }
  37241. return notSetValue;
  37242. };
  37243. HashCollisionNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
  37244. if (keyHash === undefined) {
  37245. keyHash = hash(key);
  37246. }
  37247. var removed = value === NOT_SET;
  37248. if (keyHash !== this.keyHash) {
  37249. if (removed) {
  37250. return this;
  37251. }
  37252. SetRef(didAlter);
  37253. SetRef(didChangeSize);
  37254. return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]);
  37255. }
  37256. var entries = this.entries;
  37257. var idx = 0;
  37258. var len = entries.length;
  37259. for (; idx < len; idx++) {
  37260. if (is(key, entries[idx][0])) {
  37261. break;
  37262. }
  37263. }
  37264. var exists = idx < len;
  37265. if (exists ? entries[idx][1] === value : removed) {
  37266. return this;
  37267. }
  37268. SetRef(didAlter);
  37269. (removed || !exists) && SetRef(didChangeSize);
  37270. if (removed && len === 2) {
  37271. return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]);
  37272. }
  37273. var isEditable = ownerID && ownerID === this.ownerID;
  37274. var newEntries = isEditable ? entries : arrCopy(entries);
  37275. if (exists) {
  37276. if (removed) {
  37277. idx === len - 1
  37278. ? newEntries.pop()
  37279. : (newEntries[idx] = newEntries.pop());
  37280. } else {
  37281. newEntries[idx] = [key, value];
  37282. }
  37283. } else {
  37284. newEntries.push([key, value]);
  37285. }
  37286. if (isEditable) {
  37287. this.entries = newEntries;
  37288. return this;
  37289. }
  37290. return new HashCollisionNode(ownerID, this.keyHash, newEntries);
  37291. };
  37292. var ValueNode = function ValueNode(ownerID, keyHash, entry) {
  37293. this.ownerID = ownerID;
  37294. this.keyHash = keyHash;
  37295. this.entry = entry;
  37296. };
  37297. ValueNode.prototype.get = function get (shift, keyHash, key, notSetValue) {
  37298. return is(key, this.entry[0]) ? this.entry[1] : notSetValue;
  37299. };
  37300. ValueNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
  37301. var removed = value === NOT_SET;
  37302. var keyMatch = is(key, this.entry[0]);
  37303. if (keyMatch ? value === this.entry[1] : removed) {
  37304. return this;
  37305. }
  37306. SetRef(didAlter);
  37307. if (removed) {
  37308. SetRef(didChangeSize);
  37309. return; // undefined
  37310. }
  37311. if (keyMatch) {
  37312. if (ownerID && ownerID === this.ownerID) {
  37313. this.entry[1] = value;
  37314. return this;
  37315. }
  37316. return new ValueNode(ownerID, this.keyHash, [key, value]);
  37317. }
  37318. SetRef(didChangeSize);
  37319. return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]);
  37320. };
  37321. // #pragma Iterators
  37322. ArrayMapNode.prototype.iterate = HashCollisionNode.prototype.iterate =
  37323. function (fn, reverse) {
  37324. var entries = this.entries;
  37325. for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) {
  37326. if (fn(entries[reverse ? maxIndex - ii : ii]) === false) {
  37327. return false;
  37328. }
  37329. }
  37330. };
  37331. BitmapIndexedNode.prototype.iterate = HashArrayMapNode.prototype.iterate =
  37332. function (fn, reverse) {
  37333. var nodes = this.nodes;
  37334. for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) {
  37335. var node = nodes[reverse ? maxIndex - ii : ii];
  37336. if (node && node.iterate(fn, reverse) === false) {
  37337. return false;
  37338. }
  37339. }
  37340. };
  37341. // eslint-disable-next-line no-unused-vars
  37342. ValueNode.prototype.iterate = function (fn, reverse) {
  37343. return fn(this.entry);
  37344. };
  37345. var MapIterator = /*@__PURE__*/(function (Iterator) {
  37346. function MapIterator(map, type, reverse) {
  37347. this._type = type;
  37348. this._reverse = reverse;
  37349. this._stack = map._root && mapIteratorFrame(map._root);
  37350. }
  37351. if ( Iterator ) MapIterator.__proto__ = Iterator;
  37352. MapIterator.prototype = Object.create( Iterator && Iterator.prototype );
  37353. MapIterator.prototype.constructor = MapIterator;
  37354. MapIterator.prototype.next = function next () {
  37355. var type = this._type;
  37356. var stack = this._stack;
  37357. while (stack) {
  37358. var node = stack.node;
  37359. var index = stack.index++;
  37360. var maxIndex = (void 0);
  37361. if (node.entry) {
  37362. if (index === 0) {
  37363. return mapIteratorValue(type, node.entry);
  37364. }
  37365. } else if (node.entries) {
  37366. maxIndex = node.entries.length - 1;
  37367. if (index <= maxIndex) {
  37368. return mapIteratorValue(
  37369. type,
  37370. node.entries[this._reverse ? maxIndex - index : index]
  37371. );
  37372. }
  37373. } else {
  37374. maxIndex = node.nodes.length - 1;
  37375. if (index <= maxIndex) {
  37376. var subNode = node.nodes[this._reverse ? maxIndex - index : index];
  37377. if (subNode) {
  37378. if (subNode.entry) {
  37379. return mapIteratorValue(type, subNode.entry);
  37380. }
  37381. stack = this._stack = mapIteratorFrame(subNode, stack);
  37382. }
  37383. continue;
  37384. }
  37385. }
  37386. stack = this._stack = this._stack.__prev;
  37387. }
  37388. return iteratorDone();
  37389. };
  37390. return MapIterator;
  37391. }(Iterator));
  37392. function mapIteratorValue(type, entry) {
  37393. return iteratorValue(type, entry[0], entry[1]);
  37394. }
  37395. function mapIteratorFrame(node, prev) {
  37396. return {
  37397. node: node,
  37398. index: 0,
  37399. __prev: prev,
  37400. };
  37401. }
  37402. function makeMap(size, root, ownerID, hash) {
  37403. var map = Object.create(MapPrototype);
  37404. map.size = size;
  37405. map._root = root;
  37406. map.__ownerID = ownerID;
  37407. map.__hash = hash;
  37408. map.__altered = false;
  37409. return map;
  37410. }
  37411. var EMPTY_MAP;
  37412. function emptyMap() {
  37413. return EMPTY_MAP || (EMPTY_MAP = makeMap(0));
  37414. }
  37415. function updateMap(map, k, v) {
  37416. var newRoot;
  37417. var newSize;
  37418. if (!map._root) {
  37419. if (v === NOT_SET) {
  37420. return map;
  37421. }
  37422. newSize = 1;
  37423. newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]);
  37424. } else {
  37425. var didChangeSize = MakeRef();
  37426. var didAlter = MakeRef();
  37427. newRoot = updateNode(
  37428. map._root,
  37429. map.__ownerID,
  37430. 0,
  37431. undefined,
  37432. k,
  37433. v,
  37434. didChangeSize,
  37435. didAlter
  37436. );
  37437. if (!didAlter.value) {
  37438. return map;
  37439. }
  37440. newSize = map.size + (didChangeSize.value ? (v === NOT_SET ? -1 : 1) : 0);
  37441. }
  37442. if (map.__ownerID) {
  37443. map.size = newSize;
  37444. map._root = newRoot;
  37445. map.__hash = undefined;
  37446. map.__altered = true;
  37447. return map;
  37448. }
  37449. return newRoot ? makeMap(newSize, newRoot) : emptyMap();
  37450. }
  37451. function updateNode(
  37452. node,
  37453. ownerID,
  37454. shift,
  37455. keyHash,
  37456. key,
  37457. value,
  37458. didChangeSize,
  37459. didAlter
  37460. ) {
  37461. if (!node) {
  37462. if (value === NOT_SET) {
  37463. return node;
  37464. }
  37465. SetRef(didAlter);
  37466. SetRef(didChangeSize);
  37467. return new ValueNode(ownerID, keyHash, [key, value]);
  37468. }
  37469. return node.update(
  37470. ownerID,
  37471. shift,
  37472. keyHash,
  37473. key,
  37474. value,
  37475. didChangeSize,
  37476. didAlter
  37477. );
  37478. }
  37479. function isLeafNode(node) {
  37480. return (
  37481. node.constructor === ValueNode || node.constructor === HashCollisionNode
  37482. );
  37483. }
  37484. function mergeIntoNode(node, ownerID, shift, keyHash, entry) {
  37485. if (node.keyHash === keyHash) {
  37486. return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]);
  37487. }
  37488. var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK;
  37489. var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;
  37490. var newNode;
  37491. var nodes =
  37492. idx1 === idx2
  37493. ? [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)]
  37494. : ((newNode = new ValueNode(ownerID, keyHash, entry)),
  37495. idx1 < idx2 ? [node, newNode] : [newNode, node]);
  37496. return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes);
  37497. }
  37498. function createNodes(ownerID, entries, key, value) {
  37499. if (!ownerID) {
  37500. ownerID = new OwnerID();
  37501. }
  37502. var node = new ValueNode(ownerID, hash(key), [key, value]);
  37503. for (var ii = 0; ii < entries.length; ii++) {
  37504. var entry = entries[ii];
  37505. node = node.update(ownerID, 0, undefined, entry[0], entry[1]);
  37506. }
  37507. return node;
  37508. }
  37509. function packNodes(ownerID, nodes, count, excluding) {
  37510. var bitmap = 0;
  37511. var packedII = 0;
  37512. var packedNodes = new Array(count);
  37513. for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) {
  37514. var node = nodes[ii];
  37515. if (node !== undefined && ii !== excluding) {
  37516. bitmap |= bit;
  37517. packedNodes[packedII++] = node;
  37518. }
  37519. }
  37520. return new BitmapIndexedNode(ownerID, bitmap, packedNodes);
  37521. }
  37522. function expandNodes(ownerID, nodes, bitmap, including, node) {
  37523. var count = 0;
  37524. var expandedNodes = new Array(SIZE);
  37525. for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) {
  37526. expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined;
  37527. }
  37528. expandedNodes[including] = node;
  37529. return new HashArrayMapNode(ownerID, count + 1, expandedNodes);
  37530. }
  37531. function popCount(x) {
  37532. x -= (x >> 1) & 0x55555555;
  37533. x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
  37534. x = (x + (x >> 4)) & 0x0f0f0f0f;
  37535. x += x >> 8;
  37536. x += x >> 16;
  37537. return x & 0x7f;
  37538. }
  37539. function setAt(array, idx, val, canEdit) {
  37540. var newArray = canEdit ? array : arrCopy(array);
  37541. newArray[idx] = val;
  37542. return newArray;
  37543. }
  37544. function spliceIn(array, idx, val, canEdit) {
  37545. var newLen = array.length + 1;
  37546. if (canEdit && idx + 1 === newLen) {
  37547. array[idx] = val;
  37548. return array;
  37549. }
  37550. var newArray = new Array(newLen);
  37551. var after = 0;
  37552. for (var ii = 0; ii < newLen; ii++) {
  37553. if (ii === idx) {
  37554. newArray[ii] = val;
  37555. after = -1;
  37556. } else {
  37557. newArray[ii] = array[ii + after];
  37558. }
  37559. }
  37560. return newArray;
  37561. }
  37562. function spliceOut(array, idx, canEdit) {
  37563. var newLen = array.length - 1;
  37564. if (canEdit && idx === newLen) {
  37565. array.pop();
  37566. return array;
  37567. }
  37568. var newArray = new Array(newLen);
  37569. var after = 0;
  37570. for (var ii = 0; ii < newLen; ii++) {
  37571. if (ii === idx) {
  37572. after = 1;
  37573. }
  37574. newArray[ii] = array[ii + after];
  37575. }
  37576. return newArray;
  37577. }
  37578. var MAX_ARRAY_MAP_SIZE = SIZE / 4;
  37579. var MAX_BITMAP_INDEXED_SIZE = SIZE / 2;
  37580. var MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4;
  37581. var IS_LIST_SYMBOL = '@@__IMMUTABLE_LIST__@@';
  37582. function isList(maybeList) {
  37583. return Boolean(maybeList && maybeList[IS_LIST_SYMBOL]);
  37584. }
  37585. var List = /*@__PURE__*/(function (IndexedCollection) {
  37586. function List(value) {
  37587. var empty = emptyList();
  37588. if (value === null || value === undefined) {
  37589. return empty;
  37590. }
  37591. if (isList(value)) {
  37592. return value;
  37593. }
  37594. var iter = IndexedCollection(value);
  37595. var size = iter.size;
  37596. if (size === 0) {
  37597. return empty;
  37598. }
  37599. assertNotInfinite(size);
  37600. if (size > 0 && size < SIZE) {
  37601. return makeList(0, size, SHIFT, null, new VNode(iter.toArray()));
  37602. }
  37603. return empty.withMutations(function (list) {
  37604. list.setSize(size);
  37605. iter.forEach(function (v, i) { return list.set(i, v); });
  37606. });
  37607. }
  37608. if ( IndexedCollection ) List.__proto__ = IndexedCollection;
  37609. List.prototype = Object.create( IndexedCollection && IndexedCollection.prototype );
  37610. List.prototype.constructor = List;
  37611. List.of = function of (/*...values*/) {
  37612. return this(arguments);
  37613. };
  37614. List.prototype.toString = function toString () {
  37615. return this.__toString('List [', ']');
  37616. };
  37617. // @pragma Access
  37618. List.prototype.get = function get (index, notSetValue) {
  37619. index = wrapIndex(this, index);
  37620. if (index >= 0 && index < this.size) {
  37621. index += this._origin;
  37622. var node = listNodeFor(this, index);
  37623. return node && node.array[index & MASK];
  37624. }
  37625. return notSetValue;
  37626. };
  37627. // @pragma Modification
  37628. List.prototype.set = function set (index, value) {
  37629. return updateList(this, index, value);
  37630. };
  37631. List.prototype.remove = function remove (index) {
  37632. return !this.has(index)
  37633. ? this
  37634. : index === 0
  37635. ? this.shift()
  37636. : index === this.size - 1
  37637. ? this.pop()
  37638. : this.splice(index, 1);
  37639. };
  37640. List.prototype.insert = function insert (index, value) {
  37641. return this.splice(index, 0, value);
  37642. };
  37643. List.prototype.clear = function clear () {
  37644. if (this.size === 0) {
  37645. return this;
  37646. }
  37647. if (this.__ownerID) {
  37648. this.size = this._origin = this._capacity = 0;
  37649. this._level = SHIFT;
  37650. this._root = this._tail = this.__hash = undefined;
  37651. this.__altered = true;
  37652. return this;
  37653. }
  37654. return emptyList();
  37655. };
  37656. List.prototype.push = function push (/*...values*/) {
  37657. var values = arguments;
  37658. var oldSize = this.size;
  37659. return this.withMutations(function (list) {
  37660. setListBounds(list, 0, oldSize + values.length);
  37661. for (var ii = 0; ii < values.length; ii++) {
  37662. list.set(oldSize + ii, values[ii]);
  37663. }
  37664. });
  37665. };
  37666. List.prototype.pop = function pop () {
  37667. return setListBounds(this, 0, -1);
  37668. };
  37669. List.prototype.unshift = function unshift (/*...values*/) {
  37670. var values = arguments;
  37671. return this.withMutations(function (list) {
  37672. setListBounds(list, -values.length);
  37673. for (var ii = 0; ii < values.length; ii++) {
  37674. list.set(ii, values[ii]);
  37675. }
  37676. });
  37677. };
  37678. List.prototype.shift = function shift () {
  37679. return setListBounds(this, 1);
  37680. };
  37681. // @pragma Composition
  37682. List.prototype.concat = function concat (/*...collections*/) {
  37683. var arguments$1 = arguments;
  37684. var seqs = [];
  37685. for (var i = 0; i < arguments.length; i++) {
  37686. var argument = arguments$1[i];
  37687. var seq = IndexedCollection(
  37688. typeof argument !== 'string' && hasIterator(argument)
  37689. ? argument
  37690. : [argument]
  37691. );
  37692. if (seq.size !== 0) {
  37693. seqs.push(seq);
  37694. }
  37695. }
  37696. if (seqs.length === 0) {
  37697. return this;
  37698. }
  37699. if (this.size === 0 && !this.__ownerID && seqs.length === 1) {
  37700. return this.constructor(seqs[0]);
  37701. }
  37702. return this.withMutations(function (list) {
  37703. seqs.forEach(function (seq) { return seq.forEach(function (value) { return list.push(value); }); });
  37704. });
  37705. };
  37706. List.prototype.setSize = function setSize (size) {
  37707. return setListBounds(this, 0, size);
  37708. };
  37709. List.prototype.map = function map (mapper, context) {
  37710. var this$1$1 = this;
  37711. return this.withMutations(function (list) {
  37712. for (var i = 0; i < this$1$1.size; i++) {
  37713. list.set(i, mapper.call(context, list.get(i), i, this$1$1));
  37714. }
  37715. });
  37716. };
  37717. // @pragma Iteration
  37718. List.prototype.slice = function slice (begin, end) {
  37719. var size = this.size;
  37720. if (wholeSlice(begin, end, size)) {
  37721. return this;
  37722. }
  37723. return setListBounds(
  37724. this,
  37725. resolveBegin(begin, size),
  37726. resolveEnd(end, size)
  37727. );
  37728. };
  37729. List.prototype.__iterator = function __iterator (type, reverse) {
  37730. var index = reverse ? this.size : 0;
  37731. var values = iterateList(this, reverse);
  37732. return new Iterator(function () {
  37733. var value = values();
  37734. return value === DONE
  37735. ? iteratorDone()
  37736. : iteratorValue(type, reverse ? --index : index++, value);
  37737. });
  37738. };
  37739. List.prototype.__iterate = function __iterate (fn, reverse) {
  37740. var index = reverse ? this.size : 0;
  37741. var values = iterateList(this, reverse);
  37742. var value;
  37743. while ((value = values()) !== DONE) {
  37744. if (fn(value, reverse ? --index : index++, this) === false) {
  37745. break;
  37746. }
  37747. }
  37748. return index;
  37749. };
  37750. List.prototype.__ensureOwner = function __ensureOwner (ownerID) {
  37751. if (ownerID === this.__ownerID) {
  37752. return this;
  37753. }
  37754. if (!ownerID) {
  37755. if (this.size === 0) {
  37756. return emptyList();
  37757. }
  37758. this.__ownerID = ownerID;
  37759. this.__altered = false;
  37760. return this;
  37761. }
  37762. return makeList(
  37763. this._origin,
  37764. this._capacity,
  37765. this._level,
  37766. this._root,
  37767. this._tail,
  37768. ownerID,
  37769. this.__hash
  37770. );
  37771. };
  37772. return List;
  37773. }(IndexedCollection));
  37774. List.isList = isList;
  37775. var ListPrototype = List.prototype;
  37776. ListPrototype[IS_LIST_SYMBOL] = true;
  37777. ListPrototype[DELETE] = ListPrototype.remove;
  37778. ListPrototype.merge = ListPrototype.concat;
  37779. ListPrototype.setIn = setIn;
  37780. ListPrototype.deleteIn = ListPrototype.removeIn = deleteIn;
  37781. ListPrototype.update = update;
  37782. ListPrototype.updateIn = updateIn;
  37783. ListPrototype.mergeIn = mergeIn;
  37784. ListPrototype.mergeDeepIn = mergeDeepIn;
  37785. ListPrototype.withMutations = withMutations;
  37786. ListPrototype.wasAltered = wasAltered;
  37787. ListPrototype.asImmutable = asImmutable;
  37788. ListPrototype['@@transducer/init'] = ListPrototype.asMutable = asMutable;
  37789. ListPrototype['@@transducer/step'] = function (result, arr) {
  37790. return result.push(arr);
  37791. };
  37792. ListPrototype['@@transducer/result'] = function (obj) {
  37793. return obj.asImmutable();
  37794. };
  37795. var VNode = function VNode(array, ownerID) {
  37796. this.array = array;
  37797. this.ownerID = ownerID;
  37798. };
  37799. // TODO: seems like these methods are very similar
  37800. VNode.prototype.removeBefore = function removeBefore (ownerID, level, index) {
  37801. if (index === level ? 1 << level : this.array.length === 0) {
  37802. return this;
  37803. }
  37804. var originIndex = (index >>> level) & MASK;
  37805. if (originIndex >= this.array.length) {
  37806. return new VNode([], ownerID);
  37807. }
  37808. var removingFirst = originIndex === 0;
  37809. var newChild;
  37810. if (level > 0) {
  37811. var oldChild = this.array[originIndex];
  37812. newChild =
  37813. oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index);
  37814. if (newChild === oldChild && removingFirst) {
  37815. return this;
  37816. }
  37817. }
  37818. if (removingFirst && !newChild) {
  37819. return this;
  37820. }
  37821. var editable = editableVNode(this, ownerID);
  37822. if (!removingFirst) {
  37823. for (var ii = 0; ii < originIndex; ii++) {
  37824. editable.array[ii] = undefined;
  37825. }
  37826. }
  37827. if (newChild) {
  37828. editable.array[originIndex] = newChild;
  37829. }
  37830. return editable;
  37831. };
  37832. VNode.prototype.removeAfter = function removeAfter (ownerID, level, index) {
  37833. if (index === (level ? 1 << level : 0) || this.array.length === 0) {
  37834. return this;
  37835. }
  37836. var sizeIndex = ((index - 1) >>> level) & MASK;
  37837. if (sizeIndex >= this.array.length) {
  37838. return this;
  37839. }
  37840. var newChild;
  37841. if (level > 0) {
  37842. var oldChild = this.array[sizeIndex];
  37843. newChild =
  37844. oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index);
  37845. if (newChild === oldChild && sizeIndex === this.array.length - 1) {
  37846. return this;
  37847. }
  37848. }
  37849. var editable = editableVNode(this, ownerID);
  37850. editable.array.splice(sizeIndex + 1);
  37851. if (newChild) {
  37852. editable.array[sizeIndex] = newChild;
  37853. }
  37854. return editable;
  37855. };
  37856. var DONE = {};
  37857. function iterateList(list, reverse) {
  37858. var left = list._origin;
  37859. var right = list._capacity;
  37860. var tailPos = getTailOffset(right);
  37861. var tail = list._tail;
  37862. return iterateNodeOrLeaf(list._root, list._level, 0);
  37863. function iterateNodeOrLeaf(node, level, offset) {
  37864. return level === 0
  37865. ? iterateLeaf(node, offset)
  37866. : iterateNode(node, level, offset);
  37867. }
  37868. function iterateLeaf(node, offset) {
  37869. var array = offset === tailPos ? tail && tail.array : node && node.array;
  37870. var from = offset > left ? 0 : left - offset;
  37871. var to = right - offset;
  37872. if (to > SIZE) {
  37873. to = SIZE;
  37874. }
  37875. return function () {
  37876. if (from === to) {
  37877. return DONE;
  37878. }
  37879. var idx = reverse ? --to : from++;
  37880. return array && array[idx];
  37881. };
  37882. }
  37883. function iterateNode(node, level, offset) {
  37884. var values;
  37885. var array = node && node.array;
  37886. var from = offset > left ? 0 : (left - offset) >> level;
  37887. var to = ((right - offset) >> level) + 1;
  37888. if (to > SIZE) {
  37889. to = SIZE;
  37890. }
  37891. return function () {
  37892. while (true) {
  37893. if (values) {
  37894. var value = values();
  37895. if (value !== DONE) {
  37896. return value;
  37897. }
  37898. values = null;
  37899. }
  37900. if (from === to) {
  37901. return DONE;
  37902. }
  37903. var idx = reverse ? --to : from++;
  37904. values = iterateNodeOrLeaf(
  37905. array && array[idx],
  37906. level - SHIFT,
  37907. offset + (idx << level)
  37908. );
  37909. }
  37910. };
  37911. }
  37912. }
  37913. function makeList(origin, capacity, level, root, tail, ownerID, hash) {
  37914. var list = Object.create(ListPrototype);
  37915. list.size = capacity - origin;
  37916. list._origin = origin;
  37917. list._capacity = capacity;
  37918. list._level = level;
  37919. list._root = root;
  37920. list._tail = tail;
  37921. list.__ownerID = ownerID;
  37922. list.__hash = hash;
  37923. list.__altered = false;
  37924. return list;
  37925. }
  37926. var EMPTY_LIST;
  37927. function emptyList() {
  37928. return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT));
  37929. }
  37930. function updateList(list, index, value) {
  37931. index = wrapIndex(list, index);
  37932. if (index !== index) {
  37933. return list;
  37934. }
  37935. if (index >= list.size || index < 0) {
  37936. return list.withMutations(function (list) {
  37937. index < 0
  37938. ? setListBounds(list, index).set(0, value)
  37939. : setListBounds(list, 0, index + 1).set(index, value);
  37940. });
  37941. }
  37942. index += list._origin;
  37943. var newTail = list._tail;
  37944. var newRoot = list._root;
  37945. var didAlter = MakeRef();
  37946. if (index >= getTailOffset(list._capacity)) {
  37947. newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter);
  37948. } else {
  37949. newRoot = updateVNode(
  37950. newRoot,
  37951. list.__ownerID,
  37952. list._level,
  37953. index,
  37954. value,
  37955. didAlter
  37956. );
  37957. }
  37958. if (!didAlter.value) {
  37959. return list;
  37960. }
  37961. if (list.__ownerID) {
  37962. list._root = newRoot;
  37963. list._tail = newTail;
  37964. list.__hash = undefined;
  37965. list.__altered = true;
  37966. return list;
  37967. }
  37968. return makeList(list._origin, list._capacity, list._level, newRoot, newTail);
  37969. }
  37970. function updateVNode(node, ownerID, level, index, value, didAlter) {
  37971. var idx = (index >>> level) & MASK;
  37972. var nodeHas = node && idx < node.array.length;
  37973. if (!nodeHas && value === undefined) {
  37974. return node;
  37975. }
  37976. var newNode;
  37977. if (level > 0) {
  37978. var lowerNode = node && node.array[idx];
  37979. var newLowerNode = updateVNode(
  37980. lowerNode,
  37981. ownerID,
  37982. level - SHIFT,
  37983. index,
  37984. value,
  37985. didAlter
  37986. );
  37987. if (newLowerNode === lowerNode) {
  37988. return node;
  37989. }
  37990. newNode = editableVNode(node, ownerID);
  37991. newNode.array[idx] = newLowerNode;
  37992. return newNode;
  37993. }
  37994. if (nodeHas && node.array[idx] === value) {
  37995. return node;
  37996. }
  37997. if (didAlter) {
  37998. SetRef(didAlter);
  37999. }
  38000. newNode = editableVNode(node, ownerID);
  38001. if (value === undefined && idx === newNode.array.length - 1) {
  38002. newNode.array.pop();
  38003. } else {
  38004. newNode.array[idx] = value;
  38005. }
  38006. return newNode;
  38007. }
  38008. function editableVNode(node, ownerID) {
  38009. if (ownerID && node && ownerID === node.ownerID) {
  38010. return node;
  38011. }
  38012. return new VNode(node ? node.array.slice() : [], ownerID);
  38013. }
  38014. function listNodeFor(list, rawIndex) {
  38015. if (rawIndex >= getTailOffset(list._capacity)) {
  38016. return list._tail;
  38017. }
  38018. if (rawIndex < 1 << (list._level + SHIFT)) {
  38019. var node = list._root;
  38020. var level = list._level;
  38021. while (node && level > 0) {
  38022. node = node.array[(rawIndex >>> level) & MASK];
  38023. level -= SHIFT;
  38024. }
  38025. return node;
  38026. }
  38027. }
  38028. function setListBounds(list, begin, end) {
  38029. // Sanitize begin & end using this shorthand for ToInt32(argument)
  38030. // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32
  38031. if (begin !== undefined) {
  38032. begin |= 0;
  38033. }
  38034. if (end !== undefined) {
  38035. end |= 0;
  38036. }
  38037. var owner = list.__ownerID || new OwnerID();
  38038. var oldOrigin = list._origin;
  38039. var oldCapacity = list._capacity;
  38040. var newOrigin = oldOrigin + begin;
  38041. var newCapacity =
  38042. end === undefined
  38043. ? oldCapacity
  38044. : end < 0
  38045. ? oldCapacity + end
  38046. : oldOrigin + end;
  38047. if (newOrigin === oldOrigin && newCapacity === oldCapacity) {
  38048. return list;
  38049. }
  38050. // If it's going to end after it starts, it's empty.
  38051. if (newOrigin >= newCapacity) {
  38052. return list.clear();
  38053. }
  38054. var newLevel = list._level;
  38055. var newRoot = list._root;
  38056. // New origin might need creating a higher root.
  38057. var offsetShift = 0;
  38058. while (newOrigin + offsetShift < 0) {
  38059. newRoot = new VNode(
  38060. newRoot && newRoot.array.length ? [undefined, newRoot] : [],
  38061. owner
  38062. );
  38063. newLevel += SHIFT;
  38064. offsetShift += 1 << newLevel;
  38065. }
  38066. if (offsetShift) {
  38067. newOrigin += offsetShift;
  38068. oldOrigin += offsetShift;
  38069. newCapacity += offsetShift;
  38070. oldCapacity += offsetShift;
  38071. }
  38072. var oldTailOffset = getTailOffset(oldCapacity);
  38073. var newTailOffset = getTailOffset(newCapacity);
  38074. // New size might need creating a higher root.
  38075. while (newTailOffset >= 1 << (newLevel + SHIFT)) {
  38076. newRoot = new VNode(
  38077. newRoot && newRoot.array.length ? [newRoot] : [],
  38078. owner
  38079. );
  38080. newLevel += SHIFT;
  38081. }
  38082. // Locate or create the new tail.
  38083. var oldTail = list._tail;
  38084. var newTail =
  38085. newTailOffset < oldTailOffset
  38086. ? listNodeFor(list, newCapacity - 1)
  38087. : newTailOffset > oldTailOffset
  38088. ? new VNode([], owner)
  38089. : oldTail;
  38090. // Merge Tail into tree.
  38091. if (
  38092. oldTail &&
  38093. newTailOffset > oldTailOffset &&
  38094. newOrigin < oldCapacity &&
  38095. oldTail.array.length
  38096. ) {
  38097. newRoot = editableVNode(newRoot, owner);
  38098. var node = newRoot;
  38099. for (var level = newLevel; level > SHIFT; level -= SHIFT) {
  38100. var idx = (oldTailOffset >>> level) & MASK;
  38101. node = node.array[idx] = editableVNode(node.array[idx], owner);
  38102. }
  38103. node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail;
  38104. }
  38105. // If the size has been reduced, there's a chance the tail needs to be trimmed.
  38106. if (newCapacity < oldCapacity) {
  38107. newTail = newTail && newTail.removeAfter(owner, 0, newCapacity);
  38108. }
  38109. // If the new origin is within the tail, then we do not need a root.
  38110. if (newOrigin >= newTailOffset) {
  38111. newOrigin -= newTailOffset;
  38112. newCapacity -= newTailOffset;
  38113. newLevel = SHIFT;
  38114. newRoot = null;
  38115. newTail = newTail && newTail.removeBefore(owner, 0, newOrigin);
  38116. // Otherwise, if the root has been trimmed, garbage collect.
  38117. } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) {
  38118. offsetShift = 0;
  38119. // Identify the new top root node of the subtree of the old root.
  38120. while (newRoot) {
  38121. var beginIndex = (newOrigin >>> newLevel) & MASK;
  38122. if ((beginIndex !== newTailOffset >>> newLevel) & MASK) {
  38123. break;
  38124. }
  38125. if (beginIndex) {
  38126. offsetShift += (1 << newLevel) * beginIndex;
  38127. }
  38128. newLevel -= SHIFT;
  38129. newRoot = newRoot.array[beginIndex];
  38130. }
  38131. // Trim the new sides of the new root.
  38132. if (newRoot && newOrigin > oldOrigin) {
  38133. newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift);
  38134. }
  38135. if (newRoot && newTailOffset < oldTailOffset) {
  38136. newRoot = newRoot.removeAfter(
  38137. owner,
  38138. newLevel,
  38139. newTailOffset - offsetShift
  38140. );
  38141. }
  38142. if (offsetShift) {
  38143. newOrigin -= offsetShift;
  38144. newCapacity -= offsetShift;
  38145. }
  38146. }
  38147. if (list.__ownerID) {
  38148. list.size = newCapacity - newOrigin;
  38149. list._origin = newOrigin;
  38150. list._capacity = newCapacity;
  38151. list._level = newLevel;
  38152. list._root = newRoot;
  38153. list._tail = newTail;
  38154. list.__hash = undefined;
  38155. list.__altered = true;
  38156. return list;
  38157. }
  38158. return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail);
  38159. }
  38160. function getTailOffset(size) {
  38161. return size < SIZE ? 0 : ((size - 1) >>> SHIFT) << SHIFT;
  38162. }
  38163. var OrderedMap = /*@__PURE__*/(function (Map) {
  38164. function OrderedMap(value) {
  38165. return value === null || value === undefined
  38166. ? emptyOrderedMap()
  38167. : isOrderedMap(value)
  38168. ? value
  38169. : emptyOrderedMap().withMutations(function (map) {
  38170. var iter = KeyedCollection(value);
  38171. assertNotInfinite(iter.size);
  38172. iter.forEach(function (v, k) { return map.set(k, v); });
  38173. });
  38174. }
  38175. if ( Map ) OrderedMap.__proto__ = Map;
  38176. OrderedMap.prototype = Object.create( Map && Map.prototype );
  38177. OrderedMap.prototype.constructor = OrderedMap;
  38178. OrderedMap.of = function of (/*...values*/) {
  38179. return this(arguments);
  38180. };
  38181. OrderedMap.prototype.toString = function toString () {
  38182. return this.__toString('OrderedMap {', '}');
  38183. };
  38184. // @pragma Access
  38185. OrderedMap.prototype.get = function get (k, notSetValue) {
  38186. var index = this._map.get(k);
  38187. return index !== undefined ? this._list.get(index)[1] : notSetValue;
  38188. };
  38189. // @pragma Modification
  38190. OrderedMap.prototype.clear = function clear () {
  38191. if (this.size === 0) {
  38192. return this;
  38193. }
  38194. if (this.__ownerID) {
  38195. this.size = 0;
  38196. this._map.clear();
  38197. this._list.clear();
  38198. this.__altered = true;
  38199. return this;
  38200. }
  38201. return emptyOrderedMap();
  38202. };
  38203. OrderedMap.prototype.set = function set (k, v) {
  38204. return updateOrderedMap(this, k, v);
  38205. };
  38206. OrderedMap.prototype.remove = function remove (k) {
  38207. return updateOrderedMap(this, k, NOT_SET);
  38208. };
  38209. OrderedMap.prototype.__iterate = function __iterate (fn, reverse) {
  38210. var this$1$1 = this;
  38211. return this._list.__iterate(
  38212. function (entry) { return entry && fn(entry[1], entry[0], this$1$1); },
  38213. reverse
  38214. );
  38215. };
  38216. OrderedMap.prototype.__iterator = function __iterator (type, reverse) {
  38217. return this._list.fromEntrySeq().__iterator(type, reverse);
  38218. };
  38219. OrderedMap.prototype.__ensureOwner = function __ensureOwner (ownerID) {
  38220. if (ownerID === this.__ownerID) {
  38221. return this;
  38222. }
  38223. var newMap = this._map.__ensureOwner(ownerID);
  38224. var newList = this._list.__ensureOwner(ownerID);
  38225. if (!ownerID) {
  38226. if (this.size === 0) {
  38227. return emptyOrderedMap();
  38228. }
  38229. this.__ownerID = ownerID;
  38230. this.__altered = false;
  38231. this._map = newMap;
  38232. this._list = newList;
  38233. return this;
  38234. }
  38235. return makeOrderedMap(newMap, newList, ownerID, this.__hash);
  38236. };
  38237. return OrderedMap;
  38238. }(Map));
  38239. OrderedMap.isOrderedMap = isOrderedMap;
  38240. OrderedMap.prototype[IS_ORDERED_SYMBOL] = true;
  38241. OrderedMap.prototype[DELETE] = OrderedMap.prototype.remove;
  38242. function makeOrderedMap(map, list, ownerID, hash) {
  38243. var omap = Object.create(OrderedMap.prototype);
  38244. omap.size = map ? map.size : 0;
  38245. omap._map = map;
  38246. omap._list = list;
  38247. omap.__ownerID = ownerID;
  38248. omap.__hash = hash;
  38249. omap.__altered = false;
  38250. return omap;
  38251. }
  38252. var EMPTY_ORDERED_MAP;
  38253. function emptyOrderedMap() {
  38254. return (
  38255. EMPTY_ORDERED_MAP ||
  38256. (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList()))
  38257. );
  38258. }
  38259. function updateOrderedMap(omap, k, v) {
  38260. var map = omap._map;
  38261. var list = omap._list;
  38262. var i = map.get(k);
  38263. var has = i !== undefined;
  38264. var newMap;
  38265. var newList;
  38266. if (v === NOT_SET) {
  38267. // removed
  38268. if (!has) {
  38269. return omap;
  38270. }
  38271. if (list.size >= SIZE && list.size >= map.size * 2) {
  38272. newList = list.filter(function (entry, idx) { return entry !== undefined && i !== idx; });
  38273. newMap = newList
  38274. .toKeyedSeq()
  38275. .map(function (entry) { return entry[0]; })
  38276. .flip()
  38277. .toMap();
  38278. if (omap.__ownerID) {
  38279. newMap.__ownerID = newList.__ownerID = omap.__ownerID;
  38280. }
  38281. } else {
  38282. newMap = map.remove(k);
  38283. newList = i === list.size - 1 ? list.pop() : list.set(i, undefined);
  38284. }
  38285. } else if (has) {
  38286. if (v === list.get(i)[1]) {
  38287. return omap;
  38288. }
  38289. newMap = map;
  38290. newList = list.set(i, [k, v]);
  38291. } else {
  38292. newMap = map.set(k, list.size);
  38293. newList = list.set(list.size, [k, v]);
  38294. }
  38295. if (omap.__ownerID) {
  38296. omap.size = newMap.size;
  38297. omap._map = newMap;
  38298. omap._list = newList;
  38299. omap.__hash = undefined;
  38300. omap.__altered = true;
  38301. return omap;
  38302. }
  38303. return makeOrderedMap(newMap, newList);
  38304. }
  38305. var IS_STACK_SYMBOL = '@@__IMMUTABLE_STACK__@@';
  38306. function isStack(maybeStack) {
  38307. return Boolean(maybeStack && maybeStack[IS_STACK_SYMBOL]);
  38308. }
  38309. var Stack = /*@__PURE__*/(function (IndexedCollection) {
  38310. function Stack(value) {
  38311. return value === null || value === undefined
  38312. ? emptyStack()
  38313. : isStack(value)
  38314. ? value
  38315. : emptyStack().pushAll(value);
  38316. }
  38317. if ( IndexedCollection ) Stack.__proto__ = IndexedCollection;
  38318. Stack.prototype = Object.create( IndexedCollection && IndexedCollection.prototype );
  38319. Stack.prototype.constructor = Stack;
  38320. Stack.of = function of (/*...values*/) {
  38321. return this(arguments);
  38322. };
  38323. Stack.prototype.toString = function toString () {
  38324. return this.__toString('Stack [', ']');
  38325. };
  38326. // @pragma Access
  38327. Stack.prototype.get = function get (index, notSetValue) {
  38328. var head = this._head;
  38329. index = wrapIndex(this, index);
  38330. while (head && index--) {
  38331. head = head.next;
  38332. }
  38333. return head ? head.value : notSetValue;
  38334. };
  38335. Stack.prototype.peek = function peek () {
  38336. return this._head && this._head.value;
  38337. };
  38338. // @pragma Modification
  38339. Stack.prototype.push = function push (/*...values*/) {
  38340. var arguments$1 = arguments;
  38341. if (arguments.length === 0) {
  38342. return this;
  38343. }
  38344. var newSize = this.size + arguments.length;
  38345. var head = this._head;
  38346. for (var ii = arguments.length - 1; ii >= 0; ii--) {
  38347. head = {
  38348. value: arguments$1[ii],
  38349. next: head,
  38350. };
  38351. }
  38352. if (this.__ownerID) {
  38353. this.size = newSize;
  38354. this._head = head;
  38355. this.__hash = undefined;
  38356. this.__altered = true;
  38357. return this;
  38358. }
  38359. return makeStack(newSize, head);
  38360. };
  38361. Stack.prototype.pushAll = function pushAll (iter) {
  38362. iter = IndexedCollection(iter);
  38363. if (iter.size === 0) {
  38364. return this;
  38365. }
  38366. if (this.size === 0 && isStack(iter)) {
  38367. return iter;
  38368. }
  38369. assertNotInfinite(iter.size);
  38370. var newSize = this.size;
  38371. var head = this._head;
  38372. iter.__iterate(function (value) {
  38373. newSize++;
  38374. head = {
  38375. value: value,
  38376. next: head,
  38377. };
  38378. }, /* reverse */ true);
  38379. if (this.__ownerID) {
  38380. this.size = newSize;
  38381. this._head = head;
  38382. this.__hash = undefined;
  38383. this.__altered = true;
  38384. return this;
  38385. }
  38386. return makeStack(newSize, head);
  38387. };
  38388. Stack.prototype.pop = function pop () {
  38389. return this.slice(1);
  38390. };
  38391. Stack.prototype.clear = function clear () {
  38392. if (this.size === 0) {
  38393. return this;
  38394. }
  38395. if (this.__ownerID) {
  38396. this.size = 0;
  38397. this._head = undefined;
  38398. this.__hash = undefined;
  38399. this.__altered = true;
  38400. return this;
  38401. }
  38402. return emptyStack();
  38403. };
  38404. Stack.prototype.slice = function slice (begin, end) {
  38405. if (wholeSlice(begin, end, this.size)) {
  38406. return this;
  38407. }
  38408. var resolvedBegin = resolveBegin(begin, this.size);
  38409. var resolvedEnd = resolveEnd(end, this.size);
  38410. if (resolvedEnd !== this.size) {
  38411. // super.slice(begin, end);
  38412. return IndexedCollection.prototype.slice.call(this, begin, end);
  38413. }
  38414. var newSize = this.size - resolvedBegin;
  38415. var head = this._head;
  38416. while (resolvedBegin--) {
  38417. head = head.next;
  38418. }
  38419. if (this.__ownerID) {
  38420. this.size = newSize;
  38421. this._head = head;
  38422. this.__hash = undefined;
  38423. this.__altered = true;
  38424. return this;
  38425. }
  38426. return makeStack(newSize, head);
  38427. };
  38428. // @pragma Mutability
  38429. Stack.prototype.__ensureOwner = function __ensureOwner (ownerID) {
  38430. if (ownerID === this.__ownerID) {
  38431. return this;
  38432. }
  38433. if (!ownerID) {
  38434. if (this.size === 0) {
  38435. return emptyStack();
  38436. }
  38437. this.__ownerID = ownerID;
  38438. this.__altered = false;
  38439. return this;
  38440. }
  38441. return makeStack(this.size, this._head, ownerID, this.__hash);
  38442. };
  38443. // @pragma Iteration
  38444. Stack.prototype.__iterate = function __iterate (fn, reverse) {
  38445. var this$1$1 = this;
  38446. if (reverse) {
  38447. return new ArraySeq(this.toArray()).__iterate(
  38448. function (v, k) { return fn(v, k, this$1$1); },
  38449. reverse
  38450. );
  38451. }
  38452. var iterations = 0;
  38453. var node = this._head;
  38454. while (node) {
  38455. if (fn(node.value, iterations++, this) === false) {
  38456. break;
  38457. }
  38458. node = node.next;
  38459. }
  38460. return iterations;
  38461. };
  38462. Stack.prototype.__iterator = function __iterator (type, reverse) {
  38463. if (reverse) {
  38464. return new ArraySeq(this.toArray()).__iterator(type, reverse);
  38465. }
  38466. var iterations = 0;
  38467. var node = this._head;
  38468. return new Iterator(function () {
  38469. if (node) {
  38470. var value = node.value;
  38471. node = node.next;
  38472. return iteratorValue(type, iterations++, value);
  38473. }
  38474. return iteratorDone();
  38475. });
  38476. };
  38477. return Stack;
  38478. }(IndexedCollection));
  38479. Stack.isStack = isStack;
  38480. var StackPrototype = Stack.prototype;
  38481. StackPrototype[IS_STACK_SYMBOL] = true;
  38482. StackPrototype.shift = StackPrototype.pop;
  38483. StackPrototype.unshift = StackPrototype.push;
  38484. StackPrototype.unshiftAll = StackPrototype.pushAll;
  38485. StackPrototype.withMutations = withMutations;
  38486. StackPrototype.wasAltered = wasAltered;
  38487. StackPrototype.asImmutable = asImmutable;
  38488. StackPrototype['@@transducer/init'] = StackPrototype.asMutable = asMutable;
  38489. StackPrototype['@@transducer/step'] = function (result, arr) {
  38490. return result.unshift(arr);
  38491. };
  38492. StackPrototype['@@transducer/result'] = function (obj) {
  38493. return obj.asImmutable();
  38494. };
  38495. function makeStack(size, head, ownerID, hash) {
  38496. var map = Object.create(StackPrototype);
  38497. map.size = size;
  38498. map._head = head;
  38499. map.__ownerID = ownerID;
  38500. map.__hash = hash;
  38501. map.__altered = false;
  38502. return map;
  38503. }
  38504. var EMPTY_STACK;
  38505. function emptyStack() {
  38506. return EMPTY_STACK || (EMPTY_STACK = makeStack(0));
  38507. }
  38508. var IS_SET_SYMBOL = '@@__IMMUTABLE_SET__@@';
  38509. function isSet(maybeSet) {
  38510. return Boolean(maybeSet && maybeSet[IS_SET_SYMBOL]);
  38511. }
  38512. function isOrderedSet(maybeOrderedSet) {
  38513. return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet);
  38514. }
  38515. function deepEqual(a, b) {
  38516. if (a === b) {
  38517. return true;
  38518. }
  38519. if (
  38520. !isCollection(b) ||
  38521. (a.size !== undefined && b.size !== undefined && a.size !== b.size) ||
  38522. (a.__hash !== undefined &&
  38523. b.__hash !== undefined &&
  38524. a.__hash !== b.__hash) ||
  38525. isKeyed(a) !== isKeyed(b) ||
  38526. isIndexed(a) !== isIndexed(b) ||
  38527. isOrdered(a) !== isOrdered(b)
  38528. ) {
  38529. return false;
  38530. }
  38531. if (a.size === 0 && b.size === 0) {
  38532. return true;
  38533. }
  38534. var notAssociative = !isAssociative(a);
  38535. if (isOrdered(a)) {
  38536. var entries = a.entries();
  38537. return (
  38538. b.every(function (v, k) {
  38539. var entry = entries.next().value;
  38540. return entry && is(entry[1], v) && (notAssociative || is(entry[0], k));
  38541. }) && entries.next().done
  38542. );
  38543. }
  38544. var flipped = false;
  38545. if (a.size === undefined) {
  38546. if (b.size === undefined) {
  38547. if (typeof a.cacheResult === 'function') {
  38548. a.cacheResult();
  38549. }
  38550. } else {
  38551. flipped = true;
  38552. var _ = a;
  38553. a = b;
  38554. b = _;
  38555. }
  38556. }
  38557. var allEqual = true;
  38558. var bSize = b.__iterate(function (v, k) {
  38559. if (
  38560. notAssociative
  38561. ? !a.has(v)
  38562. : flipped
  38563. ? !is(v, a.get(k, NOT_SET))
  38564. : !is(a.get(k, NOT_SET), v)
  38565. ) {
  38566. allEqual = false;
  38567. return false;
  38568. }
  38569. });
  38570. return allEqual && a.size === bSize;
  38571. }
  38572. function mixin(ctor, methods) {
  38573. var keyCopier = function (key) {
  38574. ctor.prototype[key] = methods[key];
  38575. };
  38576. Object.keys(methods).forEach(keyCopier);
  38577. Object.getOwnPropertySymbols &&
  38578. Object.getOwnPropertySymbols(methods).forEach(keyCopier);
  38579. return ctor;
  38580. }
  38581. function toJS(value) {
  38582. if (!value || typeof value !== 'object') {
  38583. return value;
  38584. }
  38585. if (!isCollection(value)) {
  38586. if (!isDataStructure(value)) {
  38587. return value;
  38588. }
  38589. value = Seq(value);
  38590. }
  38591. if (isKeyed(value)) {
  38592. var result$1 = {};
  38593. value.__iterate(function (v, k) {
  38594. result$1[k] = toJS(v);
  38595. });
  38596. return result$1;
  38597. }
  38598. var result = [];
  38599. value.__iterate(function (v) {
  38600. result.push(toJS(v));
  38601. });
  38602. return result;
  38603. }
  38604. var Set = /*@__PURE__*/(function (SetCollection) {
  38605. function Set(value) {
  38606. return value === null || value === undefined
  38607. ? emptySet()
  38608. : isSet(value) && !isOrdered(value)
  38609. ? value
  38610. : emptySet().withMutations(function (set) {
  38611. var iter = SetCollection(value);
  38612. assertNotInfinite(iter.size);
  38613. iter.forEach(function (v) { return set.add(v); });
  38614. });
  38615. }
  38616. if ( SetCollection ) Set.__proto__ = SetCollection;
  38617. Set.prototype = Object.create( SetCollection && SetCollection.prototype );
  38618. Set.prototype.constructor = Set;
  38619. Set.of = function of (/*...values*/) {
  38620. return this(arguments);
  38621. };
  38622. Set.fromKeys = function fromKeys (value) {
  38623. return this(KeyedCollection(value).keySeq());
  38624. };
  38625. Set.intersect = function intersect (sets) {
  38626. sets = Collection(sets).toArray();
  38627. return sets.length
  38628. ? SetPrototype.intersect.apply(Set(sets.pop()), sets)
  38629. : emptySet();
  38630. };
  38631. Set.union = function union (sets) {
  38632. sets = Collection(sets).toArray();
  38633. return sets.length
  38634. ? SetPrototype.union.apply(Set(sets.pop()), sets)
  38635. : emptySet();
  38636. };
  38637. Set.prototype.toString = function toString () {
  38638. return this.__toString('Set {', '}');
  38639. };
  38640. // @pragma Access
  38641. Set.prototype.has = function has (value) {
  38642. return this._map.has(value);
  38643. };
  38644. // @pragma Modification
  38645. Set.prototype.add = function add (value) {
  38646. return updateSet(this, this._map.set(value, value));
  38647. };
  38648. Set.prototype.remove = function remove (value) {
  38649. return updateSet(this, this._map.remove(value));
  38650. };
  38651. Set.prototype.clear = function clear () {
  38652. return updateSet(this, this._map.clear());
  38653. };
  38654. // @pragma Composition
  38655. Set.prototype.map = function map (mapper, context) {
  38656. var this$1$1 = this;
  38657. // keep track if the set is altered by the map function
  38658. var didChanges = false;
  38659. var newMap = updateSet(
  38660. this,
  38661. this._map.mapEntries(function (ref) {
  38662. var v = ref[1];
  38663. var mapped = mapper.call(context, v, v, this$1$1);
  38664. if (mapped !== v) {
  38665. didChanges = true;
  38666. }
  38667. return [mapped, mapped];
  38668. }, context)
  38669. );
  38670. return didChanges ? newMap : this;
  38671. };
  38672. Set.prototype.union = function union () {
  38673. var iters = [], len = arguments.length;
  38674. while ( len-- ) iters[ len ] = arguments[ len ];
  38675. iters = iters.filter(function (x) { return x.size !== 0; });
  38676. if (iters.length === 0) {
  38677. return this;
  38678. }
  38679. if (this.size === 0 && !this.__ownerID && iters.length === 1) {
  38680. return this.constructor(iters[0]);
  38681. }
  38682. return this.withMutations(function (set) {
  38683. for (var ii = 0; ii < iters.length; ii++) {
  38684. SetCollection(iters[ii]).forEach(function (value) { return set.add(value); });
  38685. }
  38686. });
  38687. };
  38688. Set.prototype.intersect = function intersect () {
  38689. var iters = [], len = arguments.length;
  38690. while ( len-- ) iters[ len ] = arguments[ len ];
  38691. if (iters.length === 0) {
  38692. return this;
  38693. }
  38694. iters = iters.map(function (iter) { return SetCollection(iter); });
  38695. var toRemove = [];
  38696. this.forEach(function (value) {
  38697. if (!iters.every(function (iter) { return iter.includes(value); })) {
  38698. toRemove.push(value);
  38699. }
  38700. });
  38701. return this.withMutations(function (set) {
  38702. toRemove.forEach(function (value) {
  38703. set.remove(value);
  38704. });
  38705. });
  38706. };
  38707. Set.prototype.subtract = function subtract () {
  38708. var iters = [], len = arguments.length;
  38709. while ( len-- ) iters[ len ] = arguments[ len ];
  38710. if (iters.length === 0) {
  38711. return this;
  38712. }
  38713. iters = iters.map(function (iter) { return SetCollection(iter); });
  38714. var toRemove = [];
  38715. this.forEach(function (value) {
  38716. if (iters.some(function (iter) { return iter.includes(value); })) {
  38717. toRemove.push(value);
  38718. }
  38719. });
  38720. return this.withMutations(function (set) {
  38721. toRemove.forEach(function (value) {
  38722. set.remove(value);
  38723. });
  38724. });
  38725. };
  38726. Set.prototype.sort = function sort (comparator) {
  38727. // Late binding
  38728. return OrderedSet(sortFactory(this, comparator));
  38729. };
  38730. Set.prototype.sortBy = function sortBy (mapper, comparator) {
  38731. // Late binding
  38732. return OrderedSet(sortFactory(this, comparator, mapper));
  38733. };
  38734. Set.prototype.wasAltered = function wasAltered () {
  38735. return this._map.wasAltered();
  38736. };
  38737. Set.prototype.__iterate = function __iterate (fn, reverse) {
  38738. var this$1$1 = this;
  38739. return this._map.__iterate(function (k) { return fn(k, k, this$1$1); }, reverse);
  38740. };
  38741. Set.prototype.__iterator = function __iterator (type, reverse) {
  38742. return this._map.__iterator(type, reverse);
  38743. };
  38744. Set.prototype.__ensureOwner = function __ensureOwner (ownerID) {
  38745. if (ownerID === this.__ownerID) {
  38746. return this;
  38747. }
  38748. var newMap = this._map.__ensureOwner(ownerID);
  38749. if (!ownerID) {
  38750. if (this.size === 0) {
  38751. return this.__empty();
  38752. }
  38753. this.__ownerID = ownerID;
  38754. this._map = newMap;
  38755. return this;
  38756. }
  38757. return this.__make(newMap, ownerID);
  38758. };
  38759. return Set;
  38760. }(SetCollection));
  38761. Set.isSet = isSet;
  38762. var SetPrototype = Set.prototype;
  38763. SetPrototype[IS_SET_SYMBOL] = true;
  38764. SetPrototype[DELETE] = SetPrototype.remove;
  38765. SetPrototype.merge = SetPrototype.concat = SetPrototype.union;
  38766. SetPrototype.withMutations = withMutations;
  38767. SetPrototype.asImmutable = asImmutable;
  38768. SetPrototype['@@transducer/init'] = SetPrototype.asMutable = asMutable;
  38769. SetPrototype['@@transducer/step'] = function (result, arr) {
  38770. return result.add(arr);
  38771. };
  38772. SetPrototype['@@transducer/result'] = function (obj) {
  38773. return obj.asImmutable();
  38774. };
  38775. SetPrototype.__empty = emptySet;
  38776. SetPrototype.__make = makeSet;
  38777. function updateSet(set, newMap) {
  38778. if (set.__ownerID) {
  38779. set.size = newMap.size;
  38780. set._map = newMap;
  38781. return set;
  38782. }
  38783. return newMap === set._map
  38784. ? set
  38785. : newMap.size === 0
  38786. ? set.__empty()
  38787. : set.__make(newMap);
  38788. }
  38789. function makeSet(map, ownerID) {
  38790. var set = Object.create(SetPrototype);
  38791. set.size = map ? map.size : 0;
  38792. set._map = map;
  38793. set.__ownerID = ownerID;
  38794. return set;
  38795. }
  38796. var EMPTY_SET;
  38797. function emptySet() {
  38798. return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap()));
  38799. }
  38800. /**
  38801. * Returns a lazy seq of nums from start (inclusive) to end
  38802. * (exclusive), by step, where start defaults to 0, step to 1, and end to
  38803. * infinity. When start is equal to end, returns empty list.
  38804. */
  38805. var Range = /*@__PURE__*/(function (IndexedSeq) {
  38806. function Range(start, end, step) {
  38807. if (!(this instanceof Range)) {
  38808. return new Range(start, end, step);
  38809. }
  38810. invariant(step !== 0, 'Cannot step a Range by 0');
  38811. start = start || 0;
  38812. if (end === undefined) {
  38813. end = Infinity;
  38814. }
  38815. step = step === undefined ? 1 : Math.abs(step);
  38816. if (end < start) {
  38817. step = -step;
  38818. }
  38819. this._start = start;
  38820. this._end = end;
  38821. this._step = step;
  38822. this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1);
  38823. if (this.size === 0) {
  38824. if (EMPTY_RANGE) {
  38825. return EMPTY_RANGE;
  38826. }
  38827. EMPTY_RANGE = this;
  38828. }
  38829. }
  38830. if ( IndexedSeq ) Range.__proto__ = IndexedSeq;
  38831. Range.prototype = Object.create( IndexedSeq && IndexedSeq.prototype );
  38832. Range.prototype.constructor = Range;
  38833. Range.prototype.toString = function toString () {
  38834. if (this.size === 0) {
  38835. return 'Range []';
  38836. }
  38837. return (
  38838. 'Range [ ' +
  38839. this._start +
  38840. '...' +
  38841. this._end +
  38842. (this._step !== 1 ? ' by ' + this._step : '') +
  38843. ' ]'
  38844. );
  38845. };
  38846. Range.prototype.get = function get (index, notSetValue) {
  38847. return this.has(index)
  38848. ? this._start + wrapIndex(this, index) * this._step
  38849. : notSetValue;
  38850. };
  38851. Range.prototype.includes = function includes (searchValue) {
  38852. var possibleIndex = (searchValue - this._start) / this._step;
  38853. return (
  38854. possibleIndex >= 0 &&
  38855. possibleIndex < this.size &&
  38856. possibleIndex === Math.floor(possibleIndex)
  38857. );
  38858. };
  38859. Range.prototype.slice = function slice (begin, end) {
  38860. if (wholeSlice(begin, end, this.size)) {
  38861. return this;
  38862. }
  38863. begin = resolveBegin(begin, this.size);
  38864. end = resolveEnd(end, this.size);
  38865. if (end <= begin) {
  38866. return new Range(0, 0);
  38867. }
  38868. return new Range(
  38869. this.get(begin, this._end),
  38870. this.get(end, this._end),
  38871. this._step
  38872. );
  38873. };
  38874. Range.prototype.indexOf = function indexOf (searchValue) {
  38875. var offsetValue = searchValue - this._start;
  38876. if (offsetValue % this._step === 0) {
  38877. var index = offsetValue / this._step;
  38878. if (index >= 0 && index < this.size) {
  38879. return index;
  38880. }
  38881. }
  38882. return -1;
  38883. };
  38884. Range.prototype.lastIndexOf = function lastIndexOf (searchValue) {
  38885. return this.indexOf(searchValue);
  38886. };
  38887. Range.prototype.__iterate = function __iterate (fn, reverse) {
  38888. var size = this.size;
  38889. var step = this._step;
  38890. var value = reverse ? this._start + (size - 1) * step : this._start;
  38891. var i = 0;
  38892. while (i !== size) {
  38893. if (fn(value, reverse ? size - ++i : i++, this) === false) {
  38894. break;
  38895. }
  38896. value += reverse ? -step : step;
  38897. }
  38898. return i;
  38899. };
  38900. Range.prototype.__iterator = function __iterator (type, reverse) {
  38901. var size = this.size;
  38902. var step = this._step;
  38903. var value = reverse ? this._start + (size - 1) * step : this._start;
  38904. var i = 0;
  38905. return new Iterator(function () {
  38906. if (i === size) {
  38907. return iteratorDone();
  38908. }
  38909. var v = value;
  38910. value += reverse ? -step : step;
  38911. return iteratorValue(type, reverse ? size - ++i : i++, v);
  38912. });
  38913. };
  38914. Range.prototype.equals = function equals (other) {
  38915. return other instanceof Range
  38916. ? this._start === other._start &&
  38917. this._end === other._end &&
  38918. this._step === other._step
  38919. : deepEqual(this, other);
  38920. };
  38921. return Range;
  38922. }(IndexedSeq));
  38923. var EMPTY_RANGE;
  38924. function getIn$1(collection, searchKeyPath, notSetValue) {
  38925. var keyPath = coerceKeyPath(searchKeyPath);
  38926. var i = 0;
  38927. while (i !== keyPath.length) {
  38928. collection = get(collection, keyPath[i++], NOT_SET);
  38929. if (collection === NOT_SET) {
  38930. return notSetValue;
  38931. }
  38932. }
  38933. return collection;
  38934. }
  38935. function getIn(searchKeyPath, notSetValue) {
  38936. return getIn$1(this, searchKeyPath, notSetValue);
  38937. }
  38938. function hasIn$1(collection, keyPath) {
  38939. return getIn$1(collection, keyPath, NOT_SET) !== NOT_SET;
  38940. }
  38941. function hasIn(searchKeyPath) {
  38942. return hasIn$1(this, searchKeyPath);
  38943. }
  38944. function toObject() {
  38945. assertNotInfinite(this.size);
  38946. var object = {};
  38947. this.__iterate(function (v, k) {
  38948. object[k] = v;
  38949. });
  38950. return object;
  38951. }
  38952. // Note: all of these methods are deprecated.
  38953. Collection.isIterable = isCollection;
  38954. Collection.isKeyed = isKeyed;
  38955. Collection.isIndexed = isIndexed;
  38956. Collection.isAssociative = isAssociative;
  38957. Collection.isOrdered = isOrdered;
  38958. Collection.Iterator = Iterator;
  38959. mixin(Collection, {
  38960. // ### Conversion to other types
  38961. toArray: function toArray() {
  38962. assertNotInfinite(this.size);
  38963. var array = new Array(this.size || 0);
  38964. var useTuples = isKeyed(this);
  38965. var i = 0;
  38966. this.__iterate(function (v, k) {
  38967. // Keyed collections produce an array of tuples.
  38968. array[i++] = useTuples ? [k, v] : v;
  38969. });
  38970. return array;
  38971. },
  38972. toIndexedSeq: function toIndexedSeq() {
  38973. return new ToIndexedSequence(this);
  38974. },
  38975. toJS: function toJS$1() {
  38976. return toJS(this);
  38977. },
  38978. toKeyedSeq: function toKeyedSeq() {
  38979. return new ToKeyedSequence(this, true);
  38980. },
  38981. toMap: function toMap() {
  38982. // Use Late Binding here to solve the circular dependency.
  38983. return Map(this.toKeyedSeq());
  38984. },
  38985. toObject: toObject,
  38986. toOrderedMap: function toOrderedMap() {
  38987. // Use Late Binding here to solve the circular dependency.
  38988. return OrderedMap(this.toKeyedSeq());
  38989. },
  38990. toOrderedSet: function toOrderedSet() {
  38991. // Use Late Binding here to solve the circular dependency.
  38992. return OrderedSet(isKeyed(this) ? this.valueSeq() : this);
  38993. },
  38994. toSet: function toSet() {
  38995. // Use Late Binding here to solve the circular dependency.
  38996. return Set(isKeyed(this) ? this.valueSeq() : this);
  38997. },
  38998. toSetSeq: function toSetSeq() {
  38999. return new ToSetSequence(this);
  39000. },
  39001. toSeq: function toSeq() {
  39002. return isIndexed(this)
  39003. ? this.toIndexedSeq()
  39004. : isKeyed(this)
  39005. ? this.toKeyedSeq()
  39006. : this.toSetSeq();
  39007. },
  39008. toStack: function toStack() {
  39009. // Use Late Binding here to solve the circular dependency.
  39010. return Stack(isKeyed(this) ? this.valueSeq() : this);
  39011. },
  39012. toList: function toList() {
  39013. // Use Late Binding here to solve the circular dependency.
  39014. return List(isKeyed(this) ? this.valueSeq() : this);
  39015. },
  39016. // ### Common JavaScript methods and properties
  39017. toString: function toString() {
  39018. return '[Collection]';
  39019. },
  39020. __toString: function __toString(head, tail) {
  39021. if (this.size === 0) {
  39022. return head + tail;
  39023. }
  39024. return (
  39025. head +
  39026. ' ' +
  39027. this.toSeq().map(this.__toStringMapper).join(', ') +
  39028. ' ' +
  39029. tail
  39030. );
  39031. },
  39032. // ### ES6 Collection methods (ES6 Array and Map)
  39033. concat: function concat() {
  39034. var values = [], len = arguments.length;
  39035. while ( len-- ) values[ len ] = arguments[ len ];
  39036. return reify(this, concatFactory(this, values));
  39037. },
  39038. includes: function includes(searchValue) {
  39039. return this.some(function (value) { return is(value, searchValue); });
  39040. },
  39041. entries: function entries() {
  39042. return this.__iterator(ITERATE_ENTRIES);
  39043. },
  39044. every: function every(predicate, context) {
  39045. assertNotInfinite(this.size);
  39046. var returnValue = true;
  39047. this.__iterate(function (v, k, c) {
  39048. if (!predicate.call(context, v, k, c)) {
  39049. returnValue = false;
  39050. return false;
  39051. }
  39052. });
  39053. return returnValue;
  39054. },
  39055. filter: function filter(predicate, context) {
  39056. return reify(this, filterFactory(this, predicate, context, true));
  39057. },
  39058. find: function find(predicate, context, notSetValue) {
  39059. var entry = this.findEntry(predicate, context);
  39060. return entry ? entry[1] : notSetValue;
  39061. },
  39062. forEach: function forEach(sideEffect, context) {
  39063. assertNotInfinite(this.size);
  39064. return this.__iterate(context ? sideEffect.bind(context) : sideEffect);
  39065. },
  39066. join: function join(separator) {
  39067. assertNotInfinite(this.size);
  39068. separator = separator !== undefined ? '' + separator : ',';
  39069. var joined = '';
  39070. var isFirst = true;
  39071. this.__iterate(function (v) {
  39072. isFirst ? (isFirst = false) : (joined += separator);
  39073. joined += v !== null && v !== undefined ? v.toString() : '';
  39074. });
  39075. return joined;
  39076. },
  39077. keys: function keys() {
  39078. return this.__iterator(ITERATE_KEYS);
  39079. },
  39080. map: function map(mapper, context) {
  39081. return reify(this, mapFactory(this, mapper, context));
  39082. },
  39083. reduce: function reduce$1(reducer, initialReduction, context) {
  39084. return reduce(
  39085. this,
  39086. reducer,
  39087. initialReduction,
  39088. context,
  39089. arguments.length < 2,
  39090. false
  39091. );
  39092. },
  39093. reduceRight: function reduceRight(reducer, initialReduction, context) {
  39094. return reduce(
  39095. this,
  39096. reducer,
  39097. initialReduction,
  39098. context,
  39099. arguments.length < 2,
  39100. true
  39101. );
  39102. },
  39103. reverse: function reverse() {
  39104. return reify(this, reverseFactory(this, true));
  39105. },
  39106. slice: function slice(begin, end) {
  39107. return reify(this, sliceFactory(this, begin, end, true));
  39108. },
  39109. some: function some(predicate, context) {
  39110. return !this.every(not(predicate), context);
  39111. },
  39112. sort: function sort(comparator) {
  39113. return reify(this, sortFactory(this, comparator));
  39114. },
  39115. values: function values() {
  39116. return this.__iterator(ITERATE_VALUES);
  39117. },
  39118. // ### More sequential methods
  39119. butLast: function butLast() {
  39120. return this.slice(0, -1);
  39121. },
  39122. isEmpty: function isEmpty() {
  39123. return this.size !== undefined ? this.size === 0 : !this.some(function () { return true; });
  39124. },
  39125. count: function count(predicate, context) {
  39126. return ensureSize(
  39127. predicate ? this.toSeq().filter(predicate, context) : this
  39128. );
  39129. },
  39130. countBy: function countBy(grouper, context) {
  39131. return countByFactory(this, grouper, context);
  39132. },
  39133. equals: function equals(other) {
  39134. return deepEqual(this, other);
  39135. },
  39136. entrySeq: function entrySeq() {
  39137. var collection = this;
  39138. if (collection._cache) {
  39139. // We cache as an entries array, so we can just return the cache!
  39140. return new ArraySeq(collection._cache);
  39141. }
  39142. var entriesSequence = collection.toSeq().map(entryMapper).toIndexedSeq();
  39143. entriesSequence.fromEntrySeq = function () { return collection.toSeq(); };
  39144. return entriesSequence;
  39145. },
  39146. filterNot: function filterNot(predicate, context) {
  39147. return this.filter(not(predicate), context);
  39148. },
  39149. findEntry: function findEntry(predicate, context, notSetValue) {
  39150. var found = notSetValue;
  39151. this.__iterate(function (v, k, c) {
  39152. if (predicate.call(context, v, k, c)) {
  39153. found = [k, v];
  39154. return false;
  39155. }
  39156. });
  39157. return found;
  39158. },
  39159. findKey: function findKey(predicate, context) {
  39160. var entry = this.findEntry(predicate, context);
  39161. return entry && entry[0];
  39162. },
  39163. findLast: function findLast(predicate, context, notSetValue) {
  39164. return this.toKeyedSeq().reverse().find(predicate, context, notSetValue);
  39165. },
  39166. findLastEntry: function findLastEntry(predicate, context, notSetValue) {
  39167. return this.toKeyedSeq()
  39168. .reverse()
  39169. .findEntry(predicate, context, notSetValue);
  39170. },
  39171. findLastKey: function findLastKey(predicate, context) {
  39172. return this.toKeyedSeq().reverse().findKey(predicate, context);
  39173. },
  39174. first: function first(notSetValue) {
  39175. return this.find(returnTrue, null, notSetValue);
  39176. },
  39177. flatMap: function flatMap(mapper, context) {
  39178. return reify(this, flatMapFactory(this, mapper, context));
  39179. },
  39180. flatten: function flatten(depth) {
  39181. return reify(this, flattenFactory(this, depth, true));
  39182. },
  39183. fromEntrySeq: function fromEntrySeq() {
  39184. return new FromEntriesSequence(this);
  39185. },
  39186. get: function get(searchKey, notSetValue) {
  39187. return this.find(function (_, key) { return is(key, searchKey); }, undefined, notSetValue);
  39188. },
  39189. getIn: getIn,
  39190. groupBy: function groupBy(grouper, context) {
  39191. return groupByFactory(this, grouper, context);
  39192. },
  39193. has: function has(searchKey) {
  39194. return this.get(searchKey, NOT_SET) !== NOT_SET;
  39195. },
  39196. hasIn: hasIn,
  39197. isSubset: function isSubset(iter) {
  39198. iter = typeof iter.includes === 'function' ? iter : Collection(iter);
  39199. return this.every(function (value) { return iter.includes(value); });
  39200. },
  39201. isSuperset: function isSuperset(iter) {
  39202. iter = typeof iter.isSubset === 'function' ? iter : Collection(iter);
  39203. return iter.isSubset(this);
  39204. },
  39205. keyOf: function keyOf(searchValue) {
  39206. return this.findKey(function (value) { return is(value, searchValue); });
  39207. },
  39208. keySeq: function keySeq() {
  39209. return this.toSeq().map(keyMapper).toIndexedSeq();
  39210. },
  39211. last: function last(notSetValue) {
  39212. return this.toSeq().reverse().first(notSetValue);
  39213. },
  39214. lastKeyOf: function lastKeyOf(searchValue) {
  39215. return this.toKeyedSeq().reverse().keyOf(searchValue);
  39216. },
  39217. max: function max(comparator) {
  39218. return maxFactory(this, comparator);
  39219. },
  39220. maxBy: function maxBy(mapper, comparator) {
  39221. return maxFactory(this, comparator, mapper);
  39222. },
  39223. min: function min(comparator) {
  39224. return maxFactory(
  39225. this,
  39226. comparator ? neg(comparator) : defaultNegComparator
  39227. );
  39228. },
  39229. minBy: function minBy(mapper, comparator) {
  39230. return maxFactory(
  39231. this,
  39232. comparator ? neg(comparator) : defaultNegComparator,
  39233. mapper
  39234. );
  39235. },
  39236. rest: function rest() {
  39237. return this.slice(1);
  39238. },
  39239. skip: function skip(amount) {
  39240. return amount === 0 ? this : this.slice(Math.max(0, amount));
  39241. },
  39242. skipLast: function skipLast(amount) {
  39243. return amount === 0 ? this : this.slice(0, -Math.max(0, amount));
  39244. },
  39245. skipWhile: function skipWhile(predicate, context) {
  39246. return reify(this, skipWhileFactory(this, predicate, context, true));
  39247. },
  39248. skipUntil: function skipUntil(predicate, context) {
  39249. return this.skipWhile(not(predicate), context);
  39250. },
  39251. sortBy: function sortBy(mapper, comparator) {
  39252. return reify(this, sortFactory(this, comparator, mapper));
  39253. },
  39254. take: function take(amount) {
  39255. return this.slice(0, Math.max(0, amount));
  39256. },
  39257. takeLast: function takeLast(amount) {
  39258. return this.slice(-Math.max(0, amount));
  39259. },
  39260. takeWhile: function takeWhile(predicate, context) {
  39261. return reify(this, takeWhileFactory(this, predicate, context));
  39262. },
  39263. takeUntil: function takeUntil(predicate, context) {
  39264. return this.takeWhile(not(predicate), context);
  39265. },
  39266. update: function update(fn) {
  39267. return fn(this);
  39268. },
  39269. valueSeq: function valueSeq() {
  39270. return this.toIndexedSeq();
  39271. },
  39272. // ### Hashable Object
  39273. hashCode: function hashCode() {
  39274. return this.__hash || (this.__hash = hashCollection(this));
  39275. },
  39276. // ### Internal
  39277. // abstract __iterate(fn, reverse)
  39278. // abstract __iterator(type, reverse)
  39279. });
  39280. var CollectionPrototype = Collection.prototype;
  39281. CollectionPrototype[IS_COLLECTION_SYMBOL] = true;
  39282. CollectionPrototype[ITERATOR_SYMBOL] = CollectionPrototype.values;
  39283. CollectionPrototype.toJSON = CollectionPrototype.toArray;
  39284. CollectionPrototype.__toStringMapper = quoteString;
  39285. CollectionPrototype.inspect = CollectionPrototype.toSource = function () {
  39286. return this.toString();
  39287. };
  39288. CollectionPrototype.chain = CollectionPrototype.flatMap;
  39289. CollectionPrototype.contains = CollectionPrototype.includes;
  39290. mixin(KeyedCollection, {
  39291. // ### More sequential methods
  39292. flip: function flip() {
  39293. return reify(this, flipFactory(this));
  39294. },
  39295. mapEntries: function mapEntries(mapper, context) {
  39296. var this$1$1 = this;
  39297. var iterations = 0;
  39298. return reify(
  39299. this,
  39300. this.toSeq()
  39301. .map(function (v, k) { return mapper.call(context, [k, v], iterations++, this$1$1); })
  39302. .fromEntrySeq()
  39303. );
  39304. },
  39305. mapKeys: function mapKeys(mapper, context) {
  39306. var this$1$1 = this;
  39307. return reify(
  39308. this,
  39309. this.toSeq()
  39310. .flip()
  39311. .map(function (k, v) { return mapper.call(context, k, v, this$1$1); })
  39312. .flip()
  39313. );
  39314. },
  39315. });
  39316. var KeyedCollectionPrototype = KeyedCollection.prototype;
  39317. KeyedCollectionPrototype[IS_KEYED_SYMBOL] = true;
  39318. KeyedCollectionPrototype[ITERATOR_SYMBOL] = CollectionPrototype.entries;
  39319. KeyedCollectionPrototype.toJSON = toObject;
  39320. KeyedCollectionPrototype.__toStringMapper = function (v, k) { return quoteString(k) + ': ' + quoteString(v); };
  39321. mixin(IndexedCollection, {
  39322. // ### Conversion to other types
  39323. toKeyedSeq: function toKeyedSeq() {
  39324. return new ToKeyedSequence(this, false);
  39325. },
  39326. // ### ES6 Collection methods (ES6 Array and Map)
  39327. filter: function filter(predicate, context) {
  39328. return reify(this, filterFactory(this, predicate, context, false));
  39329. },
  39330. findIndex: function findIndex(predicate, context) {
  39331. var entry = this.findEntry(predicate, context);
  39332. return entry ? entry[0] : -1;
  39333. },
  39334. indexOf: function indexOf(searchValue) {
  39335. var key = this.keyOf(searchValue);
  39336. return key === undefined ? -1 : key;
  39337. },
  39338. lastIndexOf: function lastIndexOf(searchValue) {
  39339. var key = this.lastKeyOf(searchValue);
  39340. return key === undefined ? -1 : key;
  39341. },
  39342. reverse: function reverse() {
  39343. return reify(this, reverseFactory(this, false));
  39344. },
  39345. slice: function slice(begin, end) {
  39346. return reify(this, sliceFactory(this, begin, end, false));
  39347. },
  39348. splice: function splice(index, removeNum /*, ...values*/) {
  39349. var numArgs = arguments.length;
  39350. removeNum = Math.max(removeNum || 0, 0);
  39351. if (numArgs === 0 || (numArgs === 2 && !removeNum)) {
  39352. return this;
  39353. }
  39354. // If index is negative, it should resolve relative to the size of the
  39355. // collection. However size may be expensive to compute if not cached, so
  39356. // only call count() if the number is in fact negative.
  39357. index = resolveBegin(index, index < 0 ? this.count() : this.size);
  39358. var spliced = this.slice(0, index);
  39359. return reify(
  39360. this,
  39361. numArgs === 1
  39362. ? spliced
  39363. : spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum))
  39364. );
  39365. },
  39366. // ### More collection methods
  39367. findLastIndex: function findLastIndex(predicate, context) {
  39368. var entry = this.findLastEntry(predicate, context);
  39369. return entry ? entry[0] : -1;
  39370. },
  39371. first: function first(notSetValue) {
  39372. return this.get(0, notSetValue);
  39373. },
  39374. flatten: function flatten(depth) {
  39375. return reify(this, flattenFactory(this, depth, false));
  39376. },
  39377. get: function get(index, notSetValue) {
  39378. index = wrapIndex(this, index);
  39379. return index < 0 ||
  39380. this.size === Infinity ||
  39381. (this.size !== undefined && index > this.size)
  39382. ? notSetValue
  39383. : this.find(function (_, key) { return key === index; }, undefined, notSetValue);
  39384. },
  39385. has: function has(index) {
  39386. index = wrapIndex(this, index);
  39387. return (
  39388. index >= 0 &&
  39389. (this.size !== undefined
  39390. ? this.size === Infinity || index < this.size
  39391. : this.indexOf(index) !== -1)
  39392. );
  39393. },
  39394. interpose: function interpose(separator) {
  39395. return reify(this, interposeFactory(this, separator));
  39396. },
  39397. interleave: function interleave(/*...collections*/) {
  39398. var collections = [this].concat(arrCopy(arguments));
  39399. var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, collections);
  39400. var interleaved = zipped.flatten(true);
  39401. if (zipped.size) {
  39402. interleaved.size = zipped.size * collections.length;
  39403. }
  39404. return reify(this, interleaved);
  39405. },
  39406. keySeq: function keySeq() {
  39407. return Range(0, this.size);
  39408. },
  39409. last: function last(notSetValue) {
  39410. return this.get(-1, notSetValue);
  39411. },
  39412. skipWhile: function skipWhile(predicate, context) {
  39413. return reify(this, skipWhileFactory(this, predicate, context, false));
  39414. },
  39415. zip: function zip(/*, ...collections */) {
  39416. var collections = [this].concat(arrCopy(arguments));
  39417. return reify(this, zipWithFactory(this, defaultZipper, collections));
  39418. },
  39419. zipAll: function zipAll(/*, ...collections */) {
  39420. var collections = [this].concat(arrCopy(arguments));
  39421. return reify(this, zipWithFactory(this, defaultZipper, collections, true));
  39422. },
  39423. zipWith: function zipWith(zipper /*, ...collections */) {
  39424. var collections = arrCopy(arguments);
  39425. collections[0] = this;
  39426. return reify(this, zipWithFactory(this, zipper, collections));
  39427. },
  39428. });
  39429. var IndexedCollectionPrototype = IndexedCollection.prototype;
  39430. IndexedCollectionPrototype[IS_INDEXED_SYMBOL] = true;
  39431. IndexedCollectionPrototype[IS_ORDERED_SYMBOL] = true;
  39432. mixin(SetCollection, {
  39433. // ### ES6 Collection methods (ES6 Array and Map)
  39434. get: function get(value, notSetValue) {
  39435. return this.has(value) ? value : notSetValue;
  39436. },
  39437. includes: function includes(value) {
  39438. return this.has(value);
  39439. },
  39440. // ### More sequential methods
  39441. keySeq: function keySeq() {
  39442. return this.valueSeq();
  39443. },
  39444. });
  39445. var SetCollectionPrototype = SetCollection.prototype;
  39446. SetCollectionPrototype.has = CollectionPrototype.includes;
  39447. SetCollectionPrototype.contains = SetCollectionPrototype.includes;
  39448. SetCollectionPrototype.keys = SetCollectionPrototype.values;
  39449. // Mixin subclasses
  39450. mixin(KeyedSeq, KeyedCollectionPrototype);
  39451. mixin(IndexedSeq, IndexedCollectionPrototype);
  39452. mixin(SetSeq, SetCollectionPrototype);
  39453. // #pragma Helper functions
  39454. function reduce(collection, reducer, reduction, context, useFirst, reverse) {
  39455. assertNotInfinite(collection.size);
  39456. collection.__iterate(function (v, k, c) {
  39457. if (useFirst) {
  39458. useFirst = false;
  39459. reduction = v;
  39460. } else {
  39461. reduction = reducer.call(context, reduction, v, k, c);
  39462. }
  39463. }, reverse);
  39464. return reduction;
  39465. }
  39466. function keyMapper(v, k) {
  39467. return k;
  39468. }
  39469. function entryMapper(v, k) {
  39470. return [k, v];
  39471. }
  39472. function not(predicate) {
  39473. return function () {
  39474. return !predicate.apply(this, arguments);
  39475. };
  39476. }
  39477. function neg(predicate) {
  39478. return function () {
  39479. return -predicate.apply(this, arguments);
  39480. };
  39481. }
  39482. function defaultZipper() {
  39483. return arrCopy(arguments);
  39484. }
  39485. function defaultNegComparator(a, b) {
  39486. return a < b ? 1 : a > b ? -1 : 0;
  39487. }
  39488. function hashCollection(collection) {
  39489. if (collection.size === Infinity) {
  39490. return 0;
  39491. }
  39492. var ordered = isOrdered(collection);
  39493. var keyed = isKeyed(collection);
  39494. var h = ordered ? 1 : 0;
  39495. var size = collection.__iterate(
  39496. keyed
  39497. ? ordered
  39498. ? function (v, k) {
  39499. h = (31 * h + hashMerge(hash(v), hash(k))) | 0;
  39500. }
  39501. : function (v, k) {
  39502. h = (h + hashMerge(hash(v), hash(k))) | 0;
  39503. }
  39504. : ordered
  39505. ? function (v) {
  39506. h = (31 * h + hash(v)) | 0;
  39507. }
  39508. : function (v) {
  39509. h = (h + hash(v)) | 0;
  39510. }
  39511. );
  39512. return murmurHashOfSize(size, h);
  39513. }
  39514. function murmurHashOfSize(size, h) {
  39515. h = imul(h, 0xcc9e2d51);
  39516. h = imul((h << 15) | (h >>> -15), 0x1b873593);
  39517. h = imul((h << 13) | (h >>> -13), 5);
  39518. h = ((h + 0xe6546b64) | 0) ^ size;
  39519. h = imul(h ^ (h >>> 16), 0x85ebca6b);
  39520. h = imul(h ^ (h >>> 13), 0xc2b2ae35);
  39521. h = smi(h ^ (h >>> 16));
  39522. return h;
  39523. }
  39524. function hashMerge(a, b) {
  39525. return (a ^ (b + 0x9e3779b9 + (a << 6) + (a >> 2))) | 0; // int
  39526. }
  39527. var OrderedSet = /*@__PURE__*/(function (Set) {
  39528. function OrderedSet(value) {
  39529. return value === null || value === undefined
  39530. ? emptyOrderedSet()
  39531. : isOrderedSet(value)
  39532. ? value
  39533. : emptyOrderedSet().withMutations(function (set) {
  39534. var iter = SetCollection(value);
  39535. assertNotInfinite(iter.size);
  39536. iter.forEach(function (v) { return set.add(v); });
  39537. });
  39538. }
  39539. if ( Set ) OrderedSet.__proto__ = Set;
  39540. OrderedSet.prototype = Object.create( Set && Set.prototype );
  39541. OrderedSet.prototype.constructor = OrderedSet;
  39542. OrderedSet.of = function of (/*...values*/) {
  39543. return this(arguments);
  39544. };
  39545. OrderedSet.fromKeys = function fromKeys (value) {
  39546. return this(KeyedCollection(value).keySeq());
  39547. };
  39548. OrderedSet.prototype.toString = function toString () {
  39549. return this.__toString('OrderedSet {', '}');
  39550. };
  39551. return OrderedSet;
  39552. }(Set));
  39553. OrderedSet.isOrderedSet = isOrderedSet;
  39554. var OrderedSetPrototype = OrderedSet.prototype;
  39555. OrderedSetPrototype[IS_ORDERED_SYMBOL] = true;
  39556. OrderedSetPrototype.zip = IndexedCollectionPrototype.zip;
  39557. OrderedSetPrototype.zipWith = IndexedCollectionPrototype.zipWith;
  39558. OrderedSetPrototype.zipAll = IndexedCollectionPrototype.zipAll;
  39559. OrderedSetPrototype.__empty = emptyOrderedSet;
  39560. OrderedSetPrototype.__make = makeOrderedSet;
  39561. function makeOrderedSet(map, ownerID) {
  39562. var set = Object.create(OrderedSetPrototype);
  39563. set.size = map ? map.size : 0;
  39564. set._map = map;
  39565. set.__ownerID = ownerID;
  39566. return set;
  39567. }
  39568. var EMPTY_ORDERED_SET;
  39569. function emptyOrderedSet() {
  39570. return (
  39571. EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap()))
  39572. );
  39573. }
  39574. function throwOnInvalidDefaultValues(defaultValues) {
  39575. if (isRecord(defaultValues)) {
  39576. throw new Error(
  39577. 'Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.'
  39578. );
  39579. }
  39580. if (isImmutable(defaultValues)) {
  39581. throw new Error(
  39582. 'Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.'
  39583. );
  39584. }
  39585. if (defaultValues === null || typeof defaultValues !== 'object') {
  39586. throw new Error(
  39587. 'Can not call `Record` with a non-object as default values. Use a plain javascript object instead.'
  39588. );
  39589. }
  39590. }
  39591. var Record = function Record(defaultValues, name) {
  39592. var hasInitialized;
  39593. throwOnInvalidDefaultValues(defaultValues);
  39594. var RecordType = function Record(values) {
  39595. var this$1$1 = this;
  39596. if (values instanceof RecordType) {
  39597. return values;
  39598. }
  39599. if (!(this instanceof RecordType)) {
  39600. return new RecordType(values);
  39601. }
  39602. if (!hasInitialized) {
  39603. hasInitialized = true;
  39604. var keys = Object.keys(defaultValues);
  39605. var indices = (RecordTypePrototype._indices = {});
  39606. // Deprecated: left to attempt not to break any external code which
  39607. // relies on a ._name property existing on record instances.
  39608. // Use Record.getDescriptiveName() instead
  39609. RecordTypePrototype._name = name;
  39610. RecordTypePrototype._keys = keys;
  39611. RecordTypePrototype._defaultValues = defaultValues;
  39612. for (var i = 0; i < keys.length; i++) {
  39613. var propName = keys[i];
  39614. indices[propName] = i;
  39615. if (RecordTypePrototype[propName]) {
  39616. /* eslint-disable no-console */
  39617. typeof console === 'object' &&
  39618. console.warn &&
  39619. console.warn(
  39620. 'Cannot define ' +
  39621. recordName(this) +
  39622. ' with property "' +
  39623. propName +
  39624. '" since that property name is part of the Record API.'
  39625. );
  39626. /* eslint-enable no-console */
  39627. } else {
  39628. setProp(RecordTypePrototype, propName);
  39629. }
  39630. }
  39631. }
  39632. this.__ownerID = undefined;
  39633. this._values = List().withMutations(function (l) {
  39634. l.setSize(this$1$1._keys.length);
  39635. KeyedCollection(values).forEach(function (v, k) {
  39636. l.set(this$1$1._indices[k], v === this$1$1._defaultValues[k] ? undefined : v);
  39637. });
  39638. });
  39639. return this;
  39640. };
  39641. var RecordTypePrototype = (RecordType.prototype =
  39642. Object.create(RecordPrototype));
  39643. RecordTypePrototype.constructor = RecordType;
  39644. if (name) {
  39645. RecordType.displayName = name;
  39646. }
  39647. return RecordType;
  39648. };
  39649. Record.prototype.toString = function toString () {
  39650. var str = recordName(this) + ' { ';
  39651. var keys = this._keys;
  39652. var k;
  39653. for (var i = 0, l = keys.length; i !== l; i++) {
  39654. k = keys[i];
  39655. str += (i ? ', ' : '') + k + ': ' + quoteString(this.get(k));
  39656. }
  39657. return str + ' }';
  39658. };
  39659. Record.prototype.equals = function equals (other) {
  39660. return (
  39661. this === other || (other && recordSeq(this).equals(recordSeq(other)))
  39662. );
  39663. };
  39664. Record.prototype.hashCode = function hashCode () {
  39665. return recordSeq(this).hashCode();
  39666. };
  39667. // @pragma Access
  39668. Record.prototype.has = function has (k) {
  39669. return this._indices.hasOwnProperty(k);
  39670. };
  39671. Record.prototype.get = function get (k, notSetValue) {
  39672. if (!this.has(k)) {
  39673. return notSetValue;
  39674. }
  39675. var index = this._indices[k];
  39676. var value = this._values.get(index);
  39677. return value === undefined ? this._defaultValues[k] : value;
  39678. };
  39679. // @pragma Modification
  39680. Record.prototype.set = function set (k, v) {
  39681. if (this.has(k)) {
  39682. var newValues = this._values.set(
  39683. this._indices[k],
  39684. v === this._defaultValues[k] ? undefined : v
  39685. );
  39686. if (newValues !== this._values && !this.__ownerID) {
  39687. return makeRecord(this, newValues);
  39688. }
  39689. }
  39690. return this;
  39691. };
  39692. Record.prototype.remove = function remove (k) {
  39693. return this.set(k);
  39694. };
  39695. Record.prototype.clear = function clear () {
  39696. var newValues = this._values.clear().setSize(this._keys.length);
  39697. return this.__ownerID ? this : makeRecord(this, newValues);
  39698. };
  39699. Record.prototype.wasAltered = function wasAltered () {
  39700. return this._values.wasAltered();
  39701. };
  39702. Record.prototype.toSeq = function toSeq () {
  39703. return recordSeq(this);
  39704. };
  39705. Record.prototype.toJS = function toJS$1 () {
  39706. return toJS(this);
  39707. };
  39708. Record.prototype.entries = function entries () {
  39709. return this.__iterator(ITERATE_ENTRIES);
  39710. };
  39711. Record.prototype.__iterator = function __iterator (type, reverse) {
  39712. return recordSeq(this).__iterator(type, reverse);
  39713. };
  39714. Record.prototype.__iterate = function __iterate (fn, reverse) {
  39715. return recordSeq(this).__iterate(fn, reverse);
  39716. };
  39717. Record.prototype.__ensureOwner = function __ensureOwner (ownerID) {
  39718. if (ownerID === this.__ownerID) {
  39719. return this;
  39720. }
  39721. var newValues = this._values.__ensureOwner(ownerID);
  39722. if (!ownerID) {
  39723. this.__ownerID = ownerID;
  39724. this._values = newValues;
  39725. return this;
  39726. }
  39727. return makeRecord(this, newValues, ownerID);
  39728. };
  39729. Record.isRecord = isRecord;
  39730. Record.getDescriptiveName = recordName;
  39731. var RecordPrototype = Record.prototype;
  39732. RecordPrototype[IS_RECORD_SYMBOL] = true;
  39733. RecordPrototype[DELETE] = RecordPrototype.remove;
  39734. RecordPrototype.deleteIn = RecordPrototype.removeIn = deleteIn;
  39735. RecordPrototype.getIn = getIn;
  39736. RecordPrototype.hasIn = CollectionPrototype.hasIn;
  39737. RecordPrototype.merge = merge$1;
  39738. RecordPrototype.mergeWith = mergeWith$1;
  39739. RecordPrototype.mergeIn = mergeIn;
  39740. RecordPrototype.mergeDeep = mergeDeep;
  39741. RecordPrototype.mergeDeepWith = mergeDeepWith;
  39742. RecordPrototype.mergeDeepIn = mergeDeepIn;
  39743. RecordPrototype.setIn = setIn;
  39744. RecordPrototype.update = update;
  39745. RecordPrototype.updateIn = updateIn;
  39746. RecordPrototype.withMutations = withMutations;
  39747. RecordPrototype.asMutable = asMutable;
  39748. RecordPrototype.asImmutable = asImmutable;
  39749. RecordPrototype[ITERATOR_SYMBOL] = RecordPrototype.entries;
  39750. RecordPrototype.toJSON = RecordPrototype.toObject =
  39751. CollectionPrototype.toObject;
  39752. RecordPrototype.inspect = RecordPrototype.toSource = function () {
  39753. return this.toString();
  39754. };
  39755. function makeRecord(likeRecord, values, ownerID) {
  39756. var record = Object.create(Object.getPrototypeOf(likeRecord));
  39757. record._values = values;
  39758. record.__ownerID = ownerID;
  39759. return record;
  39760. }
  39761. function recordName(record) {
  39762. return record.constructor.displayName || record.constructor.name || 'Record';
  39763. }
  39764. function recordSeq(record) {
  39765. return keyedSeqFromValue(record._keys.map(function (k) { return [k, record.get(k)]; }));
  39766. }
  39767. function setProp(prototype, name) {
  39768. try {
  39769. Object.defineProperty(prototype, name, {
  39770. get: function () {
  39771. return this.get(name);
  39772. },
  39773. set: function (value) {
  39774. invariant(this.__ownerID, 'Cannot set on an immutable record.');
  39775. this.set(name, value);
  39776. },
  39777. });
  39778. } catch (error) {
  39779. // Object.defineProperty failed. Probably IE8.
  39780. }
  39781. }
  39782. /**
  39783. * Returns a lazy Seq of `value` repeated `times` times. When `times` is
  39784. * undefined, returns an infinite sequence of `value`.
  39785. */
  39786. var Repeat = /*@__PURE__*/(function (IndexedSeq) {
  39787. function Repeat(value, times) {
  39788. if (!(this instanceof Repeat)) {
  39789. return new Repeat(value, times);
  39790. }
  39791. this._value = value;
  39792. this.size = times === undefined ? Infinity : Math.max(0, times);
  39793. if (this.size === 0) {
  39794. if (EMPTY_REPEAT) {
  39795. return EMPTY_REPEAT;
  39796. }
  39797. EMPTY_REPEAT = this;
  39798. }
  39799. }
  39800. if ( IndexedSeq ) Repeat.__proto__ = IndexedSeq;
  39801. Repeat.prototype = Object.create( IndexedSeq && IndexedSeq.prototype );
  39802. Repeat.prototype.constructor = Repeat;
  39803. Repeat.prototype.toString = function toString () {
  39804. if (this.size === 0) {
  39805. return 'Repeat []';
  39806. }
  39807. return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]';
  39808. };
  39809. Repeat.prototype.get = function get (index, notSetValue) {
  39810. return this.has(index) ? this._value : notSetValue;
  39811. };
  39812. Repeat.prototype.includes = function includes (searchValue) {
  39813. return is(this._value, searchValue);
  39814. };
  39815. Repeat.prototype.slice = function slice (begin, end) {
  39816. var size = this.size;
  39817. return wholeSlice(begin, end, size)
  39818. ? this
  39819. : new Repeat(
  39820. this._value,
  39821. resolveEnd(end, size) - resolveBegin(begin, size)
  39822. );
  39823. };
  39824. Repeat.prototype.reverse = function reverse () {
  39825. return this;
  39826. };
  39827. Repeat.prototype.indexOf = function indexOf (searchValue) {
  39828. if (is(this._value, searchValue)) {
  39829. return 0;
  39830. }
  39831. return -1;
  39832. };
  39833. Repeat.prototype.lastIndexOf = function lastIndexOf (searchValue) {
  39834. if (is(this._value, searchValue)) {
  39835. return this.size;
  39836. }
  39837. return -1;
  39838. };
  39839. Repeat.prototype.__iterate = function __iterate (fn, reverse) {
  39840. var size = this.size;
  39841. var i = 0;
  39842. while (i !== size) {
  39843. if (fn(this._value, reverse ? size - ++i : i++, this) === false) {
  39844. break;
  39845. }
  39846. }
  39847. return i;
  39848. };
  39849. Repeat.prototype.__iterator = function __iterator (type, reverse) {
  39850. var this$1$1 = this;
  39851. var size = this.size;
  39852. var i = 0;
  39853. return new Iterator(function () { return i === size
  39854. ? iteratorDone()
  39855. : iteratorValue(type, reverse ? size - ++i : i++, this$1$1._value); }
  39856. );
  39857. };
  39858. Repeat.prototype.equals = function equals (other) {
  39859. return other instanceof Repeat
  39860. ? is(this._value, other._value)
  39861. : deepEqual(other);
  39862. };
  39863. return Repeat;
  39864. }(IndexedSeq));
  39865. var EMPTY_REPEAT;
  39866. function fromJS(value, converter) {
  39867. return fromJSWith(
  39868. [],
  39869. converter || defaultConverter,
  39870. value,
  39871. '',
  39872. converter && converter.length > 2 ? [] : undefined,
  39873. { '': value }
  39874. );
  39875. }
  39876. function fromJSWith(stack, converter, value, key, keyPath, parentValue) {
  39877. if (
  39878. typeof value !== 'string' &&
  39879. !isImmutable(value) &&
  39880. (isArrayLike(value) || hasIterator(value) || isPlainObject(value))
  39881. ) {
  39882. if (~stack.indexOf(value)) {
  39883. throw new TypeError('Cannot convert circular structure to Immutable');
  39884. }
  39885. stack.push(value);
  39886. keyPath && key !== '' && keyPath.push(key);
  39887. var converted = converter.call(
  39888. parentValue,
  39889. key,
  39890. Seq(value).map(function (v, k) { return fromJSWith(stack, converter, v, k, keyPath, value); }
  39891. ),
  39892. keyPath && keyPath.slice()
  39893. );
  39894. stack.pop();
  39895. keyPath && keyPath.pop();
  39896. return converted;
  39897. }
  39898. return value;
  39899. }
  39900. function defaultConverter(k, v) {
  39901. // Effectively the opposite of "Collection.toSeq()"
  39902. return isIndexed(v) ? v.toList() : isKeyed(v) ? v.toMap() : v.toSet();
  39903. }
  39904. var version = "4.0.0";
  39905. var Immutable = {
  39906. version: version,
  39907. Collection: Collection,
  39908. // Note: Iterable is deprecated
  39909. Iterable: Collection,
  39910. Seq: Seq,
  39911. Map: Map,
  39912. OrderedMap: OrderedMap,
  39913. List: List,
  39914. Stack: Stack,
  39915. Set: Set,
  39916. OrderedSet: OrderedSet,
  39917. Record: Record,
  39918. Range: Range,
  39919. Repeat: Repeat,
  39920. is: is,
  39921. fromJS: fromJS,
  39922. hash: hash,
  39923. isImmutable: isImmutable,
  39924. isCollection: isCollection,
  39925. isKeyed: isKeyed,
  39926. isIndexed: isIndexed,
  39927. isAssociative: isAssociative,
  39928. isOrdered: isOrdered,
  39929. isValueObject: isValueObject,
  39930. isPlainObject: isPlainObject,
  39931. isSeq: isSeq,
  39932. isList: isList,
  39933. isMap: isMap,
  39934. isOrderedMap: isOrderedMap,
  39935. isStack: isStack,
  39936. isSet: isSet,
  39937. isOrderedSet: isOrderedSet,
  39938. isRecord: isRecord,
  39939. get: get,
  39940. getIn: getIn$1,
  39941. has: has,
  39942. hasIn: hasIn$1,
  39943. merge: merge,
  39944. mergeDeep: mergeDeep$1,
  39945. mergeWith: mergeWith,
  39946. mergeDeepWith: mergeDeepWith$1,
  39947. remove: remove,
  39948. removeIn: removeIn,
  39949. set: set,
  39950. setIn: setIn$1,
  39951. update: update$1,
  39952. updateIn: updateIn$1,
  39953. };
  39954. // Note: Iterable is deprecated
  39955. var Iterable = (/* unused pure expression or super */ null && (Collection));
  39956. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Immutable);
  39957. /***/ }),
  39958. /***/ 23634:
  39959. /***/ (function(module) {
  39960. /**
  39961. * Copyright (c) 2014-present, Facebook, Inc.
  39962. *
  39963. * This source code is licensed under the MIT license found in the
  39964. * LICENSE file in the root directory of this source tree.
  39965. */
  39966. (function (global, factory) {
  39967. true ? module.exports = factory() :
  39968. 0;
  39969. }(this, function () { 'use strict';var SLICE$0 = Array.prototype.slice;
  39970. function createClass(ctor, superClass) {
  39971. if (superClass) {
  39972. ctor.prototype = Object.create(superClass.prototype);
  39973. }
  39974. ctor.prototype.constructor = ctor;
  39975. }
  39976. function Iterable(value) {
  39977. return isIterable(value) ? value : Seq(value);
  39978. }
  39979. createClass(KeyedIterable, Iterable);
  39980. function KeyedIterable(value) {
  39981. return isKeyed(value) ? value : KeyedSeq(value);
  39982. }
  39983. createClass(IndexedIterable, Iterable);
  39984. function IndexedIterable(value) {
  39985. return isIndexed(value) ? value : IndexedSeq(value);
  39986. }
  39987. createClass(SetIterable, Iterable);
  39988. function SetIterable(value) {
  39989. return isIterable(value) && !isAssociative(value) ? value : SetSeq(value);
  39990. }
  39991. function isIterable(maybeIterable) {
  39992. return !!(maybeIterable && maybeIterable[IS_ITERABLE_SENTINEL]);
  39993. }
  39994. function isKeyed(maybeKeyed) {
  39995. return !!(maybeKeyed && maybeKeyed[IS_KEYED_SENTINEL]);
  39996. }
  39997. function isIndexed(maybeIndexed) {
  39998. return !!(maybeIndexed && maybeIndexed[IS_INDEXED_SENTINEL]);
  39999. }
  40000. function isAssociative(maybeAssociative) {
  40001. return isKeyed(maybeAssociative) || isIndexed(maybeAssociative);
  40002. }
  40003. function isOrdered(maybeOrdered) {
  40004. return !!(maybeOrdered && maybeOrdered[IS_ORDERED_SENTINEL]);
  40005. }
  40006. Iterable.isIterable = isIterable;
  40007. Iterable.isKeyed = isKeyed;
  40008. Iterable.isIndexed = isIndexed;
  40009. Iterable.isAssociative = isAssociative;
  40010. Iterable.isOrdered = isOrdered;
  40011. Iterable.Keyed = KeyedIterable;
  40012. Iterable.Indexed = IndexedIterable;
  40013. Iterable.Set = SetIterable;
  40014. var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';
  40015. var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';
  40016. var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';
  40017. var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';
  40018. // Used for setting prototype methods that IE8 chokes on.
  40019. var DELETE = 'delete';
  40020. // Constants describing the size of trie nodes.
  40021. var SHIFT = 5; // Resulted in best performance after ______?
  40022. var SIZE = 1 << SHIFT;
  40023. var MASK = SIZE - 1;
  40024. // A consistent shared value representing "not set" which equals nothing other
  40025. // than itself, and nothing that could be provided externally.
  40026. var NOT_SET = {};
  40027. // Boolean references, Rough equivalent of `bool &`.
  40028. var CHANGE_LENGTH = { value: false };
  40029. var DID_ALTER = { value: false };
  40030. function MakeRef(ref) {
  40031. ref.value = false;
  40032. return ref;
  40033. }
  40034. function SetRef(ref) {
  40035. ref && (ref.value = true);
  40036. }
  40037. // A function which returns a value representing an "owner" for transient writes
  40038. // to tries. The return value will only ever equal itself, and will not equal
  40039. // the return of any subsequent call of this function.
  40040. function OwnerID() {}
  40041. // http://jsperf.com/copy-array-inline
  40042. function arrCopy(arr, offset) {
  40043. offset = offset || 0;
  40044. var len = Math.max(0, arr.length - offset);
  40045. var newArr = new Array(len);
  40046. for (var ii = 0; ii < len; ii++) {
  40047. newArr[ii] = arr[ii + offset];
  40048. }
  40049. return newArr;
  40050. }
  40051. function ensureSize(iter) {
  40052. if (iter.size === undefined) {
  40053. iter.size = iter.__iterate(returnTrue);
  40054. }
  40055. return iter.size;
  40056. }
  40057. function wrapIndex(iter, index) {
  40058. // This implements "is array index" which the ECMAString spec defines as:
  40059. //
  40060. // A String property name P is an array index if and only if
  40061. // ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal
  40062. // to 2^32−1.
  40063. //
  40064. // http://www.ecma-international.org/ecma-262/6.0/#sec-array-exotic-objects
  40065. if (typeof index !== 'number') {
  40066. var uint32Index = index >>> 0; // N >>> 0 is shorthand for ToUint32
  40067. if ('' + uint32Index !== index || uint32Index === 4294967295) {
  40068. return NaN;
  40069. }
  40070. index = uint32Index;
  40071. }
  40072. return index < 0 ? ensureSize(iter) + index : index;
  40073. }
  40074. function returnTrue() {
  40075. return true;
  40076. }
  40077. function wholeSlice(begin, end, size) {
  40078. return (begin === 0 || (size !== undefined && begin <= -size)) &&
  40079. (end === undefined || (size !== undefined && end >= size));
  40080. }
  40081. function resolveBegin(begin, size) {
  40082. return resolveIndex(begin, size, 0);
  40083. }
  40084. function resolveEnd(end, size) {
  40085. return resolveIndex(end, size, size);
  40086. }
  40087. function resolveIndex(index, size, defaultIndex) {
  40088. return index === undefined ?
  40089. defaultIndex :
  40090. index < 0 ?
  40091. Math.max(0, size + index) :
  40092. size === undefined ?
  40093. index :
  40094. Math.min(size, index);
  40095. }
  40096. /* global Symbol */
  40097. var ITERATE_KEYS = 0;
  40098. var ITERATE_VALUES = 1;
  40099. var ITERATE_ENTRIES = 2;
  40100. var REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
  40101. var FAUX_ITERATOR_SYMBOL = '@@iterator';
  40102. var ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL;
  40103. function Iterator(next) {
  40104. this.next = next;
  40105. }
  40106. Iterator.prototype.toString = function() {
  40107. return '[Iterator]';
  40108. };
  40109. Iterator.KEYS = ITERATE_KEYS;
  40110. Iterator.VALUES = ITERATE_VALUES;
  40111. Iterator.ENTRIES = ITERATE_ENTRIES;
  40112. Iterator.prototype.inspect =
  40113. Iterator.prototype.toSource = function () { return this.toString(); }
  40114. Iterator.prototype[ITERATOR_SYMBOL] = function () {
  40115. return this;
  40116. };
  40117. function iteratorValue(type, k, v, iteratorResult) {
  40118. var value = type === 0 ? k : type === 1 ? v : [k, v];
  40119. iteratorResult ? (iteratorResult.value = value) : (iteratorResult = {
  40120. value: value, done: false
  40121. });
  40122. return iteratorResult;
  40123. }
  40124. function iteratorDone() {
  40125. return { value: undefined, done: true };
  40126. }
  40127. function hasIterator(maybeIterable) {
  40128. return !!getIteratorFn(maybeIterable);
  40129. }
  40130. function isIterator(maybeIterator) {
  40131. return maybeIterator && typeof maybeIterator.next === 'function';
  40132. }
  40133. function getIterator(iterable) {
  40134. var iteratorFn = getIteratorFn(iterable);
  40135. return iteratorFn && iteratorFn.call(iterable);
  40136. }
  40137. function getIteratorFn(iterable) {
  40138. var iteratorFn = iterable && (
  40139. (REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) ||
  40140. iterable[FAUX_ITERATOR_SYMBOL]
  40141. );
  40142. if (typeof iteratorFn === 'function') {
  40143. return iteratorFn;
  40144. }
  40145. }
  40146. function isArrayLike(value) {
  40147. return value && typeof value.length === 'number';
  40148. }
  40149. createClass(Seq, Iterable);
  40150. function Seq(value) {
  40151. return value === null || value === undefined ? emptySequence() :
  40152. isIterable(value) ? value.toSeq() : seqFromValue(value);
  40153. }
  40154. Seq.of = function(/*...values*/) {
  40155. return Seq(arguments);
  40156. };
  40157. Seq.prototype.toSeq = function() {
  40158. return this;
  40159. };
  40160. Seq.prototype.toString = function() {
  40161. return this.__toString('Seq {', '}');
  40162. };
  40163. Seq.prototype.cacheResult = function() {
  40164. if (!this._cache && this.__iterateUncached) {
  40165. this._cache = this.entrySeq().toArray();
  40166. this.size = this._cache.length;
  40167. }
  40168. return this;
  40169. };
  40170. // abstract __iterateUncached(fn, reverse)
  40171. Seq.prototype.__iterate = function(fn, reverse) {
  40172. return seqIterate(this, fn, reverse, true);
  40173. };
  40174. // abstract __iteratorUncached(type, reverse)
  40175. Seq.prototype.__iterator = function(type, reverse) {
  40176. return seqIterator(this, type, reverse, true);
  40177. };
  40178. createClass(KeyedSeq, Seq);
  40179. function KeyedSeq(value) {
  40180. return value === null || value === undefined ?
  40181. emptySequence().toKeyedSeq() :
  40182. isIterable(value) ?
  40183. (isKeyed(value) ? value.toSeq() : value.fromEntrySeq()) :
  40184. keyedSeqFromValue(value);
  40185. }
  40186. KeyedSeq.prototype.toKeyedSeq = function() {
  40187. return this;
  40188. };
  40189. createClass(IndexedSeq, Seq);
  40190. function IndexedSeq(value) {
  40191. return value === null || value === undefined ? emptySequence() :
  40192. !isIterable(value) ? indexedSeqFromValue(value) :
  40193. isKeyed(value) ? value.entrySeq() : value.toIndexedSeq();
  40194. }
  40195. IndexedSeq.of = function(/*...values*/) {
  40196. return IndexedSeq(arguments);
  40197. };
  40198. IndexedSeq.prototype.toIndexedSeq = function() {
  40199. return this;
  40200. };
  40201. IndexedSeq.prototype.toString = function() {
  40202. return this.__toString('Seq [', ']');
  40203. };
  40204. IndexedSeq.prototype.__iterate = function(fn, reverse) {
  40205. return seqIterate(this, fn, reverse, false);
  40206. };
  40207. IndexedSeq.prototype.__iterator = function(type, reverse) {
  40208. return seqIterator(this, type, reverse, false);
  40209. };
  40210. createClass(SetSeq, Seq);
  40211. function SetSeq(value) {
  40212. return (
  40213. value === null || value === undefined ? emptySequence() :
  40214. !isIterable(value) ? indexedSeqFromValue(value) :
  40215. isKeyed(value) ? value.entrySeq() : value
  40216. ).toSetSeq();
  40217. }
  40218. SetSeq.of = function(/*...values*/) {
  40219. return SetSeq(arguments);
  40220. };
  40221. SetSeq.prototype.toSetSeq = function() {
  40222. return this;
  40223. };
  40224. Seq.isSeq = isSeq;
  40225. Seq.Keyed = KeyedSeq;
  40226. Seq.Set = SetSeq;
  40227. Seq.Indexed = IndexedSeq;
  40228. var IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@';
  40229. Seq.prototype[IS_SEQ_SENTINEL] = true;
  40230. createClass(ArraySeq, IndexedSeq);
  40231. function ArraySeq(array) {
  40232. this._array = array;
  40233. this.size = array.length;
  40234. }
  40235. ArraySeq.prototype.get = function(index, notSetValue) {
  40236. return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue;
  40237. };
  40238. ArraySeq.prototype.__iterate = function(fn, reverse) {
  40239. var array = this._array;
  40240. var maxIndex = array.length - 1;
  40241. for (var ii = 0; ii <= maxIndex; ii++) {
  40242. if (fn(array[reverse ? maxIndex - ii : ii], ii, this) === false) {
  40243. return ii + 1;
  40244. }
  40245. }
  40246. return ii;
  40247. };
  40248. ArraySeq.prototype.__iterator = function(type, reverse) {
  40249. var array = this._array;
  40250. var maxIndex = array.length - 1;
  40251. var ii = 0;
  40252. return new Iterator(function()
  40253. {return ii > maxIndex ?
  40254. iteratorDone() :
  40255. iteratorValue(type, ii, array[reverse ? maxIndex - ii++ : ii++])}
  40256. );
  40257. };
  40258. createClass(ObjectSeq, KeyedSeq);
  40259. function ObjectSeq(object) {
  40260. var keys = Object.keys(object);
  40261. this._object = object;
  40262. this._keys = keys;
  40263. this.size = keys.length;
  40264. }
  40265. ObjectSeq.prototype.get = function(key, notSetValue) {
  40266. if (notSetValue !== undefined && !this.has(key)) {
  40267. return notSetValue;
  40268. }
  40269. return this._object[key];
  40270. };
  40271. ObjectSeq.prototype.has = function(key) {
  40272. return this._object.hasOwnProperty(key);
  40273. };
  40274. ObjectSeq.prototype.__iterate = function(fn, reverse) {
  40275. var object = this._object;
  40276. var keys = this._keys;
  40277. var maxIndex = keys.length - 1;
  40278. for (var ii = 0; ii <= maxIndex; ii++) {
  40279. var key = keys[reverse ? maxIndex - ii : ii];
  40280. if (fn(object[key], key, this) === false) {
  40281. return ii + 1;
  40282. }
  40283. }
  40284. return ii;
  40285. };
  40286. ObjectSeq.prototype.__iterator = function(type, reverse) {
  40287. var object = this._object;
  40288. var keys = this._keys;
  40289. var maxIndex = keys.length - 1;
  40290. var ii = 0;
  40291. return new Iterator(function() {
  40292. var key = keys[reverse ? maxIndex - ii : ii];
  40293. return ii++ > maxIndex ?
  40294. iteratorDone() :
  40295. iteratorValue(type, key, object[key]);
  40296. });
  40297. };
  40298. ObjectSeq.prototype[IS_ORDERED_SENTINEL] = true;
  40299. createClass(IterableSeq, IndexedSeq);
  40300. function IterableSeq(iterable) {
  40301. this._iterable = iterable;
  40302. this.size = iterable.length || iterable.size;
  40303. }
  40304. IterableSeq.prototype.__iterateUncached = function(fn, reverse) {
  40305. if (reverse) {
  40306. return this.cacheResult().__iterate(fn, reverse);
  40307. }
  40308. var iterable = this._iterable;
  40309. var iterator = getIterator(iterable);
  40310. var iterations = 0;
  40311. if (isIterator(iterator)) {
  40312. var step;
  40313. while (!(step = iterator.next()).done) {
  40314. if (fn(step.value, iterations++, this) === false) {
  40315. break;
  40316. }
  40317. }
  40318. }
  40319. return iterations;
  40320. };
  40321. IterableSeq.prototype.__iteratorUncached = function(type, reverse) {
  40322. if (reverse) {
  40323. return this.cacheResult().__iterator(type, reverse);
  40324. }
  40325. var iterable = this._iterable;
  40326. var iterator = getIterator(iterable);
  40327. if (!isIterator(iterator)) {
  40328. return new Iterator(iteratorDone);
  40329. }
  40330. var iterations = 0;
  40331. return new Iterator(function() {
  40332. var step = iterator.next();
  40333. return step.done ? step : iteratorValue(type, iterations++, step.value);
  40334. });
  40335. };
  40336. createClass(IteratorSeq, IndexedSeq);
  40337. function IteratorSeq(iterator) {
  40338. this._iterator = iterator;
  40339. this._iteratorCache = [];
  40340. }
  40341. IteratorSeq.prototype.__iterateUncached = function(fn, reverse) {
  40342. if (reverse) {
  40343. return this.cacheResult().__iterate(fn, reverse);
  40344. }
  40345. var iterator = this._iterator;
  40346. var cache = this._iteratorCache;
  40347. var iterations = 0;
  40348. while (iterations < cache.length) {
  40349. if (fn(cache[iterations], iterations++, this) === false) {
  40350. return iterations;
  40351. }
  40352. }
  40353. var step;
  40354. while (!(step = iterator.next()).done) {
  40355. var val = step.value;
  40356. cache[iterations] = val;
  40357. if (fn(val, iterations++, this) === false) {
  40358. break;
  40359. }
  40360. }
  40361. return iterations;
  40362. };
  40363. IteratorSeq.prototype.__iteratorUncached = function(type, reverse) {
  40364. if (reverse) {
  40365. return this.cacheResult().__iterator(type, reverse);
  40366. }
  40367. var iterator = this._iterator;
  40368. var cache = this._iteratorCache;
  40369. var iterations = 0;
  40370. return new Iterator(function() {
  40371. if (iterations >= cache.length) {
  40372. var step = iterator.next();
  40373. if (step.done) {
  40374. return step;
  40375. }
  40376. cache[iterations] = step.value;
  40377. }
  40378. return iteratorValue(type, iterations, cache[iterations++]);
  40379. });
  40380. };
  40381. // # pragma Helper functions
  40382. function isSeq(maybeSeq) {
  40383. return !!(maybeSeq && maybeSeq[IS_SEQ_SENTINEL]);
  40384. }
  40385. var EMPTY_SEQ;
  40386. function emptySequence() {
  40387. return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([]));
  40388. }
  40389. function keyedSeqFromValue(value) {
  40390. var seq =
  40391. Array.isArray(value) ? new ArraySeq(value).fromEntrySeq() :
  40392. isIterator(value) ? new IteratorSeq(value).fromEntrySeq() :
  40393. hasIterator(value) ? new IterableSeq(value).fromEntrySeq() :
  40394. typeof value === 'object' ? new ObjectSeq(value) :
  40395. undefined;
  40396. if (!seq) {
  40397. throw new TypeError(
  40398. 'Expected Array or iterable object of [k, v] entries, '+
  40399. 'or keyed object: ' + value
  40400. );
  40401. }
  40402. return seq;
  40403. }
  40404. function indexedSeqFromValue(value) {
  40405. var seq = maybeIndexedSeqFromValue(value);
  40406. if (!seq) {
  40407. throw new TypeError(
  40408. 'Expected Array or iterable object of values: ' + value
  40409. );
  40410. }
  40411. return seq;
  40412. }
  40413. function seqFromValue(value) {
  40414. var seq = maybeIndexedSeqFromValue(value) ||
  40415. (typeof value === 'object' && new ObjectSeq(value));
  40416. if (!seq) {
  40417. throw new TypeError(
  40418. 'Expected Array or iterable object of values, or keyed object: ' + value
  40419. );
  40420. }
  40421. return seq;
  40422. }
  40423. function maybeIndexedSeqFromValue(value) {
  40424. return (
  40425. isArrayLike(value) ? new ArraySeq(value) :
  40426. isIterator(value) ? new IteratorSeq(value) :
  40427. hasIterator(value) ? new IterableSeq(value) :
  40428. undefined
  40429. );
  40430. }
  40431. function seqIterate(seq, fn, reverse, useKeys) {
  40432. var cache = seq._cache;
  40433. if (cache) {
  40434. var maxIndex = cache.length - 1;
  40435. for (var ii = 0; ii <= maxIndex; ii++) {
  40436. var entry = cache[reverse ? maxIndex - ii : ii];
  40437. if (fn(entry[1], useKeys ? entry[0] : ii, seq) === false) {
  40438. return ii + 1;
  40439. }
  40440. }
  40441. return ii;
  40442. }
  40443. return seq.__iterateUncached(fn, reverse);
  40444. }
  40445. function seqIterator(seq, type, reverse, useKeys) {
  40446. var cache = seq._cache;
  40447. if (cache) {
  40448. var maxIndex = cache.length - 1;
  40449. var ii = 0;
  40450. return new Iterator(function() {
  40451. var entry = cache[reverse ? maxIndex - ii : ii];
  40452. return ii++ > maxIndex ?
  40453. iteratorDone() :
  40454. iteratorValue(type, useKeys ? entry[0] : ii - 1, entry[1]);
  40455. });
  40456. }
  40457. return seq.__iteratorUncached(type, reverse);
  40458. }
  40459. function fromJS(json, converter) {
  40460. return converter ?
  40461. fromJSWith(converter, json, '', {'': json}) :
  40462. fromJSDefault(json);
  40463. }
  40464. function fromJSWith(converter, json, key, parentJSON) {
  40465. if (Array.isArray(json)) {
  40466. return converter.call(parentJSON, key, IndexedSeq(json).map(function(v, k) {return fromJSWith(converter, v, k, json)}));
  40467. }
  40468. if (isPlainObj(json)) {
  40469. return converter.call(parentJSON, key, KeyedSeq(json).map(function(v, k) {return fromJSWith(converter, v, k, json)}));
  40470. }
  40471. return json;
  40472. }
  40473. function fromJSDefault(json) {
  40474. if (Array.isArray(json)) {
  40475. return IndexedSeq(json).map(fromJSDefault).toList();
  40476. }
  40477. if (isPlainObj(json)) {
  40478. return KeyedSeq(json).map(fromJSDefault).toMap();
  40479. }
  40480. return json;
  40481. }
  40482. function isPlainObj(value) {
  40483. return value && (value.constructor === Object || value.constructor === undefined);
  40484. }
  40485. /**
  40486. * An extension of the "same-value" algorithm as [described for use by ES6 Map
  40487. * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality)
  40488. *
  40489. * NaN is considered the same as NaN, however -0 and 0 are considered the same
  40490. * value, which is different from the algorithm described by
  40491. * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
  40492. *
  40493. * This is extended further to allow Objects to describe the values they
  40494. * represent, by way of `valueOf` or `equals` (and `hashCode`).
  40495. *
  40496. * Note: because of this extension, the key equality of Immutable.Map and the
  40497. * value equality of Immutable.Set will differ from ES6 Map and Set.
  40498. *
  40499. * ### Defining custom values
  40500. *
  40501. * The easiest way to describe the value an object represents is by implementing
  40502. * `valueOf`. For example, `Date` represents a value by returning a unix
  40503. * timestamp for `valueOf`:
  40504. *
  40505. * var date1 = new Date(1234567890000); // Fri Feb 13 2009 ...
  40506. * var date2 = new Date(1234567890000);
  40507. * date1.valueOf(); // 1234567890000
  40508. * assert( date1 !== date2 );
  40509. * assert( Immutable.is( date1, date2 ) );
  40510. *
  40511. * Note: overriding `valueOf` may have other implications if you use this object
  40512. * where JavaScript expects a primitive, such as implicit string coercion.
  40513. *
  40514. * For more complex types, especially collections, implementing `valueOf` may
  40515. * not be performant. An alternative is to implement `equals` and `hashCode`.
  40516. *
  40517. * `equals` takes another object, presumably of similar type, and returns true
  40518. * if the it is equal. Equality is symmetrical, so the same result should be
  40519. * returned if this and the argument are flipped.
  40520. *
  40521. * assert( a.equals(b) === b.equals(a) );
  40522. *
  40523. * `hashCode` returns a 32bit integer number representing the object which will
  40524. * be used to determine how to store the value object in a Map or Set. You must
  40525. * provide both or neither methods, one must not exist without the other.
  40526. *
  40527. * Also, an important relationship between these methods must be upheld: if two
  40528. * values are equal, they *must* return the same hashCode. If the values are not
  40529. * equal, they might have the same hashCode; this is called a hash collision,
  40530. * and while undesirable for performance reasons, it is acceptable.
  40531. *
  40532. * if (a.equals(b)) {
  40533. * assert( a.hashCode() === b.hashCode() );
  40534. * }
  40535. *
  40536. * All Immutable collections implement `equals` and `hashCode`.
  40537. *
  40538. */
  40539. function is(valueA, valueB) {
  40540. if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {
  40541. return true;
  40542. }
  40543. if (!valueA || !valueB) {
  40544. return false;
  40545. }
  40546. if (typeof valueA.valueOf === 'function' &&
  40547. typeof valueB.valueOf === 'function') {
  40548. valueA = valueA.valueOf();
  40549. valueB = valueB.valueOf();
  40550. if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {
  40551. return true;
  40552. }
  40553. if (!valueA || !valueB) {
  40554. return false;
  40555. }
  40556. }
  40557. if (typeof valueA.equals === 'function' &&
  40558. typeof valueB.equals === 'function' &&
  40559. valueA.equals(valueB)) {
  40560. return true;
  40561. }
  40562. return false;
  40563. }
  40564. function deepEqual(a, b) {
  40565. if (a === b) {
  40566. return true;
  40567. }
  40568. if (
  40569. !isIterable(b) ||
  40570. a.size !== undefined && b.size !== undefined && a.size !== b.size ||
  40571. a.__hash !== undefined && b.__hash !== undefined && a.__hash !== b.__hash ||
  40572. isKeyed(a) !== isKeyed(b) ||
  40573. isIndexed(a) !== isIndexed(b) ||
  40574. isOrdered(a) !== isOrdered(b)
  40575. ) {
  40576. return false;
  40577. }
  40578. if (a.size === 0 && b.size === 0) {
  40579. return true;
  40580. }
  40581. var notAssociative = !isAssociative(a);
  40582. if (isOrdered(a)) {
  40583. var entries = a.entries();
  40584. return b.every(function(v, k) {
  40585. var entry = entries.next().value;
  40586. return entry && is(entry[1], v) && (notAssociative || is(entry[0], k));
  40587. }) && entries.next().done;
  40588. }
  40589. var flipped = false;
  40590. if (a.size === undefined) {
  40591. if (b.size === undefined) {
  40592. if (typeof a.cacheResult === 'function') {
  40593. a.cacheResult();
  40594. }
  40595. } else {
  40596. flipped = true;
  40597. var _ = a;
  40598. a = b;
  40599. b = _;
  40600. }
  40601. }
  40602. var allEqual = true;
  40603. var bSize = b.__iterate(function(v, k) {
  40604. if (notAssociative ? !a.has(v) :
  40605. flipped ? !is(v, a.get(k, NOT_SET)) : !is(a.get(k, NOT_SET), v)) {
  40606. allEqual = false;
  40607. return false;
  40608. }
  40609. });
  40610. return allEqual && a.size === bSize;
  40611. }
  40612. createClass(Repeat, IndexedSeq);
  40613. function Repeat(value, times) {
  40614. if (!(this instanceof Repeat)) {
  40615. return new Repeat(value, times);
  40616. }
  40617. this._value = value;
  40618. this.size = times === undefined ? Infinity : Math.max(0, times);
  40619. if (this.size === 0) {
  40620. if (EMPTY_REPEAT) {
  40621. return EMPTY_REPEAT;
  40622. }
  40623. EMPTY_REPEAT = this;
  40624. }
  40625. }
  40626. Repeat.prototype.toString = function() {
  40627. if (this.size === 0) {
  40628. return 'Repeat []';
  40629. }
  40630. return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]';
  40631. };
  40632. Repeat.prototype.get = function(index, notSetValue) {
  40633. return this.has(index) ? this._value : notSetValue;
  40634. };
  40635. Repeat.prototype.includes = function(searchValue) {
  40636. return is(this._value, searchValue);
  40637. };
  40638. Repeat.prototype.slice = function(begin, end) {
  40639. var size = this.size;
  40640. return wholeSlice(begin, end, size) ? this :
  40641. new Repeat(this._value, resolveEnd(end, size) - resolveBegin(begin, size));
  40642. };
  40643. Repeat.prototype.reverse = function() {
  40644. return this;
  40645. };
  40646. Repeat.prototype.indexOf = function(searchValue) {
  40647. if (is(this._value, searchValue)) {
  40648. return 0;
  40649. }
  40650. return -1;
  40651. };
  40652. Repeat.prototype.lastIndexOf = function(searchValue) {
  40653. if (is(this._value, searchValue)) {
  40654. return this.size;
  40655. }
  40656. return -1;
  40657. };
  40658. Repeat.prototype.__iterate = function(fn, reverse) {
  40659. for (var ii = 0; ii < this.size; ii++) {
  40660. if (fn(this._value, ii, this) === false) {
  40661. return ii + 1;
  40662. }
  40663. }
  40664. return ii;
  40665. };
  40666. Repeat.prototype.__iterator = function(type, reverse) {var this$0 = this;
  40667. var ii = 0;
  40668. return new Iterator(function()
  40669. {return ii < this$0.size ? iteratorValue(type, ii++, this$0._value) : iteratorDone()}
  40670. );
  40671. };
  40672. Repeat.prototype.equals = function(other) {
  40673. return other instanceof Repeat ?
  40674. is(this._value, other._value) :
  40675. deepEqual(other);
  40676. };
  40677. var EMPTY_REPEAT;
  40678. function invariant(condition, error) {
  40679. if (!condition) throw new Error(error);
  40680. }
  40681. createClass(Range, IndexedSeq);
  40682. function Range(start, end, step) {
  40683. if (!(this instanceof Range)) {
  40684. return new Range(start, end, step);
  40685. }
  40686. invariant(step !== 0, 'Cannot step a Range by 0');
  40687. start = start || 0;
  40688. if (end === undefined) {
  40689. end = Infinity;
  40690. }
  40691. step = step === undefined ? 1 : Math.abs(step);
  40692. if (end < start) {
  40693. step = -step;
  40694. }
  40695. this._start = start;
  40696. this._end = end;
  40697. this._step = step;
  40698. this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1);
  40699. if (this.size === 0) {
  40700. if (EMPTY_RANGE) {
  40701. return EMPTY_RANGE;
  40702. }
  40703. EMPTY_RANGE = this;
  40704. }
  40705. }
  40706. Range.prototype.toString = function() {
  40707. if (this.size === 0) {
  40708. return 'Range []';
  40709. }
  40710. return 'Range [ ' +
  40711. this._start + '...' + this._end +
  40712. (this._step !== 1 ? ' by ' + this._step : '') +
  40713. ' ]';
  40714. };
  40715. Range.prototype.get = function(index, notSetValue) {
  40716. return this.has(index) ?
  40717. this._start + wrapIndex(this, index) * this._step :
  40718. notSetValue;
  40719. };
  40720. Range.prototype.includes = function(searchValue) {
  40721. var possibleIndex = (searchValue - this._start) / this._step;
  40722. return possibleIndex >= 0 &&
  40723. possibleIndex < this.size &&
  40724. possibleIndex === Math.floor(possibleIndex);
  40725. };
  40726. Range.prototype.slice = function(begin, end) {
  40727. if (wholeSlice(begin, end, this.size)) {
  40728. return this;
  40729. }
  40730. begin = resolveBegin(begin, this.size);
  40731. end = resolveEnd(end, this.size);
  40732. if (end <= begin) {
  40733. return new Range(0, 0);
  40734. }
  40735. return new Range(this.get(begin, this._end), this.get(end, this._end), this._step);
  40736. };
  40737. Range.prototype.indexOf = function(searchValue) {
  40738. var offsetValue = searchValue - this._start;
  40739. if (offsetValue % this._step === 0) {
  40740. var index = offsetValue / this._step;
  40741. if (index >= 0 && index < this.size) {
  40742. return index
  40743. }
  40744. }
  40745. return -1;
  40746. };
  40747. Range.prototype.lastIndexOf = function(searchValue) {
  40748. return this.indexOf(searchValue);
  40749. };
  40750. Range.prototype.__iterate = function(fn, reverse) {
  40751. var maxIndex = this.size - 1;
  40752. var step = this._step;
  40753. var value = reverse ? this._start + maxIndex * step : this._start;
  40754. for (var ii = 0; ii <= maxIndex; ii++) {
  40755. if (fn(value, ii, this) === false) {
  40756. return ii + 1;
  40757. }
  40758. value += reverse ? -step : step;
  40759. }
  40760. return ii;
  40761. };
  40762. Range.prototype.__iterator = function(type, reverse) {
  40763. var maxIndex = this.size - 1;
  40764. var step = this._step;
  40765. var value = reverse ? this._start + maxIndex * step : this._start;
  40766. var ii = 0;
  40767. return new Iterator(function() {
  40768. var v = value;
  40769. value += reverse ? -step : step;
  40770. return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii++, v);
  40771. });
  40772. };
  40773. Range.prototype.equals = function(other) {
  40774. return other instanceof Range ?
  40775. this._start === other._start &&
  40776. this._end === other._end &&
  40777. this._step === other._step :
  40778. deepEqual(this, other);
  40779. };
  40780. var EMPTY_RANGE;
  40781. createClass(Collection, Iterable);
  40782. function Collection() {
  40783. throw TypeError('Abstract');
  40784. }
  40785. createClass(KeyedCollection, Collection);function KeyedCollection() {}
  40786. createClass(IndexedCollection, Collection);function IndexedCollection() {}
  40787. createClass(SetCollection, Collection);function SetCollection() {}
  40788. Collection.Keyed = KeyedCollection;
  40789. Collection.Indexed = IndexedCollection;
  40790. Collection.Set = SetCollection;
  40791. var imul =
  40792. typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2 ?
  40793. Math.imul :
  40794. function imul(a, b) {
  40795. a = a | 0; // int
  40796. b = b | 0; // int
  40797. var c = a & 0xffff;
  40798. var d = b & 0xffff;
  40799. // Shift by 0 fixes the sign on the high part.
  40800. return (c * d) + ((((a >>> 16) * d + c * (b >>> 16)) << 16) >>> 0) | 0; // int
  40801. };
  40802. // v8 has an optimization for storing 31-bit signed numbers.
  40803. // Values which have either 00 or 11 as the high order bits qualify.
  40804. // This function drops the highest order bit in a signed number, maintaining
  40805. // the sign bit.
  40806. function smi(i32) {
  40807. return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);
  40808. }
  40809. function hash(o) {
  40810. if (o === false || o === null || o === undefined) {
  40811. return 0;
  40812. }
  40813. if (typeof o.valueOf === 'function') {
  40814. o = o.valueOf();
  40815. if (o === false || o === null || o === undefined) {
  40816. return 0;
  40817. }
  40818. }
  40819. if (o === true) {
  40820. return 1;
  40821. }
  40822. var type = typeof o;
  40823. if (type === 'number') {
  40824. if (o !== o || o === Infinity) {
  40825. return 0;
  40826. }
  40827. var h = o | 0;
  40828. if (h !== o) {
  40829. h ^= o * 0xFFFFFFFF;
  40830. }
  40831. while (o > 0xFFFFFFFF) {
  40832. o /= 0xFFFFFFFF;
  40833. h ^= o;
  40834. }
  40835. return smi(h);
  40836. }
  40837. if (type === 'string') {
  40838. return o.length > STRING_HASH_CACHE_MIN_STRLEN ? cachedHashString(o) : hashString(o);
  40839. }
  40840. if (typeof o.hashCode === 'function') {
  40841. return o.hashCode();
  40842. }
  40843. if (type === 'object') {
  40844. return hashJSObj(o);
  40845. }
  40846. if (typeof o.toString === 'function') {
  40847. return hashString(o.toString());
  40848. }
  40849. throw new Error('Value type ' + type + ' cannot be hashed.');
  40850. }
  40851. function cachedHashString(string) {
  40852. var hash = stringHashCache[string];
  40853. if (hash === undefined) {
  40854. hash = hashString(string);
  40855. if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) {
  40856. STRING_HASH_CACHE_SIZE = 0;
  40857. stringHashCache = {};
  40858. }
  40859. STRING_HASH_CACHE_SIZE++;
  40860. stringHashCache[string] = hash;
  40861. }
  40862. return hash;
  40863. }
  40864. // http://jsperf.com/hashing-strings
  40865. function hashString(string) {
  40866. // This is the hash from JVM
  40867. // The hash code for a string is computed as
  40868. // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1],
  40869. // where s[i] is the ith character of the string and n is the length of
  40870. // the string. We "mod" the result to make it between 0 (inclusive) and 2^31
  40871. // (exclusive) by dropping high bits.
  40872. var hash = 0;
  40873. for (var ii = 0; ii < string.length; ii++) {
  40874. hash = 31 * hash + string.charCodeAt(ii) | 0;
  40875. }
  40876. return smi(hash);
  40877. }
  40878. function hashJSObj(obj) {
  40879. var hash;
  40880. if (usingWeakMap) {
  40881. hash = weakMap.get(obj);
  40882. if (hash !== undefined) {
  40883. return hash;
  40884. }
  40885. }
  40886. hash = obj[UID_HASH_KEY];
  40887. if (hash !== undefined) {
  40888. return hash;
  40889. }
  40890. if (!canDefineProperty) {
  40891. hash = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY];
  40892. if (hash !== undefined) {
  40893. return hash;
  40894. }
  40895. hash = getIENodeHash(obj);
  40896. if (hash !== undefined) {
  40897. return hash;
  40898. }
  40899. }
  40900. hash = ++objHashUID;
  40901. if (objHashUID & 0x40000000) {
  40902. objHashUID = 0;
  40903. }
  40904. if (usingWeakMap) {
  40905. weakMap.set(obj, hash);
  40906. } else if (isExtensible !== undefined && isExtensible(obj) === false) {
  40907. throw new Error('Non-extensible objects are not allowed as keys.');
  40908. } else if (canDefineProperty) {
  40909. Object.defineProperty(obj, UID_HASH_KEY, {
  40910. 'enumerable': false,
  40911. 'configurable': false,
  40912. 'writable': false,
  40913. 'value': hash
  40914. });
  40915. } else if (obj.propertyIsEnumerable !== undefined &&
  40916. obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable) {
  40917. // Since we can't define a non-enumerable property on the object
  40918. // we'll hijack one of the less-used non-enumerable properties to
  40919. // save our hash on it. Since this is a function it will not show up in
  40920. // `JSON.stringify` which is what we want.
  40921. obj.propertyIsEnumerable = function() {
  40922. return this.constructor.prototype.propertyIsEnumerable.apply(this, arguments);
  40923. };
  40924. obj.propertyIsEnumerable[UID_HASH_KEY] = hash;
  40925. } else if (obj.nodeType !== undefined) {
  40926. // At this point we couldn't get the IE `uniqueID` to use as a hash
  40927. // and we couldn't use a non-enumerable property to exploit the
  40928. // dontEnum bug so we simply add the `UID_HASH_KEY` on the node
  40929. // itself.
  40930. obj[UID_HASH_KEY] = hash;
  40931. } else {
  40932. throw new Error('Unable to set a non-enumerable property on object.');
  40933. }
  40934. return hash;
  40935. }
  40936. // Get references to ES5 object methods.
  40937. var isExtensible = Object.isExtensible;
  40938. // True if Object.defineProperty works as expected. IE8 fails this test.
  40939. var canDefineProperty = (function() {
  40940. try {
  40941. Object.defineProperty({}, '@', {});
  40942. return true;
  40943. } catch (e) {
  40944. return false;
  40945. }
  40946. }());
  40947. // IE has a `uniqueID` property on DOM nodes. We can construct the hash from it
  40948. // and avoid memory leaks from the IE cloneNode bug.
  40949. function getIENodeHash(node) {
  40950. if (node && node.nodeType > 0) {
  40951. switch (node.nodeType) {
  40952. case 1: // Element
  40953. return node.uniqueID;
  40954. case 9: // Document
  40955. return node.documentElement && node.documentElement.uniqueID;
  40956. }
  40957. }
  40958. }
  40959. // If possible, use a WeakMap.
  40960. var usingWeakMap = typeof WeakMap === 'function';
  40961. var weakMap;
  40962. if (usingWeakMap) {
  40963. weakMap = new WeakMap();
  40964. }
  40965. var objHashUID = 0;
  40966. var UID_HASH_KEY = '__immutablehash__';
  40967. if (typeof Symbol === 'function') {
  40968. UID_HASH_KEY = Symbol(UID_HASH_KEY);
  40969. }
  40970. var STRING_HASH_CACHE_MIN_STRLEN = 16;
  40971. var STRING_HASH_CACHE_MAX_SIZE = 255;
  40972. var STRING_HASH_CACHE_SIZE = 0;
  40973. var stringHashCache = {};
  40974. function assertNotInfinite(size) {
  40975. invariant(
  40976. size !== Infinity,
  40977. 'Cannot perform this action with an infinite size.'
  40978. );
  40979. }
  40980. createClass(Map, KeyedCollection);
  40981. // @pragma Construction
  40982. function Map(value) {
  40983. return value === null || value === undefined ? emptyMap() :
  40984. isMap(value) && !isOrdered(value) ? value :
  40985. emptyMap().withMutations(function(map ) {
  40986. var iter = KeyedIterable(value);
  40987. assertNotInfinite(iter.size);
  40988. iter.forEach(function(v, k) {return map.set(k, v)});
  40989. });
  40990. }
  40991. Map.of = function() {var keyValues = SLICE$0.call(arguments, 0);
  40992. return emptyMap().withMutations(function(map ) {
  40993. for (var i = 0; i < keyValues.length; i += 2) {
  40994. if (i + 1 >= keyValues.length) {
  40995. throw new Error('Missing value for key: ' + keyValues[i]);
  40996. }
  40997. map.set(keyValues[i], keyValues[i + 1]);
  40998. }
  40999. });
  41000. };
  41001. Map.prototype.toString = function() {
  41002. return this.__toString('Map {', '}');
  41003. };
  41004. // @pragma Access
  41005. Map.prototype.get = function(k, notSetValue) {
  41006. return this._root ?
  41007. this._root.get(0, undefined, k, notSetValue) :
  41008. notSetValue;
  41009. };
  41010. // @pragma Modification
  41011. Map.prototype.set = function(k, v) {
  41012. return updateMap(this, k, v);
  41013. };
  41014. Map.prototype.setIn = function(keyPath, v) {
  41015. return this.updateIn(keyPath, NOT_SET, function() {return v});
  41016. };
  41017. Map.prototype.remove = function(k) {
  41018. return updateMap(this, k, NOT_SET);
  41019. };
  41020. Map.prototype.deleteIn = function(keyPath) {
  41021. return this.updateIn(keyPath, function() {return NOT_SET});
  41022. };
  41023. Map.prototype.update = function(k, notSetValue, updater) {
  41024. return arguments.length === 1 ?
  41025. k(this) :
  41026. this.updateIn([k], notSetValue, updater);
  41027. };
  41028. Map.prototype.updateIn = function(keyPath, notSetValue, updater) {
  41029. if (!updater) {
  41030. updater = notSetValue;
  41031. notSetValue = undefined;
  41032. }
  41033. var updatedValue = updateInDeepMap(
  41034. this,
  41035. forceIterator(keyPath),
  41036. notSetValue,
  41037. updater
  41038. );
  41039. return updatedValue === NOT_SET ? undefined : updatedValue;
  41040. };
  41041. Map.prototype.clear = function() {
  41042. if (this.size === 0) {
  41043. return this;
  41044. }
  41045. if (this.__ownerID) {
  41046. this.size = 0;
  41047. this._root = null;
  41048. this.__hash = undefined;
  41049. this.__altered = true;
  41050. return this;
  41051. }
  41052. return emptyMap();
  41053. };
  41054. // @pragma Composition
  41055. Map.prototype.merge = function(/*...iters*/) {
  41056. return mergeIntoMapWith(this, undefined, arguments);
  41057. };
  41058. Map.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);
  41059. return mergeIntoMapWith(this, merger, iters);
  41060. };
  41061. Map.prototype.mergeIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1);
  41062. return this.updateIn(
  41063. keyPath,
  41064. emptyMap(),
  41065. function(m ) {return typeof m.merge === 'function' ?
  41066. m.merge.apply(m, iters) :
  41067. iters[iters.length - 1]}
  41068. );
  41069. };
  41070. Map.prototype.mergeDeep = function(/*...iters*/) {
  41071. return mergeIntoMapWith(this, deepMerger, arguments);
  41072. };
  41073. Map.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1);
  41074. return mergeIntoMapWith(this, deepMergerWith(merger), iters);
  41075. };
  41076. Map.prototype.mergeDeepIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1);
  41077. return this.updateIn(
  41078. keyPath,
  41079. emptyMap(),
  41080. function(m ) {return typeof m.mergeDeep === 'function' ?
  41081. m.mergeDeep.apply(m, iters) :
  41082. iters[iters.length - 1]}
  41083. );
  41084. };
  41085. Map.prototype.sort = function(comparator) {
  41086. // Late binding
  41087. return OrderedMap(sortFactory(this, comparator));
  41088. };
  41089. Map.prototype.sortBy = function(mapper, comparator) {
  41090. // Late binding
  41091. return OrderedMap(sortFactory(this, comparator, mapper));
  41092. };
  41093. // @pragma Mutability
  41094. Map.prototype.withMutations = function(fn) {
  41095. var mutable = this.asMutable();
  41096. fn(mutable);
  41097. return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this;
  41098. };
  41099. Map.prototype.asMutable = function() {
  41100. return this.__ownerID ? this : this.__ensureOwner(new OwnerID());
  41101. };
  41102. Map.prototype.asImmutable = function() {
  41103. return this.__ensureOwner();
  41104. };
  41105. Map.prototype.wasAltered = function() {
  41106. return this.__altered;
  41107. };
  41108. Map.prototype.__iterator = function(type, reverse) {
  41109. return new MapIterator(this, type, reverse);
  41110. };
  41111. Map.prototype.__iterate = function(fn, reverse) {var this$0 = this;
  41112. var iterations = 0;
  41113. this._root && this._root.iterate(function(entry ) {
  41114. iterations++;
  41115. return fn(entry[1], entry[0], this$0);
  41116. }, reverse);
  41117. return iterations;
  41118. };
  41119. Map.prototype.__ensureOwner = function(ownerID) {
  41120. if (ownerID === this.__ownerID) {
  41121. return this;
  41122. }
  41123. if (!ownerID) {
  41124. this.__ownerID = ownerID;
  41125. this.__altered = false;
  41126. return this;
  41127. }
  41128. return makeMap(this.size, this._root, ownerID, this.__hash);
  41129. };
  41130. function isMap(maybeMap) {
  41131. return !!(maybeMap && maybeMap[IS_MAP_SENTINEL]);
  41132. }
  41133. Map.isMap = isMap;
  41134. var IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@';
  41135. var MapPrototype = Map.prototype;
  41136. MapPrototype[IS_MAP_SENTINEL] = true;
  41137. MapPrototype[DELETE] = MapPrototype.remove;
  41138. MapPrototype.removeIn = MapPrototype.deleteIn;
  41139. // #pragma Trie Nodes
  41140. function ArrayMapNode(ownerID, entries) {
  41141. this.ownerID = ownerID;
  41142. this.entries = entries;
  41143. }
  41144. ArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) {
  41145. var entries = this.entries;
  41146. for (var ii = 0, len = entries.length; ii < len; ii++) {
  41147. if (is(key, entries[ii][0])) {
  41148. return entries[ii][1];
  41149. }
  41150. }
  41151. return notSetValue;
  41152. };
  41153. ArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
  41154. var removed = value === NOT_SET;
  41155. var entries = this.entries;
  41156. var idx = 0;
  41157. for (var len = entries.length; idx < len; idx++) {
  41158. if (is(key, entries[idx][0])) {
  41159. break;
  41160. }
  41161. }
  41162. var exists = idx < len;
  41163. if (exists ? entries[idx][1] === value : removed) {
  41164. return this;
  41165. }
  41166. SetRef(didAlter);
  41167. (removed || !exists) && SetRef(didChangeSize);
  41168. if (removed && entries.length === 1) {
  41169. return; // undefined
  41170. }
  41171. if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) {
  41172. return createNodes(ownerID, entries, key, value);
  41173. }
  41174. var isEditable = ownerID && ownerID === this.ownerID;
  41175. var newEntries = isEditable ? entries : arrCopy(entries);
  41176. if (exists) {
  41177. if (removed) {
  41178. idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop());
  41179. } else {
  41180. newEntries[idx] = [key, value];
  41181. }
  41182. } else {
  41183. newEntries.push([key, value]);
  41184. }
  41185. if (isEditable) {
  41186. this.entries = newEntries;
  41187. return this;
  41188. }
  41189. return new ArrayMapNode(ownerID, newEntries);
  41190. };
  41191. function BitmapIndexedNode(ownerID, bitmap, nodes) {
  41192. this.ownerID = ownerID;
  41193. this.bitmap = bitmap;
  41194. this.nodes = nodes;
  41195. }
  41196. BitmapIndexedNode.prototype.get = function(shift, keyHash, key, notSetValue) {
  41197. if (keyHash === undefined) {
  41198. keyHash = hash(key);
  41199. }
  41200. var bit = (1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK));
  41201. var bitmap = this.bitmap;
  41202. return (bitmap & bit) === 0 ? notSetValue :
  41203. this.nodes[popCount(bitmap & (bit - 1))].get(shift + SHIFT, keyHash, key, notSetValue);
  41204. };
  41205. BitmapIndexedNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
  41206. if (keyHash === undefined) {
  41207. keyHash = hash(key);
  41208. }
  41209. var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;
  41210. var bit = 1 << keyHashFrag;
  41211. var bitmap = this.bitmap;
  41212. var exists = (bitmap & bit) !== 0;
  41213. if (!exists && value === NOT_SET) {
  41214. return this;
  41215. }
  41216. var idx = popCount(bitmap & (bit - 1));
  41217. var nodes = this.nodes;
  41218. var node = exists ? nodes[idx] : undefined;
  41219. var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);
  41220. if (newNode === node) {
  41221. return this;
  41222. }
  41223. if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) {
  41224. return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode);
  41225. }
  41226. if (exists && !newNode && nodes.length === 2 && isLeafNode(nodes[idx ^ 1])) {
  41227. return nodes[idx ^ 1];
  41228. }
  41229. if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) {
  41230. return newNode;
  41231. }
  41232. var isEditable = ownerID && ownerID === this.ownerID;
  41233. var newBitmap = exists ? newNode ? bitmap : bitmap ^ bit : bitmap | bit;
  41234. var newNodes = exists ? newNode ?
  41235. setIn(nodes, idx, newNode, isEditable) :
  41236. spliceOut(nodes, idx, isEditable) :
  41237. spliceIn(nodes, idx, newNode, isEditable);
  41238. if (isEditable) {
  41239. this.bitmap = newBitmap;
  41240. this.nodes = newNodes;
  41241. return this;
  41242. }
  41243. return new BitmapIndexedNode(ownerID, newBitmap, newNodes);
  41244. };
  41245. function HashArrayMapNode(ownerID, count, nodes) {
  41246. this.ownerID = ownerID;
  41247. this.count = count;
  41248. this.nodes = nodes;
  41249. }
  41250. HashArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) {
  41251. if (keyHash === undefined) {
  41252. keyHash = hash(key);
  41253. }
  41254. var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;
  41255. var node = this.nodes[idx];
  41256. return node ? node.get(shift + SHIFT, keyHash, key, notSetValue) : notSetValue;
  41257. };
  41258. HashArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
  41259. if (keyHash === undefined) {
  41260. keyHash = hash(key);
  41261. }
  41262. var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;
  41263. var removed = value === NOT_SET;
  41264. var nodes = this.nodes;
  41265. var node = nodes[idx];
  41266. if (removed && !node) {
  41267. return this;
  41268. }
  41269. var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);
  41270. if (newNode === node) {
  41271. return this;
  41272. }
  41273. var newCount = this.count;
  41274. if (!node) {
  41275. newCount++;
  41276. } else if (!newNode) {
  41277. newCount--;
  41278. if (newCount < MIN_HASH_ARRAY_MAP_SIZE) {
  41279. return packNodes(ownerID, nodes, newCount, idx);
  41280. }
  41281. }
  41282. var isEditable = ownerID && ownerID === this.ownerID;
  41283. var newNodes = setIn(nodes, idx, newNode, isEditable);
  41284. if (isEditable) {
  41285. this.count = newCount;
  41286. this.nodes = newNodes;
  41287. return this;
  41288. }
  41289. return new HashArrayMapNode(ownerID, newCount, newNodes);
  41290. };
  41291. function HashCollisionNode(ownerID, keyHash, entries) {
  41292. this.ownerID = ownerID;
  41293. this.keyHash = keyHash;
  41294. this.entries = entries;
  41295. }
  41296. HashCollisionNode.prototype.get = function(shift, keyHash, key, notSetValue) {
  41297. var entries = this.entries;
  41298. for (var ii = 0, len = entries.length; ii < len; ii++) {
  41299. if (is(key, entries[ii][0])) {
  41300. return entries[ii][1];
  41301. }
  41302. }
  41303. return notSetValue;
  41304. };
  41305. HashCollisionNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
  41306. if (keyHash === undefined) {
  41307. keyHash = hash(key);
  41308. }
  41309. var removed = value === NOT_SET;
  41310. if (keyHash !== this.keyHash) {
  41311. if (removed) {
  41312. return this;
  41313. }
  41314. SetRef(didAlter);
  41315. SetRef(didChangeSize);
  41316. return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]);
  41317. }
  41318. var entries = this.entries;
  41319. var idx = 0;
  41320. for (var len = entries.length; idx < len; idx++) {
  41321. if (is(key, entries[idx][0])) {
  41322. break;
  41323. }
  41324. }
  41325. var exists = idx < len;
  41326. if (exists ? entries[idx][1] === value : removed) {
  41327. return this;
  41328. }
  41329. SetRef(didAlter);
  41330. (removed || !exists) && SetRef(didChangeSize);
  41331. if (removed && len === 2) {
  41332. return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]);
  41333. }
  41334. var isEditable = ownerID && ownerID === this.ownerID;
  41335. var newEntries = isEditable ? entries : arrCopy(entries);
  41336. if (exists) {
  41337. if (removed) {
  41338. idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop());
  41339. } else {
  41340. newEntries[idx] = [key, value];
  41341. }
  41342. } else {
  41343. newEntries.push([key, value]);
  41344. }
  41345. if (isEditable) {
  41346. this.entries = newEntries;
  41347. return this;
  41348. }
  41349. return new HashCollisionNode(ownerID, this.keyHash, newEntries);
  41350. };
  41351. function ValueNode(ownerID, keyHash, entry) {
  41352. this.ownerID = ownerID;
  41353. this.keyHash = keyHash;
  41354. this.entry = entry;
  41355. }
  41356. ValueNode.prototype.get = function(shift, keyHash, key, notSetValue) {
  41357. return is(key, this.entry[0]) ? this.entry[1] : notSetValue;
  41358. };
  41359. ValueNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
  41360. var removed = value === NOT_SET;
  41361. var keyMatch = is(key, this.entry[0]);
  41362. if (keyMatch ? value === this.entry[1] : removed) {
  41363. return this;
  41364. }
  41365. SetRef(didAlter);
  41366. if (removed) {
  41367. SetRef(didChangeSize);
  41368. return; // undefined
  41369. }
  41370. if (keyMatch) {
  41371. if (ownerID && ownerID === this.ownerID) {
  41372. this.entry[1] = value;
  41373. return this;
  41374. }
  41375. return new ValueNode(ownerID, this.keyHash, [key, value]);
  41376. }
  41377. SetRef(didChangeSize);
  41378. return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]);
  41379. };
  41380. // #pragma Iterators
  41381. ArrayMapNode.prototype.iterate =
  41382. HashCollisionNode.prototype.iterate = function (fn, reverse) {
  41383. var entries = this.entries;
  41384. for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) {
  41385. if (fn(entries[reverse ? maxIndex - ii : ii]) === false) {
  41386. return false;
  41387. }
  41388. }
  41389. }
  41390. BitmapIndexedNode.prototype.iterate =
  41391. HashArrayMapNode.prototype.iterate = function (fn, reverse) {
  41392. var nodes = this.nodes;
  41393. for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) {
  41394. var node = nodes[reverse ? maxIndex - ii : ii];
  41395. if (node && node.iterate(fn, reverse) === false) {
  41396. return false;
  41397. }
  41398. }
  41399. }
  41400. ValueNode.prototype.iterate = function (fn, reverse) {
  41401. return fn(this.entry);
  41402. }
  41403. createClass(MapIterator, Iterator);
  41404. function MapIterator(map, type, reverse) {
  41405. this._type = type;
  41406. this._reverse = reverse;
  41407. this._stack = map._root && mapIteratorFrame(map._root);
  41408. }
  41409. MapIterator.prototype.next = function() {
  41410. var type = this._type;
  41411. var stack = this._stack;
  41412. while (stack) {
  41413. var node = stack.node;
  41414. var index = stack.index++;
  41415. var maxIndex;
  41416. if (node.entry) {
  41417. if (index === 0) {
  41418. return mapIteratorValue(type, node.entry);
  41419. }
  41420. } else if (node.entries) {
  41421. maxIndex = node.entries.length - 1;
  41422. if (index <= maxIndex) {
  41423. return mapIteratorValue(type, node.entries[this._reverse ? maxIndex - index : index]);
  41424. }
  41425. } else {
  41426. maxIndex = node.nodes.length - 1;
  41427. if (index <= maxIndex) {
  41428. var subNode = node.nodes[this._reverse ? maxIndex - index : index];
  41429. if (subNode) {
  41430. if (subNode.entry) {
  41431. return mapIteratorValue(type, subNode.entry);
  41432. }
  41433. stack = this._stack = mapIteratorFrame(subNode, stack);
  41434. }
  41435. continue;
  41436. }
  41437. }
  41438. stack = this._stack = this._stack.__prev;
  41439. }
  41440. return iteratorDone();
  41441. };
  41442. function mapIteratorValue(type, entry) {
  41443. return iteratorValue(type, entry[0], entry[1]);
  41444. }
  41445. function mapIteratorFrame(node, prev) {
  41446. return {
  41447. node: node,
  41448. index: 0,
  41449. __prev: prev
  41450. };
  41451. }
  41452. function makeMap(size, root, ownerID, hash) {
  41453. var map = Object.create(MapPrototype);
  41454. map.size = size;
  41455. map._root = root;
  41456. map.__ownerID = ownerID;
  41457. map.__hash = hash;
  41458. map.__altered = false;
  41459. return map;
  41460. }
  41461. var EMPTY_MAP;
  41462. function emptyMap() {
  41463. return EMPTY_MAP || (EMPTY_MAP = makeMap(0));
  41464. }
  41465. function updateMap(map, k, v) {
  41466. var newRoot;
  41467. var newSize;
  41468. if (!map._root) {
  41469. if (v === NOT_SET) {
  41470. return map;
  41471. }
  41472. newSize = 1;
  41473. newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]);
  41474. } else {
  41475. var didChangeSize = MakeRef(CHANGE_LENGTH);
  41476. var didAlter = MakeRef(DID_ALTER);
  41477. newRoot = updateNode(map._root, map.__ownerID, 0, undefined, k, v, didChangeSize, didAlter);
  41478. if (!didAlter.value) {
  41479. return map;
  41480. }
  41481. newSize = map.size + (didChangeSize.value ? v === NOT_SET ? -1 : 1 : 0);
  41482. }
  41483. if (map.__ownerID) {
  41484. map.size = newSize;
  41485. map._root = newRoot;
  41486. map.__hash = undefined;
  41487. map.__altered = true;
  41488. return map;
  41489. }
  41490. return newRoot ? makeMap(newSize, newRoot) : emptyMap();
  41491. }
  41492. function updateNode(node, ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
  41493. if (!node) {
  41494. if (value === NOT_SET) {
  41495. return node;
  41496. }
  41497. SetRef(didAlter);
  41498. SetRef(didChangeSize);
  41499. return new ValueNode(ownerID, keyHash, [key, value]);
  41500. }
  41501. return node.update(ownerID, shift, keyHash, key, value, didChangeSize, didAlter);
  41502. }
  41503. function isLeafNode(node) {
  41504. return node.constructor === ValueNode || node.constructor === HashCollisionNode;
  41505. }
  41506. function mergeIntoNode(node, ownerID, shift, keyHash, entry) {
  41507. if (node.keyHash === keyHash) {
  41508. return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]);
  41509. }
  41510. var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK;
  41511. var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;
  41512. var newNode;
  41513. var nodes = idx1 === idx2 ?
  41514. [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)] :
  41515. ((newNode = new ValueNode(ownerID, keyHash, entry)), idx1 < idx2 ? [node, newNode] : [newNode, node]);
  41516. return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes);
  41517. }
  41518. function createNodes(ownerID, entries, key, value) {
  41519. if (!ownerID) {
  41520. ownerID = new OwnerID();
  41521. }
  41522. var node = new ValueNode(ownerID, hash(key), [key, value]);
  41523. for (var ii = 0; ii < entries.length; ii++) {
  41524. var entry = entries[ii];
  41525. node = node.update(ownerID, 0, undefined, entry[0], entry[1]);
  41526. }
  41527. return node;
  41528. }
  41529. function packNodes(ownerID, nodes, count, excluding) {
  41530. var bitmap = 0;
  41531. var packedII = 0;
  41532. var packedNodes = new Array(count);
  41533. for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) {
  41534. var node = nodes[ii];
  41535. if (node !== undefined && ii !== excluding) {
  41536. bitmap |= bit;
  41537. packedNodes[packedII++] = node;
  41538. }
  41539. }
  41540. return new BitmapIndexedNode(ownerID, bitmap, packedNodes);
  41541. }
  41542. function expandNodes(ownerID, nodes, bitmap, including, node) {
  41543. var count = 0;
  41544. var expandedNodes = new Array(SIZE);
  41545. for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) {
  41546. expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined;
  41547. }
  41548. expandedNodes[including] = node;
  41549. return new HashArrayMapNode(ownerID, count + 1, expandedNodes);
  41550. }
  41551. function mergeIntoMapWith(map, merger, iterables) {
  41552. var iters = [];
  41553. for (var ii = 0; ii < iterables.length; ii++) {
  41554. var value = iterables[ii];
  41555. var iter = KeyedIterable(value);
  41556. if (!isIterable(value)) {
  41557. iter = iter.map(function(v ) {return fromJS(v)});
  41558. }
  41559. iters.push(iter);
  41560. }
  41561. return mergeIntoCollectionWith(map, merger, iters);
  41562. }
  41563. function deepMerger(existing, value, key) {
  41564. return existing && existing.mergeDeep && isIterable(value) ?
  41565. existing.mergeDeep(value) :
  41566. is(existing, value) ? existing : value;
  41567. }
  41568. function deepMergerWith(merger) {
  41569. return function(existing, value, key) {
  41570. if (existing && existing.mergeDeepWith && isIterable(value)) {
  41571. return existing.mergeDeepWith(merger, value);
  41572. }
  41573. var nextValue = merger(existing, value, key);
  41574. return is(existing, nextValue) ? existing : nextValue;
  41575. };
  41576. }
  41577. function mergeIntoCollectionWith(collection, merger, iters) {
  41578. iters = iters.filter(function(x ) {return x.size !== 0});
  41579. if (iters.length === 0) {
  41580. return collection;
  41581. }
  41582. if (collection.size === 0 && !collection.__ownerID && iters.length === 1) {
  41583. return collection.constructor(iters[0]);
  41584. }
  41585. return collection.withMutations(function(collection ) {
  41586. var mergeIntoMap = merger ?
  41587. function(value, key) {
  41588. collection.update(key, NOT_SET, function(existing )
  41589. {return existing === NOT_SET ? value : merger(existing, value, key)}
  41590. );
  41591. } :
  41592. function(value, key) {
  41593. collection.set(key, value);
  41594. }
  41595. for (var ii = 0; ii < iters.length; ii++) {
  41596. iters[ii].forEach(mergeIntoMap);
  41597. }
  41598. });
  41599. }
  41600. function updateInDeepMap(existing, keyPathIter, notSetValue, updater) {
  41601. var isNotSet = existing === NOT_SET;
  41602. var step = keyPathIter.next();
  41603. if (step.done) {
  41604. var existingValue = isNotSet ? notSetValue : existing;
  41605. var newValue = updater(existingValue);
  41606. return newValue === existingValue ? existing : newValue;
  41607. }
  41608. invariant(
  41609. isNotSet || (existing && existing.set),
  41610. 'invalid keyPath'
  41611. );
  41612. var key = step.value;
  41613. var nextExisting = isNotSet ? NOT_SET : existing.get(key, NOT_SET);
  41614. var nextUpdated = updateInDeepMap(
  41615. nextExisting,
  41616. keyPathIter,
  41617. notSetValue,
  41618. updater
  41619. );
  41620. return nextUpdated === nextExisting ? existing :
  41621. nextUpdated === NOT_SET ? existing.remove(key) :
  41622. (isNotSet ? emptyMap() : existing).set(key, nextUpdated);
  41623. }
  41624. function popCount(x) {
  41625. x = x - ((x >> 1) & 0x55555555);
  41626. x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
  41627. x = (x + (x >> 4)) & 0x0f0f0f0f;
  41628. x = x + (x >> 8);
  41629. x = x + (x >> 16);
  41630. return x & 0x7f;
  41631. }
  41632. function setIn(array, idx, val, canEdit) {
  41633. var newArray = canEdit ? array : arrCopy(array);
  41634. newArray[idx] = val;
  41635. return newArray;
  41636. }
  41637. function spliceIn(array, idx, val, canEdit) {
  41638. var newLen = array.length + 1;
  41639. if (canEdit && idx + 1 === newLen) {
  41640. array[idx] = val;
  41641. return array;
  41642. }
  41643. var newArray = new Array(newLen);
  41644. var after = 0;
  41645. for (var ii = 0; ii < newLen; ii++) {
  41646. if (ii === idx) {
  41647. newArray[ii] = val;
  41648. after = -1;
  41649. } else {
  41650. newArray[ii] = array[ii + after];
  41651. }
  41652. }
  41653. return newArray;
  41654. }
  41655. function spliceOut(array, idx, canEdit) {
  41656. var newLen = array.length - 1;
  41657. if (canEdit && idx === newLen) {
  41658. array.pop();
  41659. return array;
  41660. }
  41661. var newArray = new Array(newLen);
  41662. var after = 0;
  41663. for (var ii = 0; ii < newLen; ii++) {
  41664. if (ii === idx) {
  41665. after = 1;
  41666. }
  41667. newArray[ii] = array[ii + after];
  41668. }
  41669. return newArray;
  41670. }
  41671. var MAX_ARRAY_MAP_SIZE = SIZE / 4;
  41672. var MAX_BITMAP_INDEXED_SIZE = SIZE / 2;
  41673. var MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4;
  41674. createClass(List, IndexedCollection);
  41675. // @pragma Construction
  41676. function List(value) {
  41677. var empty = emptyList();
  41678. if (value === null || value === undefined) {
  41679. return empty;
  41680. }
  41681. if (isList(value)) {
  41682. return value;
  41683. }
  41684. var iter = IndexedIterable(value);
  41685. var size = iter.size;
  41686. if (size === 0) {
  41687. return empty;
  41688. }
  41689. assertNotInfinite(size);
  41690. if (size > 0 && size < SIZE) {
  41691. return makeList(0, size, SHIFT, null, new VNode(iter.toArray()));
  41692. }
  41693. return empty.withMutations(function(list ) {
  41694. list.setSize(size);
  41695. iter.forEach(function(v, i) {return list.set(i, v)});
  41696. });
  41697. }
  41698. List.of = function(/*...values*/) {
  41699. return this(arguments);
  41700. };
  41701. List.prototype.toString = function() {
  41702. return this.__toString('List [', ']');
  41703. };
  41704. // @pragma Access
  41705. List.prototype.get = function(index, notSetValue) {
  41706. index = wrapIndex(this, index);
  41707. if (index >= 0 && index < this.size) {
  41708. index += this._origin;
  41709. var node = listNodeFor(this, index);
  41710. return node && node.array[index & MASK];
  41711. }
  41712. return notSetValue;
  41713. };
  41714. // @pragma Modification
  41715. List.prototype.set = function(index, value) {
  41716. return updateList(this, index, value);
  41717. };
  41718. List.prototype.remove = function(index) {
  41719. return !this.has(index) ? this :
  41720. index === 0 ? this.shift() :
  41721. index === this.size - 1 ? this.pop() :
  41722. this.splice(index, 1);
  41723. };
  41724. List.prototype.insert = function(index, value) {
  41725. return this.splice(index, 0, value);
  41726. };
  41727. List.prototype.clear = function() {
  41728. if (this.size === 0) {
  41729. return this;
  41730. }
  41731. if (this.__ownerID) {
  41732. this.size = this._origin = this._capacity = 0;
  41733. this._level = SHIFT;
  41734. this._root = this._tail = null;
  41735. this.__hash = undefined;
  41736. this.__altered = true;
  41737. return this;
  41738. }
  41739. return emptyList();
  41740. };
  41741. List.prototype.push = function(/*...values*/) {
  41742. var values = arguments;
  41743. var oldSize = this.size;
  41744. return this.withMutations(function(list ) {
  41745. setListBounds(list, 0, oldSize + values.length);
  41746. for (var ii = 0; ii < values.length; ii++) {
  41747. list.set(oldSize + ii, values[ii]);
  41748. }
  41749. });
  41750. };
  41751. List.prototype.pop = function() {
  41752. return setListBounds(this, 0, -1);
  41753. };
  41754. List.prototype.unshift = function(/*...values*/) {
  41755. var values = arguments;
  41756. return this.withMutations(function(list ) {
  41757. setListBounds(list, -values.length);
  41758. for (var ii = 0; ii < values.length; ii++) {
  41759. list.set(ii, values[ii]);
  41760. }
  41761. });
  41762. };
  41763. List.prototype.shift = function() {
  41764. return setListBounds(this, 1);
  41765. };
  41766. // @pragma Composition
  41767. List.prototype.merge = function(/*...iters*/) {
  41768. return mergeIntoListWith(this, undefined, arguments);
  41769. };
  41770. List.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);
  41771. return mergeIntoListWith(this, merger, iters);
  41772. };
  41773. List.prototype.mergeDeep = function(/*...iters*/) {
  41774. return mergeIntoListWith(this, deepMerger, arguments);
  41775. };
  41776. List.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1);
  41777. return mergeIntoListWith(this, deepMergerWith(merger), iters);
  41778. };
  41779. List.prototype.setSize = function(size) {
  41780. return setListBounds(this, 0, size);
  41781. };
  41782. // @pragma Iteration
  41783. List.prototype.slice = function(begin, end) {
  41784. var size = this.size;
  41785. if (wholeSlice(begin, end, size)) {
  41786. return this;
  41787. }
  41788. return setListBounds(
  41789. this,
  41790. resolveBegin(begin, size),
  41791. resolveEnd(end, size)
  41792. );
  41793. };
  41794. List.prototype.__iterator = function(type, reverse) {
  41795. var index = 0;
  41796. var values = iterateList(this, reverse);
  41797. return new Iterator(function() {
  41798. var value = values();
  41799. return value === DONE ?
  41800. iteratorDone() :
  41801. iteratorValue(type, index++, value);
  41802. });
  41803. };
  41804. List.prototype.__iterate = function(fn, reverse) {
  41805. var index = 0;
  41806. var values = iterateList(this, reverse);
  41807. var value;
  41808. while ((value = values()) !== DONE) {
  41809. if (fn(value, index++, this) === false) {
  41810. break;
  41811. }
  41812. }
  41813. return index;
  41814. };
  41815. List.prototype.__ensureOwner = function(ownerID) {
  41816. if (ownerID === this.__ownerID) {
  41817. return this;
  41818. }
  41819. if (!ownerID) {
  41820. this.__ownerID = ownerID;
  41821. return this;
  41822. }
  41823. return makeList(this._origin, this._capacity, this._level, this._root, this._tail, ownerID, this.__hash);
  41824. };
  41825. function isList(maybeList) {
  41826. return !!(maybeList && maybeList[IS_LIST_SENTINEL]);
  41827. }
  41828. List.isList = isList;
  41829. var IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@';
  41830. var ListPrototype = List.prototype;
  41831. ListPrototype[IS_LIST_SENTINEL] = true;
  41832. ListPrototype[DELETE] = ListPrototype.remove;
  41833. ListPrototype.setIn = MapPrototype.setIn;
  41834. ListPrototype.deleteIn =
  41835. ListPrototype.removeIn = MapPrototype.removeIn;
  41836. ListPrototype.update = MapPrototype.update;
  41837. ListPrototype.updateIn = MapPrototype.updateIn;
  41838. ListPrototype.mergeIn = MapPrototype.mergeIn;
  41839. ListPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;
  41840. ListPrototype.withMutations = MapPrototype.withMutations;
  41841. ListPrototype.asMutable = MapPrototype.asMutable;
  41842. ListPrototype.asImmutable = MapPrototype.asImmutable;
  41843. ListPrototype.wasAltered = MapPrototype.wasAltered;
  41844. function VNode(array, ownerID) {
  41845. this.array = array;
  41846. this.ownerID = ownerID;
  41847. }
  41848. // TODO: seems like these methods are very similar
  41849. VNode.prototype.removeBefore = function(ownerID, level, index) {
  41850. if (index === level ? 1 << level : false || this.array.length === 0) {
  41851. return this;
  41852. }
  41853. var originIndex = (index >>> level) & MASK;
  41854. if (originIndex >= this.array.length) {
  41855. return new VNode([], ownerID);
  41856. }
  41857. var removingFirst = originIndex === 0;
  41858. var newChild;
  41859. if (level > 0) {
  41860. var oldChild = this.array[originIndex];
  41861. newChild = oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index);
  41862. if (newChild === oldChild && removingFirst) {
  41863. return this;
  41864. }
  41865. }
  41866. if (removingFirst && !newChild) {
  41867. return this;
  41868. }
  41869. var editable = editableVNode(this, ownerID);
  41870. if (!removingFirst) {
  41871. for (var ii = 0; ii < originIndex; ii++) {
  41872. editable.array[ii] = undefined;
  41873. }
  41874. }
  41875. if (newChild) {
  41876. editable.array[originIndex] = newChild;
  41877. }
  41878. return editable;
  41879. };
  41880. VNode.prototype.removeAfter = function(ownerID, level, index) {
  41881. if (index === (level ? 1 << level : 0) || this.array.length === 0) {
  41882. return this;
  41883. }
  41884. var sizeIndex = ((index - 1) >>> level) & MASK;
  41885. if (sizeIndex >= this.array.length) {
  41886. return this;
  41887. }
  41888. var newChild;
  41889. if (level > 0) {
  41890. var oldChild = this.array[sizeIndex];
  41891. newChild = oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index);
  41892. if (newChild === oldChild && sizeIndex === this.array.length - 1) {
  41893. return this;
  41894. }
  41895. }
  41896. var editable = editableVNode(this, ownerID);
  41897. editable.array.splice(sizeIndex + 1);
  41898. if (newChild) {
  41899. editable.array[sizeIndex] = newChild;
  41900. }
  41901. return editable;
  41902. };
  41903. var DONE = {};
  41904. function iterateList(list, reverse) {
  41905. var left = list._origin;
  41906. var right = list._capacity;
  41907. var tailPos = getTailOffset(right);
  41908. var tail = list._tail;
  41909. return iterateNodeOrLeaf(list._root, list._level, 0);
  41910. function iterateNodeOrLeaf(node, level, offset) {
  41911. return level === 0 ?
  41912. iterateLeaf(node, offset) :
  41913. iterateNode(node, level, offset);
  41914. }
  41915. function iterateLeaf(node, offset) {
  41916. var array = offset === tailPos ? tail && tail.array : node && node.array;
  41917. var from = offset > left ? 0 : left - offset;
  41918. var to = right - offset;
  41919. if (to > SIZE) {
  41920. to = SIZE;
  41921. }
  41922. return function() {
  41923. if (from === to) {
  41924. return DONE;
  41925. }
  41926. var idx = reverse ? --to : from++;
  41927. return array && array[idx];
  41928. };
  41929. }
  41930. function iterateNode(node, level, offset) {
  41931. var values;
  41932. var array = node && node.array;
  41933. var from = offset > left ? 0 : (left - offset) >> level;
  41934. var to = ((right - offset) >> level) + 1;
  41935. if (to > SIZE) {
  41936. to = SIZE;
  41937. }
  41938. return function() {
  41939. do {
  41940. if (values) {
  41941. var value = values();
  41942. if (value !== DONE) {
  41943. return value;
  41944. }
  41945. values = null;
  41946. }
  41947. if (from === to) {
  41948. return DONE;
  41949. }
  41950. var idx = reverse ? --to : from++;
  41951. values = iterateNodeOrLeaf(
  41952. array && array[idx], level - SHIFT, offset + (idx << level)
  41953. );
  41954. } while (true);
  41955. };
  41956. }
  41957. }
  41958. function makeList(origin, capacity, level, root, tail, ownerID, hash) {
  41959. var list = Object.create(ListPrototype);
  41960. list.size = capacity - origin;
  41961. list._origin = origin;
  41962. list._capacity = capacity;
  41963. list._level = level;
  41964. list._root = root;
  41965. list._tail = tail;
  41966. list.__ownerID = ownerID;
  41967. list.__hash = hash;
  41968. list.__altered = false;
  41969. return list;
  41970. }
  41971. var EMPTY_LIST;
  41972. function emptyList() {
  41973. return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT));
  41974. }
  41975. function updateList(list, index, value) {
  41976. index = wrapIndex(list, index);
  41977. if (index !== index) {
  41978. return list;
  41979. }
  41980. if (index >= list.size || index < 0) {
  41981. return list.withMutations(function(list ) {
  41982. index < 0 ?
  41983. setListBounds(list, index).set(0, value) :
  41984. setListBounds(list, 0, index + 1).set(index, value)
  41985. });
  41986. }
  41987. index += list._origin;
  41988. var newTail = list._tail;
  41989. var newRoot = list._root;
  41990. var didAlter = MakeRef(DID_ALTER);
  41991. if (index >= getTailOffset(list._capacity)) {
  41992. newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter);
  41993. } else {
  41994. newRoot = updateVNode(newRoot, list.__ownerID, list._level, index, value, didAlter);
  41995. }
  41996. if (!didAlter.value) {
  41997. return list;
  41998. }
  41999. if (list.__ownerID) {
  42000. list._root = newRoot;
  42001. list._tail = newTail;
  42002. list.__hash = undefined;
  42003. list.__altered = true;
  42004. return list;
  42005. }
  42006. return makeList(list._origin, list._capacity, list._level, newRoot, newTail);
  42007. }
  42008. function updateVNode(node, ownerID, level, index, value, didAlter) {
  42009. var idx = (index >>> level) & MASK;
  42010. var nodeHas = node && idx < node.array.length;
  42011. if (!nodeHas && value === undefined) {
  42012. return node;
  42013. }
  42014. var newNode;
  42015. if (level > 0) {
  42016. var lowerNode = node && node.array[idx];
  42017. var newLowerNode = updateVNode(lowerNode, ownerID, level - SHIFT, index, value, didAlter);
  42018. if (newLowerNode === lowerNode) {
  42019. return node;
  42020. }
  42021. newNode = editableVNode(node, ownerID);
  42022. newNode.array[idx] = newLowerNode;
  42023. return newNode;
  42024. }
  42025. if (nodeHas && node.array[idx] === value) {
  42026. return node;
  42027. }
  42028. SetRef(didAlter);
  42029. newNode = editableVNode(node, ownerID);
  42030. if (value === undefined && idx === newNode.array.length - 1) {
  42031. newNode.array.pop();
  42032. } else {
  42033. newNode.array[idx] = value;
  42034. }
  42035. return newNode;
  42036. }
  42037. function editableVNode(node, ownerID) {
  42038. if (ownerID && node && ownerID === node.ownerID) {
  42039. return node;
  42040. }
  42041. return new VNode(node ? node.array.slice() : [], ownerID);
  42042. }
  42043. function listNodeFor(list, rawIndex) {
  42044. if (rawIndex >= getTailOffset(list._capacity)) {
  42045. return list._tail;
  42046. }
  42047. if (rawIndex < 1 << (list._level + SHIFT)) {
  42048. var node = list._root;
  42049. var level = list._level;
  42050. while (node && level > 0) {
  42051. node = node.array[(rawIndex >>> level) & MASK];
  42052. level -= SHIFT;
  42053. }
  42054. return node;
  42055. }
  42056. }
  42057. function setListBounds(list, begin, end) {
  42058. // Sanitize begin & end using this shorthand for ToInt32(argument)
  42059. // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32
  42060. if (begin !== undefined) {
  42061. begin = begin | 0;
  42062. }
  42063. if (end !== undefined) {
  42064. end = end | 0;
  42065. }
  42066. var owner = list.__ownerID || new OwnerID();
  42067. var oldOrigin = list._origin;
  42068. var oldCapacity = list._capacity;
  42069. var newOrigin = oldOrigin + begin;
  42070. var newCapacity = end === undefined ? oldCapacity : end < 0 ? oldCapacity + end : oldOrigin + end;
  42071. if (newOrigin === oldOrigin && newCapacity === oldCapacity) {
  42072. return list;
  42073. }
  42074. // If it's going to end after it starts, it's empty.
  42075. if (newOrigin >= newCapacity) {
  42076. return list.clear();
  42077. }
  42078. var newLevel = list._level;
  42079. var newRoot = list._root;
  42080. // New origin might need creating a higher root.
  42081. var offsetShift = 0;
  42082. while (newOrigin + offsetShift < 0) {
  42083. newRoot = new VNode(newRoot && newRoot.array.length ? [undefined, newRoot] : [], owner);
  42084. newLevel += SHIFT;
  42085. offsetShift += 1 << newLevel;
  42086. }
  42087. if (offsetShift) {
  42088. newOrigin += offsetShift;
  42089. oldOrigin += offsetShift;
  42090. newCapacity += offsetShift;
  42091. oldCapacity += offsetShift;
  42092. }
  42093. var oldTailOffset = getTailOffset(oldCapacity);
  42094. var newTailOffset = getTailOffset(newCapacity);
  42095. // New size might need creating a higher root.
  42096. while (newTailOffset >= 1 << (newLevel + SHIFT)) {
  42097. newRoot = new VNode(newRoot && newRoot.array.length ? [newRoot] : [], owner);
  42098. newLevel += SHIFT;
  42099. }
  42100. // Locate or create the new tail.
  42101. var oldTail = list._tail;
  42102. var newTail = newTailOffset < oldTailOffset ?
  42103. listNodeFor(list, newCapacity - 1) :
  42104. newTailOffset > oldTailOffset ? new VNode([], owner) : oldTail;
  42105. // Merge Tail into tree.
  42106. if (oldTail && newTailOffset > oldTailOffset && newOrigin < oldCapacity && oldTail.array.length) {
  42107. newRoot = editableVNode(newRoot, owner);
  42108. var node = newRoot;
  42109. for (var level = newLevel; level > SHIFT; level -= SHIFT) {
  42110. var idx = (oldTailOffset >>> level) & MASK;
  42111. node = node.array[idx] = editableVNode(node.array[idx], owner);
  42112. }
  42113. node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail;
  42114. }
  42115. // If the size has been reduced, there's a chance the tail needs to be trimmed.
  42116. if (newCapacity < oldCapacity) {
  42117. newTail = newTail && newTail.removeAfter(owner, 0, newCapacity);
  42118. }
  42119. // If the new origin is within the tail, then we do not need a root.
  42120. if (newOrigin >= newTailOffset) {
  42121. newOrigin -= newTailOffset;
  42122. newCapacity -= newTailOffset;
  42123. newLevel = SHIFT;
  42124. newRoot = null;
  42125. newTail = newTail && newTail.removeBefore(owner, 0, newOrigin);
  42126. // Otherwise, if the root has been trimmed, garbage collect.
  42127. } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) {
  42128. offsetShift = 0;
  42129. // Identify the new top root node of the subtree of the old root.
  42130. while (newRoot) {
  42131. var beginIndex = (newOrigin >>> newLevel) & MASK;
  42132. if (beginIndex !== (newTailOffset >>> newLevel) & MASK) {
  42133. break;
  42134. }
  42135. if (beginIndex) {
  42136. offsetShift += (1 << newLevel) * beginIndex;
  42137. }
  42138. newLevel -= SHIFT;
  42139. newRoot = newRoot.array[beginIndex];
  42140. }
  42141. // Trim the new sides of the new root.
  42142. if (newRoot && newOrigin > oldOrigin) {
  42143. newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift);
  42144. }
  42145. if (newRoot && newTailOffset < oldTailOffset) {
  42146. newRoot = newRoot.removeAfter(owner, newLevel, newTailOffset - offsetShift);
  42147. }
  42148. if (offsetShift) {
  42149. newOrigin -= offsetShift;
  42150. newCapacity -= offsetShift;
  42151. }
  42152. }
  42153. if (list.__ownerID) {
  42154. list.size = newCapacity - newOrigin;
  42155. list._origin = newOrigin;
  42156. list._capacity = newCapacity;
  42157. list._level = newLevel;
  42158. list._root = newRoot;
  42159. list._tail = newTail;
  42160. list.__hash = undefined;
  42161. list.__altered = true;
  42162. return list;
  42163. }
  42164. return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail);
  42165. }
  42166. function mergeIntoListWith(list, merger, iterables) {
  42167. var iters = [];
  42168. var maxSize = 0;
  42169. for (var ii = 0; ii < iterables.length; ii++) {
  42170. var value = iterables[ii];
  42171. var iter = IndexedIterable(value);
  42172. if (iter.size > maxSize) {
  42173. maxSize = iter.size;
  42174. }
  42175. if (!isIterable(value)) {
  42176. iter = iter.map(function(v ) {return fromJS(v)});
  42177. }
  42178. iters.push(iter);
  42179. }
  42180. if (maxSize > list.size) {
  42181. list = list.setSize(maxSize);
  42182. }
  42183. return mergeIntoCollectionWith(list, merger, iters);
  42184. }
  42185. function getTailOffset(size) {
  42186. return size < SIZE ? 0 : (((size - 1) >>> SHIFT) << SHIFT);
  42187. }
  42188. createClass(OrderedMap, Map);
  42189. // @pragma Construction
  42190. function OrderedMap(value) {
  42191. return value === null || value === undefined ? emptyOrderedMap() :
  42192. isOrderedMap(value) ? value :
  42193. emptyOrderedMap().withMutations(function(map ) {
  42194. var iter = KeyedIterable(value);
  42195. assertNotInfinite(iter.size);
  42196. iter.forEach(function(v, k) {return map.set(k, v)});
  42197. });
  42198. }
  42199. OrderedMap.of = function(/*...values*/) {
  42200. return this(arguments);
  42201. };
  42202. OrderedMap.prototype.toString = function() {
  42203. return this.__toString('OrderedMap {', '}');
  42204. };
  42205. // @pragma Access
  42206. OrderedMap.prototype.get = function(k, notSetValue) {
  42207. var index = this._map.get(k);
  42208. return index !== undefined ? this._list.get(index)[1] : notSetValue;
  42209. };
  42210. // @pragma Modification
  42211. OrderedMap.prototype.clear = function() {
  42212. if (this.size === 0) {
  42213. return this;
  42214. }
  42215. if (this.__ownerID) {
  42216. this.size = 0;
  42217. this._map.clear();
  42218. this._list.clear();
  42219. return this;
  42220. }
  42221. return emptyOrderedMap();
  42222. };
  42223. OrderedMap.prototype.set = function(k, v) {
  42224. return updateOrderedMap(this, k, v);
  42225. };
  42226. OrderedMap.prototype.remove = function(k) {
  42227. return updateOrderedMap(this, k, NOT_SET);
  42228. };
  42229. OrderedMap.prototype.wasAltered = function() {
  42230. return this._map.wasAltered() || this._list.wasAltered();
  42231. };
  42232. OrderedMap.prototype.__iterate = function(fn, reverse) {var this$0 = this;
  42233. return this._list.__iterate(
  42234. function(entry ) {return entry && fn(entry[1], entry[0], this$0)},
  42235. reverse
  42236. );
  42237. };
  42238. OrderedMap.prototype.__iterator = function(type, reverse) {
  42239. return this._list.fromEntrySeq().__iterator(type, reverse);
  42240. };
  42241. OrderedMap.prototype.__ensureOwner = function(ownerID) {
  42242. if (ownerID === this.__ownerID) {
  42243. return this;
  42244. }
  42245. var newMap = this._map.__ensureOwner(ownerID);
  42246. var newList = this._list.__ensureOwner(ownerID);
  42247. if (!ownerID) {
  42248. this.__ownerID = ownerID;
  42249. this._map = newMap;
  42250. this._list = newList;
  42251. return this;
  42252. }
  42253. return makeOrderedMap(newMap, newList, ownerID, this.__hash);
  42254. };
  42255. function isOrderedMap(maybeOrderedMap) {
  42256. return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap);
  42257. }
  42258. OrderedMap.isOrderedMap = isOrderedMap;
  42259. OrderedMap.prototype[IS_ORDERED_SENTINEL] = true;
  42260. OrderedMap.prototype[DELETE] = OrderedMap.prototype.remove;
  42261. function makeOrderedMap(map, list, ownerID, hash) {
  42262. var omap = Object.create(OrderedMap.prototype);
  42263. omap.size = map ? map.size : 0;
  42264. omap._map = map;
  42265. omap._list = list;
  42266. omap.__ownerID = ownerID;
  42267. omap.__hash = hash;
  42268. return omap;
  42269. }
  42270. var EMPTY_ORDERED_MAP;
  42271. function emptyOrderedMap() {
  42272. return EMPTY_ORDERED_MAP || (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList()));
  42273. }
  42274. function updateOrderedMap(omap, k, v) {
  42275. var map = omap._map;
  42276. var list = omap._list;
  42277. var i = map.get(k);
  42278. var has = i !== undefined;
  42279. var newMap;
  42280. var newList;
  42281. if (v === NOT_SET) { // removed
  42282. if (!has) {
  42283. return omap;
  42284. }
  42285. if (list.size >= SIZE && list.size >= map.size * 2) {
  42286. newList = list.filter(function(entry, idx) {return entry !== undefined && i !== idx});
  42287. newMap = newList.toKeyedSeq().map(function(entry ) {return entry[0]}).flip().toMap();
  42288. if (omap.__ownerID) {
  42289. newMap.__ownerID = newList.__ownerID = omap.__ownerID;
  42290. }
  42291. } else {
  42292. newMap = map.remove(k);
  42293. newList = i === list.size - 1 ? list.pop() : list.set(i, undefined);
  42294. }
  42295. } else {
  42296. if (has) {
  42297. if (v === list.get(i)[1]) {
  42298. return omap;
  42299. }
  42300. newMap = map;
  42301. newList = list.set(i, [k, v]);
  42302. } else {
  42303. newMap = map.set(k, list.size);
  42304. newList = list.set(list.size, [k, v]);
  42305. }
  42306. }
  42307. if (omap.__ownerID) {
  42308. omap.size = newMap.size;
  42309. omap._map = newMap;
  42310. omap._list = newList;
  42311. omap.__hash = undefined;
  42312. return omap;
  42313. }
  42314. return makeOrderedMap(newMap, newList);
  42315. }
  42316. createClass(ToKeyedSequence, KeyedSeq);
  42317. function ToKeyedSequence(indexed, useKeys) {
  42318. this._iter = indexed;
  42319. this._useKeys = useKeys;
  42320. this.size = indexed.size;
  42321. }
  42322. ToKeyedSequence.prototype.get = function(key, notSetValue) {
  42323. return this._iter.get(key, notSetValue);
  42324. };
  42325. ToKeyedSequence.prototype.has = function(key) {
  42326. return this._iter.has(key);
  42327. };
  42328. ToKeyedSequence.prototype.valueSeq = function() {
  42329. return this._iter.valueSeq();
  42330. };
  42331. ToKeyedSequence.prototype.reverse = function() {var this$0 = this;
  42332. var reversedSequence = reverseFactory(this, true);
  42333. if (!this._useKeys) {
  42334. reversedSequence.valueSeq = function() {return this$0._iter.toSeq().reverse()};
  42335. }
  42336. return reversedSequence;
  42337. };
  42338. ToKeyedSequence.prototype.map = function(mapper, context) {var this$0 = this;
  42339. var mappedSequence = mapFactory(this, mapper, context);
  42340. if (!this._useKeys) {
  42341. mappedSequence.valueSeq = function() {return this$0._iter.toSeq().map(mapper, context)};
  42342. }
  42343. return mappedSequence;
  42344. };
  42345. ToKeyedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;
  42346. var ii;
  42347. return this._iter.__iterate(
  42348. this._useKeys ?
  42349. function(v, k) {return fn(v, k, this$0)} :
  42350. ((ii = reverse ? resolveSize(this) : 0),
  42351. function(v ) {return fn(v, reverse ? --ii : ii++, this$0)}),
  42352. reverse
  42353. );
  42354. };
  42355. ToKeyedSequence.prototype.__iterator = function(type, reverse) {
  42356. if (this._useKeys) {
  42357. return this._iter.__iterator(type, reverse);
  42358. }
  42359. var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);
  42360. var ii = reverse ? resolveSize(this) : 0;
  42361. return new Iterator(function() {
  42362. var step = iterator.next();
  42363. return step.done ? step :
  42364. iteratorValue(type, reverse ? --ii : ii++, step.value, step);
  42365. });
  42366. };
  42367. ToKeyedSequence.prototype[IS_ORDERED_SENTINEL] = true;
  42368. createClass(ToIndexedSequence, IndexedSeq);
  42369. function ToIndexedSequence(iter) {
  42370. this._iter = iter;
  42371. this.size = iter.size;
  42372. }
  42373. ToIndexedSequence.prototype.includes = function(value) {
  42374. return this._iter.includes(value);
  42375. };
  42376. ToIndexedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;
  42377. var iterations = 0;
  42378. return this._iter.__iterate(function(v ) {return fn(v, iterations++, this$0)}, reverse);
  42379. };
  42380. ToIndexedSequence.prototype.__iterator = function(type, reverse) {
  42381. var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);
  42382. var iterations = 0;
  42383. return new Iterator(function() {
  42384. var step = iterator.next();
  42385. return step.done ? step :
  42386. iteratorValue(type, iterations++, step.value, step)
  42387. });
  42388. };
  42389. createClass(ToSetSequence, SetSeq);
  42390. function ToSetSequence(iter) {
  42391. this._iter = iter;
  42392. this.size = iter.size;
  42393. }
  42394. ToSetSequence.prototype.has = function(key) {
  42395. return this._iter.includes(key);
  42396. };
  42397. ToSetSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;
  42398. return this._iter.__iterate(function(v ) {return fn(v, v, this$0)}, reverse);
  42399. };
  42400. ToSetSequence.prototype.__iterator = function(type, reverse) {
  42401. var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);
  42402. return new Iterator(function() {
  42403. var step = iterator.next();
  42404. return step.done ? step :
  42405. iteratorValue(type, step.value, step.value, step);
  42406. });
  42407. };
  42408. createClass(FromEntriesSequence, KeyedSeq);
  42409. function FromEntriesSequence(entries) {
  42410. this._iter = entries;
  42411. this.size = entries.size;
  42412. }
  42413. FromEntriesSequence.prototype.entrySeq = function() {
  42414. return this._iter.toSeq();
  42415. };
  42416. FromEntriesSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;
  42417. return this._iter.__iterate(function(entry ) {
  42418. // Check if entry exists first so array access doesn't throw for holes
  42419. // in the parent iteration.
  42420. if (entry) {
  42421. validateEntry(entry);
  42422. var indexedIterable = isIterable(entry);
  42423. return fn(
  42424. indexedIterable ? entry.get(1) : entry[1],
  42425. indexedIterable ? entry.get(0) : entry[0],
  42426. this$0
  42427. );
  42428. }
  42429. }, reverse);
  42430. };
  42431. FromEntriesSequence.prototype.__iterator = function(type, reverse) {
  42432. var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);
  42433. return new Iterator(function() {
  42434. while (true) {
  42435. var step = iterator.next();
  42436. if (step.done) {
  42437. return step;
  42438. }
  42439. var entry = step.value;
  42440. // Check if entry exists first so array access doesn't throw for holes
  42441. // in the parent iteration.
  42442. if (entry) {
  42443. validateEntry(entry);
  42444. var indexedIterable = isIterable(entry);
  42445. return iteratorValue(
  42446. type,
  42447. indexedIterable ? entry.get(0) : entry[0],
  42448. indexedIterable ? entry.get(1) : entry[1],
  42449. step
  42450. );
  42451. }
  42452. }
  42453. });
  42454. };
  42455. ToIndexedSequence.prototype.cacheResult =
  42456. ToKeyedSequence.prototype.cacheResult =
  42457. ToSetSequence.prototype.cacheResult =
  42458. FromEntriesSequence.prototype.cacheResult =
  42459. cacheResultThrough;
  42460. function flipFactory(iterable) {
  42461. var flipSequence = makeSequence(iterable);
  42462. flipSequence._iter = iterable;
  42463. flipSequence.size = iterable.size;
  42464. flipSequence.flip = function() {return iterable};
  42465. flipSequence.reverse = function () {
  42466. var reversedSequence = iterable.reverse.apply(this); // super.reverse()
  42467. reversedSequence.flip = function() {return iterable.reverse()};
  42468. return reversedSequence;
  42469. };
  42470. flipSequence.has = function(key ) {return iterable.includes(key)};
  42471. flipSequence.includes = function(key ) {return iterable.has(key)};
  42472. flipSequence.cacheResult = cacheResultThrough;
  42473. flipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;
  42474. return iterable.__iterate(function(v, k) {return fn(k, v, this$0) !== false}, reverse);
  42475. }
  42476. flipSequence.__iteratorUncached = function(type, reverse) {
  42477. if (type === ITERATE_ENTRIES) {
  42478. var iterator = iterable.__iterator(type, reverse);
  42479. return new Iterator(function() {
  42480. var step = iterator.next();
  42481. if (!step.done) {
  42482. var k = step.value[0];
  42483. step.value[0] = step.value[1];
  42484. step.value[1] = k;
  42485. }
  42486. return step;
  42487. });
  42488. }
  42489. return iterable.__iterator(
  42490. type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES,
  42491. reverse
  42492. );
  42493. }
  42494. return flipSequence;
  42495. }
  42496. function mapFactory(iterable, mapper, context) {
  42497. var mappedSequence = makeSequence(iterable);
  42498. mappedSequence.size = iterable.size;
  42499. mappedSequence.has = function(key ) {return iterable.has(key)};
  42500. mappedSequence.get = function(key, notSetValue) {
  42501. var v = iterable.get(key, NOT_SET);
  42502. return v === NOT_SET ?
  42503. notSetValue :
  42504. mapper.call(context, v, key, iterable);
  42505. };
  42506. mappedSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;
  42507. return iterable.__iterate(
  42508. function(v, k, c) {return fn(mapper.call(context, v, k, c), k, this$0) !== false},
  42509. reverse
  42510. );
  42511. }
  42512. mappedSequence.__iteratorUncached = function (type, reverse) {
  42513. var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);
  42514. return new Iterator(function() {
  42515. var step = iterator.next();
  42516. if (step.done) {
  42517. return step;
  42518. }
  42519. var entry = step.value;
  42520. var key = entry[0];
  42521. return iteratorValue(
  42522. type,
  42523. key,
  42524. mapper.call(context, entry[1], key, iterable),
  42525. step
  42526. );
  42527. });
  42528. }
  42529. return mappedSequence;
  42530. }
  42531. function reverseFactory(iterable, useKeys) {
  42532. var reversedSequence = makeSequence(iterable);
  42533. reversedSequence._iter = iterable;
  42534. reversedSequence.size = iterable.size;
  42535. reversedSequence.reverse = function() {return iterable};
  42536. if (iterable.flip) {
  42537. reversedSequence.flip = function () {
  42538. var flipSequence = flipFactory(iterable);
  42539. flipSequence.reverse = function() {return iterable.flip()};
  42540. return flipSequence;
  42541. };
  42542. }
  42543. reversedSequence.get = function(key, notSetValue)
  42544. {return iterable.get(useKeys ? key : -1 - key, notSetValue)};
  42545. reversedSequence.has = function(key )
  42546. {return iterable.has(useKeys ? key : -1 - key)};
  42547. reversedSequence.includes = function(value ) {return iterable.includes(value)};
  42548. reversedSequence.cacheResult = cacheResultThrough;
  42549. reversedSequence.__iterate = function (fn, reverse) {var this$0 = this;
  42550. return iterable.__iterate(function(v, k) {return fn(v, k, this$0)}, !reverse);
  42551. };
  42552. reversedSequence.__iterator =
  42553. function(type, reverse) {return iterable.__iterator(type, !reverse)};
  42554. return reversedSequence;
  42555. }
  42556. function filterFactory(iterable, predicate, context, useKeys) {
  42557. var filterSequence = makeSequence(iterable);
  42558. if (useKeys) {
  42559. filterSequence.has = function(key ) {
  42560. var v = iterable.get(key, NOT_SET);
  42561. return v !== NOT_SET && !!predicate.call(context, v, key, iterable);
  42562. };
  42563. filterSequence.get = function(key, notSetValue) {
  42564. var v = iterable.get(key, NOT_SET);
  42565. return v !== NOT_SET && predicate.call(context, v, key, iterable) ?
  42566. v : notSetValue;
  42567. };
  42568. }
  42569. filterSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;
  42570. var iterations = 0;
  42571. iterable.__iterate(function(v, k, c) {
  42572. if (predicate.call(context, v, k, c)) {
  42573. iterations++;
  42574. return fn(v, useKeys ? k : iterations - 1, this$0);
  42575. }
  42576. }, reverse);
  42577. return iterations;
  42578. };
  42579. filterSequence.__iteratorUncached = function (type, reverse) {
  42580. var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);
  42581. var iterations = 0;
  42582. return new Iterator(function() {
  42583. while (true) {
  42584. var step = iterator.next();
  42585. if (step.done) {
  42586. return step;
  42587. }
  42588. var entry = step.value;
  42589. var key = entry[0];
  42590. var value = entry[1];
  42591. if (predicate.call(context, value, key, iterable)) {
  42592. return iteratorValue(type, useKeys ? key : iterations++, value, step);
  42593. }
  42594. }
  42595. });
  42596. }
  42597. return filterSequence;
  42598. }
  42599. function countByFactory(iterable, grouper, context) {
  42600. var groups = Map().asMutable();
  42601. iterable.__iterate(function(v, k) {
  42602. groups.update(
  42603. grouper.call(context, v, k, iterable),
  42604. 0,
  42605. function(a ) {return a + 1}
  42606. );
  42607. });
  42608. return groups.asImmutable();
  42609. }
  42610. function groupByFactory(iterable, grouper, context) {
  42611. var isKeyedIter = isKeyed(iterable);
  42612. var groups = (isOrdered(iterable) ? OrderedMap() : Map()).asMutable();
  42613. iterable.__iterate(function(v, k) {
  42614. groups.update(
  42615. grouper.call(context, v, k, iterable),
  42616. function(a ) {return (a = a || [], a.push(isKeyedIter ? [k, v] : v), a)}
  42617. );
  42618. });
  42619. var coerce = iterableClass(iterable);
  42620. return groups.map(function(arr ) {return reify(iterable, coerce(arr))});
  42621. }
  42622. function sliceFactory(iterable, begin, end, useKeys) {
  42623. var originalSize = iterable.size;
  42624. // Sanitize begin & end using this shorthand for ToInt32(argument)
  42625. // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32
  42626. if (begin !== undefined) {
  42627. begin = begin | 0;
  42628. }
  42629. if (end !== undefined) {
  42630. if (end === Infinity) {
  42631. end = originalSize;
  42632. } else {
  42633. end = end | 0;
  42634. }
  42635. }
  42636. if (wholeSlice(begin, end, originalSize)) {
  42637. return iterable;
  42638. }
  42639. var resolvedBegin = resolveBegin(begin, originalSize);
  42640. var resolvedEnd = resolveEnd(end, originalSize);
  42641. // begin or end will be NaN if they were provided as negative numbers and
  42642. // this iterable's size is unknown. In that case, cache first so there is
  42643. // a known size and these do not resolve to NaN.
  42644. if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) {
  42645. return sliceFactory(iterable.toSeq().cacheResult(), begin, end, useKeys);
  42646. }
  42647. // Note: resolvedEnd is undefined when the original sequence's length is
  42648. // unknown and this slice did not supply an end and should contain all
  42649. // elements after resolvedBegin.
  42650. // In that case, resolvedSize will be NaN and sliceSize will remain undefined.
  42651. var resolvedSize = resolvedEnd - resolvedBegin;
  42652. var sliceSize;
  42653. if (resolvedSize === resolvedSize) {
  42654. sliceSize = resolvedSize < 0 ? 0 : resolvedSize;
  42655. }
  42656. var sliceSeq = makeSequence(iterable);
  42657. // If iterable.size is undefined, the size of the realized sliceSeq is
  42658. // unknown at this point unless the number of items to slice is 0
  42659. sliceSeq.size = sliceSize === 0 ? sliceSize : iterable.size && sliceSize || undefined;
  42660. if (!useKeys && isSeq(iterable) && sliceSize >= 0) {
  42661. sliceSeq.get = function (index, notSetValue) {
  42662. index = wrapIndex(this, index);
  42663. return index >= 0 && index < sliceSize ?
  42664. iterable.get(index + resolvedBegin, notSetValue) :
  42665. notSetValue;
  42666. }
  42667. }
  42668. sliceSeq.__iterateUncached = function(fn, reverse) {var this$0 = this;
  42669. if (sliceSize === 0) {
  42670. return 0;
  42671. }
  42672. if (reverse) {
  42673. return this.cacheResult().__iterate(fn, reverse);
  42674. }
  42675. var skipped = 0;
  42676. var isSkipping = true;
  42677. var iterations = 0;
  42678. iterable.__iterate(function(v, k) {
  42679. if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) {
  42680. iterations++;
  42681. return fn(v, useKeys ? k : iterations - 1, this$0) !== false &&
  42682. iterations !== sliceSize;
  42683. }
  42684. });
  42685. return iterations;
  42686. };
  42687. sliceSeq.__iteratorUncached = function(type, reverse) {
  42688. if (sliceSize !== 0 && reverse) {
  42689. return this.cacheResult().__iterator(type, reverse);
  42690. }
  42691. // Don't bother instantiating parent iterator if taking 0.
  42692. var iterator = sliceSize !== 0 && iterable.__iterator(type, reverse);
  42693. var skipped = 0;
  42694. var iterations = 0;
  42695. return new Iterator(function() {
  42696. while (skipped++ < resolvedBegin) {
  42697. iterator.next();
  42698. }
  42699. if (++iterations > sliceSize) {
  42700. return iteratorDone();
  42701. }
  42702. var step = iterator.next();
  42703. if (useKeys || type === ITERATE_VALUES) {
  42704. return step;
  42705. } else if (type === ITERATE_KEYS) {
  42706. return iteratorValue(type, iterations - 1, undefined, step);
  42707. } else {
  42708. return iteratorValue(type, iterations - 1, step.value[1], step);
  42709. }
  42710. });
  42711. }
  42712. return sliceSeq;
  42713. }
  42714. function takeWhileFactory(iterable, predicate, context) {
  42715. var takeSequence = makeSequence(iterable);
  42716. takeSequence.__iterateUncached = function(fn, reverse) {var this$0 = this;
  42717. if (reverse) {
  42718. return this.cacheResult().__iterate(fn, reverse);
  42719. }
  42720. var iterations = 0;
  42721. iterable.__iterate(function(v, k, c)
  42722. {return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$0)}
  42723. );
  42724. return iterations;
  42725. };
  42726. takeSequence.__iteratorUncached = function(type, reverse) {var this$0 = this;
  42727. if (reverse) {
  42728. return this.cacheResult().__iterator(type, reverse);
  42729. }
  42730. var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);
  42731. var iterating = true;
  42732. return new Iterator(function() {
  42733. if (!iterating) {
  42734. return iteratorDone();
  42735. }
  42736. var step = iterator.next();
  42737. if (step.done) {
  42738. return step;
  42739. }
  42740. var entry = step.value;
  42741. var k = entry[0];
  42742. var v = entry[1];
  42743. if (!predicate.call(context, v, k, this$0)) {
  42744. iterating = false;
  42745. return iteratorDone();
  42746. }
  42747. return type === ITERATE_ENTRIES ? step :
  42748. iteratorValue(type, k, v, step);
  42749. });
  42750. };
  42751. return takeSequence;
  42752. }
  42753. function skipWhileFactory(iterable, predicate, context, useKeys) {
  42754. var skipSequence = makeSequence(iterable);
  42755. skipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;
  42756. if (reverse) {
  42757. return this.cacheResult().__iterate(fn, reverse);
  42758. }
  42759. var isSkipping = true;
  42760. var iterations = 0;
  42761. iterable.__iterate(function(v, k, c) {
  42762. if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) {
  42763. iterations++;
  42764. return fn(v, useKeys ? k : iterations - 1, this$0);
  42765. }
  42766. });
  42767. return iterations;
  42768. };
  42769. skipSequence.__iteratorUncached = function(type, reverse) {var this$0 = this;
  42770. if (reverse) {
  42771. return this.cacheResult().__iterator(type, reverse);
  42772. }
  42773. var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);
  42774. var skipping = true;
  42775. var iterations = 0;
  42776. return new Iterator(function() {
  42777. var step, k, v;
  42778. do {
  42779. step = iterator.next();
  42780. if (step.done) {
  42781. if (useKeys || type === ITERATE_VALUES) {
  42782. return step;
  42783. } else if (type === ITERATE_KEYS) {
  42784. return iteratorValue(type, iterations++, undefined, step);
  42785. } else {
  42786. return iteratorValue(type, iterations++, step.value[1], step);
  42787. }
  42788. }
  42789. var entry = step.value;
  42790. k = entry[0];
  42791. v = entry[1];
  42792. skipping && (skipping = predicate.call(context, v, k, this$0));
  42793. } while (skipping);
  42794. return type === ITERATE_ENTRIES ? step :
  42795. iteratorValue(type, k, v, step);
  42796. });
  42797. };
  42798. return skipSequence;
  42799. }
  42800. function concatFactory(iterable, values) {
  42801. var isKeyedIterable = isKeyed(iterable);
  42802. var iters = [iterable].concat(values).map(function(v ) {
  42803. if (!isIterable(v)) {
  42804. v = isKeyedIterable ?
  42805. keyedSeqFromValue(v) :
  42806. indexedSeqFromValue(Array.isArray(v) ? v : [v]);
  42807. } else if (isKeyedIterable) {
  42808. v = KeyedIterable(v);
  42809. }
  42810. return v;
  42811. }).filter(function(v ) {return v.size !== 0});
  42812. if (iters.length === 0) {
  42813. return iterable;
  42814. }
  42815. if (iters.length === 1) {
  42816. var singleton = iters[0];
  42817. if (singleton === iterable ||
  42818. isKeyedIterable && isKeyed(singleton) ||
  42819. isIndexed(iterable) && isIndexed(singleton)) {
  42820. return singleton;
  42821. }
  42822. }
  42823. var concatSeq = new ArraySeq(iters);
  42824. if (isKeyedIterable) {
  42825. concatSeq = concatSeq.toKeyedSeq();
  42826. } else if (!isIndexed(iterable)) {
  42827. concatSeq = concatSeq.toSetSeq();
  42828. }
  42829. concatSeq = concatSeq.flatten(true);
  42830. concatSeq.size = iters.reduce(
  42831. function(sum, seq) {
  42832. if (sum !== undefined) {
  42833. var size = seq.size;
  42834. if (size !== undefined) {
  42835. return sum + size;
  42836. }
  42837. }
  42838. },
  42839. 0
  42840. );
  42841. return concatSeq;
  42842. }
  42843. function flattenFactory(iterable, depth, useKeys) {
  42844. var flatSequence = makeSequence(iterable);
  42845. flatSequence.__iterateUncached = function(fn, reverse) {
  42846. var iterations = 0;
  42847. var stopped = false;
  42848. function flatDeep(iter, currentDepth) {var this$0 = this;
  42849. iter.__iterate(function(v, k) {
  42850. if ((!depth || currentDepth < depth) && isIterable(v)) {
  42851. flatDeep(v, currentDepth + 1);
  42852. } else if (fn(v, useKeys ? k : iterations++, this$0) === false) {
  42853. stopped = true;
  42854. }
  42855. return !stopped;
  42856. }, reverse);
  42857. }
  42858. flatDeep(iterable, 0);
  42859. return iterations;
  42860. }
  42861. flatSequence.__iteratorUncached = function(type, reverse) {
  42862. var iterator = iterable.__iterator(type, reverse);
  42863. var stack = [];
  42864. var iterations = 0;
  42865. return new Iterator(function() {
  42866. while (iterator) {
  42867. var step = iterator.next();
  42868. if (step.done !== false) {
  42869. iterator = stack.pop();
  42870. continue;
  42871. }
  42872. var v = step.value;
  42873. if (type === ITERATE_ENTRIES) {
  42874. v = v[1];
  42875. }
  42876. if ((!depth || stack.length < depth) && isIterable(v)) {
  42877. stack.push(iterator);
  42878. iterator = v.__iterator(type, reverse);
  42879. } else {
  42880. return useKeys ? step : iteratorValue(type, iterations++, v, step);
  42881. }
  42882. }
  42883. return iteratorDone();
  42884. });
  42885. }
  42886. return flatSequence;
  42887. }
  42888. function flatMapFactory(iterable, mapper, context) {
  42889. var coerce = iterableClass(iterable);
  42890. return iterable.toSeq().map(
  42891. function(v, k) {return coerce(mapper.call(context, v, k, iterable))}
  42892. ).flatten(true);
  42893. }
  42894. function interposeFactory(iterable, separator) {
  42895. var interposedSequence = makeSequence(iterable);
  42896. interposedSequence.size = iterable.size && iterable.size * 2 -1;
  42897. interposedSequence.__iterateUncached = function(fn, reverse) {var this$0 = this;
  42898. var iterations = 0;
  42899. iterable.__iterate(function(v, k)
  42900. {return (!iterations || fn(separator, iterations++, this$0) !== false) &&
  42901. fn(v, iterations++, this$0) !== false},
  42902. reverse
  42903. );
  42904. return iterations;
  42905. };
  42906. interposedSequence.__iteratorUncached = function(type, reverse) {
  42907. var iterator = iterable.__iterator(ITERATE_VALUES, reverse);
  42908. var iterations = 0;
  42909. var step;
  42910. return new Iterator(function() {
  42911. if (!step || iterations % 2) {
  42912. step = iterator.next();
  42913. if (step.done) {
  42914. return step;
  42915. }
  42916. }
  42917. return iterations % 2 ?
  42918. iteratorValue(type, iterations++, separator) :
  42919. iteratorValue(type, iterations++, step.value, step);
  42920. });
  42921. };
  42922. return interposedSequence;
  42923. }
  42924. function sortFactory(iterable, comparator, mapper) {
  42925. if (!comparator) {
  42926. comparator = defaultComparator;
  42927. }
  42928. var isKeyedIterable = isKeyed(iterable);
  42929. var index = 0;
  42930. var entries = iterable.toSeq().map(
  42931. function(v, k) {return [k, v, index++, mapper ? mapper(v, k, iterable) : v]}
  42932. ).toArray();
  42933. entries.sort(function(a, b) {return comparator(a[3], b[3]) || a[2] - b[2]}).forEach(
  42934. isKeyedIterable ?
  42935. function(v, i) { entries[i].length = 2; } :
  42936. function(v, i) { entries[i] = v[1]; }
  42937. );
  42938. return isKeyedIterable ? KeyedSeq(entries) :
  42939. isIndexed(iterable) ? IndexedSeq(entries) :
  42940. SetSeq(entries);
  42941. }
  42942. function maxFactory(iterable, comparator, mapper) {
  42943. if (!comparator) {
  42944. comparator = defaultComparator;
  42945. }
  42946. if (mapper) {
  42947. var entry = iterable.toSeq()
  42948. .map(function(v, k) {return [v, mapper(v, k, iterable)]})
  42949. .reduce(function(a, b) {return maxCompare(comparator, a[1], b[1]) ? b : a});
  42950. return entry && entry[0];
  42951. } else {
  42952. return iterable.reduce(function(a, b) {return maxCompare(comparator, a, b) ? b : a});
  42953. }
  42954. }
  42955. function maxCompare(comparator, a, b) {
  42956. var comp = comparator(b, a);
  42957. // b is considered the new max if the comparator declares them equal, but
  42958. // they are not equal and b is in fact a nullish value.
  42959. return (comp === 0 && b !== a && (b === undefined || b === null || b !== b)) || comp > 0;
  42960. }
  42961. function zipWithFactory(keyIter, zipper, iters) {
  42962. var zipSequence = makeSequence(keyIter);
  42963. zipSequence.size = new ArraySeq(iters).map(function(i ) {return i.size}).min();
  42964. // Note: this a generic base implementation of __iterate in terms of
  42965. // __iterator which may be more generically useful in the future.
  42966. zipSequence.__iterate = function(fn, reverse) {
  42967. /* generic:
  42968. var iterator = this.__iterator(ITERATE_ENTRIES, reverse);
  42969. var step;
  42970. var iterations = 0;
  42971. while (!(step = iterator.next()).done) {
  42972. iterations++;
  42973. if (fn(step.value[1], step.value[0], this) === false) {
  42974. break;
  42975. }
  42976. }
  42977. return iterations;
  42978. */
  42979. // indexed:
  42980. var iterator = this.__iterator(ITERATE_VALUES, reverse);
  42981. var step;
  42982. var iterations = 0;
  42983. while (!(step = iterator.next()).done) {
  42984. if (fn(step.value, iterations++, this) === false) {
  42985. break;
  42986. }
  42987. }
  42988. return iterations;
  42989. };
  42990. zipSequence.__iteratorUncached = function(type, reverse) {
  42991. var iterators = iters.map(function(i )
  42992. {return (i = Iterable(i), getIterator(reverse ? i.reverse() : i))}
  42993. );
  42994. var iterations = 0;
  42995. var isDone = false;
  42996. return new Iterator(function() {
  42997. var steps;
  42998. if (!isDone) {
  42999. steps = iterators.map(function(i ) {return i.next()});
  43000. isDone = steps.some(function(s ) {return s.done});
  43001. }
  43002. if (isDone) {
  43003. return iteratorDone();
  43004. }
  43005. return iteratorValue(
  43006. type,
  43007. iterations++,
  43008. zipper.apply(null, steps.map(function(s ) {return s.value}))
  43009. );
  43010. });
  43011. };
  43012. return zipSequence
  43013. }
  43014. // #pragma Helper Functions
  43015. function reify(iter, seq) {
  43016. return isSeq(iter) ? seq : iter.constructor(seq);
  43017. }
  43018. function validateEntry(entry) {
  43019. if (entry !== Object(entry)) {
  43020. throw new TypeError('Expected [K, V] tuple: ' + entry);
  43021. }
  43022. }
  43023. function resolveSize(iter) {
  43024. assertNotInfinite(iter.size);
  43025. return ensureSize(iter);
  43026. }
  43027. function iterableClass(iterable) {
  43028. return isKeyed(iterable) ? KeyedIterable :
  43029. isIndexed(iterable) ? IndexedIterable :
  43030. SetIterable;
  43031. }
  43032. function makeSequence(iterable) {
  43033. return Object.create(
  43034. (
  43035. isKeyed(iterable) ? KeyedSeq :
  43036. isIndexed(iterable) ? IndexedSeq :
  43037. SetSeq
  43038. ).prototype
  43039. );
  43040. }
  43041. function cacheResultThrough() {
  43042. if (this._iter.cacheResult) {
  43043. this._iter.cacheResult();
  43044. this.size = this._iter.size;
  43045. return this;
  43046. } else {
  43047. return Seq.prototype.cacheResult.call(this);
  43048. }
  43049. }
  43050. function defaultComparator(a, b) {
  43051. return a > b ? 1 : a < b ? -1 : 0;
  43052. }
  43053. function forceIterator(keyPath) {
  43054. var iter = getIterator(keyPath);
  43055. if (!iter) {
  43056. // Array might not be iterable in this environment, so we need a fallback
  43057. // to our wrapped type.
  43058. if (!isArrayLike(keyPath)) {
  43059. throw new TypeError('Expected iterable or array-like: ' + keyPath);
  43060. }
  43061. iter = getIterator(Iterable(keyPath));
  43062. }
  43063. return iter;
  43064. }
  43065. createClass(Record, KeyedCollection);
  43066. function Record(defaultValues, name) {
  43067. var hasInitialized;
  43068. var RecordType = function Record(values) {
  43069. if (values instanceof RecordType) {
  43070. return values;
  43071. }
  43072. if (!(this instanceof RecordType)) {
  43073. return new RecordType(values);
  43074. }
  43075. if (!hasInitialized) {
  43076. hasInitialized = true;
  43077. var keys = Object.keys(defaultValues);
  43078. setProps(RecordTypePrototype, keys);
  43079. RecordTypePrototype.size = keys.length;
  43080. RecordTypePrototype._name = name;
  43081. RecordTypePrototype._keys = keys;
  43082. RecordTypePrototype._defaultValues = defaultValues;
  43083. }
  43084. this._map = Map(values);
  43085. };
  43086. var RecordTypePrototype = RecordType.prototype = Object.create(RecordPrototype);
  43087. RecordTypePrototype.constructor = RecordType;
  43088. return RecordType;
  43089. }
  43090. Record.prototype.toString = function() {
  43091. return this.__toString(recordName(this) + ' {', '}');
  43092. };
  43093. // @pragma Access
  43094. Record.prototype.has = function(k) {
  43095. return this._defaultValues.hasOwnProperty(k);
  43096. };
  43097. Record.prototype.get = function(k, notSetValue) {
  43098. if (!this.has(k)) {
  43099. return notSetValue;
  43100. }
  43101. var defaultVal = this._defaultValues[k];
  43102. return this._map ? this._map.get(k, defaultVal) : defaultVal;
  43103. };
  43104. // @pragma Modification
  43105. Record.prototype.clear = function() {
  43106. if (this.__ownerID) {
  43107. this._map && this._map.clear();
  43108. return this;
  43109. }
  43110. var RecordType = this.constructor;
  43111. return RecordType._empty || (RecordType._empty = makeRecord(this, emptyMap()));
  43112. };
  43113. Record.prototype.set = function(k, v) {
  43114. if (!this.has(k)) {
  43115. throw new Error('Cannot set unknown key "' + k + '" on ' + recordName(this));
  43116. }
  43117. if (this._map && !this._map.has(k)) {
  43118. var defaultVal = this._defaultValues[k];
  43119. if (v === defaultVal) {
  43120. return this;
  43121. }
  43122. }
  43123. var newMap = this._map && this._map.set(k, v);
  43124. if (this.__ownerID || newMap === this._map) {
  43125. return this;
  43126. }
  43127. return makeRecord(this, newMap);
  43128. };
  43129. Record.prototype.remove = function(k) {
  43130. if (!this.has(k)) {
  43131. return this;
  43132. }
  43133. var newMap = this._map && this._map.remove(k);
  43134. if (this.__ownerID || newMap === this._map) {
  43135. return this;
  43136. }
  43137. return makeRecord(this, newMap);
  43138. };
  43139. Record.prototype.wasAltered = function() {
  43140. return this._map.wasAltered();
  43141. };
  43142. Record.prototype.__iterator = function(type, reverse) {var this$0 = this;
  43143. return KeyedIterable(this._defaultValues).map(function(_, k) {return this$0.get(k)}).__iterator(type, reverse);
  43144. };
  43145. Record.prototype.__iterate = function(fn, reverse) {var this$0 = this;
  43146. return KeyedIterable(this._defaultValues).map(function(_, k) {return this$0.get(k)}).__iterate(fn, reverse);
  43147. };
  43148. Record.prototype.__ensureOwner = function(ownerID) {
  43149. if (ownerID === this.__ownerID) {
  43150. return this;
  43151. }
  43152. var newMap = this._map && this._map.__ensureOwner(ownerID);
  43153. if (!ownerID) {
  43154. this.__ownerID = ownerID;
  43155. this._map = newMap;
  43156. return this;
  43157. }
  43158. return makeRecord(this, newMap, ownerID);
  43159. };
  43160. var RecordPrototype = Record.prototype;
  43161. RecordPrototype[DELETE] = RecordPrototype.remove;
  43162. RecordPrototype.deleteIn =
  43163. RecordPrototype.removeIn = MapPrototype.removeIn;
  43164. RecordPrototype.merge = MapPrototype.merge;
  43165. RecordPrototype.mergeWith = MapPrototype.mergeWith;
  43166. RecordPrototype.mergeIn = MapPrototype.mergeIn;
  43167. RecordPrototype.mergeDeep = MapPrototype.mergeDeep;
  43168. RecordPrototype.mergeDeepWith = MapPrototype.mergeDeepWith;
  43169. RecordPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;
  43170. RecordPrototype.setIn = MapPrototype.setIn;
  43171. RecordPrototype.update = MapPrototype.update;
  43172. RecordPrototype.updateIn = MapPrototype.updateIn;
  43173. RecordPrototype.withMutations = MapPrototype.withMutations;
  43174. RecordPrototype.asMutable = MapPrototype.asMutable;
  43175. RecordPrototype.asImmutable = MapPrototype.asImmutable;
  43176. function makeRecord(likeRecord, map, ownerID) {
  43177. var record = Object.create(Object.getPrototypeOf(likeRecord));
  43178. record._map = map;
  43179. record.__ownerID = ownerID;
  43180. return record;
  43181. }
  43182. function recordName(record) {
  43183. return record._name || record.constructor.name || 'Record';
  43184. }
  43185. function setProps(prototype, names) {
  43186. try {
  43187. names.forEach(setProp.bind(undefined, prototype));
  43188. } catch (error) {
  43189. // Object.defineProperty failed. Probably IE8.
  43190. }
  43191. }
  43192. function setProp(prototype, name) {
  43193. Object.defineProperty(prototype, name, {
  43194. get: function() {
  43195. return this.get(name);
  43196. },
  43197. set: function(value) {
  43198. invariant(this.__ownerID, 'Cannot set on an immutable record.');
  43199. this.set(name, value);
  43200. }
  43201. });
  43202. }
  43203. createClass(Set, SetCollection);
  43204. // @pragma Construction
  43205. function Set(value) {
  43206. return value === null || value === undefined ? emptySet() :
  43207. isSet(value) && !isOrdered(value) ? value :
  43208. emptySet().withMutations(function(set ) {
  43209. var iter = SetIterable(value);
  43210. assertNotInfinite(iter.size);
  43211. iter.forEach(function(v ) {return set.add(v)});
  43212. });
  43213. }
  43214. Set.of = function(/*...values*/) {
  43215. return this(arguments);
  43216. };
  43217. Set.fromKeys = function(value) {
  43218. return this(KeyedIterable(value).keySeq());
  43219. };
  43220. Set.prototype.toString = function() {
  43221. return this.__toString('Set {', '}');
  43222. };
  43223. // @pragma Access
  43224. Set.prototype.has = function(value) {
  43225. return this._map.has(value);
  43226. };
  43227. // @pragma Modification
  43228. Set.prototype.add = function(value) {
  43229. return updateSet(this, this._map.set(value, true));
  43230. };
  43231. Set.prototype.remove = function(value) {
  43232. return updateSet(this, this._map.remove(value));
  43233. };
  43234. Set.prototype.clear = function() {
  43235. return updateSet(this, this._map.clear());
  43236. };
  43237. // @pragma Composition
  43238. Set.prototype.union = function() {var iters = SLICE$0.call(arguments, 0);
  43239. iters = iters.filter(function(x ) {return x.size !== 0});
  43240. if (iters.length === 0) {
  43241. return this;
  43242. }
  43243. if (this.size === 0 && !this.__ownerID && iters.length === 1) {
  43244. return this.constructor(iters[0]);
  43245. }
  43246. return this.withMutations(function(set ) {
  43247. for (var ii = 0; ii < iters.length; ii++) {
  43248. SetIterable(iters[ii]).forEach(function(value ) {return set.add(value)});
  43249. }
  43250. });
  43251. };
  43252. Set.prototype.intersect = function() {var iters = SLICE$0.call(arguments, 0);
  43253. if (iters.length === 0) {
  43254. return this;
  43255. }
  43256. iters = iters.map(function(iter ) {return SetIterable(iter)});
  43257. var originalSet = this;
  43258. return this.withMutations(function(set ) {
  43259. originalSet.forEach(function(value ) {
  43260. if (!iters.every(function(iter ) {return iter.includes(value)})) {
  43261. set.remove(value);
  43262. }
  43263. });
  43264. });
  43265. };
  43266. Set.prototype.subtract = function() {var iters = SLICE$0.call(arguments, 0);
  43267. if (iters.length === 0) {
  43268. return this;
  43269. }
  43270. iters = iters.map(function(iter ) {return SetIterable(iter)});
  43271. var originalSet = this;
  43272. return this.withMutations(function(set ) {
  43273. originalSet.forEach(function(value ) {
  43274. if (iters.some(function(iter ) {return iter.includes(value)})) {
  43275. set.remove(value);
  43276. }
  43277. });
  43278. });
  43279. };
  43280. Set.prototype.merge = function() {
  43281. return this.union.apply(this, arguments);
  43282. };
  43283. Set.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);
  43284. return this.union.apply(this, iters);
  43285. };
  43286. Set.prototype.sort = function(comparator) {
  43287. // Late binding
  43288. return OrderedSet(sortFactory(this, comparator));
  43289. };
  43290. Set.prototype.sortBy = function(mapper, comparator) {
  43291. // Late binding
  43292. return OrderedSet(sortFactory(this, comparator, mapper));
  43293. };
  43294. Set.prototype.wasAltered = function() {
  43295. return this._map.wasAltered();
  43296. };
  43297. Set.prototype.__iterate = function(fn, reverse) {var this$0 = this;
  43298. return this._map.__iterate(function(_, k) {return fn(k, k, this$0)}, reverse);
  43299. };
  43300. Set.prototype.__iterator = function(type, reverse) {
  43301. return this._map.map(function(_, k) {return k}).__iterator(type, reverse);
  43302. };
  43303. Set.prototype.__ensureOwner = function(ownerID) {
  43304. if (ownerID === this.__ownerID) {
  43305. return this;
  43306. }
  43307. var newMap = this._map.__ensureOwner(ownerID);
  43308. if (!ownerID) {
  43309. this.__ownerID = ownerID;
  43310. this._map = newMap;
  43311. return this;
  43312. }
  43313. return this.__make(newMap, ownerID);
  43314. };
  43315. function isSet(maybeSet) {
  43316. return !!(maybeSet && maybeSet[IS_SET_SENTINEL]);
  43317. }
  43318. Set.isSet = isSet;
  43319. var IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@';
  43320. var SetPrototype = Set.prototype;
  43321. SetPrototype[IS_SET_SENTINEL] = true;
  43322. SetPrototype[DELETE] = SetPrototype.remove;
  43323. SetPrototype.mergeDeep = SetPrototype.merge;
  43324. SetPrototype.mergeDeepWith = SetPrototype.mergeWith;
  43325. SetPrototype.withMutations = MapPrototype.withMutations;
  43326. SetPrototype.asMutable = MapPrototype.asMutable;
  43327. SetPrototype.asImmutable = MapPrototype.asImmutable;
  43328. SetPrototype.__empty = emptySet;
  43329. SetPrototype.__make = makeSet;
  43330. function updateSet(set, newMap) {
  43331. if (set.__ownerID) {
  43332. set.size = newMap.size;
  43333. set._map = newMap;
  43334. return set;
  43335. }
  43336. return newMap === set._map ? set :
  43337. newMap.size === 0 ? set.__empty() :
  43338. set.__make(newMap);
  43339. }
  43340. function makeSet(map, ownerID) {
  43341. var set = Object.create(SetPrototype);
  43342. set.size = map ? map.size : 0;
  43343. set._map = map;
  43344. set.__ownerID = ownerID;
  43345. return set;
  43346. }
  43347. var EMPTY_SET;
  43348. function emptySet() {
  43349. return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap()));
  43350. }
  43351. createClass(OrderedSet, Set);
  43352. // @pragma Construction
  43353. function OrderedSet(value) {
  43354. return value === null || value === undefined ? emptyOrderedSet() :
  43355. isOrderedSet(value) ? value :
  43356. emptyOrderedSet().withMutations(function(set ) {
  43357. var iter = SetIterable(value);
  43358. assertNotInfinite(iter.size);
  43359. iter.forEach(function(v ) {return set.add(v)});
  43360. });
  43361. }
  43362. OrderedSet.of = function(/*...values*/) {
  43363. return this(arguments);
  43364. };
  43365. OrderedSet.fromKeys = function(value) {
  43366. return this(KeyedIterable(value).keySeq());
  43367. };
  43368. OrderedSet.prototype.toString = function() {
  43369. return this.__toString('OrderedSet {', '}');
  43370. };
  43371. function isOrderedSet(maybeOrderedSet) {
  43372. return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet);
  43373. }
  43374. OrderedSet.isOrderedSet = isOrderedSet;
  43375. var OrderedSetPrototype = OrderedSet.prototype;
  43376. OrderedSetPrototype[IS_ORDERED_SENTINEL] = true;
  43377. OrderedSetPrototype.__empty = emptyOrderedSet;
  43378. OrderedSetPrototype.__make = makeOrderedSet;
  43379. function makeOrderedSet(map, ownerID) {
  43380. var set = Object.create(OrderedSetPrototype);
  43381. set.size = map ? map.size : 0;
  43382. set._map = map;
  43383. set.__ownerID = ownerID;
  43384. return set;
  43385. }
  43386. var EMPTY_ORDERED_SET;
  43387. function emptyOrderedSet() {
  43388. return EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap()));
  43389. }
  43390. createClass(Stack, IndexedCollection);
  43391. // @pragma Construction
  43392. function Stack(value) {
  43393. return value === null || value === undefined ? emptyStack() :
  43394. isStack(value) ? value :
  43395. emptyStack().unshiftAll(value);
  43396. }
  43397. Stack.of = function(/*...values*/) {
  43398. return this(arguments);
  43399. };
  43400. Stack.prototype.toString = function() {
  43401. return this.__toString('Stack [', ']');
  43402. };
  43403. // @pragma Access
  43404. Stack.prototype.get = function(index, notSetValue) {
  43405. var head = this._head;
  43406. index = wrapIndex(this, index);
  43407. while (head && index--) {
  43408. head = head.next;
  43409. }
  43410. return head ? head.value : notSetValue;
  43411. };
  43412. Stack.prototype.peek = function() {
  43413. return this._head && this._head.value;
  43414. };
  43415. // @pragma Modification
  43416. Stack.prototype.push = function(/*...values*/) {
  43417. if (arguments.length === 0) {
  43418. return this;
  43419. }
  43420. var newSize = this.size + arguments.length;
  43421. var head = this._head;
  43422. for (var ii = arguments.length - 1; ii >= 0; ii--) {
  43423. head = {
  43424. value: arguments[ii],
  43425. next: head
  43426. };
  43427. }
  43428. if (this.__ownerID) {
  43429. this.size = newSize;
  43430. this._head = head;
  43431. this.__hash = undefined;
  43432. this.__altered = true;
  43433. return this;
  43434. }
  43435. return makeStack(newSize, head);
  43436. };
  43437. Stack.prototype.pushAll = function(iter) {
  43438. iter = IndexedIterable(iter);
  43439. if (iter.size === 0) {
  43440. return this;
  43441. }
  43442. assertNotInfinite(iter.size);
  43443. var newSize = this.size;
  43444. var head = this._head;
  43445. iter.reverse().forEach(function(value ) {
  43446. newSize++;
  43447. head = {
  43448. value: value,
  43449. next: head
  43450. };
  43451. });
  43452. if (this.__ownerID) {
  43453. this.size = newSize;
  43454. this._head = head;
  43455. this.__hash = undefined;
  43456. this.__altered = true;
  43457. return this;
  43458. }
  43459. return makeStack(newSize, head);
  43460. };
  43461. Stack.prototype.pop = function() {
  43462. return this.slice(1);
  43463. };
  43464. Stack.prototype.unshift = function(/*...values*/) {
  43465. return this.push.apply(this, arguments);
  43466. };
  43467. Stack.prototype.unshiftAll = function(iter) {
  43468. return this.pushAll(iter);
  43469. };
  43470. Stack.prototype.shift = function() {
  43471. return this.pop.apply(this, arguments);
  43472. };
  43473. Stack.prototype.clear = function() {
  43474. if (this.size === 0) {
  43475. return this;
  43476. }
  43477. if (this.__ownerID) {
  43478. this.size = 0;
  43479. this._head = undefined;
  43480. this.__hash = undefined;
  43481. this.__altered = true;
  43482. return this;
  43483. }
  43484. return emptyStack();
  43485. };
  43486. Stack.prototype.slice = function(begin, end) {
  43487. if (wholeSlice(begin, end, this.size)) {
  43488. return this;
  43489. }
  43490. var resolvedBegin = resolveBegin(begin, this.size);
  43491. var resolvedEnd = resolveEnd(end, this.size);
  43492. if (resolvedEnd !== this.size) {
  43493. // super.slice(begin, end);
  43494. return IndexedCollection.prototype.slice.call(this, begin, end);
  43495. }
  43496. var newSize = this.size - resolvedBegin;
  43497. var head = this._head;
  43498. while (resolvedBegin--) {
  43499. head = head.next;
  43500. }
  43501. if (this.__ownerID) {
  43502. this.size = newSize;
  43503. this._head = head;
  43504. this.__hash = undefined;
  43505. this.__altered = true;
  43506. return this;
  43507. }
  43508. return makeStack(newSize, head);
  43509. };
  43510. // @pragma Mutability
  43511. Stack.prototype.__ensureOwner = function(ownerID) {
  43512. if (ownerID === this.__ownerID) {
  43513. return this;
  43514. }
  43515. if (!ownerID) {
  43516. this.__ownerID = ownerID;
  43517. this.__altered = false;
  43518. return this;
  43519. }
  43520. return makeStack(this.size, this._head, ownerID, this.__hash);
  43521. };
  43522. // @pragma Iteration
  43523. Stack.prototype.__iterate = function(fn, reverse) {
  43524. if (reverse) {
  43525. return this.reverse().__iterate(fn);
  43526. }
  43527. var iterations = 0;
  43528. var node = this._head;
  43529. while (node) {
  43530. if (fn(node.value, iterations++, this) === false) {
  43531. break;
  43532. }
  43533. node = node.next;
  43534. }
  43535. return iterations;
  43536. };
  43537. Stack.prototype.__iterator = function(type, reverse) {
  43538. if (reverse) {
  43539. return this.reverse().__iterator(type);
  43540. }
  43541. var iterations = 0;
  43542. var node = this._head;
  43543. return new Iterator(function() {
  43544. if (node) {
  43545. var value = node.value;
  43546. node = node.next;
  43547. return iteratorValue(type, iterations++, value);
  43548. }
  43549. return iteratorDone();
  43550. });
  43551. };
  43552. function isStack(maybeStack) {
  43553. return !!(maybeStack && maybeStack[IS_STACK_SENTINEL]);
  43554. }
  43555. Stack.isStack = isStack;
  43556. var IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@';
  43557. var StackPrototype = Stack.prototype;
  43558. StackPrototype[IS_STACK_SENTINEL] = true;
  43559. StackPrototype.withMutations = MapPrototype.withMutations;
  43560. StackPrototype.asMutable = MapPrototype.asMutable;
  43561. StackPrototype.asImmutable = MapPrototype.asImmutable;
  43562. StackPrototype.wasAltered = MapPrototype.wasAltered;
  43563. function makeStack(size, head, ownerID, hash) {
  43564. var map = Object.create(StackPrototype);
  43565. map.size = size;
  43566. map._head = head;
  43567. map.__ownerID = ownerID;
  43568. map.__hash = hash;
  43569. map.__altered = false;
  43570. return map;
  43571. }
  43572. var EMPTY_STACK;
  43573. function emptyStack() {
  43574. return EMPTY_STACK || (EMPTY_STACK = makeStack(0));
  43575. }
  43576. /**
  43577. * Contributes additional methods to a constructor
  43578. */
  43579. function mixin(ctor, methods) {
  43580. var keyCopier = function(key ) { ctor.prototype[key] = methods[key]; };
  43581. Object.keys(methods).forEach(keyCopier);
  43582. Object.getOwnPropertySymbols &&
  43583. Object.getOwnPropertySymbols(methods).forEach(keyCopier);
  43584. return ctor;
  43585. }
  43586. Iterable.Iterator = Iterator;
  43587. mixin(Iterable, {
  43588. // ### Conversion to other types
  43589. toArray: function() {
  43590. assertNotInfinite(this.size);
  43591. var array = new Array(this.size || 0);
  43592. this.valueSeq().__iterate(function(v, i) { array[i] = v; });
  43593. return array;
  43594. },
  43595. toIndexedSeq: function() {
  43596. return new ToIndexedSequence(this);
  43597. },
  43598. toJS: function() {
  43599. return this.toSeq().map(
  43600. function(value ) {return value && typeof value.toJS === 'function' ? value.toJS() : value}
  43601. ).__toJS();
  43602. },
  43603. toJSON: function() {
  43604. return this.toSeq().map(
  43605. function(value ) {return value && typeof value.toJSON === 'function' ? value.toJSON() : value}
  43606. ).__toJS();
  43607. },
  43608. toKeyedSeq: function() {
  43609. return new ToKeyedSequence(this, true);
  43610. },
  43611. toMap: function() {
  43612. // Use Late Binding here to solve the circular dependency.
  43613. return Map(this.toKeyedSeq());
  43614. },
  43615. toObject: function() {
  43616. assertNotInfinite(this.size);
  43617. var object = {};
  43618. this.__iterate(function(v, k) { object[k] = v; });
  43619. return object;
  43620. },
  43621. toOrderedMap: function() {
  43622. // Use Late Binding here to solve the circular dependency.
  43623. return OrderedMap(this.toKeyedSeq());
  43624. },
  43625. toOrderedSet: function() {
  43626. // Use Late Binding here to solve the circular dependency.
  43627. return OrderedSet(isKeyed(this) ? this.valueSeq() : this);
  43628. },
  43629. toSet: function() {
  43630. // Use Late Binding here to solve the circular dependency.
  43631. return Set(isKeyed(this) ? this.valueSeq() : this);
  43632. },
  43633. toSetSeq: function() {
  43634. return new ToSetSequence(this);
  43635. },
  43636. toSeq: function() {
  43637. return isIndexed(this) ? this.toIndexedSeq() :
  43638. isKeyed(this) ? this.toKeyedSeq() :
  43639. this.toSetSeq();
  43640. },
  43641. toStack: function() {
  43642. // Use Late Binding here to solve the circular dependency.
  43643. return Stack(isKeyed(this) ? this.valueSeq() : this);
  43644. },
  43645. toList: function() {
  43646. // Use Late Binding here to solve the circular dependency.
  43647. return List(isKeyed(this) ? this.valueSeq() : this);
  43648. },
  43649. // ### Common JavaScript methods and properties
  43650. toString: function() {
  43651. return '[Iterable]';
  43652. },
  43653. __toString: function(head, tail) {
  43654. if (this.size === 0) {
  43655. return head + tail;
  43656. }
  43657. return head + ' ' + this.toSeq().map(this.__toStringMapper).join(', ') + ' ' + tail;
  43658. },
  43659. // ### ES6 Collection methods (ES6 Array and Map)
  43660. concat: function() {var values = SLICE$0.call(arguments, 0);
  43661. return reify(this, concatFactory(this, values));
  43662. },
  43663. includes: function(searchValue) {
  43664. return this.some(function(value ) {return is(value, searchValue)});
  43665. },
  43666. entries: function() {
  43667. return this.__iterator(ITERATE_ENTRIES);
  43668. },
  43669. every: function(predicate, context) {
  43670. assertNotInfinite(this.size);
  43671. var returnValue = true;
  43672. this.__iterate(function(v, k, c) {
  43673. if (!predicate.call(context, v, k, c)) {
  43674. returnValue = false;
  43675. return false;
  43676. }
  43677. });
  43678. return returnValue;
  43679. },
  43680. filter: function(predicate, context) {
  43681. return reify(this, filterFactory(this, predicate, context, true));
  43682. },
  43683. find: function(predicate, context, notSetValue) {
  43684. var entry = this.findEntry(predicate, context);
  43685. return entry ? entry[1] : notSetValue;
  43686. },
  43687. forEach: function(sideEffect, context) {
  43688. assertNotInfinite(this.size);
  43689. return this.__iterate(context ? sideEffect.bind(context) : sideEffect);
  43690. },
  43691. join: function(separator) {
  43692. assertNotInfinite(this.size);
  43693. separator = separator !== undefined ? '' + separator : ',';
  43694. var joined = '';
  43695. var isFirst = true;
  43696. this.__iterate(function(v ) {
  43697. isFirst ? (isFirst = false) : (joined += separator);
  43698. joined += v !== null && v !== undefined ? v.toString() : '';
  43699. });
  43700. return joined;
  43701. },
  43702. keys: function() {
  43703. return this.__iterator(ITERATE_KEYS);
  43704. },
  43705. map: function(mapper, context) {
  43706. return reify(this, mapFactory(this, mapper, context));
  43707. },
  43708. reduce: function(reducer, initialReduction, context) {
  43709. assertNotInfinite(this.size);
  43710. var reduction;
  43711. var useFirst;
  43712. if (arguments.length < 2) {
  43713. useFirst = true;
  43714. } else {
  43715. reduction = initialReduction;
  43716. }
  43717. this.__iterate(function(v, k, c) {
  43718. if (useFirst) {
  43719. useFirst = false;
  43720. reduction = v;
  43721. } else {
  43722. reduction = reducer.call(context, reduction, v, k, c);
  43723. }
  43724. });
  43725. return reduction;
  43726. },
  43727. reduceRight: function(reducer, initialReduction, context) {
  43728. var reversed = this.toKeyedSeq().reverse();
  43729. return reversed.reduce.apply(reversed, arguments);
  43730. },
  43731. reverse: function() {
  43732. return reify(this, reverseFactory(this, true));
  43733. },
  43734. slice: function(begin, end) {
  43735. return reify(this, sliceFactory(this, begin, end, true));
  43736. },
  43737. some: function(predicate, context) {
  43738. return !this.every(not(predicate), context);
  43739. },
  43740. sort: function(comparator) {
  43741. return reify(this, sortFactory(this, comparator));
  43742. },
  43743. values: function() {
  43744. return this.__iterator(ITERATE_VALUES);
  43745. },
  43746. // ### More sequential methods
  43747. butLast: function() {
  43748. return this.slice(0, -1);
  43749. },
  43750. isEmpty: function() {
  43751. return this.size !== undefined ? this.size === 0 : !this.some(function() {return true});
  43752. },
  43753. count: function(predicate, context) {
  43754. return ensureSize(
  43755. predicate ? this.toSeq().filter(predicate, context) : this
  43756. );
  43757. },
  43758. countBy: function(grouper, context) {
  43759. return countByFactory(this, grouper, context);
  43760. },
  43761. equals: function(other) {
  43762. return deepEqual(this, other);
  43763. },
  43764. entrySeq: function() {
  43765. var iterable = this;
  43766. if (iterable._cache) {
  43767. // We cache as an entries array, so we can just return the cache!
  43768. return new ArraySeq(iterable._cache);
  43769. }
  43770. var entriesSequence = iterable.toSeq().map(entryMapper).toIndexedSeq();
  43771. entriesSequence.fromEntrySeq = function() {return iterable.toSeq()};
  43772. return entriesSequence;
  43773. },
  43774. filterNot: function(predicate, context) {
  43775. return this.filter(not(predicate), context);
  43776. },
  43777. findEntry: function(predicate, context, notSetValue) {
  43778. var found = notSetValue;
  43779. this.__iterate(function(v, k, c) {
  43780. if (predicate.call(context, v, k, c)) {
  43781. found = [k, v];
  43782. return false;
  43783. }
  43784. });
  43785. return found;
  43786. },
  43787. findKey: function(predicate, context) {
  43788. var entry = this.findEntry(predicate, context);
  43789. return entry && entry[0];
  43790. },
  43791. findLast: function(predicate, context, notSetValue) {
  43792. return this.toKeyedSeq().reverse().find(predicate, context, notSetValue);
  43793. },
  43794. findLastEntry: function(predicate, context, notSetValue) {
  43795. return this.toKeyedSeq().reverse().findEntry(predicate, context, notSetValue);
  43796. },
  43797. findLastKey: function(predicate, context) {
  43798. return this.toKeyedSeq().reverse().findKey(predicate, context);
  43799. },
  43800. first: function() {
  43801. return this.find(returnTrue);
  43802. },
  43803. flatMap: function(mapper, context) {
  43804. return reify(this, flatMapFactory(this, mapper, context));
  43805. },
  43806. flatten: function(depth) {
  43807. return reify(this, flattenFactory(this, depth, true));
  43808. },
  43809. fromEntrySeq: function() {
  43810. return new FromEntriesSequence(this);
  43811. },
  43812. get: function(searchKey, notSetValue) {
  43813. return this.find(function(_, key) {return is(key, searchKey)}, undefined, notSetValue);
  43814. },
  43815. getIn: function(searchKeyPath, notSetValue) {
  43816. var nested = this;
  43817. // Note: in an ES6 environment, we would prefer:
  43818. // for (var key of searchKeyPath) {
  43819. var iter = forceIterator(searchKeyPath);
  43820. var step;
  43821. while (!(step = iter.next()).done) {
  43822. var key = step.value;
  43823. nested = nested && nested.get ? nested.get(key, NOT_SET) : NOT_SET;
  43824. if (nested === NOT_SET) {
  43825. return notSetValue;
  43826. }
  43827. }
  43828. return nested;
  43829. },
  43830. groupBy: function(grouper, context) {
  43831. return groupByFactory(this, grouper, context);
  43832. },
  43833. has: function(searchKey) {
  43834. return this.get(searchKey, NOT_SET) !== NOT_SET;
  43835. },
  43836. hasIn: function(searchKeyPath) {
  43837. return this.getIn(searchKeyPath, NOT_SET) !== NOT_SET;
  43838. },
  43839. isSubset: function(iter) {
  43840. iter = typeof iter.includes === 'function' ? iter : Iterable(iter);
  43841. return this.every(function(value ) {return iter.includes(value)});
  43842. },
  43843. isSuperset: function(iter) {
  43844. iter = typeof iter.isSubset === 'function' ? iter : Iterable(iter);
  43845. return iter.isSubset(this);
  43846. },
  43847. keyOf: function(searchValue) {
  43848. return this.findKey(function(value ) {return is(value, searchValue)});
  43849. },
  43850. keySeq: function() {
  43851. return this.toSeq().map(keyMapper).toIndexedSeq();
  43852. },
  43853. last: function() {
  43854. return this.toSeq().reverse().first();
  43855. },
  43856. lastKeyOf: function(searchValue) {
  43857. return this.toKeyedSeq().reverse().keyOf(searchValue);
  43858. },
  43859. max: function(comparator) {
  43860. return maxFactory(this, comparator);
  43861. },
  43862. maxBy: function(mapper, comparator) {
  43863. return maxFactory(this, comparator, mapper);
  43864. },
  43865. min: function(comparator) {
  43866. return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator);
  43867. },
  43868. minBy: function(mapper, comparator) {
  43869. return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator, mapper);
  43870. },
  43871. rest: function() {
  43872. return this.slice(1);
  43873. },
  43874. skip: function(amount) {
  43875. return this.slice(Math.max(0, amount));
  43876. },
  43877. skipLast: function(amount) {
  43878. return reify(this, this.toSeq().reverse().skip(amount).reverse());
  43879. },
  43880. skipWhile: function(predicate, context) {
  43881. return reify(this, skipWhileFactory(this, predicate, context, true));
  43882. },
  43883. skipUntil: function(predicate, context) {
  43884. return this.skipWhile(not(predicate), context);
  43885. },
  43886. sortBy: function(mapper, comparator) {
  43887. return reify(this, sortFactory(this, comparator, mapper));
  43888. },
  43889. take: function(amount) {
  43890. return this.slice(0, Math.max(0, amount));
  43891. },
  43892. takeLast: function(amount) {
  43893. return reify(this, this.toSeq().reverse().take(amount).reverse());
  43894. },
  43895. takeWhile: function(predicate, context) {
  43896. return reify(this, takeWhileFactory(this, predicate, context));
  43897. },
  43898. takeUntil: function(predicate, context) {
  43899. return this.takeWhile(not(predicate), context);
  43900. },
  43901. valueSeq: function() {
  43902. return this.toIndexedSeq();
  43903. },
  43904. // ### Hashable Object
  43905. hashCode: function() {
  43906. return this.__hash || (this.__hash = hashIterable(this));
  43907. }
  43908. // ### Internal
  43909. // abstract __iterate(fn, reverse)
  43910. // abstract __iterator(type, reverse)
  43911. });
  43912. // var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';
  43913. // var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';
  43914. // var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';
  43915. // var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';
  43916. var IterablePrototype = Iterable.prototype;
  43917. IterablePrototype[IS_ITERABLE_SENTINEL] = true;
  43918. IterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.values;
  43919. IterablePrototype.__toJS = IterablePrototype.toArray;
  43920. IterablePrototype.__toStringMapper = quoteString;
  43921. IterablePrototype.inspect =
  43922. IterablePrototype.toSource = function() { return this.toString(); };
  43923. IterablePrototype.chain = IterablePrototype.flatMap;
  43924. IterablePrototype.contains = IterablePrototype.includes;
  43925. mixin(KeyedIterable, {
  43926. // ### More sequential methods
  43927. flip: function() {
  43928. return reify(this, flipFactory(this));
  43929. },
  43930. mapEntries: function(mapper, context) {var this$0 = this;
  43931. var iterations = 0;
  43932. return reify(this,
  43933. this.toSeq().map(
  43934. function(v, k) {return mapper.call(context, [k, v], iterations++, this$0)}
  43935. ).fromEntrySeq()
  43936. );
  43937. },
  43938. mapKeys: function(mapper, context) {var this$0 = this;
  43939. return reify(this,
  43940. this.toSeq().flip().map(
  43941. function(k, v) {return mapper.call(context, k, v, this$0)}
  43942. ).flip()
  43943. );
  43944. }
  43945. });
  43946. var KeyedIterablePrototype = KeyedIterable.prototype;
  43947. KeyedIterablePrototype[IS_KEYED_SENTINEL] = true;
  43948. KeyedIterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.entries;
  43949. KeyedIterablePrototype.__toJS = IterablePrototype.toObject;
  43950. KeyedIterablePrototype.__toStringMapper = function(v, k) {return JSON.stringify(k) + ': ' + quoteString(v)};
  43951. mixin(IndexedIterable, {
  43952. // ### Conversion to other types
  43953. toKeyedSeq: function() {
  43954. return new ToKeyedSequence(this, false);
  43955. },
  43956. // ### ES6 Collection methods (ES6 Array and Map)
  43957. filter: function(predicate, context) {
  43958. return reify(this, filterFactory(this, predicate, context, false));
  43959. },
  43960. findIndex: function(predicate, context) {
  43961. var entry = this.findEntry(predicate, context);
  43962. return entry ? entry[0] : -1;
  43963. },
  43964. indexOf: function(searchValue) {
  43965. var key = this.keyOf(searchValue);
  43966. return key === undefined ? -1 : key;
  43967. },
  43968. lastIndexOf: function(searchValue) {
  43969. var key = this.lastKeyOf(searchValue);
  43970. return key === undefined ? -1 : key;
  43971. },
  43972. reverse: function() {
  43973. return reify(this, reverseFactory(this, false));
  43974. },
  43975. slice: function(begin, end) {
  43976. return reify(this, sliceFactory(this, begin, end, false));
  43977. },
  43978. splice: function(index, removeNum /*, ...values*/) {
  43979. var numArgs = arguments.length;
  43980. removeNum = Math.max(removeNum | 0, 0);
  43981. if (numArgs === 0 || (numArgs === 2 && !removeNum)) {
  43982. return this;
  43983. }
  43984. // If index is negative, it should resolve relative to the size of the
  43985. // collection. However size may be expensive to compute if not cached, so
  43986. // only call count() if the number is in fact negative.
  43987. index = resolveBegin(index, index < 0 ? this.count() : this.size);
  43988. var spliced = this.slice(0, index);
  43989. return reify(
  43990. this,
  43991. numArgs === 1 ?
  43992. spliced :
  43993. spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum))
  43994. );
  43995. },
  43996. // ### More collection methods
  43997. findLastIndex: function(predicate, context) {
  43998. var entry = this.findLastEntry(predicate, context);
  43999. return entry ? entry[0] : -1;
  44000. },
  44001. first: function() {
  44002. return this.get(0);
  44003. },
  44004. flatten: function(depth) {
  44005. return reify(this, flattenFactory(this, depth, false));
  44006. },
  44007. get: function(index, notSetValue) {
  44008. index = wrapIndex(this, index);
  44009. return (index < 0 || (this.size === Infinity ||
  44010. (this.size !== undefined && index > this.size))) ?
  44011. notSetValue :
  44012. this.find(function(_, key) {return key === index}, undefined, notSetValue);
  44013. },
  44014. has: function(index) {
  44015. index = wrapIndex(this, index);
  44016. return index >= 0 && (this.size !== undefined ?
  44017. this.size === Infinity || index < this.size :
  44018. this.indexOf(index) !== -1
  44019. );
  44020. },
  44021. interpose: function(separator) {
  44022. return reify(this, interposeFactory(this, separator));
  44023. },
  44024. interleave: function(/*...iterables*/) {
  44025. var iterables = [this].concat(arrCopy(arguments));
  44026. var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, iterables);
  44027. var interleaved = zipped.flatten(true);
  44028. if (zipped.size) {
  44029. interleaved.size = zipped.size * iterables.length;
  44030. }
  44031. return reify(this, interleaved);
  44032. },
  44033. keySeq: function() {
  44034. return Range(0, this.size);
  44035. },
  44036. last: function() {
  44037. return this.get(-1);
  44038. },
  44039. skipWhile: function(predicate, context) {
  44040. return reify(this, skipWhileFactory(this, predicate, context, false));
  44041. },
  44042. zip: function(/*, ...iterables */) {
  44043. var iterables = [this].concat(arrCopy(arguments));
  44044. return reify(this, zipWithFactory(this, defaultZipper, iterables));
  44045. },
  44046. zipWith: function(zipper/*, ...iterables */) {
  44047. var iterables = arrCopy(arguments);
  44048. iterables[0] = this;
  44049. return reify(this, zipWithFactory(this, zipper, iterables));
  44050. }
  44051. });
  44052. IndexedIterable.prototype[IS_INDEXED_SENTINEL] = true;
  44053. IndexedIterable.prototype[IS_ORDERED_SENTINEL] = true;
  44054. mixin(SetIterable, {
  44055. // ### ES6 Collection methods (ES6 Array and Map)
  44056. get: function(value, notSetValue) {
  44057. return this.has(value) ? value : notSetValue;
  44058. },
  44059. includes: function(value) {
  44060. return this.has(value);
  44061. },
  44062. // ### More sequential methods
  44063. keySeq: function() {
  44064. return this.valueSeq();
  44065. }
  44066. });
  44067. SetIterable.prototype.has = IterablePrototype.includes;
  44068. SetIterable.prototype.contains = SetIterable.prototype.includes;
  44069. // Mixin subclasses
  44070. mixin(KeyedSeq, KeyedIterable.prototype);
  44071. mixin(IndexedSeq, IndexedIterable.prototype);
  44072. mixin(SetSeq, SetIterable.prototype);
  44073. mixin(KeyedCollection, KeyedIterable.prototype);
  44074. mixin(IndexedCollection, IndexedIterable.prototype);
  44075. mixin(SetCollection, SetIterable.prototype);
  44076. // #pragma Helper functions
  44077. function keyMapper(v, k) {
  44078. return k;
  44079. }
  44080. function entryMapper(v, k) {
  44081. return [k, v];
  44082. }
  44083. function not(predicate) {
  44084. return function() {
  44085. return !predicate.apply(this, arguments);
  44086. }
  44087. }
  44088. function neg(predicate) {
  44089. return function() {
  44090. return -predicate.apply(this, arguments);
  44091. }
  44092. }
  44093. function quoteString(value) {
  44094. return typeof value === 'string' ? JSON.stringify(value) : String(value);
  44095. }
  44096. function defaultZipper() {
  44097. return arrCopy(arguments);
  44098. }
  44099. function defaultNegComparator(a, b) {
  44100. return a < b ? 1 : a > b ? -1 : 0;
  44101. }
  44102. function hashIterable(iterable) {
  44103. if (iterable.size === Infinity) {
  44104. return 0;
  44105. }
  44106. var ordered = isOrdered(iterable);
  44107. var keyed = isKeyed(iterable);
  44108. var h = ordered ? 1 : 0;
  44109. var size = iterable.__iterate(
  44110. keyed ?
  44111. ordered ?
  44112. function(v, k) { h = 31 * h + hashMerge(hash(v), hash(k)) | 0; } :
  44113. function(v, k) { h = h + hashMerge(hash(v), hash(k)) | 0; } :
  44114. ordered ?
  44115. function(v ) { h = 31 * h + hash(v) | 0; } :
  44116. function(v ) { h = h + hash(v) | 0; }
  44117. );
  44118. return murmurHashOfSize(size, h);
  44119. }
  44120. function murmurHashOfSize(size, h) {
  44121. h = imul(h, 0xCC9E2D51);
  44122. h = imul(h << 15 | h >>> -15, 0x1B873593);
  44123. h = imul(h << 13 | h >>> -13, 5);
  44124. h = (h + 0xE6546B64 | 0) ^ size;
  44125. h = imul(h ^ h >>> 16, 0x85EBCA6B);
  44126. h = imul(h ^ h >>> 13, 0xC2B2AE35);
  44127. h = smi(h ^ h >>> 16);
  44128. return h;
  44129. }
  44130. function hashMerge(a, b) {
  44131. return a ^ b + 0x9E3779B9 + (a << 6) + (a >> 2) | 0; // int
  44132. }
  44133. var Immutable = {
  44134. Iterable: Iterable,
  44135. Seq: Seq,
  44136. Collection: Collection,
  44137. Map: Map,
  44138. OrderedMap: OrderedMap,
  44139. List: List,
  44140. Stack: Stack,
  44141. Set: Set,
  44142. OrderedSet: OrderedSet,
  44143. Record: Record,
  44144. Range: Range,
  44145. Repeat: Repeat,
  44146. is: is,
  44147. fromJS: fromJS
  44148. };
  44149. return Immutable;
  44150. }));
  44151. /***/ }),
  44152. /***/ 64847:
  44153. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  44154. "use strict";
  44155. var Immutable = __webpack_require__(23634);
  44156. var utils = __webpack_require__(67129);
  44157. var lcs = __webpack_require__(55153);
  44158. var path = __webpack_require__(42472);
  44159. var concatPath = path.concat,
  44160. escape = path.escape,
  44161. op = utils.op,
  44162. isMap = utils.isMap,
  44163. isIndexed = utils.isIndexed;
  44164. var mapDiff = function(a, b, p){
  44165. var ops = [];
  44166. var path = p || '';
  44167. if(Immutable.is(a, b) || (a == b == null)){ return ops; }
  44168. var areLists = isIndexed(a) && isIndexed(b);
  44169. var lastKey = null;
  44170. var removeKey = null
  44171. if(a.forEach){
  44172. a.forEach(function(aValue, aKey){
  44173. if(b.has(aKey)){
  44174. if(isMap(aValue) && isMap(b.get(aKey))){
  44175. ops = ops.concat(mapDiff(aValue, b.get(aKey), concatPath(path, escape(aKey))));
  44176. }
  44177. else if(isIndexed(b.get(aKey)) && isIndexed(aValue)){
  44178. ops = ops.concat(sequenceDiff(aValue, b.get(aKey), concatPath(path, escape(aKey))));
  44179. }
  44180. else {
  44181. var bValue = b.get ? b.get(aKey) : b;
  44182. var areDifferentValues = (aValue !== bValue);
  44183. if (areDifferentValues) {
  44184. ops.push(op('replace', concatPath(path, escape(aKey)), bValue));
  44185. }
  44186. }
  44187. }
  44188. else {
  44189. if(areLists){
  44190. removeKey = (lastKey != null && (lastKey+1) === aKey) ? removeKey : aKey;
  44191. ops.push( op('remove', concatPath(path, escape(removeKey))) );
  44192. lastKey = aKey;
  44193. }
  44194. else{
  44195. ops.push( op('remove', concatPath(path, escape(aKey))) );
  44196. }
  44197. }
  44198. });
  44199. }
  44200. b.forEach(function(bValue, bKey){
  44201. if(a.has && !a.has(bKey)){
  44202. ops.push( op('add', concatPath(path, escape(bKey)), bValue) );
  44203. }
  44204. });
  44205. return ops;
  44206. };
  44207. var sequenceDiff = function (a, b, p) {
  44208. var ops = [];
  44209. var path = p || '';
  44210. if(Immutable.is(a, b) || (a == b == null)){ return ops; }
  44211. if((a.count() + 1) * (b.count() + 1) >= 10000 ) { return mapDiff(a, b, p); }
  44212. var lcsDiff = lcs.diff(a, b);
  44213. var pathIndex = 0;
  44214. lcsDiff.forEach(function (diff) {
  44215. if(diff.op === '='){ pathIndex++; }
  44216. else if(diff.op === '!='){
  44217. if(isMap(diff.val) && isMap(diff.newVal)){
  44218. var mapDiffs = mapDiff(diff.val, diff.newVal, concatPath(path, pathIndex));
  44219. ops = ops.concat(mapDiffs);
  44220. }
  44221. else{
  44222. ops.push(op('replace', concatPath(path, pathIndex), diff.newVal));
  44223. }
  44224. pathIndex++;
  44225. }
  44226. else if(diff.op === '+'){
  44227. ops.push(op('add', concatPath(path, pathIndex), diff.val));
  44228. pathIndex++;
  44229. }
  44230. else if(diff.op === '-'){ ops.push(op('remove', concatPath(path, pathIndex))); }
  44231. });
  44232. return ops;
  44233. };
  44234. var primitiveTypeDiff = function (a, b, p) {
  44235. var path = p || '';
  44236. if(a === b){ return []; }
  44237. else{
  44238. return [ op('replace', concatPath(path, ''), b) ];
  44239. }
  44240. };
  44241. var diff = function(a, b, p){
  44242. if(Immutable.is(a, b)){ return Immutable.List(); }
  44243. if(a != b && (a == null || b == null)){ return Immutable.fromJS([op('replace', '/', b)]); }
  44244. if(isIndexed(a) && isIndexed(b)){
  44245. return Immutable.fromJS(sequenceDiff(a, b));
  44246. }
  44247. else if(isMap(a) && isMap(b)){
  44248. return Immutable.fromJS(mapDiff(a, b));
  44249. }
  44250. else{
  44251. return Immutable.fromJS(primitiveTypeDiff(a, b, p));
  44252. }
  44253. };
  44254. module.exports = diff;
  44255. /***/ }),
  44256. /***/ 55153:
  44257. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  44258. "use strict";
  44259. var Immutable = __webpack_require__(23634);
  44260. /**
  44261. * Returns a two-dimensional array (an array of arrays) with dimensions n by m.
  44262. * All the elements of this new matrix are initially equal to x
  44263. * @param n number of rows
  44264. * @param m number of columns
  44265. * @param x initial element for every item in matrix
  44266. */
  44267. var makeMatrix = function(n, m, x){
  44268. var matrix = [];
  44269. for(var i = 0; i < n; i++) {
  44270. matrix[i] = new Array(m);
  44271. if(x != null){
  44272. for(var j = 0; j < m; j++){
  44273. matrix[i][j] = x;
  44274. }
  44275. }
  44276. }
  44277. return matrix;
  44278. };
  44279. /**
  44280. * Computes Longest Common Subsequence between two Immutable.JS Indexed Iterables
  44281. * Based on Dynamic Programming http://rosettacode.org/wiki/Longest_common_subsequence#Java
  44282. * @param xs ImmutableJS Indexed Sequence 1
  44283. * @param ys ImmutableJS Indexed Sequence 2
  44284. */
  44285. var lcs = function(xs, ys){
  44286. var matrix = computeLcsMatrix(xs, ys);
  44287. return backtrackLcs(xs, ys, matrix);
  44288. };
  44289. var DiffResult = Immutable.Record({op: '=', val: null});
  44290. var ReplaceResult = Immutable.Record({op: '!=', val: null, newVal: null});
  44291. /**
  44292. * Returns the resulting diff operations of LCS between two sequences
  44293. * @param xs Indexed Sequence 1
  44294. * @param ys Indexed Sequence 2
  44295. * @returns Array of DiffResult {op:'=' | '+' | '-', val:any}
  44296. */
  44297. var diff = function(xs, ys){
  44298. var matrix = computeLcsMatrix(xs, ys);
  44299. return printDiff(matrix, xs, ys, xs.size||0, ys.size||0);
  44300. };
  44301. var printDiff = function(matrix, xs, ys, xSize, ySize) {
  44302. var diffArray = [];
  44303. var i = xSize - 1;
  44304. var j = ySize - 1;
  44305. while (i >= 0 || j >= 0) {
  44306. if (i >= 0 && j >= 0 && Immutable.is(xs.get(i), ys.get(j))) {
  44307. diffArray.push(new DiffResult({
  44308. op: '=',
  44309. val: xs.get(i)
  44310. }));
  44311. i -= 1;
  44312. j -= 1;
  44313. }
  44314. else if (i >= 0 && j >= 0 && i === j && !Immutable.is(xs.get(i), ys.get(j))) {
  44315. diffArray.push(new ReplaceResult({
  44316. val: xs.get(i),
  44317. newVal: ys.get(i)
  44318. }));
  44319. i -= 1;
  44320. j -= 1;
  44321. }
  44322. else {
  44323. if (j >= 0 && (i === -1 || matrix[i+1][j] >= matrix[i][j+1])) {
  44324. diffArray.push(new DiffResult({
  44325. op: '+',
  44326. val: ys.get(j)
  44327. }));
  44328. j -= 1;
  44329. }
  44330. else if (i >= 0 && (j === -1 || matrix[i+1][j] < matrix[i][j+1])){
  44331. diffArray.push(new DiffResult({
  44332. op: '-',
  44333. val: xs.get(i)
  44334. }));
  44335. i -= 1;
  44336. }
  44337. }
  44338. }
  44339. return diffArray.reverse();
  44340. };
  44341. /**
  44342. * Computes the Longest Common Subsequence table
  44343. * @param xs Indexed Sequence 1
  44344. * @param ys Indexed Sequence 2
  44345. */
  44346. function computeLcsMatrix(xs, ys) {
  44347. var n = xs.size||0;
  44348. var m = ys.size||0;
  44349. var a = makeMatrix(n + 1, m + 1, 0);
  44350. for (var i = 0; i < n; i++) {
  44351. for (var j = 0; j < m; j++) {
  44352. if (Immutable.is(xs.get(i), ys.get(j))) {
  44353. a[i + 1][j + 1] = a[i][j] + 1;
  44354. }
  44355. else {
  44356. a[i + 1][j + 1] = Math.max(a[i + 1][j], a[i][j + 1]);
  44357. }
  44358. }
  44359. }
  44360. return a;
  44361. }
  44362. /**
  44363. * Extracts a LCS from matrix M
  44364. * @param xs Indexed Sequence 1
  44365. * @param ys Indexed Sequence 2
  44366. * @param matrix LCS Matrix
  44367. * @returns {Array.<T>} Longest Common Subsequence
  44368. */
  44369. var backtrackLcs = function(xs, ys, matrix){
  44370. var lcs = [];
  44371. for(var i = xs.size, j = ys.size; i !== 0 && j !== 0;){
  44372. if (matrix[i][j] === matrix[i-1][j]){ i--; }
  44373. else if (matrix[i][j] === matrix[i][j-1]){ j--; }
  44374. else{
  44375. if(Immutable.is(xs.get(i-1), ys.get(j-1))){
  44376. lcs.push(xs.get(i-1));
  44377. i--;
  44378. j--;
  44379. }
  44380. }
  44381. }
  44382. return lcs.reverse();
  44383. };
  44384. module.exports = {
  44385. lcs: lcs,
  44386. computeLcsMatrix: computeLcsMatrix,
  44387. diff: diff
  44388. };
  44389. /***/ }),
  44390. /***/ 42472:
  44391. /***/ ((module) => {
  44392. "use strict";
  44393. var slashRe = new RegExp('/', 'g');
  44394. var escapedSlashRe = new RegExp('~1', 'g');
  44395. var tildeRe = /~/g;
  44396. var escapedTildeRe = /~0/g;
  44397. var Path = {
  44398. escape: function (str) {
  44399. if(typeof(str) === 'number'){
  44400. return str.toString();
  44401. }
  44402. if(typeof(str) !== 'string'){
  44403. throw 'param str (' + str + ') is not a string';
  44404. }
  44405. return str.replace(tildeRe, '~0').replace(slashRe, '~1');
  44406. },
  44407. unescape: function (str) {
  44408. if(typeof(str) == 'string') {
  44409. return str.replace(escapedSlashRe, '/').replace(escapedTildeRe, '~');
  44410. }
  44411. else {
  44412. return str;
  44413. }
  44414. },
  44415. concat: function(path, key){
  44416. return path + '/' + key;
  44417. }
  44418. };
  44419. module.exports = Path;
  44420. /***/ }),
  44421. /***/ 67129:
  44422. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  44423. "use strict";
  44424. var Immutable = __webpack_require__(23634);
  44425. var isMap = function(obj){ return Immutable.Iterable.isKeyed(obj); };
  44426. var isIndexed = function(obj) { return Immutable.Iterable.isIndexed(obj); };
  44427. var op = function(operation, path, value){
  44428. if(operation === 'remove') { return { op: operation, path: path }; }
  44429. return { op: operation, path: path, value: value };
  44430. };
  44431. module.exports = {
  44432. isMap: isMap,
  44433. isIndexed: isIndexed,
  44434. op: op
  44435. };
  44436. /***/ }),
  44437. /***/ 76252:
  44438. /***/ (function(module, exports, __webpack_require__) {
  44439. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
  44440. * microplugin.js
  44441. * Copyright (c) 2013 Brian Reavis & contributors
  44442. *
  44443. * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
  44444. * file except in compliance with the License. You may obtain a copy of the License at:
  44445. * http://www.apache.org/licenses/LICENSE-2.0
  44446. *
  44447. * Unless required by applicable law or agreed to in writing, software distributed under
  44448. * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
  44449. * ANY KIND, either express or implied. See the License for the specific language
  44450. * governing permissions and limitations under the License.
  44451. *
  44452. * @author Brian Reavis <brian@thirdroute.com>
  44453. */
  44454. (function(root, factory) {
  44455. if (true) {
  44456. !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  44457. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  44458. (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
  44459. __WEBPACK_AMD_DEFINE_FACTORY__),
  44460. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  44461. } else {}
  44462. }(this, function() {
  44463. var MicroPlugin = {};
  44464. MicroPlugin.mixin = function(Interface) {
  44465. Interface.plugins = {};
  44466. /**
  44467. * Initializes the listed plugins (with options).
  44468. * Acceptable formats:
  44469. *
  44470. * List (without options):
  44471. * ['a', 'b', 'c']
  44472. *
  44473. * List (with options):
  44474. * [{'name': 'a', options: {}}, {'name': 'b', options: {}}]
  44475. *
  44476. * Hash (with options):
  44477. * {'a': { ... }, 'b': { ... }, 'c': { ... }}
  44478. *
  44479. * @param {mixed} plugins
  44480. */
  44481. Interface.prototype.initializePlugins = function(plugins) {
  44482. var i, n, key;
  44483. var self = this;
  44484. var queue = [];
  44485. self.plugins = {
  44486. names : [],
  44487. settings : {},
  44488. requested : {},
  44489. loaded : {}
  44490. };
  44491. if (utils.isArray(plugins)) {
  44492. for (i = 0, n = plugins.length; i < n; i++) {
  44493. if (typeof plugins[i] === 'string') {
  44494. queue.push(plugins[i]);
  44495. } else {
  44496. self.plugins.settings[plugins[i].name] = plugins[i].options;
  44497. queue.push(plugins[i].name);
  44498. }
  44499. }
  44500. } else if (plugins) {
  44501. for (key in plugins) {
  44502. if (plugins.hasOwnProperty(key)) {
  44503. self.plugins.settings[key] = plugins[key];
  44504. queue.push(key);
  44505. }
  44506. }
  44507. }
  44508. while (queue.length) {
  44509. self.require(queue.shift());
  44510. }
  44511. };
  44512. Interface.prototype.loadPlugin = function(name) {
  44513. var self = this;
  44514. var plugins = self.plugins;
  44515. var plugin = Interface.plugins[name];
  44516. if (!Interface.plugins.hasOwnProperty(name)) {
  44517. throw new Error('Unable to find "' + name + '" plugin');
  44518. }
  44519. plugins.requested[name] = true;
  44520. plugins.loaded[name] = plugin.fn.apply(self, [self.plugins.settings[name] || {}]);
  44521. plugins.names.push(name);
  44522. };
  44523. /**
  44524. * Initializes a plugin.
  44525. *
  44526. * @param {string} name
  44527. */
  44528. Interface.prototype.require = function(name) {
  44529. var self = this;
  44530. var plugins = self.plugins;
  44531. if (!self.plugins.loaded.hasOwnProperty(name)) {
  44532. if (plugins.requested[name]) {
  44533. throw new Error('Plugin has circular dependency ("' + name + '")');
  44534. }
  44535. self.loadPlugin(name);
  44536. }
  44537. return plugins.loaded[name];
  44538. };
  44539. /**
  44540. * Registers a plugin.
  44541. *
  44542. * @param {string} name
  44543. * @param {function} fn
  44544. */
  44545. Interface.define = function(name, fn) {
  44546. Interface.plugins[name] = {
  44547. 'name' : name,
  44548. 'fn' : fn
  44549. };
  44550. };
  44551. };
  44552. var utils = {
  44553. isArray: Array.isArray || function(vArg) {
  44554. return Object.prototype.toString.call(vArg) === '[object Array]';
  44555. }
  44556. };
  44557. return MicroPlugin;
  44558. }));
  44559. /***/ }),
  44560. /***/ 42786:
  44561. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  44562. //! moment.js locale configuration
  44563. //! locale : Afrikaans [af]
  44564. //! author : Werner Mollentze : https://github.com/wernerm
  44565. ;(function (global, factory) {
  44566. true ? factory(__webpack_require__(30381)) :
  44567. 0
  44568. }(this, (function (moment) { 'use strict';
  44569. //! moment.js locale configuration
  44570. var af = moment.defineLocale('af', {
  44571. months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split(
  44572. '_'
  44573. ),
  44574. monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),
  44575. weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split(
  44576. '_'
  44577. ),
  44578. weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'),
  44579. weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'),
  44580. meridiemParse: /vm|nm/i,
  44581. isPM: function (input) {
  44582. return /^nm$/i.test(input);
  44583. },
  44584. meridiem: function (hours, minutes, isLower) {
  44585. if (hours < 12) {
  44586. return isLower ? 'vm' : 'VM';
  44587. } else {
  44588. return isLower ? 'nm' : 'NM';
  44589. }
  44590. },
  44591. longDateFormat: {
  44592. LT: 'HH:mm',
  44593. LTS: 'HH:mm:ss',
  44594. L: 'DD/MM/YYYY',
  44595. LL: 'D MMMM YYYY',
  44596. LLL: 'D MMMM YYYY HH:mm',
  44597. LLLL: 'dddd, D MMMM YYYY HH:mm',
  44598. },
  44599. calendar: {
  44600. sameDay: '[Vandag om] LT',
  44601. nextDay: '[Môre om] LT',
  44602. nextWeek: 'dddd [om] LT',
  44603. lastDay: '[Gister om] LT',
  44604. lastWeek: '[Laas] dddd [om] LT',
  44605. sameElse: 'L',
  44606. },
  44607. relativeTime: {
  44608. future: 'oor %s',
  44609. past: '%s gelede',
  44610. s: "'n paar sekondes",
  44611. ss: '%d sekondes',
  44612. m: "'n minuut",
  44613. mm: '%d minute',
  44614. h: "'n uur",
  44615. hh: '%d ure',
  44616. d: "'n dag",
  44617. dd: '%d dae',
  44618. M: "'n maand",
  44619. MM: '%d maande',
  44620. y: "'n jaar",
  44621. yy: '%d jaar',
  44622. },
  44623. dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
  44624. ordinal: function (number) {
  44625. return (
  44626. number +
  44627. (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
  44628. ); // Thanks to Joris Röling : https://github.com/jjupiter
  44629. },
  44630. week: {
  44631. dow: 1, // Maandag is die eerste dag van die week.
  44632. doy: 4, // Die week wat die 4de Januarie bevat is die eerste week van die jaar.
  44633. },
  44634. });
  44635. return af;
  44636. })));
  44637. /***/ }),
  44638. /***/ 14130:
  44639. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  44640. //! moment.js locale configuration
  44641. //! locale : Arabic (Algeria) [ar-dz]
  44642. //! author : Amine Roukh: https://github.com/Amine27
  44643. //! author : Abdel Said: https://github.com/abdelsaid
  44644. //! author : Ahmed Elkhatib
  44645. //! author : forabi https://github.com/forabi
  44646. //! author : Noureddine LOUAHEDJ : https://github.com/noureddinem
  44647. ;(function (global, factory) {
  44648. true ? factory(__webpack_require__(30381)) :
  44649. 0
  44650. }(this, (function (moment) { 'use strict';
  44651. //! moment.js locale configuration
  44652. var pluralForm = function (n) {
  44653. return n === 0
  44654. ? 0
  44655. : n === 1
  44656. ? 1
  44657. : n === 2
  44658. ? 2
  44659. : n % 100 >= 3 && n % 100 <= 10
  44660. ? 3
  44661. : n % 100 >= 11
  44662. ? 4
  44663. : 5;
  44664. },
  44665. plurals = {
  44666. s: [
  44667. 'أقل من ثانية',
  44668. 'ثانية واحدة',
  44669. ['ثانيتان', 'ثانيتين'],
  44670. '%d ثوان',
  44671. '%d ثانية',
  44672. '%d ثانية',
  44673. ],
  44674. m: [
  44675. 'أقل من دقيقة',
  44676. 'دقيقة واحدة',
  44677. ['دقيقتان', 'دقيقتين'],
  44678. '%d دقائق',
  44679. '%d دقيقة',
  44680. '%d دقيقة',
  44681. ],
  44682. h: [
  44683. 'أقل من ساعة',
  44684. 'ساعة واحدة',
  44685. ['ساعتان', 'ساعتين'],
  44686. '%d ساعات',
  44687. '%d ساعة',
  44688. '%d ساعة',
  44689. ],
  44690. d: [
  44691. 'أقل من يوم',
  44692. 'يوم واحد',
  44693. ['يومان', 'يومين'],
  44694. '%d أيام',
  44695. '%d يومًا',
  44696. '%d يوم',
  44697. ],
  44698. M: [
  44699. 'أقل من شهر',
  44700. 'شهر واحد',
  44701. ['شهران', 'شهرين'],
  44702. '%d أشهر',
  44703. '%d شهرا',
  44704. '%d شهر',
  44705. ],
  44706. y: [
  44707. 'أقل من عام',
  44708. 'عام واحد',
  44709. ['عامان', 'عامين'],
  44710. '%d أعوام',
  44711. '%d عامًا',
  44712. '%d عام',
  44713. ],
  44714. },
  44715. pluralize = function (u) {
  44716. return function (number, withoutSuffix, string, isFuture) {
  44717. var f = pluralForm(number),
  44718. str = plurals[u][pluralForm(number)];
  44719. if (f === 2) {
  44720. str = str[withoutSuffix ? 0 : 1];
  44721. }
  44722. return str.replace(/%d/i, number);
  44723. };
  44724. },
  44725. months = [
  44726. 'جانفي',
  44727. 'فيفري',
  44728. 'مارس',
  44729. 'أفريل',
  44730. 'ماي',
  44731. 'جوان',
  44732. 'جويلية',
  44733. 'أوت',
  44734. 'سبتمبر',
  44735. 'أكتوبر',
  44736. 'نوفمبر',
  44737. 'ديسمبر',
  44738. ];
  44739. var arDz = moment.defineLocale('ar-dz', {
  44740. months: months,
  44741. monthsShort: months,
  44742. weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  44743. weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
  44744. weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  44745. weekdaysParseExact: true,
  44746. longDateFormat: {
  44747. LT: 'HH:mm',
  44748. LTS: 'HH:mm:ss',
  44749. L: 'D/\u200FM/\u200FYYYY',
  44750. LL: 'D MMMM YYYY',
  44751. LLL: 'D MMMM YYYY HH:mm',
  44752. LLLL: 'dddd D MMMM YYYY HH:mm',
  44753. },
  44754. meridiemParse: /ص|م/,
  44755. isPM: function (input) {
  44756. return 'م' === input;
  44757. },
  44758. meridiem: function (hour, minute, isLower) {
  44759. if (hour < 12) {
  44760. return 'ص';
  44761. } else {
  44762. return 'م';
  44763. }
  44764. },
  44765. calendar: {
  44766. sameDay: '[اليوم عند الساعة] LT',
  44767. nextDay: '[غدًا عند الساعة] LT',
  44768. nextWeek: 'dddd [عند الساعة] LT',
  44769. lastDay: '[أمس عند الساعة] LT',
  44770. lastWeek: 'dddd [عند الساعة] LT',
  44771. sameElse: 'L',
  44772. },
  44773. relativeTime: {
  44774. future: 'بعد %s',
  44775. past: 'منذ %s',
  44776. s: pluralize('s'),
  44777. ss: pluralize('s'),
  44778. m: pluralize('m'),
  44779. mm: pluralize('m'),
  44780. h: pluralize('h'),
  44781. hh: pluralize('h'),
  44782. d: pluralize('d'),
  44783. dd: pluralize('d'),
  44784. M: pluralize('M'),
  44785. MM: pluralize('M'),
  44786. y: pluralize('y'),
  44787. yy: pluralize('y'),
  44788. },
  44789. postformat: function (string) {
  44790. return string.replace(/,/g, '،');
  44791. },
  44792. week: {
  44793. dow: 0, // Sunday is the first day of the week.
  44794. doy: 4, // The week that contains Jan 4th is the first week of the year.
  44795. },
  44796. });
  44797. return arDz;
  44798. })));
  44799. /***/ }),
  44800. /***/ 96135:
  44801. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  44802. //! moment.js locale configuration
  44803. //! locale : Arabic (Kuwait) [ar-kw]
  44804. //! author : Nusret Parlak: https://github.com/nusretparlak
  44805. ;(function (global, factory) {
  44806. true ? factory(__webpack_require__(30381)) :
  44807. 0
  44808. }(this, (function (moment) { 'use strict';
  44809. //! moment.js locale configuration
  44810. var arKw = moment.defineLocale('ar-kw', {
  44811. months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
  44812. '_'
  44813. ),
  44814. monthsShort: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
  44815. '_'
  44816. ),
  44817. weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  44818. weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
  44819. weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  44820. weekdaysParseExact: true,
  44821. longDateFormat: {
  44822. LT: 'HH:mm',
  44823. LTS: 'HH:mm:ss',
  44824. L: 'DD/MM/YYYY',
  44825. LL: 'D MMMM YYYY',
  44826. LLL: 'D MMMM YYYY HH:mm',
  44827. LLLL: 'dddd D MMMM YYYY HH:mm',
  44828. },
  44829. calendar: {
  44830. sameDay: '[اليوم على الساعة] LT',
  44831. nextDay: '[غدا على الساعة] LT',
  44832. nextWeek: 'dddd [على الساعة] LT',
  44833. lastDay: '[أمس على الساعة] LT',
  44834. lastWeek: 'dddd [على الساعة] LT',
  44835. sameElse: 'L',
  44836. },
  44837. relativeTime: {
  44838. future: 'في %s',
  44839. past: 'منذ %s',
  44840. s: 'ثوان',
  44841. ss: '%d ثانية',
  44842. m: 'دقيقة',
  44843. mm: '%d دقائق',
  44844. h: 'ساعة',
  44845. hh: '%d ساعات',
  44846. d: 'يوم',
  44847. dd: '%d أيام',
  44848. M: 'شهر',
  44849. MM: '%d أشهر',
  44850. y: 'سنة',
  44851. yy: '%d سنوات',
  44852. },
  44853. week: {
  44854. dow: 0, // Sunday is the first day of the week.
  44855. doy: 12, // The week that contains Jan 12th is the first week of the year.
  44856. },
  44857. });
  44858. return arKw;
  44859. })));
  44860. /***/ }),
  44861. /***/ 56440:
  44862. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  44863. //! moment.js locale configuration
  44864. //! locale : Arabic (Lybia) [ar-ly]
  44865. //! author : Ali Hmer: https://github.com/kikoanis
  44866. ;(function (global, factory) {
  44867. true ? factory(__webpack_require__(30381)) :
  44868. 0
  44869. }(this, (function (moment) { 'use strict';
  44870. //! moment.js locale configuration
  44871. var symbolMap = {
  44872. 1: '1',
  44873. 2: '2',
  44874. 3: '3',
  44875. 4: '4',
  44876. 5: '5',
  44877. 6: '6',
  44878. 7: '7',
  44879. 8: '8',
  44880. 9: '9',
  44881. 0: '0',
  44882. },
  44883. pluralForm = function (n) {
  44884. return n === 0
  44885. ? 0
  44886. : n === 1
  44887. ? 1
  44888. : n === 2
  44889. ? 2
  44890. : n % 100 >= 3 && n % 100 <= 10
  44891. ? 3
  44892. : n % 100 >= 11
  44893. ? 4
  44894. : 5;
  44895. },
  44896. plurals = {
  44897. s: [
  44898. 'أقل من ثانية',
  44899. 'ثانية واحدة',
  44900. ['ثانيتان', 'ثانيتين'],
  44901. '%d ثوان',
  44902. '%d ثانية',
  44903. '%d ثانية',
  44904. ],
  44905. m: [
  44906. 'أقل من دقيقة',
  44907. 'دقيقة واحدة',
  44908. ['دقيقتان', 'دقيقتين'],
  44909. '%d دقائق',
  44910. '%d دقيقة',
  44911. '%d دقيقة',
  44912. ],
  44913. h: [
  44914. 'أقل من ساعة',
  44915. 'ساعة واحدة',
  44916. ['ساعتان', 'ساعتين'],
  44917. '%d ساعات',
  44918. '%d ساعة',
  44919. '%d ساعة',
  44920. ],
  44921. d: [
  44922. 'أقل من يوم',
  44923. 'يوم واحد',
  44924. ['يومان', 'يومين'],
  44925. '%d أيام',
  44926. '%d يومًا',
  44927. '%d يوم',
  44928. ],
  44929. M: [
  44930. 'أقل من شهر',
  44931. 'شهر واحد',
  44932. ['شهران', 'شهرين'],
  44933. '%d أشهر',
  44934. '%d شهرا',
  44935. '%d شهر',
  44936. ],
  44937. y: [
  44938. 'أقل من عام',
  44939. 'عام واحد',
  44940. ['عامان', 'عامين'],
  44941. '%d أعوام',
  44942. '%d عامًا',
  44943. '%d عام',
  44944. ],
  44945. },
  44946. pluralize = function (u) {
  44947. return function (number, withoutSuffix, string, isFuture) {
  44948. var f = pluralForm(number),
  44949. str = plurals[u][pluralForm(number)];
  44950. if (f === 2) {
  44951. str = str[withoutSuffix ? 0 : 1];
  44952. }
  44953. return str.replace(/%d/i, number);
  44954. };
  44955. },
  44956. months = [
  44957. 'يناير',
  44958. 'فبراير',
  44959. 'مارس',
  44960. 'أبريل',
  44961. 'مايو',
  44962. 'يونيو',
  44963. 'يوليو',
  44964. 'أغسطس',
  44965. 'سبتمبر',
  44966. 'أكتوبر',
  44967. 'نوفمبر',
  44968. 'ديسمبر',
  44969. ];
  44970. var arLy = moment.defineLocale('ar-ly', {
  44971. months: months,
  44972. monthsShort: months,
  44973. weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  44974. weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
  44975. weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  44976. weekdaysParseExact: true,
  44977. longDateFormat: {
  44978. LT: 'HH:mm',
  44979. LTS: 'HH:mm:ss',
  44980. L: 'D/\u200FM/\u200FYYYY',
  44981. LL: 'D MMMM YYYY',
  44982. LLL: 'D MMMM YYYY HH:mm',
  44983. LLLL: 'dddd D MMMM YYYY HH:mm',
  44984. },
  44985. meridiemParse: /ص|م/,
  44986. isPM: function (input) {
  44987. return 'م' === input;
  44988. },
  44989. meridiem: function (hour, minute, isLower) {
  44990. if (hour < 12) {
  44991. return 'ص';
  44992. } else {
  44993. return 'م';
  44994. }
  44995. },
  44996. calendar: {
  44997. sameDay: '[اليوم عند الساعة] LT',
  44998. nextDay: '[غدًا عند الساعة] LT',
  44999. nextWeek: 'dddd [عند الساعة] LT',
  45000. lastDay: '[أمس عند الساعة] LT',
  45001. lastWeek: 'dddd [عند الساعة] LT',
  45002. sameElse: 'L',
  45003. },
  45004. relativeTime: {
  45005. future: 'بعد %s',
  45006. past: 'منذ %s',
  45007. s: pluralize('s'),
  45008. ss: pluralize('s'),
  45009. m: pluralize('m'),
  45010. mm: pluralize('m'),
  45011. h: pluralize('h'),
  45012. hh: pluralize('h'),
  45013. d: pluralize('d'),
  45014. dd: pluralize('d'),
  45015. M: pluralize('M'),
  45016. MM: pluralize('M'),
  45017. y: pluralize('y'),
  45018. yy: pluralize('y'),
  45019. },
  45020. preparse: function (string) {
  45021. return string.replace(/،/g, ',');
  45022. },
  45023. postformat: function (string) {
  45024. return string
  45025. .replace(/\d/g, function (match) {
  45026. return symbolMap[match];
  45027. })
  45028. .replace(/,/g, '،');
  45029. },
  45030. week: {
  45031. dow: 6, // Saturday is the first day of the week.
  45032. doy: 12, // The week that contains Jan 12th is the first week of the year.
  45033. },
  45034. });
  45035. return arLy;
  45036. })));
  45037. /***/ }),
  45038. /***/ 47702:
  45039. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  45040. //! moment.js locale configuration
  45041. //! locale : Arabic (Morocco) [ar-ma]
  45042. //! author : ElFadili Yassine : https://github.com/ElFadiliY
  45043. //! author : Abdel Said : https://github.com/abdelsaid
  45044. ;(function (global, factory) {
  45045. true ? factory(__webpack_require__(30381)) :
  45046. 0
  45047. }(this, (function (moment) { 'use strict';
  45048. //! moment.js locale configuration
  45049. var arMa = moment.defineLocale('ar-ma', {
  45050. months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
  45051. '_'
  45052. ),
  45053. monthsShort: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
  45054. '_'
  45055. ),
  45056. weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  45057. weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
  45058. weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  45059. weekdaysParseExact: true,
  45060. longDateFormat: {
  45061. LT: 'HH:mm',
  45062. LTS: 'HH:mm:ss',
  45063. L: 'DD/MM/YYYY',
  45064. LL: 'D MMMM YYYY',
  45065. LLL: 'D MMMM YYYY HH:mm',
  45066. LLLL: 'dddd D MMMM YYYY HH:mm',
  45067. },
  45068. calendar: {
  45069. sameDay: '[اليوم على الساعة] LT',
  45070. nextDay: '[غدا على الساعة] LT',
  45071. nextWeek: 'dddd [على الساعة] LT',
  45072. lastDay: '[أمس على الساعة] LT',
  45073. lastWeek: 'dddd [على الساعة] LT',
  45074. sameElse: 'L',
  45075. },
  45076. relativeTime: {
  45077. future: 'في %s',
  45078. past: 'منذ %s',
  45079. s: 'ثوان',
  45080. ss: '%d ثانية',
  45081. m: 'دقيقة',
  45082. mm: '%d دقائق',
  45083. h: 'ساعة',
  45084. hh: '%d ساعات',
  45085. d: 'يوم',
  45086. dd: '%d أيام',
  45087. M: 'شهر',
  45088. MM: '%d أشهر',
  45089. y: 'سنة',
  45090. yy: '%d سنوات',
  45091. },
  45092. week: {
  45093. dow: 1, // Monday is the first day of the week.
  45094. doy: 4, // The week that contains Jan 4th is the first week of the year.
  45095. },
  45096. });
  45097. return arMa;
  45098. })));
  45099. /***/ }),
  45100. /***/ 16040:
  45101. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  45102. //! moment.js locale configuration
  45103. //! locale : Arabic (Saudi Arabia) [ar-sa]
  45104. //! author : Suhail Alkowaileet : https://github.com/xsoh
  45105. ;(function (global, factory) {
  45106. true ? factory(__webpack_require__(30381)) :
  45107. 0
  45108. }(this, (function (moment) { 'use strict';
  45109. //! moment.js locale configuration
  45110. var symbolMap = {
  45111. 1: '١',
  45112. 2: '٢',
  45113. 3: '٣',
  45114. 4: '٤',
  45115. 5: '٥',
  45116. 6: '٦',
  45117. 7: '٧',
  45118. 8: '٨',
  45119. 9: '٩',
  45120. 0: '٠',
  45121. },
  45122. numberMap = {
  45123. '١': '1',
  45124. '٢': '2',
  45125. '٣': '3',
  45126. '٤': '4',
  45127. '٥': '5',
  45128. '٦': '6',
  45129. '٧': '7',
  45130. '٨': '8',
  45131. '٩': '9',
  45132. '٠': '0',
  45133. };
  45134. var arSa = moment.defineLocale('ar-sa', {
  45135. months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
  45136. '_'
  45137. ),
  45138. monthsShort: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
  45139. '_'
  45140. ),
  45141. weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  45142. weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
  45143. weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  45144. weekdaysParseExact: true,
  45145. longDateFormat: {
  45146. LT: 'HH:mm',
  45147. LTS: 'HH:mm:ss',
  45148. L: 'DD/MM/YYYY',
  45149. LL: 'D MMMM YYYY',
  45150. LLL: 'D MMMM YYYY HH:mm',
  45151. LLLL: 'dddd D MMMM YYYY HH:mm',
  45152. },
  45153. meridiemParse: /ص|م/,
  45154. isPM: function (input) {
  45155. return 'م' === input;
  45156. },
  45157. meridiem: function (hour, minute, isLower) {
  45158. if (hour < 12) {
  45159. return 'ص';
  45160. } else {
  45161. return 'م';
  45162. }
  45163. },
  45164. calendar: {
  45165. sameDay: '[اليوم على الساعة] LT',
  45166. nextDay: '[غدا على الساعة] LT',
  45167. nextWeek: 'dddd [على الساعة] LT',
  45168. lastDay: '[أمس على الساعة] LT',
  45169. lastWeek: 'dddd [على الساعة] LT',
  45170. sameElse: 'L',
  45171. },
  45172. relativeTime: {
  45173. future: 'في %s',
  45174. past: 'منذ %s',
  45175. s: 'ثوان',
  45176. ss: '%d ثانية',
  45177. m: 'دقيقة',
  45178. mm: '%d دقائق',
  45179. h: 'ساعة',
  45180. hh: '%d ساعات',
  45181. d: 'يوم',
  45182. dd: '%d أيام',
  45183. M: 'شهر',
  45184. MM: '%d أشهر',
  45185. y: 'سنة',
  45186. yy: '%d سنوات',
  45187. },
  45188. preparse: function (string) {
  45189. return string
  45190. .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
  45191. return numberMap[match];
  45192. })
  45193. .replace(/،/g, ',');
  45194. },
  45195. postformat: function (string) {
  45196. return string
  45197. .replace(/\d/g, function (match) {
  45198. return symbolMap[match];
  45199. })
  45200. .replace(/,/g, '،');
  45201. },
  45202. week: {
  45203. dow: 0, // Sunday is the first day of the week.
  45204. doy: 6, // The week that contains Jan 6th is the first week of the year.
  45205. },
  45206. });
  45207. return arSa;
  45208. })));
  45209. /***/ }),
  45210. /***/ 37100:
  45211. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  45212. //! moment.js locale configuration
  45213. //! locale : Arabic (Tunisia) [ar-tn]
  45214. //! author : Nader Toukabri : https://github.com/naderio
  45215. ;(function (global, factory) {
  45216. true ? factory(__webpack_require__(30381)) :
  45217. 0
  45218. }(this, (function (moment) { 'use strict';
  45219. //! moment.js locale configuration
  45220. var arTn = moment.defineLocale('ar-tn', {
  45221. months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
  45222. '_'
  45223. ),
  45224. monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
  45225. '_'
  45226. ),
  45227. weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  45228. weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
  45229. weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  45230. weekdaysParseExact: true,
  45231. longDateFormat: {
  45232. LT: 'HH:mm',
  45233. LTS: 'HH:mm:ss',
  45234. L: 'DD/MM/YYYY',
  45235. LL: 'D MMMM YYYY',
  45236. LLL: 'D MMMM YYYY HH:mm',
  45237. LLLL: 'dddd D MMMM YYYY HH:mm',
  45238. },
  45239. calendar: {
  45240. sameDay: '[اليوم على الساعة] LT',
  45241. nextDay: '[غدا على الساعة] LT',
  45242. nextWeek: 'dddd [على الساعة] LT',
  45243. lastDay: '[أمس على الساعة] LT',
  45244. lastWeek: 'dddd [على الساعة] LT',
  45245. sameElse: 'L',
  45246. },
  45247. relativeTime: {
  45248. future: 'في %s',
  45249. past: 'منذ %s',
  45250. s: 'ثوان',
  45251. ss: '%d ثانية',
  45252. m: 'دقيقة',
  45253. mm: '%d دقائق',
  45254. h: 'ساعة',
  45255. hh: '%d ساعات',
  45256. d: 'يوم',
  45257. dd: '%d أيام',
  45258. M: 'شهر',
  45259. MM: '%d أشهر',
  45260. y: 'سنة',
  45261. yy: '%d سنوات',
  45262. },
  45263. week: {
  45264. dow: 1, // Monday is the first day of the week.
  45265. doy: 4, // The week that contains Jan 4th is the first week of the year.
  45266. },
  45267. });
  45268. return arTn;
  45269. })));
  45270. /***/ }),
  45271. /***/ 30867:
  45272. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  45273. //! moment.js locale configuration
  45274. //! locale : Arabic [ar]
  45275. //! author : Abdel Said: https://github.com/abdelsaid
  45276. //! author : Ahmed Elkhatib
  45277. //! author : forabi https://github.com/forabi
  45278. ;(function (global, factory) {
  45279. true ? factory(__webpack_require__(30381)) :
  45280. 0
  45281. }(this, (function (moment) { 'use strict';
  45282. //! moment.js locale configuration
  45283. var symbolMap = {
  45284. 1: '١',
  45285. 2: '٢',
  45286. 3: '٣',
  45287. 4: '٤',
  45288. 5: '٥',
  45289. 6: '٦',
  45290. 7: '٧',
  45291. 8: '٨',
  45292. 9: '٩',
  45293. 0: '٠',
  45294. },
  45295. numberMap = {
  45296. '١': '1',
  45297. '٢': '2',
  45298. '٣': '3',
  45299. '٤': '4',
  45300. '٥': '5',
  45301. '٦': '6',
  45302. '٧': '7',
  45303. '٨': '8',
  45304. '٩': '9',
  45305. '٠': '0',
  45306. },
  45307. pluralForm = function (n) {
  45308. return n === 0
  45309. ? 0
  45310. : n === 1
  45311. ? 1
  45312. : n === 2
  45313. ? 2
  45314. : n % 100 >= 3 && n % 100 <= 10
  45315. ? 3
  45316. : n % 100 >= 11
  45317. ? 4
  45318. : 5;
  45319. },
  45320. plurals = {
  45321. s: [
  45322. 'أقل من ثانية',
  45323. 'ثانية واحدة',
  45324. ['ثانيتان', 'ثانيتين'],
  45325. '%d ثوان',
  45326. '%d ثانية',
  45327. '%d ثانية',
  45328. ],
  45329. m: [
  45330. 'أقل من دقيقة',
  45331. 'دقيقة واحدة',
  45332. ['دقيقتان', 'دقيقتين'],
  45333. '%d دقائق',
  45334. '%d دقيقة',
  45335. '%d دقيقة',
  45336. ],
  45337. h: [
  45338. 'أقل من ساعة',
  45339. 'ساعة واحدة',
  45340. ['ساعتان', 'ساعتين'],
  45341. '%d ساعات',
  45342. '%d ساعة',
  45343. '%d ساعة',
  45344. ],
  45345. d: [
  45346. 'أقل من يوم',
  45347. 'يوم واحد',
  45348. ['يومان', 'يومين'],
  45349. '%d أيام',
  45350. '%d يومًا',
  45351. '%d يوم',
  45352. ],
  45353. M: [
  45354. 'أقل من شهر',
  45355. 'شهر واحد',
  45356. ['شهران', 'شهرين'],
  45357. '%d أشهر',
  45358. '%d شهرا',
  45359. '%d شهر',
  45360. ],
  45361. y: [
  45362. 'أقل من عام',
  45363. 'عام واحد',
  45364. ['عامان', 'عامين'],
  45365. '%d أعوام',
  45366. '%d عامًا',
  45367. '%d عام',
  45368. ],
  45369. },
  45370. pluralize = function (u) {
  45371. return function (number, withoutSuffix, string, isFuture) {
  45372. var f = pluralForm(number),
  45373. str = plurals[u][pluralForm(number)];
  45374. if (f === 2) {
  45375. str = str[withoutSuffix ? 0 : 1];
  45376. }
  45377. return str.replace(/%d/i, number);
  45378. };
  45379. },
  45380. months = [
  45381. 'يناير',
  45382. 'فبراير',
  45383. 'مارس',
  45384. 'أبريل',
  45385. 'مايو',
  45386. 'يونيو',
  45387. 'يوليو',
  45388. 'أغسطس',
  45389. 'سبتمبر',
  45390. 'أكتوبر',
  45391. 'نوفمبر',
  45392. 'ديسمبر',
  45393. ];
  45394. var ar = moment.defineLocale('ar', {
  45395. months: months,
  45396. monthsShort: months,
  45397. weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  45398. weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
  45399. weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  45400. weekdaysParseExact: true,
  45401. longDateFormat: {
  45402. LT: 'HH:mm',
  45403. LTS: 'HH:mm:ss',
  45404. L: 'D/\u200FM/\u200FYYYY',
  45405. LL: 'D MMMM YYYY',
  45406. LLL: 'D MMMM YYYY HH:mm',
  45407. LLLL: 'dddd D MMMM YYYY HH:mm',
  45408. },
  45409. meridiemParse: /ص|م/,
  45410. isPM: function (input) {
  45411. return 'م' === input;
  45412. },
  45413. meridiem: function (hour, minute, isLower) {
  45414. if (hour < 12) {
  45415. return 'ص';
  45416. } else {
  45417. return 'م';
  45418. }
  45419. },
  45420. calendar: {
  45421. sameDay: '[اليوم عند الساعة] LT',
  45422. nextDay: '[غدًا عند الساعة] LT',
  45423. nextWeek: 'dddd [عند الساعة] LT',
  45424. lastDay: '[أمس عند الساعة] LT',
  45425. lastWeek: 'dddd [عند الساعة] LT',
  45426. sameElse: 'L',
  45427. },
  45428. relativeTime: {
  45429. future: 'بعد %s',
  45430. past: 'منذ %s',
  45431. s: pluralize('s'),
  45432. ss: pluralize('s'),
  45433. m: pluralize('m'),
  45434. mm: pluralize('m'),
  45435. h: pluralize('h'),
  45436. hh: pluralize('h'),
  45437. d: pluralize('d'),
  45438. dd: pluralize('d'),
  45439. M: pluralize('M'),
  45440. MM: pluralize('M'),
  45441. y: pluralize('y'),
  45442. yy: pluralize('y'),
  45443. },
  45444. preparse: function (string) {
  45445. return string
  45446. .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
  45447. return numberMap[match];
  45448. })
  45449. .replace(/،/g, ',');
  45450. },
  45451. postformat: function (string) {
  45452. return string
  45453. .replace(/\d/g, function (match) {
  45454. return symbolMap[match];
  45455. })
  45456. .replace(/,/g, '،');
  45457. },
  45458. week: {
  45459. dow: 6, // Saturday is the first day of the week.
  45460. doy: 12, // The week that contains Jan 12th is the first week of the year.
  45461. },
  45462. });
  45463. return ar;
  45464. })));
  45465. /***/ }),
  45466. /***/ 31083:
  45467. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  45468. //! moment.js locale configuration
  45469. //! locale : Azerbaijani [az]
  45470. //! author : topchiyev : https://github.com/topchiyev
  45471. ;(function (global, factory) {
  45472. true ? factory(__webpack_require__(30381)) :
  45473. 0
  45474. }(this, (function (moment) { 'use strict';
  45475. //! moment.js locale configuration
  45476. var suffixes = {
  45477. 1: '-inci',
  45478. 5: '-inci',
  45479. 8: '-inci',
  45480. 70: '-inci',
  45481. 80: '-inci',
  45482. 2: '-nci',
  45483. 7: '-nci',
  45484. 20: '-nci',
  45485. 50: '-nci',
  45486. 3: '-üncü',
  45487. 4: '-üncü',
  45488. 100: '-üncü',
  45489. 6: '-ncı',
  45490. 9: '-uncu',
  45491. 10: '-uncu',
  45492. 30: '-uncu',
  45493. 60: '-ıncı',
  45494. 90: '-ıncı',
  45495. };
  45496. var az = moment.defineLocale('az', {
  45497. months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split(
  45498. '_'
  45499. ),
  45500. monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),
  45501. weekdays: 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split(
  45502. '_'
  45503. ),
  45504. weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),
  45505. weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),
  45506. weekdaysParseExact: true,
  45507. longDateFormat: {
  45508. LT: 'HH:mm',
  45509. LTS: 'HH:mm:ss',
  45510. L: 'DD.MM.YYYY',
  45511. LL: 'D MMMM YYYY',
  45512. LLL: 'D MMMM YYYY HH:mm',
  45513. LLLL: 'dddd, D MMMM YYYY HH:mm',
  45514. },
  45515. calendar: {
  45516. sameDay: '[bugün saat] LT',
  45517. nextDay: '[sabah saat] LT',
  45518. nextWeek: '[gələn həftə] dddd [saat] LT',
  45519. lastDay: '[dünən] LT',
  45520. lastWeek: '[keçən həftə] dddd [saat] LT',
  45521. sameElse: 'L',
  45522. },
  45523. relativeTime: {
  45524. future: '%s sonra',
  45525. past: '%s əvvəl',
  45526. s: 'bir neçə saniyə',
  45527. ss: '%d saniyə',
  45528. m: 'bir dəqiqə',
  45529. mm: '%d dəqiqə',
  45530. h: 'bir saat',
  45531. hh: '%d saat',
  45532. d: 'bir gün',
  45533. dd: '%d gün',
  45534. M: 'bir ay',
  45535. MM: '%d ay',
  45536. y: 'bir il',
  45537. yy: '%d il',
  45538. },
  45539. meridiemParse: /gecə|səhər|gündüz|axşam/,
  45540. isPM: function (input) {
  45541. return /^(gündüz|axşam)$/.test(input);
  45542. },
  45543. meridiem: function (hour, minute, isLower) {
  45544. if (hour < 4) {
  45545. return 'gecə';
  45546. } else if (hour < 12) {
  45547. return 'səhər';
  45548. } else if (hour < 17) {
  45549. return 'gündüz';
  45550. } else {
  45551. return 'axşam';
  45552. }
  45553. },
  45554. dayOfMonthOrdinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,
  45555. ordinal: function (number) {
  45556. if (number === 0) {
  45557. // special case for zero
  45558. return number + '-ıncı';
  45559. }
  45560. var a = number % 10,
  45561. b = (number % 100) - a,
  45562. c = number >= 100 ? 100 : null;
  45563. return number + (suffixes[a] || suffixes[b] || suffixes[c]);
  45564. },
  45565. week: {
  45566. dow: 1, // Monday is the first day of the week.
  45567. doy: 7, // The week that contains Jan 7th is the first week of the year.
  45568. },
  45569. });
  45570. return az;
  45571. })));
  45572. /***/ }),
  45573. /***/ 9808:
  45574. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  45575. //! moment.js locale configuration
  45576. //! locale : Belarusian [be]
  45577. //! author : Dmitry Demidov : https://github.com/demidov91
  45578. //! author: Praleska: http://praleska.pro/
  45579. //! Author : Menelion Elensúle : https://github.com/Oire
  45580. ;(function (global, factory) {
  45581. true ? factory(__webpack_require__(30381)) :
  45582. 0
  45583. }(this, (function (moment) { 'use strict';
  45584. //! moment.js locale configuration
  45585. function plural(word, num) {
  45586. var forms = word.split('_');
  45587. return num % 10 === 1 && num % 100 !== 11
  45588. ? forms[0]
  45589. : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
  45590. ? forms[1]
  45591. : forms[2];
  45592. }
  45593. function relativeTimeWithPlural(number, withoutSuffix, key) {
  45594. var format = {
  45595. ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',
  45596. mm: withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',
  45597. hh: withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',
  45598. dd: 'дзень_дні_дзён',
  45599. MM: 'месяц_месяцы_месяцаў',
  45600. yy: 'год_гады_гадоў',
  45601. };
  45602. if (key === 'm') {
  45603. return withoutSuffix ? 'хвіліна' : 'хвіліну';
  45604. } else if (key === 'h') {
  45605. return withoutSuffix ? 'гадзіна' : 'гадзіну';
  45606. } else {
  45607. return number + ' ' + plural(format[key], +number);
  45608. }
  45609. }
  45610. var be = moment.defineLocale('be', {
  45611. months: {
  45612. format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split(
  45613. '_'
  45614. ),
  45615. standalone: 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split(
  45616. '_'
  45617. ),
  45618. },
  45619. monthsShort: 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split(
  45620. '_'
  45621. ),
  45622. weekdays: {
  45623. format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split(
  45624. '_'
  45625. ),
  45626. standalone: 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split(
  45627. '_'
  45628. ),
  45629. isFormat: /\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/,
  45630. },
  45631. weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
  45632. weekdaysMin: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
  45633. longDateFormat: {
  45634. LT: 'HH:mm',
  45635. LTS: 'HH:mm:ss',
  45636. L: 'DD.MM.YYYY',
  45637. LL: 'D MMMM YYYY г.',
  45638. LLL: 'D MMMM YYYY г., HH:mm',
  45639. LLLL: 'dddd, D MMMM YYYY г., HH:mm',
  45640. },
  45641. calendar: {
  45642. sameDay: '[Сёння ў] LT',
  45643. nextDay: '[Заўтра ў] LT',
  45644. lastDay: '[Учора ў] LT',
  45645. nextWeek: function () {
  45646. return '[У] dddd [ў] LT';
  45647. },
  45648. lastWeek: function () {
  45649. switch (this.day()) {
  45650. case 0:
  45651. case 3:
  45652. case 5:
  45653. case 6:
  45654. return '[У мінулую] dddd [ў] LT';
  45655. case 1:
  45656. case 2:
  45657. case 4:
  45658. return '[У мінулы] dddd [ў] LT';
  45659. }
  45660. },
  45661. sameElse: 'L',
  45662. },
  45663. relativeTime: {
  45664. future: 'праз %s',
  45665. past: '%s таму',
  45666. s: 'некалькі секунд',
  45667. m: relativeTimeWithPlural,
  45668. mm: relativeTimeWithPlural,
  45669. h: relativeTimeWithPlural,
  45670. hh: relativeTimeWithPlural,
  45671. d: 'дзень',
  45672. dd: relativeTimeWithPlural,
  45673. M: 'месяц',
  45674. MM: relativeTimeWithPlural,
  45675. y: 'год',
  45676. yy: relativeTimeWithPlural,
  45677. },
  45678. meridiemParse: /ночы|раніцы|дня|вечара/,
  45679. isPM: function (input) {
  45680. return /^(дня|вечара)$/.test(input);
  45681. },
  45682. meridiem: function (hour, minute, isLower) {
  45683. if (hour < 4) {
  45684. return 'ночы';
  45685. } else if (hour < 12) {
  45686. return 'раніцы';
  45687. } else if (hour < 17) {
  45688. return 'дня';
  45689. } else {
  45690. return 'вечара';
  45691. }
  45692. },
  45693. dayOfMonthOrdinalParse: /\d{1,2}-(і|ы|га)/,
  45694. ordinal: function (number, period) {
  45695. switch (period) {
  45696. case 'M':
  45697. case 'd':
  45698. case 'DDD':
  45699. case 'w':
  45700. case 'W':
  45701. return (number % 10 === 2 || number % 10 === 3) &&
  45702. number % 100 !== 12 &&
  45703. number % 100 !== 13
  45704. ? number + '-і'
  45705. : number + '-ы';
  45706. case 'D':
  45707. return number + '-га';
  45708. default:
  45709. return number;
  45710. }
  45711. },
  45712. week: {
  45713. dow: 1, // Monday is the first day of the week.
  45714. doy: 7, // The week that contains Jan 7th is the first week of the year.
  45715. },
  45716. });
  45717. return be;
  45718. })));
  45719. /***/ }),
  45720. /***/ 68338:
  45721. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  45722. //! moment.js locale configuration
  45723. //! locale : Bulgarian [bg]
  45724. //! author : Krasen Borisov : https://github.com/kraz
  45725. ;(function (global, factory) {
  45726. true ? factory(__webpack_require__(30381)) :
  45727. 0
  45728. }(this, (function (moment) { 'use strict';
  45729. //! moment.js locale configuration
  45730. var bg = moment.defineLocale('bg', {
  45731. months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split(
  45732. '_'
  45733. ),
  45734. monthsShort: 'яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),
  45735. weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split(
  45736. '_'
  45737. ),
  45738. weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'),
  45739. weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
  45740. longDateFormat: {
  45741. LT: 'H:mm',
  45742. LTS: 'H:mm:ss',
  45743. L: 'D.MM.YYYY',
  45744. LL: 'D MMMM YYYY',
  45745. LLL: 'D MMMM YYYY H:mm',
  45746. LLLL: 'dddd, D MMMM YYYY H:mm',
  45747. },
  45748. calendar: {
  45749. sameDay: '[Днес в] LT',
  45750. nextDay: '[Утре в] LT',
  45751. nextWeek: 'dddd [в] LT',
  45752. lastDay: '[Вчера в] LT',
  45753. lastWeek: function () {
  45754. switch (this.day()) {
  45755. case 0:
  45756. case 3:
  45757. case 6:
  45758. return '[Миналата] dddd [в] LT';
  45759. case 1:
  45760. case 2:
  45761. case 4:
  45762. case 5:
  45763. return '[Миналия] dddd [в] LT';
  45764. }
  45765. },
  45766. sameElse: 'L',
  45767. },
  45768. relativeTime: {
  45769. future: 'след %s',
  45770. past: 'преди %s',
  45771. s: 'няколко секунди',
  45772. ss: '%d секунди',
  45773. m: 'минута',
  45774. mm: '%d минути',
  45775. h: 'час',
  45776. hh: '%d часа',
  45777. d: 'ден',
  45778. dd: '%d дена',
  45779. w: 'седмица',
  45780. ww: '%d седмици',
  45781. M: 'месец',
  45782. MM: '%d месеца',
  45783. y: 'година',
  45784. yy: '%d години',
  45785. },
  45786. dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
  45787. ordinal: function (number) {
  45788. var lastDigit = number % 10,
  45789. last2Digits = number % 100;
  45790. if (number === 0) {
  45791. return number + '-ев';
  45792. } else if (last2Digits === 0) {
  45793. return number + '-ен';
  45794. } else if (last2Digits > 10 && last2Digits < 20) {
  45795. return number + '-ти';
  45796. } else if (lastDigit === 1) {
  45797. return number + '-ви';
  45798. } else if (lastDigit === 2) {
  45799. return number + '-ри';
  45800. } else if (lastDigit === 7 || lastDigit === 8) {
  45801. return number + '-ми';
  45802. } else {
  45803. return number + '-ти';
  45804. }
  45805. },
  45806. week: {
  45807. dow: 1, // Monday is the first day of the week.
  45808. doy: 7, // The week that contains Jan 7th is the first week of the year.
  45809. },
  45810. });
  45811. return bg;
  45812. })));
  45813. /***/ }),
  45814. /***/ 67438:
  45815. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  45816. //! moment.js locale configuration
  45817. //! locale : Bambara [bm]
  45818. //! author : Estelle Comment : https://github.com/estellecomment
  45819. ;(function (global, factory) {
  45820. true ? factory(__webpack_require__(30381)) :
  45821. 0
  45822. }(this, (function (moment) { 'use strict';
  45823. //! moment.js locale configuration
  45824. var bm = moment.defineLocale('bm', {
  45825. months: 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split(
  45826. '_'
  45827. ),
  45828. monthsShort: 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'),
  45829. weekdays: 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'),
  45830. weekdaysShort: 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'),
  45831. weekdaysMin: 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'),
  45832. longDateFormat: {
  45833. LT: 'HH:mm',
  45834. LTS: 'HH:mm:ss',
  45835. L: 'DD/MM/YYYY',
  45836. LL: 'MMMM [tile] D [san] YYYY',
  45837. LLL: 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',
  45838. LLLL: 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',
  45839. },
  45840. calendar: {
  45841. sameDay: '[Bi lɛrɛ] LT',
  45842. nextDay: '[Sini lɛrɛ] LT',
  45843. nextWeek: 'dddd [don lɛrɛ] LT',
  45844. lastDay: '[Kunu lɛrɛ] LT',
  45845. lastWeek: 'dddd [tɛmɛnen lɛrɛ] LT',
  45846. sameElse: 'L',
  45847. },
  45848. relativeTime: {
  45849. future: '%s kɔnɔ',
  45850. past: 'a bɛ %s bɔ',
  45851. s: 'sanga dama dama',
  45852. ss: 'sekondi %d',
  45853. m: 'miniti kelen',
  45854. mm: 'miniti %d',
  45855. h: 'lɛrɛ kelen',
  45856. hh: 'lɛrɛ %d',
  45857. d: 'tile kelen',
  45858. dd: 'tile %d',
  45859. M: 'kalo kelen',
  45860. MM: 'kalo %d',
  45861. y: 'san kelen',
  45862. yy: 'san %d',
  45863. },
  45864. week: {
  45865. dow: 1, // Monday is the first day of the week.
  45866. doy: 4, // The week that contains Jan 4th is the first week of the year.
  45867. },
  45868. });
  45869. return bm;
  45870. })));
  45871. /***/ }),
  45872. /***/ 76225:
  45873. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  45874. //! moment.js locale configuration
  45875. //! locale : Bengali (Bangladesh) [bn-bd]
  45876. //! author : Asraf Hossain Patoary : https://github.com/ashwoolford
  45877. ;(function (global, factory) {
  45878. true ? factory(__webpack_require__(30381)) :
  45879. 0
  45880. }(this, (function (moment) { 'use strict';
  45881. //! moment.js locale configuration
  45882. var symbolMap = {
  45883. 1: '১',
  45884. 2: '২',
  45885. 3: '৩',
  45886. 4: '৪',
  45887. 5: '৫',
  45888. 6: '৬',
  45889. 7: '৭',
  45890. 8: '৮',
  45891. 9: '৯',
  45892. 0: '০',
  45893. },
  45894. numberMap = {
  45895. '১': '1',
  45896. '২': '2',
  45897. '৩': '3',
  45898. '৪': '4',
  45899. '৫': '5',
  45900. '৬': '6',
  45901. '৭': '7',
  45902. '৮': '8',
  45903. '৯': '9',
  45904. '০': '0',
  45905. };
  45906. var bnBd = moment.defineLocale('bn-bd', {
  45907. months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(
  45908. '_'
  45909. ),
  45910. monthsShort: 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(
  45911. '_'
  45912. ),
  45913. weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(
  45914. '_'
  45915. ),
  45916. weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),
  45917. weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),
  45918. longDateFormat: {
  45919. LT: 'A h:mm সময়',
  45920. LTS: 'A h:mm:ss সময়',
  45921. L: 'DD/MM/YYYY',
  45922. LL: 'D MMMM YYYY',
  45923. LLL: 'D MMMM YYYY, A h:mm সময়',
  45924. LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',
  45925. },
  45926. calendar: {
  45927. sameDay: '[আজ] LT',
  45928. nextDay: '[আগামীকাল] LT',
  45929. nextWeek: 'dddd, LT',
  45930. lastDay: '[গতকাল] LT',
  45931. lastWeek: '[গত] dddd, LT',
  45932. sameElse: 'L',
  45933. },
  45934. relativeTime: {
  45935. future: '%s পরে',
  45936. past: '%s আগে',
  45937. s: 'কয়েক সেকেন্ড',
  45938. ss: '%d সেকেন্ড',
  45939. m: 'এক মিনিট',
  45940. mm: '%d মিনিট',
  45941. h: 'এক ঘন্টা',
  45942. hh: '%d ঘন্টা',
  45943. d: 'এক দিন',
  45944. dd: '%d দিন',
  45945. M: 'এক মাস',
  45946. MM: '%d মাস',
  45947. y: 'এক বছর',
  45948. yy: '%d বছর',
  45949. },
  45950. preparse: function (string) {
  45951. return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {
  45952. return numberMap[match];
  45953. });
  45954. },
  45955. postformat: function (string) {
  45956. return string.replace(/\d/g, function (match) {
  45957. return symbolMap[match];
  45958. });
  45959. },
  45960. meridiemParse: /রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,
  45961. meridiemHour: function (hour, meridiem) {
  45962. if (hour === 12) {
  45963. hour = 0;
  45964. }
  45965. if (meridiem === 'রাত') {
  45966. return hour < 4 ? hour : hour + 12;
  45967. } else if (meridiem === 'ভোর') {
  45968. return hour;
  45969. } else if (meridiem === 'সকাল') {
  45970. return hour;
  45971. } else if (meridiem === 'দুপুর') {
  45972. return hour >= 3 ? hour : hour + 12;
  45973. } else if (meridiem === 'বিকাল') {
  45974. return hour + 12;
  45975. } else if (meridiem === 'সন্ধ্যা') {
  45976. return hour + 12;
  45977. }
  45978. },
  45979. meridiem: function (hour, minute, isLower) {
  45980. if (hour < 4) {
  45981. return 'রাত';
  45982. } else if (hour < 6) {
  45983. return 'ভোর';
  45984. } else if (hour < 12) {
  45985. return 'সকাল';
  45986. } else if (hour < 15) {
  45987. return 'দুপুর';
  45988. } else if (hour < 18) {
  45989. return 'বিকাল';
  45990. } else if (hour < 20) {
  45991. return 'সন্ধ্যা';
  45992. } else {
  45993. return 'রাত';
  45994. }
  45995. },
  45996. week: {
  45997. dow: 0, // Sunday is the first day of the week.
  45998. doy: 6, // The week that contains Jan 6th is the first week of the year.
  45999. },
  46000. });
  46001. return bnBd;
  46002. })));
  46003. /***/ }),
  46004. /***/ 8905:
  46005. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  46006. //! moment.js locale configuration
  46007. //! locale : Bengali [bn]
  46008. //! author : Kaushik Gandhi : https://github.com/kaushikgandhi
  46009. ;(function (global, factory) {
  46010. true ? factory(__webpack_require__(30381)) :
  46011. 0
  46012. }(this, (function (moment) { 'use strict';
  46013. //! moment.js locale configuration
  46014. var symbolMap = {
  46015. 1: '১',
  46016. 2: '২',
  46017. 3: '৩',
  46018. 4: '৪',
  46019. 5: '৫',
  46020. 6: '৬',
  46021. 7: '৭',
  46022. 8: '৮',
  46023. 9: '৯',
  46024. 0: '০',
  46025. },
  46026. numberMap = {
  46027. '১': '1',
  46028. '২': '2',
  46029. '৩': '3',
  46030. '৪': '4',
  46031. '৫': '5',
  46032. '৬': '6',
  46033. '৭': '7',
  46034. '৮': '8',
  46035. '৯': '9',
  46036. '০': '0',
  46037. };
  46038. var bn = moment.defineLocale('bn', {
  46039. months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(
  46040. '_'
  46041. ),
  46042. monthsShort: 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(
  46043. '_'
  46044. ),
  46045. weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(
  46046. '_'
  46047. ),
  46048. weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),
  46049. weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),
  46050. longDateFormat: {
  46051. LT: 'A h:mm সময়',
  46052. LTS: 'A h:mm:ss সময়',
  46053. L: 'DD/MM/YYYY',
  46054. LL: 'D MMMM YYYY',
  46055. LLL: 'D MMMM YYYY, A h:mm সময়',
  46056. LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',
  46057. },
  46058. calendar: {
  46059. sameDay: '[আজ] LT',
  46060. nextDay: '[আগামীকাল] LT',
  46061. nextWeek: 'dddd, LT',
  46062. lastDay: '[গতকাল] LT',
  46063. lastWeek: '[গত] dddd, LT',
  46064. sameElse: 'L',
  46065. },
  46066. relativeTime: {
  46067. future: '%s পরে',
  46068. past: '%s আগে',
  46069. s: 'কয়েক সেকেন্ড',
  46070. ss: '%d সেকেন্ড',
  46071. m: 'এক মিনিট',
  46072. mm: '%d মিনিট',
  46073. h: 'এক ঘন্টা',
  46074. hh: '%d ঘন্টা',
  46075. d: 'এক দিন',
  46076. dd: '%d দিন',
  46077. M: 'এক মাস',
  46078. MM: '%d মাস',
  46079. y: 'এক বছর',
  46080. yy: '%d বছর',
  46081. },
  46082. preparse: function (string) {
  46083. return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {
  46084. return numberMap[match];
  46085. });
  46086. },
  46087. postformat: function (string) {
  46088. return string.replace(/\d/g, function (match) {
  46089. return symbolMap[match];
  46090. });
  46091. },
  46092. meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/,
  46093. meridiemHour: function (hour, meridiem) {
  46094. if (hour === 12) {
  46095. hour = 0;
  46096. }
  46097. if (
  46098. (meridiem === 'রাত' && hour >= 4) ||
  46099. (meridiem === 'দুপুর' && hour < 5) ||
  46100. meridiem === 'বিকাল'
  46101. ) {
  46102. return hour + 12;
  46103. } else {
  46104. return hour;
  46105. }
  46106. },
  46107. meridiem: function (hour, minute, isLower) {
  46108. if (hour < 4) {
  46109. return 'রাত';
  46110. } else if (hour < 10) {
  46111. return 'সকাল';
  46112. } else if (hour < 17) {
  46113. return 'দুপুর';
  46114. } else if (hour < 20) {
  46115. return 'বিকাল';
  46116. } else {
  46117. return 'রাত';
  46118. }
  46119. },
  46120. week: {
  46121. dow: 0, // Sunday is the first day of the week.
  46122. doy: 6, // The week that contains Jan 6th is the first week of the year.
  46123. },
  46124. });
  46125. return bn;
  46126. })));
  46127. /***/ }),
  46128. /***/ 11560:
  46129. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  46130. //! moment.js locale configuration
  46131. //! locale : Tibetan [bo]
  46132. //! author : Thupten N. Chakrishar : https://github.com/vajradog
  46133. ;(function (global, factory) {
  46134. true ? factory(__webpack_require__(30381)) :
  46135. 0
  46136. }(this, (function (moment) { 'use strict';
  46137. //! moment.js locale configuration
  46138. var symbolMap = {
  46139. 1: '༡',
  46140. 2: '༢',
  46141. 3: '༣',
  46142. 4: '༤',
  46143. 5: '༥',
  46144. 6: '༦',
  46145. 7: '༧',
  46146. 8: '༨',
  46147. 9: '༩',
  46148. 0: '༠',
  46149. },
  46150. numberMap = {
  46151. '༡': '1',
  46152. '༢': '2',
  46153. '༣': '3',
  46154. '༤': '4',
  46155. '༥': '5',
  46156. '༦': '6',
  46157. '༧': '7',
  46158. '༨': '8',
  46159. '༩': '9',
  46160. '༠': '0',
  46161. };
  46162. var bo = moment.defineLocale('bo', {
  46163. months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split(
  46164. '_'
  46165. ),
  46166. monthsShort: 'ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12'.split(
  46167. '_'
  46168. ),
  46169. monthsShortRegex: /^(ཟླ་\d{1,2})/,
  46170. monthsParseExact: true,
  46171. weekdays: 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split(
  46172. '_'
  46173. ),
  46174. weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split(
  46175. '_'
  46176. ),
  46177. weekdaysMin: 'ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན'.split('_'),
  46178. longDateFormat: {
  46179. LT: 'A h:mm',
  46180. LTS: 'A h:mm:ss',
  46181. L: 'DD/MM/YYYY',
  46182. LL: 'D MMMM YYYY',
  46183. LLL: 'D MMMM YYYY, A h:mm',
  46184. LLLL: 'dddd, D MMMM YYYY, A h:mm',
  46185. },
  46186. calendar: {
  46187. sameDay: '[དི་རིང] LT',
  46188. nextDay: '[སང་ཉིན] LT',
  46189. nextWeek: '[བདུན་ཕྲག་རྗེས་མ], LT',
  46190. lastDay: '[ཁ་སང] LT',
  46191. lastWeek: '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',
  46192. sameElse: 'L',
  46193. },
  46194. relativeTime: {
  46195. future: '%s ལ་',
  46196. past: '%s སྔན་ལ',
  46197. s: 'ལམ་སང',
  46198. ss: '%d སྐར་ཆ།',
  46199. m: 'སྐར་མ་གཅིག',
  46200. mm: '%d སྐར་མ',
  46201. h: 'ཆུ་ཚོད་གཅིག',
  46202. hh: '%d ཆུ་ཚོད',
  46203. d: 'ཉིན་གཅིག',
  46204. dd: '%d ཉིན་',
  46205. M: 'ཟླ་བ་གཅིག',
  46206. MM: '%d ཟླ་བ',
  46207. y: 'ལོ་གཅིག',
  46208. yy: '%d ལོ',
  46209. },
  46210. preparse: function (string) {
  46211. return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {
  46212. return numberMap[match];
  46213. });
  46214. },
  46215. postformat: function (string) {
  46216. return string.replace(/\d/g, function (match) {
  46217. return symbolMap[match];
  46218. });
  46219. },
  46220. meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,
  46221. meridiemHour: function (hour, meridiem) {
  46222. if (hour === 12) {
  46223. hour = 0;
  46224. }
  46225. if (
  46226. (meridiem === 'མཚན་མོ' && hour >= 4) ||
  46227. (meridiem === 'ཉིན་གུང' && hour < 5) ||
  46228. meridiem === 'དགོང་དག'
  46229. ) {
  46230. return hour + 12;
  46231. } else {
  46232. return hour;
  46233. }
  46234. },
  46235. meridiem: function (hour, minute, isLower) {
  46236. if (hour < 4) {
  46237. return 'མཚན་མོ';
  46238. } else if (hour < 10) {
  46239. return 'ཞོགས་ཀས';
  46240. } else if (hour < 17) {
  46241. return 'ཉིན་གུང';
  46242. } else if (hour < 20) {
  46243. return 'དགོང་དག';
  46244. } else {
  46245. return 'མཚན་མོ';
  46246. }
  46247. },
  46248. week: {
  46249. dow: 0, // Sunday is the first day of the week.
  46250. doy: 6, // The week that contains Jan 6th is the first week of the year.
  46251. },
  46252. });
  46253. return bo;
  46254. })));
  46255. /***/ }),
  46256. /***/ 1278:
  46257. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  46258. //! moment.js locale configuration
  46259. //! locale : Breton [br]
  46260. //! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou
  46261. ;(function (global, factory) {
  46262. true ? factory(__webpack_require__(30381)) :
  46263. 0
  46264. }(this, (function (moment) { 'use strict';
  46265. //! moment.js locale configuration
  46266. function relativeTimeWithMutation(number, withoutSuffix, key) {
  46267. var format = {
  46268. mm: 'munutenn',
  46269. MM: 'miz',
  46270. dd: 'devezh',
  46271. };
  46272. return number + ' ' + mutation(format[key], number);
  46273. }
  46274. function specialMutationForYears(number) {
  46275. switch (lastNumber(number)) {
  46276. case 1:
  46277. case 3:
  46278. case 4:
  46279. case 5:
  46280. case 9:
  46281. return number + ' bloaz';
  46282. default:
  46283. return number + ' vloaz';
  46284. }
  46285. }
  46286. function lastNumber(number) {
  46287. if (number > 9) {
  46288. return lastNumber(number % 10);
  46289. }
  46290. return number;
  46291. }
  46292. function mutation(text, number) {
  46293. if (number === 2) {
  46294. return softMutation(text);
  46295. }
  46296. return text;
  46297. }
  46298. function softMutation(text) {
  46299. var mutationTable = {
  46300. m: 'v',
  46301. b: 'v',
  46302. d: 'z',
  46303. };
  46304. if (mutationTable[text.charAt(0)] === undefined) {
  46305. return text;
  46306. }
  46307. return mutationTable[text.charAt(0)] + text.substring(1);
  46308. }
  46309. var monthsParse = [
  46310. /^gen/i,
  46311. /^c[ʼ\']hwe/i,
  46312. /^meu/i,
  46313. /^ebr/i,
  46314. /^mae/i,
  46315. /^(mez|eve)/i,
  46316. /^gou/i,
  46317. /^eos/i,
  46318. /^gwe/i,
  46319. /^her/i,
  46320. /^du/i,
  46321. /^ker/i,
  46322. ],
  46323. monthsRegex = /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,
  46324. monthsStrictRegex = /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,
  46325. monthsShortStrictRegex = /^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,
  46326. fullWeekdaysParse = [
  46327. /^sul/i,
  46328. /^lun/i,
  46329. /^meurzh/i,
  46330. /^merc[ʼ\']her/i,
  46331. /^yaou/i,
  46332. /^gwener/i,
  46333. /^sadorn/i,
  46334. ],
  46335. shortWeekdaysParse = [
  46336. /^Sul/i,
  46337. /^Lun/i,
  46338. /^Meu/i,
  46339. /^Mer/i,
  46340. /^Yao/i,
  46341. /^Gwe/i,
  46342. /^Sad/i,
  46343. ],
  46344. minWeekdaysParse = [
  46345. /^Su/i,
  46346. /^Lu/i,
  46347. /^Me([^r]|$)/i,
  46348. /^Mer/i,
  46349. /^Ya/i,
  46350. /^Gw/i,
  46351. /^Sa/i,
  46352. ];
  46353. var br = moment.defineLocale('br', {
  46354. months: 'Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split(
  46355. '_'
  46356. ),
  46357. monthsShort: 'Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),
  46358. weekdays: 'Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn'.split('_'),
  46359. weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),
  46360. weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),
  46361. weekdaysParse: minWeekdaysParse,
  46362. fullWeekdaysParse: fullWeekdaysParse,
  46363. shortWeekdaysParse: shortWeekdaysParse,
  46364. minWeekdaysParse: minWeekdaysParse,
  46365. monthsRegex: monthsRegex,
  46366. monthsShortRegex: monthsRegex,
  46367. monthsStrictRegex: monthsStrictRegex,
  46368. monthsShortStrictRegex: monthsShortStrictRegex,
  46369. monthsParse: monthsParse,
  46370. longMonthsParse: monthsParse,
  46371. shortMonthsParse: monthsParse,
  46372. longDateFormat: {
  46373. LT: 'HH:mm',
  46374. LTS: 'HH:mm:ss',
  46375. L: 'DD/MM/YYYY',
  46376. LL: 'D [a viz] MMMM YYYY',
  46377. LLL: 'D [a viz] MMMM YYYY HH:mm',
  46378. LLLL: 'dddd, D [a viz] MMMM YYYY HH:mm',
  46379. },
  46380. calendar: {
  46381. sameDay: '[Hiziv da] LT',
  46382. nextDay: '[Warcʼhoazh da] LT',
  46383. nextWeek: 'dddd [da] LT',
  46384. lastDay: '[Decʼh da] LT',
  46385. lastWeek: 'dddd [paset da] LT',
  46386. sameElse: 'L',
  46387. },
  46388. relativeTime: {
  46389. future: 'a-benn %s',
  46390. past: '%s ʼzo',
  46391. s: 'un nebeud segondennoù',
  46392. ss: '%d eilenn',
  46393. m: 'ur vunutenn',
  46394. mm: relativeTimeWithMutation,
  46395. h: 'un eur',
  46396. hh: '%d eur',
  46397. d: 'un devezh',
  46398. dd: relativeTimeWithMutation,
  46399. M: 'ur miz',
  46400. MM: relativeTimeWithMutation,
  46401. y: 'ur bloaz',
  46402. yy: specialMutationForYears,
  46403. },
  46404. dayOfMonthOrdinalParse: /\d{1,2}(añ|vet)/,
  46405. ordinal: function (number) {
  46406. var output = number === 1 ? 'añ' : 'vet';
  46407. return number + output;
  46408. },
  46409. week: {
  46410. dow: 1, // Monday is the first day of the week.
  46411. doy: 4, // The week that contains Jan 4th is the first week of the year.
  46412. },
  46413. meridiemParse: /a.m.|g.m./, // goude merenn | a-raok merenn
  46414. isPM: function (token) {
  46415. return token === 'g.m.';
  46416. },
  46417. meridiem: function (hour, minute, isLower) {
  46418. return hour < 12 ? 'a.m.' : 'g.m.';
  46419. },
  46420. });
  46421. return br;
  46422. })));
  46423. /***/ }),
  46424. /***/ 80622:
  46425. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  46426. //! moment.js locale configuration
  46427. //! locale : Bosnian [bs]
  46428. //! author : Nedim Cholich : https://github.com/frontyard
  46429. //! based on (hr) translation by Bojan Marković
  46430. ;(function (global, factory) {
  46431. true ? factory(__webpack_require__(30381)) :
  46432. 0
  46433. }(this, (function (moment) { 'use strict';
  46434. //! moment.js locale configuration
  46435. function translate(number, withoutSuffix, key) {
  46436. var result = number + ' ';
  46437. switch (key) {
  46438. case 'ss':
  46439. if (number === 1) {
  46440. result += 'sekunda';
  46441. } else if (number === 2 || number === 3 || number === 4) {
  46442. result += 'sekunde';
  46443. } else {
  46444. result += 'sekundi';
  46445. }
  46446. return result;
  46447. case 'm':
  46448. return withoutSuffix ? 'jedna minuta' : 'jedne minute';
  46449. case 'mm':
  46450. if (number === 1) {
  46451. result += 'minuta';
  46452. } else if (number === 2 || number === 3 || number === 4) {
  46453. result += 'minute';
  46454. } else {
  46455. result += 'minuta';
  46456. }
  46457. return result;
  46458. case 'h':
  46459. return withoutSuffix ? 'jedan sat' : 'jednog sata';
  46460. case 'hh':
  46461. if (number === 1) {
  46462. result += 'sat';
  46463. } else if (number === 2 || number === 3 || number === 4) {
  46464. result += 'sata';
  46465. } else {
  46466. result += 'sati';
  46467. }
  46468. return result;
  46469. case 'dd':
  46470. if (number === 1) {
  46471. result += 'dan';
  46472. } else {
  46473. result += 'dana';
  46474. }
  46475. return result;
  46476. case 'MM':
  46477. if (number === 1) {
  46478. result += 'mjesec';
  46479. } else if (number === 2 || number === 3 || number === 4) {
  46480. result += 'mjeseca';
  46481. } else {
  46482. result += 'mjeseci';
  46483. }
  46484. return result;
  46485. case 'yy':
  46486. if (number === 1) {
  46487. result += 'godina';
  46488. } else if (number === 2 || number === 3 || number === 4) {
  46489. result += 'godine';
  46490. } else {
  46491. result += 'godina';
  46492. }
  46493. return result;
  46494. }
  46495. }
  46496. var bs = moment.defineLocale('bs', {
  46497. months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split(
  46498. '_'
  46499. ),
  46500. monthsShort: 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split(
  46501. '_'
  46502. ),
  46503. monthsParseExact: true,
  46504. weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
  46505. '_'
  46506. ),
  46507. weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
  46508. weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
  46509. weekdaysParseExact: true,
  46510. longDateFormat: {
  46511. LT: 'H:mm',
  46512. LTS: 'H:mm:ss',
  46513. L: 'DD.MM.YYYY',
  46514. LL: 'D. MMMM YYYY',
  46515. LLL: 'D. MMMM YYYY H:mm',
  46516. LLLL: 'dddd, D. MMMM YYYY H:mm',
  46517. },
  46518. calendar: {
  46519. sameDay: '[danas u] LT',
  46520. nextDay: '[sutra u] LT',
  46521. nextWeek: function () {
  46522. switch (this.day()) {
  46523. case 0:
  46524. return '[u] [nedjelju] [u] LT';
  46525. case 3:
  46526. return '[u] [srijedu] [u] LT';
  46527. case 6:
  46528. return '[u] [subotu] [u] LT';
  46529. case 1:
  46530. case 2:
  46531. case 4:
  46532. case 5:
  46533. return '[u] dddd [u] LT';
  46534. }
  46535. },
  46536. lastDay: '[jučer u] LT',
  46537. lastWeek: function () {
  46538. switch (this.day()) {
  46539. case 0:
  46540. case 3:
  46541. return '[prošlu] dddd [u] LT';
  46542. case 6:
  46543. return '[prošle] [subote] [u] LT';
  46544. case 1:
  46545. case 2:
  46546. case 4:
  46547. case 5:
  46548. return '[prošli] dddd [u] LT';
  46549. }
  46550. },
  46551. sameElse: 'L',
  46552. },
  46553. relativeTime: {
  46554. future: 'za %s',
  46555. past: 'prije %s',
  46556. s: 'par sekundi',
  46557. ss: translate,
  46558. m: translate,
  46559. mm: translate,
  46560. h: translate,
  46561. hh: translate,
  46562. d: 'dan',
  46563. dd: translate,
  46564. M: 'mjesec',
  46565. MM: translate,
  46566. y: 'godinu',
  46567. yy: translate,
  46568. },
  46569. dayOfMonthOrdinalParse: /\d{1,2}\./,
  46570. ordinal: '%d.',
  46571. week: {
  46572. dow: 1, // Monday is the first day of the week.
  46573. doy: 7, // The week that contains Jan 7th is the first week of the year.
  46574. },
  46575. });
  46576. return bs;
  46577. })));
  46578. /***/ }),
  46579. /***/ 2468:
  46580. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  46581. //! moment.js locale configuration
  46582. //! locale : Catalan [ca]
  46583. //! author : Juan G. Hurtado : https://github.com/juanghurtado
  46584. ;(function (global, factory) {
  46585. true ? factory(__webpack_require__(30381)) :
  46586. 0
  46587. }(this, (function (moment) { 'use strict';
  46588. //! moment.js locale configuration
  46589. var ca = moment.defineLocale('ca', {
  46590. months: {
  46591. standalone: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split(
  46592. '_'
  46593. ),
  46594. format: "de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split(
  46595. '_'
  46596. ),
  46597. isFormat: /D[oD]?(\s)+MMMM/,
  46598. },
  46599. monthsShort: 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split(
  46600. '_'
  46601. ),
  46602. monthsParseExact: true,
  46603. weekdays: 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split(
  46604. '_'
  46605. ),
  46606. weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),
  46607. weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'),
  46608. weekdaysParseExact: true,
  46609. longDateFormat: {
  46610. LT: 'H:mm',
  46611. LTS: 'H:mm:ss',
  46612. L: 'DD/MM/YYYY',
  46613. LL: 'D MMMM [de] YYYY',
  46614. ll: 'D MMM YYYY',
  46615. LLL: 'D MMMM [de] YYYY [a les] H:mm',
  46616. lll: 'D MMM YYYY, H:mm',
  46617. LLLL: 'dddd D MMMM [de] YYYY [a les] H:mm',
  46618. llll: 'ddd D MMM YYYY, H:mm',
  46619. },
  46620. calendar: {
  46621. sameDay: function () {
  46622. return '[avui a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
  46623. },
  46624. nextDay: function () {
  46625. return '[demà a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
  46626. },
  46627. nextWeek: function () {
  46628. return 'dddd [a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
  46629. },
  46630. lastDay: function () {
  46631. return '[ahir a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
  46632. },
  46633. lastWeek: function () {
  46634. return (
  46635. '[el] dddd [passat a ' +
  46636. (this.hours() !== 1 ? 'les' : 'la') +
  46637. '] LT'
  46638. );
  46639. },
  46640. sameElse: 'L',
  46641. },
  46642. relativeTime: {
  46643. future: "d'aquí %s",
  46644. past: 'fa %s',
  46645. s: 'uns segons',
  46646. ss: '%d segons',
  46647. m: 'un minut',
  46648. mm: '%d minuts',
  46649. h: 'una hora',
  46650. hh: '%d hores',
  46651. d: 'un dia',
  46652. dd: '%d dies',
  46653. M: 'un mes',
  46654. MM: '%d mesos',
  46655. y: 'un any',
  46656. yy: '%d anys',
  46657. },
  46658. dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
  46659. ordinal: function (number, period) {
  46660. var output =
  46661. number === 1
  46662. ? 'r'
  46663. : number === 2
  46664. ? 'n'
  46665. : number === 3
  46666. ? 'r'
  46667. : number === 4
  46668. ? 't'
  46669. : 'è';
  46670. if (period === 'w' || period === 'W') {
  46671. output = 'a';
  46672. }
  46673. return number + output;
  46674. },
  46675. week: {
  46676. dow: 1, // Monday is the first day of the week.
  46677. doy: 4, // The week that contains Jan 4th is the first week of the year.
  46678. },
  46679. });
  46680. return ca;
  46681. })));
  46682. /***/ }),
  46683. /***/ 5822:
  46684. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  46685. //! moment.js locale configuration
  46686. //! locale : Czech [cs]
  46687. //! author : petrbela : https://github.com/petrbela
  46688. ;(function (global, factory) {
  46689. true ? factory(__webpack_require__(30381)) :
  46690. 0
  46691. }(this, (function (moment) { 'use strict';
  46692. //! moment.js locale configuration
  46693. var months = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split(
  46694. '_'
  46695. ),
  46696. monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'),
  46697. monthsParse = [
  46698. /^led/i,
  46699. /^úno/i,
  46700. /^bře/i,
  46701. /^dub/i,
  46702. /^kvě/i,
  46703. /^(čvn|červen$|června)/i,
  46704. /^(čvc|červenec|července)/i,
  46705. /^srp/i,
  46706. /^zář/i,
  46707. /^říj/i,
  46708. /^lis/i,
  46709. /^pro/i,
  46710. ],
  46711. // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.
  46712. // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.
  46713. monthsRegex = /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;
  46714. function plural(n) {
  46715. return n > 1 && n < 5 && ~~(n / 10) !== 1;
  46716. }
  46717. function translate(number, withoutSuffix, key, isFuture) {
  46718. var result = number + ' ';
  46719. switch (key) {
  46720. case 's': // a few seconds / in a few seconds / a few seconds ago
  46721. return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami';
  46722. case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
  46723. if (withoutSuffix || isFuture) {
  46724. return result + (plural(number) ? 'sekundy' : 'sekund');
  46725. } else {
  46726. return result + 'sekundami';
  46727. }
  46728. case 'm': // a minute / in a minute / a minute ago
  46729. return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou';
  46730. case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
  46731. if (withoutSuffix || isFuture) {
  46732. return result + (plural(number) ? 'minuty' : 'minut');
  46733. } else {
  46734. return result + 'minutami';
  46735. }
  46736. case 'h': // an hour / in an hour / an hour ago
  46737. return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';
  46738. case 'hh': // 9 hours / in 9 hours / 9 hours ago
  46739. if (withoutSuffix || isFuture) {
  46740. return result + (plural(number) ? 'hodiny' : 'hodin');
  46741. } else {
  46742. return result + 'hodinami';
  46743. }
  46744. case 'd': // a day / in a day / a day ago
  46745. return withoutSuffix || isFuture ? 'den' : 'dnem';
  46746. case 'dd': // 9 days / in 9 days / 9 days ago
  46747. if (withoutSuffix || isFuture) {
  46748. return result + (plural(number) ? 'dny' : 'dní');
  46749. } else {
  46750. return result + 'dny';
  46751. }
  46752. case 'M': // a month / in a month / a month ago
  46753. return withoutSuffix || isFuture ? 'měsíc' : 'měsícem';
  46754. case 'MM': // 9 months / in 9 months / 9 months ago
  46755. if (withoutSuffix || isFuture) {
  46756. return result + (plural(number) ? 'měsíce' : 'měsíců');
  46757. } else {
  46758. return result + 'měsíci';
  46759. }
  46760. case 'y': // a year / in a year / a year ago
  46761. return withoutSuffix || isFuture ? 'rok' : 'rokem';
  46762. case 'yy': // 9 years / in 9 years / 9 years ago
  46763. if (withoutSuffix || isFuture) {
  46764. return result + (plural(number) ? 'roky' : 'let');
  46765. } else {
  46766. return result + 'lety';
  46767. }
  46768. }
  46769. }
  46770. var cs = moment.defineLocale('cs', {
  46771. months: months,
  46772. monthsShort: monthsShort,
  46773. monthsRegex: monthsRegex,
  46774. monthsShortRegex: monthsRegex,
  46775. // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.
  46776. // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.
  46777. monthsStrictRegex: /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,
  46778. monthsShortStrictRegex: /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,
  46779. monthsParse: monthsParse,
  46780. longMonthsParse: monthsParse,
  46781. shortMonthsParse: monthsParse,
  46782. weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),
  46783. weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'),
  46784. weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'),
  46785. longDateFormat: {
  46786. LT: 'H:mm',
  46787. LTS: 'H:mm:ss',
  46788. L: 'DD.MM.YYYY',
  46789. LL: 'D. MMMM YYYY',
  46790. LLL: 'D. MMMM YYYY H:mm',
  46791. LLLL: 'dddd D. MMMM YYYY H:mm',
  46792. l: 'D. M. YYYY',
  46793. },
  46794. calendar: {
  46795. sameDay: '[dnes v] LT',
  46796. nextDay: '[zítra v] LT',
  46797. nextWeek: function () {
  46798. switch (this.day()) {
  46799. case 0:
  46800. return '[v neděli v] LT';
  46801. case 1:
  46802. case 2:
  46803. return '[v] dddd [v] LT';
  46804. case 3:
  46805. return '[ve středu v] LT';
  46806. case 4:
  46807. return '[ve čtvrtek v] LT';
  46808. case 5:
  46809. return '[v pátek v] LT';
  46810. case 6:
  46811. return '[v sobotu v] LT';
  46812. }
  46813. },
  46814. lastDay: '[včera v] LT',
  46815. lastWeek: function () {
  46816. switch (this.day()) {
  46817. case 0:
  46818. return '[minulou neděli v] LT';
  46819. case 1:
  46820. case 2:
  46821. return '[minulé] dddd [v] LT';
  46822. case 3:
  46823. return '[minulou středu v] LT';
  46824. case 4:
  46825. case 5:
  46826. return '[minulý] dddd [v] LT';
  46827. case 6:
  46828. return '[minulou sobotu v] LT';
  46829. }
  46830. },
  46831. sameElse: 'L',
  46832. },
  46833. relativeTime: {
  46834. future: 'za %s',
  46835. past: 'před %s',
  46836. s: translate,
  46837. ss: translate,
  46838. m: translate,
  46839. mm: translate,
  46840. h: translate,
  46841. hh: translate,
  46842. d: translate,
  46843. dd: translate,
  46844. M: translate,
  46845. MM: translate,
  46846. y: translate,
  46847. yy: translate,
  46848. },
  46849. dayOfMonthOrdinalParse: /\d{1,2}\./,
  46850. ordinal: '%d.',
  46851. week: {
  46852. dow: 1, // Monday is the first day of the week.
  46853. doy: 4, // The week that contains Jan 4th is the first week of the year.
  46854. },
  46855. });
  46856. return cs;
  46857. })));
  46858. /***/ }),
  46859. /***/ 50877:
  46860. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  46861. //! moment.js locale configuration
  46862. //! locale : Chuvash [cv]
  46863. //! author : Anatoly Mironov : https://github.com/mirontoli
  46864. ;(function (global, factory) {
  46865. true ? factory(__webpack_require__(30381)) :
  46866. 0
  46867. }(this, (function (moment) { 'use strict';
  46868. //! moment.js locale configuration
  46869. var cv = moment.defineLocale('cv', {
  46870. months: 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split(
  46871. '_'
  46872. ),
  46873. monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),
  46874. weekdays: 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split(
  46875. '_'
  46876. ),
  46877. weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),
  46878. weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),
  46879. longDateFormat: {
  46880. LT: 'HH:mm',
  46881. LTS: 'HH:mm:ss',
  46882. L: 'DD-MM-YYYY',
  46883. LL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',
  46884. LLL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',
  46885. LLLL: 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',
  46886. },
  46887. calendar: {
  46888. sameDay: '[Паян] LT [сехетре]',
  46889. nextDay: '[Ыран] LT [сехетре]',
  46890. lastDay: '[Ӗнер] LT [сехетре]',
  46891. nextWeek: '[Ҫитес] dddd LT [сехетре]',
  46892. lastWeek: '[Иртнӗ] dddd LT [сехетре]',
  46893. sameElse: 'L',
  46894. },
  46895. relativeTime: {
  46896. future: function (output) {
  46897. var affix = /сехет$/i.exec(output)
  46898. ? 'рен'
  46899. : /ҫул$/i.exec(output)
  46900. ? 'тан'
  46901. : 'ран';
  46902. return output + affix;
  46903. },
  46904. past: '%s каялла',
  46905. s: 'пӗр-ик ҫеккунт',
  46906. ss: '%d ҫеккунт',
  46907. m: 'пӗр минут',
  46908. mm: '%d минут',
  46909. h: 'пӗр сехет',
  46910. hh: '%d сехет',
  46911. d: 'пӗр кун',
  46912. dd: '%d кун',
  46913. M: 'пӗр уйӑх',
  46914. MM: '%d уйӑх',
  46915. y: 'пӗр ҫул',
  46916. yy: '%d ҫул',
  46917. },
  46918. dayOfMonthOrdinalParse: /\d{1,2}-мӗш/,
  46919. ordinal: '%d-мӗш',
  46920. week: {
  46921. dow: 1, // Monday is the first day of the week.
  46922. doy: 7, // The week that contains Jan 7th is the first week of the year.
  46923. },
  46924. });
  46925. return cv;
  46926. })));
  46927. /***/ }),
  46928. /***/ 47373:
  46929. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  46930. //! moment.js locale configuration
  46931. //! locale : Welsh [cy]
  46932. //! author : Robert Allen : https://github.com/robgallen
  46933. //! author : https://github.com/ryangreaves
  46934. ;(function (global, factory) {
  46935. true ? factory(__webpack_require__(30381)) :
  46936. 0
  46937. }(this, (function (moment) { 'use strict';
  46938. //! moment.js locale configuration
  46939. var cy = moment.defineLocale('cy', {
  46940. months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split(
  46941. '_'
  46942. ),
  46943. monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split(
  46944. '_'
  46945. ),
  46946. weekdays: 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split(
  46947. '_'
  46948. ),
  46949. weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),
  46950. weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),
  46951. weekdaysParseExact: true,
  46952. // time formats are the same as en-gb
  46953. longDateFormat: {
  46954. LT: 'HH:mm',
  46955. LTS: 'HH:mm:ss',
  46956. L: 'DD/MM/YYYY',
  46957. LL: 'D MMMM YYYY',
  46958. LLL: 'D MMMM YYYY HH:mm',
  46959. LLLL: 'dddd, D MMMM YYYY HH:mm',
  46960. },
  46961. calendar: {
  46962. sameDay: '[Heddiw am] LT',
  46963. nextDay: '[Yfory am] LT',
  46964. nextWeek: 'dddd [am] LT',
  46965. lastDay: '[Ddoe am] LT',
  46966. lastWeek: 'dddd [diwethaf am] LT',
  46967. sameElse: 'L',
  46968. },
  46969. relativeTime: {
  46970. future: 'mewn %s',
  46971. past: '%s yn ôl',
  46972. s: 'ychydig eiliadau',
  46973. ss: '%d eiliad',
  46974. m: 'munud',
  46975. mm: '%d munud',
  46976. h: 'awr',
  46977. hh: '%d awr',
  46978. d: 'diwrnod',
  46979. dd: '%d diwrnod',
  46980. M: 'mis',
  46981. MM: '%d mis',
  46982. y: 'blwyddyn',
  46983. yy: '%d flynedd',
  46984. },
  46985. dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,
  46986. // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh
  46987. ordinal: function (number) {
  46988. var b = number,
  46989. output = '',
  46990. lookup = [
  46991. '',
  46992. 'af',
  46993. 'il',
  46994. 'ydd',
  46995. 'ydd',
  46996. 'ed',
  46997. 'ed',
  46998. 'ed',
  46999. 'fed',
  47000. 'fed',
  47001. 'fed', // 1af to 10fed
  47002. 'eg',
  47003. 'fed',
  47004. 'eg',
  47005. 'eg',
  47006. 'fed',
  47007. 'eg',
  47008. 'eg',
  47009. 'fed',
  47010. 'eg',
  47011. 'fed', // 11eg to 20fed
  47012. ];
  47013. if (b > 20) {
  47014. if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {
  47015. output = 'fed'; // not 30ain, 70ain or 90ain
  47016. } else {
  47017. output = 'ain';
  47018. }
  47019. } else if (b > 0) {
  47020. output = lookup[b];
  47021. }
  47022. return number + output;
  47023. },
  47024. week: {
  47025. dow: 1, // Monday is the first day of the week.
  47026. doy: 4, // The week that contains Jan 4th is the first week of the year.
  47027. },
  47028. });
  47029. return cy;
  47030. })));
  47031. /***/ }),
  47032. /***/ 24780:
  47033. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  47034. //! moment.js locale configuration
  47035. //! locale : Danish [da]
  47036. //! author : Ulrik Nielsen : https://github.com/mrbase
  47037. ;(function (global, factory) {
  47038. true ? factory(__webpack_require__(30381)) :
  47039. 0
  47040. }(this, (function (moment) { 'use strict';
  47041. //! moment.js locale configuration
  47042. var da = moment.defineLocale('da', {
  47043. months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split(
  47044. '_'
  47045. ),
  47046. monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
  47047. weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
  47048. weekdaysShort: 'søn_man_tir_ons_tor_fre_lør'.split('_'),
  47049. weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
  47050. longDateFormat: {
  47051. LT: 'HH:mm',
  47052. LTS: 'HH:mm:ss',
  47053. L: 'DD.MM.YYYY',
  47054. LL: 'D. MMMM YYYY',
  47055. LLL: 'D. MMMM YYYY HH:mm',
  47056. LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm',
  47057. },
  47058. calendar: {
  47059. sameDay: '[i dag kl.] LT',
  47060. nextDay: '[i morgen kl.] LT',
  47061. nextWeek: 'på dddd [kl.] LT',
  47062. lastDay: '[i går kl.] LT',
  47063. lastWeek: '[i] dddd[s kl.] LT',
  47064. sameElse: 'L',
  47065. },
  47066. relativeTime: {
  47067. future: 'om %s',
  47068. past: '%s siden',
  47069. s: 'få sekunder',
  47070. ss: '%d sekunder',
  47071. m: 'et minut',
  47072. mm: '%d minutter',
  47073. h: 'en time',
  47074. hh: '%d timer',
  47075. d: 'en dag',
  47076. dd: '%d dage',
  47077. M: 'en måned',
  47078. MM: '%d måneder',
  47079. y: 'et år',
  47080. yy: '%d år',
  47081. },
  47082. dayOfMonthOrdinalParse: /\d{1,2}\./,
  47083. ordinal: '%d.',
  47084. week: {
  47085. dow: 1, // Monday is the first day of the week.
  47086. doy: 4, // The week that contains Jan 4th is the first week of the year.
  47087. },
  47088. });
  47089. return da;
  47090. })));
  47091. /***/ }),
  47092. /***/ 60217:
  47093. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  47094. //! moment.js locale configuration
  47095. //! locale : German (Austria) [de-at]
  47096. //! author : lluchs : https://github.com/lluchs
  47097. //! author: Menelion Elensúle: https://github.com/Oire
  47098. //! author : Martin Groller : https://github.com/MadMG
  47099. //! author : Mikolaj Dadela : https://github.com/mik01aj
  47100. ;(function (global, factory) {
  47101. true ? factory(__webpack_require__(30381)) :
  47102. 0
  47103. }(this, (function (moment) { 'use strict';
  47104. //! moment.js locale configuration
  47105. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  47106. var format = {
  47107. m: ['eine Minute', 'einer Minute'],
  47108. h: ['eine Stunde', 'einer Stunde'],
  47109. d: ['ein Tag', 'einem Tag'],
  47110. dd: [number + ' Tage', number + ' Tagen'],
  47111. w: ['eine Woche', 'einer Woche'],
  47112. M: ['ein Monat', 'einem Monat'],
  47113. MM: [number + ' Monate', number + ' Monaten'],
  47114. y: ['ein Jahr', 'einem Jahr'],
  47115. yy: [number + ' Jahre', number + ' Jahren'],
  47116. };
  47117. return withoutSuffix ? format[key][0] : format[key][1];
  47118. }
  47119. var deAt = moment.defineLocale('de-at', {
  47120. months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
  47121. '_'
  47122. ),
  47123. monthsShort: 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split(
  47124. '_'
  47125. ),
  47126. monthsParseExact: true,
  47127. weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
  47128. '_'
  47129. ),
  47130. weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
  47131. weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
  47132. weekdaysParseExact: true,
  47133. longDateFormat: {
  47134. LT: 'HH:mm',
  47135. LTS: 'HH:mm:ss',
  47136. L: 'DD.MM.YYYY',
  47137. LL: 'D. MMMM YYYY',
  47138. LLL: 'D. MMMM YYYY HH:mm',
  47139. LLLL: 'dddd, D. MMMM YYYY HH:mm',
  47140. },
  47141. calendar: {
  47142. sameDay: '[heute um] LT [Uhr]',
  47143. sameElse: 'L',
  47144. nextDay: '[morgen um] LT [Uhr]',
  47145. nextWeek: 'dddd [um] LT [Uhr]',
  47146. lastDay: '[gestern um] LT [Uhr]',
  47147. lastWeek: '[letzten] dddd [um] LT [Uhr]',
  47148. },
  47149. relativeTime: {
  47150. future: 'in %s',
  47151. past: 'vor %s',
  47152. s: 'ein paar Sekunden',
  47153. ss: '%d Sekunden',
  47154. m: processRelativeTime,
  47155. mm: '%d Minuten',
  47156. h: processRelativeTime,
  47157. hh: '%d Stunden',
  47158. d: processRelativeTime,
  47159. dd: processRelativeTime,
  47160. w: processRelativeTime,
  47161. ww: '%d Wochen',
  47162. M: processRelativeTime,
  47163. MM: processRelativeTime,
  47164. y: processRelativeTime,
  47165. yy: processRelativeTime,
  47166. },
  47167. dayOfMonthOrdinalParse: /\d{1,2}\./,
  47168. ordinal: '%d.',
  47169. week: {
  47170. dow: 1, // Monday is the first day of the week.
  47171. doy: 4, // The week that contains Jan 4th is the first week of the year.
  47172. },
  47173. });
  47174. return deAt;
  47175. })));
  47176. /***/ }),
  47177. /***/ 60894:
  47178. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  47179. //! moment.js locale configuration
  47180. //! locale : German (Switzerland) [de-ch]
  47181. //! author : sschueller : https://github.com/sschueller
  47182. ;(function (global, factory) {
  47183. true ? factory(__webpack_require__(30381)) :
  47184. 0
  47185. }(this, (function (moment) { 'use strict';
  47186. //! moment.js locale configuration
  47187. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  47188. var format = {
  47189. m: ['eine Minute', 'einer Minute'],
  47190. h: ['eine Stunde', 'einer Stunde'],
  47191. d: ['ein Tag', 'einem Tag'],
  47192. dd: [number + ' Tage', number + ' Tagen'],
  47193. w: ['eine Woche', 'einer Woche'],
  47194. M: ['ein Monat', 'einem Monat'],
  47195. MM: [number + ' Monate', number + ' Monaten'],
  47196. y: ['ein Jahr', 'einem Jahr'],
  47197. yy: [number + ' Jahre', number + ' Jahren'],
  47198. };
  47199. return withoutSuffix ? format[key][0] : format[key][1];
  47200. }
  47201. var deCh = moment.defineLocale('de-ch', {
  47202. months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
  47203. '_'
  47204. ),
  47205. monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split(
  47206. '_'
  47207. ),
  47208. monthsParseExact: true,
  47209. weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
  47210. '_'
  47211. ),
  47212. weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
  47213. weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
  47214. weekdaysParseExact: true,
  47215. longDateFormat: {
  47216. LT: 'HH:mm',
  47217. LTS: 'HH:mm:ss',
  47218. L: 'DD.MM.YYYY',
  47219. LL: 'D. MMMM YYYY',
  47220. LLL: 'D. MMMM YYYY HH:mm',
  47221. LLLL: 'dddd, D. MMMM YYYY HH:mm',
  47222. },
  47223. calendar: {
  47224. sameDay: '[heute um] LT [Uhr]',
  47225. sameElse: 'L',
  47226. nextDay: '[morgen um] LT [Uhr]',
  47227. nextWeek: 'dddd [um] LT [Uhr]',
  47228. lastDay: '[gestern um] LT [Uhr]',
  47229. lastWeek: '[letzten] dddd [um] LT [Uhr]',
  47230. },
  47231. relativeTime: {
  47232. future: 'in %s',
  47233. past: 'vor %s',
  47234. s: 'ein paar Sekunden',
  47235. ss: '%d Sekunden',
  47236. m: processRelativeTime,
  47237. mm: '%d Minuten',
  47238. h: processRelativeTime,
  47239. hh: '%d Stunden',
  47240. d: processRelativeTime,
  47241. dd: processRelativeTime,
  47242. w: processRelativeTime,
  47243. ww: '%d Wochen',
  47244. M: processRelativeTime,
  47245. MM: processRelativeTime,
  47246. y: processRelativeTime,
  47247. yy: processRelativeTime,
  47248. },
  47249. dayOfMonthOrdinalParse: /\d{1,2}\./,
  47250. ordinal: '%d.',
  47251. week: {
  47252. dow: 1, // Monday is the first day of the week.
  47253. doy: 4, // The week that contains Jan 4th is the first week of the year.
  47254. },
  47255. });
  47256. return deCh;
  47257. })));
  47258. /***/ }),
  47259. /***/ 59740:
  47260. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  47261. //! moment.js locale configuration
  47262. //! locale : German [de]
  47263. //! author : lluchs : https://github.com/lluchs
  47264. //! author: Menelion Elensúle: https://github.com/Oire
  47265. //! author : Mikolaj Dadela : https://github.com/mik01aj
  47266. ;(function (global, factory) {
  47267. true ? factory(__webpack_require__(30381)) :
  47268. 0
  47269. }(this, (function (moment) { 'use strict';
  47270. //! moment.js locale configuration
  47271. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  47272. var format = {
  47273. m: ['eine Minute', 'einer Minute'],
  47274. h: ['eine Stunde', 'einer Stunde'],
  47275. d: ['ein Tag', 'einem Tag'],
  47276. dd: [number + ' Tage', number + ' Tagen'],
  47277. w: ['eine Woche', 'einer Woche'],
  47278. M: ['ein Monat', 'einem Monat'],
  47279. MM: [number + ' Monate', number + ' Monaten'],
  47280. y: ['ein Jahr', 'einem Jahr'],
  47281. yy: [number + ' Jahre', number + ' Jahren'],
  47282. };
  47283. return withoutSuffix ? format[key][0] : format[key][1];
  47284. }
  47285. var de = moment.defineLocale('de', {
  47286. months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
  47287. '_'
  47288. ),
  47289. monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split(
  47290. '_'
  47291. ),
  47292. monthsParseExact: true,
  47293. weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
  47294. '_'
  47295. ),
  47296. weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
  47297. weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
  47298. weekdaysParseExact: true,
  47299. longDateFormat: {
  47300. LT: 'HH:mm',
  47301. LTS: 'HH:mm:ss',
  47302. L: 'DD.MM.YYYY',
  47303. LL: 'D. MMMM YYYY',
  47304. LLL: 'D. MMMM YYYY HH:mm',
  47305. LLLL: 'dddd, D. MMMM YYYY HH:mm',
  47306. },
  47307. calendar: {
  47308. sameDay: '[heute um] LT [Uhr]',
  47309. sameElse: 'L',
  47310. nextDay: '[morgen um] LT [Uhr]',
  47311. nextWeek: 'dddd [um] LT [Uhr]',
  47312. lastDay: '[gestern um] LT [Uhr]',
  47313. lastWeek: '[letzten] dddd [um] LT [Uhr]',
  47314. },
  47315. relativeTime: {
  47316. future: 'in %s',
  47317. past: 'vor %s',
  47318. s: 'ein paar Sekunden',
  47319. ss: '%d Sekunden',
  47320. m: processRelativeTime,
  47321. mm: '%d Minuten',
  47322. h: processRelativeTime,
  47323. hh: '%d Stunden',
  47324. d: processRelativeTime,
  47325. dd: processRelativeTime,
  47326. w: processRelativeTime,
  47327. ww: '%d Wochen',
  47328. M: processRelativeTime,
  47329. MM: processRelativeTime,
  47330. y: processRelativeTime,
  47331. yy: processRelativeTime,
  47332. },
  47333. dayOfMonthOrdinalParse: /\d{1,2}\./,
  47334. ordinal: '%d.',
  47335. week: {
  47336. dow: 1, // Monday is the first day of the week.
  47337. doy: 4, // The week that contains Jan 4th is the first week of the year.
  47338. },
  47339. });
  47340. return de;
  47341. })));
  47342. /***/ }),
  47343. /***/ 5300:
  47344. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  47345. //! moment.js locale configuration
  47346. //! locale : Maldivian [dv]
  47347. //! author : Jawish Hameed : https://github.com/jawish
  47348. ;(function (global, factory) {
  47349. true ? factory(__webpack_require__(30381)) :
  47350. 0
  47351. }(this, (function (moment) { 'use strict';
  47352. //! moment.js locale configuration
  47353. var months = [
  47354. 'ޖެނުއަރީ',
  47355. 'ފެބްރުއަރީ',
  47356. 'މާރިޗު',
  47357. 'އޭޕްރީލު',
  47358. 'މޭ',
  47359. 'ޖޫން',
  47360. 'ޖުލައި',
  47361. 'އޯގަސްޓު',
  47362. 'ސެޕްޓެމްބަރު',
  47363. 'އޮކްޓޯބަރު',
  47364. 'ނޮވެމްބަރު',
  47365. 'ޑިސެމްބަރު',
  47366. ],
  47367. weekdays = [
  47368. 'އާދިއްތަ',
  47369. 'ހޯމަ',
  47370. 'އަންގާރަ',
  47371. 'ބުދަ',
  47372. 'ބުރާސްފަތި',
  47373. 'ހުކުރު',
  47374. 'ހޮނިހިރު',
  47375. ];
  47376. var dv = moment.defineLocale('dv', {
  47377. months: months,
  47378. monthsShort: months,
  47379. weekdays: weekdays,
  47380. weekdaysShort: weekdays,
  47381. weekdaysMin: 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),
  47382. longDateFormat: {
  47383. LT: 'HH:mm',
  47384. LTS: 'HH:mm:ss',
  47385. L: 'D/M/YYYY',
  47386. LL: 'D MMMM YYYY',
  47387. LLL: 'D MMMM YYYY HH:mm',
  47388. LLLL: 'dddd D MMMM YYYY HH:mm',
  47389. },
  47390. meridiemParse: /މކ|މފ/,
  47391. isPM: function (input) {
  47392. return 'މފ' === input;
  47393. },
  47394. meridiem: function (hour, minute, isLower) {
  47395. if (hour < 12) {
  47396. return 'މކ';
  47397. } else {
  47398. return 'މފ';
  47399. }
  47400. },
  47401. calendar: {
  47402. sameDay: '[މިއަދު] LT',
  47403. nextDay: '[މާދަމާ] LT',
  47404. nextWeek: 'dddd LT',
  47405. lastDay: '[އިއްޔެ] LT',
  47406. lastWeek: '[ފާއިތުވި] dddd LT',
  47407. sameElse: 'L',
  47408. },
  47409. relativeTime: {
  47410. future: 'ތެރޭގައި %s',
  47411. past: 'ކުރިން %s',
  47412. s: 'ސިކުންތުކޮޅެއް',
  47413. ss: 'd% ސިކުންތު',
  47414. m: 'މިނިޓެއް',
  47415. mm: 'މިނިޓު %d',
  47416. h: 'ގަޑިއިރެއް',
  47417. hh: 'ގަޑިއިރު %d',
  47418. d: 'ދުވަހެއް',
  47419. dd: 'ދުވަސް %d',
  47420. M: 'މަހެއް',
  47421. MM: 'މަސް %d',
  47422. y: 'އަހަރެއް',
  47423. yy: 'އަހަރު %d',
  47424. },
  47425. preparse: function (string) {
  47426. return string.replace(/،/g, ',');
  47427. },
  47428. postformat: function (string) {
  47429. return string.replace(/,/g, '،');
  47430. },
  47431. week: {
  47432. dow: 7, // Sunday is the first day of the week.
  47433. doy: 12, // The week that contains Jan 12th is the first week of the year.
  47434. },
  47435. });
  47436. return dv;
  47437. })));
  47438. /***/ }),
  47439. /***/ 50837:
  47440. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  47441. //! moment.js locale configuration
  47442. //! locale : Greek [el]
  47443. //! author : Aggelos Karalias : https://github.com/mehiel
  47444. ;(function (global, factory) {
  47445. true ? factory(__webpack_require__(30381)) :
  47446. 0
  47447. }(this, (function (moment) { 'use strict';
  47448. //! moment.js locale configuration
  47449. function isFunction(input) {
  47450. return (
  47451. (typeof Function !== 'undefined' && input instanceof Function) ||
  47452. Object.prototype.toString.call(input) === '[object Function]'
  47453. );
  47454. }
  47455. var el = moment.defineLocale('el', {
  47456. monthsNominativeEl: 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split(
  47457. '_'
  47458. ),
  47459. monthsGenitiveEl: 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split(
  47460. '_'
  47461. ),
  47462. months: function (momentToFormat, format) {
  47463. if (!momentToFormat) {
  47464. return this._monthsNominativeEl;
  47465. } else if (
  47466. typeof format === 'string' &&
  47467. /D/.test(format.substring(0, format.indexOf('MMMM')))
  47468. ) {
  47469. // if there is a day number before 'MMMM'
  47470. return this._monthsGenitiveEl[momentToFormat.month()];
  47471. } else {
  47472. return this._monthsNominativeEl[momentToFormat.month()];
  47473. }
  47474. },
  47475. monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),
  47476. weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split(
  47477. '_'
  47478. ),
  47479. weekdaysShort: 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),
  47480. weekdaysMin: 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),
  47481. meridiem: function (hours, minutes, isLower) {
  47482. if (hours > 11) {
  47483. return isLower ? 'μμ' : 'ΜΜ';
  47484. } else {
  47485. return isLower ? 'πμ' : 'ΠΜ';
  47486. }
  47487. },
  47488. isPM: function (input) {
  47489. return (input + '').toLowerCase()[0] === 'μ';
  47490. },
  47491. meridiemParse: /[ΠΜ]\.?Μ?\.?/i,
  47492. longDateFormat: {
  47493. LT: 'h:mm A',
  47494. LTS: 'h:mm:ss A',
  47495. L: 'DD/MM/YYYY',
  47496. LL: 'D MMMM YYYY',
  47497. LLL: 'D MMMM YYYY h:mm A',
  47498. LLLL: 'dddd, D MMMM YYYY h:mm A',
  47499. },
  47500. calendarEl: {
  47501. sameDay: '[Σήμερα {}] LT',
  47502. nextDay: '[Αύριο {}] LT',
  47503. nextWeek: 'dddd [{}] LT',
  47504. lastDay: '[Χθες {}] LT',
  47505. lastWeek: function () {
  47506. switch (this.day()) {
  47507. case 6:
  47508. return '[το προηγούμενο] dddd [{}] LT';
  47509. default:
  47510. return '[την προηγούμενη] dddd [{}] LT';
  47511. }
  47512. },
  47513. sameElse: 'L',
  47514. },
  47515. calendar: function (key, mom) {
  47516. var output = this._calendarEl[key],
  47517. hours = mom && mom.hours();
  47518. if (isFunction(output)) {
  47519. output = output.apply(mom);
  47520. }
  47521. return output.replace('{}', hours % 12 === 1 ? 'στη' : 'στις');
  47522. },
  47523. relativeTime: {
  47524. future: 'σε %s',
  47525. past: '%s πριν',
  47526. s: 'λίγα δευτερόλεπτα',
  47527. ss: '%d δευτερόλεπτα',
  47528. m: 'ένα λεπτό',
  47529. mm: '%d λεπτά',
  47530. h: 'μία ώρα',
  47531. hh: '%d ώρες',
  47532. d: 'μία μέρα',
  47533. dd: '%d μέρες',
  47534. M: 'ένας μήνας',
  47535. MM: '%d μήνες',
  47536. y: 'ένας χρόνος',
  47537. yy: '%d χρόνια',
  47538. },
  47539. dayOfMonthOrdinalParse: /\d{1,2}η/,
  47540. ordinal: '%dη',
  47541. week: {
  47542. dow: 1, // Monday is the first day of the week.
  47543. doy: 4, // The week that contains Jan 4st is the first week of the year.
  47544. },
  47545. });
  47546. return el;
  47547. })));
  47548. /***/ }),
  47549. /***/ 78348:
  47550. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  47551. //! moment.js locale configuration
  47552. //! locale : English (Australia) [en-au]
  47553. //! author : Jared Morse : https://github.com/jarcoal
  47554. ;(function (global, factory) {
  47555. true ? factory(__webpack_require__(30381)) :
  47556. 0
  47557. }(this, (function (moment) { 'use strict';
  47558. //! moment.js locale configuration
  47559. var enAu = moment.defineLocale('en-au', {
  47560. months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
  47561. '_'
  47562. ),
  47563. monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  47564. weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
  47565. '_'
  47566. ),
  47567. weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  47568. weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  47569. longDateFormat: {
  47570. LT: 'h:mm A',
  47571. LTS: 'h:mm:ss A',
  47572. L: 'DD/MM/YYYY',
  47573. LL: 'D MMMM YYYY',
  47574. LLL: 'D MMMM YYYY h:mm A',
  47575. LLLL: 'dddd, D MMMM YYYY h:mm A',
  47576. },
  47577. calendar: {
  47578. sameDay: '[Today at] LT',
  47579. nextDay: '[Tomorrow at] LT',
  47580. nextWeek: 'dddd [at] LT',
  47581. lastDay: '[Yesterday at] LT',
  47582. lastWeek: '[Last] dddd [at] LT',
  47583. sameElse: 'L',
  47584. },
  47585. relativeTime: {
  47586. future: 'in %s',
  47587. past: '%s ago',
  47588. s: 'a few seconds',
  47589. ss: '%d seconds',
  47590. m: 'a minute',
  47591. mm: '%d minutes',
  47592. h: 'an hour',
  47593. hh: '%d hours',
  47594. d: 'a day',
  47595. dd: '%d days',
  47596. M: 'a month',
  47597. MM: '%d months',
  47598. y: 'a year',
  47599. yy: '%d years',
  47600. },
  47601. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  47602. ordinal: function (number) {
  47603. var b = number % 10,
  47604. output =
  47605. ~~((number % 100) / 10) === 1
  47606. ? 'th'
  47607. : b === 1
  47608. ? 'st'
  47609. : b === 2
  47610. ? 'nd'
  47611. : b === 3
  47612. ? 'rd'
  47613. : 'th';
  47614. return number + output;
  47615. },
  47616. week: {
  47617. dow: 0, // Sunday is the first day of the week.
  47618. doy: 4, // The week that contains Jan 4th is the first week of the year.
  47619. },
  47620. });
  47621. return enAu;
  47622. })));
  47623. /***/ }),
  47624. /***/ 77925:
  47625. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  47626. //! moment.js locale configuration
  47627. //! locale : English (Canada) [en-ca]
  47628. //! author : Jonathan Abourbih : https://github.com/jonbca
  47629. ;(function (global, factory) {
  47630. true ? factory(__webpack_require__(30381)) :
  47631. 0
  47632. }(this, (function (moment) { 'use strict';
  47633. //! moment.js locale configuration
  47634. var enCa = moment.defineLocale('en-ca', {
  47635. months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
  47636. '_'
  47637. ),
  47638. monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  47639. weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
  47640. '_'
  47641. ),
  47642. weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  47643. weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  47644. longDateFormat: {
  47645. LT: 'h:mm A',
  47646. LTS: 'h:mm:ss A',
  47647. L: 'YYYY-MM-DD',
  47648. LL: 'MMMM D, YYYY',
  47649. LLL: 'MMMM D, YYYY h:mm A',
  47650. LLLL: 'dddd, MMMM D, YYYY h:mm A',
  47651. },
  47652. calendar: {
  47653. sameDay: '[Today at] LT',
  47654. nextDay: '[Tomorrow at] LT',
  47655. nextWeek: 'dddd [at] LT',
  47656. lastDay: '[Yesterday at] LT',
  47657. lastWeek: '[Last] dddd [at] LT',
  47658. sameElse: 'L',
  47659. },
  47660. relativeTime: {
  47661. future: 'in %s',
  47662. past: '%s ago',
  47663. s: 'a few seconds',
  47664. ss: '%d seconds',
  47665. m: 'a minute',
  47666. mm: '%d minutes',
  47667. h: 'an hour',
  47668. hh: '%d hours',
  47669. d: 'a day',
  47670. dd: '%d days',
  47671. M: 'a month',
  47672. MM: '%d months',
  47673. y: 'a year',
  47674. yy: '%d years',
  47675. },
  47676. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  47677. ordinal: function (number) {
  47678. var b = number % 10,
  47679. output =
  47680. ~~((number % 100) / 10) === 1
  47681. ? 'th'
  47682. : b === 1
  47683. ? 'st'
  47684. : b === 2
  47685. ? 'nd'
  47686. : b === 3
  47687. ? 'rd'
  47688. : 'th';
  47689. return number + output;
  47690. },
  47691. });
  47692. return enCa;
  47693. })));
  47694. /***/ }),
  47695. /***/ 22243:
  47696. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  47697. //! moment.js locale configuration
  47698. //! locale : English (United Kingdom) [en-gb]
  47699. //! author : Chris Gedrim : https://github.com/chrisgedrim
  47700. ;(function (global, factory) {
  47701. true ? factory(__webpack_require__(30381)) :
  47702. 0
  47703. }(this, (function (moment) { 'use strict';
  47704. //! moment.js locale configuration
  47705. var enGb = moment.defineLocale('en-gb', {
  47706. months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
  47707. '_'
  47708. ),
  47709. monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  47710. weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
  47711. '_'
  47712. ),
  47713. weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  47714. weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  47715. longDateFormat: {
  47716. LT: 'HH:mm',
  47717. LTS: 'HH:mm:ss',
  47718. L: 'DD/MM/YYYY',
  47719. LL: 'D MMMM YYYY',
  47720. LLL: 'D MMMM YYYY HH:mm',
  47721. LLLL: 'dddd, D MMMM YYYY HH:mm',
  47722. },
  47723. calendar: {
  47724. sameDay: '[Today at] LT',
  47725. nextDay: '[Tomorrow at] LT',
  47726. nextWeek: 'dddd [at] LT',
  47727. lastDay: '[Yesterday at] LT',
  47728. lastWeek: '[Last] dddd [at] LT',
  47729. sameElse: 'L',
  47730. },
  47731. relativeTime: {
  47732. future: 'in %s',
  47733. past: '%s ago',
  47734. s: 'a few seconds',
  47735. ss: '%d seconds',
  47736. m: 'a minute',
  47737. mm: '%d minutes',
  47738. h: 'an hour',
  47739. hh: '%d hours',
  47740. d: 'a day',
  47741. dd: '%d days',
  47742. M: 'a month',
  47743. MM: '%d months',
  47744. y: 'a year',
  47745. yy: '%d years',
  47746. },
  47747. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  47748. ordinal: function (number) {
  47749. var b = number % 10,
  47750. output =
  47751. ~~((number % 100) / 10) === 1
  47752. ? 'th'
  47753. : b === 1
  47754. ? 'st'
  47755. : b === 2
  47756. ? 'nd'
  47757. : b === 3
  47758. ? 'rd'
  47759. : 'th';
  47760. return number + output;
  47761. },
  47762. week: {
  47763. dow: 1, // Monday is the first day of the week.
  47764. doy: 4, // The week that contains Jan 4th is the first week of the year.
  47765. },
  47766. });
  47767. return enGb;
  47768. })));
  47769. /***/ }),
  47770. /***/ 46436:
  47771. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  47772. //! moment.js locale configuration
  47773. //! locale : English (Ireland) [en-ie]
  47774. //! author : Chris Cartlidge : https://github.com/chriscartlidge
  47775. ;(function (global, factory) {
  47776. true ? factory(__webpack_require__(30381)) :
  47777. 0
  47778. }(this, (function (moment) { 'use strict';
  47779. //! moment.js locale configuration
  47780. var enIe = moment.defineLocale('en-ie', {
  47781. months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
  47782. '_'
  47783. ),
  47784. monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  47785. weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
  47786. '_'
  47787. ),
  47788. weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  47789. weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  47790. longDateFormat: {
  47791. LT: 'HH:mm',
  47792. LTS: 'HH:mm:ss',
  47793. L: 'DD/MM/YYYY',
  47794. LL: 'D MMMM YYYY',
  47795. LLL: 'D MMMM YYYY HH:mm',
  47796. LLLL: 'dddd D MMMM YYYY HH:mm',
  47797. },
  47798. calendar: {
  47799. sameDay: '[Today at] LT',
  47800. nextDay: '[Tomorrow at] LT',
  47801. nextWeek: 'dddd [at] LT',
  47802. lastDay: '[Yesterday at] LT',
  47803. lastWeek: '[Last] dddd [at] LT',
  47804. sameElse: 'L',
  47805. },
  47806. relativeTime: {
  47807. future: 'in %s',
  47808. past: '%s ago',
  47809. s: 'a few seconds',
  47810. ss: '%d seconds',
  47811. m: 'a minute',
  47812. mm: '%d minutes',
  47813. h: 'an hour',
  47814. hh: '%d hours',
  47815. d: 'a day',
  47816. dd: '%d days',
  47817. M: 'a month',
  47818. MM: '%d months',
  47819. y: 'a year',
  47820. yy: '%d years',
  47821. },
  47822. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  47823. ordinal: function (number) {
  47824. var b = number % 10,
  47825. output =
  47826. ~~((number % 100) / 10) === 1
  47827. ? 'th'
  47828. : b === 1
  47829. ? 'st'
  47830. : b === 2
  47831. ? 'nd'
  47832. : b === 3
  47833. ? 'rd'
  47834. : 'th';
  47835. return number + output;
  47836. },
  47837. week: {
  47838. dow: 1, // Monday is the first day of the week.
  47839. doy: 4, // The week that contains Jan 4th is the first week of the year.
  47840. },
  47841. });
  47842. return enIe;
  47843. })));
  47844. /***/ }),
  47845. /***/ 47207:
  47846. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  47847. //! moment.js locale configuration
  47848. //! locale : English (Israel) [en-il]
  47849. //! author : Chris Gedrim : https://github.com/chrisgedrim
  47850. ;(function (global, factory) {
  47851. true ? factory(__webpack_require__(30381)) :
  47852. 0
  47853. }(this, (function (moment) { 'use strict';
  47854. //! moment.js locale configuration
  47855. var enIl = moment.defineLocale('en-il', {
  47856. months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
  47857. '_'
  47858. ),
  47859. monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  47860. weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
  47861. '_'
  47862. ),
  47863. weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  47864. weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  47865. longDateFormat: {
  47866. LT: 'HH:mm',
  47867. LTS: 'HH:mm:ss',
  47868. L: 'DD/MM/YYYY',
  47869. LL: 'D MMMM YYYY',
  47870. LLL: 'D MMMM YYYY HH:mm',
  47871. LLLL: 'dddd, D MMMM YYYY HH:mm',
  47872. },
  47873. calendar: {
  47874. sameDay: '[Today at] LT',
  47875. nextDay: '[Tomorrow at] LT',
  47876. nextWeek: 'dddd [at] LT',
  47877. lastDay: '[Yesterday at] LT',
  47878. lastWeek: '[Last] dddd [at] LT',
  47879. sameElse: 'L',
  47880. },
  47881. relativeTime: {
  47882. future: 'in %s',
  47883. past: '%s ago',
  47884. s: 'a few seconds',
  47885. ss: '%d seconds',
  47886. m: 'a minute',
  47887. mm: '%d minutes',
  47888. h: 'an hour',
  47889. hh: '%d hours',
  47890. d: 'a day',
  47891. dd: '%d days',
  47892. M: 'a month',
  47893. MM: '%d months',
  47894. y: 'a year',
  47895. yy: '%d years',
  47896. },
  47897. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  47898. ordinal: function (number) {
  47899. var b = number % 10,
  47900. output =
  47901. ~~((number % 100) / 10) === 1
  47902. ? 'th'
  47903. : b === 1
  47904. ? 'st'
  47905. : b === 2
  47906. ? 'nd'
  47907. : b === 3
  47908. ? 'rd'
  47909. : 'th';
  47910. return number + output;
  47911. },
  47912. });
  47913. return enIl;
  47914. })));
  47915. /***/ }),
  47916. /***/ 44175:
  47917. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  47918. //! moment.js locale configuration
  47919. //! locale : English (India) [en-in]
  47920. //! author : Jatin Agrawal : https://github.com/jatinag22
  47921. ;(function (global, factory) {
  47922. true ? factory(__webpack_require__(30381)) :
  47923. 0
  47924. }(this, (function (moment) { 'use strict';
  47925. //! moment.js locale configuration
  47926. var enIn = moment.defineLocale('en-in', {
  47927. months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
  47928. '_'
  47929. ),
  47930. monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  47931. weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
  47932. '_'
  47933. ),
  47934. weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  47935. weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  47936. longDateFormat: {
  47937. LT: 'h:mm A',
  47938. LTS: 'h:mm:ss A',
  47939. L: 'DD/MM/YYYY',
  47940. LL: 'D MMMM YYYY',
  47941. LLL: 'D MMMM YYYY h:mm A',
  47942. LLLL: 'dddd, D MMMM YYYY h:mm A',
  47943. },
  47944. calendar: {
  47945. sameDay: '[Today at] LT',
  47946. nextDay: '[Tomorrow at] LT',
  47947. nextWeek: 'dddd [at] LT',
  47948. lastDay: '[Yesterday at] LT',
  47949. lastWeek: '[Last] dddd [at] LT',
  47950. sameElse: 'L',
  47951. },
  47952. relativeTime: {
  47953. future: 'in %s',
  47954. past: '%s ago',
  47955. s: 'a few seconds',
  47956. ss: '%d seconds',
  47957. m: 'a minute',
  47958. mm: '%d minutes',
  47959. h: 'an hour',
  47960. hh: '%d hours',
  47961. d: 'a day',
  47962. dd: '%d days',
  47963. M: 'a month',
  47964. MM: '%d months',
  47965. y: 'a year',
  47966. yy: '%d years',
  47967. },
  47968. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  47969. ordinal: function (number) {
  47970. var b = number % 10,
  47971. output =
  47972. ~~((number % 100) / 10) === 1
  47973. ? 'th'
  47974. : b === 1
  47975. ? 'st'
  47976. : b === 2
  47977. ? 'nd'
  47978. : b === 3
  47979. ? 'rd'
  47980. : 'th';
  47981. return number + output;
  47982. },
  47983. week: {
  47984. dow: 0, // Sunday is the first day of the week.
  47985. doy: 6, // The week that contains Jan 1st is the first week of the year.
  47986. },
  47987. });
  47988. return enIn;
  47989. })));
  47990. /***/ }),
  47991. /***/ 76319:
  47992. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  47993. //! moment.js locale configuration
  47994. //! locale : English (New Zealand) [en-nz]
  47995. //! author : Luke McGregor : https://github.com/lukemcgregor
  47996. ;(function (global, factory) {
  47997. true ? factory(__webpack_require__(30381)) :
  47998. 0
  47999. }(this, (function (moment) { 'use strict';
  48000. //! moment.js locale configuration
  48001. var enNz = moment.defineLocale('en-nz', {
  48002. months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
  48003. '_'
  48004. ),
  48005. monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  48006. weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
  48007. '_'
  48008. ),
  48009. weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  48010. weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  48011. longDateFormat: {
  48012. LT: 'h:mm A',
  48013. LTS: 'h:mm:ss A',
  48014. L: 'DD/MM/YYYY',
  48015. LL: 'D MMMM YYYY',
  48016. LLL: 'D MMMM YYYY h:mm A',
  48017. LLLL: 'dddd, D MMMM YYYY h:mm A',
  48018. },
  48019. calendar: {
  48020. sameDay: '[Today at] LT',
  48021. nextDay: '[Tomorrow at] LT',
  48022. nextWeek: 'dddd [at] LT',
  48023. lastDay: '[Yesterday at] LT',
  48024. lastWeek: '[Last] dddd [at] LT',
  48025. sameElse: 'L',
  48026. },
  48027. relativeTime: {
  48028. future: 'in %s',
  48029. past: '%s ago',
  48030. s: 'a few seconds',
  48031. ss: '%d seconds',
  48032. m: 'a minute',
  48033. mm: '%d minutes',
  48034. h: 'an hour',
  48035. hh: '%d hours',
  48036. d: 'a day',
  48037. dd: '%d days',
  48038. M: 'a month',
  48039. MM: '%d months',
  48040. y: 'a year',
  48041. yy: '%d years',
  48042. },
  48043. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  48044. ordinal: function (number) {
  48045. var b = number % 10,
  48046. output =
  48047. ~~((number % 100) / 10) === 1
  48048. ? 'th'
  48049. : b === 1
  48050. ? 'st'
  48051. : b === 2
  48052. ? 'nd'
  48053. : b === 3
  48054. ? 'rd'
  48055. : 'th';
  48056. return number + output;
  48057. },
  48058. week: {
  48059. dow: 1, // Monday is the first day of the week.
  48060. doy: 4, // The week that contains Jan 4th is the first week of the year.
  48061. },
  48062. });
  48063. return enNz;
  48064. })));
  48065. /***/ }),
  48066. /***/ 31662:
  48067. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  48068. //! moment.js locale configuration
  48069. //! locale : English (Singapore) [en-sg]
  48070. //! author : Matthew Castrillon-Madrigal : https://github.com/techdimension
  48071. ;(function (global, factory) {
  48072. true ? factory(__webpack_require__(30381)) :
  48073. 0
  48074. }(this, (function (moment) { 'use strict';
  48075. //! moment.js locale configuration
  48076. var enSg = moment.defineLocale('en-sg', {
  48077. months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
  48078. '_'
  48079. ),
  48080. monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  48081. weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
  48082. '_'
  48083. ),
  48084. weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  48085. weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  48086. longDateFormat: {
  48087. LT: 'HH:mm',
  48088. LTS: 'HH:mm:ss',
  48089. L: 'DD/MM/YYYY',
  48090. LL: 'D MMMM YYYY',
  48091. LLL: 'D MMMM YYYY HH:mm',
  48092. LLLL: 'dddd, D MMMM YYYY HH:mm',
  48093. },
  48094. calendar: {
  48095. sameDay: '[Today at] LT',
  48096. nextDay: '[Tomorrow at] LT',
  48097. nextWeek: 'dddd [at] LT',
  48098. lastDay: '[Yesterday at] LT',
  48099. lastWeek: '[Last] dddd [at] LT',
  48100. sameElse: 'L',
  48101. },
  48102. relativeTime: {
  48103. future: 'in %s',
  48104. past: '%s ago',
  48105. s: 'a few seconds',
  48106. ss: '%d seconds',
  48107. m: 'a minute',
  48108. mm: '%d minutes',
  48109. h: 'an hour',
  48110. hh: '%d hours',
  48111. d: 'a day',
  48112. dd: '%d days',
  48113. M: 'a month',
  48114. MM: '%d months',
  48115. y: 'a year',
  48116. yy: '%d years',
  48117. },
  48118. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  48119. ordinal: function (number) {
  48120. var b = number % 10,
  48121. output =
  48122. ~~((number % 100) / 10) === 1
  48123. ? 'th'
  48124. : b === 1
  48125. ? 'st'
  48126. : b === 2
  48127. ? 'nd'
  48128. : b === 3
  48129. ? 'rd'
  48130. : 'th';
  48131. return number + output;
  48132. },
  48133. week: {
  48134. dow: 1, // Monday is the first day of the week.
  48135. doy: 4, // The week that contains Jan 4th is the first week of the year.
  48136. },
  48137. });
  48138. return enSg;
  48139. })));
  48140. /***/ }),
  48141. /***/ 92915:
  48142. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  48143. //! moment.js locale configuration
  48144. //! locale : Esperanto [eo]
  48145. //! author : Colin Dean : https://github.com/colindean
  48146. //! author : Mia Nordentoft Imperatori : https://github.com/miestasmia
  48147. //! comment : miestasmia corrected the translation by colindean
  48148. //! comment : Vivakvo corrected the translation by colindean and miestasmia
  48149. ;(function (global, factory) {
  48150. true ? factory(__webpack_require__(30381)) :
  48151. 0
  48152. }(this, (function (moment) { 'use strict';
  48153. //! moment.js locale configuration
  48154. var eo = moment.defineLocale('eo', {
  48155. months: 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split(
  48156. '_'
  48157. ),
  48158. monthsShort: 'jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec'.split('_'),
  48159. weekdays: 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'),
  48160. weekdaysShort: 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'),
  48161. weekdaysMin: 'di_lu_ma_me_ĵa_ve_sa'.split('_'),
  48162. longDateFormat: {
  48163. LT: 'HH:mm',
  48164. LTS: 'HH:mm:ss',
  48165. L: 'YYYY-MM-DD',
  48166. LL: '[la] D[-an de] MMMM, YYYY',
  48167. LLL: '[la] D[-an de] MMMM, YYYY HH:mm',
  48168. LLLL: 'dddd[n], [la] D[-an de] MMMM, YYYY HH:mm',
  48169. llll: 'ddd, [la] D[-an de] MMM, YYYY HH:mm',
  48170. },
  48171. meridiemParse: /[ap]\.t\.m/i,
  48172. isPM: function (input) {
  48173. return input.charAt(0).toLowerCase() === 'p';
  48174. },
  48175. meridiem: function (hours, minutes, isLower) {
  48176. if (hours > 11) {
  48177. return isLower ? 'p.t.m.' : 'P.T.M.';
  48178. } else {
  48179. return isLower ? 'a.t.m.' : 'A.T.M.';
  48180. }
  48181. },
  48182. calendar: {
  48183. sameDay: '[Hodiaŭ je] LT',
  48184. nextDay: '[Morgaŭ je] LT',
  48185. nextWeek: 'dddd[n je] LT',
  48186. lastDay: '[Hieraŭ je] LT',
  48187. lastWeek: '[pasintan] dddd[n je] LT',
  48188. sameElse: 'L',
  48189. },
  48190. relativeTime: {
  48191. future: 'post %s',
  48192. past: 'antaŭ %s',
  48193. s: 'kelkaj sekundoj',
  48194. ss: '%d sekundoj',
  48195. m: 'unu minuto',
  48196. mm: '%d minutoj',
  48197. h: 'unu horo',
  48198. hh: '%d horoj',
  48199. d: 'unu tago', //ne 'diurno', ĉar estas uzita por proksimumo
  48200. dd: '%d tagoj',
  48201. M: 'unu monato',
  48202. MM: '%d monatoj',
  48203. y: 'unu jaro',
  48204. yy: '%d jaroj',
  48205. },
  48206. dayOfMonthOrdinalParse: /\d{1,2}a/,
  48207. ordinal: '%da',
  48208. week: {
  48209. dow: 1, // Monday is the first day of the week.
  48210. doy: 7, // The week that contains Jan 7th is the first week of the year.
  48211. },
  48212. });
  48213. return eo;
  48214. })));
  48215. /***/ }),
  48216. /***/ 55251:
  48217. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  48218. //! moment.js locale configuration
  48219. //! locale : Spanish (Dominican Republic) [es-do]
  48220. ;(function (global, factory) {
  48221. true ? factory(__webpack_require__(30381)) :
  48222. 0
  48223. }(this, (function (moment) { 'use strict';
  48224. //! moment.js locale configuration
  48225. var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
  48226. '_'
  48227. ),
  48228. monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
  48229. monthsParse = [
  48230. /^ene/i,
  48231. /^feb/i,
  48232. /^mar/i,
  48233. /^abr/i,
  48234. /^may/i,
  48235. /^jun/i,
  48236. /^jul/i,
  48237. /^ago/i,
  48238. /^sep/i,
  48239. /^oct/i,
  48240. /^nov/i,
  48241. /^dic/i,
  48242. ],
  48243. monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
  48244. var esDo = moment.defineLocale('es-do', {
  48245. months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
  48246. '_'
  48247. ),
  48248. monthsShort: function (m, format) {
  48249. if (!m) {
  48250. return monthsShortDot;
  48251. } else if (/-MMM-/.test(format)) {
  48252. return monthsShort[m.month()];
  48253. } else {
  48254. return monthsShortDot[m.month()];
  48255. }
  48256. },
  48257. monthsRegex: monthsRegex,
  48258. monthsShortRegex: monthsRegex,
  48259. monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
  48260. monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
  48261. monthsParse: monthsParse,
  48262. longMonthsParse: monthsParse,
  48263. shortMonthsParse: monthsParse,
  48264. weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
  48265. weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
  48266. weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
  48267. weekdaysParseExact: true,
  48268. longDateFormat: {
  48269. LT: 'h:mm A',
  48270. LTS: 'h:mm:ss A',
  48271. L: 'DD/MM/YYYY',
  48272. LL: 'D [de] MMMM [de] YYYY',
  48273. LLL: 'D [de] MMMM [de] YYYY h:mm A',
  48274. LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',
  48275. },
  48276. calendar: {
  48277. sameDay: function () {
  48278. return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  48279. },
  48280. nextDay: function () {
  48281. return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  48282. },
  48283. nextWeek: function () {
  48284. return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  48285. },
  48286. lastDay: function () {
  48287. return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  48288. },
  48289. lastWeek: function () {
  48290. return (
  48291. '[el] dddd [pasado a la' +
  48292. (this.hours() !== 1 ? 's' : '') +
  48293. '] LT'
  48294. );
  48295. },
  48296. sameElse: 'L',
  48297. },
  48298. relativeTime: {
  48299. future: 'en %s',
  48300. past: 'hace %s',
  48301. s: 'unos segundos',
  48302. ss: '%d segundos',
  48303. m: 'un minuto',
  48304. mm: '%d minutos',
  48305. h: 'una hora',
  48306. hh: '%d horas',
  48307. d: 'un día',
  48308. dd: '%d días',
  48309. w: 'una semana',
  48310. ww: '%d semanas',
  48311. M: 'un mes',
  48312. MM: '%d meses',
  48313. y: 'un año',
  48314. yy: '%d años',
  48315. },
  48316. dayOfMonthOrdinalParse: /\d{1,2}º/,
  48317. ordinal: '%dº',
  48318. week: {
  48319. dow: 1, // Monday is the first day of the week.
  48320. doy: 4, // The week that contains Jan 4th is the first week of the year.
  48321. },
  48322. });
  48323. return esDo;
  48324. })));
  48325. /***/ }),
  48326. /***/ 96112:
  48327. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  48328. //! moment.js locale configuration
  48329. //! locale : Spanish (Mexico) [es-mx]
  48330. //! author : JC Franco : https://github.com/jcfranco
  48331. ;(function (global, factory) {
  48332. true ? factory(__webpack_require__(30381)) :
  48333. 0
  48334. }(this, (function (moment) { 'use strict';
  48335. //! moment.js locale configuration
  48336. var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
  48337. '_'
  48338. ),
  48339. monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
  48340. monthsParse = [
  48341. /^ene/i,
  48342. /^feb/i,
  48343. /^mar/i,
  48344. /^abr/i,
  48345. /^may/i,
  48346. /^jun/i,
  48347. /^jul/i,
  48348. /^ago/i,
  48349. /^sep/i,
  48350. /^oct/i,
  48351. /^nov/i,
  48352. /^dic/i,
  48353. ],
  48354. monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
  48355. var esMx = moment.defineLocale('es-mx', {
  48356. months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
  48357. '_'
  48358. ),
  48359. monthsShort: function (m, format) {
  48360. if (!m) {
  48361. return monthsShortDot;
  48362. } else if (/-MMM-/.test(format)) {
  48363. return monthsShort[m.month()];
  48364. } else {
  48365. return monthsShortDot[m.month()];
  48366. }
  48367. },
  48368. monthsRegex: monthsRegex,
  48369. monthsShortRegex: monthsRegex,
  48370. monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
  48371. monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
  48372. monthsParse: monthsParse,
  48373. longMonthsParse: monthsParse,
  48374. shortMonthsParse: monthsParse,
  48375. weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
  48376. weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
  48377. weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
  48378. weekdaysParseExact: true,
  48379. longDateFormat: {
  48380. LT: 'H:mm',
  48381. LTS: 'H:mm:ss',
  48382. L: 'DD/MM/YYYY',
  48383. LL: 'D [de] MMMM [de] YYYY',
  48384. LLL: 'D [de] MMMM [de] YYYY H:mm',
  48385. LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
  48386. },
  48387. calendar: {
  48388. sameDay: function () {
  48389. return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  48390. },
  48391. nextDay: function () {
  48392. return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  48393. },
  48394. nextWeek: function () {
  48395. return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  48396. },
  48397. lastDay: function () {
  48398. return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  48399. },
  48400. lastWeek: function () {
  48401. return (
  48402. '[el] dddd [pasado a la' +
  48403. (this.hours() !== 1 ? 's' : '') +
  48404. '] LT'
  48405. );
  48406. },
  48407. sameElse: 'L',
  48408. },
  48409. relativeTime: {
  48410. future: 'en %s',
  48411. past: 'hace %s',
  48412. s: 'unos segundos',
  48413. ss: '%d segundos',
  48414. m: 'un minuto',
  48415. mm: '%d minutos',
  48416. h: 'una hora',
  48417. hh: '%d horas',
  48418. d: 'un día',
  48419. dd: '%d días',
  48420. w: 'una semana',
  48421. ww: '%d semanas',
  48422. M: 'un mes',
  48423. MM: '%d meses',
  48424. y: 'un año',
  48425. yy: '%d años',
  48426. },
  48427. dayOfMonthOrdinalParse: /\d{1,2}º/,
  48428. ordinal: '%dº',
  48429. week: {
  48430. dow: 0, // Sunday is the first day of the week.
  48431. doy: 4, // The week that contains Jan 4th is the first week of the year.
  48432. },
  48433. invalidDate: 'Fecha inválida',
  48434. });
  48435. return esMx;
  48436. })));
  48437. /***/ }),
  48438. /***/ 71146:
  48439. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  48440. //! moment.js locale configuration
  48441. //! locale : Spanish (United States) [es-us]
  48442. //! author : bustta : https://github.com/bustta
  48443. //! author : chrisrodz : https://github.com/chrisrodz
  48444. ;(function (global, factory) {
  48445. true ? factory(__webpack_require__(30381)) :
  48446. 0
  48447. }(this, (function (moment) { 'use strict';
  48448. //! moment.js locale configuration
  48449. var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
  48450. '_'
  48451. ),
  48452. monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
  48453. monthsParse = [
  48454. /^ene/i,
  48455. /^feb/i,
  48456. /^mar/i,
  48457. /^abr/i,
  48458. /^may/i,
  48459. /^jun/i,
  48460. /^jul/i,
  48461. /^ago/i,
  48462. /^sep/i,
  48463. /^oct/i,
  48464. /^nov/i,
  48465. /^dic/i,
  48466. ],
  48467. monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
  48468. var esUs = moment.defineLocale('es-us', {
  48469. months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
  48470. '_'
  48471. ),
  48472. monthsShort: function (m, format) {
  48473. if (!m) {
  48474. return monthsShortDot;
  48475. } else if (/-MMM-/.test(format)) {
  48476. return monthsShort[m.month()];
  48477. } else {
  48478. return monthsShortDot[m.month()];
  48479. }
  48480. },
  48481. monthsRegex: monthsRegex,
  48482. monthsShortRegex: monthsRegex,
  48483. monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
  48484. monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
  48485. monthsParse: monthsParse,
  48486. longMonthsParse: monthsParse,
  48487. shortMonthsParse: monthsParse,
  48488. weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
  48489. weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
  48490. weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
  48491. weekdaysParseExact: true,
  48492. longDateFormat: {
  48493. LT: 'h:mm A',
  48494. LTS: 'h:mm:ss A',
  48495. L: 'MM/DD/YYYY',
  48496. LL: 'D [de] MMMM [de] YYYY',
  48497. LLL: 'D [de] MMMM [de] YYYY h:mm A',
  48498. LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',
  48499. },
  48500. calendar: {
  48501. sameDay: function () {
  48502. return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  48503. },
  48504. nextDay: function () {
  48505. return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  48506. },
  48507. nextWeek: function () {
  48508. return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  48509. },
  48510. lastDay: function () {
  48511. return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  48512. },
  48513. lastWeek: function () {
  48514. return (
  48515. '[el] dddd [pasado a la' +
  48516. (this.hours() !== 1 ? 's' : '') +
  48517. '] LT'
  48518. );
  48519. },
  48520. sameElse: 'L',
  48521. },
  48522. relativeTime: {
  48523. future: 'en %s',
  48524. past: 'hace %s',
  48525. s: 'unos segundos',
  48526. ss: '%d segundos',
  48527. m: 'un minuto',
  48528. mm: '%d minutos',
  48529. h: 'una hora',
  48530. hh: '%d horas',
  48531. d: 'un día',
  48532. dd: '%d días',
  48533. w: 'una semana',
  48534. ww: '%d semanas',
  48535. M: 'un mes',
  48536. MM: '%d meses',
  48537. y: 'un año',
  48538. yy: '%d años',
  48539. },
  48540. dayOfMonthOrdinalParse: /\d{1,2}º/,
  48541. ordinal: '%dº',
  48542. week: {
  48543. dow: 0, // Sunday is the first day of the week.
  48544. doy: 6, // The week that contains Jan 6th is the first week of the year.
  48545. },
  48546. });
  48547. return esUs;
  48548. })));
  48549. /***/ }),
  48550. /***/ 55655:
  48551. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  48552. //! moment.js locale configuration
  48553. //! locale : Spanish [es]
  48554. //! author : Julio Napurí : https://github.com/julionc
  48555. ;(function (global, factory) {
  48556. true ? factory(__webpack_require__(30381)) :
  48557. 0
  48558. }(this, (function (moment) { 'use strict';
  48559. //! moment.js locale configuration
  48560. var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
  48561. '_'
  48562. ),
  48563. monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
  48564. monthsParse = [
  48565. /^ene/i,
  48566. /^feb/i,
  48567. /^mar/i,
  48568. /^abr/i,
  48569. /^may/i,
  48570. /^jun/i,
  48571. /^jul/i,
  48572. /^ago/i,
  48573. /^sep/i,
  48574. /^oct/i,
  48575. /^nov/i,
  48576. /^dic/i,
  48577. ],
  48578. monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
  48579. var es = moment.defineLocale('es', {
  48580. months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
  48581. '_'
  48582. ),
  48583. monthsShort: function (m, format) {
  48584. if (!m) {
  48585. return monthsShortDot;
  48586. } else if (/-MMM-/.test(format)) {
  48587. return monthsShort[m.month()];
  48588. } else {
  48589. return monthsShortDot[m.month()];
  48590. }
  48591. },
  48592. monthsRegex: monthsRegex,
  48593. monthsShortRegex: monthsRegex,
  48594. monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
  48595. monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
  48596. monthsParse: monthsParse,
  48597. longMonthsParse: monthsParse,
  48598. shortMonthsParse: monthsParse,
  48599. weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
  48600. weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
  48601. weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
  48602. weekdaysParseExact: true,
  48603. longDateFormat: {
  48604. LT: 'H:mm',
  48605. LTS: 'H:mm:ss',
  48606. L: 'DD/MM/YYYY',
  48607. LL: 'D [de] MMMM [de] YYYY',
  48608. LLL: 'D [de] MMMM [de] YYYY H:mm',
  48609. LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
  48610. },
  48611. calendar: {
  48612. sameDay: function () {
  48613. return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  48614. },
  48615. nextDay: function () {
  48616. return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  48617. },
  48618. nextWeek: function () {
  48619. return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  48620. },
  48621. lastDay: function () {
  48622. return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
  48623. },
  48624. lastWeek: function () {
  48625. return (
  48626. '[el] dddd [pasado a la' +
  48627. (this.hours() !== 1 ? 's' : '') +
  48628. '] LT'
  48629. );
  48630. },
  48631. sameElse: 'L',
  48632. },
  48633. relativeTime: {
  48634. future: 'en %s',
  48635. past: 'hace %s',
  48636. s: 'unos segundos',
  48637. ss: '%d segundos',
  48638. m: 'un minuto',
  48639. mm: '%d minutos',
  48640. h: 'una hora',
  48641. hh: '%d horas',
  48642. d: 'un día',
  48643. dd: '%d días',
  48644. w: 'una semana',
  48645. ww: '%d semanas',
  48646. M: 'un mes',
  48647. MM: '%d meses',
  48648. y: 'un año',
  48649. yy: '%d años',
  48650. },
  48651. dayOfMonthOrdinalParse: /\d{1,2}º/,
  48652. ordinal: '%dº',
  48653. week: {
  48654. dow: 1, // Monday is the first day of the week.
  48655. doy: 4, // The week that contains Jan 4th is the first week of the year.
  48656. },
  48657. invalidDate: 'Fecha inválida',
  48658. });
  48659. return es;
  48660. })));
  48661. /***/ }),
  48662. /***/ 5603:
  48663. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  48664. //! moment.js locale configuration
  48665. //! locale : Estonian [et]
  48666. //! author : Henry Kehlmann : https://github.com/madhenry
  48667. //! improvements : Illimar Tambek : https://github.com/ragulka
  48668. ;(function (global, factory) {
  48669. true ? factory(__webpack_require__(30381)) :
  48670. 0
  48671. }(this, (function (moment) { 'use strict';
  48672. //! moment.js locale configuration
  48673. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  48674. var format = {
  48675. s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'],
  48676. ss: [number + 'sekundi', number + 'sekundit'],
  48677. m: ['ühe minuti', 'üks minut'],
  48678. mm: [number + ' minuti', number + ' minutit'],
  48679. h: ['ühe tunni', 'tund aega', 'üks tund'],
  48680. hh: [number + ' tunni', number + ' tundi'],
  48681. d: ['ühe päeva', 'üks päev'],
  48682. M: ['kuu aja', 'kuu aega', 'üks kuu'],
  48683. MM: [number + ' kuu', number + ' kuud'],
  48684. y: ['ühe aasta', 'aasta', 'üks aasta'],
  48685. yy: [number + ' aasta', number + ' aastat'],
  48686. };
  48687. if (withoutSuffix) {
  48688. return format[key][2] ? format[key][2] : format[key][1];
  48689. }
  48690. return isFuture ? format[key][0] : format[key][1];
  48691. }
  48692. var et = moment.defineLocale('et', {
  48693. months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split(
  48694. '_'
  48695. ),
  48696. monthsShort: 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split(
  48697. '_'
  48698. ),
  48699. weekdays: 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split(
  48700. '_'
  48701. ),
  48702. weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),
  48703. weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),
  48704. longDateFormat: {
  48705. LT: 'H:mm',
  48706. LTS: 'H:mm:ss',
  48707. L: 'DD.MM.YYYY',
  48708. LL: 'D. MMMM YYYY',
  48709. LLL: 'D. MMMM YYYY H:mm',
  48710. LLLL: 'dddd, D. MMMM YYYY H:mm',
  48711. },
  48712. calendar: {
  48713. sameDay: '[Täna,] LT',
  48714. nextDay: '[Homme,] LT',
  48715. nextWeek: '[Järgmine] dddd LT',
  48716. lastDay: '[Eile,] LT',
  48717. lastWeek: '[Eelmine] dddd LT',
  48718. sameElse: 'L',
  48719. },
  48720. relativeTime: {
  48721. future: '%s pärast',
  48722. past: '%s tagasi',
  48723. s: processRelativeTime,
  48724. ss: processRelativeTime,
  48725. m: processRelativeTime,
  48726. mm: processRelativeTime,
  48727. h: processRelativeTime,
  48728. hh: processRelativeTime,
  48729. d: processRelativeTime,
  48730. dd: '%d päeva',
  48731. M: processRelativeTime,
  48732. MM: processRelativeTime,
  48733. y: processRelativeTime,
  48734. yy: processRelativeTime,
  48735. },
  48736. dayOfMonthOrdinalParse: /\d{1,2}\./,
  48737. ordinal: '%d.',
  48738. week: {
  48739. dow: 1, // Monday is the first day of the week.
  48740. doy: 4, // The week that contains Jan 4th is the first week of the year.
  48741. },
  48742. });
  48743. return et;
  48744. })));
  48745. /***/ }),
  48746. /***/ 77763:
  48747. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  48748. //! moment.js locale configuration
  48749. //! locale : Basque [eu]
  48750. //! author : Eneko Illarramendi : https://github.com/eillarra
  48751. ;(function (global, factory) {
  48752. true ? factory(__webpack_require__(30381)) :
  48753. 0
  48754. }(this, (function (moment) { 'use strict';
  48755. //! moment.js locale configuration
  48756. var eu = moment.defineLocale('eu', {
  48757. months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split(
  48758. '_'
  48759. ),
  48760. monthsShort: 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split(
  48761. '_'
  48762. ),
  48763. monthsParseExact: true,
  48764. weekdays: 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split(
  48765. '_'
  48766. ),
  48767. weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'),
  48768. weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'),
  48769. weekdaysParseExact: true,
  48770. longDateFormat: {
  48771. LT: 'HH:mm',
  48772. LTS: 'HH:mm:ss',
  48773. L: 'YYYY-MM-DD',
  48774. LL: 'YYYY[ko] MMMM[ren] D[a]',
  48775. LLL: 'YYYY[ko] MMMM[ren] D[a] HH:mm',
  48776. LLLL: 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm',
  48777. l: 'YYYY-M-D',
  48778. ll: 'YYYY[ko] MMM D[a]',
  48779. lll: 'YYYY[ko] MMM D[a] HH:mm',
  48780. llll: 'ddd, YYYY[ko] MMM D[a] HH:mm',
  48781. },
  48782. calendar: {
  48783. sameDay: '[gaur] LT[etan]',
  48784. nextDay: '[bihar] LT[etan]',
  48785. nextWeek: 'dddd LT[etan]',
  48786. lastDay: '[atzo] LT[etan]',
  48787. lastWeek: '[aurreko] dddd LT[etan]',
  48788. sameElse: 'L',
  48789. },
  48790. relativeTime: {
  48791. future: '%s barru',
  48792. past: 'duela %s',
  48793. s: 'segundo batzuk',
  48794. ss: '%d segundo',
  48795. m: 'minutu bat',
  48796. mm: '%d minutu',
  48797. h: 'ordu bat',
  48798. hh: '%d ordu',
  48799. d: 'egun bat',
  48800. dd: '%d egun',
  48801. M: 'hilabete bat',
  48802. MM: '%d hilabete',
  48803. y: 'urte bat',
  48804. yy: '%d urte',
  48805. },
  48806. dayOfMonthOrdinalParse: /\d{1,2}\./,
  48807. ordinal: '%d.',
  48808. week: {
  48809. dow: 1, // Monday is the first day of the week.
  48810. doy: 7, // The week that contains Jan 7th is the first week of the year.
  48811. },
  48812. });
  48813. return eu;
  48814. })));
  48815. /***/ }),
  48816. /***/ 76959:
  48817. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  48818. //! moment.js locale configuration
  48819. //! locale : Persian [fa]
  48820. //! author : Ebrahim Byagowi : https://github.com/ebraminio
  48821. ;(function (global, factory) {
  48822. true ? factory(__webpack_require__(30381)) :
  48823. 0
  48824. }(this, (function (moment) { 'use strict';
  48825. //! moment.js locale configuration
  48826. var symbolMap = {
  48827. 1: '۱',
  48828. 2: '۲',
  48829. 3: '۳',
  48830. 4: '۴',
  48831. 5: '۵',
  48832. 6: '۶',
  48833. 7: '۷',
  48834. 8: '۸',
  48835. 9: '۹',
  48836. 0: '۰',
  48837. },
  48838. numberMap = {
  48839. '۱': '1',
  48840. '۲': '2',
  48841. '۳': '3',
  48842. '۴': '4',
  48843. '۵': '5',
  48844. '۶': '6',
  48845. '۷': '7',
  48846. '۸': '8',
  48847. '۹': '9',
  48848. '۰': '0',
  48849. };
  48850. var fa = moment.defineLocale('fa', {
  48851. months: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(
  48852. '_'
  48853. ),
  48854. monthsShort: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(
  48855. '_'
  48856. ),
  48857. weekdays: 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split(
  48858. '_'
  48859. ),
  48860. weekdaysShort: 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split(
  48861. '_'
  48862. ),
  48863. weekdaysMin: 'ی_د_س_چ_پ_ج_ش'.split('_'),
  48864. weekdaysParseExact: true,
  48865. longDateFormat: {
  48866. LT: 'HH:mm',
  48867. LTS: 'HH:mm:ss',
  48868. L: 'DD/MM/YYYY',
  48869. LL: 'D MMMM YYYY',
  48870. LLL: 'D MMMM YYYY HH:mm',
  48871. LLLL: 'dddd, D MMMM YYYY HH:mm',
  48872. },
  48873. meridiemParse: /قبل از ظهر|بعد از ظهر/,
  48874. isPM: function (input) {
  48875. return /بعد از ظهر/.test(input);
  48876. },
  48877. meridiem: function (hour, minute, isLower) {
  48878. if (hour < 12) {
  48879. return 'قبل از ظهر';
  48880. } else {
  48881. return 'بعد از ظهر';
  48882. }
  48883. },
  48884. calendar: {
  48885. sameDay: '[امروز ساعت] LT',
  48886. nextDay: '[فردا ساعت] LT',
  48887. nextWeek: 'dddd [ساعت] LT',
  48888. lastDay: '[دیروز ساعت] LT',
  48889. lastWeek: 'dddd [پیش] [ساعت] LT',
  48890. sameElse: 'L',
  48891. },
  48892. relativeTime: {
  48893. future: 'در %s',
  48894. past: '%s پیش',
  48895. s: 'چند ثانیه',
  48896. ss: '%d ثانیه',
  48897. m: 'یک دقیقه',
  48898. mm: '%d دقیقه',
  48899. h: 'یک ساعت',
  48900. hh: '%d ساعت',
  48901. d: 'یک روز',
  48902. dd: '%d روز',
  48903. M: 'یک ماه',
  48904. MM: '%d ماه',
  48905. y: 'یک سال',
  48906. yy: '%d سال',
  48907. },
  48908. preparse: function (string) {
  48909. return string
  48910. .replace(/[۰-۹]/g, function (match) {
  48911. return numberMap[match];
  48912. })
  48913. .replace(/،/g, ',');
  48914. },
  48915. postformat: function (string) {
  48916. return string
  48917. .replace(/\d/g, function (match) {
  48918. return symbolMap[match];
  48919. })
  48920. .replace(/,/g, '،');
  48921. },
  48922. dayOfMonthOrdinalParse: /\d{1,2}م/,
  48923. ordinal: '%dم',
  48924. week: {
  48925. dow: 6, // Saturday is the first day of the week.
  48926. doy: 12, // The week that contains Jan 12th is the first week of the year.
  48927. },
  48928. });
  48929. return fa;
  48930. })));
  48931. /***/ }),
  48932. /***/ 11897:
  48933. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  48934. //! moment.js locale configuration
  48935. //! locale : Finnish [fi]
  48936. //! author : Tarmo Aidantausta : https://github.com/bleadof
  48937. ;(function (global, factory) {
  48938. true ? factory(__webpack_require__(30381)) :
  48939. 0
  48940. }(this, (function (moment) { 'use strict';
  48941. //! moment.js locale configuration
  48942. var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(
  48943. ' '
  48944. ),
  48945. numbersFuture = [
  48946. 'nolla',
  48947. 'yhden',
  48948. 'kahden',
  48949. 'kolmen',
  48950. 'neljän',
  48951. 'viiden',
  48952. 'kuuden',
  48953. numbersPast[7],
  48954. numbersPast[8],
  48955. numbersPast[9],
  48956. ];
  48957. function translate(number, withoutSuffix, key, isFuture) {
  48958. var result = '';
  48959. switch (key) {
  48960. case 's':
  48961. return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';
  48962. case 'ss':
  48963. result = isFuture ? 'sekunnin' : 'sekuntia';
  48964. break;
  48965. case 'm':
  48966. return isFuture ? 'minuutin' : 'minuutti';
  48967. case 'mm':
  48968. result = isFuture ? 'minuutin' : 'minuuttia';
  48969. break;
  48970. case 'h':
  48971. return isFuture ? 'tunnin' : 'tunti';
  48972. case 'hh':
  48973. result = isFuture ? 'tunnin' : 'tuntia';
  48974. break;
  48975. case 'd':
  48976. return isFuture ? 'päivän' : 'päivä';
  48977. case 'dd':
  48978. result = isFuture ? 'päivän' : 'päivää';
  48979. break;
  48980. case 'M':
  48981. return isFuture ? 'kuukauden' : 'kuukausi';
  48982. case 'MM':
  48983. result = isFuture ? 'kuukauden' : 'kuukautta';
  48984. break;
  48985. case 'y':
  48986. return isFuture ? 'vuoden' : 'vuosi';
  48987. case 'yy':
  48988. result = isFuture ? 'vuoden' : 'vuotta';
  48989. break;
  48990. }
  48991. result = verbalNumber(number, isFuture) + ' ' + result;
  48992. return result;
  48993. }
  48994. function verbalNumber(number, isFuture) {
  48995. return number < 10
  48996. ? isFuture
  48997. ? numbersFuture[number]
  48998. : numbersPast[number]
  48999. : number;
  49000. }
  49001. var fi = moment.defineLocale('fi', {
  49002. months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split(
  49003. '_'
  49004. ),
  49005. monthsShort: 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split(
  49006. '_'
  49007. ),
  49008. weekdays: 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split(
  49009. '_'
  49010. ),
  49011. weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'),
  49012. weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'),
  49013. longDateFormat: {
  49014. LT: 'HH.mm',
  49015. LTS: 'HH.mm.ss',
  49016. L: 'DD.MM.YYYY',
  49017. LL: 'Do MMMM[ta] YYYY',
  49018. LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm',
  49019. LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',
  49020. l: 'D.M.YYYY',
  49021. ll: 'Do MMM YYYY',
  49022. lll: 'Do MMM YYYY, [klo] HH.mm',
  49023. llll: 'ddd, Do MMM YYYY, [klo] HH.mm',
  49024. },
  49025. calendar: {
  49026. sameDay: '[tänään] [klo] LT',
  49027. nextDay: '[huomenna] [klo] LT',
  49028. nextWeek: 'dddd [klo] LT',
  49029. lastDay: '[eilen] [klo] LT',
  49030. lastWeek: '[viime] dddd[na] [klo] LT',
  49031. sameElse: 'L',
  49032. },
  49033. relativeTime: {
  49034. future: '%s päästä',
  49035. past: '%s sitten',
  49036. s: translate,
  49037. ss: translate,
  49038. m: translate,
  49039. mm: translate,
  49040. h: translate,
  49041. hh: translate,
  49042. d: translate,
  49043. dd: translate,
  49044. M: translate,
  49045. MM: translate,
  49046. y: translate,
  49047. yy: translate,
  49048. },
  49049. dayOfMonthOrdinalParse: /\d{1,2}\./,
  49050. ordinal: '%d.',
  49051. week: {
  49052. dow: 1, // Monday is the first day of the week.
  49053. doy: 4, // The week that contains Jan 4th is the first week of the year.
  49054. },
  49055. });
  49056. return fi;
  49057. })));
  49058. /***/ }),
  49059. /***/ 42549:
  49060. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  49061. //! moment.js locale configuration
  49062. //! locale : Filipino [fil]
  49063. //! author : Dan Hagman : https://github.com/hagmandan
  49064. //! author : Matthew Co : https://github.com/matthewdeeco
  49065. ;(function (global, factory) {
  49066. true ? factory(__webpack_require__(30381)) :
  49067. 0
  49068. }(this, (function (moment) { 'use strict';
  49069. //! moment.js locale configuration
  49070. var fil = moment.defineLocale('fil', {
  49071. months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(
  49072. '_'
  49073. ),
  49074. monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),
  49075. weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(
  49076. '_'
  49077. ),
  49078. weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),
  49079. weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),
  49080. longDateFormat: {
  49081. LT: 'HH:mm',
  49082. LTS: 'HH:mm:ss',
  49083. L: 'MM/D/YYYY',
  49084. LL: 'MMMM D, YYYY',
  49085. LLL: 'MMMM D, YYYY HH:mm',
  49086. LLLL: 'dddd, MMMM DD, YYYY HH:mm',
  49087. },
  49088. calendar: {
  49089. sameDay: 'LT [ngayong araw]',
  49090. nextDay: '[Bukas ng] LT',
  49091. nextWeek: 'LT [sa susunod na] dddd',
  49092. lastDay: 'LT [kahapon]',
  49093. lastWeek: 'LT [noong nakaraang] dddd',
  49094. sameElse: 'L',
  49095. },
  49096. relativeTime: {
  49097. future: 'sa loob ng %s',
  49098. past: '%s ang nakalipas',
  49099. s: 'ilang segundo',
  49100. ss: '%d segundo',
  49101. m: 'isang minuto',
  49102. mm: '%d minuto',
  49103. h: 'isang oras',
  49104. hh: '%d oras',
  49105. d: 'isang araw',
  49106. dd: '%d araw',
  49107. M: 'isang buwan',
  49108. MM: '%d buwan',
  49109. y: 'isang taon',
  49110. yy: '%d taon',
  49111. },
  49112. dayOfMonthOrdinalParse: /\d{1,2}/,
  49113. ordinal: function (number) {
  49114. return number;
  49115. },
  49116. week: {
  49117. dow: 1, // Monday is the first day of the week.
  49118. doy: 4, // The week that contains Jan 4th is the first week of the year.
  49119. },
  49120. });
  49121. return fil;
  49122. })));
  49123. /***/ }),
  49124. /***/ 94694:
  49125. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  49126. //! moment.js locale configuration
  49127. //! locale : Faroese [fo]
  49128. //! author : Ragnar Johannesen : https://github.com/ragnar123
  49129. //! author : Kristian Sakarisson : https://github.com/sakarisson
  49130. ;(function (global, factory) {
  49131. true ? factory(__webpack_require__(30381)) :
  49132. 0
  49133. }(this, (function (moment) { 'use strict';
  49134. //! moment.js locale configuration
  49135. var fo = moment.defineLocale('fo', {
  49136. months: 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split(
  49137. '_'
  49138. ),
  49139. monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),
  49140. weekdays: 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split(
  49141. '_'
  49142. ),
  49143. weekdaysShort: 'sun_mán_týs_mik_hós_frí_ley'.split('_'),
  49144. weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'),
  49145. longDateFormat: {
  49146. LT: 'HH:mm',
  49147. LTS: 'HH:mm:ss',
  49148. L: 'DD/MM/YYYY',
  49149. LL: 'D MMMM YYYY',
  49150. LLL: 'D MMMM YYYY HH:mm',
  49151. LLLL: 'dddd D. MMMM, YYYY HH:mm',
  49152. },
  49153. calendar: {
  49154. sameDay: '[Í dag kl.] LT',
  49155. nextDay: '[Í morgin kl.] LT',
  49156. nextWeek: 'dddd [kl.] LT',
  49157. lastDay: '[Í gjár kl.] LT',
  49158. lastWeek: '[síðstu] dddd [kl] LT',
  49159. sameElse: 'L',
  49160. },
  49161. relativeTime: {
  49162. future: 'um %s',
  49163. past: '%s síðani',
  49164. s: 'fá sekund',
  49165. ss: '%d sekundir',
  49166. m: 'ein minuttur',
  49167. mm: '%d minuttir',
  49168. h: 'ein tími',
  49169. hh: '%d tímar',
  49170. d: 'ein dagur',
  49171. dd: '%d dagar',
  49172. M: 'ein mánaður',
  49173. MM: '%d mánaðir',
  49174. y: 'eitt ár',
  49175. yy: '%d ár',
  49176. },
  49177. dayOfMonthOrdinalParse: /\d{1,2}\./,
  49178. ordinal: '%d.',
  49179. week: {
  49180. dow: 1, // Monday is the first day of the week.
  49181. doy: 4, // The week that contains Jan 4th is the first week of the year.
  49182. },
  49183. });
  49184. return fo;
  49185. })));
  49186. /***/ }),
  49187. /***/ 63049:
  49188. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  49189. //! moment.js locale configuration
  49190. //! locale : French (Canada) [fr-ca]
  49191. //! author : Jonathan Abourbih : https://github.com/jonbca
  49192. ;(function (global, factory) {
  49193. true ? factory(__webpack_require__(30381)) :
  49194. 0
  49195. }(this, (function (moment) { 'use strict';
  49196. //! moment.js locale configuration
  49197. var frCa = moment.defineLocale('fr-ca', {
  49198. months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
  49199. '_'
  49200. ),
  49201. monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
  49202. '_'
  49203. ),
  49204. monthsParseExact: true,
  49205. weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
  49206. weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
  49207. weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
  49208. weekdaysParseExact: true,
  49209. longDateFormat: {
  49210. LT: 'HH:mm',
  49211. LTS: 'HH:mm:ss',
  49212. L: 'YYYY-MM-DD',
  49213. LL: 'D MMMM YYYY',
  49214. LLL: 'D MMMM YYYY HH:mm',
  49215. LLLL: 'dddd D MMMM YYYY HH:mm',
  49216. },
  49217. calendar: {
  49218. sameDay: '[Aujourd’hui à] LT',
  49219. nextDay: '[Demain à] LT',
  49220. nextWeek: 'dddd [à] LT',
  49221. lastDay: '[Hier à] LT',
  49222. lastWeek: 'dddd [dernier à] LT',
  49223. sameElse: 'L',
  49224. },
  49225. relativeTime: {
  49226. future: 'dans %s',
  49227. past: 'il y a %s',
  49228. s: 'quelques secondes',
  49229. ss: '%d secondes',
  49230. m: 'une minute',
  49231. mm: '%d minutes',
  49232. h: 'une heure',
  49233. hh: '%d heures',
  49234. d: 'un jour',
  49235. dd: '%d jours',
  49236. M: 'un mois',
  49237. MM: '%d mois',
  49238. y: 'un an',
  49239. yy: '%d ans',
  49240. },
  49241. dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
  49242. ordinal: function (number, period) {
  49243. switch (period) {
  49244. // Words with masculine grammatical gender: mois, trimestre, jour
  49245. default:
  49246. case 'M':
  49247. case 'Q':
  49248. case 'D':
  49249. case 'DDD':
  49250. case 'd':
  49251. return number + (number === 1 ? 'er' : 'e');
  49252. // Words with feminine grammatical gender: semaine
  49253. case 'w':
  49254. case 'W':
  49255. return number + (number === 1 ? 're' : 'e');
  49256. }
  49257. },
  49258. });
  49259. return frCa;
  49260. })));
  49261. /***/ }),
  49262. /***/ 52330:
  49263. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  49264. //! moment.js locale configuration
  49265. //! locale : French (Switzerland) [fr-ch]
  49266. //! author : Gaspard Bucher : https://github.com/gaspard
  49267. ;(function (global, factory) {
  49268. true ? factory(__webpack_require__(30381)) :
  49269. 0
  49270. }(this, (function (moment) { 'use strict';
  49271. //! moment.js locale configuration
  49272. var frCh = moment.defineLocale('fr-ch', {
  49273. months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
  49274. '_'
  49275. ),
  49276. monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
  49277. '_'
  49278. ),
  49279. monthsParseExact: true,
  49280. weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
  49281. weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
  49282. weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
  49283. weekdaysParseExact: true,
  49284. longDateFormat: {
  49285. LT: 'HH:mm',
  49286. LTS: 'HH:mm:ss',
  49287. L: 'DD.MM.YYYY',
  49288. LL: 'D MMMM YYYY',
  49289. LLL: 'D MMMM YYYY HH:mm',
  49290. LLLL: 'dddd D MMMM YYYY HH:mm',
  49291. },
  49292. calendar: {
  49293. sameDay: '[Aujourd’hui à] LT',
  49294. nextDay: '[Demain à] LT',
  49295. nextWeek: 'dddd [à] LT',
  49296. lastDay: '[Hier à] LT',
  49297. lastWeek: 'dddd [dernier à] LT',
  49298. sameElse: 'L',
  49299. },
  49300. relativeTime: {
  49301. future: 'dans %s',
  49302. past: 'il y a %s',
  49303. s: 'quelques secondes',
  49304. ss: '%d secondes',
  49305. m: 'une minute',
  49306. mm: '%d minutes',
  49307. h: 'une heure',
  49308. hh: '%d heures',
  49309. d: 'un jour',
  49310. dd: '%d jours',
  49311. M: 'un mois',
  49312. MM: '%d mois',
  49313. y: 'un an',
  49314. yy: '%d ans',
  49315. },
  49316. dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
  49317. ordinal: function (number, period) {
  49318. switch (period) {
  49319. // Words with masculine grammatical gender: mois, trimestre, jour
  49320. default:
  49321. case 'M':
  49322. case 'Q':
  49323. case 'D':
  49324. case 'DDD':
  49325. case 'd':
  49326. return number + (number === 1 ? 'er' : 'e');
  49327. // Words with feminine grammatical gender: semaine
  49328. case 'w':
  49329. case 'W':
  49330. return number + (number === 1 ? 're' : 'e');
  49331. }
  49332. },
  49333. week: {
  49334. dow: 1, // Monday is the first day of the week.
  49335. doy: 4, // The week that contains Jan 4th is the first week of the year.
  49336. },
  49337. });
  49338. return frCh;
  49339. })));
  49340. /***/ }),
  49341. /***/ 94470:
  49342. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  49343. //! moment.js locale configuration
  49344. //! locale : French [fr]
  49345. //! author : John Fischer : https://github.com/jfroffice
  49346. ;(function (global, factory) {
  49347. true ? factory(__webpack_require__(30381)) :
  49348. 0
  49349. }(this, (function (moment) { 'use strict';
  49350. //! moment.js locale configuration
  49351. var monthsStrictRegex = /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,
  49352. monthsShortStrictRegex = /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,
  49353. monthsRegex = /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,
  49354. monthsParse = [
  49355. /^janv/i,
  49356. /^févr/i,
  49357. /^mars/i,
  49358. /^avr/i,
  49359. /^mai/i,
  49360. /^juin/i,
  49361. /^juil/i,
  49362. /^août/i,
  49363. /^sept/i,
  49364. /^oct/i,
  49365. /^nov/i,
  49366. /^déc/i,
  49367. ];
  49368. var fr = moment.defineLocale('fr', {
  49369. months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
  49370. '_'
  49371. ),
  49372. monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
  49373. '_'
  49374. ),
  49375. monthsRegex: monthsRegex,
  49376. monthsShortRegex: monthsRegex,
  49377. monthsStrictRegex: monthsStrictRegex,
  49378. monthsShortStrictRegex: monthsShortStrictRegex,
  49379. monthsParse: monthsParse,
  49380. longMonthsParse: monthsParse,
  49381. shortMonthsParse: monthsParse,
  49382. weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
  49383. weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
  49384. weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
  49385. weekdaysParseExact: true,
  49386. longDateFormat: {
  49387. LT: 'HH:mm',
  49388. LTS: 'HH:mm:ss',
  49389. L: 'DD/MM/YYYY',
  49390. LL: 'D MMMM YYYY',
  49391. LLL: 'D MMMM YYYY HH:mm',
  49392. LLLL: 'dddd D MMMM YYYY HH:mm',
  49393. },
  49394. calendar: {
  49395. sameDay: '[Aujourd’hui à] LT',
  49396. nextDay: '[Demain à] LT',
  49397. nextWeek: 'dddd [à] LT',
  49398. lastDay: '[Hier à] LT',
  49399. lastWeek: 'dddd [dernier à] LT',
  49400. sameElse: 'L',
  49401. },
  49402. relativeTime: {
  49403. future: 'dans %s',
  49404. past: 'il y a %s',
  49405. s: 'quelques secondes',
  49406. ss: '%d secondes',
  49407. m: 'une minute',
  49408. mm: '%d minutes',
  49409. h: 'une heure',
  49410. hh: '%d heures',
  49411. d: 'un jour',
  49412. dd: '%d jours',
  49413. w: 'une semaine',
  49414. ww: '%d semaines',
  49415. M: 'un mois',
  49416. MM: '%d mois',
  49417. y: 'un an',
  49418. yy: '%d ans',
  49419. },
  49420. dayOfMonthOrdinalParse: /\d{1,2}(er|)/,
  49421. ordinal: function (number, period) {
  49422. switch (period) {
  49423. // TODO: Return 'e' when day of month > 1. Move this case inside
  49424. // block for masculine words below.
  49425. // See https://github.com/moment/moment/issues/3375
  49426. case 'D':
  49427. return number + (number === 1 ? 'er' : '');
  49428. // Words with masculine grammatical gender: mois, trimestre, jour
  49429. default:
  49430. case 'M':
  49431. case 'Q':
  49432. case 'DDD':
  49433. case 'd':
  49434. return number + (number === 1 ? 'er' : 'e');
  49435. // Words with feminine grammatical gender: semaine
  49436. case 'w':
  49437. case 'W':
  49438. return number + (number === 1 ? 're' : 'e');
  49439. }
  49440. },
  49441. week: {
  49442. dow: 1, // Monday is the first day of the week.
  49443. doy: 4, // The week that contains Jan 4th is the first week of the year.
  49444. },
  49445. });
  49446. return fr;
  49447. })));
  49448. /***/ }),
  49449. /***/ 5044:
  49450. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  49451. //! moment.js locale configuration
  49452. //! locale : Frisian [fy]
  49453. //! author : Robin van der Vliet : https://github.com/robin0van0der0v
  49454. ;(function (global, factory) {
  49455. true ? factory(__webpack_require__(30381)) :
  49456. 0
  49457. }(this, (function (moment) { 'use strict';
  49458. //! moment.js locale configuration
  49459. var monthsShortWithDots = 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split(
  49460. '_'
  49461. ),
  49462. monthsShortWithoutDots = 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split(
  49463. '_'
  49464. );
  49465. var fy = moment.defineLocale('fy', {
  49466. months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split(
  49467. '_'
  49468. ),
  49469. monthsShort: function (m, format) {
  49470. if (!m) {
  49471. return monthsShortWithDots;
  49472. } else if (/-MMM-/.test(format)) {
  49473. return monthsShortWithoutDots[m.month()];
  49474. } else {
  49475. return monthsShortWithDots[m.month()];
  49476. }
  49477. },
  49478. monthsParseExact: true,
  49479. weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split(
  49480. '_'
  49481. ),
  49482. weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'),
  49483. weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),
  49484. weekdaysParseExact: true,
  49485. longDateFormat: {
  49486. LT: 'HH:mm',
  49487. LTS: 'HH:mm:ss',
  49488. L: 'DD-MM-YYYY',
  49489. LL: 'D MMMM YYYY',
  49490. LLL: 'D MMMM YYYY HH:mm',
  49491. LLLL: 'dddd D MMMM YYYY HH:mm',
  49492. },
  49493. calendar: {
  49494. sameDay: '[hjoed om] LT',
  49495. nextDay: '[moarn om] LT',
  49496. nextWeek: 'dddd [om] LT',
  49497. lastDay: '[juster om] LT',
  49498. lastWeek: '[ôfrûne] dddd [om] LT',
  49499. sameElse: 'L',
  49500. },
  49501. relativeTime: {
  49502. future: 'oer %s',
  49503. past: '%s lyn',
  49504. s: 'in pear sekonden',
  49505. ss: '%d sekonden',
  49506. m: 'ien minút',
  49507. mm: '%d minuten',
  49508. h: 'ien oere',
  49509. hh: '%d oeren',
  49510. d: 'ien dei',
  49511. dd: '%d dagen',
  49512. M: 'ien moanne',
  49513. MM: '%d moannen',
  49514. y: 'ien jier',
  49515. yy: '%d jierren',
  49516. },
  49517. dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
  49518. ordinal: function (number) {
  49519. return (
  49520. number +
  49521. (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
  49522. );
  49523. },
  49524. week: {
  49525. dow: 1, // Monday is the first day of the week.
  49526. doy: 4, // The week that contains Jan 4th is the first week of the year.
  49527. },
  49528. });
  49529. return fy;
  49530. })));
  49531. /***/ }),
  49532. /***/ 29295:
  49533. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  49534. //! moment.js locale configuration
  49535. //! locale : Irish or Irish Gaelic [ga]
  49536. //! author : André Silva : https://github.com/askpt
  49537. ;(function (global, factory) {
  49538. true ? factory(__webpack_require__(30381)) :
  49539. 0
  49540. }(this, (function (moment) { 'use strict';
  49541. //! moment.js locale configuration
  49542. var months = [
  49543. 'Eanáir',
  49544. 'Feabhra',
  49545. 'Márta',
  49546. 'Aibreán',
  49547. 'Bealtaine',
  49548. 'Meitheamh',
  49549. 'Iúil',
  49550. 'Lúnasa',
  49551. 'Meán Fómhair',
  49552. 'Deireadh Fómhair',
  49553. 'Samhain',
  49554. 'Nollaig',
  49555. ],
  49556. monthsShort = [
  49557. 'Ean',
  49558. 'Feabh',
  49559. 'Márt',
  49560. 'Aib',
  49561. 'Beal',
  49562. 'Meith',
  49563. 'Iúil',
  49564. 'Lún',
  49565. 'M.F.',
  49566. 'D.F.',
  49567. 'Samh',
  49568. 'Noll',
  49569. ],
  49570. weekdays = [
  49571. 'Dé Domhnaigh',
  49572. 'Dé Luain',
  49573. 'Dé Máirt',
  49574. 'Dé Céadaoin',
  49575. 'Déardaoin',
  49576. 'Dé hAoine',
  49577. 'Dé Sathairn',
  49578. ],
  49579. weekdaysShort = ['Domh', 'Luan', 'Máirt', 'Céad', 'Déar', 'Aoine', 'Sath'],
  49580. weekdaysMin = ['Do', 'Lu', 'Má', 'Cé', 'Dé', 'A', 'Sa'];
  49581. var ga = moment.defineLocale('ga', {
  49582. months: months,
  49583. monthsShort: monthsShort,
  49584. monthsParseExact: true,
  49585. weekdays: weekdays,
  49586. weekdaysShort: weekdaysShort,
  49587. weekdaysMin: weekdaysMin,
  49588. longDateFormat: {
  49589. LT: 'HH:mm',
  49590. LTS: 'HH:mm:ss',
  49591. L: 'DD/MM/YYYY',
  49592. LL: 'D MMMM YYYY',
  49593. LLL: 'D MMMM YYYY HH:mm',
  49594. LLLL: 'dddd, D MMMM YYYY HH:mm',
  49595. },
  49596. calendar: {
  49597. sameDay: '[Inniu ag] LT',
  49598. nextDay: '[Amárach ag] LT',
  49599. nextWeek: 'dddd [ag] LT',
  49600. lastDay: '[Inné ag] LT',
  49601. lastWeek: 'dddd [seo caite] [ag] LT',
  49602. sameElse: 'L',
  49603. },
  49604. relativeTime: {
  49605. future: 'i %s',
  49606. past: '%s ó shin',
  49607. s: 'cúpla soicind',
  49608. ss: '%d soicind',
  49609. m: 'nóiméad',
  49610. mm: '%d nóiméad',
  49611. h: 'uair an chloig',
  49612. hh: '%d uair an chloig',
  49613. d: 'lá',
  49614. dd: '%d lá',
  49615. M: 'mí',
  49616. MM: '%d míonna',
  49617. y: 'bliain',
  49618. yy: '%d bliain',
  49619. },
  49620. dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/,
  49621. ordinal: function (number) {
  49622. var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';
  49623. return number + output;
  49624. },
  49625. week: {
  49626. dow: 1, // Monday is the first day of the week.
  49627. doy: 4, // The week that contains Jan 4th is the first week of the year.
  49628. },
  49629. });
  49630. return ga;
  49631. })));
  49632. /***/ }),
  49633. /***/ 2101:
  49634. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  49635. //! moment.js locale configuration
  49636. //! locale : Scottish Gaelic [gd]
  49637. //! author : Jon Ashdown : https://github.com/jonashdown
  49638. ;(function (global, factory) {
  49639. true ? factory(__webpack_require__(30381)) :
  49640. 0
  49641. }(this, (function (moment) { 'use strict';
  49642. //! moment.js locale configuration
  49643. var months = [
  49644. 'Am Faoilleach',
  49645. 'An Gearran',
  49646. 'Am Màrt',
  49647. 'An Giblean',
  49648. 'An Cèitean',
  49649. 'An t-Ògmhios',
  49650. 'An t-Iuchar',
  49651. 'An Lùnastal',
  49652. 'An t-Sultain',
  49653. 'An Dàmhair',
  49654. 'An t-Samhain',
  49655. 'An Dùbhlachd',
  49656. ],
  49657. monthsShort = [
  49658. 'Faoi',
  49659. 'Gear',
  49660. 'Màrt',
  49661. 'Gibl',
  49662. 'Cèit',
  49663. 'Ògmh',
  49664. 'Iuch',
  49665. 'Lùn',
  49666. 'Sult',
  49667. 'Dàmh',
  49668. 'Samh',
  49669. 'Dùbh',
  49670. ],
  49671. weekdays = [
  49672. 'Didòmhnaich',
  49673. 'Diluain',
  49674. 'Dimàirt',
  49675. 'Diciadain',
  49676. 'Diardaoin',
  49677. 'Dihaoine',
  49678. 'Disathairne',
  49679. ],
  49680. weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'],
  49681. weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'];
  49682. var gd = moment.defineLocale('gd', {
  49683. months: months,
  49684. monthsShort: monthsShort,
  49685. monthsParseExact: true,
  49686. weekdays: weekdays,
  49687. weekdaysShort: weekdaysShort,
  49688. weekdaysMin: weekdaysMin,
  49689. longDateFormat: {
  49690. LT: 'HH:mm',
  49691. LTS: 'HH:mm:ss',
  49692. L: 'DD/MM/YYYY',
  49693. LL: 'D MMMM YYYY',
  49694. LLL: 'D MMMM YYYY HH:mm',
  49695. LLLL: 'dddd, D MMMM YYYY HH:mm',
  49696. },
  49697. calendar: {
  49698. sameDay: '[An-diugh aig] LT',
  49699. nextDay: '[A-màireach aig] LT',
  49700. nextWeek: 'dddd [aig] LT',
  49701. lastDay: '[An-dè aig] LT',
  49702. lastWeek: 'dddd [seo chaidh] [aig] LT',
  49703. sameElse: 'L',
  49704. },
  49705. relativeTime: {
  49706. future: 'ann an %s',
  49707. past: 'bho chionn %s',
  49708. s: 'beagan diogan',
  49709. ss: '%d diogan',
  49710. m: 'mionaid',
  49711. mm: '%d mionaidean',
  49712. h: 'uair',
  49713. hh: '%d uairean',
  49714. d: 'latha',
  49715. dd: '%d latha',
  49716. M: 'mìos',
  49717. MM: '%d mìosan',
  49718. y: 'bliadhna',
  49719. yy: '%d bliadhna',
  49720. },
  49721. dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/,
  49722. ordinal: function (number) {
  49723. var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';
  49724. return number + output;
  49725. },
  49726. week: {
  49727. dow: 1, // Monday is the first day of the week.
  49728. doy: 4, // The week that contains Jan 4th is the first week of the year.
  49729. },
  49730. });
  49731. return gd;
  49732. })));
  49733. /***/ }),
  49734. /***/ 38794:
  49735. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  49736. //! moment.js locale configuration
  49737. //! locale : Galician [gl]
  49738. //! author : Juan G. Hurtado : https://github.com/juanghurtado
  49739. ;(function (global, factory) {
  49740. true ? factory(__webpack_require__(30381)) :
  49741. 0
  49742. }(this, (function (moment) { 'use strict';
  49743. //! moment.js locale configuration
  49744. var gl = moment.defineLocale('gl', {
  49745. months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split(
  49746. '_'
  49747. ),
  49748. monthsShort: 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split(
  49749. '_'
  49750. ),
  49751. monthsParseExact: true,
  49752. weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),
  49753. weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),
  49754. weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'),
  49755. weekdaysParseExact: true,
  49756. longDateFormat: {
  49757. LT: 'H:mm',
  49758. LTS: 'H:mm:ss',
  49759. L: 'DD/MM/YYYY',
  49760. LL: 'D [de] MMMM [de] YYYY',
  49761. LLL: 'D [de] MMMM [de] YYYY H:mm',
  49762. LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
  49763. },
  49764. calendar: {
  49765. sameDay: function () {
  49766. return '[hoxe ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';
  49767. },
  49768. nextDay: function () {
  49769. return '[mañá ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';
  49770. },
  49771. nextWeek: function () {
  49772. return 'dddd [' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT';
  49773. },
  49774. lastDay: function () {
  49775. return '[onte ' + (this.hours() !== 1 ? 'á' : 'a') + '] LT';
  49776. },
  49777. lastWeek: function () {
  49778. return (
  49779. '[o] dddd [pasado ' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT'
  49780. );
  49781. },
  49782. sameElse: 'L',
  49783. },
  49784. relativeTime: {
  49785. future: function (str) {
  49786. if (str.indexOf('un') === 0) {
  49787. return 'n' + str;
  49788. }
  49789. return 'en ' + str;
  49790. },
  49791. past: 'hai %s',
  49792. s: 'uns segundos',
  49793. ss: '%d segundos',
  49794. m: 'un minuto',
  49795. mm: '%d minutos',
  49796. h: 'unha hora',
  49797. hh: '%d horas',
  49798. d: 'un día',
  49799. dd: '%d días',
  49800. M: 'un mes',
  49801. MM: '%d meses',
  49802. y: 'un ano',
  49803. yy: '%d anos',
  49804. },
  49805. dayOfMonthOrdinalParse: /\d{1,2}º/,
  49806. ordinal: '%dº',
  49807. week: {
  49808. dow: 1, // Monday is the first day of the week.
  49809. doy: 4, // The week that contains Jan 4th is the first week of the year.
  49810. },
  49811. });
  49812. return gl;
  49813. })));
  49814. /***/ }),
  49815. /***/ 27884:
  49816. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  49817. //! moment.js locale configuration
  49818. //! locale : Konkani Devanagari script [gom-deva]
  49819. //! author : The Discoverer : https://github.com/WikiDiscoverer
  49820. ;(function (global, factory) {
  49821. true ? factory(__webpack_require__(30381)) :
  49822. 0
  49823. }(this, (function (moment) { 'use strict';
  49824. //! moment.js locale configuration
  49825. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  49826. var format = {
  49827. s: ['थोडया सॅकंडांनी', 'थोडे सॅकंड'],
  49828. ss: [number + ' सॅकंडांनी', number + ' सॅकंड'],
  49829. m: ['एका मिणटान', 'एक मिनूट'],
  49830. mm: [number + ' मिणटांनी', number + ' मिणटां'],
  49831. h: ['एका वरान', 'एक वर'],
  49832. hh: [number + ' वरांनी', number + ' वरां'],
  49833. d: ['एका दिसान', 'एक दीस'],
  49834. dd: [number + ' दिसांनी', number + ' दीस'],
  49835. M: ['एका म्हयन्यान', 'एक म्हयनो'],
  49836. MM: [number + ' म्हयन्यानी', number + ' म्हयने'],
  49837. y: ['एका वर्सान', 'एक वर्स'],
  49838. yy: [number + ' वर्सांनी', number + ' वर्सां'],
  49839. };
  49840. return isFuture ? format[key][0] : format[key][1];
  49841. }
  49842. var gomDeva = moment.defineLocale('gom-deva', {
  49843. months: {
  49844. standalone: 'जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(
  49845. '_'
  49846. ),
  49847. format: 'जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या'.split(
  49848. '_'
  49849. ),
  49850. isFormat: /MMMM(\s)+D[oD]?/,
  49851. },
  49852. monthsShort: 'जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(
  49853. '_'
  49854. ),
  49855. monthsParseExact: true,
  49856. weekdays: 'आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार'.split('_'),
  49857. weekdaysShort: 'आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.'.split('_'),
  49858. weekdaysMin: 'आ_सो_मं_बु_ब्रे_सु_शे'.split('_'),
  49859. weekdaysParseExact: true,
  49860. longDateFormat: {
  49861. LT: 'A h:mm [वाजतां]',
  49862. LTS: 'A h:mm:ss [वाजतां]',
  49863. L: 'DD-MM-YYYY',
  49864. LL: 'D MMMM YYYY',
  49865. LLL: 'D MMMM YYYY A h:mm [वाजतां]',
  49866. LLLL: 'dddd, MMMM Do, YYYY, A h:mm [वाजतां]',
  49867. llll: 'ddd, D MMM YYYY, A h:mm [वाजतां]',
  49868. },
  49869. calendar: {
  49870. sameDay: '[आयज] LT',
  49871. nextDay: '[फाल्यां] LT',
  49872. nextWeek: '[फुडलो] dddd[,] LT',
  49873. lastDay: '[काल] LT',
  49874. lastWeek: '[फाटलो] dddd[,] LT',
  49875. sameElse: 'L',
  49876. },
  49877. relativeTime: {
  49878. future: '%s',
  49879. past: '%s आदीं',
  49880. s: processRelativeTime,
  49881. ss: processRelativeTime,
  49882. m: processRelativeTime,
  49883. mm: processRelativeTime,
  49884. h: processRelativeTime,
  49885. hh: processRelativeTime,
  49886. d: processRelativeTime,
  49887. dd: processRelativeTime,
  49888. M: processRelativeTime,
  49889. MM: processRelativeTime,
  49890. y: processRelativeTime,
  49891. yy: processRelativeTime,
  49892. },
  49893. dayOfMonthOrdinalParse: /\d{1,2}(वेर)/,
  49894. ordinal: function (number, period) {
  49895. switch (period) {
  49896. // the ordinal 'वेर' only applies to day of the month
  49897. case 'D':
  49898. return number + 'वेर';
  49899. default:
  49900. case 'M':
  49901. case 'Q':
  49902. case 'DDD':
  49903. case 'd':
  49904. case 'w':
  49905. case 'W':
  49906. return number;
  49907. }
  49908. },
  49909. week: {
  49910. dow: 0, // Sunday is the first day of the week
  49911. doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)
  49912. },
  49913. meridiemParse: /राती|सकाळीं|दनपारां|सांजे/,
  49914. meridiemHour: function (hour, meridiem) {
  49915. if (hour === 12) {
  49916. hour = 0;
  49917. }
  49918. if (meridiem === 'राती') {
  49919. return hour < 4 ? hour : hour + 12;
  49920. } else if (meridiem === 'सकाळीं') {
  49921. return hour;
  49922. } else if (meridiem === 'दनपारां') {
  49923. return hour > 12 ? hour : hour + 12;
  49924. } else if (meridiem === 'सांजे') {
  49925. return hour + 12;
  49926. }
  49927. },
  49928. meridiem: function (hour, minute, isLower) {
  49929. if (hour < 4) {
  49930. return 'राती';
  49931. } else if (hour < 12) {
  49932. return 'सकाळीं';
  49933. } else if (hour < 16) {
  49934. return 'दनपारां';
  49935. } else if (hour < 20) {
  49936. return 'सांजे';
  49937. } else {
  49938. return 'राती';
  49939. }
  49940. },
  49941. });
  49942. return gomDeva;
  49943. })));
  49944. /***/ }),
  49945. /***/ 23168:
  49946. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  49947. //! moment.js locale configuration
  49948. //! locale : Konkani Latin script [gom-latn]
  49949. //! author : The Discoverer : https://github.com/WikiDiscoverer
  49950. ;(function (global, factory) {
  49951. true ? factory(__webpack_require__(30381)) :
  49952. 0
  49953. }(this, (function (moment) { 'use strict';
  49954. //! moment.js locale configuration
  49955. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  49956. var format = {
  49957. s: ['thoddea sekondamni', 'thodde sekond'],
  49958. ss: [number + ' sekondamni', number + ' sekond'],
  49959. m: ['eka mintan', 'ek minut'],
  49960. mm: [number + ' mintamni', number + ' mintam'],
  49961. h: ['eka voran', 'ek vor'],
  49962. hh: [number + ' voramni', number + ' voram'],
  49963. d: ['eka disan', 'ek dis'],
  49964. dd: [number + ' disamni', number + ' dis'],
  49965. M: ['eka mhoinean', 'ek mhoino'],
  49966. MM: [number + ' mhoineamni', number + ' mhoine'],
  49967. y: ['eka vorsan', 'ek voros'],
  49968. yy: [number + ' vorsamni', number + ' vorsam'],
  49969. };
  49970. return isFuture ? format[key][0] : format[key][1];
  49971. }
  49972. var gomLatn = moment.defineLocale('gom-latn', {
  49973. months: {
  49974. standalone: 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split(
  49975. '_'
  49976. ),
  49977. format: 'Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea'.split(
  49978. '_'
  49979. ),
  49980. isFormat: /MMMM(\s)+D[oD]?/,
  49981. },
  49982. monthsShort: 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split(
  49983. '_'
  49984. ),
  49985. monthsParseExact: true,
  49986. weekdays: "Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split('_'),
  49987. weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),
  49988. weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),
  49989. weekdaysParseExact: true,
  49990. longDateFormat: {
  49991. LT: 'A h:mm [vazta]',
  49992. LTS: 'A h:mm:ss [vazta]',
  49993. L: 'DD-MM-YYYY',
  49994. LL: 'D MMMM YYYY',
  49995. LLL: 'D MMMM YYYY A h:mm [vazta]',
  49996. LLLL: 'dddd, MMMM Do, YYYY, A h:mm [vazta]',
  49997. llll: 'ddd, D MMM YYYY, A h:mm [vazta]',
  49998. },
  49999. calendar: {
  50000. sameDay: '[Aiz] LT',
  50001. nextDay: '[Faleam] LT',
  50002. nextWeek: '[Fuddlo] dddd[,] LT',
  50003. lastDay: '[Kal] LT',
  50004. lastWeek: '[Fattlo] dddd[,] LT',
  50005. sameElse: 'L',
  50006. },
  50007. relativeTime: {
  50008. future: '%s',
  50009. past: '%s adim',
  50010. s: processRelativeTime,
  50011. ss: processRelativeTime,
  50012. m: processRelativeTime,
  50013. mm: processRelativeTime,
  50014. h: processRelativeTime,
  50015. hh: processRelativeTime,
  50016. d: processRelativeTime,
  50017. dd: processRelativeTime,
  50018. M: processRelativeTime,
  50019. MM: processRelativeTime,
  50020. y: processRelativeTime,
  50021. yy: processRelativeTime,
  50022. },
  50023. dayOfMonthOrdinalParse: /\d{1,2}(er)/,
  50024. ordinal: function (number, period) {
  50025. switch (period) {
  50026. // the ordinal 'er' only applies to day of the month
  50027. case 'D':
  50028. return number + 'er';
  50029. default:
  50030. case 'M':
  50031. case 'Q':
  50032. case 'DDD':
  50033. case 'd':
  50034. case 'w':
  50035. case 'W':
  50036. return number;
  50037. }
  50038. },
  50039. week: {
  50040. dow: 0, // Sunday is the first day of the week
  50041. doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)
  50042. },
  50043. meridiemParse: /rati|sokallim|donparam|sanje/,
  50044. meridiemHour: function (hour, meridiem) {
  50045. if (hour === 12) {
  50046. hour = 0;
  50047. }
  50048. if (meridiem === 'rati') {
  50049. return hour < 4 ? hour : hour + 12;
  50050. } else if (meridiem === 'sokallim') {
  50051. return hour;
  50052. } else if (meridiem === 'donparam') {
  50053. return hour > 12 ? hour : hour + 12;
  50054. } else if (meridiem === 'sanje') {
  50055. return hour + 12;
  50056. }
  50057. },
  50058. meridiem: function (hour, minute, isLower) {
  50059. if (hour < 4) {
  50060. return 'rati';
  50061. } else if (hour < 12) {
  50062. return 'sokallim';
  50063. } else if (hour < 16) {
  50064. return 'donparam';
  50065. } else if (hour < 20) {
  50066. return 'sanje';
  50067. } else {
  50068. return 'rati';
  50069. }
  50070. },
  50071. });
  50072. return gomLatn;
  50073. })));
  50074. /***/ }),
  50075. /***/ 95349:
  50076. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  50077. //! moment.js locale configuration
  50078. //! locale : Gujarati [gu]
  50079. //! author : Kaushik Thanki : https://github.com/Kaushik1987
  50080. ;(function (global, factory) {
  50081. true ? factory(__webpack_require__(30381)) :
  50082. 0
  50083. }(this, (function (moment) { 'use strict';
  50084. //! moment.js locale configuration
  50085. var symbolMap = {
  50086. 1: '૧',
  50087. 2: '૨',
  50088. 3: '૩',
  50089. 4: '૪',
  50090. 5: '૫',
  50091. 6: '૬',
  50092. 7: '૭',
  50093. 8: '૮',
  50094. 9: '૯',
  50095. 0: '૦',
  50096. },
  50097. numberMap = {
  50098. '૧': '1',
  50099. '૨': '2',
  50100. '૩': '3',
  50101. '૪': '4',
  50102. '૫': '5',
  50103. '૬': '6',
  50104. '૭': '7',
  50105. '૮': '8',
  50106. '૯': '9',
  50107. '૦': '0',
  50108. };
  50109. var gu = moment.defineLocale('gu', {
  50110. months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split(
  50111. '_'
  50112. ),
  50113. monthsShort: 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split(
  50114. '_'
  50115. ),
  50116. monthsParseExact: true,
  50117. weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split(
  50118. '_'
  50119. ),
  50120. weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'),
  50121. weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'),
  50122. longDateFormat: {
  50123. LT: 'A h:mm વાગ્યે',
  50124. LTS: 'A h:mm:ss વાગ્યે',
  50125. L: 'DD/MM/YYYY',
  50126. LL: 'D MMMM YYYY',
  50127. LLL: 'D MMMM YYYY, A h:mm વાગ્યે',
  50128. LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે',
  50129. },
  50130. calendar: {
  50131. sameDay: '[આજ] LT',
  50132. nextDay: '[કાલે] LT',
  50133. nextWeek: 'dddd, LT',
  50134. lastDay: '[ગઇકાલે] LT',
  50135. lastWeek: '[પાછલા] dddd, LT',
  50136. sameElse: 'L',
  50137. },
  50138. relativeTime: {
  50139. future: '%s મા',
  50140. past: '%s પહેલા',
  50141. s: 'અમુક પળો',
  50142. ss: '%d સેકંડ',
  50143. m: 'એક મિનિટ',
  50144. mm: '%d મિનિટ',
  50145. h: 'એક કલાક',
  50146. hh: '%d કલાક',
  50147. d: 'એક દિવસ',
  50148. dd: '%d દિવસ',
  50149. M: 'એક મહિનો',
  50150. MM: '%d મહિનો',
  50151. y: 'એક વર્ષ',
  50152. yy: '%d વર્ષ',
  50153. },
  50154. preparse: function (string) {
  50155. return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) {
  50156. return numberMap[match];
  50157. });
  50158. },
  50159. postformat: function (string) {
  50160. return string.replace(/\d/g, function (match) {
  50161. return symbolMap[match];
  50162. });
  50163. },
  50164. // Gujarati notation for meridiems are quite fuzzy in practice. While there exists
  50165. // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati.
  50166. meridiemParse: /રાત|બપોર|સવાર|સાંજ/,
  50167. meridiemHour: function (hour, meridiem) {
  50168. if (hour === 12) {
  50169. hour = 0;
  50170. }
  50171. if (meridiem === 'રાત') {
  50172. return hour < 4 ? hour : hour + 12;
  50173. } else if (meridiem === 'સવાર') {
  50174. return hour;
  50175. } else if (meridiem === 'બપોર') {
  50176. return hour >= 10 ? hour : hour + 12;
  50177. } else if (meridiem === 'સાંજ') {
  50178. return hour + 12;
  50179. }
  50180. },
  50181. meridiem: function (hour, minute, isLower) {
  50182. if (hour < 4) {
  50183. return 'રાત';
  50184. } else if (hour < 10) {
  50185. return 'સવાર';
  50186. } else if (hour < 17) {
  50187. return 'બપોર';
  50188. } else if (hour < 20) {
  50189. return 'સાંજ';
  50190. } else {
  50191. return 'રાત';
  50192. }
  50193. },
  50194. week: {
  50195. dow: 0, // Sunday is the first day of the week.
  50196. doy: 6, // The week that contains Jan 6th is the first week of the year.
  50197. },
  50198. });
  50199. return gu;
  50200. })));
  50201. /***/ }),
  50202. /***/ 24206:
  50203. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  50204. //! moment.js locale configuration
  50205. //! locale : Hebrew [he]
  50206. //! author : Tomer Cohen : https://github.com/tomer
  50207. //! author : Moshe Simantov : https://github.com/DevelopmentIL
  50208. //! author : Tal Ater : https://github.com/TalAter
  50209. ;(function (global, factory) {
  50210. true ? factory(__webpack_require__(30381)) :
  50211. 0
  50212. }(this, (function (moment) { 'use strict';
  50213. //! moment.js locale configuration
  50214. var he = moment.defineLocale('he', {
  50215. months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split(
  50216. '_'
  50217. ),
  50218. monthsShort: 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split(
  50219. '_'
  50220. ),
  50221. weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),
  50222. weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),
  50223. weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'),
  50224. longDateFormat: {
  50225. LT: 'HH:mm',
  50226. LTS: 'HH:mm:ss',
  50227. L: 'DD/MM/YYYY',
  50228. LL: 'D [ב]MMMM YYYY',
  50229. LLL: 'D [ב]MMMM YYYY HH:mm',
  50230. LLLL: 'dddd, D [ב]MMMM YYYY HH:mm',
  50231. l: 'D/M/YYYY',
  50232. ll: 'D MMM YYYY',
  50233. lll: 'D MMM YYYY HH:mm',
  50234. llll: 'ddd, D MMM YYYY HH:mm',
  50235. },
  50236. calendar: {
  50237. sameDay: '[היום ב־]LT',
  50238. nextDay: '[מחר ב־]LT',
  50239. nextWeek: 'dddd [בשעה] LT',
  50240. lastDay: '[אתמול ב־]LT',
  50241. lastWeek: '[ביום] dddd [האחרון בשעה] LT',
  50242. sameElse: 'L',
  50243. },
  50244. relativeTime: {
  50245. future: 'בעוד %s',
  50246. past: 'לפני %s',
  50247. s: 'מספר שניות',
  50248. ss: '%d שניות',
  50249. m: 'דקה',
  50250. mm: '%d דקות',
  50251. h: 'שעה',
  50252. hh: function (number) {
  50253. if (number === 2) {
  50254. return 'שעתיים';
  50255. }
  50256. return number + ' שעות';
  50257. },
  50258. d: 'יום',
  50259. dd: function (number) {
  50260. if (number === 2) {
  50261. return 'יומיים';
  50262. }
  50263. return number + ' ימים';
  50264. },
  50265. M: 'חודש',
  50266. MM: function (number) {
  50267. if (number === 2) {
  50268. return 'חודשיים';
  50269. }
  50270. return number + ' חודשים';
  50271. },
  50272. y: 'שנה',
  50273. yy: function (number) {
  50274. if (number === 2) {
  50275. return 'שנתיים';
  50276. } else if (number % 10 === 0 && number !== 10) {
  50277. return number + ' שנה';
  50278. }
  50279. return number + ' שנים';
  50280. },
  50281. },
  50282. meridiemParse: /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,
  50283. isPM: function (input) {
  50284. return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input);
  50285. },
  50286. meridiem: function (hour, minute, isLower) {
  50287. if (hour < 5) {
  50288. return 'לפנות בוקר';
  50289. } else if (hour < 10) {
  50290. return 'בבוקר';
  50291. } else if (hour < 12) {
  50292. return isLower ? 'לפנה"צ' : 'לפני הצהריים';
  50293. } else if (hour < 18) {
  50294. return isLower ? 'אחה"צ' : 'אחרי הצהריים';
  50295. } else {
  50296. return 'בערב';
  50297. }
  50298. },
  50299. });
  50300. return he;
  50301. })));
  50302. /***/ }),
  50303. /***/ 30094:
  50304. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  50305. //! moment.js locale configuration
  50306. //! locale : Hindi [hi]
  50307. //! author : Mayank Singhal : https://github.com/mayanksinghal
  50308. ;(function (global, factory) {
  50309. true ? factory(__webpack_require__(30381)) :
  50310. 0
  50311. }(this, (function (moment) { 'use strict';
  50312. //! moment.js locale configuration
  50313. var symbolMap = {
  50314. 1: '१',
  50315. 2: '२',
  50316. 3: '३',
  50317. 4: '४',
  50318. 5: '५',
  50319. 6: '६',
  50320. 7: '७',
  50321. 8: '८',
  50322. 9: '९',
  50323. 0: '०',
  50324. },
  50325. numberMap = {
  50326. '१': '1',
  50327. '२': '2',
  50328. '३': '3',
  50329. '४': '4',
  50330. '५': '5',
  50331. '६': '6',
  50332. '७': '7',
  50333. '८': '8',
  50334. '९': '9',
  50335. '०': '0',
  50336. },
  50337. monthsParse = [
  50338. /^जन/i,
  50339. /^फ़र|फर/i,
  50340. /^मार्च/i,
  50341. /^अप्रै/i,
  50342. /^मई/i,
  50343. /^जून/i,
  50344. /^जुल/i,
  50345. /^अग/i,
  50346. /^सितं|सित/i,
  50347. /^अक्टू/i,
  50348. /^नव|नवं/i,
  50349. /^दिसं|दिस/i,
  50350. ],
  50351. shortMonthsParse = [
  50352. /^जन/i,
  50353. /^फ़र/i,
  50354. /^मार्च/i,
  50355. /^अप्रै/i,
  50356. /^मई/i,
  50357. /^जून/i,
  50358. /^जुल/i,
  50359. /^अग/i,
  50360. /^सित/i,
  50361. /^अक्टू/i,
  50362. /^नव/i,
  50363. /^दिस/i,
  50364. ];
  50365. var hi = moment.defineLocale('hi', {
  50366. months: {
  50367. format: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split(
  50368. '_'
  50369. ),
  50370. standalone: 'जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर'.split(
  50371. '_'
  50372. ),
  50373. },
  50374. monthsShort: 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split(
  50375. '_'
  50376. ),
  50377. weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
  50378. weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),
  50379. weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
  50380. longDateFormat: {
  50381. LT: 'A h:mm बजे',
  50382. LTS: 'A h:mm:ss बजे',
  50383. L: 'DD/MM/YYYY',
  50384. LL: 'D MMMM YYYY',
  50385. LLL: 'D MMMM YYYY, A h:mm बजे',
  50386. LLLL: 'dddd, D MMMM YYYY, A h:mm बजे',
  50387. },
  50388. monthsParse: monthsParse,
  50389. longMonthsParse: monthsParse,
  50390. shortMonthsParse: shortMonthsParse,
  50391. monthsRegex: /^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,
  50392. monthsShortRegex: /^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,
  50393. monthsStrictRegex: /^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,
  50394. monthsShortStrictRegex: /^(जन\.?|फ़र\.?|मार्च?|अप्रै\.?|मई?|जून?|जुल\.?|अग\.?|सित\.?|अक्टू\.?|नव\.?|दिस\.?)/i,
  50395. calendar: {
  50396. sameDay: '[आज] LT',
  50397. nextDay: '[कल] LT',
  50398. nextWeek: 'dddd, LT',
  50399. lastDay: '[कल] LT',
  50400. lastWeek: '[पिछले] dddd, LT',
  50401. sameElse: 'L',
  50402. },
  50403. relativeTime: {
  50404. future: '%s में',
  50405. past: '%s पहले',
  50406. s: 'कुछ ही क्षण',
  50407. ss: '%d सेकंड',
  50408. m: 'एक मिनट',
  50409. mm: '%d मिनट',
  50410. h: 'एक घंटा',
  50411. hh: '%d घंटे',
  50412. d: 'एक दिन',
  50413. dd: '%d दिन',
  50414. M: 'एक महीने',
  50415. MM: '%d महीने',
  50416. y: 'एक वर्ष',
  50417. yy: '%d वर्ष',
  50418. },
  50419. preparse: function (string) {
  50420. return string.replace(/[१२३४५६७८९०]/g, function (match) {
  50421. return numberMap[match];
  50422. });
  50423. },
  50424. postformat: function (string) {
  50425. return string.replace(/\d/g, function (match) {
  50426. return symbolMap[match];
  50427. });
  50428. },
  50429. // Hindi notation for meridiems are quite fuzzy in practice. While there exists
  50430. // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.
  50431. meridiemParse: /रात|सुबह|दोपहर|शाम/,
  50432. meridiemHour: function (hour, meridiem) {
  50433. if (hour === 12) {
  50434. hour = 0;
  50435. }
  50436. if (meridiem === 'रात') {
  50437. return hour < 4 ? hour : hour + 12;
  50438. } else if (meridiem === 'सुबह') {
  50439. return hour;
  50440. } else if (meridiem === 'दोपहर') {
  50441. return hour >= 10 ? hour : hour + 12;
  50442. } else if (meridiem === 'शाम') {
  50443. return hour + 12;
  50444. }
  50445. },
  50446. meridiem: function (hour, minute, isLower) {
  50447. if (hour < 4) {
  50448. return 'रात';
  50449. } else if (hour < 10) {
  50450. return 'सुबह';
  50451. } else if (hour < 17) {
  50452. return 'दोपहर';
  50453. } else if (hour < 20) {
  50454. return 'शाम';
  50455. } else {
  50456. return 'रात';
  50457. }
  50458. },
  50459. week: {
  50460. dow: 0, // Sunday is the first day of the week.
  50461. doy: 6, // The week that contains Jan 6th is the first week of the year.
  50462. },
  50463. });
  50464. return hi;
  50465. })));
  50466. /***/ }),
  50467. /***/ 30316:
  50468. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  50469. //! moment.js locale configuration
  50470. //! locale : Croatian [hr]
  50471. //! author : Bojan Marković : https://github.com/bmarkovic
  50472. ;(function (global, factory) {
  50473. true ? factory(__webpack_require__(30381)) :
  50474. 0
  50475. }(this, (function (moment) { 'use strict';
  50476. //! moment.js locale configuration
  50477. function translate(number, withoutSuffix, key) {
  50478. var result = number + ' ';
  50479. switch (key) {
  50480. case 'ss':
  50481. if (number === 1) {
  50482. result += 'sekunda';
  50483. } else if (number === 2 || number === 3 || number === 4) {
  50484. result += 'sekunde';
  50485. } else {
  50486. result += 'sekundi';
  50487. }
  50488. return result;
  50489. case 'm':
  50490. return withoutSuffix ? 'jedna minuta' : 'jedne minute';
  50491. case 'mm':
  50492. if (number === 1) {
  50493. result += 'minuta';
  50494. } else if (number === 2 || number === 3 || number === 4) {
  50495. result += 'minute';
  50496. } else {
  50497. result += 'minuta';
  50498. }
  50499. return result;
  50500. case 'h':
  50501. return withoutSuffix ? 'jedan sat' : 'jednog sata';
  50502. case 'hh':
  50503. if (number === 1) {
  50504. result += 'sat';
  50505. } else if (number === 2 || number === 3 || number === 4) {
  50506. result += 'sata';
  50507. } else {
  50508. result += 'sati';
  50509. }
  50510. return result;
  50511. case 'dd':
  50512. if (number === 1) {
  50513. result += 'dan';
  50514. } else {
  50515. result += 'dana';
  50516. }
  50517. return result;
  50518. case 'MM':
  50519. if (number === 1) {
  50520. result += 'mjesec';
  50521. } else if (number === 2 || number === 3 || number === 4) {
  50522. result += 'mjeseca';
  50523. } else {
  50524. result += 'mjeseci';
  50525. }
  50526. return result;
  50527. case 'yy':
  50528. if (number === 1) {
  50529. result += 'godina';
  50530. } else if (number === 2 || number === 3 || number === 4) {
  50531. result += 'godine';
  50532. } else {
  50533. result += 'godina';
  50534. }
  50535. return result;
  50536. }
  50537. }
  50538. var hr = moment.defineLocale('hr', {
  50539. months: {
  50540. format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split(
  50541. '_'
  50542. ),
  50543. standalone: 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split(
  50544. '_'
  50545. ),
  50546. },
  50547. monthsShort: 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split(
  50548. '_'
  50549. ),
  50550. monthsParseExact: true,
  50551. weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
  50552. '_'
  50553. ),
  50554. weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
  50555. weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
  50556. weekdaysParseExact: true,
  50557. longDateFormat: {
  50558. LT: 'H:mm',
  50559. LTS: 'H:mm:ss',
  50560. L: 'DD.MM.YYYY',
  50561. LL: 'Do MMMM YYYY',
  50562. LLL: 'Do MMMM YYYY H:mm',
  50563. LLLL: 'dddd, Do MMMM YYYY H:mm',
  50564. },
  50565. calendar: {
  50566. sameDay: '[danas u] LT',
  50567. nextDay: '[sutra u] LT',
  50568. nextWeek: function () {
  50569. switch (this.day()) {
  50570. case 0:
  50571. return '[u] [nedjelju] [u] LT';
  50572. case 3:
  50573. return '[u] [srijedu] [u] LT';
  50574. case 6:
  50575. return '[u] [subotu] [u] LT';
  50576. case 1:
  50577. case 2:
  50578. case 4:
  50579. case 5:
  50580. return '[u] dddd [u] LT';
  50581. }
  50582. },
  50583. lastDay: '[jučer u] LT',
  50584. lastWeek: function () {
  50585. switch (this.day()) {
  50586. case 0:
  50587. return '[prošlu] [nedjelju] [u] LT';
  50588. case 3:
  50589. return '[prošlu] [srijedu] [u] LT';
  50590. case 6:
  50591. return '[prošle] [subote] [u] LT';
  50592. case 1:
  50593. case 2:
  50594. case 4:
  50595. case 5:
  50596. return '[prošli] dddd [u] LT';
  50597. }
  50598. },
  50599. sameElse: 'L',
  50600. },
  50601. relativeTime: {
  50602. future: 'za %s',
  50603. past: 'prije %s',
  50604. s: 'par sekundi',
  50605. ss: translate,
  50606. m: translate,
  50607. mm: translate,
  50608. h: translate,
  50609. hh: translate,
  50610. d: 'dan',
  50611. dd: translate,
  50612. M: 'mjesec',
  50613. MM: translate,
  50614. y: 'godinu',
  50615. yy: translate,
  50616. },
  50617. dayOfMonthOrdinalParse: /\d{1,2}\./,
  50618. ordinal: '%d.',
  50619. week: {
  50620. dow: 1, // Monday is the first day of the week.
  50621. doy: 7, // The week that contains Jan 7th is the first week of the year.
  50622. },
  50623. });
  50624. return hr;
  50625. })));
  50626. /***/ }),
  50627. /***/ 22138:
  50628. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  50629. //! moment.js locale configuration
  50630. //! locale : Hungarian [hu]
  50631. //! author : Adam Brunner : https://github.com/adambrunner
  50632. //! author : Peter Viszt : https://github.com/passatgt
  50633. ;(function (global, factory) {
  50634. true ? factory(__webpack_require__(30381)) :
  50635. 0
  50636. }(this, (function (moment) { 'use strict';
  50637. //! moment.js locale configuration
  50638. var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(
  50639. ' '
  50640. );
  50641. function translate(number, withoutSuffix, key, isFuture) {
  50642. var num = number;
  50643. switch (key) {
  50644. case 's':
  50645. return isFuture || withoutSuffix
  50646. ? 'néhány másodperc'
  50647. : 'néhány másodperce';
  50648. case 'ss':
  50649. return num + (isFuture || withoutSuffix)
  50650. ? ' másodperc'
  50651. : ' másodperce';
  50652. case 'm':
  50653. return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');
  50654. case 'mm':
  50655. return num + (isFuture || withoutSuffix ? ' perc' : ' perce');
  50656. case 'h':
  50657. return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');
  50658. case 'hh':
  50659. return num + (isFuture || withoutSuffix ? ' óra' : ' órája');
  50660. case 'd':
  50661. return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');
  50662. case 'dd':
  50663. return num + (isFuture || withoutSuffix ? ' nap' : ' napja');
  50664. case 'M':
  50665. return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
  50666. case 'MM':
  50667. return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
  50668. case 'y':
  50669. return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');
  50670. case 'yy':
  50671. return num + (isFuture || withoutSuffix ? ' év' : ' éve');
  50672. }
  50673. return '';
  50674. }
  50675. function week(isFuture) {
  50676. return (
  50677. (isFuture ? '' : '[múlt] ') +
  50678. '[' +
  50679. weekEndings[this.day()] +
  50680. '] LT[-kor]'
  50681. );
  50682. }
  50683. var hu = moment.defineLocale('hu', {
  50684. months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split(
  50685. '_'
  50686. ),
  50687. monthsShort: 'jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.'.split(
  50688. '_'
  50689. ),
  50690. monthsParseExact: true,
  50691. weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),
  50692. weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),
  50693. weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'),
  50694. longDateFormat: {
  50695. LT: 'H:mm',
  50696. LTS: 'H:mm:ss',
  50697. L: 'YYYY.MM.DD.',
  50698. LL: 'YYYY. MMMM D.',
  50699. LLL: 'YYYY. MMMM D. H:mm',
  50700. LLLL: 'YYYY. MMMM D., dddd H:mm',
  50701. },
  50702. meridiemParse: /de|du/i,
  50703. isPM: function (input) {
  50704. return input.charAt(1).toLowerCase() === 'u';
  50705. },
  50706. meridiem: function (hours, minutes, isLower) {
  50707. if (hours < 12) {
  50708. return isLower === true ? 'de' : 'DE';
  50709. } else {
  50710. return isLower === true ? 'du' : 'DU';
  50711. }
  50712. },
  50713. calendar: {
  50714. sameDay: '[ma] LT[-kor]',
  50715. nextDay: '[holnap] LT[-kor]',
  50716. nextWeek: function () {
  50717. return week.call(this, true);
  50718. },
  50719. lastDay: '[tegnap] LT[-kor]',
  50720. lastWeek: function () {
  50721. return week.call(this, false);
  50722. },
  50723. sameElse: 'L',
  50724. },
  50725. relativeTime: {
  50726. future: '%s múlva',
  50727. past: '%s',
  50728. s: translate,
  50729. ss: translate,
  50730. m: translate,
  50731. mm: translate,
  50732. h: translate,
  50733. hh: translate,
  50734. d: translate,
  50735. dd: translate,
  50736. M: translate,
  50737. MM: translate,
  50738. y: translate,
  50739. yy: translate,
  50740. },
  50741. dayOfMonthOrdinalParse: /\d{1,2}\./,
  50742. ordinal: '%d.',
  50743. week: {
  50744. dow: 1, // Monday is the first day of the week.
  50745. doy: 4, // The week that contains Jan 4th is the first week of the year.
  50746. },
  50747. });
  50748. return hu;
  50749. })));
  50750. /***/ }),
  50751. /***/ 11423:
  50752. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  50753. //! moment.js locale configuration
  50754. //! locale : Armenian [hy-am]
  50755. //! author : Armendarabyan : https://github.com/armendarabyan
  50756. ;(function (global, factory) {
  50757. true ? factory(__webpack_require__(30381)) :
  50758. 0
  50759. }(this, (function (moment) { 'use strict';
  50760. //! moment.js locale configuration
  50761. var hyAm = moment.defineLocale('hy-am', {
  50762. months: {
  50763. format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split(
  50764. '_'
  50765. ),
  50766. standalone: 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split(
  50767. '_'
  50768. ),
  50769. },
  50770. monthsShort: 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),
  50771. weekdays: 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split(
  50772. '_'
  50773. ),
  50774. weekdaysShort: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
  50775. weekdaysMin: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
  50776. longDateFormat: {
  50777. LT: 'HH:mm',
  50778. LTS: 'HH:mm:ss',
  50779. L: 'DD.MM.YYYY',
  50780. LL: 'D MMMM YYYY թ.',
  50781. LLL: 'D MMMM YYYY թ., HH:mm',
  50782. LLLL: 'dddd, D MMMM YYYY թ., HH:mm',
  50783. },
  50784. calendar: {
  50785. sameDay: '[այսօր] LT',
  50786. nextDay: '[վաղը] LT',
  50787. lastDay: '[երեկ] LT',
  50788. nextWeek: function () {
  50789. return 'dddd [օրը ժամը] LT';
  50790. },
  50791. lastWeek: function () {
  50792. return '[անցած] dddd [օրը ժամը] LT';
  50793. },
  50794. sameElse: 'L',
  50795. },
  50796. relativeTime: {
  50797. future: '%s հետո',
  50798. past: '%s առաջ',
  50799. s: 'մի քանի վայրկյան',
  50800. ss: '%d վայրկյան',
  50801. m: 'րոպե',
  50802. mm: '%d րոպե',
  50803. h: 'ժամ',
  50804. hh: '%d ժամ',
  50805. d: 'օր',
  50806. dd: '%d օր',
  50807. M: 'ամիս',
  50808. MM: '%d ամիս',
  50809. y: 'տարի',
  50810. yy: '%d տարի',
  50811. },
  50812. meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,
  50813. isPM: function (input) {
  50814. return /^(ցերեկվա|երեկոյան)$/.test(input);
  50815. },
  50816. meridiem: function (hour) {
  50817. if (hour < 4) {
  50818. return 'գիշերվա';
  50819. } else if (hour < 12) {
  50820. return 'առավոտվա';
  50821. } else if (hour < 17) {
  50822. return 'ցերեկվա';
  50823. } else {
  50824. return 'երեկոյան';
  50825. }
  50826. },
  50827. dayOfMonthOrdinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/,
  50828. ordinal: function (number, period) {
  50829. switch (period) {
  50830. case 'DDD':
  50831. case 'w':
  50832. case 'W':
  50833. case 'DDDo':
  50834. if (number === 1) {
  50835. return number + '-ին';
  50836. }
  50837. return number + '-րդ';
  50838. default:
  50839. return number;
  50840. }
  50841. },
  50842. week: {
  50843. dow: 1, // Monday is the first day of the week.
  50844. doy: 7, // The week that contains Jan 7th is the first week of the year.
  50845. },
  50846. });
  50847. return hyAm;
  50848. })));
  50849. /***/ }),
  50850. /***/ 29218:
  50851. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  50852. //! moment.js locale configuration
  50853. //! locale : Indonesian [id]
  50854. //! author : Mohammad Satrio Utomo : https://github.com/tyok
  50855. //! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan
  50856. ;(function (global, factory) {
  50857. true ? factory(__webpack_require__(30381)) :
  50858. 0
  50859. }(this, (function (moment) { 'use strict';
  50860. //! moment.js locale configuration
  50861. var id = moment.defineLocale('id', {
  50862. months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split(
  50863. '_'
  50864. ),
  50865. monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'),
  50866. weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),
  50867. weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),
  50868. weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),
  50869. longDateFormat: {
  50870. LT: 'HH.mm',
  50871. LTS: 'HH.mm.ss',
  50872. L: 'DD/MM/YYYY',
  50873. LL: 'D MMMM YYYY',
  50874. LLL: 'D MMMM YYYY [pukul] HH.mm',
  50875. LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
  50876. },
  50877. meridiemParse: /pagi|siang|sore|malam/,
  50878. meridiemHour: function (hour, meridiem) {
  50879. if (hour === 12) {
  50880. hour = 0;
  50881. }
  50882. if (meridiem === 'pagi') {
  50883. return hour;
  50884. } else if (meridiem === 'siang') {
  50885. return hour >= 11 ? hour : hour + 12;
  50886. } else if (meridiem === 'sore' || meridiem === 'malam') {
  50887. return hour + 12;
  50888. }
  50889. },
  50890. meridiem: function (hours, minutes, isLower) {
  50891. if (hours < 11) {
  50892. return 'pagi';
  50893. } else if (hours < 15) {
  50894. return 'siang';
  50895. } else if (hours < 19) {
  50896. return 'sore';
  50897. } else {
  50898. return 'malam';
  50899. }
  50900. },
  50901. calendar: {
  50902. sameDay: '[Hari ini pukul] LT',
  50903. nextDay: '[Besok pukul] LT',
  50904. nextWeek: 'dddd [pukul] LT',
  50905. lastDay: '[Kemarin pukul] LT',
  50906. lastWeek: 'dddd [lalu pukul] LT',
  50907. sameElse: 'L',
  50908. },
  50909. relativeTime: {
  50910. future: 'dalam %s',
  50911. past: '%s yang lalu',
  50912. s: 'beberapa detik',
  50913. ss: '%d detik',
  50914. m: 'semenit',
  50915. mm: '%d menit',
  50916. h: 'sejam',
  50917. hh: '%d jam',
  50918. d: 'sehari',
  50919. dd: '%d hari',
  50920. M: 'sebulan',
  50921. MM: '%d bulan',
  50922. y: 'setahun',
  50923. yy: '%d tahun',
  50924. },
  50925. week: {
  50926. dow: 0, // Sunday is the first day of the week.
  50927. doy: 6, // The week that contains Jan 6th is the first week of the year.
  50928. },
  50929. });
  50930. return id;
  50931. })));
  50932. /***/ }),
  50933. /***/ 90135:
  50934. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  50935. //! moment.js locale configuration
  50936. //! locale : Icelandic [is]
  50937. //! author : Hinrik Örn Sigurðsson : https://github.com/hinrik
  50938. ;(function (global, factory) {
  50939. true ? factory(__webpack_require__(30381)) :
  50940. 0
  50941. }(this, (function (moment) { 'use strict';
  50942. //! moment.js locale configuration
  50943. function plural(n) {
  50944. if (n % 100 === 11) {
  50945. return true;
  50946. } else if (n % 10 === 1) {
  50947. return false;
  50948. }
  50949. return true;
  50950. }
  50951. function translate(number, withoutSuffix, key, isFuture) {
  50952. var result = number + ' ';
  50953. switch (key) {
  50954. case 's':
  50955. return withoutSuffix || isFuture
  50956. ? 'nokkrar sekúndur'
  50957. : 'nokkrum sekúndum';
  50958. case 'ss':
  50959. if (plural(number)) {
  50960. return (
  50961. result +
  50962. (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum')
  50963. );
  50964. }
  50965. return result + 'sekúnda';
  50966. case 'm':
  50967. return withoutSuffix ? 'mínúta' : 'mínútu';
  50968. case 'mm':
  50969. if (plural(number)) {
  50970. return (
  50971. result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum')
  50972. );
  50973. } else if (withoutSuffix) {
  50974. return result + 'mínúta';
  50975. }
  50976. return result + 'mínútu';
  50977. case 'hh':
  50978. if (plural(number)) {
  50979. return (
  50980. result +
  50981. (withoutSuffix || isFuture
  50982. ? 'klukkustundir'
  50983. : 'klukkustundum')
  50984. );
  50985. }
  50986. return result + 'klukkustund';
  50987. case 'd':
  50988. if (withoutSuffix) {
  50989. return 'dagur';
  50990. }
  50991. return isFuture ? 'dag' : 'degi';
  50992. case 'dd':
  50993. if (plural(number)) {
  50994. if (withoutSuffix) {
  50995. return result + 'dagar';
  50996. }
  50997. return result + (isFuture ? 'daga' : 'dögum');
  50998. } else if (withoutSuffix) {
  50999. return result + 'dagur';
  51000. }
  51001. return result + (isFuture ? 'dag' : 'degi');
  51002. case 'M':
  51003. if (withoutSuffix) {
  51004. return 'mánuður';
  51005. }
  51006. return isFuture ? 'mánuð' : 'mánuði';
  51007. case 'MM':
  51008. if (plural(number)) {
  51009. if (withoutSuffix) {
  51010. return result + 'mánuðir';
  51011. }
  51012. return result + (isFuture ? 'mánuði' : 'mánuðum');
  51013. } else if (withoutSuffix) {
  51014. return result + 'mánuður';
  51015. }
  51016. return result + (isFuture ? 'mánuð' : 'mánuði');
  51017. case 'y':
  51018. return withoutSuffix || isFuture ? 'ár' : 'ári';
  51019. case 'yy':
  51020. if (plural(number)) {
  51021. return result + (withoutSuffix || isFuture ? 'ár' : 'árum');
  51022. }
  51023. return result + (withoutSuffix || isFuture ? 'ár' : 'ári');
  51024. }
  51025. }
  51026. var is = moment.defineLocale('is', {
  51027. months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split(
  51028. '_'
  51029. ),
  51030. monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),
  51031. weekdays: 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split(
  51032. '_'
  51033. ),
  51034. weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'),
  51035. weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),
  51036. longDateFormat: {
  51037. LT: 'H:mm',
  51038. LTS: 'H:mm:ss',
  51039. L: 'DD.MM.YYYY',
  51040. LL: 'D. MMMM YYYY',
  51041. LLL: 'D. MMMM YYYY [kl.] H:mm',
  51042. LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm',
  51043. },
  51044. calendar: {
  51045. sameDay: '[í dag kl.] LT',
  51046. nextDay: '[á morgun kl.] LT',
  51047. nextWeek: 'dddd [kl.] LT',
  51048. lastDay: '[í gær kl.] LT',
  51049. lastWeek: '[síðasta] dddd [kl.] LT',
  51050. sameElse: 'L',
  51051. },
  51052. relativeTime: {
  51053. future: 'eftir %s',
  51054. past: 'fyrir %s síðan',
  51055. s: translate,
  51056. ss: translate,
  51057. m: translate,
  51058. mm: translate,
  51059. h: 'klukkustund',
  51060. hh: translate,
  51061. d: translate,
  51062. dd: translate,
  51063. M: translate,
  51064. MM: translate,
  51065. y: translate,
  51066. yy: translate,
  51067. },
  51068. dayOfMonthOrdinalParse: /\d{1,2}\./,
  51069. ordinal: '%d.',
  51070. week: {
  51071. dow: 1, // Monday is the first day of the week.
  51072. doy: 4, // The week that contains Jan 4th is the first week of the year.
  51073. },
  51074. });
  51075. return is;
  51076. })));
  51077. /***/ }),
  51078. /***/ 10150:
  51079. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  51080. //! moment.js locale configuration
  51081. //! locale : Italian (Switzerland) [it-ch]
  51082. //! author : xfh : https://github.com/xfh
  51083. ;(function (global, factory) {
  51084. true ? factory(__webpack_require__(30381)) :
  51085. 0
  51086. }(this, (function (moment) { 'use strict';
  51087. //! moment.js locale configuration
  51088. var itCh = moment.defineLocale('it-ch', {
  51089. months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(
  51090. '_'
  51091. ),
  51092. monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
  51093. weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(
  51094. '_'
  51095. ),
  51096. weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
  51097. weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),
  51098. longDateFormat: {
  51099. LT: 'HH:mm',
  51100. LTS: 'HH:mm:ss',
  51101. L: 'DD.MM.YYYY',
  51102. LL: 'D MMMM YYYY',
  51103. LLL: 'D MMMM YYYY HH:mm',
  51104. LLLL: 'dddd D MMMM YYYY HH:mm',
  51105. },
  51106. calendar: {
  51107. sameDay: '[Oggi alle] LT',
  51108. nextDay: '[Domani alle] LT',
  51109. nextWeek: 'dddd [alle] LT',
  51110. lastDay: '[Ieri alle] LT',
  51111. lastWeek: function () {
  51112. switch (this.day()) {
  51113. case 0:
  51114. return '[la scorsa] dddd [alle] LT';
  51115. default:
  51116. return '[lo scorso] dddd [alle] LT';
  51117. }
  51118. },
  51119. sameElse: 'L',
  51120. },
  51121. relativeTime: {
  51122. future: function (s) {
  51123. return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s;
  51124. },
  51125. past: '%s fa',
  51126. s: 'alcuni secondi',
  51127. ss: '%d secondi',
  51128. m: 'un minuto',
  51129. mm: '%d minuti',
  51130. h: "un'ora",
  51131. hh: '%d ore',
  51132. d: 'un giorno',
  51133. dd: '%d giorni',
  51134. M: 'un mese',
  51135. MM: '%d mesi',
  51136. y: 'un anno',
  51137. yy: '%d anni',
  51138. },
  51139. dayOfMonthOrdinalParse: /\d{1,2}º/,
  51140. ordinal: '%dº',
  51141. week: {
  51142. dow: 1, // Monday is the first day of the week.
  51143. doy: 4, // The week that contains Jan 4th is the first week of the year.
  51144. },
  51145. });
  51146. return itCh;
  51147. })));
  51148. /***/ }),
  51149. /***/ 90626:
  51150. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  51151. //! moment.js locale configuration
  51152. //! locale : Italian [it]
  51153. //! author : Lorenzo : https://github.com/aliem
  51154. //! author: Mattia Larentis: https://github.com/nostalgiaz
  51155. //! author: Marco : https://github.com/Manfre98
  51156. ;(function (global, factory) {
  51157. true ? factory(__webpack_require__(30381)) :
  51158. 0
  51159. }(this, (function (moment) { 'use strict';
  51160. //! moment.js locale configuration
  51161. var it = moment.defineLocale('it', {
  51162. months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(
  51163. '_'
  51164. ),
  51165. monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
  51166. weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(
  51167. '_'
  51168. ),
  51169. weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
  51170. weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),
  51171. longDateFormat: {
  51172. LT: 'HH:mm',
  51173. LTS: 'HH:mm:ss',
  51174. L: 'DD/MM/YYYY',
  51175. LL: 'D MMMM YYYY',
  51176. LLL: 'D MMMM YYYY HH:mm',
  51177. LLLL: 'dddd D MMMM YYYY HH:mm',
  51178. },
  51179. calendar: {
  51180. sameDay: function () {
  51181. return (
  51182. '[Oggi a' +
  51183. (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
  51184. ']LT'
  51185. );
  51186. },
  51187. nextDay: function () {
  51188. return (
  51189. '[Domani a' +
  51190. (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
  51191. ']LT'
  51192. );
  51193. },
  51194. nextWeek: function () {
  51195. return (
  51196. 'dddd [a' +
  51197. (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
  51198. ']LT'
  51199. );
  51200. },
  51201. lastDay: function () {
  51202. return (
  51203. '[Ieri a' +
  51204. (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
  51205. ']LT'
  51206. );
  51207. },
  51208. lastWeek: function () {
  51209. switch (this.day()) {
  51210. case 0:
  51211. return (
  51212. '[La scorsa] dddd [a' +
  51213. (this.hours() > 1
  51214. ? 'lle '
  51215. : this.hours() === 0
  51216. ? ' '
  51217. : "ll'") +
  51218. ']LT'
  51219. );
  51220. default:
  51221. return (
  51222. '[Lo scorso] dddd [a' +
  51223. (this.hours() > 1
  51224. ? 'lle '
  51225. : this.hours() === 0
  51226. ? ' '
  51227. : "ll'") +
  51228. ']LT'
  51229. );
  51230. }
  51231. },
  51232. sameElse: 'L',
  51233. },
  51234. relativeTime: {
  51235. future: 'tra %s',
  51236. past: '%s fa',
  51237. s: 'alcuni secondi',
  51238. ss: '%d secondi',
  51239. m: 'un minuto',
  51240. mm: '%d minuti',
  51241. h: "un'ora",
  51242. hh: '%d ore',
  51243. d: 'un giorno',
  51244. dd: '%d giorni',
  51245. w: 'una settimana',
  51246. ww: '%d settimane',
  51247. M: 'un mese',
  51248. MM: '%d mesi',
  51249. y: 'un anno',
  51250. yy: '%d anni',
  51251. },
  51252. dayOfMonthOrdinalParse: /\d{1,2}º/,
  51253. ordinal: '%dº',
  51254. week: {
  51255. dow: 1, // Monday is the first day of the week.
  51256. doy: 4, // The week that contains Jan 4th is the first week of the year.
  51257. },
  51258. });
  51259. return it;
  51260. })));
  51261. /***/ }),
  51262. /***/ 39183:
  51263. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  51264. //! moment.js locale configuration
  51265. //! locale : Japanese [ja]
  51266. //! author : LI Long : https://github.com/baryon
  51267. ;(function (global, factory) {
  51268. true ? factory(__webpack_require__(30381)) :
  51269. 0
  51270. }(this, (function (moment) { 'use strict';
  51271. //! moment.js locale configuration
  51272. var ja = moment.defineLocale('ja', {
  51273. eras: [
  51274. {
  51275. since: '2019-05-01',
  51276. offset: 1,
  51277. name: '令和',
  51278. narrow: '㋿',
  51279. abbr: 'R',
  51280. },
  51281. {
  51282. since: '1989-01-08',
  51283. until: '2019-04-30',
  51284. offset: 1,
  51285. name: '平成',
  51286. narrow: '㍻',
  51287. abbr: 'H',
  51288. },
  51289. {
  51290. since: '1926-12-25',
  51291. until: '1989-01-07',
  51292. offset: 1,
  51293. name: '昭和',
  51294. narrow: '㍼',
  51295. abbr: 'S',
  51296. },
  51297. {
  51298. since: '1912-07-30',
  51299. until: '1926-12-24',
  51300. offset: 1,
  51301. name: '大正',
  51302. narrow: '㍽',
  51303. abbr: 'T',
  51304. },
  51305. {
  51306. since: '1873-01-01',
  51307. until: '1912-07-29',
  51308. offset: 6,
  51309. name: '明治',
  51310. narrow: '㍾',
  51311. abbr: 'M',
  51312. },
  51313. {
  51314. since: '0001-01-01',
  51315. until: '1873-12-31',
  51316. offset: 1,
  51317. name: '西暦',
  51318. narrow: 'AD',
  51319. abbr: 'AD',
  51320. },
  51321. {
  51322. since: '0000-12-31',
  51323. until: -Infinity,
  51324. offset: 1,
  51325. name: '紀元前',
  51326. narrow: 'BC',
  51327. abbr: 'BC',
  51328. },
  51329. ],
  51330. eraYearOrdinalRegex: /(元|\d+)年/,
  51331. eraYearOrdinalParse: function (input, match) {
  51332. return match[1] === '元' ? 1 : parseInt(match[1] || input, 10);
  51333. },
  51334. months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
  51335. monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
  51336. '_'
  51337. ),
  51338. weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),
  51339. weekdaysShort: '日_月_火_水_木_金_土'.split('_'),
  51340. weekdaysMin: '日_月_火_水_木_金_土'.split('_'),
  51341. longDateFormat: {
  51342. LT: 'HH:mm',
  51343. LTS: 'HH:mm:ss',
  51344. L: 'YYYY/MM/DD',
  51345. LL: 'YYYY年M月D日',
  51346. LLL: 'YYYY年M月D日 HH:mm',
  51347. LLLL: 'YYYY年M月D日 dddd HH:mm',
  51348. l: 'YYYY/MM/DD',
  51349. ll: 'YYYY年M月D日',
  51350. lll: 'YYYY年M月D日 HH:mm',
  51351. llll: 'YYYY年M月D日(ddd) HH:mm',
  51352. },
  51353. meridiemParse: /午前|午後/i,
  51354. isPM: function (input) {
  51355. return input === '午後';
  51356. },
  51357. meridiem: function (hour, minute, isLower) {
  51358. if (hour < 12) {
  51359. return '午前';
  51360. } else {
  51361. return '午後';
  51362. }
  51363. },
  51364. calendar: {
  51365. sameDay: '[今日] LT',
  51366. nextDay: '[明日] LT',
  51367. nextWeek: function (now) {
  51368. if (now.week() !== this.week()) {
  51369. return '[来週]dddd LT';
  51370. } else {
  51371. return 'dddd LT';
  51372. }
  51373. },
  51374. lastDay: '[昨日] LT',
  51375. lastWeek: function (now) {
  51376. if (this.week() !== now.week()) {
  51377. return '[先週]dddd LT';
  51378. } else {
  51379. return 'dddd LT';
  51380. }
  51381. },
  51382. sameElse: 'L',
  51383. },
  51384. dayOfMonthOrdinalParse: /\d{1,2}日/,
  51385. ordinal: function (number, period) {
  51386. switch (period) {
  51387. case 'y':
  51388. return number === 1 ? '元年' : number + '年';
  51389. case 'd':
  51390. case 'D':
  51391. case 'DDD':
  51392. return number + '日';
  51393. default:
  51394. return number;
  51395. }
  51396. },
  51397. relativeTime: {
  51398. future: '%s後',
  51399. past: '%s前',
  51400. s: '数秒',
  51401. ss: '%d秒',
  51402. m: '1分',
  51403. mm: '%d分',
  51404. h: '1時間',
  51405. hh: '%d時間',
  51406. d: '1日',
  51407. dd: '%d日',
  51408. M: '1ヶ月',
  51409. MM: '%dヶ月',
  51410. y: '1年',
  51411. yy: '%d年',
  51412. },
  51413. });
  51414. return ja;
  51415. })));
  51416. /***/ }),
  51417. /***/ 24286:
  51418. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  51419. //! moment.js locale configuration
  51420. //! locale : Javanese [jv]
  51421. //! author : Rony Lantip : https://github.com/lantip
  51422. //! reference: http://jv.wikipedia.org/wiki/Basa_Jawa
  51423. ;(function (global, factory) {
  51424. true ? factory(__webpack_require__(30381)) :
  51425. 0
  51426. }(this, (function (moment) { 'use strict';
  51427. //! moment.js locale configuration
  51428. var jv = moment.defineLocale('jv', {
  51429. months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split(
  51430. '_'
  51431. ),
  51432. monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'),
  51433. weekdays: 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'),
  51434. weekdaysShort: 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'),
  51435. weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'),
  51436. longDateFormat: {
  51437. LT: 'HH.mm',
  51438. LTS: 'HH.mm.ss',
  51439. L: 'DD/MM/YYYY',
  51440. LL: 'D MMMM YYYY',
  51441. LLL: 'D MMMM YYYY [pukul] HH.mm',
  51442. LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
  51443. },
  51444. meridiemParse: /enjing|siyang|sonten|ndalu/,
  51445. meridiemHour: function (hour, meridiem) {
  51446. if (hour === 12) {
  51447. hour = 0;
  51448. }
  51449. if (meridiem === 'enjing') {
  51450. return hour;
  51451. } else if (meridiem === 'siyang') {
  51452. return hour >= 11 ? hour : hour + 12;
  51453. } else if (meridiem === 'sonten' || meridiem === 'ndalu') {
  51454. return hour + 12;
  51455. }
  51456. },
  51457. meridiem: function (hours, minutes, isLower) {
  51458. if (hours < 11) {
  51459. return 'enjing';
  51460. } else if (hours < 15) {
  51461. return 'siyang';
  51462. } else if (hours < 19) {
  51463. return 'sonten';
  51464. } else {
  51465. return 'ndalu';
  51466. }
  51467. },
  51468. calendar: {
  51469. sameDay: '[Dinten puniko pukul] LT',
  51470. nextDay: '[Mbenjang pukul] LT',
  51471. nextWeek: 'dddd [pukul] LT',
  51472. lastDay: '[Kala wingi pukul] LT',
  51473. lastWeek: 'dddd [kepengker pukul] LT',
  51474. sameElse: 'L',
  51475. },
  51476. relativeTime: {
  51477. future: 'wonten ing %s',
  51478. past: '%s ingkang kepengker',
  51479. s: 'sawetawis detik',
  51480. ss: '%d detik',
  51481. m: 'setunggal menit',
  51482. mm: '%d menit',
  51483. h: 'setunggal jam',
  51484. hh: '%d jam',
  51485. d: 'sedinten',
  51486. dd: '%d dinten',
  51487. M: 'sewulan',
  51488. MM: '%d wulan',
  51489. y: 'setaun',
  51490. yy: '%d taun',
  51491. },
  51492. week: {
  51493. dow: 1, // Monday is the first day of the week.
  51494. doy: 7, // The week that contains Jan 7th is the first week of the year.
  51495. },
  51496. });
  51497. return jv;
  51498. })));
  51499. /***/ }),
  51500. /***/ 12105:
  51501. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  51502. //! moment.js locale configuration
  51503. //! locale : Georgian [ka]
  51504. //! author : Irakli Janiashvili : https://github.com/IrakliJani
  51505. ;(function (global, factory) {
  51506. true ? factory(__webpack_require__(30381)) :
  51507. 0
  51508. }(this, (function (moment) { 'use strict';
  51509. //! moment.js locale configuration
  51510. var ka = moment.defineLocale('ka', {
  51511. months: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split(
  51512. '_'
  51513. ),
  51514. monthsShort: 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'),
  51515. weekdays: {
  51516. standalone: 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split(
  51517. '_'
  51518. ),
  51519. format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split(
  51520. '_'
  51521. ),
  51522. isFormat: /(წინა|შემდეგ)/,
  51523. },
  51524. weekdaysShort: 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'),
  51525. weekdaysMin: 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'),
  51526. longDateFormat: {
  51527. LT: 'HH:mm',
  51528. LTS: 'HH:mm:ss',
  51529. L: 'DD/MM/YYYY',
  51530. LL: 'D MMMM YYYY',
  51531. LLL: 'D MMMM YYYY HH:mm',
  51532. LLLL: 'dddd, D MMMM YYYY HH:mm',
  51533. },
  51534. calendar: {
  51535. sameDay: '[დღეს] LT[-ზე]',
  51536. nextDay: '[ხვალ] LT[-ზე]',
  51537. lastDay: '[გუშინ] LT[-ზე]',
  51538. nextWeek: '[შემდეგ] dddd LT[-ზე]',
  51539. lastWeek: '[წინა] dddd LT-ზე',
  51540. sameElse: 'L',
  51541. },
  51542. relativeTime: {
  51543. future: function (s) {
  51544. return s.replace(/(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/, function (
  51545. $0,
  51546. $1,
  51547. $2
  51548. ) {
  51549. return $2 === 'ი' ? $1 + 'ში' : $1 + $2 + 'ში';
  51550. });
  51551. },
  51552. past: function (s) {
  51553. if (/(წამი|წუთი|საათი|დღე|თვე)/.test(s)) {
  51554. return s.replace(/(ი|ე)$/, 'ის წინ');
  51555. }
  51556. if (/წელი/.test(s)) {
  51557. return s.replace(/წელი$/, 'წლის წინ');
  51558. }
  51559. return s;
  51560. },
  51561. s: 'რამდენიმე წამი',
  51562. ss: '%d წამი',
  51563. m: 'წუთი',
  51564. mm: '%d წუთი',
  51565. h: 'საათი',
  51566. hh: '%d საათი',
  51567. d: 'დღე',
  51568. dd: '%d დღე',
  51569. M: 'თვე',
  51570. MM: '%d თვე',
  51571. y: 'წელი',
  51572. yy: '%d წელი',
  51573. },
  51574. dayOfMonthOrdinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,
  51575. ordinal: function (number) {
  51576. if (number === 0) {
  51577. return number;
  51578. }
  51579. if (number === 1) {
  51580. return number + '-ლი';
  51581. }
  51582. if (
  51583. number < 20 ||
  51584. (number <= 100 && number % 20 === 0) ||
  51585. number % 100 === 0
  51586. ) {
  51587. return 'მე-' + number;
  51588. }
  51589. return number + '-ე';
  51590. },
  51591. week: {
  51592. dow: 1,
  51593. doy: 7,
  51594. },
  51595. });
  51596. return ka;
  51597. })));
  51598. /***/ }),
  51599. /***/ 47772:
  51600. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  51601. //! moment.js locale configuration
  51602. //! locale : Kazakh [kk]
  51603. //! authors : Nurlan Rakhimzhanov : https://github.com/nurlan
  51604. ;(function (global, factory) {
  51605. true ? factory(__webpack_require__(30381)) :
  51606. 0
  51607. }(this, (function (moment) { 'use strict';
  51608. //! moment.js locale configuration
  51609. var suffixes = {
  51610. 0: '-ші',
  51611. 1: '-ші',
  51612. 2: '-ші',
  51613. 3: '-ші',
  51614. 4: '-ші',
  51615. 5: '-ші',
  51616. 6: '-шы',
  51617. 7: '-ші',
  51618. 8: '-ші',
  51619. 9: '-шы',
  51620. 10: '-шы',
  51621. 20: '-шы',
  51622. 30: '-шы',
  51623. 40: '-шы',
  51624. 50: '-ші',
  51625. 60: '-шы',
  51626. 70: '-ші',
  51627. 80: '-ші',
  51628. 90: '-шы',
  51629. 100: '-ші',
  51630. };
  51631. var kk = moment.defineLocale('kk', {
  51632. months: 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split(
  51633. '_'
  51634. ),
  51635. monthsShort: 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'),
  51636. weekdays: 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split(
  51637. '_'
  51638. ),
  51639. weekdaysShort: 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'),
  51640. weekdaysMin: 'жк_дй_сй_ср_бй_жм_сн'.split('_'),
  51641. longDateFormat: {
  51642. LT: 'HH:mm',
  51643. LTS: 'HH:mm:ss',
  51644. L: 'DD.MM.YYYY',
  51645. LL: 'D MMMM YYYY',
  51646. LLL: 'D MMMM YYYY HH:mm',
  51647. LLLL: 'dddd, D MMMM YYYY HH:mm',
  51648. },
  51649. calendar: {
  51650. sameDay: '[Бүгін сағат] LT',
  51651. nextDay: '[Ертең сағат] LT',
  51652. nextWeek: 'dddd [сағат] LT',
  51653. lastDay: '[Кеше сағат] LT',
  51654. lastWeek: '[Өткен аптаның] dddd [сағат] LT',
  51655. sameElse: 'L',
  51656. },
  51657. relativeTime: {
  51658. future: '%s ішінде',
  51659. past: '%s бұрын',
  51660. s: 'бірнеше секунд',
  51661. ss: '%d секунд',
  51662. m: 'бір минут',
  51663. mm: '%d минут',
  51664. h: 'бір сағат',
  51665. hh: '%d сағат',
  51666. d: 'бір күн',
  51667. dd: '%d күн',
  51668. M: 'бір ай',
  51669. MM: '%d ай',
  51670. y: 'бір жыл',
  51671. yy: '%d жыл',
  51672. },
  51673. dayOfMonthOrdinalParse: /\d{1,2}-(ші|шы)/,
  51674. ordinal: function (number) {
  51675. var a = number % 10,
  51676. b = number >= 100 ? 100 : null;
  51677. return number + (suffixes[number] || suffixes[a] || suffixes[b]);
  51678. },
  51679. week: {
  51680. dow: 1, // Monday is the first day of the week.
  51681. doy: 7, // The week that contains Jan 7th is the first week of the year.
  51682. },
  51683. });
  51684. return kk;
  51685. })));
  51686. /***/ }),
  51687. /***/ 18758:
  51688. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  51689. //! moment.js locale configuration
  51690. //! locale : Cambodian [km]
  51691. //! author : Kruy Vanna : https://github.com/kruyvanna
  51692. ;(function (global, factory) {
  51693. true ? factory(__webpack_require__(30381)) :
  51694. 0
  51695. }(this, (function (moment) { 'use strict';
  51696. //! moment.js locale configuration
  51697. var symbolMap = {
  51698. 1: '១',
  51699. 2: '២',
  51700. 3: '៣',
  51701. 4: '៤',
  51702. 5: '៥',
  51703. 6: '៦',
  51704. 7: '៧',
  51705. 8: '៨',
  51706. 9: '៩',
  51707. 0: '០',
  51708. },
  51709. numberMap = {
  51710. '១': '1',
  51711. '២': '2',
  51712. '៣': '3',
  51713. '៤': '4',
  51714. '៥': '5',
  51715. '៦': '6',
  51716. '៧': '7',
  51717. '៨': '8',
  51718. '៩': '9',
  51719. '០': '0',
  51720. };
  51721. var km = moment.defineLocale('km', {
  51722. months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(
  51723. '_'
  51724. ),
  51725. monthsShort: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(
  51726. '_'
  51727. ),
  51728. weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),
  51729. weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),
  51730. weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),
  51731. weekdaysParseExact: true,
  51732. longDateFormat: {
  51733. LT: 'HH:mm',
  51734. LTS: 'HH:mm:ss',
  51735. L: 'DD/MM/YYYY',
  51736. LL: 'D MMMM YYYY',
  51737. LLL: 'D MMMM YYYY HH:mm',
  51738. LLLL: 'dddd, D MMMM YYYY HH:mm',
  51739. },
  51740. meridiemParse: /ព្រឹក|ល្ងាច/,
  51741. isPM: function (input) {
  51742. return input === 'ល្ងាច';
  51743. },
  51744. meridiem: function (hour, minute, isLower) {
  51745. if (hour < 12) {
  51746. return 'ព្រឹក';
  51747. } else {
  51748. return 'ល្ងាច';
  51749. }
  51750. },
  51751. calendar: {
  51752. sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',
  51753. nextDay: '[ស្អែក ម៉ោង] LT',
  51754. nextWeek: 'dddd [ម៉ោង] LT',
  51755. lastDay: '[ម្សិលមិញ ម៉ោង] LT',
  51756. lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT',
  51757. sameElse: 'L',
  51758. },
  51759. relativeTime: {
  51760. future: '%sទៀត',
  51761. past: '%sមុន',
  51762. s: 'ប៉ុន្មានវិនាទី',
  51763. ss: '%d វិនាទី',
  51764. m: 'មួយនាទី',
  51765. mm: '%d នាទី',
  51766. h: 'មួយម៉ោង',
  51767. hh: '%d ម៉ោង',
  51768. d: 'មួយថ្ងៃ',
  51769. dd: '%d ថ្ងៃ',
  51770. M: 'មួយខែ',
  51771. MM: '%d ខែ',
  51772. y: 'មួយឆ្នាំ',
  51773. yy: '%d ឆ្នាំ',
  51774. },
  51775. dayOfMonthOrdinalParse: /ទី\d{1,2}/,
  51776. ordinal: 'ទី%d',
  51777. preparse: function (string) {
  51778. return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) {
  51779. return numberMap[match];
  51780. });
  51781. },
  51782. postformat: function (string) {
  51783. return string.replace(/\d/g, function (match) {
  51784. return symbolMap[match];
  51785. });
  51786. },
  51787. week: {
  51788. dow: 1, // Monday is the first day of the week.
  51789. doy: 4, // The week that contains Jan 4th is the first week of the year.
  51790. },
  51791. });
  51792. return km;
  51793. })));
  51794. /***/ }),
  51795. /***/ 79282:
  51796. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  51797. //! moment.js locale configuration
  51798. //! locale : Kannada [kn]
  51799. //! author : Rajeev Naik : https://github.com/rajeevnaikte
  51800. ;(function (global, factory) {
  51801. true ? factory(__webpack_require__(30381)) :
  51802. 0
  51803. }(this, (function (moment) { 'use strict';
  51804. //! moment.js locale configuration
  51805. var symbolMap = {
  51806. 1: '೧',
  51807. 2: '೨',
  51808. 3: '೩',
  51809. 4: '೪',
  51810. 5: '೫',
  51811. 6: '೬',
  51812. 7: '೭',
  51813. 8: '೮',
  51814. 9: '೯',
  51815. 0: '೦',
  51816. },
  51817. numberMap = {
  51818. '೧': '1',
  51819. '೨': '2',
  51820. '೩': '3',
  51821. '೪': '4',
  51822. '೫': '5',
  51823. '೬': '6',
  51824. '೭': '7',
  51825. '೮': '8',
  51826. '೯': '9',
  51827. '೦': '0',
  51828. };
  51829. var kn = moment.defineLocale('kn', {
  51830. months: 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split(
  51831. '_'
  51832. ),
  51833. monthsShort: 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split(
  51834. '_'
  51835. ),
  51836. monthsParseExact: true,
  51837. weekdays: 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split(
  51838. '_'
  51839. ),
  51840. weekdaysShort: 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'),
  51841. weekdaysMin: 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'),
  51842. longDateFormat: {
  51843. LT: 'A h:mm',
  51844. LTS: 'A h:mm:ss',
  51845. L: 'DD/MM/YYYY',
  51846. LL: 'D MMMM YYYY',
  51847. LLL: 'D MMMM YYYY, A h:mm',
  51848. LLLL: 'dddd, D MMMM YYYY, A h:mm',
  51849. },
  51850. calendar: {
  51851. sameDay: '[ಇಂದು] LT',
  51852. nextDay: '[ನಾಳೆ] LT',
  51853. nextWeek: 'dddd, LT',
  51854. lastDay: '[ನಿನ್ನೆ] LT',
  51855. lastWeek: '[ಕೊನೆಯ] dddd, LT',
  51856. sameElse: 'L',
  51857. },
  51858. relativeTime: {
  51859. future: '%s ನಂತರ',
  51860. past: '%s ಹಿಂದೆ',
  51861. s: 'ಕೆಲವು ಕ್ಷಣಗಳು',
  51862. ss: '%d ಸೆಕೆಂಡುಗಳು',
  51863. m: 'ಒಂದು ನಿಮಿಷ',
  51864. mm: '%d ನಿಮಿಷ',
  51865. h: 'ಒಂದು ಗಂಟೆ',
  51866. hh: '%d ಗಂಟೆ',
  51867. d: 'ಒಂದು ದಿನ',
  51868. dd: '%d ದಿನ',
  51869. M: 'ಒಂದು ತಿಂಗಳು',
  51870. MM: '%d ತಿಂಗಳು',
  51871. y: 'ಒಂದು ವರ್ಷ',
  51872. yy: '%d ವರ್ಷ',
  51873. },
  51874. preparse: function (string) {
  51875. return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) {
  51876. return numberMap[match];
  51877. });
  51878. },
  51879. postformat: function (string) {
  51880. return string.replace(/\d/g, function (match) {
  51881. return symbolMap[match];
  51882. });
  51883. },
  51884. meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,
  51885. meridiemHour: function (hour, meridiem) {
  51886. if (hour === 12) {
  51887. hour = 0;
  51888. }
  51889. if (meridiem === 'ರಾತ್ರಿ') {
  51890. return hour < 4 ? hour : hour + 12;
  51891. } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') {
  51892. return hour;
  51893. } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') {
  51894. return hour >= 10 ? hour : hour + 12;
  51895. } else if (meridiem === 'ಸಂಜೆ') {
  51896. return hour + 12;
  51897. }
  51898. },
  51899. meridiem: function (hour, minute, isLower) {
  51900. if (hour < 4) {
  51901. return 'ರಾತ್ರಿ';
  51902. } else if (hour < 10) {
  51903. return 'ಬೆಳಿಗ್ಗೆ';
  51904. } else if (hour < 17) {
  51905. return 'ಮಧ್ಯಾಹ್ನ';
  51906. } else if (hour < 20) {
  51907. return 'ಸಂಜೆ';
  51908. } else {
  51909. return 'ರಾತ್ರಿ';
  51910. }
  51911. },
  51912. dayOfMonthOrdinalParse: /\d{1,2}(ನೇ)/,
  51913. ordinal: function (number) {
  51914. return number + 'ನೇ';
  51915. },
  51916. week: {
  51917. dow: 0, // Sunday is the first day of the week.
  51918. doy: 6, // The week that contains Jan 6th is the first week of the year.
  51919. },
  51920. });
  51921. return kn;
  51922. })));
  51923. /***/ }),
  51924. /***/ 33730:
  51925. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  51926. //! moment.js locale configuration
  51927. //! locale : Korean [ko]
  51928. //! author : Kyungwook, Park : https://github.com/kyungw00k
  51929. //! author : Jeeeyul Lee <jeeeyul@gmail.com>
  51930. ;(function (global, factory) {
  51931. true ? factory(__webpack_require__(30381)) :
  51932. 0
  51933. }(this, (function (moment) { 'use strict';
  51934. //! moment.js locale configuration
  51935. var ko = moment.defineLocale('ko', {
  51936. months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
  51937. monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split(
  51938. '_'
  51939. ),
  51940. weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),
  51941. weekdaysShort: '일_월_화_수_목_금_토'.split('_'),
  51942. weekdaysMin: '일_월_화_수_목_금_토'.split('_'),
  51943. longDateFormat: {
  51944. LT: 'A h:mm',
  51945. LTS: 'A h:mm:ss',
  51946. L: 'YYYY.MM.DD.',
  51947. LL: 'YYYY년 MMMM D일',
  51948. LLL: 'YYYY년 MMMM D일 A h:mm',
  51949. LLLL: 'YYYY년 MMMM D일 dddd A h:mm',
  51950. l: 'YYYY.MM.DD.',
  51951. ll: 'YYYY년 MMMM D일',
  51952. lll: 'YYYY년 MMMM D일 A h:mm',
  51953. llll: 'YYYY년 MMMM D일 dddd A h:mm',
  51954. },
  51955. calendar: {
  51956. sameDay: '오늘 LT',
  51957. nextDay: '내일 LT',
  51958. nextWeek: 'dddd LT',
  51959. lastDay: '어제 LT',
  51960. lastWeek: '지난주 dddd LT',
  51961. sameElse: 'L',
  51962. },
  51963. relativeTime: {
  51964. future: '%s 후',
  51965. past: '%s 전',
  51966. s: '몇 초',
  51967. ss: '%d초',
  51968. m: '1분',
  51969. mm: '%d분',
  51970. h: '한 시간',
  51971. hh: '%d시간',
  51972. d: '하루',
  51973. dd: '%d일',
  51974. M: '한 달',
  51975. MM: '%d달',
  51976. y: '일 년',
  51977. yy: '%d년',
  51978. },
  51979. dayOfMonthOrdinalParse: /\d{1,2}(일|월|주)/,
  51980. ordinal: function (number, period) {
  51981. switch (period) {
  51982. case 'd':
  51983. case 'D':
  51984. case 'DDD':
  51985. return number + '일';
  51986. case 'M':
  51987. return number + '월';
  51988. case 'w':
  51989. case 'W':
  51990. return number + '주';
  51991. default:
  51992. return number;
  51993. }
  51994. },
  51995. meridiemParse: /오전|오후/,
  51996. isPM: function (token) {
  51997. return token === '오후';
  51998. },
  51999. meridiem: function (hour, minute, isUpper) {
  52000. return hour < 12 ? '오전' : '오후';
  52001. },
  52002. });
  52003. return ko;
  52004. })));
  52005. /***/ }),
  52006. /***/ 1408:
  52007. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  52008. //! moment.js locale configuration
  52009. //! locale : Kurdish [ku]
  52010. //! author : Shahram Mebashar : https://github.com/ShahramMebashar
  52011. ;(function (global, factory) {
  52012. true ? factory(__webpack_require__(30381)) :
  52013. 0
  52014. }(this, (function (moment) { 'use strict';
  52015. //! moment.js locale configuration
  52016. var symbolMap = {
  52017. 1: '١',
  52018. 2: '٢',
  52019. 3: '٣',
  52020. 4: '٤',
  52021. 5: '٥',
  52022. 6: '٦',
  52023. 7: '٧',
  52024. 8: '٨',
  52025. 9: '٩',
  52026. 0: '٠',
  52027. },
  52028. numberMap = {
  52029. '١': '1',
  52030. '٢': '2',
  52031. '٣': '3',
  52032. '٤': '4',
  52033. '٥': '5',
  52034. '٦': '6',
  52035. '٧': '7',
  52036. '٨': '8',
  52037. '٩': '9',
  52038. '٠': '0',
  52039. },
  52040. months = [
  52041. 'کانونی دووەم',
  52042. 'شوبات',
  52043. 'ئازار',
  52044. 'نیسان',
  52045. 'ئایار',
  52046. 'حوزەیران',
  52047. 'تەمموز',
  52048. 'ئاب',
  52049. 'ئەیلوول',
  52050. 'تشرینی یەكەم',
  52051. 'تشرینی دووەم',
  52052. 'كانونی یەکەم',
  52053. ];
  52054. var ku = moment.defineLocale('ku', {
  52055. months: months,
  52056. monthsShort: months,
  52057. weekdays: 'یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌'.split(
  52058. '_'
  52059. ),
  52060. weekdaysShort: 'یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌'.split(
  52061. '_'
  52062. ),
  52063. weekdaysMin: 'ی_د_س_چ_پ_ه_ش'.split('_'),
  52064. weekdaysParseExact: true,
  52065. longDateFormat: {
  52066. LT: 'HH:mm',
  52067. LTS: 'HH:mm:ss',
  52068. L: 'DD/MM/YYYY',
  52069. LL: 'D MMMM YYYY',
  52070. LLL: 'D MMMM YYYY HH:mm',
  52071. LLLL: 'dddd, D MMMM YYYY HH:mm',
  52072. },
  52073. meridiemParse: /ئێواره‌|به‌یانی/,
  52074. isPM: function (input) {
  52075. return /ئێواره‌/.test(input);
  52076. },
  52077. meridiem: function (hour, minute, isLower) {
  52078. if (hour < 12) {
  52079. return 'به‌یانی';
  52080. } else {
  52081. return 'ئێواره‌';
  52082. }
  52083. },
  52084. calendar: {
  52085. sameDay: '[ئه‌مرۆ كاتژمێر] LT',
  52086. nextDay: '[به‌یانی كاتژمێر] LT',
  52087. nextWeek: 'dddd [كاتژمێر] LT',
  52088. lastDay: '[دوێنێ كاتژمێر] LT',
  52089. lastWeek: 'dddd [كاتژمێر] LT',
  52090. sameElse: 'L',
  52091. },
  52092. relativeTime: {
  52093. future: 'له‌ %s',
  52094. past: '%s',
  52095. s: 'چه‌ند چركه‌یه‌ك',
  52096. ss: 'چركه‌ %d',
  52097. m: 'یه‌ك خوله‌ك',
  52098. mm: '%d خوله‌ك',
  52099. h: 'یه‌ك كاتژمێر',
  52100. hh: '%d كاتژمێر',
  52101. d: 'یه‌ك ڕۆژ',
  52102. dd: '%d ڕۆژ',
  52103. M: 'یه‌ك مانگ',
  52104. MM: '%d مانگ',
  52105. y: 'یه‌ك ساڵ',
  52106. yy: '%d ساڵ',
  52107. },
  52108. preparse: function (string) {
  52109. return string
  52110. .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
  52111. return numberMap[match];
  52112. })
  52113. .replace(/،/g, ',');
  52114. },
  52115. postformat: function (string) {
  52116. return string
  52117. .replace(/\d/g, function (match) {
  52118. return symbolMap[match];
  52119. })
  52120. .replace(/,/g, '،');
  52121. },
  52122. week: {
  52123. dow: 6, // Saturday is the first day of the week.
  52124. doy: 12, // The week that contains Jan 12th is the first week of the year.
  52125. },
  52126. });
  52127. return ku;
  52128. })));
  52129. /***/ }),
  52130. /***/ 33291:
  52131. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  52132. //! moment.js locale configuration
  52133. //! locale : Kyrgyz [ky]
  52134. //! author : Chyngyz Arystan uulu : https://github.com/chyngyz
  52135. ;(function (global, factory) {
  52136. true ? factory(__webpack_require__(30381)) :
  52137. 0
  52138. }(this, (function (moment) { 'use strict';
  52139. //! moment.js locale configuration
  52140. var suffixes = {
  52141. 0: '-чү',
  52142. 1: '-чи',
  52143. 2: '-чи',
  52144. 3: '-чү',
  52145. 4: '-чү',
  52146. 5: '-чи',
  52147. 6: '-чы',
  52148. 7: '-чи',
  52149. 8: '-чи',
  52150. 9: '-чу',
  52151. 10: '-чу',
  52152. 20: '-чы',
  52153. 30: '-чу',
  52154. 40: '-чы',
  52155. 50: '-чү',
  52156. 60: '-чы',
  52157. 70: '-чи',
  52158. 80: '-чи',
  52159. 90: '-чу',
  52160. 100: '-чү',
  52161. };
  52162. var ky = moment.defineLocale('ky', {
  52163. months: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(
  52164. '_'
  52165. ),
  52166. monthsShort: 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split(
  52167. '_'
  52168. ),
  52169. weekdays: 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split(
  52170. '_'
  52171. ),
  52172. weekdaysShort: 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'),
  52173. weekdaysMin: 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'),
  52174. longDateFormat: {
  52175. LT: 'HH:mm',
  52176. LTS: 'HH:mm:ss',
  52177. L: 'DD.MM.YYYY',
  52178. LL: 'D MMMM YYYY',
  52179. LLL: 'D MMMM YYYY HH:mm',
  52180. LLLL: 'dddd, D MMMM YYYY HH:mm',
  52181. },
  52182. calendar: {
  52183. sameDay: '[Бүгүн саат] LT',
  52184. nextDay: '[Эртең саат] LT',
  52185. nextWeek: 'dddd [саат] LT',
  52186. lastDay: '[Кечээ саат] LT',
  52187. lastWeek: '[Өткөн аптанын] dddd [күнү] [саат] LT',
  52188. sameElse: 'L',
  52189. },
  52190. relativeTime: {
  52191. future: '%s ичинде',
  52192. past: '%s мурун',
  52193. s: 'бирнече секунд',
  52194. ss: '%d секунд',
  52195. m: 'бир мүнөт',
  52196. mm: '%d мүнөт',
  52197. h: 'бир саат',
  52198. hh: '%d саат',
  52199. d: 'бир күн',
  52200. dd: '%d күн',
  52201. M: 'бир ай',
  52202. MM: '%d ай',
  52203. y: 'бир жыл',
  52204. yy: '%d жыл',
  52205. },
  52206. dayOfMonthOrdinalParse: /\d{1,2}-(чи|чы|чү|чу)/,
  52207. ordinal: function (number) {
  52208. var a = number % 10,
  52209. b = number >= 100 ? 100 : null;
  52210. return number + (suffixes[number] || suffixes[a] || suffixes[b]);
  52211. },
  52212. week: {
  52213. dow: 1, // Monday is the first day of the week.
  52214. doy: 7, // The week that contains Jan 7th is the first week of the year.
  52215. },
  52216. });
  52217. return ky;
  52218. })));
  52219. /***/ }),
  52220. /***/ 36841:
  52221. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  52222. //! moment.js locale configuration
  52223. //! locale : Luxembourgish [lb]
  52224. //! author : mweimerskirch : https://github.com/mweimerskirch
  52225. //! author : David Raison : https://github.com/kwisatz
  52226. ;(function (global, factory) {
  52227. true ? factory(__webpack_require__(30381)) :
  52228. 0
  52229. }(this, (function (moment) { 'use strict';
  52230. //! moment.js locale configuration
  52231. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  52232. var format = {
  52233. m: ['eng Minutt', 'enger Minutt'],
  52234. h: ['eng Stonn', 'enger Stonn'],
  52235. d: ['een Dag', 'engem Dag'],
  52236. M: ['ee Mount', 'engem Mount'],
  52237. y: ['ee Joer', 'engem Joer'],
  52238. };
  52239. return withoutSuffix ? format[key][0] : format[key][1];
  52240. }
  52241. function processFutureTime(string) {
  52242. var number = string.substr(0, string.indexOf(' '));
  52243. if (eifelerRegelAppliesToNumber(number)) {
  52244. return 'a ' + string;
  52245. }
  52246. return 'an ' + string;
  52247. }
  52248. function processPastTime(string) {
  52249. var number = string.substr(0, string.indexOf(' '));
  52250. if (eifelerRegelAppliesToNumber(number)) {
  52251. return 'viru ' + string;
  52252. }
  52253. return 'virun ' + string;
  52254. }
  52255. /**
  52256. * Returns true if the word before the given number loses the '-n' ending.
  52257. * e.g. 'an 10 Deeg' but 'a 5 Deeg'
  52258. *
  52259. * @param number {integer}
  52260. * @returns {boolean}
  52261. */
  52262. function eifelerRegelAppliesToNumber(number) {
  52263. number = parseInt(number, 10);
  52264. if (isNaN(number)) {
  52265. return false;
  52266. }
  52267. if (number < 0) {
  52268. // Negative Number --> always true
  52269. return true;
  52270. } else if (number < 10) {
  52271. // Only 1 digit
  52272. if (4 <= number && number <= 7) {
  52273. return true;
  52274. }
  52275. return false;
  52276. } else if (number < 100) {
  52277. // 2 digits
  52278. var lastDigit = number % 10,
  52279. firstDigit = number / 10;
  52280. if (lastDigit === 0) {
  52281. return eifelerRegelAppliesToNumber(firstDigit);
  52282. }
  52283. return eifelerRegelAppliesToNumber(lastDigit);
  52284. } else if (number < 10000) {
  52285. // 3 or 4 digits --> recursively check first digit
  52286. while (number >= 10) {
  52287. number = number / 10;
  52288. }
  52289. return eifelerRegelAppliesToNumber(number);
  52290. } else {
  52291. // Anything larger than 4 digits: recursively check first n-3 digits
  52292. number = number / 1000;
  52293. return eifelerRegelAppliesToNumber(number);
  52294. }
  52295. }
  52296. var lb = moment.defineLocale('lb', {
  52297. months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split(
  52298. '_'
  52299. ),
  52300. monthsShort: 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split(
  52301. '_'
  52302. ),
  52303. monthsParseExact: true,
  52304. weekdays: 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split(
  52305. '_'
  52306. ),
  52307. weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),
  52308. weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),
  52309. weekdaysParseExact: true,
  52310. longDateFormat: {
  52311. LT: 'H:mm [Auer]',
  52312. LTS: 'H:mm:ss [Auer]',
  52313. L: 'DD.MM.YYYY',
  52314. LL: 'D. MMMM YYYY',
  52315. LLL: 'D. MMMM YYYY H:mm [Auer]',
  52316. LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]',
  52317. },
  52318. calendar: {
  52319. sameDay: '[Haut um] LT',
  52320. sameElse: 'L',
  52321. nextDay: '[Muer um] LT',
  52322. nextWeek: 'dddd [um] LT',
  52323. lastDay: '[Gëschter um] LT',
  52324. lastWeek: function () {
  52325. // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule
  52326. switch (this.day()) {
  52327. case 2:
  52328. case 4:
  52329. return '[Leschten] dddd [um] LT';
  52330. default:
  52331. return '[Leschte] dddd [um] LT';
  52332. }
  52333. },
  52334. },
  52335. relativeTime: {
  52336. future: processFutureTime,
  52337. past: processPastTime,
  52338. s: 'e puer Sekonnen',
  52339. ss: '%d Sekonnen',
  52340. m: processRelativeTime,
  52341. mm: '%d Minutten',
  52342. h: processRelativeTime,
  52343. hh: '%d Stonnen',
  52344. d: processRelativeTime,
  52345. dd: '%d Deeg',
  52346. M: processRelativeTime,
  52347. MM: '%d Méint',
  52348. y: processRelativeTime,
  52349. yy: '%d Joer',
  52350. },
  52351. dayOfMonthOrdinalParse: /\d{1,2}\./,
  52352. ordinal: '%d.',
  52353. week: {
  52354. dow: 1, // Monday is the first day of the week.
  52355. doy: 4, // The week that contains Jan 4th is the first week of the year.
  52356. },
  52357. });
  52358. return lb;
  52359. })));
  52360. /***/ }),
  52361. /***/ 55466:
  52362. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  52363. //! moment.js locale configuration
  52364. //! locale : Lao [lo]
  52365. //! author : Ryan Hart : https://github.com/ryanhart2
  52366. ;(function (global, factory) {
  52367. true ? factory(__webpack_require__(30381)) :
  52368. 0
  52369. }(this, (function (moment) { 'use strict';
  52370. //! moment.js locale configuration
  52371. var lo = moment.defineLocale('lo', {
  52372. months: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(
  52373. '_'
  52374. ),
  52375. monthsShort: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(
  52376. '_'
  52377. ),
  52378. weekdays: 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
  52379. weekdaysShort: 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
  52380. weekdaysMin: 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'),
  52381. weekdaysParseExact: true,
  52382. longDateFormat: {
  52383. LT: 'HH:mm',
  52384. LTS: 'HH:mm:ss',
  52385. L: 'DD/MM/YYYY',
  52386. LL: 'D MMMM YYYY',
  52387. LLL: 'D MMMM YYYY HH:mm',
  52388. LLLL: 'ວັນdddd D MMMM YYYY HH:mm',
  52389. },
  52390. meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/,
  52391. isPM: function (input) {
  52392. return input === 'ຕອນແລງ';
  52393. },
  52394. meridiem: function (hour, minute, isLower) {
  52395. if (hour < 12) {
  52396. return 'ຕອນເຊົ້າ';
  52397. } else {
  52398. return 'ຕອນແລງ';
  52399. }
  52400. },
  52401. calendar: {
  52402. sameDay: '[ມື້ນີ້ເວລາ] LT',
  52403. nextDay: '[ມື້ອື່ນເວລາ] LT',
  52404. nextWeek: '[ວັນ]dddd[ໜ້າເວລາ] LT',
  52405. lastDay: '[ມື້ວານນີ້ເວລາ] LT',
  52406. lastWeek: '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT',
  52407. sameElse: 'L',
  52408. },
  52409. relativeTime: {
  52410. future: 'ອີກ %s',
  52411. past: '%sຜ່ານມາ',
  52412. s: 'ບໍ່ເທົ່າໃດວິນາທີ',
  52413. ss: '%d ວິນາທີ',
  52414. m: '1 ນາທີ',
  52415. mm: '%d ນາທີ',
  52416. h: '1 ຊົ່ວໂມງ',
  52417. hh: '%d ຊົ່ວໂມງ',
  52418. d: '1 ມື້',
  52419. dd: '%d ມື້',
  52420. M: '1 ເດືອນ',
  52421. MM: '%d ເດືອນ',
  52422. y: '1 ປີ',
  52423. yy: '%d ປີ',
  52424. },
  52425. dayOfMonthOrdinalParse: /(ທີ່)\d{1,2}/,
  52426. ordinal: function (number) {
  52427. return 'ທີ່' + number;
  52428. },
  52429. });
  52430. return lo;
  52431. })));
  52432. /***/ }),
  52433. /***/ 57010:
  52434. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  52435. //! moment.js locale configuration
  52436. //! locale : Lithuanian [lt]
  52437. //! author : Mindaugas Mozūras : https://github.com/mmozuras
  52438. ;(function (global, factory) {
  52439. true ? factory(__webpack_require__(30381)) :
  52440. 0
  52441. }(this, (function (moment) { 'use strict';
  52442. //! moment.js locale configuration
  52443. var units = {
  52444. ss: 'sekundė_sekundžių_sekundes',
  52445. m: 'minutė_minutės_minutę',
  52446. mm: 'minutės_minučių_minutes',
  52447. h: 'valanda_valandos_valandą',
  52448. hh: 'valandos_valandų_valandas',
  52449. d: 'diena_dienos_dieną',
  52450. dd: 'dienos_dienų_dienas',
  52451. M: 'mėnuo_mėnesio_mėnesį',
  52452. MM: 'mėnesiai_mėnesių_mėnesius',
  52453. y: 'metai_metų_metus',
  52454. yy: 'metai_metų_metus',
  52455. };
  52456. function translateSeconds(number, withoutSuffix, key, isFuture) {
  52457. if (withoutSuffix) {
  52458. return 'kelios sekundės';
  52459. } else {
  52460. return isFuture ? 'kelių sekundžių' : 'kelias sekundes';
  52461. }
  52462. }
  52463. function translateSingular(number, withoutSuffix, key, isFuture) {
  52464. return withoutSuffix
  52465. ? forms(key)[0]
  52466. : isFuture
  52467. ? forms(key)[1]
  52468. : forms(key)[2];
  52469. }
  52470. function special(number) {
  52471. return number % 10 === 0 || (number > 10 && number < 20);
  52472. }
  52473. function forms(key) {
  52474. return units[key].split('_');
  52475. }
  52476. function translate(number, withoutSuffix, key, isFuture) {
  52477. var result = number + ' ';
  52478. if (number === 1) {
  52479. return (
  52480. result + translateSingular(number, withoutSuffix, key[0], isFuture)
  52481. );
  52482. } else if (withoutSuffix) {
  52483. return result + (special(number) ? forms(key)[1] : forms(key)[0]);
  52484. } else {
  52485. if (isFuture) {
  52486. return result + forms(key)[1];
  52487. } else {
  52488. return result + (special(number) ? forms(key)[1] : forms(key)[2]);
  52489. }
  52490. }
  52491. }
  52492. var lt = moment.defineLocale('lt', {
  52493. months: {
  52494. format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split(
  52495. '_'
  52496. ),
  52497. standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split(
  52498. '_'
  52499. ),
  52500. isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/,
  52501. },
  52502. monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),
  52503. weekdays: {
  52504. format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split(
  52505. '_'
  52506. ),
  52507. standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split(
  52508. '_'
  52509. ),
  52510. isFormat: /dddd HH:mm/,
  52511. },
  52512. weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),
  52513. weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'),
  52514. weekdaysParseExact: true,
  52515. longDateFormat: {
  52516. LT: 'HH:mm',
  52517. LTS: 'HH:mm:ss',
  52518. L: 'YYYY-MM-DD',
  52519. LL: 'YYYY [m.] MMMM D [d.]',
  52520. LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
  52521. LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',
  52522. l: 'YYYY-MM-DD',
  52523. ll: 'YYYY [m.] MMMM D [d.]',
  52524. lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
  52525. llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]',
  52526. },
  52527. calendar: {
  52528. sameDay: '[Šiandien] LT',
  52529. nextDay: '[Rytoj] LT',
  52530. nextWeek: 'dddd LT',
  52531. lastDay: '[Vakar] LT',
  52532. lastWeek: '[Praėjusį] dddd LT',
  52533. sameElse: 'L',
  52534. },
  52535. relativeTime: {
  52536. future: 'po %s',
  52537. past: 'prieš %s',
  52538. s: translateSeconds,
  52539. ss: translate,
  52540. m: translateSingular,
  52541. mm: translate,
  52542. h: translateSingular,
  52543. hh: translate,
  52544. d: translateSingular,
  52545. dd: translate,
  52546. M: translateSingular,
  52547. MM: translate,
  52548. y: translateSingular,
  52549. yy: translate,
  52550. },
  52551. dayOfMonthOrdinalParse: /\d{1,2}-oji/,
  52552. ordinal: function (number) {
  52553. return number + '-oji';
  52554. },
  52555. week: {
  52556. dow: 1, // Monday is the first day of the week.
  52557. doy: 4, // The week that contains Jan 4th is the first week of the year.
  52558. },
  52559. });
  52560. return lt;
  52561. })));
  52562. /***/ }),
  52563. /***/ 37595:
  52564. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  52565. //! moment.js locale configuration
  52566. //! locale : Latvian [lv]
  52567. //! author : Kristaps Karlsons : https://github.com/skakri
  52568. //! author : Jānis Elmeris : https://github.com/JanisE
  52569. ;(function (global, factory) {
  52570. true ? factory(__webpack_require__(30381)) :
  52571. 0
  52572. }(this, (function (moment) { 'use strict';
  52573. //! moment.js locale configuration
  52574. var units = {
  52575. ss: 'sekundes_sekundēm_sekunde_sekundes'.split('_'),
  52576. m: 'minūtes_minūtēm_minūte_minūtes'.split('_'),
  52577. mm: 'minūtes_minūtēm_minūte_minūtes'.split('_'),
  52578. h: 'stundas_stundām_stunda_stundas'.split('_'),
  52579. hh: 'stundas_stundām_stunda_stundas'.split('_'),
  52580. d: 'dienas_dienām_diena_dienas'.split('_'),
  52581. dd: 'dienas_dienām_diena_dienas'.split('_'),
  52582. M: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
  52583. MM: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
  52584. y: 'gada_gadiem_gads_gadi'.split('_'),
  52585. yy: 'gada_gadiem_gads_gadi'.split('_'),
  52586. };
  52587. /**
  52588. * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.
  52589. */
  52590. function format(forms, number, withoutSuffix) {
  52591. if (withoutSuffix) {
  52592. // E.g. "21 minūte", "3 minūtes".
  52593. return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];
  52594. } else {
  52595. // E.g. "21 minūtes" as in "pēc 21 minūtes".
  52596. // E.g. "3 minūtēm" as in "pēc 3 minūtēm".
  52597. return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];
  52598. }
  52599. }
  52600. function relativeTimeWithPlural(number, withoutSuffix, key) {
  52601. return number + ' ' + format(units[key], number, withoutSuffix);
  52602. }
  52603. function relativeTimeWithSingular(number, withoutSuffix, key) {
  52604. return format(units[key], number, withoutSuffix);
  52605. }
  52606. function relativeSeconds(number, withoutSuffix) {
  52607. return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';
  52608. }
  52609. var lv = moment.defineLocale('lv', {
  52610. months: 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split(
  52611. '_'
  52612. ),
  52613. monthsShort: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),
  52614. weekdays: 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split(
  52615. '_'
  52616. ),
  52617. weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'),
  52618. weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'),
  52619. weekdaysParseExact: true,
  52620. longDateFormat: {
  52621. LT: 'HH:mm',
  52622. LTS: 'HH:mm:ss',
  52623. L: 'DD.MM.YYYY.',
  52624. LL: 'YYYY. [gada] D. MMMM',
  52625. LLL: 'YYYY. [gada] D. MMMM, HH:mm',
  52626. LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm',
  52627. },
  52628. calendar: {
  52629. sameDay: '[Šodien pulksten] LT',
  52630. nextDay: '[Rīt pulksten] LT',
  52631. nextWeek: 'dddd [pulksten] LT',
  52632. lastDay: '[Vakar pulksten] LT',
  52633. lastWeek: '[Pagājušā] dddd [pulksten] LT',
  52634. sameElse: 'L',
  52635. },
  52636. relativeTime: {
  52637. future: 'pēc %s',
  52638. past: 'pirms %s',
  52639. s: relativeSeconds,
  52640. ss: relativeTimeWithPlural,
  52641. m: relativeTimeWithSingular,
  52642. mm: relativeTimeWithPlural,
  52643. h: relativeTimeWithSingular,
  52644. hh: relativeTimeWithPlural,
  52645. d: relativeTimeWithSingular,
  52646. dd: relativeTimeWithPlural,
  52647. M: relativeTimeWithSingular,
  52648. MM: relativeTimeWithPlural,
  52649. y: relativeTimeWithSingular,
  52650. yy: relativeTimeWithPlural,
  52651. },
  52652. dayOfMonthOrdinalParse: /\d{1,2}\./,
  52653. ordinal: '%d.',
  52654. week: {
  52655. dow: 1, // Monday is the first day of the week.
  52656. doy: 4, // The week that contains Jan 4th is the first week of the year.
  52657. },
  52658. });
  52659. return lv;
  52660. })));
  52661. /***/ }),
  52662. /***/ 39861:
  52663. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  52664. //! moment.js locale configuration
  52665. //! locale : Montenegrin [me]
  52666. //! author : Miodrag Nikač <miodrag@restartit.me> : https://github.com/miodragnikac
  52667. ;(function (global, factory) {
  52668. true ? factory(__webpack_require__(30381)) :
  52669. 0
  52670. }(this, (function (moment) { 'use strict';
  52671. //! moment.js locale configuration
  52672. var translator = {
  52673. words: {
  52674. //Different grammatical cases
  52675. ss: ['sekund', 'sekunda', 'sekundi'],
  52676. m: ['jedan minut', 'jednog minuta'],
  52677. mm: ['minut', 'minuta', 'minuta'],
  52678. h: ['jedan sat', 'jednog sata'],
  52679. hh: ['sat', 'sata', 'sati'],
  52680. dd: ['dan', 'dana', 'dana'],
  52681. MM: ['mjesec', 'mjeseca', 'mjeseci'],
  52682. yy: ['godina', 'godine', 'godina'],
  52683. },
  52684. correctGrammaticalCase: function (number, wordKey) {
  52685. return number === 1
  52686. ? wordKey[0]
  52687. : number >= 2 && number <= 4
  52688. ? wordKey[1]
  52689. : wordKey[2];
  52690. },
  52691. translate: function (number, withoutSuffix, key) {
  52692. var wordKey = translator.words[key];
  52693. if (key.length === 1) {
  52694. return withoutSuffix ? wordKey[0] : wordKey[1];
  52695. } else {
  52696. return (
  52697. number +
  52698. ' ' +
  52699. translator.correctGrammaticalCase(number, wordKey)
  52700. );
  52701. }
  52702. },
  52703. };
  52704. var me = moment.defineLocale('me', {
  52705. months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(
  52706. '_'
  52707. ),
  52708. monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split(
  52709. '_'
  52710. ),
  52711. monthsParseExact: true,
  52712. weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
  52713. '_'
  52714. ),
  52715. weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
  52716. weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
  52717. weekdaysParseExact: true,
  52718. longDateFormat: {
  52719. LT: 'H:mm',
  52720. LTS: 'H:mm:ss',
  52721. L: 'DD.MM.YYYY',
  52722. LL: 'D. MMMM YYYY',
  52723. LLL: 'D. MMMM YYYY H:mm',
  52724. LLLL: 'dddd, D. MMMM YYYY H:mm',
  52725. },
  52726. calendar: {
  52727. sameDay: '[danas u] LT',
  52728. nextDay: '[sjutra u] LT',
  52729. nextWeek: function () {
  52730. switch (this.day()) {
  52731. case 0:
  52732. return '[u] [nedjelju] [u] LT';
  52733. case 3:
  52734. return '[u] [srijedu] [u] LT';
  52735. case 6:
  52736. return '[u] [subotu] [u] LT';
  52737. case 1:
  52738. case 2:
  52739. case 4:
  52740. case 5:
  52741. return '[u] dddd [u] LT';
  52742. }
  52743. },
  52744. lastDay: '[juče u] LT',
  52745. lastWeek: function () {
  52746. var lastWeekDays = [
  52747. '[prošle] [nedjelje] [u] LT',
  52748. '[prošlog] [ponedjeljka] [u] LT',
  52749. '[prošlog] [utorka] [u] LT',
  52750. '[prošle] [srijede] [u] LT',
  52751. '[prošlog] [četvrtka] [u] LT',
  52752. '[prošlog] [petka] [u] LT',
  52753. '[prošle] [subote] [u] LT',
  52754. ];
  52755. return lastWeekDays[this.day()];
  52756. },
  52757. sameElse: 'L',
  52758. },
  52759. relativeTime: {
  52760. future: 'za %s',
  52761. past: 'prije %s',
  52762. s: 'nekoliko sekundi',
  52763. ss: translator.translate,
  52764. m: translator.translate,
  52765. mm: translator.translate,
  52766. h: translator.translate,
  52767. hh: translator.translate,
  52768. d: 'dan',
  52769. dd: translator.translate,
  52770. M: 'mjesec',
  52771. MM: translator.translate,
  52772. y: 'godinu',
  52773. yy: translator.translate,
  52774. },
  52775. dayOfMonthOrdinalParse: /\d{1,2}\./,
  52776. ordinal: '%d.',
  52777. week: {
  52778. dow: 1, // Monday is the first day of the week.
  52779. doy: 7, // The week that contains Jan 7th is the first week of the year.
  52780. },
  52781. });
  52782. return me;
  52783. })));
  52784. /***/ }),
  52785. /***/ 35493:
  52786. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  52787. //! moment.js locale configuration
  52788. //! locale : Maori [mi]
  52789. //! author : John Corrigan <robbiecloset@gmail.com> : https://github.com/johnideal
  52790. ;(function (global, factory) {
  52791. true ? factory(__webpack_require__(30381)) :
  52792. 0
  52793. }(this, (function (moment) { 'use strict';
  52794. //! moment.js locale configuration
  52795. var mi = moment.defineLocale('mi', {
  52796. months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split(
  52797. '_'
  52798. ),
  52799. monthsShort: 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split(
  52800. '_'
  52801. ),
  52802. monthsRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
  52803. monthsStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
  52804. monthsShortRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
  52805. monthsShortStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,
  52806. weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'),
  52807. weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
  52808. weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
  52809. longDateFormat: {
  52810. LT: 'HH:mm',
  52811. LTS: 'HH:mm:ss',
  52812. L: 'DD/MM/YYYY',
  52813. LL: 'D MMMM YYYY',
  52814. LLL: 'D MMMM YYYY [i] HH:mm',
  52815. LLLL: 'dddd, D MMMM YYYY [i] HH:mm',
  52816. },
  52817. calendar: {
  52818. sameDay: '[i teie mahana, i] LT',
  52819. nextDay: '[apopo i] LT',
  52820. nextWeek: 'dddd [i] LT',
  52821. lastDay: '[inanahi i] LT',
  52822. lastWeek: 'dddd [whakamutunga i] LT',
  52823. sameElse: 'L',
  52824. },
  52825. relativeTime: {
  52826. future: 'i roto i %s',
  52827. past: '%s i mua',
  52828. s: 'te hēkona ruarua',
  52829. ss: '%d hēkona',
  52830. m: 'he meneti',
  52831. mm: '%d meneti',
  52832. h: 'te haora',
  52833. hh: '%d haora',
  52834. d: 'he ra',
  52835. dd: '%d ra',
  52836. M: 'he marama',
  52837. MM: '%d marama',
  52838. y: 'he tau',
  52839. yy: '%d tau',
  52840. },
  52841. dayOfMonthOrdinalParse: /\d{1,2}º/,
  52842. ordinal: '%dº',
  52843. week: {
  52844. dow: 1, // Monday is the first day of the week.
  52845. doy: 4, // The week that contains Jan 4th is the first week of the year.
  52846. },
  52847. });
  52848. return mi;
  52849. })));
  52850. /***/ }),
  52851. /***/ 95966:
  52852. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  52853. //! moment.js locale configuration
  52854. //! locale : Macedonian [mk]
  52855. //! author : Borislav Mickov : https://github.com/B0k0
  52856. //! author : Sashko Todorov : https://github.com/bkyceh
  52857. ;(function (global, factory) {
  52858. true ? factory(__webpack_require__(30381)) :
  52859. 0
  52860. }(this, (function (moment) { 'use strict';
  52861. //! moment.js locale configuration
  52862. var mk = moment.defineLocale('mk', {
  52863. months: 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split(
  52864. '_'
  52865. ),
  52866. monthsShort: 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'),
  52867. weekdays: 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split(
  52868. '_'
  52869. ),
  52870. weekdaysShort: 'нед_пон_вто_сре_чет_пет_саб'.split('_'),
  52871. weekdaysMin: 'нe_пo_вт_ср_че_пе_сa'.split('_'),
  52872. longDateFormat: {
  52873. LT: 'H:mm',
  52874. LTS: 'H:mm:ss',
  52875. L: 'D.MM.YYYY',
  52876. LL: 'D MMMM YYYY',
  52877. LLL: 'D MMMM YYYY H:mm',
  52878. LLLL: 'dddd, D MMMM YYYY H:mm',
  52879. },
  52880. calendar: {
  52881. sameDay: '[Денес во] LT',
  52882. nextDay: '[Утре во] LT',
  52883. nextWeek: '[Во] dddd [во] LT',
  52884. lastDay: '[Вчера во] LT',
  52885. lastWeek: function () {
  52886. switch (this.day()) {
  52887. case 0:
  52888. case 3:
  52889. case 6:
  52890. return '[Изминатата] dddd [во] LT';
  52891. case 1:
  52892. case 2:
  52893. case 4:
  52894. case 5:
  52895. return '[Изминатиот] dddd [во] LT';
  52896. }
  52897. },
  52898. sameElse: 'L',
  52899. },
  52900. relativeTime: {
  52901. future: 'за %s',
  52902. past: 'пред %s',
  52903. s: 'неколку секунди',
  52904. ss: '%d секунди',
  52905. m: 'една минута',
  52906. mm: '%d минути',
  52907. h: 'еден час',
  52908. hh: '%d часа',
  52909. d: 'еден ден',
  52910. dd: '%d дена',
  52911. M: 'еден месец',
  52912. MM: '%d месеци',
  52913. y: 'една година',
  52914. yy: '%d години',
  52915. },
  52916. dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
  52917. ordinal: function (number) {
  52918. var lastDigit = number % 10,
  52919. last2Digits = number % 100;
  52920. if (number === 0) {
  52921. return number + '-ев';
  52922. } else if (last2Digits === 0) {
  52923. return number + '-ен';
  52924. } else if (last2Digits > 10 && last2Digits < 20) {
  52925. return number + '-ти';
  52926. } else if (lastDigit === 1) {
  52927. return number + '-ви';
  52928. } else if (lastDigit === 2) {
  52929. return number + '-ри';
  52930. } else if (lastDigit === 7 || lastDigit === 8) {
  52931. return number + '-ми';
  52932. } else {
  52933. return number + '-ти';
  52934. }
  52935. },
  52936. week: {
  52937. dow: 1, // Monday is the first day of the week.
  52938. doy: 7, // The week that contains Jan 7th is the first week of the year.
  52939. },
  52940. });
  52941. return mk;
  52942. })));
  52943. /***/ }),
  52944. /***/ 87341:
  52945. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  52946. //! moment.js locale configuration
  52947. //! locale : Malayalam [ml]
  52948. //! author : Floyd Pink : https://github.com/floydpink
  52949. ;(function (global, factory) {
  52950. true ? factory(__webpack_require__(30381)) :
  52951. 0
  52952. }(this, (function (moment) { 'use strict';
  52953. //! moment.js locale configuration
  52954. var ml = moment.defineLocale('ml', {
  52955. months: 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split(
  52956. '_'
  52957. ),
  52958. monthsShort: 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split(
  52959. '_'
  52960. ),
  52961. monthsParseExact: true,
  52962. weekdays: 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split(
  52963. '_'
  52964. ),
  52965. weekdaysShort: 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'),
  52966. weekdaysMin: 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'),
  52967. longDateFormat: {
  52968. LT: 'A h:mm -നു',
  52969. LTS: 'A h:mm:ss -നു',
  52970. L: 'DD/MM/YYYY',
  52971. LL: 'D MMMM YYYY',
  52972. LLL: 'D MMMM YYYY, A h:mm -നു',
  52973. LLLL: 'dddd, D MMMM YYYY, A h:mm -നു',
  52974. },
  52975. calendar: {
  52976. sameDay: '[ഇന്ന്] LT',
  52977. nextDay: '[നാളെ] LT',
  52978. nextWeek: 'dddd, LT',
  52979. lastDay: '[ഇന്നലെ] LT',
  52980. lastWeek: '[കഴിഞ്ഞ] dddd, LT',
  52981. sameElse: 'L',
  52982. },
  52983. relativeTime: {
  52984. future: '%s കഴിഞ്ഞ്',
  52985. past: '%s മുൻപ്',
  52986. s: 'അൽപ നിമിഷങ്ങൾ',
  52987. ss: '%d സെക്കൻഡ്',
  52988. m: 'ഒരു മിനിറ്റ്',
  52989. mm: '%d മിനിറ്റ്',
  52990. h: 'ഒരു മണിക്കൂർ',
  52991. hh: '%d മണിക്കൂർ',
  52992. d: 'ഒരു ദിവസം',
  52993. dd: '%d ദിവസം',
  52994. M: 'ഒരു മാസം',
  52995. MM: '%d മാസം',
  52996. y: 'ഒരു വർഷം',
  52997. yy: '%d വർഷം',
  52998. },
  52999. meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,
  53000. meridiemHour: function (hour, meridiem) {
  53001. if (hour === 12) {
  53002. hour = 0;
  53003. }
  53004. if (
  53005. (meridiem === 'രാത്രി' && hour >= 4) ||
  53006. meridiem === 'ഉച്ച കഴിഞ്ഞ്' ||
  53007. meridiem === 'വൈകുന്നേരം'
  53008. ) {
  53009. return hour + 12;
  53010. } else {
  53011. return hour;
  53012. }
  53013. },
  53014. meridiem: function (hour, minute, isLower) {
  53015. if (hour < 4) {
  53016. return 'രാത്രി';
  53017. } else if (hour < 12) {
  53018. return 'രാവിലെ';
  53019. } else if (hour < 17) {
  53020. return 'ഉച്ച കഴിഞ്ഞ്';
  53021. } else if (hour < 20) {
  53022. return 'വൈകുന്നേരം';
  53023. } else {
  53024. return 'രാത്രി';
  53025. }
  53026. },
  53027. });
  53028. return ml;
  53029. })));
  53030. /***/ }),
  53031. /***/ 5115:
  53032. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  53033. //! moment.js locale configuration
  53034. //! locale : Mongolian [mn]
  53035. //! author : Javkhlantugs Nyamdorj : https://github.com/javkhaanj7
  53036. ;(function (global, factory) {
  53037. true ? factory(__webpack_require__(30381)) :
  53038. 0
  53039. }(this, (function (moment) { 'use strict';
  53040. //! moment.js locale configuration
  53041. function translate(number, withoutSuffix, key, isFuture) {
  53042. switch (key) {
  53043. case 's':
  53044. return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын';
  53045. case 'ss':
  53046. return number + (withoutSuffix ? ' секунд' : ' секундын');
  53047. case 'm':
  53048. case 'mm':
  53049. return number + (withoutSuffix ? ' минут' : ' минутын');
  53050. case 'h':
  53051. case 'hh':
  53052. return number + (withoutSuffix ? ' цаг' : ' цагийн');
  53053. case 'd':
  53054. case 'dd':
  53055. return number + (withoutSuffix ? ' өдөр' : ' өдрийн');
  53056. case 'M':
  53057. case 'MM':
  53058. return number + (withoutSuffix ? ' сар' : ' сарын');
  53059. case 'y':
  53060. case 'yy':
  53061. return number + (withoutSuffix ? ' жил' : ' жилийн');
  53062. default:
  53063. return number;
  53064. }
  53065. }
  53066. var mn = moment.defineLocale('mn', {
  53067. months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split(
  53068. '_'
  53069. ),
  53070. monthsShort: '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split(
  53071. '_'
  53072. ),
  53073. monthsParseExact: true,
  53074. weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'),
  53075. weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'),
  53076. weekdaysMin: 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'),
  53077. weekdaysParseExact: true,
  53078. longDateFormat: {
  53079. LT: 'HH:mm',
  53080. LTS: 'HH:mm:ss',
  53081. L: 'YYYY-MM-DD',
  53082. LL: 'YYYY оны MMMMын D',
  53083. LLL: 'YYYY оны MMMMын D HH:mm',
  53084. LLLL: 'dddd, YYYY оны MMMMын D HH:mm',
  53085. },
  53086. meridiemParse: /ҮӨ|ҮХ/i,
  53087. isPM: function (input) {
  53088. return input === 'ҮХ';
  53089. },
  53090. meridiem: function (hour, minute, isLower) {
  53091. if (hour < 12) {
  53092. return 'ҮӨ';
  53093. } else {
  53094. return 'ҮХ';
  53095. }
  53096. },
  53097. calendar: {
  53098. sameDay: '[Өнөөдөр] LT',
  53099. nextDay: '[Маргааш] LT',
  53100. nextWeek: '[Ирэх] dddd LT',
  53101. lastDay: '[Өчигдөр] LT',
  53102. lastWeek: '[Өнгөрсөн] dddd LT',
  53103. sameElse: 'L',
  53104. },
  53105. relativeTime: {
  53106. future: '%s дараа',
  53107. past: '%s өмнө',
  53108. s: translate,
  53109. ss: translate,
  53110. m: translate,
  53111. mm: translate,
  53112. h: translate,
  53113. hh: translate,
  53114. d: translate,
  53115. dd: translate,
  53116. M: translate,
  53117. MM: translate,
  53118. y: translate,
  53119. yy: translate,
  53120. },
  53121. dayOfMonthOrdinalParse: /\d{1,2} өдөр/,
  53122. ordinal: function (number, period) {
  53123. switch (period) {
  53124. case 'd':
  53125. case 'D':
  53126. case 'DDD':
  53127. return number + ' өдөр';
  53128. default:
  53129. return number;
  53130. }
  53131. },
  53132. });
  53133. return mn;
  53134. })));
  53135. /***/ }),
  53136. /***/ 10370:
  53137. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  53138. //! moment.js locale configuration
  53139. //! locale : Marathi [mr]
  53140. //! author : Harshad Kale : https://github.com/kalehv
  53141. //! author : Vivek Athalye : https://github.com/vnathalye
  53142. ;(function (global, factory) {
  53143. true ? factory(__webpack_require__(30381)) :
  53144. 0
  53145. }(this, (function (moment) { 'use strict';
  53146. //! moment.js locale configuration
  53147. var symbolMap = {
  53148. 1: '१',
  53149. 2: '२',
  53150. 3: '३',
  53151. 4: '४',
  53152. 5: '५',
  53153. 6: '६',
  53154. 7: '७',
  53155. 8: '८',
  53156. 9: '९',
  53157. 0: '०',
  53158. },
  53159. numberMap = {
  53160. '१': '1',
  53161. '२': '2',
  53162. '३': '3',
  53163. '४': '4',
  53164. '५': '5',
  53165. '६': '6',
  53166. '७': '7',
  53167. '८': '8',
  53168. '९': '9',
  53169. '०': '0',
  53170. };
  53171. function relativeTimeMr(number, withoutSuffix, string, isFuture) {
  53172. var output = '';
  53173. if (withoutSuffix) {
  53174. switch (string) {
  53175. case 's':
  53176. output = 'काही सेकंद';
  53177. break;
  53178. case 'ss':
  53179. output = '%d सेकंद';
  53180. break;
  53181. case 'm':
  53182. output = 'एक मिनिट';
  53183. break;
  53184. case 'mm':
  53185. output = '%d मिनिटे';
  53186. break;
  53187. case 'h':
  53188. output = 'एक तास';
  53189. break;
  53190. case 'hh':
  53191. output = '%d तास';
  53192. break;
  53193. case 'd':
  53194. output = 'एक दिवस';
  53195. break;
  53196. case 'dd':
  53197. output = '%d दिवस';
  53198. break;
  53199. case 'M':
  53200. output = 'एक महिना';
  53201. break;
  53202. case 'MM':
  53203. output = '%d महिने';
  53204. break;
  53205. case 'y':
  53206. output = 'एक वर्ष';
  53207. break;
  53208. case 'yy':
  53209. output = '%d वर्षे';
  53210. break;
  53211. }
  53212. } else {
  53213. switch (string) {
  53214. case 's':
  53215. output = 'काही सेकंदां';
  53216. break;
  53217. case 'ss':
  53218. output = '%d सेकंदां';
  53219. break;
  53220. case 'm':
  53221. output = 'एका मिनिटा';
  53222. break;
  53223. case 'mm':
  53224. output = '%d मिनिटां';
  53225. break;
  53226. case 'h':
  53227. output = 'एका तासा';
  53228. break;
  53229. case 'hh':
  53230. output = '%d तासां';
  53231. break;
  53232. case 'd':
  53233. output = 'एका दिवसा';
  53234. break;
  53235. case 'dd':
  53236. output = '%d दिवसां';
  53237. break;
  53238. case 'M':
  53239. output = 'एका महिन्या';
  53240. break;
  53241. case 'MM':
  53242. output = '%d महिन्यां';
  53243. break;
  53244. case 'y':
  53245. output = 'एका वर्षा';
  53246. break;
  53247. case 'yy':
  53248. output = '%d वर्षां';
  53249. break;
  53250. }
  53251. }
  53252. return output.replace(/%d/i, number);
  53253. }
  53254. var mr = moment.defineLocale('mr', {
  53255. months: 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(
  53256. '_'
  53257. ),
  53258. monthsShort: 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(
  53259. '_'
  53260. ),
  53261. monthsParseExact: true,
  53262. weekdays: 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
  53263. weekdaysShort: 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'),
  53264. weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
  53265. longDateFormat: {
  53266. LT: 'A h:mm वाजता',
  53267. LTS: 'A h:mm:ss वाजता',
  53268. L: 'DD/MM/YYYY',
  53269. LL: 'D MMMM YYYY',
  53270. LLL: 'D MMMM YYYY, A h:mm वाजता',
  53271. LLLL: 'dddd, D MMMM YYYY, A h:mm वाजता',
  53272. },
  53273. calendar: {
  53274. sameDay: '[आज] LT',
  53275. nextDay: '[उद्या] LT',
  53276. nextWeek: 'dddd, LT',
  53277. lastDay: '[काल] LT',
  53278. lastWeek: '[मागील] dddd, LT',
  53279. sameElse: 'L',
  53280. },
  53281. relativeTime: {
  53282. future: '%sमध्ये',
  53283. past: '%sपूर्वी',
  53284. s: relativeTimeMr,
  53285. ss: relativeTimeMr,
  53286. m: relativeTimeMr,
  53287. mm: relativeTimeMr,
  53288. h: relativeTimeMr,
  53289. hh: relativeTimeMr,
  53290. d: relativeTimeMr,
  53291. dd: relativeTimeMr,
  53292. M: relativeTimeMr,
  53293. MM: relativeTimeMr,
  53294. y: relativeTimeMr,
  53295. yy: relativeTimeMr,
  53296. },
  53297. preparse: function (string) {
  53298. return string.replace(/[१२३४५६७८९०]/g, function (match) {
  53299. return numberMap[match];
  53300. });
  53301. },
  53302. postformat: function (string) {
  53303. return string.replace(/\d/g, function (match) {
  53304. return symbolMap[match];
  53305. });
  53306. },
  53307. meridiemParse: /पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,
  53308. meridiemHour: function (hour, meridiem) {
  53309. if (hour === 12) {
  53310. hour = 0;
  53311. }
  53312. if (meridiem === 'पहाटे' || meridiem === 'सकाळी') {
  53313. return hour;
  53314. } else if (
  53315. meridiem === 'दुपारी' ||
  53316. meridiem === 'सायंकाळी' ||
  53317. meridiem === 'रात्री'
  53318. ) {
  53319. return hour >= 12 ? hour : hour + 12;
  53320. }
  53321. },
  53322. meridiem: function (hour, minute, isLower) {
  53323. if (hour >= 0 && hour < 6) {
  53324. return 'पहाटे';
  53325. } else if (hour < 12) {
  53326. return 'सकाळी';
  53327. } else if (hour < 17) {
  53328. return 'दुपारी';
  53329. } else if (hour < 20) {
  53330. return 'सायंकाळी';
  53331. } else {
  53332. return 'रात्री';
  53333. }
  53334. },
  53335. week: {
  53336. dow: 0, // Sunday is the first day of the week.
  53337. doy: 6, // The week that contains Jan 6th is the first week of the year.
  53338. },
  53339. });
  53340. return mr;
  53341. })));
  53342. /***/ }),
  53343. /***/ 41237:
  53344. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  53345. //! moment.js locale configuration
  53346. //! locale : Malay [ms-my]
  53347. //! note : DEPRECATED, the correct one is [ms]
  53348. //! author : Weldan Jamili : https://github.com/weldan
  53349. ;(function (global, factory) {
  53350. true ? factory(__webpack_require__(30381)) :
  53351. 0
  53352. }(this, (function (moment) { 'use strict';
  53353. //! moment.js locale configuration
  53354. var msMy = moment.defineLocale('ms-my', {
  53355. months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(
  53356. '_'
  53357. ),
  53358. monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
  53359. weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
  53360. weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
  53361. weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
  53362. longDateFormat: {
  53363. LT: 'HH.mm',
  53364. LTS: 'HH.mm.ss',
  53365. L: 'DD/MM/YYYY',
  53366. LL: 'D MMMM YYYY',
  53367. LLL: 'D MMMM YYYY [pukul] HH.mm',
  53368. LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
  53369. },
  53370. meridiemParse: /pagi|tengahari|petang|malam/,
  53371. meridiemHour: function (hour, meridiem) {
  53372. if (hour === 12) {
  53373. hour = 0;
  53374. }
  53375. if (meridiem === 'pagi') {
  53376. return hour;
  53377. } else if (meridiem === 'tengahari') {
  53378. return hour >= 11 ? hour : hour + 12;
  53379. } else if (meridiem === 'petang' || meridiem === 'malam') {
  53380. return hour + 12;
  53381. }
  53382. },
  53383. meridiem: function (hours, minutes, isLower) {
  53384. if (hours < 11) {
  53385. return 'pagi';
  53386. } else if (hours < 15) {
  53387. return 'tengahari';
  53388. } else if (hours < 19) {
  53389. return 'petang';
  53390. } else {
  53391. return 'malam';
  53392. }
  53393. },
  53394. calendar: {
  53395. sameDay: '[Hari ini pukul] LT',
  53396. nextDay: '[Esok pukul] LT',
  53397. nextWeek: 'dddd [pukul] LT',
  53398. lastDay: '[Kelmarin pukul] LT',
  53399. lastWeek: 'dddd [lepas pukul] LT',
  53400. sameElse: 'L',
  53401. },
  53402. relativeTime: {
  53403. future: 'dalam %s',
  53404. past: '%s yang lepas',
  53405. s: 'beberapa saat',
  53406. ss: '%d saat',
  53407. m: 'seminit',
  53408. mm: '%d minit',
  53409. h: 'sejam',
  53410. hh: '%d jam',
  53411. d: 'sehari',
  53412. dd: '%d hari',
  53413. M: 'sebulan',
  53414. MM: '%d bulan',
  53415. y: 'setahun',
  53416. yy: '%d tahun',
  53417. },
  53418. week: {
  53419. dow: 1, // Monday is the first day of the week.
  53420. doy: 7, // The week that contains Jan 7th is the first week of the year.
  53421. },
  53422. });
  53423. return msMy;
  53424. })));
  53425. /***/ }),
  53426. /***/ 9847:
  53427. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  53428. //! moment.js locale configuration
  53429. //! locale : Malay [ms]
  53430. //! author : Weldan Jamili : https://github.com/weldan
  53431. ;(function (global, factory) {
  53432. true ? factory(__webpack_require__(30381)) :
  53433. 0
  53434. }(this, (function (moment) { 'use strict';
  53435. //! moment.js locale configuration
  53436. var ms = moment.defineLocale('ms', {
  53437. months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(
  53438. '_'
  53439. ),
  53440. monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
  53441. weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
  53442. weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
  53443. weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
  53444. longDateFormat: {
  53445. LT: 'HH.mm',
  53446. LTS: 'HH.mm.ss',
  53447. L: 'DD/MM/YYYY',
  53448. LL: 'D MMMM YYYY',
  53449. LLL: 'D MMMM YYYY [pukul] HH.mm',
  53450. LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
  53451. },
  53452. meridiemParse: /pagi|tengahari|petang|malam/,
  53453. meridiemHour: function (hour, meridiem) {
  53454. if (hour === 12) {
  53455. hour = 0;
  53456. }
  53457. if (meridiem === 'pagi') {
  53458. return hour;
  53459. } else if (meridiem === 'tengahari') {
  53460. return hour >= 11 ? hour : hour + 12;
  53461. } else if (meridiem === 'petang' || meridiem === 'malam') {
  53462. return hour + 12;
  53463. }
  53464. },
  53465. meridiem: function (hours, minutes, isLower) {
  53466. if (hours < 11) {
  53467. return 'pagi';
  53468. } else if (hours < 15) {
  53469. return 'tengahari';
  53470. } else if (hours < 19) {
  53471. return 'petang';
  53472. } else {
  53473. return 'malam';
  53474. }
  53475. },
  53476. calendar: {
  53477. sameDay: '[Hari ini pukul] LT',
  53478. nextDay: '[Esok pukul] LT',
  53479. nextWeek: 'dddd [pukul] LT',
  53480. lastDay: '[Kelmarin pukul] LT',
  53481. lastWeek: 'dddd [lepas pukul] LT',
  53482. sameElse: 'L',
  53483. },
  53484. relativeTime: {
  53485. future: 'dalam %s',
  53486. past: '%s yang lepas',
  53487. s: 'beberapa saat',
  53488. ss: '%d saat',
  53489. m: 'seminit',
  53490. mm: '%d minit',
  53491. h: 'sejam',
  53492. hh: '%d jam',
  53493. d: 'sehari',
  53494. dd: '%d hari',
  53495. M: 'sebulan',
  53496. MM: '%d bulan',
  53497. y: 'setahun',
  53498. yy: '%d tahun',
  53499. },
  53500. week: {
  53501. dow: 1, // Monday is the first day of the week.
  53502. doy: 7, // The week that contains Jan 7th is the first week of the year.
  53503. },
  53504. });
  53505. return ms;
  53506. })));
  53507. /***/ }),
  53508. /***/ 72126:
  53509. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  53510. //! moment.js locale configuration
  53511. //! locale : Maltese (Malta) [mt]
  53512. //! author : Alessandro Maruccia : https://github.com/alesma
  53513. ;(function (global, factory) {
  53514. true ? factory(__webpack_require__(30381)) :
  53515. 0
  53516. }(this, (function (moment) { 'use strict';
  53517. //! moment.js locale configuration
  53518. var mt = moment.defineLocale('mt', {
  53519. months: 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split(
  53520. '_'
  53521. ),
  53522. monthsShort: 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'),
  53523. weekdays: 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split(
  53524. '_'
  53525. ),
  53526. weekdaysShort: 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'),
  53527. weekdaysMin: 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'),
  53528. longDateFormat: {
  53529. LT: 'HH:mm',
  53530. LTS: 'HH:mm:ss',
  53531. L: 'DD/MM/YYYY',
  53532. LL: 'D MMMM YYYY',
  53533. LLL: 'D MMMM YYYY HH:mm',
  53534. LLLL: 'dddd, D MMMM YYYY HH:mm',
  53535. },
  53536. calendar: {
  53537. sameDay: '[Illum fil-]LT',
  53538. nextDay: '[Għada fil-]LT',
  53539. nextWeek: 'dddd [fil-]LT',
  53540. lastDay: '[Il-bieraħ fil-]LT',
  53541. lastWeek: 'dddd [li għadda] [fil-]LT',
  53542. sameElse: 'L',
  53543. },
  53544. relativeTime: {
  53545. future: 'f’ %s',
  53546. past: '%s ilu',
  53547. s: 'ftit sekondi',
  53548. ss: '%d sekondi',
  53549. m: 'minuta',
  53550. mm: '%d minuti',
  53551. h: 'siegħa',
  53552. hh: '%d siegħat',
  53553. d: 'ġurnata',
  53554. dd: '%d ġranet',
  53555. M: 'xahar',
  53556. MM: '%d xhur',
  53557. y: 'sena',
  53558. yy: '%d sni',
  53559. },
  53560. dayOfMonthOrdinalParse: /\d{1,2}º/,
  53561. ordinal: '%dº',
  53562. week: {
  53563. dow: 1, // Monday is the first day of the week.
  53564. doy: 4, // The week that contains Jan 4th is the first week of the year.
  53565. },
  53566. });
  53567. return mt;
  53568. })));
  53569. /***/ }),
  53570. /***/ 56165:
  53571. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  53572. //! moment.js locale configuration
  53573. //! locale : Burmese [my]
  53574. //! author : Squar team, mysquar.com
  53575. //! author : David Rossellat : https://github.com/gholadr
  53576. //! author : Tin Aung Lin : https://github.com/thanyawzinmin
  53577. ;(function (global, factory) {
  53578. true ? factory(__webpack_require__(30381)) :
  53579. 0
  53580. }(this, (function (moment) { 'use strict';
  53581. //! moment.js locale configuration
  53582. var symbolMap = {
  53583. 1: '၁',
  53584. 2: '၂',
  53585. 3: '၃',
  53586. 4: '၄',
  53587. 5: '၅',
  53588. 6: '၆',
  53589. 7: '၇',
  53590. 8: '၈',
  53591. 9: '၉',
  53592. 0: '၀',
  53593. },
  53594. numberMap = {
  53595. '၁': '1',
  53596. '၂': '2',
  53597. '၃': '3',
  53598. '၄': '4',
  53599. '၅': '5',
  53600. '၆': '6',
  53601. '၇': '7',
  53602. '၈': '8',
  53603. '၉': '9',
  53604. '၀': '0',
  53605. };
  53606. var my = moment.defineLocale('my', {
  53607. months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split(
  53608. '_'
  53609. ),
  53610. monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),
  53611. weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split(
  53612. '_'
  53613. ),
  53614. weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
  53615. weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
  53616. longDateFormat: {
  53617. LT: 'HH:mm',
  53618. LTS: 'HH:mm:ss',
  53619. L: 'DD/MM/YYYY',
  53620. LL: 'D MMMM YYYY',
  53621. LLL: 'D MMMM YYYY HH:mm',
  53622. LLLL: 'dddd D MMMM YYYY HH:mm',
  53623. },
  53624. calendar: {
  53625. sameDay: '[ယနေ.] LT [မှာ]',
  53626. nextDay: '[မနက်ဖြန်] LT [မှာ]',
  53627. nextWeek: 'dddd LT [မှာ]',
  53628. lastDay: '[မနေ.က] LT [မှာ]',
  53629. lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]',
  53630. sameElse: 'L',
  53631. },
  53632. relativeTime: {
  53633. future: 'လာမည့် %s မှာ',
  53634. past: 'လွန်ခဲ့သော %s က',
  53635. s: 'စက္ကန်.အနည်းငယ်',
  53636. ss: '%d စက္ကန့်',
  53637. m: 'တစ်မိနစ်',
  53638. mm: '%d မိနစ်',
  53639. h: 'တစ်နာရီ',
  53640. hh: '%d နာရီ',
  53641. d: 'တစ်ရက်',
  53642. dd: '%d ရက်',
  53643. M: 'တစ်လ',
  53644. MM: '%d လ',
  53645. y: 'တစ်နှစ်',
  53646. yy: '%d နှစ်',
  53647. },
  53648. preparse: function (string) {
  53649. return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {
  53650. return numberMap[match];
  53651. });
  53652. },
  53653. postformat: function (string) {
  53654. return string.replace(/\d/g, function (match) {
  53655. return symbolMap[match];
  53656. });
  53657. },
  53658. week: {
  53659. dow: 1, // Monday is the first day of the week.
  53660. doy: 4, // The week that contains Jan 4th is the first week of the year.
  53661. },
  53662. });
  53663. return my;
  53664. })));
  53665. /***/ }),
  53666. /***/ 64924:
  53667. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  53668. //! moment.js locale configuration
  53669. //! locale : Norwegian Bokmål [nb]
  53670. //! authors : Espen Hovlandsdal : https://github.com/rexxars
  53671. //! Sigurd Gartmann : https://github.com/sigurdga
  53672. //! Stephen Ramthun : https://github.com/stephenramthun
  53673. ;(function (global, factory) {
  53674. true ? factory(__webpack_require__(30381)) :
  53675. 0
  53676. }(this, (function (moment) { 'use strict';
  53677. //! moment.js locale configuration
  53678. var nb = moment.defineLocale('nb', {
  53679. months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(
  53680. '_'
  53681. ),
  53682. monthsShort: 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split(
  53683. '_'
  53684. ),
  53685. monthsParseExact: true,
  53686. weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
  53687. weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),
  53688. weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
  53689. weekdaysParseExact: true,
  53690. longDateFormat: {
  53691. LT: 'HH:mm',
  53692. LTS: 'HH:mm:ss',
  53693. L: 'DD.MM.YYYY',
  53694. LL: 'D. MMMM YYYY',
  53695. LLL: 'D. MMMM YYYY [kl.] HH:mm',
  53696. LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',
  53697. },
  53698. calendar: {
  53699. sameDay: '[i dag kl.] LT',
  53700. nextDay: '[i morgen kl.] LT',
  53701. nextWeek: 'dddd [kl.] LT',
  53702. lastDay: '[i går kl.] LT',
  53703. lastWeek: '[forrige] dddd [kl.] LT',
  53704. sameElse: 'L',
  53705. },
  53706. relativeTime: {
  53707. future: 'om %s',
  53708. past: '%s siden',
  53709. s: 'noen sekunder',
  53710. ss: '%d sekunder',
  53711. m: 'ett minutt',
  53712. mm: '%d minutter',
  53713. h: 'en time',
  53714. hh: '%d timer',
  53715. d: 'en dag',
  53716. dd: '%d dager',
  53717. w: 'en uke',
  53718. ww: '%d uker',
  53719. M: 'en måned',
  53720. MM: '%d måneder',
  53721. y: 'ett år',
  53722. yy: '%d år',
  53723. },
  53724. dayOfMonthOrdinalParse: /\d{1,2}\./,
  53725. ordinal: '%d.',
  53726. week: {
  53727. dow: 1, // Monday is the first day of the week.
  53728. doy: 4, // The week that contains Jan 4th is the first week of the year.
  53729. },
  53730. });
  53731. return nb;
  53732. })));
  53733. /***/ }),
  53734. /***/ 16744:
  53735. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  53736. //! moment.js locale configuration
  53737. //! locale : Nepalese [ne]
  53738. //! author : suvash : https://github.com/suvash
  53739. ;(function (global, factory) {
  53740. true ? factory(__webpack_require__(30381)) :
  53741. 0
  53742. }(this, (function (moment) { 'use strict';
  53743. //! moment.js locale configuration
  53744. var symbolMap = {
  53745. 1: '१',
  53746. 2: '२',
  53747. 3: '३',
  53748. 4: '४',
  53749. 5: '५',
  53750. 6: '६',
  53751. 7: '७',
  53752. 8: '८',
  53753. 9: '९',
  53754. 0: '०',
  53755. },
  53756. numberMap = {
  53757. '१': '1',
  53758. '२': '2',
  53759. '३': '3',
  53760. '४': '4',
  53761. '५': '5',
  53762. '६': '6',
  53763. '७': '7',
  53764. '८': '8',
  53765. '९': '9',
  53766. '०': '0',
  53767. };
  53768. var ne = moment.defineLocale('ne', {
  53769. months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split(
  53770. '_'
  53771. ),
  53772. monthsShort: 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split(
  53773. '_'
  53774. ),
  53775. monthsParseExact: true,
  53776. weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split(
  53777. '_'
  53778. ),
  53779. weekdaysShort: 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),
  53780. weekdaysMin: 'आ._सो._मं._बु._बि._शु._श.'.split('_'),
  53781. weekdaysParseExact: true,
  53782. longDateFormat: {
  53783. LT: 'Aको h:mm बजे',
  53784. LTS: 'Aको h:mm:ss बजे',
  53785. L: 'DD/MM/YYYY',
  53786. LL: 'D MMMM YYYY',
  53787. LLL: 'D MMMM YYYY, Aको h:mm बजे',
  53788. LLLL: 'dddd, D MMMM YYYY, Aको h:mm बजे',
  53789. },
  53790. preparse: function (string) {
  53791. return string.replace(/[१२३४५६७८९०]/g, function (match) {
  53792. return numberMap[match];
  53793. });
  53794. },
  53795. postformat: function (string) {
  53796. return string.replace(/\d/g, function (match) {
  53797. return symbolMap[match];
  53798. });
  53799. },
  53800. meridiemParse: /राति|बिहान|दिउँसो|साँझ/,
  53801. meridiemHour: function (hour, meridiem) {
  53802. if (hour === 12) {
  53803. hour = 0;
  53804. }
  53805. if (meridiem === 'राति') {
  53806. return hour < 4 ? hour : hour + 12;
  53807. } else if (meridiem === 'बिहान') {
  53808. return hour;
  53809. } else if (meridiem === 'दिउँसो') {
  53810. return hour >= 10 ? hour : hour + 12;
  53811. } else if (meridiem === 'साँझ') {
  53812. return hour + 12;
  53813. }
  53814. },
  53815. meridiem: function (hour, minute, isLower) {
  53816. if (hour < 3) {
  53817. return 'राति';
  53818. } else if (hour < 12) {
  53819. return 'बिहान';
  53820. } else if (hour < 16) {
  53821. return 'दिउँसो';
  53822. } else if (hour < 20) {
  53823. return 'साँझ';
  53824. } else {
  53825. return 'राति';
  53826. }
  53827. },
  53828. calendar: {
  53829. sameDay: '[आज] LT',
  53830. nextDay: '[भोलि] LT',
  53831. nextWeek: '[आउँदो] dddd[,] LT',
  53832. lastDay: '[हिजो] LT',
  53833. lastWeek: '[गएको] dddd[,] LT',
  53834. sameElse: 'L',
  53835. },
  53836. relativeTime: {
  53837. future: '%sमा',
  53838. past: '%s अगाडि',
  53839. s: 'केही क्षण',
  53840. ss: '%d सेकेण्ड',
  53841. m: 'एक मिनेट',
  53842. mm: '%d मिनेट',
  53843. h: 'एक घण्टा',
  53844. hh: '%d घण्टा',
  53845. d: 'एक दिन',
  53846. dd: '%d दिन',
  53847. M: 'एक महिना',
  53848. MM: '%d महिना',
  53849. y: 'एक बर्ष',
  53850. yy: '%d बर्ष',
  53851. },
  53852. week: {
  53853. dow: 0, // Sunday is the first day of the week.
  53854. doy: 6, // The week that contains Jan 6th is the first week of the year.
  53855. },
  53856. });
  53857. return ne;
  53858. })));
  53859. /***/ }),
  53860. /***/ 59814:
  53861. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  53862. //! moment.js locale configuration
  53863. //! locale : Dutch (Belgium) [nl-be]
  53864. //! author : Joris Röling : https://github.com/jorisroling
  53865. //! author : Jacob Middag : https://github.com/middagj
  53866. ;(function (global, factory) {
  53867. true ? factory(__webpack_require__(30381)) :
  53868. 0
  53869. }(this, (function (moment) { 'use strict';
  53870. //! moment.js locale configuration
  53871. var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split(
  53872. '_'
  53873. ),
  53874. monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split(
  53875. '_'
  53876. ),
  53877. monthsParse = [
  53878. /^jan/i,
  53879. /^feb/i,
  53880. /^maart|mrt.?$/i,
  53881. /^apr/i,
  53882. /^mei$/i,
  53883. /^jun[i.]?$/i,
  53884. /^jul[i.]?$/i,
  53885. /^aug/i,
  53886. /^sep/i,
  53887. /^okt/i,
  53888. /^nov/i,
  53889. /^dec/i,
  53890. ],
  53891. monthsRegex = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
  53892. var nlBe = moment.defineLocale('nl-be', {
  53893. months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(
  53894. '_'
  53895. ),
  53896. monthsShort: function (m, format) {
  53897. if (!m) {
  53898. return monthsShortWithDots;
  53899. } else if (/-MMM-/.test(format)) {
  53900. return monthsShortWithoutDots[m.month()];
  53901. } else {
  53902. return monthsShortWithDots[m.month()];
  53903. }
  53904. },
  53905. monthsRegex: monthsRegex,
  53906. monthsShortRegex: monthsRegex,
  53907. monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,
  53908. monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
  53909. monthsParse: monthsParse,
  53910. longMonthsParse: monthsParse,
  53911. shortMonthsParse: monthsParse,
  53912. weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split(
  53913. '_'
  53914. ),
  53915. weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
  53916. weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
  53917. weekdaysParseExact: true,
  53918. longDateFormat: {
  53919. LT: 'HH:mm',
  53920. LTS: 'HH:mm:ss',
  53921. L: 'DD/MM/YYYY',
  53922. LL: 'D MMMM YYYY',
  53923. LLL: 'D MMMM YYYY HH:mm',
  53924. LLLL: 'dddd D MMMM YYYY HH:mm',
  53925. },
  53926. calendar: {
  53927. sameDay: '[vandaag om] LT',
  53928. nextDay: '[morgen om] LT',
  53929. nextWeek: 'dddd [om] LT',
  53930. lastDay: '[gisteren om] LT',
  53931. lastWeek: '[afgelopen] dddd [om] LT',
  53932. sameElse: 'L',
  53933. },
  53934. relativeTime: {
  53935. future: 'over %s',
  53936. past: '%s geleden',
  53937. s: 'een paar seconden',
  53938. ss: '%d seconden',
  53939. m: 'één minuut',
  53940. mm: '%d minuten',
  53941. h: 'één uur',
  53942. hh: '%d uur',
  53943. d: 'één dag',
  53944. dd: '%d dagen',
  53945. M: 'één maand',
  53946. MM: '%d maanden',
  53947. y: 'één jaar',
  53948. yy: '%d jaar',
  53949. },
  53950. dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
  53951. ordinal: function (number) {
  53952. return (
  53953. number +
  53954. (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
  53955. );
  53956. },
  53957. week: {
  53958. dow: 1, // Monday is the first day of the week.
  53959. doy: 4, // The week that contains Jan 4th is the first week of the year.
  53960. },
  53961. });
  53962. return nlBe;
  53963. })));
  53964. /***/ }),
  53965. /***/ 93901:
  53966. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  53967. //! moment.js locale configuration
  53968. //! locale : Dutch [nl]
  53969. //! author : Joris Röling : https://github.com/jorisroling
  53970. //! author : Jacob Middag : https://github.com/middagj
  53971. ;(function (global, factory) {
  53972. true ? factory(__webpack_require__(30381)) :
  53973. 0
  53974. }(this, (function (moment) { 'use strict';
  53975. //! moment.js locale configuration
  53976. var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split(
  53977. '_'
  53978. ),
  53979. monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split(
  53980. '_'
  53981. ),
  53982. monthsParse = [
  53983. /^jan/i,
  53984. /^feb/i,
  53985. /^maart|mrt.?$/i,
  53986. /^apr/i,
  53987. /^mei$/i,
  53988. /^jun[i.]?$/i,
  53989. /^jul[i.]?$/i,
  53990. /^aug/i,
  53991. /^sep/i,
  53992. /^okt/i,
  53993. /^nov/i,
  53994. /^dec/i,
  53995. ],
  53996. monthsRegex = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
  53997. var nl = moment.defineLocale('nl', {
  53998. months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(
  53999. '_'
  54000. ),
  54001. monthsShort: function (m, format) {
  54002. if (!m) {
  54003. return monthsShortWithDots;
  54004. } else if (/-MMM-/.test(format)) {
  54005. return monthsShortWithoutDots[m.month()];
  54006. } else {
  54007. return monthsShortWithDots[m.month()];
  54008. }
  54009. },
  54010. monthsRegex: monthsRegex,
  54011. monthsShortRegex: monthsRegex,
  54012. monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,
  54013. monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
  54014. monthsParse: monthsParse,
  54015. longMonthsParse: monthsParse,
  54016. shortMonthsParse: monthsParse,
  54017. weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split(
  54018. '_'
  54019. ),
  54020. weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
  54021. weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
  54022. weekdaysParseExact: true,
  54023. longDateFormat: {
  54024. LT: 'HH:mm',
  54025. LTS: 'HH:mm:ss',
  54026. L: 'DD-MM-YYYY',
  54027. LL: 'D MMMM YYYY',
  54028. LLL: 'D MMMM YYYY HH:mm',
  54029. LLLL: 'dddd D MMMM YYYY HH:mm',
  54030. },
  54031. calendar: {
  54032. sameDay: '[vandaag om] LT',
  54033. nextDay: '[morgen om] LT',
  54034. nextWeek: 'dddd [om] LT',
  54035. lastDay: '[gisteren om] LT',
  54036. lastWeek: '[afgelopen] dddd [om] LT',
  54037. sameElse: 'L',
  54038. },
  54039. relativeTime: {
  54040. future: 'over %s',
  54041. past: '%s geleden',
  54042. s: 'een paar seconden',
  54043. ss: '%d seconden',
  54044. m: 'één minuut',
  54045. mm: '%d minuten',
  54046. h: 'één uur',
  54047. hh: '%d uur',
  54048. d: 'één dag',
  54049. dd: '%d dagen',
  54050. w: 'één week',
  54051. ww: '%d weken',
  54052. M: 'één maand',
  54053. MM: '%d maanden',
  54054. y: 'één jaar',
  54055. yy: '%d jaar',
  54056. },
  54057. dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
  54058. ordinal: function (number) {
  54059. return (
  54060. number +
  54061. (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
  54062. );
  54063. },
  54064. week: {
  54065. dow: 1, // Monday is the first day of the week.
  54066. doy: 4, // The week that contains Jan 4th is the first week of the year.
  54067. },
  54068. });
  54069. return nl;
  54070. })));
  54071. /***/ }),
  54072. /***/ 83877:
  54073. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  54074. //! moment.js locale configuration
  54075. //! locale : Nynorsk [nn]
  54076. //! authors : https://github.com/mechuwind
  54077. //! Stephen Ramthun : https://github.com/stephenramthun
  54078. ;(function (global, factory) {
  54079. true ? factory(__webpack_require__(30381)) :
  54080. 0
  54081. }(this, (function (moment) { 'use strict';
  54082. //! moment.js locale configuration
  54083. var nn = moment.defineLocale('nn', {
  54084. months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(
  54085. '_'
  54086. ),
  54087. monthsShort: 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split(
  54088. '_'
  54089. ),
  54090. monthsParseExact: true,
  54091. weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),
  54092. weekdaysShort: 'su._må._ty._on._to._fr._lau.'.split('_'),
  54093. weekdaysMin: 'su_må_ty_on_to_fr_la'.split('_'),
  54094. weekdaysParseExact: true,
  54095. longDateFormat: {
  54096. LT: 'HH:mm',
  54097. LTS: 'HH:mm:ss',
  54098. L: 'DD.MM.YYYY',
  54099. LL: 'D. MMMM YYYY',
  54100. LLL: 'D. MMMM YYYY [kl.] H:mm',
  54101. LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',
  54102. },
  54103. calendar: {
  54104. sameDay: '[I dag klokka] LT',
  54105. nextDay: '[I morgon klokka] LT',
  54106. nextWeek: 'dddd [klokka] LT',
  54107. lastDay: '[I går klokka] LT',
  54108. lastWeek: '[Føregåande] dddd [klokka] LT',
  54109. sameElse: 'L',
  54110. },
  54111. relativeTime: {
  54112. future: 'om %s',
  54113. past: '%s sidan',
  54114. s: 'nokre sekund',
  54115. ss: '%d sekund',
  54116. m: 'eit minutt',
  54117. mm: '%d minutt',
  54118. h: 'ein time',
  54119. hh: '%d timar',
  54120. d: 'ein dag',
  54121. dd: '%d dagar',
  54122. w: 'ei veke',
  54123. ww: '%d veker',
  54124. M: 'ein månad',
  54125. MM: '%d månader',
  54126. y: 'eit år',
  54127. yy: '%d år',
  54128. },
  54129. dayOfMonthOrdinalParse: /\d{1,2}\./,
  54130. ordinal: '%d.',
  54131. week: {
  54132. dow: 1, // Monday is the first day of the week.
  54133. doy: 4, // The week that contains Jan 4th is the first week of the year.
  54134. },
  54135. });
  54136. return nn;
  54137. })));
  54138. /***/ }),
  54139. /***/ 92135:
  54140. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  54141. //! moment.js locale configuration
  54142. //! locale : Occitan, lengadocian dialecte [oc-lnc]
  54143. //! author : Quentin PAGÈS : https://github.com/Quenty31
  54144. ;(function (global, factory) {
  54145. true ? factory(__webpack_require__(30381)) :
  54146. 0
  54147. }(this, (function (moment) { 'use strict';
  54148. //! moment.js locale configuration
  54149. var ocLnc = moment.defineLocale('oc-lnc', {
  54150. months: {
  54151. standalone: 'genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre'.split(
  54152. '_'
  54153. ),
  54154. format: "de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre".split(
  54155. '_'
  54156. ),
  54157. isFormat: /D[oD]?(\s)+MMMM/,
  54158. },
  54159. monthsShort: 'gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.'.split(
  54160. '_'
  54161. ),
  54162. monthsParseExact: true,
  54163. weekdays: 'dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte'.split(
  54164. '_'
  54165. ),
  54166. weekdaysShort: 'dg._dl._dm._dc._dj._dv._ds.'.split('_'),
  54167. weekdaysMin: 'dg_dl_dm_dc_dj_dv_ds'.split('_'),
  54168. weekdaysParseExact: true,
  54169. longDateFormat: {
  54170. LT: 'H:mm',
  54171. LTS: 'H:mm:ss',
  54172. L: 'DD/MM/YYYY',
  54173. LL: 'D MMMM [de] YYYY',
  54174. ll: 'D MMM YYYY',
  54175. LLL: 'D MMMM [de] YYYY [a] H:mm',
  54176. lll: 'D MMM YYYY, H:mm',
  54177. LLLL: 'dddd D MMMM [de] YYYY [a] H:mm',
  54178. llll: 'ddd D MMM YYYY, H:mm',
  54179. },
  54180. calendar: {
  54181. sameDay: '[uèi a] LT',
  54182. nextDay: '[deman a] LT',
  54183. nextWeek: 'dddd [a] LT',
  54184. lastDay: '[ièr a] LT',
  54185. lastWeek: 'dddd [passat a] LT',
  54186. sameElse: 'L',
  54187. },
  54188. relativeTime: {
  54189. future: "d'aquí %s",
  54190. past: 'fa %s',
  54191. s: 'unas segondas',
  54192. ss: '%d segondas',
  54193. m: 'una minuta',
  54194. mm: '%d minutas',
  54195. h: 'una ora',
  54196. hh: '%d oras',
  54197. d: 'un jorn',
  54198. dd: '%d jorns',
  54199. M: 'un mes',
  54200. MM: '%d meses',
  54201. y: 'un an',
  54202. yy: '%d ans',
  54203. },
  54204. dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
  54205. ordinal: function (number, period) {
  54206. var output =
  54207. number === 1
  54208. ? 'r'
  54209. : number === 2
  54210. ? 'n'
  54211. : number === 3
  54212. ? 'r'
  54213. : number === 4
  54214. ? 't'
  54215. : 'è';
  54216. if (period === 'w' || period === 'W') {
  54217. output = 'a';
  54218. }
  54219. return number + output;
  54220. },
  54221. week: {
  54222. dow: 1, // Monday is the first day of the week.
  54223. doy: 4,
  54224. },
  54225. });
  54226. return ocLnc;
  54227. })));
  54228. /***/ }),
  54229. /***/ 15858:
  54230. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  54231. //! moment.js locale configuration
  54232. //! locale : Punjabi (India) [pa-in]
  54233. //! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit
  54234. ;(function (global, factory) {
  54235. true ? factory(__webpack_require__(30381)) :
  54236. 0
  54237. }(this, (function (moment) { 'use strict';
  54238. //! moment.js locale configuration
  54239. var symbolMap = {
  54240. 1: '੧',
  54241. 2: '੨',
  54242. 3: '੩',
  54243. 4: '੪',
  54244. 5: '੫',
  54245. 6: '੬',
  54246. 7: '੭',
  54247. 8: '੮',
  54248. 9: '੯',
  54249. 0: '੦',
  54250. },
  54251. numberMap = {
  54252. '੧': '1',
  54253. '੨': '2',
  54254. '੩': '3',
  54255. '੪': '4',
  54256. '੫': '5',
  54257. '੬': '6',
  54258. '੭': '7',
  54259. '੮': '8',
  54260. '੯': '9',
  54261. '੦': '0',
  54262. };
  54263. var paIn = moment.defineLocale('pa-in', {
  54264. // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi.
  54265. months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(
  54266. '_'
  54267. ),
  54268. monthsShort: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(
  54269. '_'
  54270. ),
  54271. weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split(
  54272. '_'
  54273. ),
  54274. weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
  54275. weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
  54276. longDateFormat: {
  54277. LT: 'A h:mm ਵਜੇ',
  54278. LTS: 'A h:mm:ss ਵਜੇ',
  54279. L: 'DD/MM/YYYY',
  54280. LL: 'D MMMM YYYY',
  54281. LLL: 'D MMMM YYYY, A h:mm ਵਜੇ',
  54282. LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ',
  54283. },
  54284. calendar: {
  54285. sameDay: '[ਅਜ] LT',
  54286. nextDay: '[ਕਲ] LT',
  54287. nextWeek: '[ਅਗਲਾ] dddd, LT',
  54288. lastDay: '[ਕਲ] LT',
  54289. lastWeek: '[ਪਿਛਲੇ] dddd, LT',
  54290. sameElse: 'L',
  54291. },
  54292. relativeTime: {
  54293. future: '%s ਵਿੱਚ',
  54294. past: '%s ਪਿਛਲੇ',
  54295. s: 'ਕੁਝ ਸਕਿੰਟ',
  54296. ss: '%d ਸਕਿੰਟ',
  54297. m: 'ਇਕ ਮਿੰਟ',
  54298. mm: '%d ਮਿੰਟ',
  54299. h: 'ਇੱਕ ਘੰਟਾ',
  54300. hh: '%d ਘੰਟੇ',
  54301. d: 'ਇੱਕ ਦਿਨ',
  54302. dd: '%d ਦਿਨ',
  54303. M: 'ਇੱਕ ਮਹੀਨਾ',
  54304. MM: '%d ਮਹੀਨੇ',
  54305. y: 'ਇੱਕ ਸਾਲ',
  54306. yy: '%d ਸਾਲ',
  54307. },
  54308. preparse: function (string) {
  54309. return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {
  54310. return numberMap[match];
  54311. });
  54312. },
  54313. postformat: function (string) {
  54314. return string.replace(/\d/g, function (match) {
  54315. return symbolMap[match];
  54316. });
  54317. },
  54318. // Punjabi notation for meridiems are quite fuzzy in practice. While there exists
  54319. // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.
  54320. meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,
  54321. meridiemHour: function (hour, meridiem) {
  54322. if (hour === 12) {
  54323. hour = 0;
  54324. }
  54325. if (meridiem === 'ਰਾਤ') {
  54326. return hour < 4 ? hour : hour + 12;
  54327. } else if (meridiem === 'ਸਵੇਰ') {
  54328. return hour;
  54329. } else if (meridiem === 'ਦੁਪਹਿਰ') {
  54330. return hour >= 10 ? hour : hour + 12;
  54331. } else if (meridiem === 'ਸ਼ਾਮ') {
  54332. return hour + 12;
  54333. }
  54334. },
  54335. meridiem: function (hour, minute, isLower) {
  54336. if (hour < 4) {
  54337. return 'ਰਾਤ';
  54338. } else if (hour < 10) {
  54339. return 'ਸਵੇਰ';
  54340. } else if (hour < 17) {
  54341. return 'ਦੁਪਹਿਰ';
  54342. } else if (hour < 20) {
  54343. return 'ਸ਼ਾਮ';
  54344. } else {
  54345. return 'ਰਾਤ';
  54346. }
  54347. },
  54348. week: {
  54349. dow: 0, // Sunday is the first day of the week.
  54350. doy: 6, // The week that contains Jan 6th is the first week of the year.
  54351. },
  54352. });
  54353. return paIn;
  54354. })));
  54355. /***/ }),
  54356. /***/ 64495:
  54357. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  54358. //! moment.js locale configuration
  54359. //! locale : Polish [pl]
  54360. //! author : Rafal Hirsz : https://github.com/evoL
  54361. ;(function (global, factory) {
  54362. true ? factory(__webpack_require__(30381)) :
  54363. 0
  54364. }(this, (function (moment) { 'use strict';
  54365. //! moment.js locale configuration
  54366. var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split(
  54367. '_'
  54368. ),
  54369. monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split(
  54370. '_'
  54371. ),
  54372. monthsParse = [
  54373. /^sty/i,
  54374. /^lut/i,
  54375. /^mar/i,
  54376. /^kwi/i,
  54377. /^maj/i,
  54378. /^cze/i,
  54379. /^lip/i,
  54380. /^sie/i,
  54381. /^wrz/i,
  54382. /^paź/i,
  54383. /^lis/i,
  54384. /^gru/i,
  54385. ];
  54386. function plural(n) {
  54387. return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1;
  54388. }
  54389. function translate(number, withoutSuffix, key) {
  54390. var result = number + ' ';
  54391. switch (key) {
  54392. case 'ss':
  54393. return result + (plural(number) ? 'sekundy' : 'sekund');
  54394. case 'm':
  54395. return withoutSuffix ? 'minuta' : 'minutę';
  54396. case 'mm':
  54397. return result + (plural(number) ? 'minuty' : 'minut');
  54398. case 'h':
  54399. return withoutSuffix ? 'godzina' : 'godzinę';
  54400. case 'hh':
  54401. return result + (plural(number) ? 'godziny' : 'godzin');
  54402. case 'ww':
  54403. return result + (plural(number) ? 'tygodnie' : 'tygodni');
  54404. case 'MM':
  54405. return result + (plural(number) ? 'miesiące' : 'miesięcy');
  54406. case 'yy':
  54407. return result + (plural(number) ? 'lata' : 'lat');
  54408. }
  54409. }
  54410. var pl = moment.defineLocale('pl', {
  54411. months: function (momentToFormat, format) {
  54412. if (!momentToFormat) {
  54413. return monthsNominative;
  54414. } else if (/D MMMM/.test(format)) {
  54415. return monthsSubjective[momentToFormat.month()];
  54416. } else {
  54417. return monthsNominative[momentToFormat.month()];
  54418. }
  54419. },
  54420. monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),
  54421. monthsParse: monthsParse,
  54422. longMonthsParse: monthsParse,
  54423. shortMonthsParse: monthsParse,
  54424. weekdays: 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split(
  54425. '_'
  54426. ),
  54427. weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),
  54428. weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),
  54429. longDateFormat: {
  54430. LT: 'HH:mm',
  54431. LTS: 'HH:mm:ss',
  54432. L: 'DD.MM.YYYY',
  54433. LL: 'D MMMM YYYY',
  54434. LLL: 'D MMMM YYYY HH:mm',
  54435. LLLL: 'dddd, D MMMM YYYY HH:mm',
  54436. },
  54437. calendar: {
  54438. sameDay: '[Dziś o] LT',
  54439. nextDay: '[Jutro o] LT',
  54440. nextWeek: function () {
  54441. switch (this.day()) {
  54442. case 0:
  54443. return '[W niedzielę o] LT';
  54444. case 2:
  54445. return '[We wtorek o] LT';
  54446. case 3:
  54447. return '[W środę o] LT';
  54448. case 6:
  54449. return '[W sobotę o] LT';
  54450. default:
  54451. return '[W] dddd [o] LT';
  54452. }
  54453. },
  54454. lastDay: '[Wczoraj o] LT',
  54455. lastWeek: function () {
  54456. switch (this.day()) {
  54457. case 0:
  54458. return '[W zeszłą niedzielę o] LT';
  54459. case 3:
  54460. return '[W zeszłą środę o] LT';
  54461. case 6:
  54462. return '[W zeszłą sobotę o] LT';
  54463. default:
  54464. return '[W zeszły] dddd [o] LT';
  54465. }
  54466. },
  54467. sameElse: 'L',
  54468. },
  54469. relativeTime: {
  54470. future: 'za %s',
  54471. past: '%s temu',
  54472. s: 'kilka sekund',
  54473. ss: translate,
  54474. m: translate,
  54475. mm: translate,
  54476. h: translate,
  54477. hh: translate,
  54478. d: '1 dzień',
  54479. dd: '%d dni',
  54480. w: 'tydzień',
  54481. ww: translate,
  54482. M: 'miesiąc',
  54483. MM: translate,
  54484. y: 'rok',
  54485. yy: translate,
  54486. },
  54487. dayOfMonthOrdinalParse: /\d{1,2}\./,
  54488. ordinal: '%d.',
  54489. week: {
  54490. dow: 1, // Monday is the first day of the week.
  54491. doy: 4, // The week that contains Jan 4th is the first week of the year.
  54492. },
  54493. });
  54494. return pl;
  54495. })));
  54496. /***/ }),
  54497. /***/ 57971:
  54498. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  54499. //! moment.js locale configuration
  54500. //! locale : Portuguese (Brazil) [pt-br]
  54501. //! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira
  54502. ;(function (global, factory) {
  54503. true ? factory(__webpack_require__(30381)) :
  54504. 0
  54505. }(this, (function (moment) { 'use strict';
  54506. //! moment.js locale configuration
  54507. var ptBr = moment.defineLocale('pt-br', {
  54508. months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(
  54509. '_'
  54510. ),
  54511. monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
  54512. weekdays: 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split(
  54513. '_'
  54514. ),
  54515. weekdaysShort: 'dom_seg_ter_qua_qui_sex_sáb'.split('_'),
  54516. weekdaysMin: 'do_2ª_3ª_4ª_5ª_6ª_sá'.split('_'),
  54517. weekdaysParseExact: true,
  54518. longDateFormat: {
  54519. LT: 'HH:mm',
  54520. LTS: 'HH:mm:ss',
  54521. L: 'DD/MM/YYYY',
  54522. LL: 'D [de] MMMM [de] YYYY',
  54523. LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',
  54524. LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm',
  54525. },
  54526. calendar: {
  54527. sameDay: '[Hoje às] LT',
  54528. nextDay: '[Amanhã às] LT',
  54529. nextWeek: 'dddd [às] LT',
  54530. lastDay: '[Ontem às] LT',
  54531. lastWeek: function () {
  54532. return this.day() === 0 || this.day() === 6
  54533. ? '[Último] dddd [às] LT' // Saturday + Sunday
  54534. : '[Última] dddd [às] LT'; // Monday - Friday
  54535. },
  54536. sameElse: 'L',
  54537. },
  54538. relativeTime: {
  54539. future: 'em %s',
  54540. past: 'há %s',
  54541. s: 'poucos segundos',
  54542. ss: '%d segundos',
  54543. m: 'um minuto',
  54544. mm: '%d minutos',
  54545. h: 'uma hora',
  54546. hh: '%d horas',
  54547. d: 'um dia',
  54548. dd: '%d dias',
  54549. M: 'um mês',
  54550. MM: '%d meses',
  54551. y: 'um ano',
  54552. yy: '%d anos',
  54553. },
  54554. dayOfMonthOrdinalParse: /\d{1,2}º/,
  54555. ordinal: '%dº',
  54556. invalidDate: 'Data inválida',
  54557. });
  54558. return ptBr;
  54559. })));
  54560. /***/ }),
  54561. /***/ 89520:
  54562. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  54563. //! moment.js locale configuration
  54564. //! locale : Portuguese [pt]
  54565. //! author : Jefferson : https://github.com/jalex79
  54566. ;(function (global, factory) {
  54567. true ? factory(__webpack_require__(30381)) :
  54568. 0
  54569. }(this, (function (moment) { 'use strict';
  54570. //! moment.js locale configuration
  54571. var pt = moment.defineLocale('pt', {
  54572. months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(
  54573. '_'
  54574. ),
  54575. monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
  54576. weekdays: 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split(
  54577. '_'
  54578. ),
  54579. weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
  54580. weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
  54581. weekdaysParseExact: true,
  54582. longDateFormat: {
  54583. LT: 'HH:mm',
  54584. LTS: 'HH:mm:ss',
  54585. L: 'DD/MM/YYYY',
  54586. LL: 'D [de] MMMM [de] YYYY',
  54587. LLL: 'D [de] MMMM [de] YYYY HH:mm',
  54588. LLLL: 'dddd, D [de] MMMM [de] YYYY HH:mm',
  54589. },
  54590. calendar: {
  54591. sameDay: '[Hoje às] LT',
  54592. nextDay: '[Amanhã às] LT',
  54593. nextWeek: 'dddd [às] LT',
  54594. lastDay: '[Ontem às] LT',
  54595. lastWeek: function () {
  54596. return this.day() === 0 || this.day() === 6
  54597. ? '[Último] dddd [às] LT' // Saturday + Sunday
  54598. : '[Última] dddd [às] LT'; // Monday - Friday
  54599. },
  54600. sameElse: 'L',
  54601. },
  54602. relativeTime: {
  54603. future: 'em %s',
  54604. past: 'há %s',
  54605. s: 'segundos',
  54606. ss: '%d segundos',
  54607. m: 'um minuto',
  54608. mm: '%d minutos',
  54609. h: 'uma hora',
  54610. hh: '%d horas',
  54611. d: 'um dia',
  54612. dd: '%d dias',
  54613. w: 'uma semana',
  54614. ww: '%d semanas',
  54615. M: 'um mês',
  54616. MM: '%d meses',
  54617. y: 'um ano',
  54618. yy: '%d anos',
  54619. },
  54620. dayOfMonthOrdinalParse: /\d{1,2}º/,
  54621. ordinal: '%dº',
  54622. week: {
  54623. dow: 1, // Monday is the first day of the week.
  54624. doy: 4, // The week that contains Jan 4th is the first week of the year.
  54625. },
  54626. });
  54627. return pt;
  54628. })));
  54629. /***/ }),
  54630. /***/ 96459:
  54631. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  54632. //! moment.js locale configuration
  54633. //! locale : Romanian [ro]
  54634. //! author : Vlad Gurdiga : https://github.com/gurdiga
  54635. //! author : Valentin Agachi : https://github.com/avaly
  54636. //! author : Emanuel Cepoi : https://github.com/cepem
  54637. ;(function (global, factory) {
  54638. true ? factory(__webpack_require__(30381)) :
  54639. 0
  54640. }(this, (function (moment) { 'use strict';
  54641. //! moment.js locale configuration
  54642. function relativeTimeWithPlural(number, withoutSuffix, key) {
  54643. var format = {
  54644. ss: 'secunde',
  54645. mm: 'minute',
  54646. hh: 'ore',
  54647. dd: 'zile',
  54648. ww: 'săptămâni',
  54649. MM: 'luni',
  54650. yy: 'ani',
  54651. },
  54652. separator = ' ';
  54653. if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {
  54654. separator = ' de ';
  54655. }
  54656. return number + separator + format[key];
  54657. }
  54658. var ro = moment.defineLocale('ro', {
  54659. months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split(
  54660. '_'
  54661. ),
  54662. monthsShort: 'ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split(
  54663. '_'
  54664. ),
  54665. monthsParseExact: true,
  54666. weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),
  54667. weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),
  54668. weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),
  54669. longDateFormat: {
  54670. LT: 'H:mm',
  54671. LTS: 'H:mm:ss',
  54672. L: 'DD.MM.YYYY',
  54673. LL: 'D MMMM YYYY',
  54674. LLL: 'D MMMM YYYY H:mm',
  54675. LLLL: 'dddd, D MMMM YYYY H:mm',
  54676. },
  54677. calendar: {
  54678. sameDay: '[azi la] LT',
  54679. nextDay: '[mâine la] LT',
  54680. nextWeek: 'dddd [la] LT',
  54681. lastDay: '[ieri la] LT',
  54682. lastWeek: '[fosta] dddd [la] LT',
  54683. sameElse: 'L',
  54684. },
  54685. relativeTime: {
  54686. future: 'peste %s',
  54687. past: '%s în urmă',
  54688. s: 'câteva secunde',
  54689. ss: relativeTimeWithPlural,
  54690. m: 'un minut',
  54691. mm: relativeTimeWithPlural,
  54692. h: 'o oră',
  54693. hh: relativeTimeWithPlural,
  54694. d: 'o zi',
  54695. dd: relativeTimeWithPlural,
  54696. w: 'o săptămână',
  54697. ww: relativeTimeWithPlural,
  54698. M: 'o lună',
  54699. MM: relativeTimeWithPlural,
  54700. y: 'un an',
  54701. yy: relativeTimeWithPlural,
  54702. },
  54703. week: {
  54704. dow: 1, // Monday is the first day of the week.
  54705. doy: 7, // The week that contains Jan 7th is the first week of the year.
  54706. },
  54707. });
  54708. return ro;
  54709. })));
  54710. /***/ }),
  54711. /***/ 21793:
  54712. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  54713. //! moment.js locale configuration
  54714. //! locale : Russian [ru]
  54715. //! author : Viktorminator : https://github.com/Viktorminator
  54716. //! author : Menelion Elensúle : https://github.com/Oire
  54717. //! author : Коренберг Марк : https://github.com/socketpair
  54718. ;(function (global, factory) {
  54719. true ? factory(__webpack_require__(30381)) :
  54720. 0
  54721. }(this, (function (moment) { 'use strict';
  54722. //! moment.js locale configuration
  54723. function plural(word, num) {
  54724. var forms = word.split('_');
  54725. return num % 10 === 1 && num % 100 !== 11
  54726. ? forms[0]
  54727. : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
  54728. ? forms[1]
  54729. : forms[2];
  54730. }
  54731. function relativeTimeWithPlural(number, withoutSuffix, key) {
  54732. var format = {
  54733. ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',
  54734. mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',
  54735. hh: 'час_часа_часов',
  54736. dd: 'день_дня_дней',
  54737. ww: 'неделя_недели_недель',
  54738. MM: 'месяц_месяца_месяцев',
  54739. yy: 'год_года_лет',
  54740. };
  54741. if (key === 'm') {
  54742. return withoutSuffix ? 'минута' : 'минуту';
  54743. } else {
  54744. return number + ' ' + plural(format[key], +number);
  54745. }
  54746. }
  54747. var monthsParse = [
  54748. /^янв/i,
  54749. /^фев/i,
  54750. /^мар/i,
  54751. /^апр/i,
  54752. /^ма[йя]/i,
  54753. /^июн/i,
  54754. /^июл/i,
  54755. /^авг/i,
  54756. /^сен/i,
  54757. /^окт/i,
  54758. /^ноя/i,
  54759. /^дек/i,
  54760. ];
  54761. // http://new.gramota.ru/spravka/rules/139-prop : § 103
  54762. // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637
  54763. // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753
  54764. var ru = moment.defineLocale('ru', {
  54765. months: {
  54766. format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split(
  54767. '_'
  54768. ),
  54769. standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(
  54770. '_'
  54771. ),
  54772. },
  54773. monthsShort: {
  54774. // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку?
  54775. format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split(
  54776. '_'
  54777. ),
  54778. standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split(
  54779. '_'
  54780. ),
  54781. },
  54782. weekdays: {
  54783. standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split(
  54784. '_'
  54785. ),
  54786. format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split(
  54787. '_'
  54788. ),
  54789. isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/,
  54790. },
  54791. weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
  54792. weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
  54793. monthsParse: monthsParse,
  54794. longMonthsParse: monthsParse,
  54795. shortMonthsParse: monthsParse,
  54796. // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки
  54797. monthsRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
  54798. // копия предыдущего
  54799. monthsShortRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
  54800. // полные названия с падежами
  54801. monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,
  54802. // Выражение, которое соответствует только сокращённым формам
  54803. monthsShortStrictRegex: /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,
  54804. longDateFormat: {
  54805. LT: 'H:mm',
  54806. LTS: 'H:mm:ss',
  54807. L: 'DD.MM.YYYY',
  54808. LL: 'D MMMM YYYY г.',
  54809. LLL: 'D MMMM YYYY г., H:mm',
  54810. LLLL: 'dddd, D MMMM YYYY г., H:mm',
  54811. },
  54812. calendar: {
  54813. sameDay: '[Сегодня, в] LT',
  54814. nextDay: '[Завтра, в] LT',
  54815. lastDay: '[Вчера, в] LT',
  54816. nextWeek: function (now) {
  54817. if (now.week() !== this.week()) {
  54818. switch (this.day()) {
  54819. case 0:
  54820. return '[В следующее] dddd, [в] LT';
  54821. case 1:
  54822. case 2:
  54823. case 4:
  54824. return '[В следующий] dddd, [в] LT';
  54825. case 3:
  54826. case 5:
  54827. case 6:
  54828. return '[В следующую] dddd, [в] LT';
  54829. }
  54830. } else {
  54831. if (this.day() === 2) {
  54832. return '[Во] dddd, [в] LT';
  54833. } else {
  54834. return '[В] dddd, [в] LT';
  54835. }
  54836. }
  54837. },
  54838. lastWeek: function (now) {
  54839. if (now.week() !== this.week()) {
  54840. switch (this.day()) {
  54841. case 0:
  54842. return '[В прошлое] dddd, [в] LT';
  54843. case 1:
  54844. case 2:
  54845. case 4:
  54846. return '[В прошлый] dddd, [в] LT';
  54847. case 3:
  54848. case 5:
  54849. case 6:
  54850. return '[В прошлую] dddd, [в] LT';
  54851. }
  54852. } else {
  54853. if (this.day() === 2) {
  54854. return '[Во] dddd, [в] LT';
  54855. } else {
  54856. return '[В] dddd, [в] LT';
  54857. }
  54858. }
  54859. },
  54860. sameElse: 'L',
  54861. },
  54862. relativeTime: {
  54863. future: 'через %s',
  54864. past: '%s назад',
  54865. s: 'несколько секунд',
  54866. ss: relativeTimeWithPlural,
  54867. m: relativeTimeWithPlural,
  54868. mm: relativeTimeWithPlural,
  54869. h: 'час',
  54870. hh: relativeTimeWithPlural,
  54871. d: 'день',
  54872. dd: relativeTimeWithPlural,
  54873. w: 'неделя',
  54874. ww: relativeTimeWithPlural,
  54875. M: 'месяц',
  54876. MM: relativeTimeWithPlural,
  54877. y: 'год',
  54878. yy: relativeTimeWithPlural,
  54879. },
  54880. meridiemParse: /ночи|утра|дня|вечера/i,
  54881. isPM: function (input) {
  54882. return /^(дня|вечера)$/.test(input);
  54883. },
  54884. meridiem: function (hour, minute, isLower) {
  54885. if (hour < 4) {
  54886. return 'ночи';
  54887. } else if (hour < 12) {
  54888. return 'утра';
  54889. } else if (hour < 17) {
  54890. return 'дня';
  54891. } else {
  54892. return 'вечера';
  54893. }
  54894. },
  54895. dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/,
  54896. ordinal: function (number, period) {
  54897. switch (period) {
  54898. case 'M':
  54899. case 'd':
  54900. case 'DDD':
  54901. return number + '-й';
  54902. case 'D':
  54903. return number + '-го';
  54904. case 'w':
  54905. case 'W':
  54906. return number + '-я';
  54907. default:
  54908. return number;
  54909. }
  54910. },
  54911. week: {
  54912. dow: 1, // Monday is the first day of the week.
  54913. doy: 4, // The week that contains Jan 4th is the first week of the year.
  54914. },
  54915. });
  54916. return ru;
  54917. })));
  54918. /***/ }),
  54919. /***/ 40950:
  54920. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  54921. //! moment.js locale configuration
  54922. //! locale : Sindhi [sd]
  54923. //! author : Narain Sagar : https://github.com/narainsagar
  54924. ;(function (global, factory) {
  54925. true ? factory(__webpack_require__(30381)) :
  54926. 0
  54927. }(this, (function (moment) { 'use strict';
  54928. //! moment.js locale configuration
  54929. var months = [
  54930. 'جنوري',
  54931. 'فيبروري',
  54932. 'مارچ',
  54933. 'اپريل',
  54934. 'مئي',
  54935. 'جون',
  54936. 'جولاءِ',
  54937. 'آگسٽ',
  54938. 'سيپٽمبر',
  54939. 'آڪٽوبر',
  54940. 'نومبر',
  54941. 'ڊسمبر',
  54942. ],
  54943. days = ['آچر', 'سومر', 'اڱارو', 'اربع', 'خميس', 'جمع', 'ڇنڇر'];
  54944. var sd = moment.defineLocale('sd', {
  54945. months: months,
  54946. monthsShort: months,
  54947. weekdays: days,
  54948. weekdaysShort: days,
  54949. weekdaysMin: days,
  54950. longDateFormat: {
  54951. LT: 'HH:mm',
  54952. LTS: 'HH:mm:ss',
  54953. L: 'DD/MM/YYYY',
  54954. LL: 'D MMMM YYYY',
  54955. LLL: 'D MMMM YYYY HH:mm',
  54956. LLLL: 'dddd، D MMMM YYYY HH:mm',
  54957. },
  54958. meridiemParse: /صبح|شام/,
  54959. isPM: function (input) {
  54960. return 'شام' === input;
  54961. },
  54962. meridiem: function (hour, minute, isLower) {
  54963. if (hour < 12) {
  54964. return 'صبح';
  54965. }
  54966. return 'شام';
  54967. },
  54968. calendar: {
  54969. sameDay: '[اڄ] LT',
  54970. nextDay: '[سڀاڻي] LT',
  54971. nextWeek: 'dddd [اڳين هفتي تي] LT',
  54972. lastDay: '[ڪالهه] LT',
  54973. lastWeek: '[گزريل هفتي] dddd [تي] LT',
  54974. sameElse: 'L',
  54975. },
  54976. relativeTime: {
  54977. future: '%s پوء',
  54978. past: '%s اڳ',
  54979. s: 'چند سيڪنڊ',
  54980. ss: '%d سيڪنڊ',
  54981. m: 'هڪ منٽ',
  54982. mm: '%d منٽ',
  54983. h: 'هڪ ڪلاڪ',
  54984. hh: '%d ڪلاڪ',
  54985. d: 'هڪ ڏينهن',
  54986. dd: '%d ڏينهن',
  54987. M: 'هڪ مهينو',
  54988. MM: '%d مهينا',
  54989. y: 'هڪ سال',
  54990. yy: '%d سال',
  54991. },
  54992. preparse: function (string) {
  54993. return string.replace(/،/g, ',');
  54994. },
  54995. postformat: function (string) {
  54996. return string.replace(/,/g, '،');
  54997. },
  54998. week: {
  54999. dow: 1, // Monday is the first day of the week.
  55000. doy: 4, // The week that contains Jan 4th is the first week of the year.
  55001. },
  55002. });
  55003. return sd;
  55004. })));
  55005. /***/ }),
  55006. /***/ 10490:
  55007. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  55008. //! moment.js locale configuration
  55009. //! locale : Northern Sami [se]
  55010. //! authors : Bård Rolstad Henriksen : https://github.com/karamell
  55011. ;(function (global, factory) {
  55012. true ? factory(__webpack_require__(30381)) :
  55013. 0
  55014. }(this, (function (moment) { 'use strict';
  55015. //! moment.js locale configuration
  55016. var se = moment.defineLocale('se', {
  55017. months: 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split(
  55018. '_'
  55019. ),
  55020. monthsShort: 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split(
  55021. '_'
  55022. ),
  55023. weekdays: 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split(
  55024. '_'
  55025. ),
  55026. weekdaysShort: 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'),
  55027. weekdaysMin: 's_v_m_g_d_b_L'.split('_'),
  55028. longDateFormat: {
  55029. LT: 'HH:mm',
  55030. LTS: 'HH:mm:ss',
  55031. L: 'DD.MM.YYYY',
  55032. LL: 'MMMM D. [b.] YYYY',
  55033. LLL: 'MMMM D. [b.] YYYY [ti.] HH:mm',
  55034. LLLL: 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm',
  55035. },
  55036. calendar: {
  55037. sameDay: '[otne ti] LT',
  55038. nextDay: '[ihttin ti] LT',
  55039. nextWeek: 'dddd [ti] LT',
  55040. lastDay: '[ikte ti] LT',
  55041. lastWeek: '[ovddit] dddd [ti] LT',
  55042. sameElse: 'L',
  55043. },
  55044. relativeTime: {
  55045. future: '%s geažes',
  55046. past: 'maŋit %s',
  55047. s: 'moadde sekunddat',
  55048. ss: '%d sekunddat',
  55049. m: 'okta minuhta',
  55050. mm: '%d minuhtat',
  55051. h: 'okta diimmu',
  55052. hh: '%d diimmut',
  55053. d: 'okta beaivi',
  55054. dd: '%d beaivvit',
  55055. M: 'okta mánnu',
  55056. MM: '%d mánut',
  55057. y: 'okta jahki',
  55058. yy: '%d jagit',
  55059. },
  55060. dayOfMonthOrdinalParse: /\d{1,2}\./,
  55061. ordinal: '%d.',
  55062. week: {
  55063. dow: 1, // Monday is the first day of the week.
  55064. doy: 4, // The week that contains Jan 4th is the first week of the year.
  55065. },
  55066. });
  55067. return se;
  55068. })));
  55069. /***/ }),
  55070. /***/ 90124:
  55071. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  55072. //! moment.js locale configuration
  55073. //! locale : Sinhalese [si]
  55074. //! author : Sampath Sitinamaluwa : https://github.com/sampathsris
  55075. ;(function (global, factory) {
  55076. true ? factory(__webpack_require__(30381)) :
  55077. 0
  55078. }(this, (function (moment) { 'use strict';
  55079. //! moment.js locale configuration
  55080. /*jshint -W100*/
  55081. var si = moment.defineLocale('si', {
  55082. months: 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split(
  55083. '_'
  55084. ),
  55085. monthsShort: 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split(
  55086. '_'
  55087. ),
  55088. weekdays: 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split(
  55089. '_'
  55090. ),
  55091. weekdaysShort: 'ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන'.split('_'),
  55092. weekdaysMin: 'ඉ_ස_අ_බ_බ්‍ර_සි_සෙ'.split('_'),
  55093. weekdaysParseExact: true,
  55094. longDateFormat: {
  55095. LT: 'a h:mm',
  55096. LTS: 'a h:mm:ss',
  55097. L: 'YYYY/MM/DD',
  55098. LL: 'YYYY MMMM D',
  55099. LLL: 'YYYY MMMM D, a h:mm',
  55100. LLLL: 'YYYY MMMM D [වැනි] dddd, a h:mm:ss',
  55101. },
  55102. calendar: {
  55103. sameDay: '[අද] LT[ට]',
  55104. nextDay: '[හෙට] LT[ට]',
  55105. nextWeek: 'dddd LT[ට]',
  55106. lastDay: '[ඊයේ] LT[ට]',
  55107. lastWeek: '[පසුගිය] dddd LT[ට]',
  55108. sameElse: 'L',
  55109. },
  55110. relativeTime: {
  55111. future: '%sකින්',
  55112. past: '%sකට පෙර',
  55113. s: 'තත්පර කිහිපය',
  55114. ss: 'තත්පර %d',
  55115. m: 'මිනිත්තුව',
  55116. mm: 'මිනිත්තු %d',
  55117. h: 'පැය',
  55118. hh: 'පැය %d',
  55119. d: 'දිනය',
  55120. dd: 'දින %d',
  55121. M: 'මාසය',
  55122. MM: 'මාස %d',
  55123. y: 'වසර',
  55124. yy: 'වසර %d',
  55125. },
  55126. dayOfMonthOrdinalParse: /\d{1,2} වැනි/,
  55127. ordinal: function (number) {
  55128. return number + ' වැනි';
  55129. },
  55130. meridiemParse: /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,
  55131. isPM: function (input) {
  55132. return input === 'ප.ව.' || input === 'පස් වරු';
  55133. },
  55134. meridiem: function (hours, minutes, isLower) {
  55135. if (hours > 11) {
  55136. return isLower ? 'ප.ව.' : 'පස් වරු';
  55137. } else {
  55138. return isLower ? 'පෙ.ව.' : 'පෙර වරු';
  55139. }
  55140. },
  55141. });
  55142. return si;
  55143. })));
  55144. /***/ }),
  55145. /***/ 64249:
  55146. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  55147. //! moment.js locale configuration
  55148. //! locale : Slovak [sk]
  55149. //! author : Martin Minka : https://github.com/k2s
  55150. //! based on work of petrbela : https://github.com/petrbela
  55151. ;(function (global, factory) {
  55152. true ? factory(__webpack_require__(30381)) :
  55153. 0
  55154. }(this, (function (moment) { 'use strict';
  55155. //! moment.js locale configuration
  55156. var months = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split(
  55157. '_'
  55158. ),
  55159. monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');
  55160. function plural(n) {
  55161. return n > 1 && n < 5;
  55162. }
  55163. function translate(number, withoutSuffix, key, isFuture) {
  55164. var result = number + ' ';
  55165. switch (key) {
  55166. case 's': // a few seconds / in a few seconds / a few seconds ago
  55167. return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami';
  55168. case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
  55169. if (withoutSuffix || isFuture) {
  55170. return result + (plural(number) ? 'sekundy' : 'sekúnd');
  55171. } else {
  55172. return result + 'sekundami';
  55173. }
  55174. case 'm': // a minute / in a minute / a minute ago
  55175. return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou';
  55176. case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
  55177. if (withoutSuffix || isFuture) {
  55178. return result + (plural(number) ? 'minúty' : 'minút');
  55179. } else {
  55180. return result + 'minútami';
  55181. }
  55182. case 'h': // an hour / in an hour / an hour ago
  55183. return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';
  55184. case 'hh': // 9 hours / in 9 hours / 9 hours ago
  55185. if (withoutSuffix || isFuture) {
  55186. return result + (plural(number) ? 'hodiny' : 'hodín');
  55187. } else {
  55188. return result + 'hodinami';
  55189. }
  55190. case 'd': // a day / in a day / a day ago
  55191. return withoutSuffix || isFuture ? 'deň' : 'dňom';
  55192. case 'dd': // 9 days / in 9 days / 9 days ago
  55193. if (withoutSuffix || isFuture) {
  55194. return result + (plural(number) ? 'dni' : 'dní');
  55195. } else {
  55196. return result + 'dňami';
  55197. }
  55198. case 'M': // a month / in a month / a month ago
  55199. return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom';
  55200. case 'MM': // 9 months / in 9 months / 9 months ago
  55201. if (withoutSuffix || isFuture) {
  55202. return result + (plural(number) ? 'mesiace' : 'mesiacov');
  55203. } else {
  55204. return result + 'mesiacmi';
  55205. }
  55206. case 'y': // a year / in a year / a year ago
  55207. return withoutSuffix || isFuture ? 'rok' : 'rokom';
  55208. case 'yy': // 9 years / in 9 years / 9 years ago
  55209. if (withoutSuffix || isFuture) {
  55210. return result + (plural(number) ? 'roky' : 'rokov');
  55211. } else {
  55212. return result + 'rokmi';
  55213. }
  55214. }
  55215. }
  55216. var sk = moment.defineLocale('sk', {
  55217. months: months,
  55218. monthsShort: monthsShort,
  55219. weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),
  55220. weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'),
  55221. weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'),
  55222. longDateFormat: {
  55223. LT: 'H:mm',
  55224. LTS: 'H:mm:ss',
  55225. L: 'DD.MM.YYYY',
  55226. LL: 'D. MMMM YYYY',
  55227. LLL: 'D. MMMM YYYY H:mm',
  55228. LLLL: 'dddd D. MMMM YYYY H:mm',
  55229. },
  55230. calendar: {
  55231. sameDay: '[dnes o] LT',
  55232. nextDay: '[zajtra o] LT',
  55233. nextWeek: function () {
  55234. switch (this.day()) {
  55235. case 0:
  55236. return '[v nedeľu o] LT';
  55237. case 1:
  55238. case 2:
  55239. return '[v] dddd [o] LT';
  55240. case 3:
  55241. return '[v stredu o] LT';
  55242. case 4:
  55243. return '[vo štvrtok o] LT';
  55244. case 5:
  55245. return '[v piatok o] LT';
  55246. case 6:
  55247. return '[v sobotu o] LT';
  55248. }
  55249. },
  55250. lastDay: '[včera o] LT',
  55251. lastWeek: function () {
  55252. switch (this.day()) {
  55253. case 0:
  55254. return '[minulú nedeľu o] LT';
  55255. case 1:
  55256. case 2:
  55257. return '[minulý] dddd [o] LT';
  55258. case 3:
  55259. return '[minulú stredu o] LT';
  55260. case 4:
  55261. case 5:
  55262. return '[minulý] dddd [o] LT';
  55263. case 6:
  55264. return '[minulú sobotu o] LT';
  55265. }
  55266. },
  55267. sameElse: 'L',
  55268. },
  55269. relativeTime: {
  55270. future: 'za %s',
  55271. past: 'pred %s',
  55272. s: translate,
  55273. ss: translate,
  55274. m: translate,
  55275. mm: translate,
  55276. h: translate,
  55277. hh: translate,
  55278. d: translate,
  55279. dd: translate,
  55280. M: translate,
  55281. MM: translate,
  55282. y: translate,
  55283. yy: translate,
  55284. },
  55285. dayOfMonthOrdinalParse: /\d{1,2}\./,
  55286. ordinal: '%d.',
  55287. week: {
  55288. dow: 1, // Monday is the first day of the week.
  55289. doy: 4, // The week that contains Jan 4th is the first week of the year.
  55290. },
  55291. });
  55292. return sk;
  55293. })));
  55294. /***/ }),
  55295. /***/ 14985:
  55296. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  55297. //! moment.js locale configuration
  55298. //! locale : Slovenian [sl]
  55299. //! author : Robert Sedovšek : https://github.com/sedovsek
  55300. ;(function (global, factory) {
  55301. true ? factory(__webpack_require__(30381)) :
  55302. 0
  55303. }(this, (function (moment) { 'use strict';
  55304. //! moment.js locale configuration
  55305. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  55306. var result = number + ' ';
  55307. switch (key) {
  55308. case 's':
  55309. return withoutSuffix || isFuture
  55310. ? 'nekaj sekund'
  55311. : 'nekaj sekundami';
  55312. case 'ss':
  55313. if (number === 1) {
  55314. result += withoutSuffix ? 'sekundo' : 'sekundi';
  55315. } else if (number === 2) {
  55316. result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';
  55317. } else if (number < 5) {
  55318. result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';
  55319. } else {
  55320. result += 'sekund';
  55321. }
  55322. return result;
  55323. case 'm':
  55324. return withoutSuffix ? 'ena minuta' : 'eno minuto';
  55325. case 'mm':
  55326. if (number === 1) {
  55327. result += withoutSuffix ? 'minuta' : 'minuto';
  55328. } else if (number === 2) {
  55329. result += withoutSuffix || isFuture ? 'minuti' : 'minutama';
  55330. } else if (number < 5) {
  55331. result += withoutSuffix || isFuture ? 'minute' : 'minutami';
  55332. } else {
  55333. result += withoutSuffix || isFuture ? 'minut' : 'minutami';
  55334. }
  55335. return result;
  55336. case 'h':
  55337. return withoutSuffix ? 'ena ura' : 'eno uro';
  55338. case 'hh':
  55339. if (number === 1) {
  55340. result += withoutSuffix ? 'ura' : 'uro';
  55341. } else if (number === 2) {
  55342. result += withoutSuffix || isFuture ? 'uri' : 'urama';
  55343. } else if (number < 5) {
  55344. result += withoutSuffix || isFuture ? 'ure' : 'urami';
  55345. } else {
  55346. result += withoutSuffix || isFuture ? 'ur' : 'urami';
  55347. }
  55348. return result;
  55349. case 'd':
  55350. return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';
  55351. case 'dd':
  55352. if (number === 1) {
  55353. result += withoutSuffix || isFuture ? 'dan' : 'dnem';
  55354. } else if (number === 2) {
  55355. result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';
  55356. } else {
  55357. result += withoutSuffix || isFuture ? 'dni' : 'dnevi';
  55358. }
  55359. return result;
  55360. case 'M':
  55361. return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';
  55362. case 'MM':
  55363. if (number === 1) {
  55364. result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';
  55365. } else if (number === 2) {
  55366. result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';
  55367. } else if (number < 5) {
  55368. result += withoutSuffix || isFuture ? 'mesece' : 'meseci';
  55369. } else {
  55370. result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';
  55371. }
  55372. return result;
  55373. case 'y':
  55374. return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';
  55375. case 'yy':
  55376. if (number === 1) {
  55377. result += withoutSuffix || isFuture ? 'leto' : 'letom';
  55378. } else if (number === 2) {
  55379. result += withoutSuffix || isFuture ? 'leti' : 'letoma';
  55380. } else if (number < 5) {
  55381. result += withoutSuffix || isFuture ? 'leta' : 'leti';
  55382. } else {
  55383. result += withoutSuffix || isFuture ? 'let' : 'leti';
  55384. }
  55385. return result;
  55386. }
  55387. }
  55388. var sl = moment.defineLocale('sl', {
  55389. months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split(
  55390. '_'
  55391. ),
  55392. monthsShort: 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split(
  55393. '_'
  55394. ),
  55395. monthsParseExact: true,
  55396. weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),
  55397. weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),
  55398. weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'),
  55399. weekdaysParseExact: true,
  55400. longDateFormat: {
  55401. LT: 'H:mm',
  55402. LTS: 'H:mm:ss',
  55403. L: 'DD. MM. YYYY',
  55404. LL: 'D. MMMM YYYY',
  55405. LLL: 'D. MMMM YYYY H:mm',
  55406. LLLL: 'dddd, D. MMMM YYYY H:mm',
  55407. },
  55408. calendar: {
  55409. sameDay: '[danes ob] LT',
  55410. nextDay: '[jutri ob] LT',
  55411. nextWeek: function () {
  55412. switch (this.day()) {
  55413. case 0:
  55414. return '[v] [nedeljo] [ob] LT';
  55415. case 3:
  55416. return '[v] [sredo] [ob] LT';
  55417. case 6:
  55418. return '[v] [soboto] [ob] LT';
  55419. case 1:
  55420. case 2:
  55421. case 4:
  55422. case 5:
  55423. return '[v] dddd [ob] LT';
  55424. }
  55425. },
  55426. lastDay: '[včeraj ob] LT',
  55427. lastWeek: function () {
  55428. switch (this.day()) {
  55429. case 0:
  55430. return '[prejšnjo] [nedeljo] [ob] LT';
  55431. case 3:
  55432. return '[prejšnjo] [sredo] [ob] LT';
  55433. case 6:
  55434. return '[prejšnjo] [soboto] [ob] LT';
  55435. case 1:
  55436. case 2:
  55437. case 4:
  55438. case 5:
  55439. return '[prejšnji] dddd [ob] LT';
  55440. }
  55441. },
  55442. sameElse: 'L',
  55443. },
  55444. relativeTime: {
  55445. future: 'čez %s',
  55446. past: 'pred %s',
  55447. s: processRelativeTime,
  55448. ss: processRelativeTime,
  55449. m: processRelativeTime,
  55450. mm: processRelativeTime,
  55451. h: processRelativeTime,
  55452. hh: processRelativeTime,
  55453. d: processRelativeTime,
  55454. dd: processRelativeTime,
  55455. M: processRelativeTime,
  55456. MM: processRelativeTime,
  55457. y: processRelativeTime,
  55458. yy: processRelativeTime,
  55459. },
  55460. dayOfMonthOrdinalParse: /\d{1,2}\./,
  55461. ordinal: '%d.',
  55462. week: {
  55463. dow: 1, // Monday is the first day of the week.
  55464. doy: 7, // The week that contains Jan 7th is the first week of the year.
  55465. },
  55466. });
  55467. return sl;
  55468. })));
  55469. /***/ }),
  55470. /***/ 51104:
  55471. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  55472. //! moment.js locale configuration
  55473. //! locale : Albanian [sq]
  55474. //! author : Flakërim Ismani : https://github.com/flakerimi
  55475. //! author : Menelion Elensúle : https://github.com/Oire
  55476. //! author : Oerd Cukalla : https://github.com/oerd
  55477. ;(function (global, factory) {
  55478. true ? factory(__webpack_require__(30381)) :
  55479. 0
  55480. }(this, (function (moment) { 'use strict';
  55481. //! moment.js locale configuration
  55482. var sq = moment.defineLocale('sq', {
  55483. months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split(
  55484. '_'
  55485. ),
  55486. monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),
  55487. weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split(
  55488. '_'
  55489. ),
  55490. weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),
  55491. weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'),
  55492. weekdaysParseExact: true,
  55493. meridiemParse: /PD|MD/,
  55494. isPM: function (input) {
  55495. return input.charAt(0) === 'M';
  55496. },
  55497. meridiem: function (hours, minutes, isLower) {
  55498. return hours < 12 ? 'PD' : 'MD';
  55499. },
  55500. longDateFormat: {
  55501. LT: 'HH:mm',
  55502. LTS: 'HH:mm:ss',
  55503. L: 'DD/MM/YYYY',
  55504. LL: 'D MMMM YYYY',
  55505. LLL: 'D MMMM YYYY HH:mm',
  55506. LLLL: 'dddd, D MMMM YYYY HH:mm',
  55507. },
  55508. calendar: {
  55509. sameDay: '[Sot në] LT',
  55510. nextDay: '[Nesër në] LT',
  55511. nextWeek: 'dddd [në] LT',
  55512. lastDay: '[Dje në] LT',
  55513. lastWeek: 'dddd [e kaluar në] LT',
  55514. sameElse: 'L',
  55515. },
  55516. relativeTime: {
  55517. future: 'në %s',
  55518. past: '%s më parë',
  55519. s: 'disa sekonda',
  55520. ss: '%d sekonda',
  55521. m: 'një minutë',
  55522. mm: '%d minuta',
  55523. h: 'një orë',
  55524. hh: '%d orë',
  55525. d: 'një ditë',
  55526. dd: '%d ditë',
  55527. M: 'një muaj',
  55528. MM: '%d muaj',
  55529. y: 'një vit',
  55530. yy: '%d vite',
  55531. },
  55532. dayOfMonthOrdinalParse: /\d{1,2}\./,
  55533. ordinal: '%d.',
  55534. week: {
  55535. dow: 1, // Monday is the first day of the week.
  55536. doy: 4, // The week that contains Jan 4th is the first week of the year.
  55537. },
  55538. });
  55539. return sq;
  55540. })));
  55541. /***/ }),
  55542. /***/ 79915:
  55543. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  55544. //! moment.js locale configuration
  55545. //! locale : Serbian Cyrillic [sr-cyrl]
  55546. //! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j
  55547. //! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic
  55548. ;(function (global, factory) {
  55549. true ? factory(__webpack_require__(30381)) :
  55550. 0
  55551. }(this, (function (moment) { 'use strict';
  55552. //! moment.js locale configuration
  55553. var translator = {
  55554. words: {
  55555. //Different grammatical cases
  55556. ss: ['секунда', 'секунде', 'секунди'],
  55557. m: ['један минут', 'једне минуте'],
  55558. mm: ['минут', 'минуте', 'минута'],
  55559. h: ['један сат', 'једног сата'],
  55560. hh: ['сат', 'сата', 'сати'],
  55561. dd: ['дан', 'дана', 'дана'],
  55562. MM: ['месец', 'месеца', 'месеци'],
  55563. yy: ['година', 'године', 'година'],
  55564. },
  55565. correctGrammaticalCase: function (number, wordKey) {
  55566. return number === 1
  55567. ? wordKey[0]
  55568. : number >= 2 && number <= 4
  55569. ? wordKey[1]
  55570. : wordKey[2];
  55571. },
  55572. translate: function (number, withoutSuffix, key) {
  55573. var wordKey = translator.words[key];
  55574. if (key.length === 1) {
  55575. return withoutSuffix ? wordKey[0] : wordKey[1];
  55576. } else {
  55577. return (
  55578. number +
  55579. ' ' +
  55580. translator.correctGrammaticalCase(number, wordKey)
  55581. );
  55582. }
  55583. },
  55584. };
  55585. var srCyrl = moment.defineLocale('sr-cyrl', {
  55586. months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split(
  55587. '_'
  55588. ),
  55589. monthsShort: 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split(
  55590. '_'
  55591. ),
  55592. monthsParseExact: true,
  55593. weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),
  55594. weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),
  55595. weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),
  55596. weekdaysParseExact: true,
  55597. longDateFormat: {
  55598. LT: 'H:mm',
  55599. LTS: 'H:mm:ss',
  55600. L: 'D. M. YYYY.',
  55601. LL: 'D. MMMM YYYY.',
  55602. LLL: 'D. MMMM YYYY. H:mm',
  55603. LLLL: 'dddd, D. MMMM YYYY. H:mm',
  55604. },
  55605. calendar: {
  55606. sameDay: '[данас у] LT',
  55607. nextDay: '[сутра у] LT',
  55608. nextWeek: function () {
  55609. switch (this.day()) {
  55610. case 0:
  55611. return '[у] [недељу] [у] LT';
  55612. case 3:
  55613. return '[у] [среду] [у] LT';
  55614. case 6:
  55615. return '[у] [суботу] [у] LT';
  55616. case 1:
  55617. case 2:
  55618. case 4:
  55619. case 5:
  55620. return '[у] dddd [у] LT';
  55621. }
  55622. },
  55623. lastDay: '[јуче у] LT',
  55624. lastWeek: function () {
  55625. var lastWeekDays = [
  55626. '[прошле] [недеље] [у] LT',
  55627. '[прошлог] [понедељка] [у] LT',
  55628. '[прошлог] [уторка] [у] LT',
  55629. '[прошле] [среде] [у] LT',
  55630. '[прошлог] [четвртка] [у] LT',
  55631. '[прошлог] [петка] [у] LT',
  55632. '[прошле] [суботе] [у] LT',
  55633. ];
  55634. return lastWeekDays[this.day()];
  55635. },
  55636. sameElse: 'L',
  55637. },
  55638. relativeTime: {
  55639. future: 'за %s',
  55640. past: 'пре %s',
  55641. s: 'неколико секунди',
  55642. ss: translator.translate,
  55643. m: translator.translate,
  55644. mm: translator.translate,
  55645. h: translator.translate,
  55646. hh: translator.translate,
  55647. d: 'дан',
  55648. dd: translator.translate,
  55649. M: 'месец',
  55650. MM: translator.translate,
  55651. y: 'годину',
  55652. yy: translator.translate,
  55653. },
  55654. dayOfMonthOrdinalParse: /\d{1,2}\./,
  55655. ordinal: '%d.',
  55656. week: {
  55657. dow: 1, // Monday is the first day of the week.
  55658. doy: 7, // The week that contains Jan 1st is the first week of the year.
  55659. },
  55660. });
  55661. return srCyrl;
  55662. })));
  55663. /***/ }),
  55664. /***/ 49131:
  55665. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  55666. //! moment.js locale configuration
  55667. //! locale : Serbian [sr]
  55668. //! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j
  55669. //! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic
  55670. ;(function (global, factory) {
  55671. true ? factory(__webpack_require__(30381)) :
  55672. 0
  55673. }(this, (function (moment) { 'use strict';
  55674. //! moment.js locale configuration
  55675. var translator = {
  55676. words: {
  55677. //Different grammatical cases
  55678. ss: ['sekunda', 'sekunde', 'sekundi'],
  55679. m: ['jedan minut', 'jedne minute'],
  55680. mm: ['minut', 'minute', 'minuta'],
  55681. h: ['jedan sat', 'jednog sata'],
  55682. hh: ['sat', 'sata', 'sati'],
  55683. dd: ['dan', 'dana', 'dana'],
  55684. MM: ['mesec', 'meseca', 'meseci'],
  55685. yy: ['godina', 'godine', 'godina'],
  55686. },
  55687. correctGrammaticalCase: function (number, wordKey) {
  55688. return number === 1
  55689. ? wordKey[0]
  55690. : number >= 2 && number <= 4
  55691. ? wordKey[1]
  55692. : wordKey[2];
  55693. },
  55694. translate: function (number, withoutSuffix, key) {
  55695. var wordKey = translator.words[key];
  55696. if (key.length === 1) {
  55697. return withoutSuffix ? wordKey[0] : wordKey[1];
  55698. } else {
  55699. return (
  55700. number +
  55701. ' ' +
  55702. translator.correctGrammaticalCase(number, wordKey)
  55703. );
  55704. }
  55705. },
  55706. };
  55707. var sr = moment.defineLocale('sr', {
  55708. months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(
  55709. '_'
  55710. ),
  55711. monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split(
  55712. '_'
  55713. ),
  55714. monthsParseExact: true,
  55715. weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split(
  55716. '_'
  55717. ),
  55718. weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),
  55719. weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
  55720. weekdaysParseExact: true,
  55721. longDateFormat: {
  55722. LT: 'H:mm',
  55723. LTS: 'H:mm:ss',
  55724. L: 'D. M. YYYY.',
  55725. LL: 'D. MMMM YYYY.',
  55726. LLL: 'D. MMMM YYYY. H:mm',
  55727. LLLL: 'dddd, D. MMMM YYYY. H:mm',
  55728. },
  55729. calendar: {
  55730. sameDay: '[danas u] LT',
  55731. nextDay: '[sutra u] LT',
  55732. nextWeek: function () {
  55733. switch (this.day()) {
  55734. case 0:
  55735. return '[u] [nedelju] [u] LT';
  55736. case 3:
  55737. return '[u] [sredu] [u] LT';
  55738. case 6:
  55739. return '[u] [subotu] [u] LT';
  55740. case 1:
  55741. case 2:
  55742. case 4:
  55743. case 5:
  55744. return '[u] dddd [u] LT';
  55745. }
  55746. },
  55747. lastDay: '[juče u] LT',
  55748. lastWeek: function () {
  55749. var lastWeekDays = [
  55750. '[prošle] [nedelje] [u] LT',
  55751. '[prošlog] [ponedeljka] [u] LT',
  55752. '[prošlog] [utorka] [u] LT',
  55753. '[prošle] [srede] [u] LT',
  55754. '[prošlog] [četvrtka] [u] LT',
  55755. '[prošlog] [petka] [u] LT',
  55756. '[prošle] [subote] [u] LT',
  55757. ];
  55758. return lastWeekDays[this.day()];
  55759. },
  55760. sameElse: 'L',
  55761. },
  55762. relativeTime: {
  55763. future: 'za %s',
  55764. past: 'pre %s',
  55765. s: 'nekoliko sekundi',
  55766. ss: translator.translate,
  55767. m: translator.translate,
  55768. mm: translator.translate,
  55769. h: translator.translate,
  55770. hh: translator.translate,
  55771. d: 'dan',
  55772. dd: translator.translate,
  55773. M: 'mesec',
  55774. MM: translator.translate,
  55775. y: 'godinu',
  55776. yy: translator.translate,
  55777. },
  55778. dayOfMonthOrdinalParse: /\d{1,2}\./,
  55779. ordinal: '%d.',
  55780. week: {
  55781. dow: 1, // Monday is the first day of the week.
  55782. doy: 7, // The week that contains Jan 7th is the first week of the year.
  55783. },
  55784. });
  55785. return sr;
  55786. })));
  55787. /***/ }),
  55788. /***/ 85893:
  55789. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  55790. //! moment.js locale configuration
  55791. //! locale : siSwati [ss]
  55792. //! author : Nicolai Davies<mail@nicolai.io> : https://github.com/nicolaidavies
  55793. ;(function (global, factory) {
  55794. true ? factory(__webpack_require__(30381)) :
  55795. 0
  55796. }(this, (function (moment) { 'use strict';
  55797. //! moment.js locale configuration
  55798. var ss = moment.defineLocale('ss', {
  55799. months: "Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split(
  55800. '_'
  55801. ),
  55802. monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),
  55803. weekdays: 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split(
  55804. '_'
  55805. ),
  55806. weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),
  55807. weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),
  55808. weekdaysParseExact: true,
  55809. longDateFormat: {
  55810. LT: 'h:mm A',
  55811. LTS: 'h:mm:ss A',
  55812. L: 'DD/MM/YYYY',
  55813. LL: 'D MMMM YYYY',
  55814. LLL: 'D MMMM YYYY h:mm A',
  55815. LLLL: 'dddd, D MMMM YYYY h:mm A',
  55816. },
  55817. calendar: {
  55818. sameDay: '[Namuhla nga] LT',
  55819. nextDay: '[Kusasa nga] LT',
  55820. nextWeek: 'dddd [nga] LT',
  55821. lastDay: '[Itolo nga] LT',
  55822. lastWeek: 'dddd [leliphelile] [nga] LT',
  55823. sameElse: 'L',
  55824. },
  55825. relativeTime: {
  55826. future: 'nga %s',
  55827. past: 'wenteka nga %s',
  55828. s: 'emizuzwana lomcane',
  55829. ss: '%d mzuzwana',
  55830. m: 'umzuzu',
  55831. mm: '%d emizuzu',
  55832. h: 'lihora',
  55833. hh: '%d emahora',
  55834. d: 'lilanga',
  55835. dd: '%d emalanga',
  55836. M: 'inyanga',
  55837. MM: '%d tinyanga',
  55838. y: 'umnyaka',
  55839. yy: '%d iminyaka',
  55840. },
  55841. meridiemParse: /ekuseni|emini|entsambama|ebusuku/,
  55842. meridiem: function (hours, minutes, isLower) {
  55843. if (hours < 11) {
  55844. return 'ekuseni';
  55845. } else if (hours < 15) {
  55846. return 'emini';
  55847. } else if (hours < 19) {
  55848. return 'entsambama';
  55849. } else {
  55850. return 'ebusuku';
  55851. }
  55852. },
  55853. meridiemHour: function (hour, meridiem) {
  55854. if (hour === 12) {
  55855. hour = 0;
  55856. }
  55857. if (meridiem === 'ekuseni') {
  55858. return hour;
  55859. } else if (meridiem === 'emini') {
  55860. return hour >= 11 ? hour : hour + 12;
  55861. } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {
  55862. if (hour === 0) {
  55863. return 0;
  55864. }
  55865. return hour + 12;
  55866. }
  55867. },
  55868. dayOfMonthOrdinalParse: /\d{1,2}/,
  55869. ordinal: '%d',
  55870. week: {
  55871. dow: 1, // Monday is the first day of the week.
  55872. doy: 4, // The week that contains Jan 4th is the first week of the year.
  55873. },
  55874. });
  55875. return ss;
  55876. })));
  55877. /***/ }),
  55878. /***/ 98760:
  55879. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  55880. //! moment.js locale configuration
  55881. //! locale : Swedish [sv]
  55882. //! author : Jens Alm : https://github.com/ulmus
  55883. ;(function (global, factory) {
  55884. true ? factory(__webpack_require__(30381)) :
  55885. 0
  55886. }(this, (function (moment) { 'use strict';
  55887. //! moment.js locale configuration
  55888. var sv = moment.defineLocale('sv', {
  55889. months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split(
  55890. '_'
  55891. ),
  55892. monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
  55893. weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),
  55894. weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),
  55895. weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),
  55896. longDateFormat: {
  55897. LT: 'HH:mm',
  55898. LTS: 'HH:mm:ss',
  55899. L: 'YYYY-MM-DD',
  55900. LL: 'D MMMM YYYY',
  55901. LLL: 'D MMMM YYYY [kl.] HH:mm',
  55902. LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',
  55903. lll: 'D MMM YYYY HH:mm',
  55904. llll: 'ddd D MMM YYYY HH:mm',
  55905. },
  55906. calendar: {
  55907. sameDay: '[Idag] LT',
  55908. nextDay: '[Imorgon] LT',
  55909. lastDay: '[Igår] LT',
  55910. nextWeek: '[På] dddd LT',
  55911. lastWeek: '[I] dddd[s] LT',
  55912. sameElse: 'L',
  55913. },
  55914. relativeTime: {
  55915. future: 'om %s',
  55916. past: 'för %s sedan',
  55917. s: 'några sekunder',
  55918. ss: '%d sekunder',
  55919. m: 'en minut',
  55920. mm: '%d minuter',
  55921. h: 'en timme',
  55922. hh: '%d timmar',
  55923. d: 'en dag',
  55924. dd: '%d dagar',
  55925. M: 'en månad',
  55926. MM: '%d månader',
  55927. y: 'ett år',
  55928. yy: '%d år',
  55929. },
  55930. dayOfMonthOrdinalParse: /\d{1,2}(\:e|\:a)/,
  55931. ordinal: function (number) {
  55932. var b = number % 10,
  55933. output =
  55934. ~~((number % 100) / 10) === 1
  55935. ? ':e'
  55936. : b === 1
  55937. ? ':a'
  55938. : b === 2
  55939. ? ':a'
  55940. : b === 3
  55941. ? ':e'
  55942. : ':e';
  55943. return number + output;
  55944. },
  55945. week: {
  55946. dow: 1, // Monday is the first day of the week.
  55947. doy: 4, // The week that contains Jan 4th is the first week of the year.
  55948. },
  55949. });
  55950. return sv;
  55951. })));
  55952. /***/ }),
  55953. /***/ 91172:
  55954. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  55955. //! moment.js locale configuration
  55956. //! locale : Swahili [sw]
  55957. //! author : Fahad Kassim : https://github.com/fadsel
  55958. ;(function (global, factory) {
  55959. true ? factory(__webpack_require__(30381)) :
  55960. 0
  55961. }(this, (function (moment) { 'use strict';
  55962. //! moment.js locale configuration
  55963. var sw = moment.defineLocale('sw', {
  55964. months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split(
  55965. '_'
  55966. ),
  55967. monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),
  55968. weekdays: 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split(
  55969. '_'
  55970. ),
  55971. weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),
  55972. weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),
  55973. weekdaysParseExact: true,
  55974. longDateFormat: {
  55975. LT: 'hh:mm A',
  55976. LTS: 'HH:mm:ss',
  55977. L: 'DD.MM.YYYY',
  55978. LL: 'D MMMM YYYY',
  55979. LLL: 'D MMMM YYYY HH:mm',
  55980. LLLL: 'dddd, D MMMM YYYY HH:mm',
  55981. },
  55982. calendar: {
  55983. sameDay: '[leo saa] LT',
  55984. nextDay: '[kesho saa] LT',
  55985. nextWeek: '[wiki ijayo] dddd [saat] LT',
  55986. lastDay: '[jana] LT',
  55987. lastWeek: '[wiki iliyopita] dddd [saat] LT',
  55988. sameElse: 'L',
  55989. },
  55990. relativeTime: {
  55991. future: '%s baadaye',
  55992. past: 'tokea %s',
  55993. s: 'hivi punde',
  55994. ss: 'sekunde %d',
  55995. m: 'dakika moja',
  55996. mm: 'dakika %d',
  55997. h: 'saa limoja',
  55998. hh: 'masaa %d',
  55999. d: 'siku moja',
  56000. dd: 'siku %d',
  56001. M: 'mwezi mmoja',
  56002. MM: 'miezi %d',
  56003. y: 'mwaka mmoja',
  56004. yy: 'miaka %d',
  56005. },
  56006. week: {
  56007. dow: 1, // Monday is the first day of the week.
  56008. doy: 7, // The week that contains Jan 7th is the first week of the year.
  56009. },
  56010. });
  56011. return sw;
  56012. })));
  56013. /***/ }),
  56014. /***/ 27333:
  56015. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  56016. //! moment.js locale configuration
  56017. //! locale : Tamil [ta]
  56018. //! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404
  56019. ;(function (global, factory) {
  56020. true ? factory(__webpack_require__(30381)) :
  56021. 0
  56022. }(this, (function (moment) { 'use strict';
  56023. //! moment.js locale configuration
  56024. var symbolMap = {
  56025. 1: '௧',
  56026. 2: '௨',
  56027. 3: '௩',
  56028. 4: '௪',
  56029. 5: '௫',
  56030. 6: '௬',
  56031. 7: '௭',
  56032. 8: '௮',
  56033. 9: '௯',
  56034. 0: '௦',
  56035. },
  56036. numberMap = {
  56037. '௧': '1',
  56038. '௨': '2',
  56039. '௩': '3',
  56040. '௪': '4',
  56041. '௫': '5',
  56042. '௬': '6',
  56043. '௭': '7',
  56044. '௮': '8',
  56045. '௯': '9',
  56046. '௦': '0',
  56047. };
  56048. var ta = moment.defineLocale('ta', {
  56049. months: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(
  56050. '_'
  56051. ),
  56052. monthsShort: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(
  56053. '_'
  56054. ),
  56055. weekdays: 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split(
  56056. '_'
  56057. ),
  56058. weekdaysShort: 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split(
  56059. '_'
  56060. ),
  56061. weekdaysMin: 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),
  56062. longDateFormat: {
  56063. LT: 'HH:mm',
  56064. LTS: 'HH:mm:ss',
  56065. L: 'DD/MM/YYYY',
  56066. LL: 'D MMMM YYYY',
  56067. LLL: 'D MMMM YYYY, HH:mm',
  56068. LLLL: 'dddd, D MMMM YYYY, HH:mm',
  56069. },
  56070. calendar: {
  56071. sameDay: '[இன்று] LT',
  56072. nextDay: '[நாளை] LT',
  56073. nextWeek: 'dddd, LT',
  56074. lastDay: '[நேற்று] LT',
  56075. lastWeek: '[கடந்த வாரம்] dddd, LT',
  56076. sameElse: 'L',
  56077. },
  56078. relativeTime: {
  56079. future: '%s இல்',
  56080. past: '%s முன்',
  56081. s: 'ஒரு சில விநாடிகள்',
  56082. ss: '%d விநாடிகள்',
  56083. m: 'ஒரு நிமிடம்',
  56084. mm: '%d நிமிடங்கள்',
  56085. h: 'ஒரு மணி நேரம்',
  56086. hh: '%d மணி நேரம்',
  56087. d: 'ஒரு நாள்',
  56088. dd: '%d நாட்கள்',
  56089. M: 'ஒரு மாதம்',
  56090. MM: '%d மாதங்கள்',
  56091. y: 'ஒரு வருடம்',
  56092. yy: '%d ஆண்டுகள்',
  56093. },
  56094. dayOfMonthOrdinalParse: /\d{1,2}வது/,
  56095. ordinal: function (number) {
  56096. return number + 'வது';
  56097. },
  56098. preparse: function (string) {
  56099. return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {
  56100. return numberMap[match];
  56101. });
  56102. },
  56103. postformat: function (string) {
  56104. return string.replace(/\d/g, function (match) {
  56105. return symbolMap[match];
  56106. });
  56107. },
  56108. // refer http://ta.wikipedia.org/s/1er1
  56109. meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,
  56110. meridiem: function (hour, minute, isLower) {
  56111. if (hour < 2) {
  56112. return ' யாமம்';
  56113. } else if (hour < 6) {
  56114. return ' வைகறை'; // வைகறை
  56115. } else if (hour < 10) {
  56116. return ' காலை'; // காலை
  56117. } else if (hour < 14) {
  56118. return ' நண்பகல்'; // நண்பகல்
  56119. } else if (hour < 18) {
  56120. return ' எற்பாடு'; // எற்பாடு
  56121. } else if (hour < 22) {
  56122. return ' மாலை'; // மாலை
  56123. } else {
  56124. return ' யாமம்';
  56125. }
  56126. },
  56127. meridiemHour: function (hour, meridiem) {
  56128. if (hour === 12) {
  56129. hour = 0;
  56130. }
  56131. if (meridiem === 'யாமம்') {
  56132. return hour < 2 ? hour : hour + 12;
  56133. } else if (meridiem === 'வைகறை' || meridiem === 'காலை') {
  56134. return hour;
  56135. } else if (meridiem === 'நண்பகல்') {
  56136. return hour >= 10 ? hour : hour + 12;
  56137. } else {
  56138. return hour + 12;
  56139. }
  56140. },
  56141. week: {
  56142. dow: 0, // Sunday is the first day of the week.
  56143. doy: 6, // The week that contains Jan 6th is the first week of the year.
  56144. },
  56145. });
  56146. return ta;
  56147. })));
  56148. /***/ }),
  56149. /***/ 23110:
  56150. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  56151. //! moment.js locale configuration
  56152. //! locale : Telugu [te]
  56153. //! author : Krishna Chaitanya Thota : https://github.com/kcthota
  56154. ;(function (global, factory) {
  56155. true ? factory(__webpack_require__(30381)) :
  56156. 0
  56157. }(this, (function (moment) { 'use strict';
  56158. //! moment.js locale configuration
  56159. var te = moment.defineLocale('te', {
  56160. months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split(
  56161. '_'
  56162. ),
  56163. monthsShort: 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split(
  56164. '_'
  56165. ),
  56166. monthsParseExact: true,
  56167. weekdays: 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split(
  56168. '_'
  56169. ),
  56170. weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),
  56171. weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),
  56172. longDateFormat: {
  56173. LT: 'A h:mm',
  56174. LTS: 'A h:mm:ss',
  56175. L: 'DD/MM/YYYY',
  56176. LL: 'D MMMM YYYY',
  56177. LLL: 'D MMMM YYYY, A h:mm',
  56178. LLLL: 'dddd, D MMMM YYYY, A h:mm',
  56179. },
  56180. calendar: {
  56181. sameDay: '[నేడు] LT',
  56182. nextDay: '[రేపు] LT',
  56183. nextWeek: 'dddd, LT',
  56184. lastDay: '[నిన్న] LT',
  56185. lastWeek: '[గత] dddd, LT',
  56186. sameElse: 'L',
  56187. },
  56188. relativeTime: {
  56189. future: '%s లో',
  56190. past: '%s క్రితం',
  56191. s: 'కొన్ని క్షణాలు',
  56192. ss: '%d సెకన్లు',
  56193. m: 'ఒక నిమిషం',
  56194. mm: '%d నిమిషాలు',
  56195. h: 'ఒక గంట',
  56196. hh: '%d గంటలు',
  56197. d: 'ఒక రోజు',
  56198. dd: '%d రోజులు',
  56199. M: 'ఒక నెల',
  56200. MM: '%d నెలలు',
  56201. y: 'ఒక సంవత్సరం',
  56202. yy: '%d సంవత్సరాలు',
  56203. },
  56204. dayOfMonthOrdinalParse: /\d{1,2}వ/,
  56205. ordinal: '%dవ',
  56206. meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,
  56207. meridiemHour: function (hour, meridiem) {
  56208. if (hour === 12) {
  56209. hour = 0;
  56210. }
  56211. if (meridiem === 'రాత్రి') {
  56212. return hour < 4 ? hour : hour + 12;
  56213. } else if (meridiem === 'ఉదయం') {
  56214. return hour;
  56215. } else if (meridiem === 'మధ్యాహ్నం') {
  56216. return hour >= 10 ? hour : hour + 12;
  56217. } else if (meridiem === 'సాయంత్రం') {
  56218. return hour + 12;
  56219. }
  56220. },
  56221. meridiem: function (hour, minute, isLower) {
  56222. if (hour < 4) {
  56223. return 'రాత్రి';
  56224. } else if (hour < 10) {
  56225. return 'ఉదయం';
  56226. } else if (hour < 17) {
  56227. return 'మధ్యాహ్నం';
  56228. } else if (hour < 20) {
  56229. return 'సాయంత్రం';
  56230. } else {
  56231. return 'రాత్రి';
  56232. }
  56233. },
  56234. week: {
  56235. dow: 0, // Sunday is the first day of the week.
  56236. doy: 6, // The week that contains Jan 6th is the first week of the year.
  56237. },
  56238. });
  56239. return te;
  56240. })));
  56241. /***/ }),
  56242. /***/ 52095:
  56243. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  56244. //! moment.js locale configuration
  56245. //! locale : Tetun Dili (East Timor) [tet]
  56246. //! author : Joshua Brooks : https://github.com/joshbrooks
  56247. //! author : Onorio De J. Afonso : https://github.com/marobo
  56248. //! author : Sonia Simoes : https://github.com/soniasimoes
  56249. ;(function (global, factory) {
  56250. true ? factory(__webpack_require__(30381)) :
  56251. 0
  56252. }(this, (function (moment) { 'use strict';
  56253. //! moment.js locale configuration
  56254. var tet = moment.defineLocale('tet', {
  56255. months: 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split(
  56256. '_'
  56257. ),
  56258. monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),
  56259. weekdays: 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'),
  56260. weekdaysShort: 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'),
  56261. weekdaysMin: 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'),
  56262. longDateFormat: {
  56263. LT: 'HH:mm',
  56264. LTS: 'HH:mm:ss',
  56265. L: 'DD/MM/YYYY',
  56266. LL: 'D MMMM YYYY',
  56267. LLL: 'D MMMM YYYY HH:mm',
  56268. LLLL: 'dddd, D MMMM YYYY HH:mm',
  56269. },
  56270. calendar: {
  56271. sameDay: '[Ohin iha] LT',
  56272. nextDay: '[Aban iha] LT',
  56273. nextWeek: 'dddd [iha] LT',
  56274. lastDay: '[Horiseik iha] LT',
  56275. lastWeek: 'dddd [semana kotuk] [iha] LT',
  56276. sameElse: 'L',
  56277. },
  56278. relativeTime: {
  56279. future: 'iha %s',
  56280. past: '%s liuba',
  56281. s: 'segundu balun',
  56282. ss: 'segundu %d',
  56283. m: 'minutu ida',
  56284. mm: 'minutu %d',
  56285. h: 'oras ida',
  56286. hh: 'oras %d',
  56287. d: 'loron ida',
  56288. dd: 'loron %d',
  56289. M: 'fulan ida',
  56290. MM: 'fulan %d',
  56291. y: 'tinan ida',
  56292. yy: 'tinan %d',
  56293. },
  56294. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  56295. ordinal: function (number) {
  56296. var b = number % 10,
  56297. output =
  56298. ~~((number % 100) / 10) === 1
  56299. ? 'th'
  56300. : b === 1
  56301. ? 'st'
  56302. : b === 2
  56303. ? 'nd'
  56304. : b === 3
  56305. ? 'rd'
  56306. : 'th';
  56307. return number + output;
  56308. },
  56309. week: {
  56310. dow: 1, // Monday is the first day of the week.
  56311. doy: 4, // The week that contains Jan 4th is the first week of the year.
  56312. },
  56313. });
  56314. return tet;
  56315. })));
  56316. /***/ }),
  56317. /***/ 27321:
  56318. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  56319. //! moment.js locale configuration
  56320. //! locale : Tajik [tg]
  56321. //! author : Orif N. Jr. : https://github.com/orif-jr
  56322. ;(function (global, factory) {
  56323. true ? factory(__webpack_require__(30381)) :
  56324. 0
  56325. }(this, (function (moment) { 'use strict';
  56326. //! moment.js locale configuration
  56327. var suffixes = {
  56328. 0: '-ум',
  56329. 1: '-ум',
  56330. 2: '-юм',
  56331. 3: '-юм',
  56332. 4: '-ум',
  56333. 5: '-ум',
  56334. 6: '-ум',
  56335. 7: '-ум',
  56336. 8: '-ум',
  56337. 9: '-ум',
  56338. 10: '-ум',
  56339. 12: '-ум',
  56340. 13: '-ум',
  56341. 20: '-ум',
  56342. 30: '-юм',
  56343. 40: '-ум',
  56344. 50: '-ум',
  56345. 60: '-ум',
  56346. 70: '-ум',
  56347. 80: '-ум',
  56348. 90: '-ум',
  56349. 100: '-ум',
  56350. };
  56351. var tg = moment.defineLocale('tg', {
  56352. months: {
  56353. format: 'январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри'.split(
  56354. '_'
  56355. ),
  56356. standalone: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(
  56357. '_'
  56358. ),
  56359. },
  56360. monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),
  56361. weekdays: 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split(
  56362. '_'
  56363. ),
  56364. weekdaysShort: 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'),
  56365. weekdaysMin: 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'),
  56366. longDateFormat: {
  56367. LT: 'HH:mm',
  56368. LTS: 'HH:mm:ss',
  56369. L: 'DD.MM.YYYY',
  56370. LL: 'D MMMM YYYY',
  56371. LLL: 'D MMMM YYYY HH:mm',
  56372. LLLL: 'dddd, D MMMM YYYY HH:mm',
  56373. },
  56374. calendar: {
  56375. sameDay: '[Имрӯз соати] LT',
  56376. nextDay: '[Фардо соати] LT',
  56377. lastDay: '[Дирӯз соати] LT',
  56378. nextWeek: 'dddd[и] [ҳафтаи оянда соати] LT',
  56379. lastWeek: 'dddd[и] [ҳафтаи гузашта соати] LT',
  56380. sameElse: 'L',
  56381. },
  56382. relativeTime: {
  56383. future: 'баъди %s',
  56384. past: '%s пеш',
  56385. s: 'якчанд сония',
  56386. m: 'як дақиқа',
  56387. mm: '%d дақиқа',
  56388. h: 'як соат',
  56389. hh: '%d соат',
  56390. d: 'як рӯз',
  56391. dd: '%d рӯз',
  56392. M: 'як моҳ',
  56393. MM: '%d моҳ',
  56394. y: 'як сол',
  56395. yy: '%d сол',
  56396. },
  56397. meridiemParse: /шаб|субҳ|рӯз|бегоҳ/,
  56398. meridiemHour: function (hour, meridiem) {
  56399. if (hour === 12) {
  56400. hour = 0;
  56401. }
  56402. if (meridiem === 'шаб') {
  56403. return hour < 4 ? hour : hour + 12;
  56404. } else if (meridiem === 'субҳ') {
  56405. return hour;
  56406. } else if (meridiem === 'рӯз') {
  56407. return hour >= 11 ? hour : hour + 12;
  56408. } else if (meridiem === 'бегоҳ') {
  56409. return hour + 12;
  56410. }
  56411. },
  56412. meridiem: function (hour, minute, isLower) {
  56413. if (hour < 4) {
  56414. return 'шаб';
  56415. } else if (hour < 11) {
  56416. return 'субҳ';
  56417. } else if (hour < 16) {
  56418. return 'рӯз';
  56419. } else if (hour < 19) {
  56420. return 'бегоҳ';
  56421. } else {
  56422. return 'шаб';
  56423. }
  56424. },
  56425. dayOfMonthOrdinalParse: /\d{1,2}-(ум|юм)/,
  56426. ordinal: function (number) {
  56427. var a = number % 10,
  56428. b = number >= 100 ? 100 : null;
  56429. return number + (suffixes[number] || suffixes[a] || suffixes[b]);
  56430. },
  56431. week: {
  56432. dow: 1, // Monday is the first day of the week.
  56433. doy: 7, // The week that contains Jan 1th is the first week of the year.
  56434. },
  56435. });
  56436. return tg;
  56437. })));
  56438. /***/ }),
  56439. /***/ 9041:
  56440. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  56441. //! moment.js locale configuration
  56442. //! locale : Thai [th]
  56443. //! author : Kridsada Thanabulpong : https://github.com/sirn
  56444. ;(function (global, factory) {
  56445. true ? factory(__webpack_require__(30381)) :
  56446. 0
  56447. }(this, (function (moment) { 'use strict';
  56448. //! moment.js locale configuration
  56449. var th = moment.defineLocale('th', {
  56450. months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split(
  56451. '_'
  56452. ),
  56453. monthsShort: 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split(
  56454. '_'
  56455. ),
  56456. monthsParseExact: true,
  56457. weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),
  56458. weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference
  56459. weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),
  56460. weekdaysParseExact: true,
  56461. longDateFormat: {
  56462. LT: 'H:mm',
  56463. LTS: 'H:mm:ss',
  56464. L: 'DD/MM/YYYY',
  56465. LL: 'D MMMM YYYY',
  56466. LLL: 'D MMMM YYYY เวลา H:mm',
  56467. LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm',
  56468. },
  56469. meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,
  56470. isPM: function (input) {
  56471. return input === 'หลังเที่ยง';
  56472. },
  56473. meridiem: function (hour, minute, isLower) {
  56474. if (hour < 12) {
  56475. return 'ก่อนเที่ยง';
  56476. } else {
  56477. return 'หลังเที่ยง';
  56478. }
  56479. },
  56480. calendar: {
  56481. sameDay: '[วันนี้ เวลา] LT',
  56482. nextDay: '[พรุ่งนี้ เวลา] LT',
  56483. nextWeek: 'dddd[หน้า เวลา] LT',
  56484. lastDay: '[เมื่อวานนี้ เวลา] LT',
  56485. lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT',
  56486. sameElse: 'L',
  56487. },
  56488. relativeTime: {
  56489. future: 'อีก %s',
  56490. past: '%sที่แล้ว',
  56491. s: 'ไม่กี่วินาที',
  56492. ss: '%d วินาที',
  56493. m: '1 นาที',
  56494. mm: '%d นาที',
  56495. h: '1 ชั่วโมง',
  56496. hh: '%d ชั่วโมง',
  56497. d: '1 วัน',
  56498. dd: '%d วัน',
  56499. w: '1 สัปดาห์',
  56500. ww: '%d สัปดาห์',
  56501. M: '1 เดือน',
  56502. MM: '%d เดือน',
  56503. y: '1 ปี',
  56504. yy: '%d ปี',
  56505. },
  56506. });
  56507. return th;
  56508. })));
  56509. /***/ }),
  56510. /***/ 19005:
  56511. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  56512. //! moment.js locale configuration
  56513. //! locale : Turkmen [tk]
  56514. //! author : Atamyrat Abdyrahmanov : https://github.com/atamyratabdy
  56515. ;(function (global, factory) {
  56516. true ? factory(__webpack_require__(30381)) :
  56517. 0
  56518. }(this, (function (moment) { 'use strict';
  56519. //! moment.js locale configuration
  56520. var suffixes = {
  56521. 1: "'inji",
  56522. 5: "'inji",
  56523. 8: "'inji",
  56524. 70: "'inji",
  56525. 80: "'inji",
  56526. 2: "'nji",
  56527. 7: "'nji",
  56528. 20: "'nji",
  56529. 50: "'nji",
  56530. 3: "'ünji",
  56531. 4: "'ünji",
  56532. 100: "'ünji",
  56533. 6: "'njy",
  56534. 9: "'unjy",
  56535. 10: "'unjy",
  56536. 30: "'unjy",
  56537. 60: "'ynjy",
  56538. 90: "'ynjy",
  56539. };
  56540. var tk = moment.defineLocale('tk', {
  56541. months: 'Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr'.split(
  56542. '_'
  56543. ),
  56544. monthsShort: 'Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek'.split('_'),
  56545. weekdays: 'Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe'.split(
  56546. '_'
  56547. ),
  56548. weekdaysShort: 'Ýek_Duş_Siş_Çar_Pen_Ann_Şen'.split('_'),
  56549. weekdaysMin: 'Ýk_Dş_Sş_Çr_Pn_An_Şn'.split('_'),
  56550. longDateFormat: {
  56551. LT: 'HH:mm',
  56552. LTS: 'HH:mm:ss',
  56553. L: 'DD.MM.YYYY',
  56554. LL: 'D MMMM YYYY',
  56555. LLL: 'D MMMM YYYY HH:mm',
  56556. LLLL: 'dddd, D MMMM YYYY HH:mm',
  56557. },
  56558. calendar: {
  56559. sameDay: '[bugün sagat] LT',
  56560. nextDay: '[ertir sagat] LT',
  56561. nextWeek: '[indiki] dddd [sagat] LT',
  56562. lastDay: '[düýn] LT',
  56563. lastWeek: '[geçen] dddd [sagat] LT',
  56564. sameElse: 'L',
  56565. },
  56566. relativeTime: {
  56567. future: '%s soň',
  56568. past: '%s öň',
  56569. s: 'birnäçe sekunt',
  56570. m: 'bir minut',
  56571. mm: '%d minut',
  56572. h: 'bir sagat',
  56573. hh: '%d sagat',
  56574. d: 'bir gün',
  56575. dd: '%d gün',
  56576. M: 'bir aý',
  56577. MM: '%d aý',
  56578. y: 'bir ýyl',
  56579. yy: '%d ýyl',
  56580. },
  56581. ordinal: function (number, period) {
  56582. switch (period) {
  56583. case 'd':
  56584. case 'D':
  56585. case 'Do':
  56586. case 'DD':
  56587. return number;
  56588. default:
  56589. if (number === 0) {
  56590. // special case for zero
  56591. return number + "'unjy";
  56592. }
  56593. var a = number % 10,
  56594. b = (number % 100) - a,
  56595. c = number >= 100 ? 100 : null;
  56596. return number + (suffixes[a] || suffixes[b] || suffixes[c]);
  56597. }
  56598. },
  56599. week: {
  56600. dow: 1, // Monday is the first day of the week.
  56601. doy: 7, // The week that contains Jan 7th is the first week of the year.
  56602. },
  56603. });
  56604. return tk;
  56605. })));
  56606. /***/ }),
  56607. /***/ 75768:
  56608. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  56609. //! moment.js locale configuration
  56610. //! locale : Tagalog (Philippines) [tl-ph]
  56611. //! author : Dan Hagman : https://github.com/hagmandan
  56612. ;(function (global, factory) {
  56613. true ? factory(__webpack_require__(30381)) :
  56614. 0
  56615. }(this, (function (moment) { 'use strict';
  56616. //! moment.js locale configuration
  56617. var tlPh = moment.defineLocale('tl-ph', {
  56618. months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(
  56619. '_'
  56620. ),
  56621. monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),
  56622. weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(
  56623. '_'
  56624. ),
  56625. weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),
  56626. weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),
  56627. longDateFormat: {
  56628. LT: 'HH:mm',
  56629. LTS: 'HH:mm:ss',
  56630. L: 'MM/D/YYYY',
  56631. LL: 'MMMM D, YYYY',
  56632. LLL: 'MMMM D, YYYY HH:mm',
  56633. LLLL: 'dddd, MMMM DD, YYYY HH:mm',
  56634. },
  56635. calendar: {
  56636. sameDay: 'LT [ngayong araw]',
  56637. nextDay: '[Bukas ng] LT',
  56638. nextWeek: 'LT [sa susunod na] dddd',
  56639. lastDay: 'LT [kahapon]',
  56640. lastWeek: 'LT [noong nakaraang] dddd',
  56641. sameElse: 'L',
  56642. },
  56643. relativeTime: {
  56644. future: 'sa loob ng %s',
  56645. past: '%s ang nakalipas',
  56646. s: 'ilang segundo',
  56647. ss: '%d segundo',
  56648. m: 'isang minuto',
  56649. mm: '%d minuto',
  56650. h: 'isang oras',
  56651. hh: '%d oras',
  56652. d: 'isang araw',
  56653. dd: '%d araw',
  56654. M: 'isang buwan',
  56655. MM: '%d buwan',
  56656. y: 'isang taon',
  56657. yy: '%d taon',
  56658. },
  56659. dayOfMonthOrdinalParse: /\d{1,2}/,
  56660. ordinal: function (number) {
  56661. return number;
  56662. },
  56663. week: {
  56664. dow: 1, // Monday is the first day of the week.
  56665. doy: 4, // The week that contains Jan 4th is the first week of the year.
  56666. },
  56667. });
  56668. return tlPh;
  56669. })));
  56670. /***/ }),
  56671. /***/ 89444:
  56672. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  56673. //! moment.js locale configuration
  56674. //! locale : Klingon [tlh]
  56675. //! author : Dominika Kruk : https://github.com/amaranthrose
  56676. ;(function (global, factory) {
  56677. true ? factory(__webpack_require__(30381)) :
  56678. 0
  56679. }(this, (function (moment) { 'use strict';
  56680. //! moment.js locale configuration
  56681. var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');
  56682. function translateFuture(output) {
  56683. var time = output;
  56684. time =
  56685. output.indexOf('jaj') !== -1
  56686. ? time.slice(0, -3) + 'leS'
  56687. : output.indexOf('jar') !== -1
  56688. ? time.slice(0, -3) + 'waQ'
  56689. : output.indexOf('DIS') !== -1
  56690. ? time.slice(0, -3) + 'nem'
  56691. : time + ' pIq';
  56692. return time;
  56693. }
  56694. function translatePast(output) {
  56695. var time = output;
  56696. time =
  56697. output.indexOf('jaj') !== -1
  56698. ? time.slice(0, -3) + 'Hu’'
  56699. : output.indexOf('jar') !== -1
  56700. ? time.slice(0, -3) + 'wen'
  56701. : output.indexOf('DIS') !== -1
  56702. ? time.slice(0, -3) + 'ben'
  56703. : time + ' ret';
  56704. return time;
  56705. }
  56706. function translate(number, withoutSuffix, string, isFuture) {
  56707. var numberNoun = numberAsNoun(number);
  56708. switch (string) {
  56709. case 'ss':
  56710. return numberNoun + ' lup';
  56711. case 'mm':
  56712. return numberNoun + ' tup';
  56713. case 'hh':
  56714. return numberNoun + ' rep';
  56715. case 'dd':
  56716. return numberNoun + ' jaj';
  56717. case 'MM':
  56718. return numberNoun + ' jar';
  56719. case 'yy':
  56720. return numberNoun + ' DIS';
  56721. }
  56722. }
  56723. function numberAsNoun(number) {
  56724. var hundred = Math.floor((number % 1000) / 100),
  56725. ten = Math.floor((number % 100) / 10),
  56726. one = number % 10,
  56727. word = '';
  56728. if (hundred > 0) {
  56729. word += numbersNouns[hundred] + 'vatlh';
  56730. }
  56731. if (ten > 0) {
  56732. word += (word !== '' ? ' ' : '') + numbersNouns[ten] + 'maH';
  56733. }
  56734. if (one > 0) {
  56735. word += (word !== '' ? ' ' : '') + numbersNouns[one];
  56736. }
  56737. return word === '' ? 'pagh' : word;
  56738. }
  56739. var tlh = moment.defineLocale('tlh', {
  56740. months: 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split(
  56741. '_'
  56742. ),
  56743. monthsShort: 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split(
  56744. '_'
  56745. ),
  56746. monthsParseExact: true,
  56747. weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(
  56748. '_'
  56749. ),
  56750. weekdaysShort: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(
  56751. '_'
  56752. ),
  56753. weekdaysMin: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(
  56754. '_'
  56755. ),
  56756. longDateFormat: {
  56757. LT: 'HH:mm',
  56758. LTS: 'HH:mm:ss',
  56759. L: 'DD.MM.YYYY',
  56760. LL: 'D MMMM YYYY',
  56761. LLL: 'D MMMM YYYY HH:mm',
  56762. LLLL: 'dddd, D MMMM YYYY HH:mm',
  56763. },
  56764. calendar: {
  56765. sameDay: '[DaHjaj] LT',
  56766. nextDay: '[wa’leS] LT',
  56767. nextWeek: 'LLL',
  56768. lastDay: '[wa’Hu’] LT',
  56769. lastWeek: 'LLL',
  56770. sameElse: 'L',
  56771. },
  56772. relativeTime: {
  56773. future: translateFuture,
  56774. past: translatePast,
  56775. s: 'puS lup',
  56776. ss: translate,
  56777. m: 'wa’ tup',
  56778. mm: translate,
  56779. h: 'wa’ rep',
  56780. hh: translate,
  56781. d: 'wa’ jaj',
  56782. dd: translate,
  56783. M: 'wa’ jar',
  56784. MM: translate,
  56785. y: 'wa’ DIS',
  56786. yy: translate,
  56787. },
  56788. dayOfMonthOrdinalParse: /\d{1,2}\./,
  56789. ordinal: '%d.',
  56790. week: {
  56791. dow: 1, // Monday is the first day of the week.
  56792. doy: 4, // The week that contains Jan 4th is the first week of the year.
  56793. },
  56794. });
  56795. return tlh;
  56796. })));
  56797. /***/ }),
  56798. /***/ 72397:
  56799. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  56800. //! moment.js locale configuration
  56801. //! locale : Turkish [tr]
  56802. //! authors : Erhan Gundogan : https://github.com/erhangundogan,
  56803. //! Burak Yiğit Kaya: https://github.com/BYK
  56804. ;(function (global, factory) {
  56805. true ? factory(__webpack_require__(30381)) :
  56806. 0
  56807. }(this, (function (moment) { 'use strict';
  56808. //! moment.js locale configuration
  56809. var suffixes = {
  56810. 1: "'inci",
  56811. 5: "'inci",
  56812. 8: "'inci",
  56813. 70: "'inci",
  56814. 80: "'inci",
  56815. 2: "'nci",
  56816. 7: "'nci",
  56817. 20: "'nci",
  56818. 50: "'nci",
  56819. 3: "'üncü",
  56820. 4: "'üncü",
  56821. 100: "'üncü",
  56822. 6: "'ncı",
  56823. 9: "'uncu",
  56824. 10: "'uncu",
  56825. 30: "'uncu",
  56826. 60: "'ıncı",
  56827. 90: "'ıncı",
  56828. };
  56829. var tr = moment.defineLocale('tr', {
  56830. months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split(
  56831. '_'
  56832. ),
  56833. monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),
  56834. weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split(
  56835. '_'
  56836. ),
  56837. weekdaysShort: 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'),
  56838. weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),
  56839. meridiem: function (hours, minutes, isLower) {
  56840. if (hours < 12) {
  56841. return isLower ? 'öö' : 'ÖÖ';
  56842. } else {
  56843. return isLower ? 'ös' : 'ÖS';
  56844. }
  56845. },
  56846. meridiemParse: /öö|ÖÖ|ös|ÖS/,
  56847. isPM: function (input) {
  56848. return input === 'ös' || input === 'ÖS';
  56849. },
  56850. longDateFormat: {
  56851. LT: 'HH:mm',
  56852. LTS: 'HH:mm:ss',
  56853. L: 'DD.MM.YYYY',
  56854. LL: 'D MMMM YYYY',
  56855. LLL: 'D MMMM YYYY HH:mm',
  56856. LLLL: 'dddd, D MMMM YYYY HH:mm',
  56857. },
  56858. calendar: {
  56859. sameDay: '[bugün saat] LT',
  56860. nextDay: '[yarın saat] LT',
  56861. nextWeek: '[gelecek] dddd [saat] LT',
  56862. lastDay: '[dün] LT',
  56863. lastWeek: '[geçen] dddd [saat] LT',
  56864. sameElse: 'L',
  56865. },
  56866. relativeTime: {
  56867. future: '%s sonra',
  56868. past: '%s önce',
  56869. s: 'birkaç saniye',
  56870. ss: '%d saniye',
  56871. m: 'bir dakika',
  56872. mm: '%d dakika',
  56873. h: 'bir saat',
  56874. hh: '%d saat',
  56875. d: 'bir gün',
  56876. dd: '%d gün',
  56877. w: 'bir hafta',
  56878. ww: '%d hafta',
  56879. M: 'bir ay',
  56880. MM: '%d ay',
  56881. y: 'bir yıl',
  56882. yy: '%d yıl',
  56883. },
  56884. ordinal: function (number, period) {
  56885. switch (period) {
  56886. case 'd':
  56887. case 'D':
  56888. case 'Do':
  56889. case 'DD':
  56890. return number;
  56891. default:
  56892. if (number === 0) {
  56893. // special case for zero
  56894. return number + "'ıncı";
  56895. }
  56896. var a = number % 10,
  56897. b = (number % 100) - a,
  56898. c = number >= 100 ? 100 : null;
  56899. return number + (suffixes[a] || suffixes[b] || suffixes[c]);
  56900. }
  56901. },
  56902. week: {
  56903. dow: 1, // Monday is the first day of the week.
  56904. doy: 7, // The week that contains Jan 7th is the first week of the year.
  56905. },
  56906. });
  56907. return tr;
  56908. })));
  56909. /***/ }),
  56910. /***/ 28254:
  56911. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  56912. //! moment.js locale configuration
  56913. //! locale : Talossan [tzl]
  56914. //! author : Robin van der Vliet : https://github.com/robin0van0der0v
  56915. //! author : Iustì Canun
  56916. ;(function (global, factory) {
  56917. true ? factory(__webpack_require__(30381)) :
  56918. 0
  56919. }(this, (function (moment) { 'use strict';
  56920. //! moment.js locale configuration
  56921. // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals.
  56922. // This is currently too difficult (maybe even impossible) to add.
  56923. var tzl = moment.defineLocale('tzl', {
  56924. months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split(
  56925. '_'
  56926. ),
  56927. monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),
  56928. weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),
  56929. weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),
  56930. weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),
  56931. longDateFormat: {
  56932. LT: 'HH.mm',
  56933. LTS: 'HH.mm.ss',
  56934. L: 'DD.MM.YYYY',
  56935. LL: 'D. MMMM [dallas] YYYY',
  56936. LLL: 'D. MMMM [dallas] YYYY HH.mm',
  56937. LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm',
  56938. },
  56939. meridiemParse: /d\'o|d\'a/i,
  56940. isPM: function (input) {
  56941. return "d'o" === input.toLowerCase();
  56942. },
  56943. meridiem: function (hours, minutes, isLower) {
  56944. if (hours > 11) {
  56945. return isLower ? "d'o" : "D'O";
  56946. } else {
  56947. return isLower ? "d'a" : "D'A";
  56948. }
  56949. },
  56950. calendar: {
  56951. sameDay: '[oxhi à] LT',
  56952. nextDay: '[demà à] LT',
  56953. nextWeek: 'dddd [à] LT',
  56954. lastDay: '[ieiri à] LT',
  56955. lastWeek: '[sür el] dddd [lasteu à] LT',
  56956. sameElse: 'L',
  56957. },
  56958. relativeTime: {
  56959. future: 'osprei %s',
  56960. past: 'ja%s',
  56961. s: processRelativeTime,
  56962. ss: processRelativeTime,
  56963. m: processRelativeTime,
  56964. mm: processRelativeTime,
  56965. h: processRelativeTime,
  56966. hh: processRelativeTime,
  56967. d: processRelativeTime,
  56968. dd: processRelativeTime,
  56969. M: processRelativeTime,
  56970. MM: processRelativeTime,
  56971. y: processRelativeTime,
  56972. yy: processRelativeTime,
  56973. },
  56974. dayOfMonthOrdinalParse: /\d{1,2}\./,
  56975. ordinal: '%d.',
  56976. week: {
  56977. dow: 1, // Monday is the first day of the week.
  56978. doy: 4, // The week that contains Jan 4th is the first week of the year.
  56979. },
  56980. });
  56981. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  56982. var format = {
  56983. s: ['viensas secunds', "'iensas secunds"],
  56984. ss: [number + ' secunds', '' + number + ' secunds'],
  56985. m: ["'n míut", "'iens míut"],
  56986. mm: [number + ' míuts', '' + number + ' míuts'],
  56987. h: ["'n þora", "'iensa þora"],
  56988. hh: [number + ' þoras', '' + number + ' þoras'],
  56989. d: ["'n ziua", "'iensa ziua"],
  56990. dd: [number + ' ziuas', '' + number + ' ziuas'],
  56991. M: ["'n mes", "'iens mes"],
  56992. MM: [number + ' mesen', '' + number + ' mesen'],
  56993. y: ["'n ar", "'iens ar"],
  56994. yy: [number + ' ars', '' + number + ' ars'],
  56995. };
  56996. return isFuture
  56997. ? format[key][0]
  56998. : withoutSuffix
  56999. ? format[key][0]
  57000. : format[key][1];
  57001. }
  57002. return tzl;
  57003. })));
  57004. /***/ }),
  57005. /***/ 30699:
  57006. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  57007. //! moment.js locale configuration
  57008. //! locale : Central Atlas Tamazight Latin [tzm-latn]
  57009. //! author : Abdel Said : https://github.com/abdelsaid
  57010. ;(function (global, factory) {
  57011. true ? factory(__webpack_require__(30381)) :
  57012. 0
  57013. }(this, (function (moment) { 'use strict';
  57014. //! moment.js locale configuration
  57015. var tzmLatn = moment.defineLocale('tzm-latn', {
  57016. months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(
  57017. '_'
  57018. ),
  57019. monthsShort: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(
  57020. '_'
  57021. ),
  57022. weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
  57023. weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
  57024. weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
  57025. longDateFormat: {
  57026. LT: 'HH:mm',
  57027. LTS: 'HH:mm:ss',
  57028. L: 'DD/MM/YYYY',
  57029. LL: 'D MMMM YYYY',
  57030. LLL: 'D MMMM YYYY HH:mm',
  57031. LLLL: 'dddd D MMMM YYYY HH:mm',
  57032. },
  57033. calendar: {
  57034. sameDay: '[asdkh g] LT',
  57035. nextDay: '[aska g] LT',
  57036. nextWeek: 'dddd [g] LT',
  57037. lastDay: '[assant g] LT',
  57038. lastWeek: 'dddd [g] LT',
  57039. sameElse: 'L',
  57040. },
  57041. relativeTime: {
  57042. future: 'dadkh s yan %s',
  57043. past: 'yan %s',
  57044. s: 'imik',
  57045. ss: '%d imik',
  57046. m: 'minuḍ',
  57047. mm: '%d minuḍ',
  57048. h: 'saɛa',
  57049. hh: '%d tassaɛin',
  57050. d: 'ass',
  57051. dd: '%d ossan',
  57052. M: 'ayowr',
  57053. MM: '%d iyyirn',
  57054. y: 'asgas',
  57055. yy: '%d isgasn',
  57056. },
  57057. week: {
  57058. dow: 6, // Saturday is the first day of the week.
  57059. doy: 12, // The week that contains Jan 12th is the first week of the year.
  57060. },
  57061. });
  57062. return tzmLatn;
  57063. })));
  57064. /***/ }),
  57065. /***/ 51106:
  57066. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  57067. //! moment.js locale configuration
  57068. //! locale : Central Atlas Tamazight [tzm]
  57069. //! author : Abdel Said : https://github.com/abdelsaid
  57070. ;(function (global, factory) {
  57071. true ? factory(__webpack_require__(30381)) :
  57072. 0
  57073. }(this, (function (moment) { 'use strict';
  57074. //! moment.js locale configuration
  57075. var tzm = moment.defineLocale('tzm', {
  57076. months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(
  57077. '_'
  57078. ),
  57079. monthsShort: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(
  57080. '_'
  57081. ),
  57082. weekdays: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
  57083. weekdaysShort: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
  57084. weekdaysMin: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
  57085. longDateFormat: {
  57086. LT: 'HH:mm',
  57087. LTS: 'HH:mm:ss',
  57088. L: 'DD/MM/YYYY',
  57089. LL: 'D MMMM YYYY',
  57090. LLL: 'D MMMM YYYY HH:mm',
  57091. LLLL: 'dddd D MMMM YYYY HH:mm',
  57092. },
  57093. calendar: {
  57094. sameDay: '[ⴰⵙⴷⵅ ⴴ] LT',
  57095. nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',
  57096. nextWeek: 'dddd [ⴴ] LT',
  57097. lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',
  57098. lastWeek: 'dddd [ⴴ] LT',
  57099. sameElse: 'L',
  57100. },
  57101. relativeTime: {
  57102. future: 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s',
  57103. past: 'ⵢⴰⵏ %s',
  57104. s: 'ⵉⵎⵉⴽ',
  57105. ss: '%d ⵉⵎⵉⴽ',
  57106. m: 'ⵎⵉⵏⵓⴺ',
  57107. mm: '%d ⵎⵉⵏⵓⴺ',
  57108. h: 'ⵙⴰⵄⴰ',
  57109. hh: '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',
  57110. d: 'ⴰⵙⵙ',
  57111. dd: '%d oⵙⵙⴰⵏ',
  57112. M: 'ⴰⵢoⵓⵔ',
  57113. MM: '%d ⵉⵢⵢⵉⵔⵏ',
  57114. y: 'ⴰⵙⴳⴰⵙ',
  57115. yy: '%d ⵉⵙⴳⴰⵙⵏ',
  57116. },
  57117. week: {
  57118. dow: 6, // Saturday is the first day of the week.
  57119. doy: 12, // The week that contains Jan 12th is the first week of the year.
  57120. },
  57121. });
  57122. return tzm;
  57123. })));
  57124. /***/ }),
  57125. /***/ 9288:
  57126. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  57127. //! moment.js locale configuration
  57128. //! locale : Uyghur (China) [ug-cn]
  57129. //! author: boyaq : https://github.com/boyaq
  57130. ;(function (global, factory) {
  57131. true ? factory(__webpack_require__(30381)) :
  57132. 0
  57133. }(this, (function (moment) { 'use strict';
  57134. //! moment.js locale configuration
  57135. var ugCn = moment.defineLocale('ug-cn', {
  57136. months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(
  57137. '_'
  57138. ),
  57139. monthsShort: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(
  57140. '_'
  57141. ),
  57142. weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split(
  57143. '_'
  57144. ),
  57145. weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),
  57146. weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),
  57147. longDateFormat: {
  57148. LT: 'HH:mm',
  57149. LTS: 'HH:mm:ss',
  57150. L: 'YYYY-MM-DD',
  57151. LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى',
  57152. LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',
  57153. LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',
  57154. },
  57155. meridiemParse: /يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,
  57156. meridiemHour: function (hour, meridiem) {
  57157. if (hour === 12) {
  57158. hour = 0;
  57159. }
  57160. if (
  57161. meridiem === 'يېرىم كېچە' ||
  57162. meridiem === 'سەھەر' ||
  57163. meridiem === 'چۈشتىن بۇرۇن'
  57164. ) {
  57165. return hour;
  57166. } else if (meridiem === 'چۈشتىن كېيىن' || meridiem === 'كەچ') {
  57167. return hour + 12;
  57168. } else {
  57169. return hour >= 11 ? hour : hour + 12;
  57170. }
  57171. },
  57172. meridiem: function (hour, minute, isLower) {
  57173. var hm = hour * 100 + minute;
  57174. if (hm < 600) {
  57175. return 'يېرىم كېچە';
  57176. } else if (hm < 900) {
  57177. return 'سەھەر';
  57178. } else if (hm < 1130) {
  57179. return 'چۈشتىن بۇرۇن';
  57180. } else if (hm < 1230) {
  57181. return 'چۈش';
  57182. } else if (hm < 1800) {
  57183. return 'چۈشتىن كېيىن';
  57184. } else {
  57185. return 'كەچ';
  57186. }
  57187. },
  57188. calendar: {
  57189. sameDay: '[بۈگۈن سائەت] LT',
  57190. nextDay: '[ئەتە سائەت] LT',
  57191. nextWeek: '[كېلەركى] dddd [سائەت] LT',
  57192. lastDay: '[تۆنۈگۈن] LT',
  57193. lastWeek: '[ئالدىنقى] dddd [سائەت] LT',
  57194. sameElse: 'L',
  57195. },
  57196. relativeTime: {
  57197. future: '%s كېيىن',
  57198. past: '%s بۇرۇن',
  57199. s: 'نەچچە سېكونت',
  57200. ss: '%d سېكونت',
  57201. m: 'بىر مىنۇت',
  57202. mm: '%d مىنۇت',
  57203. h: 'بىر سائەت',
  57204. hh: '%d سائەت',
  57205. d: 'بىر كۈن',
  57206. dd: '%d كۈن',
  57207. M: 'بىر ئاي',
  57208. MM: '%d ئاي',
  57209. y: 'بىر يىل',
  57210. yy: '%d يىل',
  57211. },
  57212. dayOfMonthOrdinalParse: /\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,
  57213. ordinal: function (number, period) {
  57214. switch (period) {
  57215. case 'd':
  57216. case 'D':
  57217. case 'DDD':
  57218. return number + '-كۈنى';
  57219. case 'w':
  57220. case 'W':
  57221. return number + '-ھەپتە';
  57222. default:
  57223. return number;
  57224. }
  57225. },
  57226. preparse: function (string) {
  57227. return string.replace(/،/g, ',');
  57228. },
  57229. postformat: function (string) {
  57230. return string.replace(/,/g, '،');
  57231. },
  57232. week: {
  57233. // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
  57234. dow: 1, // Monday is the first day of the week.
  57235. doy: 7, // The week that contains Jan 1st is the first week of the year.
  57236. },
  57237. });
  57238. return ugCn;
  57239. })));
  57240. /***/ }),
  57241. /***/ 67691:
  57242. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  57243. //! moment.js locale configuration
  57244. //! locale : Ukrainian [uk]
  57245. //! author : zemlanin : https://github.com/zemlanin
  57246. //! Author : Menelion Elensúle : https://github.com/Oire
  57247. ;(function (global, factory) {
  57248. true ? factory(__webpack_require__(30381)) :
  57249. 0
  57250. }(this, (function (moment) { 'use strict';
  57251. //! moment.js locale configuration
  57252. function plural(word, num) {
  57253. var forms = word.split('_');
  57254. return num % 10 === 1 && num % 100 !== 11
  57255. ? forms[0]
  57256. : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
  57257. ? forms[1]
  57258. : forms[2];
  57259. }
  57260. function relativeTimeWithPlural(number, withoutSuffix, key) {
  57261. var format = {
  57262. ss: withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд',
  57263. mm: withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',
  57264. hh: withoutSuffix ? 'година_години_годин' : 'годину_години_годин',
  57265. dd: 'день_дні_днів',
  57266. MM: 'місяць_місяці_місяців',
  57267. yy: 'рік_роки_років',
  57268. };
  57269. if (key === 'm') {
  57270. return withoutSuffix ? 'хвилина' : 'хвилину';
  57271. } else if (key === 'h') {
  57272. return withoutSuffix ? 'година' : 'годину';
  57273. } else {
  57274. return number + ' ' + plural(format[key], +number);
  57275. }
  57276. }
  57277. function weekdaysCaseReplace(m, format) {
  57278. var weekdays = {
  57279. nominative: 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split(
  57280. '_'
  57281. ),
  57282. accusative: 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split(
  57283. '_'
  57284. ),
  57285. genitive: 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split(
  57286. '_'
  57287. ),
  57288. },
  57289. nounCase;
  57290. if (m === true) {
  57291. return weekdays['nominative']
  57292. .slice(1, 7)
  57293. .concat(weekdays['nominative'].slice(0, 1));
  57294. }
  57295. if (!m) {
  57296. return weekdays['nominative'];
  57297. }
  57298. nounCase = /(\[[ВвУу]\]) ?dddd/.test(format)
  57299. ? 'accusative'
  57300. : /\[?(?:минулої|наступної)? ?\] ?dddd/.test(format)
  57301. ? 'genitive'
  57302. : 'nominative';
  57303. return weekdays[nounCase][m.day()];
  57304. }
  57305. function processHoursFunction(str) {
  57306. return function () {
  57307. return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';
  57308. };
  57309. }
  57310. var uk = moment.defineLocale('uk', {
  57311. months: {
  57312. format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split(
  57313. '_'
  57314. ),
  57315. standalone: 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split(
  57316. '_'
  57317. ),
  57318. },
  57319. monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split(
  57320. '_'
  57321. ),
  57322. weekdays: weekdaysCaseReplace,
  57323. weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
  57324. weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
  57325. longDateFormat: {
  57326. LT: 'HH:mm',
  57327. LTS: 'HH:mm:ss',
  57328. L: 'DD.MM.YYYY',
  57329. LL: 'D MMMM YYYY р.',
  57330. LLL: 'D MMMM YYYY р., HH:mm',
  57331. LLLL: 'dddd, D MMMM YYYY р., HH:mm',
  57332. },
  57333. calendar: {
  57334. sameDay: processHoursFunction('[Сьогодні '),
  57335. nextDay: processHoursFunction('[Завтра '),
  57336. lastDay: processHoursFunction('[Вчора '),
  57337. nextWeek: processHoursFunction('[У] dddd ['),
  57338. lastWeek: function () {
  57339. switch (this.day()) {
  57340. case 0:
  57341. case 3:
  57342. case 5:
  57343. case 6:
  57344. return processHoursFunction('[Минулої] dddd [').call(this);
  57345. case 1:
  57346. case 2:
  57347. case 4:
  57348. return processHoursFunction('[Минулого] dddd [').call(this);
  57349. }
  57350. },
  57351. sameElse: 'L',
  57352. },
  57353. relativeTime: {
  57354. future: 'за %s',
  57355. past: '%s тому',
  57356. s: 'декілька секунд',
  57357. ss: relativeTimeWithPlural,
  57358. m: relativeTimeWithPlural,
  57359. mm: relativeTimeWithPlural,
  57360. h: 'годину',
  57361. hh: relativeTimeWithPlural,
  57362. d: 'день',
  57363. dd: relativeTimeWithPlural,
  57364. M: 'місяць',
  57365. MM: relativeTimeWithPlural,
  57366. y: 'рік',
  57367. yy: relativeTimeWithPlural,
  57368. },
  57369. // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason
  57370. meridiemParse: /ночі|ранку|дня|вечора/,
  57371. isPM: function (input) {
  57372. return /^(дня|вечора)$/.test(input);
  57373. },
  57374. meridiem: function (hour, minute, isLower) {
  57375. if (hour < 4) {
  57376. return 'ночі';
  57377. } else if (hour < 12) {
  57378. return 'ранку';
  57379. } else if (hour < 17) {
  57380. return 'дня';
  57381. } else {
  57382. return 'вечора';
  57383. }
  57384. },
  57385. dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/,
  57386. ordinal: function (number, period) {
  57387. switch (period) {
  57388. case 'M':
  57389. case 'd':
  57390. case 'DDD':
  57391. case 'w':
  57392. case 'W':
  57393. return number + '-й';
  57394. case 'D':
  57395. return number + '-го';
  57396. default:
  57397. return number;
  57398. }
  57399. },
  57400. week: {
  57401. dow: 1, // Monday is the first day of the week.
  57402. doy: 7, // The week that contains Jan 7th is the first week of the year.
  57403. },
  57404. });
  57405. return uk;
  57406. })));
  57407. /***/ }),
  57408. /***/ 13795:
  57409. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  57410. //! moment.js locale configuration
  57411. //! locale : Urdu [ur]
  57412. //! author : Sawood Alam : https://github.com/ibnesayeed
  57413. //! author : Zack : https://github.com/ZackVision
  57414. ;(function (global, factory) {
  57415. true ? factory(__webpack_require__(30381)) :
  57416. 0
  57417. }(this, (function (moment) { 'use strict';
  57418. //! moment.js locale configuration
  57419. var months = [
  57420. 'جنوری',
  57421. 'فروری',
  57422. 'مارچ',
  57423. 'اپریل',
  57424. 'مئی',
  57425. 'جون',
  57426. 'جولائی',
  57427. 'اگست',
  57428. 'ستمبر',
  57429. 'اکتوبر',
  57430. 'نومبر',
  57431. 'دسمبر',
  57432. ],
  57433. days = ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'ہفتہ'];
  57434. var ur = moment.defineLocale('ur', {
  57435. months: months,
  57436. monthsShort: months,
  57437. weekdays: days,
  57438. weekdaysShort: days,
  57439. weekdaysMin: days,
  57440. longDateFormat: {
  57441. LT: 'HH:mm',
  57442. LTS: 'HH:mm:ss',
  57443. L: 'DD/MM/YYYY',
  57444. LL: 'D MMMM YYYY',
  57445. LLL: 'D MMMM YYYY HH:mm',
  57446. LLLL: 'dddd، D MMMM YYYY HH:mm',
  57447. },
  57448. meridiemParse: /صبح|شام/,
  57449. isPM: function (input) {
  57450. return 'شام' === input;
  57451. },
  57452. meridiem: function (hour, minute, isLower) {
  57453. if (hour < 12) {
  57454. return 'صبح';
  57455. }
  57456. return 'شام';
  57457. },
  57458. calendar: {
  57459. sameDay: '[آج بوقت] LT',
  57460. nextDay: '[کل بوقت] LT',
  57461. nextWeek: 'dddd [بوقت] LT',
  57462. lastDay: '[گذشتہ روز بوقت] LT',
  57463. lastWeek: '[گذشتہ] dddd [بوقت] LT',
  57464. sameElse: 'L',
  57465. },
  57466. relativeTime: {
  57467. future: '%s بعد',
  57468. past: '%s قبل',
  57469. s: 'چند سیکنڈ',
  57470. ss: '%d سیکنڈ',
  57471. m: 'ایک منٹ',
  57472. mm: '%d منٹ',
  57473. h: 'ایک گھنٹہ',
  57474. hh: '%d گھنٹے',
  57475. d: 'ایک دن',
  57476. dd: '%d دن',
  57477. M: 'ایک ماہ',
  57478. MM: '%d ماہ',
  57479. y: 'ایک سال',
  57480. yy: '%d سال',
  57481. },
  57482. preparse: function (string) {
  57483. return string.replace(/،/g, ',');
  57484. },
  57485. postformat: function (string) {
  57486. return string.replace(/,/g, '،');
  57487. },
  57488. week: {
  57489. dow: 1, // Monday is the first day of the week.
  57490. doy: 4, // The week that contains Jan 4th is the first week of the year.
  57491. },
  57492. });
  57493. return ur;
  57494. })));
  57495. /***/ }),
  57496. /***/ 60588:
  57497. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  57498. //! moment.js locale configuration
  57499. //! locale : Uzbek Latin [uz-latn]
  57500. //! author : Rasulbek Mirzayev : github.com/Rasulbeeek
  57501. ;(function (global, factory) {
  57502. true ? factory(__webpack_require__(30381)) :
  57503. 0
  57504. }(this, (function (moment) { 'use strict';
  57505. //! moment.js locale configuration
  57506. var uzLatn = moment.defineLocale('uz-latn', {
  57507. months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split(
  57508. '_'
  57509. ),
  57510. monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),
  57511. weekdays: 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split(
  57512. '_'
  57513. ),
  57514. weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),
  57515. weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),
  57516. longDateFormat: {
  57517. LT: 'HH:mm',
  57518. LTS: 'HH:mm:ss',
  57519. L: 'DD/MM/YYYY',
  57520. LL: 'D MMMM YYYY',
  57521. LLL: 'D MMMM YYYY HH:mm',
  57522. LLLL: 'D MMMM YYYY, dddd HH:mm',
  57523. },
  57524. calendar: {
  57525. sameDay: '[Bugun soat] LT [da]',
  57526. nextDay: '[Ertaga] LT [da]',
  57527. nextWeek: 'dddd [kuni soat] LT [da]',
  57528. lastDay: '[Kecha soat] LT [da]',
  57529. lastWeek: "[O'tgan] dddd [kuni soat] LT [da]",
  57530. sameElse: 'L',
  57531. },
  57532. relativeTime: {
  57533. future: 'Yaqin %s ichida',
  57534. past: 'Bir necha %s oldin',
  57535. s: 'soniya',
  57536. ss: '%d soniya',
  57537. m: 'bir daqiqa',
  57538. mm: '%d daqiqa',
  57539. h: 'bir soat',
  57540. hh: '%d soat',
  57541. d: 'bir kun',
  57542. dd: '%d kun',
  57543. M: 'bir oy',
  57544. MM: '%d oy',
  57545. y: 'bir yil',
  57546. yy: '%d yil',
  57547. },
  57548. week: {
  57549. dow: 1, // Monday is the first day of the week.
  57550. doy: 7, // The week that contains Jan 7th is the first week of the year.
  57551. },
  57552. });
  57553. return uzLatn;
  57554. })));
  57555. /***/ }),
  57556. /***/ 6791:
  57557. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  57558. //! moment.js locale configuration
  57559. //! locale : Uzbek [uz]
  57560. //! author : Sardor Muminov : https://github.com/muminoff
  57561. ;(function (global, factory) {
  57562. true ? factory(__webpack_require__(30381)) :
  57563. 0
  57564. }(this, (function (moment) { 'use strict';
  57565. //! moment.js locale configuration
  57566. var uz = moment.defineLocale('uz', {
  57567. months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(
  57568. '_'
  57569. ),
  57570. monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),
  57571. weekdays: 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),
  57572. weekdaysShort: 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),
  57573. weekdaysMin: 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),
  57574. longDateFormat: {
  57575. LT: 'HH:mm',
  57576. LTS: 'HH:mm:ss',
  57577. L: 'DD/MM/YYYY',
  57578. LL: 'D MMMM YYYY',
  57579. LLL: 'D MMMM YYYY HH:mm',
  57580. LLLL: 'D MMMM YYYY, dddd HH:mm',
  57581. },
  57582. calendar: {
  57583. sameDay: '[Бугун соат] LT [да]',
  57584. nextDay: '[Эртага] LT [да]',
  57585. nextWeek: 'dddd [куни соат] LT [да]',
  57586. lastDay: '[Кеча соат] LT [да]',
  57587. lastWeek: '[Утган] dddd [куни соат] LT [да]',
  57588. sameElse: 'L',
  57589. },
  57590. relativeTime: {
  57591. future: 'Якин %s ичида',
  57592. past: 'Бир неча %s олдин',
  57593. s: 'фурсат',
  57594. ss: '%d фурсат',
  57595. m: 'бир дакика',
  57596. mm: '%d дакика',
  57597. h: 'бир соат',
  57598. hh: '%d соат',
  57599. d: 'бир кун',
  57600. dd: '%d кун',
  57601. M: 'бир ой',
  57602. MM: '%d ой',
  57603. y: 'бир йил',
  57604. yy: '%d йил',
  57605. },
  57606. week: {
  57607. dow: 1, // Monday is the first day of the week.
  57608. doy: 7, // The week that contains Jan 4th is the first week of the year.
  57609. },
  57610. });
  57611. return uz;
  57612. })));
  57613. /***/ }),
  57614. /***/ 65666:
  57615. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  57616. //! moment.js locale configuration
  57617. //! locale : Vietnamese [vi]
  57618. //! author : Bang Nguyen : https://github.com/bangnk
  57619. //! author : Chien Kira : https://github.com/chienkira
  57620. ;(function (global, factory) {
  57621. true ? factory(__webpack_require__(30381)) :
  57622. 0
  57623. }(this, (function (moment) { 'use strict';
  57624. //! moment.js locale configuration
  57625. var vi = moment.defineLocale('vi', {
  57626. months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split(
  57627. '_'
  57628. ),
  57629. monthsShort: 'Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12'.split(
  57630. '_'
  57631. ),
  57632. monthsParseExact: true,
  57633. weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split(
  57634. '_'
  57635. ),
  57636. weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
  57637. weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
  57638. weekdaysParseExact: true,
  57639. meridiemParse: /sa|ch/i,
  57640. isPM: function (input) {
  57641. return /^ch$/i.test(input);
  57642. },
  57643. meridiem: function (hours, minutes, isLower) {
  57644. if (hours < 12) {
  57645. return isLower ? 'sa' : 'SA';
  57646. } else {
  57647. return isLower ? 'ch' : 'CH';
  57648. }
  57649. },
  57650. longDateFormat: {
  57651. LT: 'HH:mm',
  57652. LTS: 'HH:mm:ss',
  57653. L: 'DD/MM/YYYY',
  57654. LL: 'D MMMM [năm] YYYY',
  57655. LLL: 'D MMMM [năm] YYYY HH:mm',
  57656. LLLL: 'dddd, D MMMM [năm] YYYY HH:mm',
  57657. l: 'DD/M/YYYY',
  57658. ll: 'D MMM YYYY',
  57659. lll: 'D MMM YYYY HH:mm',
  57660. llll: 'ddd, D MMM YYYY HH:mm',
  57661. },
  57662. calendar: {
  57663. sameDay: '[Hôm nay lúc] LT',
  57664. nextDay: '[Ngày mai lúc] LT',
  57665. nextWeek: 'dddd [tuần tới lúc] LT',
  57666. lastDay: '[Hôm qua lúc] LT',
  57667. lastWeek: 'dddd [tuần trước lúc] LT',
  57668. sameElse: 'L',
  57669. },
  57670. relativeTime: {
  57671. future: '%s tới',
  57672. past: '%s trước',
  57673. s: 'vài giây',
  57674. ss: '%d giây',
  57675. m: 'một phút',
  57676. mm: '%d phút',
  57677. h: 'một giờ',
  57678. hh: '%d giờ',
  57679. d: 'một ngày',
  57680. dd: '%d ngày',
  57681. w: 'một tuần',
  57682. ww: '%d tuần',
  57683. M: 'một tháng',
  57684. MM: '%d tháng',
  57685. y: 'một năm',
  57686. yy: '%d năm',
  57687. },
  57688. dayOfMonthOrdinalParse: /\d{1,2}/,
  57689. ordinal: function (number) {
  57690. return number;
  57691. },
  57692. week: {
  57693. dow: 1, // Monday is the first day of the week.
  57694. doy: 4, // The week that contains Jan 4th is the first week of the year.
  57695. },
  57696. });
  57697. return vi;
  57698. })));
  57699. /***/ }),
  57700. /***/ 14378:
  57701. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  57702. //! moment.js locale configuration
  57703. //! locale : Pseudo [x-pseudo]
  57704. //! author : Andrew Hood : https://github.com/andrewhood125
  57705. ;(function (global, factory) {
  57706. true ? factory(__webpack_require__(30381)) :
  57707. 0
  57708. }(this, (function (moment) { 'use strict';
  57709. //! moment.js locale configuration
  57710. var xPseudo = moment.defineLocale('x-pseudo', {
  57711. months: 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split(
  57712. '_'
  57713. ),
  57714. monthsShort: 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split(
  57715. '_'
  57716. ),
  57717. monthsParseExact: true,
  57718. weekdays: 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split(
  57719. '_'
  57720. ),
  57721. weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'),
  57722. weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'),
  57723. weekdaysParseExact: true,
  57724. longDateFormat: {
  57725. LT: 'HH:mm',
  57726. L: 'DD/MM/YYYY',
  57727. LL: 'D MMMM YYYY',
  57728. LLL: 'D MMMM YYYY HH:mm',
  57729. LLLL: 'dddd, D MMMM YYYY HH:mm',
  57730. },
  57731. calendar: {
  57732. sameDay: '[T~ódá~ý át] LT',
  57733. nextDay: '[T~ómó~rró~w át] LT',
  57734. nextWeek: 'dddd [át] LT',
  57735. lastDay: '[Ý~ést~érdá~ý át] LT',
  57736. lastWeek: '[L~ást] dddd [át] LT',
  57737. sameElse: 'L',
  57738. },
  57739. relativeTime: {
  57740. future: 'í~ñ %s',
  57741. past: '%s á~gó',
  57742. s: 'á ~féw ~sécó~ñds',
  57743. ss: '%d s~écóñ~ds',
  57744. m: 'á ~míñ~úté',
  57745. mm: '%d m~íñú~tés',
  57746. h: 'á~ñ hó~úr',
  57747. hh: '%d h~óúrs',
  57748. d: 'á ~dáý',
  57749. dd: '%d d~áýs',
  57750. M: 'á ~móñ~th',
  57751. MM: '%d m~óñt~hs',
  57752. y: 'á ~ýéár',
  57753. yy: '%d ý~éárs',
  57754. },
  57755. dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
  57756. ordinal: function (number) {
  57757. var b = number % 10,
  57758. output =
  57759. ~~((number % 100) / 10) === 1
  57760. ? 'th'
  57761. : b === 1
  57762. ? 'st'
  57763. : b === 2
  57764. ? 'nd'
  57765. : b === 3
  57766. ? 'rd'
  57767. : 'th';
  57768. return number + output;
  57769. },
  57770. week: {
  57771. dow: 1, // Monday is the first day of the week.
  57772. doy: 4, // The week that contains Jan 4th is the first week of the year.
  57773. },
  57774. });
  57775. return xPseudo;
  57776. })));
  57777. /***/ }),
  57778. /***/ 75805:
  57779. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  57780. //! moment.js locale configuration
  57781. //! locale : Yoruba Nigeria [yo]
  57782. //! author : Atolagbe Abisoye : https://github.com/andela-batolagbe
  57783. ;(function (global, factory) {
  57784. true ? factory(__webpack_require__(30381)) :
  57785. 0
  57786. }(this, (function (moment) { 'use strict';
  57787. //! moment.js locale configuration
  57788. var yo = moment.defineLocale('yo', {
  57789. months: 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split(
  57790. '_'
  57791. ),
  57792. monthsShort: 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'),
  57793. weekdays: 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'),
  57794. weekdaysShort: 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'),
  57795. weekdaysMin: 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'),
  57796. longDateFormat: {
  57797. LT: 'h:mm A',
  57798. LTS: 'h:mm:ss A',
  57799. L: 'DD/MM/YYYY',
  57800. LL: 'D MMMM YYYY',
  57801. LLL: 'D MMMM YYYY h:mm A',
  57802. LLLL: 'dddd, D MMMM YYYY h:mm A',
  57803. },
  57804. calendar: {
  57805. sameDay: '[Ònì ni] LT',
  57806. nextDay: '[Ọ̀la ni] LT',
  57807. nextWeek: "dddd [Ọsẹ̀ tón'bọ] [ni] LT",
  57808. lastDay: '[Àna ni] LT',
  57809. lastWeek: 'dddd [Ọsẹ̀ tólọ́] [ni] LT',
  57810. sameElse: 'L',
  57811. },
  57812. relativeTime: {
  57813. future: 'ní %s',
  57814. past: '%s kọjá',
  57815. s: 'ìsẹjú aayá die',
  57816. ss: 'aayá %d',
  57817. m: 'ìsẹjú kan',
  57818. mm: 'ìsẹjú %d',
  57819. h: 'wákati kan',
  57820. hh: 'wákati %d',
  57821. d: 'ọjọ́ kan',
  57822. dd: 'ọjọ́ %d',
  57823. M: 'osù kan',
  57824. MM: 'osù %d',
  57825. y: 'ọdún kan',
  57826. yy: 'ọdún %d',
  57827. },
  57828. dayOfMonthOrdinalParse: /ọjọ́\s\d{1,2}/,
  57829. ordinal: 'ọjọ́ %d',
  57830. week: {
  57831. dow: 1, // Monday is the first day of the week.
  57832. doy: 4, // The week that contains Jan 4th is the first week of the year.
  57833. },
  57834. });
  57835. return yo;
  57836. })));
  57837. /***/ }),
  57838. /***/ 83839:
  57839. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  57840. //! moment.js locale configuration
  57841. //! locale : Chinese (China) [zh-cn]
  57842. //! author : suupic : https://github.com/suupic
  57843. //! author : Zeno Zeng : https://github.com/zenozeng
  57844. //! author : uu109 : https://github.com/uu109
  57845. ;(function (global, factory) {
  57846. true ? factory(__webpack_require__(30381)) :
  57847. 0
  57848. }(this, (function (moment) { 'use strict';
  57849. //! moment.js locale configuration
  57850. var zhCn = moment.defineLocale('zh-cn', {
  57851. months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
  57852. '_'
  57853. ),
  57854. monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
  57855. '_'
  57856. ),
  57857. weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
  57858. weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),
  57859. weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
  57860. longDateFormat: {
  57861. LT: 'HH:mm',
  57862. LTS: 'HH:mm:ss',
  57863. L: 'YYYY/MM/DD',
  57864. LL: 'YYYY年M月D日',
  57865. LLL: 'YYYY年M月D日Ah点mm分',
  57866. LLLL: 'YYYY年M月D日ddddAh点mm分',
  57867. l: 'YYYY/M/D',
  57868. ll: 'YYYY年M月D日',
  57869. lll: 'YYYY年M月D日 HH:mm',
  57870. llll: 'YYYY年M月D日dddd HH:mm',
  57871. },
  57872. meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
  57873. meridiemHour: function (hour, meridiem) {
  57874. if (hour === 12) {
  57875. hour = 0;
  57876. }
  57877. if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
  57878. return hour;
  57879. } else if (meridiem === '下午' || meridiem === '晚上') {
  57880. return hour + 12;
  57881. } else {
  57882. // '中午'
  57883. return hour >= 11 ? hour : hour + 12;
  57884. }
  57885. },
  57886. meridiem: function (hour, minute, isLower) {
  57887. var hm = hour * 100 + minute;
  57888. if (hm < 600) {
  57889. return '凌晨';
  57890. } else if (hm < 900) {
  57891. return '早上';
  57892. } else if (hm < 1130) {
  57893. return '上午';
  57894. } else if (hm < 1230) {
  57895. return '中午';
  57896. } else if (hm < 1800) {
  57897. return '下午';
  57898. } else {
  57899. return '晚上';
  57900. }
  57901. },
  57902. calendar: {
  57903. sameDay: '[今天]LT',
  57904. nextDay: '[明天]LT',
  57905. nextWeek: function (now) {
  57906. if (now.week() !== this.week()) {
  57907. return '[下]dddLT';
  57908. } else {
  57909. return '[本]dddLT';
  57910. }
  57911. },
  57912. lastDay: '[昨天]LT',
  57913. lastWeek: function (now) {
  57914. if (this.week() !== now.week()) {
  57915. return '[上]dddLT';
  57916. } else {
  57917. return '[本]dddLT';
  57918. }
  57919. },
  57920. sameElse: 'L',
  57921. },
  57922. dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/,
  57923. ordinal: function (number, period) {
  57924. switch (period) {
  57925. case 'd':
  57926. case 'D':
  57927. case 'DDD':
  57928. return number + '日';
  57929. case 'M':
  57930. return number + '月';
  57931. case 'w':
  57932. case 'W':
  57933. return number + '周';
  57934. default:
  57935. return number;
  57936. }
  57937. },
  57938. relativeTime: {
  57939. future: '%s后',
  57940. past: '%s前',
  57941. s: '几秒',
  57942. ss: '%d 秒',
  57943. m: '1 分钟',
  57944. mm: '%d 分钟',
  57945. h: '1 小时',
  57946. hh: '%d 小时',
  57947. d: '1 天',
  57948. dd: '%d 天',
  57949. w: '1 周',
  57950. ww: '%d 周',
  57951. M: '1 个月',
  57952. MM: '%d 个月',
  57953. y: '1 年',
  57954. yy: '%d 年',
  57955. },
  57956. week: {
  57957. // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
  57958. dow: 1, // Monday is the first day of the week.
  57959. doy: 4, // The week that contains Jan 4th is the first week of the year.
  57960. },
  57961. });
  57962. return zhCn;
  57963. })));
  57964. /***/ }),
  57965. /***/ 55726:
  57966. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  57967. //! moment.js locale configuration
  57968. //! locale : Chinese (Hong Kong) [zh-hk]
  57969. //! author : Ben : https://github.com/ben-lin
  57970. //! author : Chris Lam : https://github.com/hehachris
  57971. //! author : Konstantin : https://github.com/skfd
  57972. //! author : Anthony : https://github.com/anthonylau
  57973. ;(function (global, factory) {
  57974. true ? factory(__webpack_require__(30381)) :
  57975. 0
  57976. }(this, (function (moment) { 'use strict';
  57977. //! moment.js locale configuration
  57978. var zhHk = moment.defineLocale('zh-hk', {
  57979. months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
  57980. '_'
  57981. ),
  57982. monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
  57983. '_'
  57984. ),
  57985. weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
  57986. weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
  57987. weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
  57988. longDateFormat: {
  57989. LT: 'HH:mm',
  57990. LTS: 'HH:mm:ss',
  57991. L: 'YYYY/MM/DD',
  57992. LL: 'YYYY年M月D日',
  57993. LLL: 'YYYY年M月D日 HH:mm',
  57994. LLLL: 'YYYY年M月D日dddd HH:mm',
  57995. l: 'YYYY/M/D',
  57996. ll: 'YYYY年M月D日',
  57997. lll: 'YYYY年M月D日 HH:mm',
  57998. llll: 'YYYY年M月D日dddd HH:mm',
  57999. },
  58000. meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
  58001. meridiemHour: function (hour, meridiem) {
  58002. if (hour === 12) {
  58003. hour = 0;
  58004. }
  58005. if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
  58006. return hour;
  58007. } else if (meridiem === '中午') {
  58008. return hour >= 11 ? hour : hour + 12;
  58009. } else if (meridiem === '下午' || meridiem === '晚上') {
  58010. return hour + 12;
  58011. }
  58012. },
  58013. meridiem: function (hour, minute, isLower) {
  58014. var hm = hour * 100 + minute;
  58015. if (hm < 600) {
  58016. return '凌晨';
  58017. } else if (hm < 900) {
  58018. return '早上';
  58019. } else if (hm < 1200) {
  58020. return '上午';
  58021. } else if (hm === 1200) {
  58022. return '中午';
  58023. } else if (hm < 1800) {
  58024. return '下午';
  58025. } else {
  58026. return '晚上';
  58027. }
  58028. },
  58029. calendar: {
  58030. sameDay: '[今天]LT',
  58031. nextDay: '[明天]LT',
  58032. nextWeek: '[下]ddddLT',
  58033. lastDay: '[昨天]LT',
  58034. lastWeek: '[上]ddddLT',
  58035. sameElse: 'L',
  58036. },
  58037. dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
  58038. ordinal: function (number, period) {
  58039. switch (period) {
  58040. case 'd':
  58041. case 'D':
  58042. case 'DDD':
  58043. return number + '日';
  58044. case 'M':
  58045. return number + '月';
  58046. case 'w':
  58047. case 'W':
  58048. return number + '週';
  58049. default:
  58050. return number;
  58051. }
  58052. },
  58053. relativeTime: {
  58054. future: '%s後',
  58055. past: '%s前',
  58056. s: '幾秒',
  58057. ss: '%d 秒',
  58058. m: '1 分鐘',
  58059. mm: '%d 分鐘',
  58060. h: '1 小時',
  58061. hh: '%d 小時',
  58062. d: '1 天',
  58063. dd: '%d 天',
  58064. M: '1 個月',
  58065. MM: '%d 個月',
  58066. y: '1 年',
  58067. yy: '%d 年',
  58068. },
  58069. });
  58070. return zhHk;
  58071. })));
  58072. /***/ }),
  58073. /***/ 99807:
  58074. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  58075. //! moment.js locale configuration
  58076. //! locale : Chinese (Macau) [zh-mo]
  58077. //! author : Ben : https://github.com/ben-lin
  58078. //! author : Chris Lam : https://github.com/hehachris
  58079. //! author : Tan Yuanhong : https://github.com/le0tan
  58080. ;(function (global, factory) {
  58081. true ? factory(__webpack_require__(30381)) :
  58082. 0
  58083. }(this, (function (moment) { 'use strict';
  58084. //! moment.js locale configuration
  58085. var zhMo = moment.defineLocale('zh-mo', {
  58086. months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
  58087. '_'
  58088. ),
  58089. monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
  58090. '_'
  58091. ),
  58092. weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
  58093. weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
  58094. weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
  58095. longDateFormat: {
  58096. LT: 'HH:mm',
  58097. LTS: 'HH:mm:ss',
  58098. L: 'DD/MM/YYYY',
  58099. LL: 'YYYY年M月D日',
  58100. LLL: 'YYYY年M月D日 HH:mm',
  58101. LLLL: 'YYYY年M月D日dddd HH:mm',
  58102. l: 'D/M/YYYY',
  58103. ll: 'YYYY年M月D日',
  58104. lll: 'YYYY年M月D日 HH:mm',
  58105. llll: 'YYYY年M月D日dddd HH:mm',
  58106. },
  58107. meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
  58108. meridiemHour: function (hour, meridiem) {
  58109. if (hour === 12) {
  58110. hour = 0;
  58111. }
  58112. if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
  58113. return hour;
  58114. } else if (meridiem === '中午') {
  58115. return hour >= 11 ? hour : hour + 12;
  58116. } else if (meridiem === '下午' || meridiem === '晚上') {
  58117. return hour + 12;
  58118. }
  58119. },
  58120. meridiem: function (hour, minute, isLower) {
  58121. var hm = hour * 100 + minute;
  58122. if (hm < 600) {
  58123. return '凌晨';
  58124. } else if (hm < 900) {
  58125. return '早上';
  58126. } else if (hm < 1130) {
  58127. return '上午';
  58128. } else if (hm < 1230) {
  58129. return '中午';
  58130. } else if (hm < 1800) {
  58131. return '下午';
  58132. } else {
  58133. return '晚上';
  58134. }
  58135. },
  58136. calendar: {
  58137. sameDay: '[今天] LT',
  58138. nextDay: '[明天] LT',
  58139. nextWeek: '[下]dddd LT',
  58140. lastDay: '[昨天] LT',
  58141. lastWeek: '[上]dddd LT',
  58142. sameElse: 'L',
  58143. },
  58144. dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
  58145. ordinal: function (number, period) {
  58146. switch (period) {
  58147. case 'd':
  58148. case 'D':
  58149. case 'DDD':
  58150. return number + '日';
  58151. case 'M':
  58152. return number + '月';
  58153. case 'w':
  58154. case 'W':
  58155. return number + '週';
  58156. default:
  58157. return number;
  58158. }
  58159. },
  58160. relativeTime: {
  58161. future: '%s內',
  58162. past: '%s前',
  58163. s: '幾秒',
  58164. ss: '%d 秒',
  58165. m: '1 分鐘',
  58166. mm: '%d 分鐘',
  58167. h: '1 小時',
  58168. hh: '%d 小時',
  58169. d: '1 天',
  58170. dd: '%d 天',
  58171. M: '1 個月',
  58172. MM: '%d 個月',
  58173. y: '1 年',
  58174. yy: '%d 年',
  58175. },
  58176. });
  58177. return zhMo;
  58178. })));
  58179. /***/ }),
  58180. /***/ 74152:
  58181. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  58182. //! moment.js locale configuration
  58183. //! locale : Chinese (Taiwan) [zh-tw]
  58184. //! author : Ben : https://github.com/ben-lin
  58185. //! author : Chris Lam : https://github.com/hehachris
  58186. ;(function (global, factory) {
  58187. true ? factory(__webpack_require__(30381)) :
  58188. 0
  58189. }(this, (function (moment) { 'use strict';
  58190. //! moment.js locale configuration
  58191. var zhTw = moment.defineLocale('zh-tw', {
  58192. months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
  58193. '_'
  58194. ),
  58195. monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
  58196. '_'
  58197. ),
  58198. weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
  58199. weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
  58200. weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
  58201. longDateFormat: {
  58202. LT: 'HH:mm',
  58203. LTS: 'HH:mm:ss',
  58204. L: 'YYYY/MM/DD',
  58205. LL: 'YYYY年M月D日',
  58206. LLL: 'YYYY年M月D日 HH:mm',
  58207. LLLL: 'YYYY年M月D日dddd HH:mm',
  58208. l: 'YYYY/M/D',
  58209. ll: 'YYYY年M月D日',
  58210. lll: 'YYYY年M月D日 HH:mm',
  58211. llll: 'YYYY年M月D日dddd HH:mm',
  58212. },
  58213. meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
  58214. meridiemHour: function (hour, meridiem) {
  58215. if (hour === 12) {
  58216. hour = 0;
  58217. }
  58218. if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
  58219. return hour;
  58220. } else if (meridiem === '中午') {
  58221. return hour >= 11 ? hour : hour + 12;
  58222. } else if (meridiem === '下午' || meridiem === '晚上') {
  58223. return hour + 12;
  58224. }
  58225. },
  58226. meridiem: function (hour, minute, isLower) {
  58227. var hm = hour * 100 + minute;
  58228. if (hm < 600) {
  58229. return '凌晨';
  58230. } else if (hm < 900) {
  58231. return '早上';
  58232. } else if (hm < 1130) {
  58233. return '上午';
  58234. } else if (hm < 1230) {
  58235. return '中午';
  58236. } else if (hm < 1800) {
  58237. return '下午';
  58238. } else {
  58239. return '晚上';
  58240. }
  58241. },
  58242. calendar: {
  58243. sameDay: '[今天] LT',
  58244. nextDay: '[明天] LT',
  58245. nextWeek: '[下]dddd LT',
  58246. lastDay: '[昨天] LT',
  58247. lastWeek: '[上]dddd LT',
  58248. sameElse: 'L',
  58249. },
  58250. dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
  58251. ordinal: function (number, period) {
  58252. switch (period) {
  58253. case 'd':
  58254. case 'D':
  58255. case 'DDD':
  58256. return number + '日';
  58257. case 'M':
  58258. return number + '月';
  58259. case 'w':
  58260. case 'W':
  58261. return number + '週';
  58262. default:
  58263. return number;
  58264. }
  58265. },
  58266. relativeTime: {
  58267. future: '%s後',
  58268. past: '%s前',
  58269. s: '幾秒',
  58270. ss: '%d 秒',
  58271. m: '1 分鐘',
  58272. mm: '%d 分鐘',
  58273. h: '1 小時',
  58274. hh: '%d 小時',
  58275. d: '1 天',
  58276. dd: '%d 天',
  58277. M: '1 個月',
  58278. MM: '%d 個月',
  58279. y: '1 年',
  58280. yy: '%d 年',
  58281. },
  58282. });
  58283. return zhTw;
  58284. })));
  58285. /***/ }),
  58286. /***/ 30381:
  58287. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  58288. /* module decorator */ module = __webpack_require__.nmd(module);
  58289. //! moment.js
  58290. //! version : 2.29.1
  58291. //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
  58292. //! license : MIT
  58293. //! momentjs.com
  58294. ;(function (global, factory) {
  58295. true ? module.exports = factory() :
  58296. 0
  58297. }(this, (function () { 'use strict';
  58298. var hookCallback;
  58299. function hooks() {
  58300. return hookCallback.apply(null, arguments);
  58301. }
  58302. // This is done to register the method called with moment()
  58303. // without creating circular dependencies.
  58304. function setHookCallback(callback) {
  58305. hookCallback = callback;
  58306. }
  58307. function isArray(input) {
  58308. return (
  58309. input instanceof Array ||
  58310. Object.prototype.toString.call(input) === '[object Array]'
  58311. );
  58312. }
  58313. function isObject(input) {
  58314. // IE8 will treat undefined and null as object if it wasn't for
  58315. // input != null
  58316. return (
  58317. input != null &&
  58318. Object.prototype.toString.call(input) === '[object Object]'
  58319. );
  58320. }
  58321. function hasOwnProp(a, b) {
  58322. return Object.prototype.hasOwnProperty.call(a, b);
  58323. }
  58324. function isObjectEmpty(obj) {
  58325. if (Object.getOwnPropertyNames) {
  58326. return Object.getOwnPropertyNames(obj).length === 0;
  58327. } else {
  58328. var k;
  58329. for (k in obj) {
  58330. if (hasOwnProp(obj, k)) {
  58331. return false;
  58332. }
  58333. }
  58334. return true;
  58335. }
  58336. }
  58337. function isUndefined(input) {
  58338. return input === void 0;
  58339. }
  58340. function isNumber(input) {
  58341. return (
  58342. typeof input === 'number' ||
  58343. Object.prototype.toString.call(input) === '[object Number]'
  58344. );
  58345. }
  58346. function isDate(input) {
  58347. return (
  58348. input instanceof Date ||
  58349. Object.prototype.toString.call(input) === '[object Date]'
  58350. );
  58351. }
  58352. function map(arr, fn) {
  58353. var res = [],
  58354. i;
  58355. for (i = 0; i < arr.length; ++i) {
  58356. res.push(fn(arr[i], i));
  58357. }
  58358. return res;
  58359. }
  58360. function extend(a, b) {
  58361. for (var i in b) {
  58362. if (hasOwnProp(b, i)) {
  58363. a[i] = b[i];
  58364. }
  58365. }
  58366. if (hasOwnProp(b, 'toString')) {
  58367. a.toString = b.toString;
  58368. }
  58369. if (hasOwnProp(b, 'valueOf')) {
  58370. a.valueOf = b.valueOf;
  58371. }
  58372. return a;
  58373. }
  58374. function createUTC(input, format, locale, strict) {
  58375. return createLocalOrUTC(input, format, locale, strict, true).utc();
  58376. }
  58377. function defaultParsingFlags() {
  58378. // We need to deep clone this object.
  58379. return {
  58380. empty: false,
  58381. unusedTokens: [],
  58382. unusedInput: [],
  58383. overflow: -2,
  58384. charsLeftOver: 0,
  58385. nullInput: false,
  58386. invalidEra: null,
  58387. invalidMonth: null,
  58388. invalidFormat: false,
  58389. userInvalidated: false,
  58390. iso: false,
  58391. parsedDateParts: [],
  58392. era: null,
  58393. meridiem: null,
  58394. rfc2822: false,
  58395. weekdayMismatch: false,
  58396. };
  58397. }
  58398. function getParsingFlags(m) {
  58399. if (m._pf == null) {
  58400. m._pf = defaultParsingFlags();
  58401. }
  58402. return m._pf;
  58403. }
  58404. var some;
  58405. if (Array.prototype.some) {
  58406. some = Array.prototype.some;
  58407. } else {
  58408. some = function (fun) {
  58409. var t = Object(this),
  58410. len = t.length >>> 0,
  58411. i;
  58412. for (i = 0; i < len; i++) {
  58413. if (i in t && fun.call(this, t[i], i, t)) {
  58414. return true;
  58415. }
  58416. }
  58417. return false;
  58418. };
  58419. }
  58420. function isValid(m) {
  58421. if (m._isValid == null) {
  58422. var flags = getParsingFlags(m),
  58423. parsedParts = some.call(flags.parsedDateParts, function (i) {
  58424. return i != null;
  58425. }),
  58426. isNowValid =
  58427. !isNaN(m._d.getTime()) &&
  58428. flags.overflow < 0 &&
  58429. !flags.empty &&
  58430. !flags.invalidEra &&
  58431. !flags.invalidMonth &&
  58432. !flags.invalidWeekday &&
  58433. !flags.weekdayMismatch &&
  58434. !flags.nullInput &&
  58435. !flags.invalidFormat &&
  58436. !flags.userInvalidated &&
  58437. (!flags.meridiem || (flags.meridiem && parsedParts));
  58438. if (m._strict) {
  58439. isNowValid =
  58440. isNowValid &&
  58441. flags.charsLeftOver === 0 &&
  58442. flags.unusedTokens.length === 0 &&
  58443. flags.bigHour === undefined;
  58444. }
  58445. if (Object.isFrozen == null || !Object.isFrozen(m)) {
  58446. m._isValid = isNowValid;
  58447. } else {
  58448. return isNowValid;
  58449. }
  58450. }
  58451. return m._isValid;
  58452. }
  58453. function createInvalid(flags) {
  58454. var m = createUTC(NaN);
  58455. if (flags != null) {
  58456. extend(getParsingFlags(m), flags);
  58457. } else {
  58458. getParsingFlags(m).userInvalidated = true;
  58459. }
  58460. return m;
  58461. }
  58462. // Plugins that add properties should also add the key here (null value),
  58463. // so we can properly clone ourselves.
  58464. var momentProperties = (hooks.momentProperties = []),
  58465. updateInProgress = false;
  58466. function copyConfig(to, from) {
  58467. var i, prop, val;
  58468. if (!isUndefined(from._isAMomentObject)) {
  58469. to._isAMomentObject = from._isAMomentObject;
  58470. }
  58471. if (!isUndefined(from._i)) {
  58472. to._i = from._i;
  58473. }
  58474. if (!isUndefined(from._f)) {
  58475. to._f = from._f;
  58476. }
  58477. if (!isUndefined(from._l)) {
  58478. to._l = from._l;
  58479. }
  58480. if (!isUndefined(from._strict)) {
  58481. to._strict = from._strict;
  58482. }
  58483. if (!isUndefined(from._tzm)) {
  58484. to._tzm = from._tzm;
  58485. }
  58486. if (!isUndefined(from._isUTC)) {
  58487. to._isUTC = from._isUTC;
  58488. }
  58489. if (!isUndefined(from._offset)) {
  58490. to._offset = from._offset;
  58491. }
  58492. if (!isUndefined(from._pf)) {
  58493. to._pf = getParsingFlags(from);
  58494. }
  58495. if (!isUndefined(from._locale)) {
  58496. to._locale = from._locale;
  58497. }
  58498. if (momentProperties.length > 0) {
  58499. for (i = 0; i < momentProperties.length; i++) {
  58500. prop = momentProperties[i];
  58501. val = from[prop];
  58502. if (!isUndefined(val)) {
  58503. to[prop] = val;
  58504. }
  58505. }
  58506. }
  58507. return to;
  58508. }
  58509. // Moment prototype object
  58510. function Moment(config) {
  58511. copyConfig(this, config);
  58512. this._d = new Date(config._d != null ? config._d.getTime() : NaN);
  58513. if (!this.isValid()) {
  58514. this._d = new Date(NaN);
  58515. }
  58516. // Prevent infinite loop in case updateOffset creates new moment
  58517. // objects.
  58518. if (updateInProgress === false) {
  58519. updateInProgress = true;
  58520. hooks.updateOffset(this);
  58521. updateInProgress = false;
  58522. }
  58523. }
  58524. function isMoment(obj) {
  58525. return (
  58526. obj instanceof Moment || (obj != null && obj._isAMomentObject != null)
  58527. );
  58528. }
  58529. function warn(msg) {
  58530. if (
  58531. hooks.suppressDeprecationWarnings === false &&
  58532. typeof console !== 'undefined' &&
  58533. console.warn
  58534. ) {
  58535. console.warn('Deprecation warning: ' + msg);
  58536. }
  58537. }
  58538. function deprecate(msg, fn) {
  58539. var firstTime = true;
  58540. return extend(function () {
  58541. if (hooks.deprecationHandler != null) {
  58542. hooks.deprecationHandler(null, msg);
  58543. }
  58544. if (firstTime) {
  58545. var args = [],
  58546. arg,
  58547. i,
  58548. key;
  58549. for (i = 0; i < arguments.length; i++) {
  58550. arg = '';
  58551. if (typeof arguments[i] === 'object') {
  58552. arg += '\n[' + i + '] ';
  58553. for (key in arguments[0]) {
  58554. if (hasOwnProp(arguments[0], key)) {
  58555. arg += key + ': ' + arguments[0][key] + ', ';
  58556. }
  58557. }
  58558. arg = arg.slice(0, -2); // Remove trailing comma and space
  58559. } else {
  58560. arg = arguments[i];
  58561. }
  58562. args.push(arg);
  58563. }
  58564. warn(
  58565. msg +
  58566. '\nArguments: ' +
  58567. Array.prototype.slice.call(args).join('') +
  58568. '\n' +
  58569. new Error().stack
  58570. );
  58571. firstTime = false;
  58572. }
  58573. return fn.apply(this, arguments);
  58574. }, fn);
  58575. }
  58576. var deprecations = {};
  58577. function deprecateSimple(name, msg) {
  58578. if (hooks.deprecationHandler != null) {
  58579. hooks.deprecationHandler(name, msg);
  58580. }
  58581. if (!deprecations[name]) {
  58582. warn(msg);
  58583. deprecations[name] = true;
  58584. }
  58585. }
  58586. hooks.suppressDeprecationWarnings = false;
  58587. hooks.deprecationHandler = null;
  58588. function isFunction(input) {
  58589. return (
  58590. (typeof Function !== 'undefined' && input instanceof Function) ||
  58591. Object.prototype.toString.call(input) === '[object Function]'
  58592. );
  58593. }
  58594. function set(config) {
  58595. var prop, i;
  58596. for (i in config) {
  58597. if (hasOwnProp(config, i)) {
  58598. prop = config[i];
  58599. if (isFunction(prop)) {
  58600. this[i] = prop;
  58601. } else {
  58602. this['_' + i] = prop;
  58603. }
  58604. }
  58605. }
  58606. this._config = config;
  58607. // Lenient ordinal parsing accepts just a number in addition to
  58608. // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
  58609. // TODO: Remove "ordinalParse" fallback in next major release.
  58610. this._dayOfMonthOrdinalParseLenient = new RegExp(
  58611. (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
  58612. '|' +
  58613. /\d{1,2}/.source
  58614. );
  58615. }
  58616. function mergeConfigs(parentConfig, childConfig) {
  58617. var res = extend({}, parentConfig),
  58618. prop;
  58619. for (prop in childConfig) {
  58620. if (hasOwnProp(childConfig, prop)) {
  58621. if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
  58622. res[prop] = {};
  58623. extend(res[prop], parentConfig[prop]);
  58624. extend(res[prop], childConfig[prop]);
  58625. } else if (childConfig[prop] != null) {
  58626. res[prop] = childConfig[prop];
  58627. } else {
  58628. delete res[prop];
  58629. }
  58630. }
  58631. }
  58632. for (prop in parentConfig) {
  58633. if (
  58634. hasOwnProp(parentConfig, prop) &&
  58635. !hasOwnProp(childConfig, prop) &&
  58636. isObject(parentConfig[prop])
  58637. ) {
  58638. // make sure changes to properties don't modify parent config
  58639. res[prop] = extend({}, res[prop]);
  58640. }
  58641. }
  58642. return res;
  58643. }
  58644. function Locale(config) {
  58645. if (config != null) {
  58646. this.set(config);
  58647. }
  58648. }
  58649. var keys;
  58650. if (Object.keys) {
  58651. keys = Object.keys;
  58652. } else {
  58653. keys = function (obj) {
  58654. var i,
  58655. res = [];
  58656. for (i in obj) {
  58657. if (hasOwnProp(obj, i)) {
  58658. res.push(i);
  58659. }
  58660. }
  58661. return res;
  58662. };
  58663. }
  58664. var defaultCalendar = {
  58665. sameDay: '[Today at] LT',
  58666. nextDay: '[Tomorrow at] LT',
  58667. nextWeek: 'dddd [at] LT',
  58668. lastDay: '[Yesterday at] LT',
  58669. lastWeek: '[Last] dddd [at] LT',
  58670. sameElse: 'L',
  58671. };
  58672. function calendar(key, mom, now) {
  58673. var output = this._calendar[key] || this._calendar['sameElse'];
  58674. return isFunction(output) ? output.call(mom, now) : output;
  58675. }
  58676. function zeroFill(number, targetLength, forceSign) {
  58677. var absNumber = '' + Math.abs(number),
  58678. zerosToFill = targetLength - absNumber.length,
  58679. sign = number >= 0;
  58680. return (
  58681. (sign ? (forceSign ? '+' : '') : '-') +
  58682. Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +
  58683. absNumber
  58684. );
  58685. }
  58686. var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
  58687. localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
  58688. formatFunctions = {},
  58689. formatTokenFunctions = {};
  58690. // token: 'M'
  58691. // padded: ['MM', 2]
  58692. // ordinal: 'Mo'
  58693. // callback: function () { this.month() + 1 }
  58694. function addFormatToken(token, padded, ordinal, callback) {
  58695. var func = callback;
  58696. if (typeof callback === 'string') {
  58697. func = function () {
  58698. return this[callback]();
  58699. };
  58700. }
  58701. if (token) {
  58702. formatTokenFunctions[token] = func;
  58703. }
  58704. if (padded) {
  58705. formatTokenFunctions[padded[0]] = function () {
  58706. return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
  58707. };
  58708. }
  58709. if (ordinal) {
  58710. formatTokenFunctions[ordinal] = function () {
  58711. return this.localeData().ordinal(
  58712. func.apply(this, arguments),
  58713. token
  58714. );
  58715. };
  58716. }
  58717. }
  58718. function removeFormattingTokens(input) {
  58719. if (input.match(/\[[\s\S]/)) {
  58720. return input.replace(/^\[|\]$/g, '');
  58721. }
  58722. return input.replace(/\\/g, '');
  58723. }
  58724. function makeFormatFunction(format) {
  58725. var array = format.match(formattingTokens),
  58726. i,
  58727. length;
  58728. for (i = 0, length = array.length; i < length; i++) {
  58729. if (formatTokenFunctions[array[i]]) {
  58730. array[i] = formatTokenFunctions[array[i]];
  58731. } else {
  58732. array[i] = removeFormattingTokens(array[i]);
  58733. }
  58734. }
  58735. return function (mom) {
  58736. var output = '',
  58737. i;
  58738. for (i = 0; i < length; i++) {
  58739. output += isFunction(array[i])
  58740. ? array[i].call(mom, format)
  58741. : array[i];
  58742. }
  58743. return output;
  58744. };
  58745. }
  58746. // format date using native date object
  58747. function formatMoment(m, format) {
  58748. if (!m.isValid()) {
  58749. return m.localeData().invalidDate();
  58750. }
  58751. format = expandFormat(format, m.localeData());
  58752. formatFunctions[format] =
  58753. formatFunctions[format] || makeFormatFunction(format);
  58754. return formatFunctions[format](m);
  58755. }
  58756. function expandFormat(format, locale) {
  58757. var i = 5;
  58758. function replaceLongDateFormatTokens(input) {
  58759. return locale.longDateFormat(input) || input;
  58760. }
  58761. localFormattingTokens.lastIndex = 0;
  58762. while (i >= 0 && localFormattingTokens.test(format)) {
  58763. format = format.replace(
  58764. localFormattingTokens,
  58765. replaceLongDateFormatTokens
  58766. );
  58767. localFormattingTokens.lastIndex = 0;
  58768. i -= 1;
  58769. }
  58770. return format;
  58771. }
  58772. var defaultLongDateFormat = {
  58773. LTS: 'h:mm:ss A',
  58774. LT: 'h:mm A',
  58775. L: 'MM/DD/YYYY',
  58776. LL: 'MMMM D, YYYY',
  58777. LLL: 'MMMM D, YYYY h:mm A',
  58778. LLLL: 'dddd, MMMM D, YYYY h:mm A',
  58779. };
  58780. function longDateFormat(key) {
  58781. var format = this._longDateFormat[key],
  58782. formatUpper = this._longDateFormat[key.toUpperCase()];
  58783. if (format || !formatUpper) {
  58784. return format;
  58785. }
  58786. this._longDateFormat[key] = formatUpper
  58787. .match(formattingTokens)
  58788. .map(function (tok) {
  58789. if (
  58790. tok === 'MMMM' ||
  58791. tok === 'MM' ||
  58792. tok === 'DD' ||
  58793. tok === 'dddd'
  58794. ) {
  58795. return tok.slice(1);
  58796. }
  58797. return tok;
  58798. })
  58799. .join('');
  58800. return this._longDateFormat[key];
  58801. }
  58802. var defaultInvalidDate = 'Invalid date';
  58803. function invalidDate() {
  58804. return this._invalidDate;
  58805. }
  58806. var defaultOrdinal = '%d',
  58807. defaultDayOfMonthOrdinalParse = /\d{1,2}/;
  58808. function ordinal(number) {
  58809. return this._ordinal.replace('%d', number);
  58810. }
  58811. var defaultRelativeTime = {
  58812. future: 'in %s',
  58813. past: '%s ago',
  58814. s: 'a few seconds',
  58815. ss: '%d seconds',
  58816. m: 'a minute',
  58817. mm: '%d minutes',
  58818. h: 'an hour',
  58819. hh: '%d hours',
  58820. d: 'a day',
  58821. dd: '%d days',
  58822. w: 'a week',
  58823. ww: '%d weeks',
  58824. M: 'a month',
  58825. MM: '%d months',
  58826. y: 'a year',
  58827. yy: '%d years',
  58828. };
  58829. function relativeTime(number, withoutSuffix, string, isFuture) {
  58830. var output = this._relativeTime[string];
  58831. return isFunction(output)
  58832. ? output(number, withoutSuffix, string, isFuture)
  58833. : output.replace(/%d/i, number);
  58834. }
  58835. function pastFuture(diff, output) {
  58836. var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
  58837. return isFunction(format) ? format(output) : format.replace(/%s/i, output);
  58838. }
  58839. var aliases = {};
  58840. function addUnitAlias(unit, shorthand) {
  58841. var lowerCase = unit.toLowerCase();
  58842. aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
  58843. }
  58844. function normalizeUnits(units) {
  58845. return typeof units === 'string'
  58846. ? aliases[units] || aliases[units.toLowerCase()]
  58847. : undefined;
  58848. }
  58849. function normalizeObjectUnits(inputObject) {
  58850. var normalizedInput = {},
  58851. normalizedProp,
  58852. prop;
  58853. for (prop in inputObject) {
  58854. if (hasOwnProp(inputObject, prop)) {
  58855. normalizedProp = normalizeUnits(prop);
  58856. if (normalizedProp) {
  58857. normalizedInput[normalizedProp] = inputObject[prop];
  58858. }
  58859. }
  58860. }
  58861. return normalizedInput;
  58862. }
  58863. var priorities = {};
  58864. function addUnitPriority(unit, priority) {
  58865. priorities[unit] = priority;
  58866. }
  58867. function getPrioritizedUnits(unitsObj) {
  58868. var units = [],
  58869. u;
  58870. for (u in unitsObj) {
  58871. if (hasOwnProp(unitsObj, u)) {
  58872. units.push({ unit: u, priority: priorities[u] });
  58873. }
  58874. }
  58875. units.sort(function (a, b) {
  58876. return a.priority - b.priority;
  58877. });
  58878. return units;
  58879. }
  58880. function isLeapYear(year) {
  58881. return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
  58882. }
  58883. function absFloor(number) {
  58884. if (number < 0) {
  58885. // -0 -> 0
  58886. return Math.ceil(number) || 0;
  58887. } else {
  58888. return Math.floor(number);
  58889. }
  58890. }
  58891. function toInt(argumentForCoercion) {
  58892. var coercedNumber = +argumentForCoercion,
  58893. value = 0;
  58894. if (coercedNumber !== 0 && isFinite(coercedNumber)) {
  58895. value = absFloor(coercedNumber);
  58896. }
  58897. return value;
  58898. }
  58899. function makeGetSet(unit, keepTime) {
  58900. return function (value) {
  58901. if (value != null) {
  58902. set$1(this, unit, value);
  58903. hooks.updateOffset(this, keepTime);
  58904. return this;
  58905. } else {
  58906. return get(this, unit);
  58907. }
  58908. };
  58909. }
  58910. function get(mom, unit) {
  58911. return mom.isValid()
  58912. ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()
  58913. : NaN;
  58914. }
  58915. function set$1(mom, unit, value) {
  58916. if (mom.isValid() && !isNaN(value)) {
  58917. if (
  58918. unit === 'FullYear' &&
  58919. isLeapYear(mom.year()) &&
  58920. mom.month() === 1 &&
  58921. mom.date() === 29
  58922. ) {
  58923. value = toInt(value);
  58924. mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](
  58925. value,
  58926. mom.month(),
  58927. daysInMonth(value, mom.month())
  58928. );
  58929. } else {
  58930. mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
  58931. }
  58932. }
  58933. }
  58934. // MOMENTS
  58935. function stringGet(units) {
  58936. units = normalizeUnits(units);
  58937. if (isFunction(this[units])) {
  58938. return this[units]();
  58939. }
  58940. return this;
  58941. }
  58942. function stringSet(units, value) {
  58943. if (typeof units === 'object') {
  58944. units = normalizeObjectUnits(units);
  58945. var prioritized = getPrioritizedUnits(units),
  58946. i;
  58947. for (i = 0; i < prioritized.length; i++) {
  58948. this[prioritized[i].unit](units[prioritized[i].unit]);
  58949. }
  58950. } else {
  58951. units = normalizeUnits(units);
  58952. if (isFunction(this[units])) {
  58953. return this[units](value);
  58954. }
  58955. }
  58956. return this;
  58957. }
  58958. var match1 = /\d/, // 0 - 9
  58959. match2 = /\d\d/, // 00 - 99
  58960. match3 = /\d{3}/, // 000 - 999
  58961. match4 = /\d{4}/, // 0000 - 9999
  58962. match6 = /[+-]?\d{6}/, // -999999 - 999999
  58963. match1to2 = /\d\d?/, // 0 - 99
  58964. match3to4 = /\d\d\d\d?/, // 999 - 9999
  58965. match5to6 = /\d\d\d\d\d\d?/, // 99999 - 999999
  58966. match1to3 = /\d{1,3}/, // 0 - 999
  58967. match1to4 = /\d{1,4}/, // 0 - 9999
  58968. match1to6 = /[+-]?\d{1,6}/, // -999999 - 999999
  58969. matchUnsigned = /\d+/, // 0 - inf
  58970. matchSigned = /[+-]?\d+/, // -inf - inf
  58971. matchOffset = /Z|[+-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z
  58972. matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z
  58973. matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123
  58974. // any word (or two) characters or numbers including two/three word month in arabic.
  58975. // includes scottish gaelic two word and hyphenated months
  58976. matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,
  58977. regexes;
  58978. regexes = {};
  58979. function addRegexToken(token, regex, strictRegex) {
  58980. regexes[token] = isFunction(regex)
  58981. ? regex
  58982. : function (isStrict, localeData) {
  58983. return isStrict && strictRegex ? strictRegex : regex;
  58984. };
  58985. }
  58986. function getParseRegexForToken(token, config) {
  58987. if (!hasOwnProp(regexes, token)) {
  58988. return new RegExp(unescapeFormat(token));
  58989. }
  58990. return regexes[token](config._strict, config._locale);
  58991. }
  58992. // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
  58993. function unescapeFormat(s) {
  58994. return regexEscape(
  58995. s
  58996. .replace('\\', '')
  58997. .replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (
  58998. matched,
  58999. p1,
  59000. p2,
  59001. p3,
  59002. p4
  59003. ) {
  59004. return p1 || p2 || p3 || p4;
  59005. })
  59006. );
  59007. }
  59008. function regexEscape(s) {
  59009. return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
  59010. }
  59011. var tokens = {};
  59012. function addParseToken(token, callback) {
  59013. var i,
  59014. func = callback;
  59015. if (typeof token === 'string') {
  59016. token = [token];
  59017. }
  59018. if (isNumber(callback)) {
  59019. func = function (input, array) {
  59020. array[callback] = toInt(input);
  59021. };
  59022. }
  59023. for (i = 0; i < token.length; i++) {
  59024. tokens[token[i]] = func;
  59025. }
  59026. }
  59027. function addWeekParseToken(token, callback) {
  59028. addParseToken(token, function (input, array, config, token) {
  59029. config._w = config._w || {};
  59030. callback(input, config._w, config, token);
  59031. });
  59032. }
  59033. function addTimeToArrayFromToken(token, input, config) {
  59034. if (input != null && hasOwnProp(tokens, token)) {
  59035. tokens[token](input, config._a, config, token);
  59036. }
  59037. }
  59038. var YEAR = 0,
  59039. MONTH = 1,
  59040. DATE = 2,
  59041. HOUR = 3,
  59042. MINUTE = 4,
  59043. SECOND = 5,
  59044. MILLISECOND = 6,
  59045. WEEK = 7,
  59046. WEEKDAY = 8;
  59047. function mod(n, x) {
  59048. return ((n % x) + x) % x;
  59049. }
  59050. var indexOf;
  59051. if (Array.prototype.indexOf) {
  59052. indexOf = Array.prototype.indexOf;
  59053. } else {
  59054. indexOf = function (o) {
  59055. // I know
  59056. var i;
  59057. for (i = 0; i < this.length; ++i) {
  59058. if (this[i] === o) {
  59059. return i;
  59060. }
  59061. }
  59062. return -1;
  59063. };
  59064. }
  59065. function daysInMonth(year, month) {
  59066. if (isNaN(year) || isNaN(month)) {
  59067. return NaN;
  59068. }
  59069. var modMonth = mod(month, 12);
  59070. year += (month - modMonth) / 12;
  59071. return modMonth === 1
  59072. ? isLeapYear(year)
  59073. ? 29
  59074. : 28
  59075. : 31 - ((modMonth % 7) % 2);
  59076. }
  59077. // FORMATTING
  59078. addFormatToken('M', ['MM', 2], 'Mo', function () {
  59079. return this.month() + 1;
  59080. });
  59081. addFormatToken('MMM', 0, 0, function (format) {
  59082. return this.localeData().monthsShort(this, format);
  59083. });
  59084. addFormatToken('MMMM', 0, 0, function (format) {
  59085. return this.localeData().months(this, format);
  59086. });
  59087. // ALIASES
  59088. addUnitAlias('month', 'M');
  59089. // PRIORITY
  59090. addUnitPriority('month', 8);
  59091. // PARSING
  59092. addRegexToken('M', match1to2);
  59093. addRegexToken('MM', match1to2, match2);
  59094. addRegexToken('MMM', function (isStrict, locale) {
  59095. return locale.monthsShortRegex(isStrict);
  59096. });
  59097. addRegexToken('MMMM', function (isStrict, locale) {
  59098. return locale.monthsRegex(isStrict);
  59099. });
  59100. addParseToken(['M', 'MM'], function (input, array) {
  59101. array[MONTH] = toInt(input) - 1;
  59102. });
  59103. addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
  59104. var month = config._locale.monthsParse(input, token, config._strict);
  59105. // if we didn't find a month name, mark the date as invalid.
  59106. if (month != null) {
  59107. array[MONTH] = month;
  59108. } else {
  59109. getParsingFlags(config).invalidMonth = input;
  59110. }
  59111. });
  59112. // LOCALES
  59113. var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
  59114. '_'
  59115. ),
  59116. defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split(
  59117. '_'
  59118. ),
  59119. MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,
  59120. defaultMonthsShortRegex = matchWord,
  59121. defaultMonthsRegex = matchWord;
  59122. function localeMonths(m, format) {
  59123. if (!m) {
  59124. return isArray(this._months)
  59125. ? this._months
  59126. : this._months['standalone'];
  59127. }
  59128. return isArray(this._months)
  59129. ? this._months[m.month()]
  59130. : this._months[
  59131. (this._months.isFormat || MONTHS_IN_FORMAT).test(format)
  59132. ? 'format'
  59133. : 'standalone'
  59134. ][m.month()];
  59135. }
  59136. function localeMonthsShort(m, format) {
  59137. if (!m) {
  59138. return isArray(this._monthsShort)
  59139. ? this._monthsShort
  59140. : this._monthsShort['standalone'];
  59141. }
  59142. return isArray(this._monthsShort)
  59143. ? this._monthsShort[m.month()]
  59144. : this._monthsShort[
  59145. MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'
  59146. ][m.month()];
  59147. }
  59148. function handleStrictParse(monthName, format, strict) {
  59149. var i,
  59150. ii,
  59151. mom,
  59152. llc = monthName.toLocaleLowerCase();
  59153. if (!this._monthsParse) {
  59154. // this is not used
  59155. this._monthsParse = [];
  59156. this._longMonthsParse = [];
  59157. this._shortMonthsParse = [];
  59158. for (i = 0; i < 12; ++i) {
  59159. mom = createUTC([2000, i]);
  59160. this._shortMonthsParse[i] = this.monthsShort(
  59161. mom,
  59162. ''
  59163. ).toLocaleLowerCase();
  59164. this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
  59165. }
  59166. }
  59167. if (strict) {
  59168. if (format === 'MMM') {
  59169. ii = indexOf.call(this._shortMonthsParse, llc);
  59170. return ii !== -1 ? ii : null;
  59171. } else {
  59172. ii = indexOf.call(this._longMonthsParse, llc);
  59173. return ii !== -1 ? ii : null;
  59174. }
  59175. } else {
  59176. if (format === 'MMM') {
  59177. ii = indexOf.call(this._shortMonthsParse, llc);
  59178. if (ii !== -1) {
  59179. return ii;
  59180. }
  59181. ii = indexOf.call(this._longMonthsParse, llc);
  59182. return ii !== -1 ? ii : null;
  59183. } else {
  59184. ii = indexOf.call(this._longMonthsParse, llc);
  59185. if (ii !== -1) {
  59186. return ii;
  59187. }
  59188. ii = indexOf.call(this._shortMonthsParse, llc);
  59189. return ii !== -1 ? ii : null;
  59190. }
  59191. }
  59192. }
  59193. function localeMonthsParse(monthName, format, strict) {
  59194. var i, mom, regex;
  59195. if (this._monthsParseExact) {
  59196. return handleStrictParse.call(this, monthName, format, strict);
  59197. }
  59198. if (!this._monthsParse) {
  59199. this._monthsParse = [];
  59200. this._longMonthsParse = [];
  59201. this._shortMonthsParse = [];
  59202. }
  59203. // TODO: add sorting
  59204. // Sorting makes sure if one month (or abbr) is a prefix of another
  59205. // see sorting in computeMonthsParse
  59206. for (i = 0; i < 12; i++) {
  59207. // make the regex if we don't have it already
  59208. mom = createUTC([2000, i]);
  59209. if (strict && !this._longMonthsParse[i]) {
  59210. this._longMonthsParse[i] = new RegExp(
  59211. '^' + this.months(mom, '').replace('.', '') + '$',
  59212. 'i'
  59213. );
  59214. this._shortMonthsParse[i] = new RegExp(
  59215. '^' + this.monthsShort(mom, '').replace('.', '') + '$',
  59216. 'i'
  59217. );
  59218. }
  59219. if (!strict && !this._monthsParse[i]) {
  59220. regex =
  59221. '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
  59222. this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
  59223. }
  59224. // test the regex
  59225. if (
  59226. strict &&
  59227. format === 'MMMM' &&
  59228. this._longMonthsParse[i].test(monthName)
  59229. ) {
  59230. return i;
  59231. } else if (
  59232. strict &&
  59233. format === 'MMM' &&
  59234. this._shortMonthsParse[i].test(monthName)
  59235. ) {
  59236. return i;
  59237. } else if (!strict && this._monthsParse[i].test(monthName)) {
  59238. return i;
  59239. }
  59240. }
  59241. }
  59242. // MOMENTS
  59243. function setMonth(mom, value) {
  59244. var dayOfMonth;
  59245. if (!mom.isValid()) {
  59246. // No op
  59247. return mom;
  59248. }
  59249. if (typeof value === 'string') {
  59250. if (/^\d+$/.test(value)) {
  59251. value = toInt(value);
  59252. } else {
  59253. value = mom.localeData().monthsParse(value);
  59254. // TODO: Another silent failure?
  59255. if (!isNumber(value)) {
  59256. return mom;
  59257. }
  59258. }
  59259. }
  59260. dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
  59261. mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
  59262. return mom;
  59263. }
  59264. function getSetMonth(value) {
  59265. if (value != null) {
  59266. setMonth(this, value);
  59267. hooks.updateOffset(this, true);
  59268. return this;
  59269. } else {
  59270. return get(this, 'Month');
  59271. }
  59272. }
  59273. function getDaysInMonth() {
  59274. return daysInMonth(this.year(), this.month());
  59275. }
  59276. function monthsShortRegex(isStrict) {
  59277. if (this._monthsParseExact) {
  59278. if (!hasOwnProp(this, '_monthsRegex')) {
  59279. computeMonthsParse.call(this);
  59280. }
  59281. if (isStrict) {
  59282. return this._monthsShortStrictRegex;
  59283. } else {
  59284. return this._monthsShortRegex;
  59285. }
  59286. } else {
  59287. if (!hasOwnProp(this, '_monthsShortRegex')) {
  59288. this._monthsShortRegex = defaultMonthsShortRegex;
  59289. }
  59290. return this._monthsShortStrictRegex && isStrict
  59291. ? this._monthsShortStrictRegex
  59292. : this._monthsShortRegex;
  59293. }
  59294. }
  59295. function monthsRegex(isStrict) {
  59296. if (this._monthsParseExact) {
  59297. if (!hasOwnProp(this, '_monthsRegex')) {
  59298. computeMonthsParse.call(this);
  59299. }
  59300. if (isStrict) {
  59301. return this._monthsStrictRegex;
  59302. } else {
  59303. return this._monthsRegex;
  59304. }
  59305. } else {
  59306. if (!hasOwnProp(this, '_monthsRegex')) {
  59307. this._monthsRegex = defaultMonthsRegex;
  59308. }
  59309. return this._monthsStrictRegex && isStrict
  59310. ? this._monthsStrictRegex
  59311. : this._monthsRegex;
  59312. }
  59313. }
  59314. function computeMonthsParse() {
  59315. function cmpLenRev(a, b) {
  59316. return b.length - a.length;
  59317. }
  59318. var shortPieces = [],
  59319. longPieces = [],
  59320. mixedPieces = [],
  59321. i,
  59322. mom;
  59323. for (i = 0; i < 12; i++) {
  59324. // make the regex if we don't have it already
  59325. mom = createUTC([2000, i]);
  59326. shortPieces.push(this.monthsShort(mom, ''));
  59327. longPieces.push(this.months(mom, ''));
  59328. mixedPieces.push(this.months(mom, ''));
  59329. mixedPieces.push(this.monthsShort(mom, ''));
  59330. }
  59331. // Sorting makes sure if one month (or abbr) is a prefix of another it
  59332. // will match the longer piece.
  59333. shortPieces.sort(cmpLenRev);
  59334. longPieces.sort(cmpLenRev);
  59335. mixedPieces.sort(cmpLenRev);
  59336. for (i = 0; i < 12; i++) {
  59337. shortPieces[i] = regexEscape(shortPieces[i]);
  59338. longPieces[i] = regexEscape(longPieces[i]);
  59339. }
  59340. for (i = 0; i < 24; i++) {
  59341. mixedPieces[i] = regexEscape(mixedPieces[i]);
  59342. }
  59343. this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
  59344. this._monthsShortRegex = this._monthsRegex;
  59345. this._monthsStrictRegex = new RegExp(
  59346. '^(' + longPieces.join('|') + ')',
  59347. 'i'
  59348. );
  59349. this._monthsShortStrictRegex = new RegExp(
  59350. '^(' + shortPieces.join('|') + ')',
  59351. 'i'
  59352. );
  59353. }
  59354. // FORMATTING
  59355. addFormatToken('Y', 0, 0, function () {
  59356. var y = this.year();
  59357. return y <= 9999 ? zeroFill(y, 4) : '+' + y;
  59358. });
  59359. addFormatToken(0, ['YY', 2], 0, function () {
  59360. return this.year() % 100;
  59361. });
  59362. addFormatToken(0, ['YYYY', 4], 0, 'year');
  59363. addFormatToken(0, ['YYYYY', 5], 0, 'year');
  59364. addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
  59365. // ALIASES
  59366. addUnitAlias('year', 'y');
  59367. // PRIORITIES
  59368. addUnitPriority('year', 1);
  59369. // PARSING
  59370. addRegexToken('Y', matchSigned);
  59371. addRegexToken('YY', match1to2, match2);
  59372. addRegexToken('YYYY', match1to4, match4);
  59373. addRegexToken('YYYYY', match1to6, match6);
  59374. addRegexToken('YYYYYY', match1to6, match6);
  59375. addParseToken(['YYYYY', 'YYYYYY'], YEAR);
  59376. addParseToken('YYYY', function (input, array) {
  59377. array[YEAR] =
  59378. input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
  59379. });
  59380. addParseToken('YY', function (input, array) {
  59381. array[YEAR] = hooks.parseTwoDigitYear(input);
  59382. });
  59383. addParseToken('Y', function (input, array) {
  59384. array[YEAR] = parseInt(input, 10);
  59385. });
  59386. // HELPERS
  59387. function daysInYear(year) {
  59388. return isLeapYear(year) ? 366 : 365;
  59389. }
  59390. // HOOKS
  59391. hooks.parseTwoDigitYear = function (input) {
  59392. return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
  59393. };
  59394. // MOMENTS
  59395. var getSetYear = makeGetSet('FullYear', true);
  59396. function getIsLeapYear() {
  59397. return isLeapYear(this.year());
  59398. }
  59399. function createDate(y, m, d, h, M, s, ms) {
  59400. // can't just apply() to create a date:
  59401. // https://stackoverflow.com/q/181348
  59402. var date;
  59403. // the date constructor remaps years 0-99 to 1900-1999
  59404. if (y < 100 && y >= 0) {
  59405. // preserve leap years using a full 400 year cycle, then reset
  59406. date = new Date(y + 400, m, d, h, M, s, ms);
  59407. if (isFinite(date.getFullYear())) {
  59408. date.setFullYear(y);
  59409. }
  59410. } else {
  59411. date = new Date(y, m, d, h, M, s, ms);
  59412. }
  59413. return date;
  59414. }
  59415. function createUTCDate(y) {
  59416. var date, args;
  59417. // the Date.UTC function remaps years 0-99 to 1900-1999
  59418. if (y < 100 && y >= 0) {
  59419. args = Array.prototype.slice.call(arguments);
  59420. // preserve leap years using a full 400 year cycle, then reset
  59421. args[0] = y + 400;
  59422. date = new Date(Date.UTC.apply(null, args));
  59423. if (isFinite(date.getUTCFullYear())) {
  59424. date.setUTCFullYear(y);
  59425. }
  59426. } else {
  59427. date = new Date(Date.UTC.apply(null, arguments));
  59428. }
  59429. return date;
  59430. }
  59431. // start-of-first-week - start-of-year
  59432. function firstWeekOffset(year, dow, doy) {
  59433. var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
  59434. fwd = 7 + dow - doy,
  59435. // first-week day local weekday -- which local weekday is fwd
  59436. fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
  59437. return -fwdlw + fwd - 1;
  59438. }
  59439. // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
  59440. function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
  59441. var localWeekday = (7 + weekday - dow) % 7,
  59442. weekOffset = firstWeekOffset(year, dow, doy),
  59443. dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
  59444. resYear,
  59445. resDayOfYear;
  59446. if (dayOfYear <= 0) {
  59447. resYear = year - 1;
  59448. resDayOfYear = daysInYear(resYear) + dayOfYear;
  59449. } else if (dayOfYear > daysInYear(year)) {
  59450. resYear = year + 1;
  59451. resDayOfYear = dayOfYear - daysInYear(year);
  59452. } else {
  59453. resYear = year;
  59454. resDayOfYear = dayOfYear;
  59455. }
  59456. return {
  59457. year: resYear,
  59458. dayOfYear: resDayOfYear,
  59459. };
  59460. }
  59461. function weekOfYear(mom, dow, doy) {
  59462. var weekOffset = firstWeekOffset(mom.year(), dow, doy),
  59463. week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
  59464. resWeek,
  59465. resYear;
  59466. if (week < 1) {
  59467. resYear = mom.year() - 1;
  59468. resWeek = week + weeksInYear(resYear, dow, doy);
  59469. } else if (week > weeksInYear(mom.year(), dow, doy)) {
  59470. resWeek = week - weeksInYear(mom.year(), dow, doy);
  59471. resYear = mom.year() + 1;
  59472. } else {
  59473. resYear = mom.year();
  59474. resWeek = week;
  59475. }
  59476. return {
  59477. week: resWeek,
  59478. year: resYear,
  59479. };
  59480. }
  59481. function weeksInYear(year, dow, doy) {
  59482. var weekOffset = firstWeekOffset(year, dow, doy),
  59483. weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
  59484. return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
  59485. }
  59486. // FORMATTING
  59487. addFormatToken('w', ['ww', 2], 'wo', 'week');
  59488. addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
  59489. // ALIASES
  59490. addUnitAlias('week', 'w');
  59491. addUnitAlias('isoWeek', 'W');
  59492. // PRIORITIES
  59493. addUnitPriority('week', 5);
  59494. addUnitPriority('isoWeek', 5);
  59495. // PARSING
  59496. addRegexToken('w', match1to2);
  59497. addRegexToken('ww', match1to2, match2);
  59498. addRegexToken('W', match1to2);
  59499. addRegexToken('WW', match1to2, match2);
  59500. addWeekParseToken(['w', 'ww', 'W', 'WW'], function (
  59501. input,
  59502. week,
  59503. config,
  59504. token
  59505. ) {
  59506. week[token.substr(0, 1)] = toInt(input);
  59507. });
  59508. // HELPERS
  59509. // LOCALES
  59510. function localeWeek(mom) {
  59511. return weekOfYear(mom, this._week.dow, this._week.doy).week;
  59512. }
  59513. var defaultLocaleWeek = {
  59514. dow: 0, // Sunday is the first day of the week.
  59515. doy: 6, // The week that contains Jan 6th is the first week of the year.
  59516. };
  59517. function localeFirstDayOfWeek() {
  59518. return this._week.dow;
  59519. }
  59520. function localeFirstDayOfYear() {
  59521. return this._week.doy;
  59522. }
  59523. // MOMENTS
  59524. function getSetWeek(input) {
  59525. var week = this.localeData().week(this);
  59526. return input == null ? week : this.add((input - week) * 7, 'd');
  59527. }
  59528. function getSetISOWeek(input) {
  59529. var week = weekOfYear(this, 1, 4).week;
  59530. return input == null ? week : this.add((input - week) * 7, 'd');
  59531. }
  59532. // FORMATTING
  59533. addFormatToken('d', 0, 'do', 'day');
  59534. addFormatToken('dd', 0, 0, function (format) {
  59535. return this.localeData().weekdaysMin(this, format);
  59536. });
  59537. addFormatToken('ddd', 0, 0, function (format) {
  59538. return this.localeData().weekdaysShort(this, format);
  59539. });
  59540. addFormatToken('dddd', 0, 0, function (format) {
  59541. return this.localeData().weekdays(this, format);
  59542. });
  59543. addFormatToken('e', 0, 0, 'weekday');
  59544. addFormatToken('E', 0, 0, 'isoWeekday');
  59545. // ALIASES
  59546. addUnitAlias('day', 'd');
  59547. addUnitAlias('weekday', 'e');
  59548. addUnitAlias('isoWeekday', 'E');
  59549. // PRIORITY
  59550. addUnitPriority('day', 11);
  59551. addUnitPriority('weekday', 11);
  59552. addUnitPriority('isoWeekday', 11);
  59553. // PARSING
  59554. addRegexToken('d', match1to2);
  59555. addRegexToken('e', match1to2);
  59556. addRegexToken('E', match1to2);
  59557. addRegexToken('dd', function (isStrict, locale) {
  59558. return locale.weekdaysMinRegex(isStrict);
  59559. });
  59560. addRegexToken('ddd', function (isStrict, locale) {
  59561. return locale.weekdaysShortRegex(isStrict);
  59562. });
  59563. addRegexToken('dddd', function (isStrict, locale) {
  59564. return locale.weekdaysRegex(isStrict);
  59565. });
  59566. addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
  59567. var weekday = config._locale.weekdaysParse(input, token, config._strict);
  59568. // if we didn't get a weekday name, mark the date as invalid
  59569. if (weekday != null) {
  59570. week.d = weekday;
  59571. } else {
  59572. getParsingFlags(config).invalidWeekday = input;
  59573. }
  59574. });
  59575. addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
  59576. week[token] = toInt(input);
  59577. });
  59578. // HELPERS
  59579. function parseWeekday(input, locale) {
  59580. if (typeof input !== 'string') {
  59581. return input;
  59582. }
  59583. if (!isNaN(input)) {
  59584. return parseInt(input, 10);
  59585. }
  59586. input = locale.weekdaysParse(input);
  59587. if (typeof input === 'number') {
  59588. return input;
  59589. }
  59590. return null;
  59591. }
  59592. function parseIsoWeekday(input, locale) {
  59593. if (typeof input === 'string') {
  59594. return locale.weekdaysParse(input) % 7 || 7;
  59595. }
  59596. return isNaN(input) ? null : input;
  59597. }
  59598. // LOCALES
  59599. function shiftWeekdays(ws, n) {
  59600. return ws.slice(n, 7).concat(ws.slice(0, n));
  59601. }
  59602. var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
  59603. '_'
  59604. ),
  59605. defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  59606. defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  59607. defaultWeekdaysRegex = matchWord,
  59608. defaultWeekdaysShortRegex = matchWord,
  59609. defaultWeekdaysMinRegex = matchWord;
  59610. function localeWeekdays(m, format) {
  59611. var weekdays = isArray(this._weekdays)
  59612. ? this._weekdays
  59613. : this._weekdays[
  59614. m && m !== true && this._weekdays.isFormat.test(format)
  59615. ? 'format'
  59616. : 'standalone'
  59617. ];
  59618. return m === true
  59619. ? shiftWeekdays(weekdays, this._week.dow)
  59620. : m
  59621. ? weekdays[m.day()]
  59622. : weekdays;
  59623. }
  59624. function localeWeekdaysShort(m) {
  59625. return m === true
  59626. ? shiftWeekdays(this._weekdaysShort, this._week.dow)
  59627. : m
  59628. ? this._weekdaysShort[m.day()]
  59629. : this._weekdaysShort;
  59630. }
  59631. function localeWeekdaysMin(m) {
  59632. return m === true
  59633. ? shiftWeekdays(this._weekdaysMin, this._week.dow)
  59634. : m
  59635. ? this._weekdaysMin[m.day()]
  59636. : this._weekdaysMin;
  59637. }
  59638. function handleStrictParse$1(weekdayName, format, strict) {
  59639. var i,
  59640. ii,
  59641. mom,
  59642. llc = weekdayName.toLocaleLowerCase();
  59643. if (!this._weekdaysParse) {
  59644. this._weekdaysParse = [];
  59645. this._shortWeekdaysParse = [];
  59646. this._minWeekdaysParse = [];
  59647. for (i = 0; i < 7; ++i) {
  59648. mom = createUTC([2000, 1]).day(i);
  59649. this._minWeekdaysParse[i] = this.weekdaysMin(
  59650. mom,
  59651. ''
  59652. ).toLocaleLowerCase();
  59653. this._shortWeekdaysParse[i] = this.weekdaysShort(
  59654. mom,
  59655. ''
  59656. ).toLocaleLowerCase();
  59657. this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();
  59658. }
  59659. }
  59660. if (strict) {
  59661. if (format === 'dddd') {
  59662. ii = indexOf.call(this._weekdaysParse, llc);
  59663. return ii !== -1 ? ii : null;
  59664. } else if (format === 'ddd') {
  59665. ii = indexOf.call(this._shortWeekdaysParse, llc);
  59666. return ii !== -1 ? ii : null;
  59667. } else {
  59668. ii = indexOf.call(this._minWeekdaysParse, llc);
  59669. return ii !== -1 ? ii : null;
  59670. }
  59671. } else {
  59672. if (format === 'dddd') {
  59673. ii = indexOf.call(this._weekdaysParse, llc);
  59674. if (ii !== -1) {
  59675. return ii;
  59676. }
  59677. ii = indexOf.call(this._shortWeekdaysParse, llc);
  59678. if (ii !== -1) {
  59679. return ii;
  59680. }
  59681. ii = indexOf.call(this._minWeekdaysParse, llc);
  59682. return ii !== -1 ? ii : null;
  59683. } else if (format === 'ddd') {
  59684. ii = indexOf.call(this._shortWeekdaysParse, llc);
  59685. if (ii !== -1) {
  59686. return ii;
  59687. }
  59688. ii = indexOf.call(this._weekdaysParse, llc);
  59689. if (ii !== -1) {
  59690. return ii;
  59691. }
  59692. ii = indexOf.call(this._minWeekdaysParse, llc);
  59693. return ii !== -1 ? ii : null;
  59694. } else {
  59695. ii = indexOf.call(this._minWeekdaysParse, llc);
  59696. if (ii !== -1) {
  59697. return ii;
  59698. }
  59699. ii = indexOf.call(this._weekdaysParse, llc);
  59700. if (ii !== -1) {
  59701. return ii;
  59702. }
  59703. ii = indexOf.call(this._shortWeekdaysParse, llc);
  59704. return ii !== -1 ? ii : null;
  59705. }
  59706. }
  59707. }
  59708. function localeWeekdaysParse(weekdayName, format, strict) {
  59709. var i, mom, regex;
  59710. if (this._weekdaysParseExact) {
  59711. return handleStrictParse$1.call(this, weekdayName, format, strict);
  59712. }
  59713. if (!this._weekdaysParse) {
  59714. this._weekdaysParse = [];
  59715. this._minWeekdaysParse = [];
  59716. this._shortWeekdaysParse = [];
  59717. this._fullWeekdaysParse = [];
  59718. }
  59719. for (i = 0; i < 7; i++) {
  59720. // make the regex if we don't have it already
  59721. mom = createUTC([2000, 1]).day(i);
  59722. if (strict && !this._fullWeekdaysParse[i]) {
  59723. this._fullWeekdaysParse[i] = new RegExp(
  59724. '^' + this.weekdays(mom, '').replace('.', '\\.?') + '$',
  59725. 'i'
  59726. );
  59727. this._shortWeekdaysParse[i] = new RegExp(
  59728. '^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$',
  59729. 'i'
  59730. );
  59731. this._minWeekdaysParse[i] = new RegExp(
  59732. '^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$',
  59733. 'i'
  59734. );
  59735. }
  59736. if (!this._weekdaysParse[i]) {
  59737. regex =
  59738. '^' +
  59739. this.weekdays(mom, '') +
  59740. '|^' +
  59741. this.weekdaysShort(mom, '') +
  59742. '|^' +
  59743. this.weekdaysMin(mom, '');
  59744. this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
  59745. }
  59746. // test the regex
  59747. if (
  59748. strict &&
  59749. format === 'dddd' &&
  59750. this._fullWeekdaysParse[i].test(weekdayName)
  59751. ) {
  59752. return i;
  59753. } else if (
  59754. strict &&
  59755. format === 'ddd' &&
  59756. this._shortWeekdaysParse[i].test(weekdayName)
  59757. ) {
  59758. return i;
  59759. } else if (
  59760. strict &&
  59761. format === 'dd' &&
  59762. this._minWeekdaysParse[i].test(weekdayName)
  59763. ) {
  59764. return i;
  59765. } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
  59766. return i;
  59767. }
  59768. }
  59769. }
  59770. // MOMENTS
  59771. function getSetDayOfWeek(input) {
  59772. if (!this.isValid()) {
  59773. return input != null ? this : NaN;
  59774. }
  59775. var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
  59776. if (input != null) {
  59777. input = parseWeekday(input, this.localeData());
  59778. return this.add(input - day, 'd');
  59779. } else {
  59780. return day;
  59781. }
  59782. }
  59783. function getSetLocaleDayOfWeek(input) {
  59784. if (!this.isValid()) {
  59785. return input != null ? this : NaN;
  59786. }
  59787. var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
  59788. return input == null ? weekday : this.add(input - weekday, 'd');
  59789. }
  59790. function getSetISODayOfWeek(input) {
  59791. if (!this.isValid()) {
  59792. return input != null ? this : NaN;
  59793. }
  59794. // behaves the same as moment#day except
  59795. // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
  59796. // as a setter, sunday should belong to the previous week.
  59797. if (input != null) {
  59798. var weekday = parseIsoWeekday(input, this.localeData());
  59799. return this.day(this.day() % 7 ? weekday : weekday - 7);
  59800. } else {
  59801. return this.day() || 7;
  59802. }
  59803. }
  59804. function weekdaysRegex(isStrict) {
  59805. if (this._weekdaysParseExact) {
  59806. if (!hasOwnProp(this, '_weekdaysRegex')) {
  59807. computeWeekdaysParse.call(this);
  59808. }
  59809. if (isStrict) {
  59810. return this._weekdaysStrictRegex;
  59811. } else {
  59812. return this._weekdaysRegex;
  59813. }
  59814. } else {
  59815. if (!hasOwnProp(this, '_weekdaysRegex')) {
  59816. this._weekdaysRegex = defaultWeekdaysRegex;
  59817. }
  59818. return this._weekdaysStrictRegex && isStrict
  59819. ? this._weekdaysStrictRegex
  59820. : this._weekdaysRegex;
  59821. }
  59822. }
  59823. function weekdaysShortRegex(isStrict) {
  59824. if (this._weekdaysParseExact) {
  59825. if (!hasOwnProp(this, '_weekdaysRegex')) {
  59826. computeWeekdaysParse.call(this);
  59827. }
  59828. if (isStrict) {
  59829. return this._weekdaysShortStrictRegex;
  59830. } else {
  59831. return this._weekdaysShortRegex;
  59832. }
  59833. } else {
  59834. if (!hasOwnProp(this, '_weekdaysShortRegex')) {
  59835. this._weekdaysShortRegex = defaultWeekdaysShortRegex;
  59836. }
  59837. return this._weekdaysShortStrictRegex && isStrict
  59838. ? this._weekdaysShortStrictRegex
  59839. : this._weekdaysShortRegex;
  59840. }
  59841. }
  59842. function weekdaysMinRegex(isStrict) {
  59843. if (this._weekdaysParseExact) {
  59844. if (!hasOwnProp(this, '_weekdaysRegex')) {
  59845. computeWeekdaysParse.call(this);
  59846. }
  59847. if (isStrict) {
  59848. return this._weekdaysMinStrictRegex;
  59849. } else {
  59850. return this._weekdaysMinRegex;
  59851. }
  59852. } else {
  59853. if (!hasOwnProp(this, '_weekdaysMinRegex')) {
  59854. this._weekdaysMinRegex = defaultWeekdaysMinRegex;
  59855. }
  59856. return this._weekdaysMinStrictRegex && isStrict
  59857. ? this._weekdaysMinStrictRegex
  59858. : this._weekdaysMinRegex;
  59859. }
  59860. }
  59861. function computeWeekdaysParse() {
  59862. function cmpLenRev(a, b) {
  59863. return b.length - a.length;
  59864. }
  59865. var minPieces = [],
  59866. shortPieces = [],
  59867. longPieces = [],
  59868. mixedPieces = [],
  59869. i,
  59870. mom,
  59871. minp,
  59872. shortp,
  59873. longp;
  59874. for (i = 0; i < 7; i++) {
  59875. // make the regex if we don't have it already
  59876. mom = createUTC([2000, 1]).day(i);
  59877. minp = regexEscape(this.weekdaysMin(mom, ''));
  59878. shortp = regexEscape(this.weekdaysShort(mom, ''));
  59879. longp = regexEscape(this.weekdays(mom, ''));
  59880. minPieces.push(minp);
  59881. shortPieces.push(shortp);
  59882. longPieces.push(longp);
  59883. mixedPieces.push(minp);
  59884. mixedPieces.push(shortp);
  59885. mixedPieces.push(longp);
  59886. }
  59887. // Sorting makes sure if one weekday (or abbr) is a prefix of another it
  59888. // will match the longer piece.
  59889. minPieces.sort(cmpLenRev);
  59890. shortPieces.sort(cmpLenRev);
  59891. longPieces.sort(cmpLenRev);
  59892. mixedPieces.sort(cmpLenRev);
  59893. this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
  59894. this._weekdaysShortRegex = this._weekdaysRegex;
  59895. this._weekdaysMinRegex = this._weekdaysRegex;
  59896. this._weekdaysStrictRegex = new RegExp(
  59897. '^(' + longPieces.join('|') + ')',
  59898. 'i'
  59899. );
  59900. this._weekdaysShortStrictRegex = new RegExp(
  59901. '^(' + shortPieces.join('|') + ')',
  59902. 'i'
  59903. );
  59904. this._weekdaysMinStrictRegex = new RegExp(
  59905. '^(' + minPieces.join('|') + ')',
  59906. 'i'
  59907. );
  59908. }
  59909. // FORMATTING
  59910. function hFormat() {
  59911. return this.hours() % 12 || 12;
  59912. }
  59913. function kFormat() {
  59914. return this.hours() || 24;
  59915. }
  59916. addFormatToken('H', ['HH', 2], 0, 'hour');
  59917. addFormatToken('h', ['hh', 2], 0, hFormat);
  59918. addFormatToken('k', ['kk', 2], 0, kFormat);
  59919. addFormatToken('hmm', 0, 0, function () {
  59920. return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
  59921. });
  59922. addFormatToken('hmmss', 0, 0, function () {
  59923. return (
  59924. '' +
  59925. hFormat.apply(this) +
  59926. zeroFill(this.minutes(), 2) +
  59927. zeroFill(this.seconds(), 2)
  59928. );
  59929. });
  59930. addFormatToken('Hmm', 0, 0, function () {
  59931. return '' + this.hours() + zeroFill(this.minutes(), 2);
  59932. });
  59933. addFormatToken('Hmmss', 0, 0, function () {
  59934. return (
  59935. '' +
  59936. this.hours() +
  59937. zeroFill(this.minutes(), 2) +
  59938. zeroFill(this.seconds(), 2)
  59939. );
  59940. });
  59941. function meridiem(token, lowercase) {
  59942. addFormatToken(token, 0, 0, function () {
  59943. return this.localeData().meridiem(
  59944. this.hours(),
  59945. this.minutes(),
  59946. lowercase
  59947. );
  59948. });
  59949. }
  59950. meridiem('a', true);
  59951. meridiem('A', false);
  59952. // ALIASES
  59953. addUnitAlias('hour', 'h');
  59954. // PRIORITY
  59955. addUnitPriority('hour', 13);
  59956. // PARSING
  59957. function matchMeridiem(isStrict, locale) {
  59958. return locale._meridiemParse;
  59959. }
  59960. addRegexToken('a', matchMeridiem);
  59961. addRegexToken('A', matchMeridiem);
  59962. addRegexToken('H', match1to2);
  59963. addRegexToken('h', match1to2);
  59964. addRegexToken('k', match1to2);
  59965. addRegexToken('HH', match1to2, match2);
  59966. addRegexToken('hh', match1to2, match2);
  59967. addRegexToken('kk', match1to2, match2);
  59968. addRegexToken('hmm', match3to4);
  59969. addRegexToken('hmmss', match5to6);
  59970. addRegexToken('Hmm', match3to4);
  59971. addRegexToken('Hmmss', match5to6);
  59972. addParseToken(['H', 'HH'], HOUR);
  59973. addParseToken(['k', 'kk'], function (input, array, config) {
  59974. var kInput = toInt(input);
  59975. array[HOUR] = kInput === 24 ? 0 : kInput;
  59976. });
  59977. addParseToken(['a', 'A'], function (input, array, config) {
  59978. config._isPm = config._locale.isPM(input);
  59979. config._meridiem = input;
  59980. });
  59981. addParseToken(['h', 'hh'], function (input, array, config) {
  59982. array[HOUR] = toInt(input);
  59983. getParsingFlags(config).bigHour = true;
  59984. });
  59985. addParseToken('hmm', function (input, array, config) {
  59986. var pos = input.length - 2;
  59987. array[HOUR] = toInt(input.substr(0, pos));
  59988. array[MINUTE] = toInt(input.substr(pos));
  59989. getParsingFlags(config).bigHour = true;
  59990. });
  59991. addParseToken('hmmss', function (input, array, config) {
  59992. var pos1 = input.length - 4,
  59993. pos2 = input.length - 2;
  59994. array[HOUR] = toInt(input.substr(0, pos1));
  59995. array[MINUTE] = toInt(input.substr(pos1, 2));
  59996. array[SECOND] = toInt(input.substr(pos2));
  59997. getParsingFlags(config).bigHour = true;
  59998. });
  59999. addParseToken('Hmm', function (input, array, config) {
  60000. var pos = input.length - 2;
  60001. array[HOUR] = toInt(input.substr(0, pos));
  60002. array[MINUTE] = toInt(input.substr(pos));
  60003. });
  60004. addParseToken('Hmmss', function (input, array, config) {
  60005. var pos1 = input.length - 4,
  60006. pos2 = input.length - 2;
  60007. array[HOUR] = toInt(input.substr(0, pos1));
  60008. array[MINUTE] = toInt(input.substr(pos1, 2));
  60009. array[SECOND] = toInt(input.substr(pos2));
  60010. });
  60011. // LOCALES
  60012. function localeIsPM(input) {
  60013. // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
  60014. // Using charAt should be more compatible.
  60015. return (input + '').toLowerCase().charAt(0) === 'p';
  60016. }
  60017. var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i,
  60018. // Setting the hour should keep the time, because the user explicitly
  60019. // specified which hour they want. So trying to maintain the same hour (in
  60020. // a new timezone) makes sense. Adding/subtracting hours does not follow
  60021. // this rule.
  60022. getSetHour = makeGetSet('Hours', true);
  60023. function localeMeridiem(hours, minutes, isLower) {
  60024. if (hours > 11) {
  60025. return isLower ? 'pm' : 'PM';
  60026. } else {
  60027. return isLower ? 'am' : 'AM';
  60028. }
  60029. }
  60030. var baseConfig = {
  60031. calendar: defaultCalendar,
  60032. longDateFormat: defaultLongDateFormat,
  60033. invalidDate: defaultInvalidDate,
  60034. ordinal: defaultOrdinal,
  60035. dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
  60036. relativeTime: defaultRelativeTime,
  60037. months: defaultLocaleMonths,
  60038. monthsShort: defaultLocaleMonthsShort,
  60039. week: defaultLocaleWeek,
  60040. weekdays: defaultLocaleWeekdays,
  60041. weekdaysMin: defaultLocaleWeekdaysMin,
  60042. weekdaysShort: defaultLocaleWeekdaysShort,
  60043. meridiemParse: defaultLocaleMeridiemParse,
  60044. };
  60045. // internal storage for locale config files
  60046. var locales = {},
  60047. localeFamilies = {},
  60048. globalLocale;
  60049. function commonPrefix(arr1, arr2) {
  60050. var i,
  60051. minl = Math.min(arr1.length, arr2.length);
  60052. for (i = 0; i < minl; i += 1) {
  60053. if (arr1[i] !== arr2[i]) {
  60054. return i;
  60055. }
  60056. }
  60057. return minl;
  60058. }
  60059. function normalizeLocale(key) {
  60060. return key ? key.toLowerCase().replace('_', '-') : key;
  60061. }
  60062. // pick the locale from the array
  60063. // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
  60064. // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
  60065. function chooseLocale(names) {
  60066. var i = 0,
  60067. j,
  60068. next,
  60069. locale,
  60070. split;
  60071. while (i < names.length) {
  60072. split = normalizeLocale(names[i]).split('-');
  60073. j = split.length;
  60074. next = normalizeLocale(names[i + 1]);
  60075. next = next ? next.split('-') : null;
  60076. while (j > 0) {
  60077. locale = loadLocale(split.slice(0, j).join('-'));
  60078. if (locale) {
  60079. return locale;
  60080. }
  60081. if (
  60082. next &&
  60083. next.length >= j &&
  60084. commonPrefix(split, next) >= j - 1
  60085. ) {
  60086. //the next array item is better than a shallower substring of this one
  60087. break;
  60088. }
  60089. j--;
  60090. }
  60091. i++;
  60092. }
  60093. return globalLocale;
  60094. }
  60095. function loadLocale(name) {
  60096. var oldLocale = null,
  60097. aliasedRequire;
  60098. // TODO: Find a better way to register and load all the locales in Node
  60099. if (
  60100. locales[name] === undefined &&
  60101. "object" !== 'undefined' &&
  60102. module &&
  60103. module.exports
  60104. ) {
  60105. try {
  60106. oldLocale = globalLocale._abbr;
  60107. aliasedRequire = undefined;
  60108. __webpack_require__(46700)("./" + name);
  60109. getSetGlobalLocale(oldLocale);
  60110. } catch (e) {
  60111. // mark as not found to avoid repeating expensive file require call causing high CPU
  60112. // when trying to find en-US, en_US, en-us for every format call
  60113. locales[name] = null; // null means not found
  60114. }
  60115. }
  60116. return locales[name];
  60117. }
  60118. // This function will load locale and then set the global locale. If
  60119. // no arguments are passed in, it will simply return the current global
  60120. // locale key.
  60121. function getSetGlobalLocale(key, values) {
  60122. var data;
  60123. if (key) {
  60124. if (isUndefined(values)) {
  60125. data = getLocale(key);
  60126. } else {
  60127. data = defineLocale(key, values);
  60128. }
  60129. if (data) {
  60130. // moment.duration._locale = moment._locale = data;
  60131. globalLocale = data;
  60132. } else {
  60133. if (typeof console !== 'undefined' && console.warn) {
  60134. //warn user if arguments are passed but the locale could not be set
  60135. console.warn(
  60136. 'Locale ' + key + ' not found. Did you forget to load it?'
  60137. );
  60138. }
  60139. }
  60140. }
  60141. return globalLocale._abbr;
  60142. }
  60143. function defineLocale(name, config) {
  60144. if (config !== null) {
  60145. var locale,
  60146. parentConfig = baseConfig;
  60147. config.abbr = name;
  60148. if (locales[name] != null) {
  60149. deprecateSimple(
  60150. 'defineLocaleOverride',
  60151. 'use moment.updateLocale(localeName, config) to change ' +
  60152. 'an existing locale. moment.defineLocale(localeName, ' +
  60153. 'config) should only be used for creating a new locale ' +
  60154. 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'
  60155. );
  60156. parentConfig = locales[name]._config;
  60157. } else if (config.parentLocale != null) {
  60158. if (locales[config.parentLocale] != null) {
  60159. parentConfig = locales[config.parentLocale]._config;
  60160. } else {
  60161. locale = loadLocale(config.parentLocale);
  60162. if (locale != null) {
  60163. parentConfig = locale._config;
  60164. } else {
  60165. if (!localeFamilies[config.parentLocale]) {
  60166. localeFamilies[config.parentLocale] = [];
  60167. }
  60168. localeFamilies[config.parentLocale].push({
  60169. name: name,
  60170. config: config,
  60171. });
  60172. return null;
  60173. }
  60174. }
  60175. }
  60176. locales[name] = new Locale(mergeConfigs(parentConfig, config));
  60177. if (localeFamilies[name]) {
  60178. localeFamilies[name].forEach(function (x) {
  60179. defineLocale(x.name, x.config);
  60180. });
  60181. }
  60182. // backwards compat for now: also set the locale
  60183. // make sure we set the locale AFTER all child locales have been
  60184. // created, so we won't end up with the child locale set.
  60185. getSetGlobalLocale(name);
  60186. return locales[name];
  60187. } else {
  60188. // useful for testing
  60189. delete locales[name];
  60190. return null;
  60191. }
  60192. }
  60193. function updateLocale(name, config) {
  60194. if (config != null) {
  60195. var locale,
  60196. tmpLocale,
  60197. parentConfig = baseConfig;
  60198. if (locales[name] != null && locales[name].parentLocale != null) {
  60199. // Update existing child locale in-place to avoid memory-leaks
  60200. locales[name].set(mergeConfigs(locales[name]._config, config));
  60201. } else {
  60202. // MERGE
  60203. tmpLocale = loadLocale(name);
  60204. if (tmpLocale != null) {
  60205. parentConfig = tmpLocale._config;
  60206. }
  60207. config = mergeConfigs(parentConfig, config);
  60208. if (tmpLocale == null) {
  60209. // updateLocale is called for creating a new locale
  60210. // Set abbr so it will have a name (getters return
  60211. // undefined otherwise).
  60212. config.abbr = name;
  60213. }
  60214. locale = new Locale(config);
  60215. locale.parentLocale = locales[name];
  60216. locales[name] = locale;
  60217. }
  60218. // backwards compat for now: also set the locale
  60219. getSetGlobalLocale(name);
  60220. } else {
  60221. // pass null for config to unupdate, useful for tests
  60222. if (locales[name] != null) {
  60223. if (locales[name].parentLocale != null) {
  60224. locales[name] = locales[name].parentLocale;
  60225. if (name === getSetGlobalLocale()) {
  60226. getSetGlobalLocale(name);
  60227. }
  60228. } else if (locales[name] != null) {
  60229. delete locales[name];
  60230. }
  60231. }
  60232. }
  60233. return locales[name];
  60234. }
  60235. // returns locale data
  60236. function getLocale(key) {
  60237. var locale;
  60238. if (key && key._locale && key._locale._abbr) {
  60239. key = key._locale._abbr;
  60240. }
  60241. if (!key) {
  60242. return globalLocale;
  60243. }
  60244. if (!isArray(key)) {
  60245. //short-circuit everything else
  60246. locale = loadLocale(key);
  60247. if (locale) {
  60248. return locale;
  60249. }
  60250. key = [key];
  60251. }
  60252. return chooseLocale(key);
  60253. }
  60254. function listLocales() {
  60255. return keys(locales);
  60256. }
  60257. function checkOverflow(m) {
  60258. var overflow,
  60259. a = m._a;
  60260. if (a && getParsingFlags(m).overflow === -2) {
  60261. overflow =
  60262. a[MONTH] < 0 || a[MONTH] > 11
  60263. ? MONTH
  60264. : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])
  60265. ? DATE
  60266. : a[HOUR] < 0 ||
  60267. a[HOUR] > 24 ||
  60268. (a[HOUR] === 24 &&
  60269. (a[MINUTE] !== 0 ||
  60270. a[SECOND] !== 0 ||
  60271. a[MILLISECOND] !== 0))
  60272. ? HOUR
  60273. : a[MINUTE] < 0 || a[MINUTE] > 59
  60274. ? MINUTE
  60275. : a[SECOND] < 0 || a[SECOND] > 59
  60276. ? SECOND
  60277. : a[MILLISECOND] < 0 || a[MILLISECOND] > 999
  60278. ? MILLISECOND
  60279. : -1;
  60280. if (
  60281. getParsingFlags(m)._overflowDayOfYear &&
  60282. (overflow < YEAR || overflow > DATE)
  60283. ) {
  60284. overflow = DATE;
  60285. }
  60286. if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
  60287. overflow = WEEK;
  60288. }
  60289. if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
  60290. overflow = WEEKDAY;
  60291. }
  60292. getParsingFlags(m).overflow = overflow;
  60293. }
  60294. return m;
  60295. }
  60296. // iso 8601 regex
  60297. // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
  60298. var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
  60299. basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
  60300. tzRegex = /Z|[+-]\d\d(?::?\d\d)?/,
  60301. isoDates = [
  60302. ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
  60303. ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/],
  60304. ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/],
  60305. ['GGGG-[W]WW', /\d{4}-W\d\d/, false],
  60306. ['YYYY-DDD', /\d{4}-\d{3}/],
  60307. ['YYYY-MM', /\d{4}-\d\d/, false],
  60308. ['YYYYYYMMDD', /[+-]\d{10}/],
  60309. ['YYYYMMDD', /\d{8}/],
  60310. ['GGGG[W]WWE', /\d{4}W\d{3}/],
  60311. ['GGGG[W]WW', /\d{4}W\d{2}/, false],
  60312. ['YYYYDDD', /\d{7}/],
  60313. ['YYYYMM', /\d{6}/, false],
  60314. ['YYYY', /\d{4}/, false],
  60315. ],
  60316. // iso time formats and regexes
  60317. isoTimes = [
  60318. ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
  60319. ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
  60320. ['HH:mm:ss', /\d\d:\d\d:\d\d/],
  60321. ['HH:mm', /\d\d:\d\d/],
  60322. ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
  60323. ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
  60324. ['HHmmss', /\d\d\d\d\d\d/],
  60325. ['HHmm', /\d\d\d\d/],
  60326. ['HH', /\d\d/],
  60327. ],
  60328. aspNetJsonRegex = /^\/?Date\((-?\d+)/i,
  60329. // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
  60330. rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,
  60331. obsOffsets = {
  60332. UT: 0,
  60333. GMT: 0,
  60334. EDT: -4 * 60,
  60335. EST: -5 * 60,
  60336. CDT: -5 * 60,
  60337. CST: -6 * 60,
  60338. MDT: -6 * 60,
  60339. MST: -7 * 60,
  60340. PDT: -7 * 60,
  60341. PST: -8 * 60,
  60342. };
  60343. // date from iso format
  60344. function configFromISO(config) {
  60345. var i,
  60346. l,
  60347. string = config._i,
  60348. match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
  60349. allowTime,
  60350. dateFormat,
  60351. timeFormat,
  60352. tzFormat;
  60353. if (match) {
  60354. getParsingFlags(config).iso = true;
  60355. for (i = 0, l = isoDates.length; i < l; i++) {
  60356. if (isoDates[i][1].exec(match[1])) {
  60357. dateFormat = isoDates[i][0];
  60358. allowTime = isoDates[i][2] !== false;
  60359. break;
  60360. }
  60361. }
  60362. if (dateFormat == null) {
  60363. config._isValid = false;
  60364. return;
  60365. }
  60366. if (match[3]) {
  60367. for (i = 0, l = isoTimes.length; i < l; i++) {
  60368. if (isoTimes[i][1].exec(match[3])) {
  60369. // match[2] should be 'T' or space
  60370. timeFormat = (match[2] || ' ') + isoTimes[i][0];
  60371. break;
  60372. }
  60373. }
  60374. if (timeFormat == null) {
  60375. config._isValid = false;
  60376. return;
  60377. }
  60378. }
  60379. if (!allowTime && timeFormat != null) {
  60380. config._isValid = false;
  60381. return;
  60382. }
  60383. if (match[4]) {
  60384. if (tzRegex.exec(match[4])) {
  60385. tzFormat = 'Z';
  60386. } else {
  60387. config._isValid = false;
  60388. return;
  60389. }
  60390. }
  60391. config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
  60392. configFromStringAndFormat(config);
  60393. } else {
  60394. config._isValid = false;
  60395. }
  60396. }
  60397. function extractFromRFC2822Strings(
  60398. yearStr,
  60399. monthStr,
  60400. dayStr,
  60401. hourStr,
  60402. minuteStr,
  60403. secondStr
  60404. ) {
  60405. var result = [
  60406. untruncateYear(yearStr),
  60407. defaultLocaleMonthsShort.indexOf(monthStr),
  60408. parseInt(dayStr, 10),
  60409. parseInt(hourStr, 10),
  60410. parseInt(minuteStr, 10),
  60411. ];
  60412. if (secondStr) {
  60413. result.push(parseInt(secondStr, 10));
  60414. }
  60415. return result;
  60416. }
  60417. function untruncateYear(yearStr) {
  60418. var year = parseInt(yearStr, 10);
  60419. if (year <= 49) {
  60420. return 2000 + year;
  60421. } else if (year <= 999) {
  60422. return 1900 + year;
  60423. }
  60424. return year;
  60425. }
  60426. function preprocessRFC2822(s) {
  60427. // Remove comments and folding whitespace and replace multiple-spaces with a single space
  60428. return s
  60429. .replace(/\([^)]*\)|[\n\t]/g, ' ')
  60430. .replace(/(\s\s+)/g, ' ')
  60431. .replace(/^\s\s*/, '')
  60432. .replace(/\s\s*$/, '');
  60433. }
  60434. function checkWeekday(weekdayStr, parsedInput, config) {
  60435. if (weekdayStr) {
  60436. // TODO: Replace the vanilla JS Date object with an independent day-of-week check.
  60437. var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),
  60438. weekdayActual = new Date(
  60439. parsedInput[0],
  60440. parsedInput[1],
  60441. parsedInput[2]
  60442. ).getDay();
  60443. if (weekdayProvided !== weekdayActual) {
  60444. getParsingFlags(config).weekdayMismatch = true;
  60445. config._isValid = false;
  60446. return false;
  60447. }
  60448. }
  60449. return true;
  60450. }
  60451. function calculateOffset(obsOffset, militaryOffset, numOffset) {
  60452. if (obsOffset) {
  60453. return obsOffsets[obsOffset];
  60454. } else if (militaryOffset) {
  60455. // the only allowed military tz is Z
  60456. return 0;
  60457. } else {
  60458. var hm = parseInt(numOffset, 10),
  60459. m = hm % 100,
  60460. h = (hm - m) / 100;
  60461. return h * 60 + m;
  60462. }
  60463. }
  60464. // date and time from ref 2822 format
  60465. function configFromRFC2822(config) {
  60466. var match = rfc2822.exec(preprocessRFC2822(config._i)),
  60467. parsedArray;
  60468. if (match) {
  60469. parsedArray = extractFromRFC2822Strings(
  60470. match[4],
  60471. match[3],
  60472. match[2],
  60473. match[5],
  60474. match[6],
  60475. match[7]
  60476. );
  60477. if (!checkWeekday(match[1], parsedArray, config)) {
  60478. return;
  60479. }
  60480. config._a = parsedArray;
  60481. config._tzm = calculateOffset(match[8], match[9], match[10]);
  60482. config._d = createUTCDate.apply(null, config._a);
  60483. config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
  60484. getParsingFlags(config).rfc2822 = true;
  60485. } else {
  60486. config._isValid = false;
  60487. }
  60488. }
  60489. // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict
  60490. function configFromString(config) {
  60491. var matched = aspNetJsonRegex.exec(config._i);
  60492. if (matched !== null) {
  60493. config._d = new Date(+matched[1]);
  60494. return;
  60495. }
  60496. configFromISO(config);
  60497. if (config._isValid === false) {
  60498. delete config._isValid;
  60499. } else {
  60500. return;
  60501. }
  60502. configFromRFC2822(config);
  60503. if (config._isValid === false) {
  60504. delete config._isValid;
  60505. } else {
  60506. return;
  60507. }
  60508. if (config._strict) {
  60509. config._isValid = false;
  60510. } else {
  60511. // Final attempt, use Input Fallback
  60512. hooks.createFromInputFallback(config);
  60513. }
  60514. }
  60515. hooks.createFromInputFallback = deprecate(
  60516. 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
  60517. 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
  60518. 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',
  60519. function (config) {
  60520. config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
  60521. }
  60522. );
  60523. // Pick the first defined of two or three arguments.
  60524. function defaults(a, b, c) {
  60525. if (a != null) {
  60526. return a;
  60527. }
  60528. if (b != null) {
  60529. return b;
  60530. }
  60531. return c;
  60532. }
  60533. function currentDateArray(config) {
  60534. // hooks is actually the exported moment object
  60535. var nowValue = new Date(hooks.now());
  60536. if (config._useUTC) {
  60537. return [
  60538. nowValue.getUTCFullYear(),
  60539. nowValue.getUTCMonth(),
  60540. nowValue.getUTCDate(),
  60541. ];
  60542. }
  60543. return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
  60544. }
  60545. // convert an array to a date.
  60546. // the array should mirror the parameters below
  60547. // note: all values past the year are optional and will default to the lowest possible value.
  60548. // [year, month, day , hour, minute, second, millisecond]
  60549. function configFromArray(config) {
  60550. var i,
  60551. date,
  60552. input = [],
  60553. currentDate,
  60554. expectedWeekday,
  60555. yearToUse;
  60556. if (config._d) {
  60557. return;
  60558. }
  60559. currentDate = currentDateArray(config);
  60560. //compute day of the year from weeks and weekdays
  60561. if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
  60562. dayOfYearFromWeekInfo(config);
  60563. }
  60564. //if the day of the year is set, figure out what it is
  60565. if (config._dayOfYear != null) {
  60566. yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
  60567. if (
  60568. config._dayOfYear > daysInYear(yearToUse) ||
  60569. config._dayOfYear === 0
  60570. ) {
  60571. getParsingFlags(config)._overflowDayOfYear = true;
  60572. }
  60573. date = createUTCDate(yearToUse, 0, config._dayOfYear);
  60574. config._a[MONTH] = date.getUTCMonth();
  60575. config._a[DATE] = date.getUTCDate();
  60576. }
  60577. // Default to current date.
  60578. // * if no year, month, day of month are given, default to today
  60579. // * if day of month is given, default month and year
  60580. // * if month is given, default only year
  60581. // * if year is given, don't default anything
  60582. for (i = 0; i < 3 && config._a[i] == null; ++i) {
  60583. config._a[i] = input[i] = currentDate[i];
  60584. }
  60585. // Zero out whatever was not defaulted, including time
  60586. for (; i < 7; i++) {
  60587. config._a[i] = input[i] =
  60588. config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];
  60589. }
  60590. // Check for 24:00:00.000
  60591. if (
  60592. config._a[HOUR] === 24 &&
  60593. config._a[MINUTE] === 0 &&
  60594. config._a[SECOND] === 0 &&
  60595. config._a[MILLISECOND] === 0
  60596. ) {
  60597. config._nextDay = true;
  60598. config._a[HOUR] = 0;
  60599. }
  60600. config._d = (config._useUTC ? createUTCDate : createDate).apply(
  60601. null,
  60602. input
  60603. );
  60604. expectedWeekday = config._useUTC
  60605. ? config._d.getUTCDay()
  60606. : config._d.getDay();
  60607. // Apply timezone offset from input. The actual utcOffset can be changed
  60608. // with parseZone.
  60609. if (config._tzm != null) {
  60610. config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
  60611. }
  60612. if (config._nextDay) {
  60613. config._a[HOUR] = 24;
  60614. }
  60615. // check for mismatching day of week
  60616. if (
  60617. config._w &&
  60618. typeof config._w.d !== 'undefined' &&
  60619. config._w.d !== expectedWeekday
  60620. ) {
  60621. getParsingFlags(config).weekdayMismatch = true;
  60622. }
  60623. }
  60624. function dayOfYearFromWeekInfo(config) {
  60625. var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;
  60626. w = config._w;
  60627. if (w.GG != null || w.W != null || w.E != null) {
  60628. dow = 1;
  60629. doy = 4;
  60630. // TODO: We need to take the current isoWeekYear, but that depends on
  60631. // how we interpret now (local, utc, fixed offset). So create
  60632. // a now version of current config (take local/utc/offset flags, and
  60633. // create now).
  60634. weekYear = defaults(
  60635. w.GG,
  60636. config._a[YEAR],
  60637. weekOfYear(createLocal(), 1, 4).year
  60638. );
  60639. week = defaults(w.W, 1);
  60640. weekday = defaults(w.E, 1);
  60641. if (weekday < 1 || weekday > 7) {
  60642. weekdayOverflow = true;
  60643. }
  60644. } else {
  60645. dow = config._locale._week.dow;
  60646. doy = config._locale._week.doy;
  60647. curWeek = weekOfYear(createLocal(), dow, doy);
  60648. weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
  60649. // Default to current week.
  60650. week = defaults(w.w, curWeek.week);
  60651. if (w.d != null) {
  60652. // weekday -- low day numbers are considered next week
  60653. weekday = w.d;
  60654. if (weekday < 0 || weekday > 6) {
  60655. weekdayOverflow = true;
  60656. }
  60657. } else if (w.e != null) {
  60658. // local weekday -- counting starts from beginning of week
  60659. weekday = w.e + dow;
  60660. if (w.e < 0 || w.e > 6) {
  60661. weekdayOverflow = true;
  60662. }
  60663. } else {
  60664. // default to beginning of week
  60665. weekday = dow;
  60666. }
  60667. }
  60668. if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
  60669. getParsingFlags(config)._overflowWeeks = true;
  60670. } else if (weekdayOverflow != null) {
  60671. getParsingFlags(config)._overflowWeekday = true;
  60672. } else {
  60673. temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
  60674. config._a[YEAR] = temp.year;
  60675. config._dayOfYear = temp.dayOfYear;
  60676. }
  60677. }
  60678. // constant that refers to the ISO standard
  60679. hooks.ISO_8601 = function () {};
  60680. // constant that refers to the RFC 2822 form
  60681. hooks.RFC_2822 = function () {};
  60682. // date from string and format string
  60683. function configFromStringAndFormat(config) {
  60684. // TODO: Move this to another part of the creation flow to prevent circular deps
  60685. if (config._f === hooks.ISO_8601) {
  60686. configFromISO(config);
  60687. return;
  60688. }
  60689. if (config._f === hooks.RFC_2822) {
  60690. configFromRFC2822(config);
  60691. return;
  60692. }
  60693. config._a = [];
  60694. getParsingFlags(config).empty = true;
  60695. // This array is used to make a Date, either with `new Date` or `Date.UTC`
  60696. var string = '' + config._i,
  60697. i,
  60698. parsedInput,
  60699. tokens,
  60700. token,
  60701. skipped,
  60702. stringLength = string.length,
  60703. totalParsedInputLength = 0,
  60704. era;
  60705. tokens =
  60706. expandFormat(config._f, config._locale).match(formattingTokens) || [];
  60707. for (i = 0; i < tokens.length; i++) {
  60708. token = tokens[i];
  60709. parsedInput = (string.match(getParseRegexForToken(token, config)) ||
  60710. [])[0];
  60711. if (parsedInput) {
  60712. skipped = string.substr(0, string.indexOf(parsedInput));
  60713. if (skipped.length > 0) {
  60714. getParsingFlags(config).unusedInput.push(skipped);
  60715. }
  60716. string = string.slice(
  60717. string.indexOf(parsedInput) + parsedInput.length
  60718. );
  60719. totalParsedInputLength += parsedInput.length;
  60720. }
  60721. // don't parse if it's not a known token
  60722. if (formatTokenFunctions[token]) {
  60723. if (parsedInput) {
  60724. getParsingFlags(config).empty = false;
  60725. } else {
  60726. getParsingFlags(config).unusedTokens.push(token);
  60727. }
  60728. addTimeToArrayFromToken(token, parsedInput, config);
  60729. } else if (config._strict && !parsedInput) {
  60730. getParsingFlags(config).unusedTokens.push(token);
  60731. }
  60732. }
  60733. // add remaining unparsed input length to the string
  60734. getParsingFlags(config).charsLeftOver =
  60735. stringLength - totalParsedInputLength;
  60736. if (string.length > 0) {
  60737. getParsingFlags(config).unusedInput.push(string);
  60738. }
  60739. // clear _12h flag if hour is <= 12
  60740. if (
  60741. config._a[HOUR] <= 12 &&
  60742. getParsingFlags(config).bigHour === true &&
  60743. config._a[HOUR] > 0
  60744. ) {
  60745. getParsingFlags(config).bigHour = undefined;
  60746. }
  60747. getParsingFlags(config).parsedDateParts = config._a.slice(0);
  60748. getParsingFlags(config).meridiem = config._meridiem;
  60749. // handle meridiem
  60750. config._a[HOUR] = meridiemFixWrap(
  60751. config._locale,
  60752. config._a[HOUR],
  60753. config._meridiem
  60754. );
  60755. // handle era
  60756. era = getParsingFlags(config).era;
  60757. if (era !== null) {
  60758. config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);
  60759. }
  60760. configFromArray(config);
  60761. checkOverflow(config);
  60762. }
  60763. function meridiemFixWrap(locale, hour, meridiem) {
  60764. var isPm;
  60765. if (meridiem == null) {
  60766. // nothing to do
  60767. return hour;
  60768. }
  60769. if (locale.meridiemHour != null) {
  60770. return locale.meridiemHour(hour, meridiem);
  60771. } else if (locale.isPM != null) {
  60772. // Fallback
  60773. isPm = locale.isPM(meridiem);
  60774. if (isPm && hour < 12) {
  60775. hour += 12;
  60776. }
  60777. if (!isPm && hour === 12) {
  60778. hour = 0;
  60779. }
  60780. return hour;
  60781. } else {
  60782. // this is not supposed to happen
  60783. return hour;
  60784. }
  60785. }
  60786. // date from string and array of format strings
  60787. function configFromStringAndArray(config) {
  60788. var tempConfig,
  60789. bestMoment,
  60790. scoreToBeat,
  60791. i,
  60792. currentScore,
  60793. validFormatFound,
  60794. bestFormatIsValid = false;
  60795. if (config._f.length === 0) {
  60796. getParsingFlags(config).invalidFormat = true;
  60797. config._d = new Date(NaN);
  60798. return;
  60799. }
  60800. for (i = 0; i < config._f.length; i++) {
  60801. currentScore = 0;
  60802. validFormatFound = false;
  60803. tempConfig = copyConfig({}, config);
  60804. if (config._useUTC != null) {
  60805. tempConfig._useUTC = config._useUTC;
  60806. }
  60807. tempConfig._f = config._f[i];
  60808. configFromStringAndFormat(tempConfig);
  60809. if (isValid(tempConfig)) {
  60810. validFormatFound = true;
  60811. }
  60812. // if there is any input that was not parsed add a penalty for that format
  60813. currentScore += getParsingFlags(tempConfig).charsLeftOver;
  60814. //or tokens
  60815. currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
  60816. getParsingFlags(tempConfig).score = currentScore;
  60817. if (!bestFormatIsValid) {
  60818. if (
  60819. scoreToBeat == null ||
  60820. currentScore < scoreToBeat ||
  60821. validFormatFound
  60822. ) {
  60823. scoreToBeat = currentScore;
  60824. bestMoment = tempConfig;
  60825. if (validFormatFound) {
  60826. bestFormatIsValid = true;
  60827. }
  60828. }
  60829. } else {
  60830. if (currentScore < scoreToBeat) {
  60831. scoreToBeat = currentScore;
  60832. bestMoment = tempConfig;
  60833. }
  60834. }
  60835. }
  60836. extend(config, bestMoment || tempConfig);
  60837. }
  60838. function configFromObject(config) {
  60839. if (config._d) {
  60840. return;
  60841. }
  60842. var i = normalizeObjectUnits(config._i),
  60843. dayOrDate = i.day === undefined ? i.date : i.day;
  60844. config._a = map(
  60845. [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],
  60846. function (obj) {
  60847. return obj && parseInt(obj, 10);
  60848. }
  60849. );
  60850. configFromArray(config);
  60851. }
  60852. function createFromConfig(config) {
  60853. var res = new Moment(checkOverflow(prepareConfig(config)));
  60854. if (res._nextDay) {
  60855. // Adding is smart enough around DST
  60856. res.add(1, 'd');
  60857. res._nextDay = undefined;
  60858. }
  60859. return res;
  60860. }
  60861. function prepareConfig(config) {
  60862. var input = config._i,
  60863. format = config._f;
  60864. config._locale = config._locale || getLocale(config._l);
  60865. if (input === null || (format === undefined && input === '')) {
  60866. return createInvalid({ nullInput: true });
  60867. }
  60868. if (typeof input === 'string') {
  60869. config._i = input = config._locale.preparse(input);
  60870. }
  60871. if (isMoment(input)) {
  60872. return new Moment(checkOverflow(input));
  60873. } else if (isDate(input)) {
  60874. config._d = input;
  60875. } else if (isArray(format)) {
  60876. configFromStringAndArray(config);
  60877. } else if (format) {
  60878. configFromStringAndFormat(config);
  60879. } else {
  60880. configFromInput(config);
  60881. }
  60882. if (!isValid(config)) {
  60883. config._d = null;
  60884. }
  60885. return config;
  60886. }
  60887. function configFromInput(config) {
  60888. var input = config._i;
  60889. if (isUndefined(input)) {
  60890. config._d = new Date(hooks.now());
  60891. } else if (isDate(input)) {
  60892. config._d = new Date(input.valueOf());
  60893. } else if (typeof input === 'string') {
  60894. configFromString(config);
  60895. } else if (isArray(input)) {
  60896. config._a = map(input.slice(0), function (obj) {
  60897. return parseInt(obj, 10);
  60898. });
  60899. configFromArray(config);
  60900. } else if (isObject(input)) {
  60901. configFromObject(config);
  60902. } else if (isNumber(input)) {
  60903. // from milliseconds
  60904. config._d = new Date(input);
  60905. } else {
  60906. hooks.createFromInputFallback(config);
  60907. }
  60908. }
  60909. function createLocalOrUTC(input, format, locale, strict, isUTC) {
  60910. var c = {};
  60911. if (format === true || format === false) {
  60912. strict = format;
  60913. format = undefined;
  60914. }
  60915. if (locale === true || locale === false) {
  60916. strict = locale;
  60917. locale = undefined;
  60918. }
  60919. if (
  60920. (isObject(input) && isObjectEmpty(input)) ||
  60921. (isArray(input) && input.length === 0)
  60922. ) {
  60923. input = undefined;
  60924. }
  60925. // object construction must be done this way.
  60926. // https://github.com/moment/moment/issues/1423
  60927. c._isAMomentObject = true;
  60928. c._useUTC = c._isUTC = isUTC;
  60929. c._l = locale;
  60930. c._i = input;
  60931. c._f = format;
  60932. c._strict = strict;
  60933. return createFromConfig(c);
  60934. }
  60935. function createLocal(input, format, locale, strict) {
  60936. return createLocalOrUTC(input, format, locale, strict, false);
  60937. }
  60938. var prototypeMin = deprecate(
  60939. 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
  60940. function () {
  60941. var other = createLocal.apply(null, arguments);
  60942. if (this.isValid() && other.isValid()) {
  60943. return other < this ? this : other;
  60944. } else {
  60945. return createInvalid();
  60946. }
  60947. }
  60948. ),
  60949. prototypeMax = deprecate(
  60950. 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
  60951. function () {
  60952. var other = createLocal.apply(null, arguments);
  60953. if (this.isValid() && other.isValid()) {
  60954. return other > this ? this : other;
  60955. } else {
  60956. return createInvalid();
  60957. }
  60958. }
  60959. );
  60960. // Pick a moment m from moments so that m[fn](other) is true for all
  60961. // other. This relies on the function fn to be transitive.
  60962. //
  60963. // moments should either be an array of moment objects or an array, whose
  60964. // first element is an array of moment objects.
  60965. function pickBy(fn, moments) {
  60966. var res, i;
  60967. if (moments.length === 1 && isArray(moments[0])) {
  60968. moments = moments[0];
  60969. }
  60970. if (!moments.length) {
  60971. return createLocal();
  60972. }
  60973. res = moments[0];
  60974. for (i = 1; i < moments.length; ++i) {
  60975. if (!moments[i].isValid() || moments[i][fn](res)) {
  60976. res = moments[i];
  60977. }
  60978. }
  60979. return res;
  60980. }
  60981. // TODO: Use [].sort instead?
  60982. function min() {
  60983. var args = [].slice.call(arguments, 0);
  60984. return pickBy('isBefore', args);
  60985. }
  60986. function max() {
  60987. var args = [].slice.call(arguments, 0);
  60988. return pickBy('isAfter', args);
  60989. }
  60990. var now = function () {
  60991. return Date.now ? Date.now() : +new Date();
  60992. };
  60993. var ordering = [
  60994. 'year',
  60995. 'quarter',
  60996. 'month',
  60997. 'week',
  60998. 'day',
  60999. 'hour',
  61000. 'minute',
  61001. 'second',
  61002. 'millisecond',
  61003. ];
  61004. function isDurationValid(m) {
  61005. var key,
  61006. unitHasDecimal = false,
  61007. i;
  61008. for (key in m) {
  61009. if (
  61010. hasOwnProp(m, key) &&
  61011. !(
  61012. indexOf.call(ordering, key) !== -1 &&
  61013. (m[key] == null || !isNaN(m[key]))
  61014. )
  61015. ) {
  61016. return false;
  61017. }
  61018. }
  61019. for (i = 0; i < ordering.length; ++i) {
  61020. if (m[ordering[i]]) {
  61021. if (unitHasDecimal) {
  61022. return false; // only allow non-integers for smallest unit
  61023. }
  61024. if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
  61025. unitHasDecimal = true;
  61026. }
  61027. }
  61028. }
  61029. return true;
  61030. }
  61031. function isValid$1() {
  61032. return this._isValid;
  61033. }
  61034. function createInvalid$1() {
  61035. return createDuration(NaN);
  61036. }
  61037. function Duration(duration) {
  61038. var normalizedInput = normalizeObjectUnits(duration),
  61039. years = normalizedInput.year || 0,
  61040. quarters = normalizedInput.quarter || 0,
  61041. months = normalizedInput.month || 0,
  61042. weeks = normalizedInput.week || normalizedInput.isoWeek || 0,
  61043. days = normalizedInput.day || 0,
  61044. hours = normalizedInput.hour || 0,
  61045. minutes = normalizedInput.minute || 0,
  61046. seconds = normalizedInput.second || 0,
  61047. milliseconds = normalizedInput.millisecond || 0;
  61048. this._isValid = isDurationValid(normalizedInput);
  61049. // representation for dateAddRemove
  61050. this._milliseconds =
  61051. +milliseconds +
  61052. seconds * 1e3 + // 1000
  61053. minutes * 6e4 + // 1000 * 60
  61054. hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
  61055. // Because of dateAddRemove treats 24 hours as different from a
  61056. // day when working around DST, we need to store them separately
  61057. this._days = +days + weeks * 7;
  61058. // It is impossible to translate months into days without knowing
  61059. // which months you are are talking about, so we have to store
  61060. // it separately.
  61061. this._months = +months + quarters * 3 + years * 12;
  61062. this._data = {};
  61063. this._locale = getLocale();
  61064. this._bubble();
  61065. }
  61066. function isDuration(obj) {
  61067. return obj instanceof Duration;
  61068. }
  61069. function absRound(number) {
  61070. if (number < 0) {
  61071. return Math.round(-1 * number) * -1;
  61072. } else {
  61073. return Math.round(number);
  61074. }
  61075. }
  61076. // compare two arrays, return the number of differences
  61077. function compareArrays(array1, array2, dontConvert) {
  61078. var len = Math.min(array1.length, array2.length),
  61079. lengthDiff = Math.abs(array1.length - array2.length),
  61080. diffs = 0,
  61081. i;
  61082. for (i = 0; i < len; i++) {
  61083. if (
  61084. (dontConvert && array1[i] !== array2[i]) ||
  61085. (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))
  61086. ) {
  61087. diffs++;
  61088. }
  61089. }
  61090. return diffs + lengthDiff;
  61091. }
  61092. // FORMATTING
  61093. function offset(token, separator) {
  61094. addFormatToken(token, 0, 0, function () {
  61095. var offset = this.utcOffset(),
  61096. sign = '+';
  61097. if (offset < 0) {
  61098. offset = -offset;
  61099. sign = '-';
  61100. }
  61101. return (
  61102. sign +
  61103. zeroFill(~~(offset / 60), 2) +
  61104. separator +
  61105. zeroFill(~~offset % 60, 2)
  61106. );
  61107. });
  61108. }
  61109. offset('Z', ':');
  61110. offset('ZZ', '');
  61111. // PARSING
  61112. addRegexToken('Z', matchShortOffset);
  61113. addRegexToken('ZZ', matchShortOffset);
  61114. addParseToken(['Z', 'ZZ'], function (input, array, config) {
  61115. config._useUTC = true;
  61116. config._tzm = offsetFromString(matchShortOffset, input);
  61117. });
  61118. // HELPERS
  61119. // timezone chunker
  61120. // '+10:00' > ['10', '00']
  61121. // '-1530' > ['-15', '30']
  61122. var chunkOffset = /([\+\-]|\d\d)/gi;
  61123. function offsetFromString(matcher, string) {
  61124. var matches = (string || '').match(matcher),
  61125. chunk,
  61126. parts,
  61127. minutes;
  61128. if (matches === null) {
  61129. return null;
  61130. }
  61131. chunk = matches[matches.length - 1] || [];
  61132. parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
  61133. minutes = +(parts[1] * 60) + toInt(parts[2]);
  61134. return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;
  61135. }
  61136. // Return a moment from input, that is local/utc/zone equivalent to model.
  61137. function cloneWithOffset(input, model) {
  61138. var res, diff;
  61139. if (model._isUTC) {
  61140. res = model.clone();
  61141. diff =
  61142. (isMoment(input) || isDate(input)
  61143. ? input.valueOf()
  61144. : createLocal(input).valueOf()) - res.valueOf();
  61145. // Use low-level api, because this fn is low-level api.
  61146. res._d.setTime(res._d.valueOf() + diff);
  61147. hooks.updateOffset(res, false);
  61148. return res;
  61149. } else {
  61150. return createLocal(input).local();
  61151. }
  61152. }
  61153. function getDateOffset(m) {
  61154. // On Firefox.24 Date#getTimezoneOffset returns a floating point.
  61155. // https://github.com/moment/moment/pull/1871
  61156. return -Math.round(m._d.getTimezoneOffset());
  61157. }
  61158. // HOOKS
  61159. // This function will be called whenever a moment is mutated.
  61160. // It is intended to keep the offset in sync with the timezone.
  61161. hooks.updateOffset = function () {};
  61162. // MOMENTS
  61163. // keepLocalTime = true means only change the timezone, without
  61164. // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
  61165. // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
  61166. // +0200, so we adjust the time as needed, to be valid.
  61167. //
  61168. // Keeping the time actually adds/subtracts (one hour)
  61169. // from the actual represented time. That is why we call updateOffset
  61170. // a second time. In case it wants us to change the offset again
  61171. // _changeInProgress == true case, then we have to adjust, because
  61172. // there is no such time in the given timezone.
  61173. function getSetOffset(input, keepLocalTime, keepMinutes) {
  61174. var offset = this._offset || 0,
  61175. localAdjust;
  61176. if (!this.isValid()) {
  61177. return input != null ? this : NaN;
  61178. }
  61179. if (input != null) {
  61180. if (typeof input === 'string') {
  61181. input = offsetFromString(matchShortOffset, input);
  61182. if (input === null) {
  61183. return this;
  61184. }
  61185. } else if (Math.abs(input) < 16 && !keepMinutes) {
  61186. input = input * 60;
  61187. }
  61188. if (!this._isUTC && keepLocalTime) {
  61189. localAdjust = getDateOffset(this);
  61190. }
  61191. this._offset = input;
  61192. this._isUTC = true;
  61193. if (localAdjust != null) {
  61194. this.add(localAdjust, 'm');
  61195. }
  61196. if (offset !== input) {
  61197. if (!keepLocalTime || this._changeInProgress) {
  61198. addSubtract(
  61199. this,
  61200. createDuration(input - offset, 'm'),
  61201. 1,
  61202. false
  61203. );
  61204. } else if (!this._changeInProgress) {
  61205. this._changeInProgress = true;
  61206. hooks.updateOffset(this, true);
  61207. this._changeInProgress = null;
  61208. }
  61209. }
  61210. return this;
  61211. } else {
  61212. return this._isUTC ? offset : getDateOffset(this);
  61213. }
  61214. }
  61215. function getSetZone(input, keepLocalTime) {
  61216. if (input != null) {
  61217. if (typeof input !== 'string') {
  61218. input = -input;
  61219. }
  61220. this.utcOffset(input, keepLocalTime);
  61221. return this;
  61222. } else {
  61223. return -this.utcOffset();
  61224. }
  61225. }
  61226. function setOffsetToUTC(keepLocalTime) {
  61227. return this.utcOffset(0, keepLocalTime);
  61228. }
  61229. function setOffsetToLocal(keepLocalTime) {
  61230. if (this._isUTC) {
  61231. this.utcOffset(0, keepLocalTime);
  61232. this._isUTC = false;
  61233. if (keepLocalTime) {
  61234. this.subtract(getDateOffset(this), 'm');
  61235. }
  61236. }
  61237. return this;
  61238. }
  61239. function setOffsetToParsedOffset() {
  61240. if (this._tzm != null) {
  61241. this.utcOffset(this._tzm, false, true);
  61242. } else if (typeof this._i === 'string') {
  61243. var tZone = offsetFromString(matchOffset, this._i);
  61244. if (tZone != null) {
  61245. this.utcOffset(tZone);
  61246. } else {
  61247. this.utcOffset(0, true);
  61248. }
  61249. }
  61250. return this;
  61251. }
  61252. function hasAlignedHourOffset(input) {
  61253. if (!this.isValid()) {
  61254. return false;
  61255. }
  61256. input = input ? createLocal(input).utcOffset() : 0;
  61257. return (this.utcOffset() - input) % 60 === 0;
  61258. }
  61259. function isDaylightSavingTime() {
  61260. return (
  61261. this.utcOffset() > this.clone().month(0).utcOffset() ||
  61262. this.utcOffset() > this.clone().month(5).utcOffset()
  61263. );
  61264. }
  61265. function isDaylightSavingTimeShifted() {
  61266. if (!isUndefined(this._isDSTShifted)) {
  61267. return this._isDSTShifted;
  61268. }
  61269. var c = {},
  61270. other;
  61271. copyConfig(c, this);
  61272. c = prepareConfig(c);
  61273. if (c._a) {
  61274. other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
  61275. this._isDSTShifted =
  61276. this.isValid() && compareArrays(c._a, other.toArray()) > 0;
  61277. } else {
  61278. this._isDSTShifted = false;
  61279. }
  61280. return this._isDSTShifted;
  61281. }
  61282. function isLocal() {
  61283. return this.isValid() ? !this._isUTC : false;
  61284. }
  61285. function isUtcOffset() {
  61286. return this.isValid() ? this._isUTC : false;
  61287. }
  61288. function isUtc() {
  61289. return this.isValid() ? this._isUTC && this._offset === 0 : false;
  61290. }
  61291. // ASP.NET json date format regex
  61292. var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,
  61293. // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
  61294. // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
  61295. // and further modified to allow for strings containing both week and day
  61296. isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
  61297. function createDuration(input, key) {
  61298. var duration = input,
  61299. // matching against regexp is expensive, do it on demand
  61300. match = null,
  61301. sign,
  61302. ret,
  61303. diffRes;
  61304. if (isDuration(input)) {
  61305. duration = {
  61306. ms: input._milliseconds,
  61307. d: input._days,
  61308. M: input._months,
  61309. };
  61310. } else if (isNumber(input) || !isNaN(+input)) {
  61311. duration = {};
  61312. if (key) {
  61313. duration[key] = +input;
  61314. } else {
  61315. duration.milliseconds = +input;
  61316. }
  61317. } else if ((match = aspNetRegex.exec(input))) {
  61318. sign = match[1] === '-' ? -1 : 1;
  61319. duration = {
  61320. y: 0,
  61321. d: toInt(match[DATE]) * sign,
  61322. h: toInt(match[HOUR]) * sign,
  61323. m: toInt(match[MINUTE]) * sign,
  61324. s: toInt(match[SECOND]) * sign,
  61325. ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match
  61326. };
  61327. } else if ((match = isoRegex.exec(input))) {
  61328. sign = match[1] === '-' ? -1 : 1;
  61329. duration = {
  61330. y: parseIso(match[2], sign),
  61331. M: parseIso(match[3], sign),
  61332. w: parseIso(match[4], sign),
  61333. d: parseIso(match[5], sign),
  61334. h: parseIso(match[6], sign),
  61335. m: parseIso(match[7], sign),
  61336. s: parseIso(match[8], sign),
  61337. };
  61338. } else if (duration == null) {
  61339. // checks for null or undefined
  61340. duration = {};
  61341. } else if (
  61342. typeof duration === 'object' &&
  61343. ('from' in duration || 'to' in duration)
  61344. ) {
  61345. diffRes = momentsDifference(
  61346. createLocal(duration.from),
  61347. createLocal(duration.to)
  61348. );
  61349. duration = {};
  61350. duration.ms = diffRes.milliseconds;
  61351. duration.M = diffRes.months;
  61352. }
  61353. ret = new Duration(duration);
  61354. if (isDuration(input) && hasOwnProp(input, '_locale')) {
  61355. ret._locale = input._locale;
  61356. }
  61357. if (isDuration(input) && hasOwnProp(input, '_isValid')) {
  61358. ret._isValid = input._isValid;
  61359. }
  61360. return ret;
  61361. }
  61362. createDuration.fn = Duration.prototype;
  61363. createDuration.invalid = createInvalid$1;
  61364. function parseIso(inp, sign) {
  61365. // We'd normally use ~~inp for this, but unfortunately it also
  61366. // converts floats to ints.
  61367. // inp may be undefined, so careful calling replace on it.
  61368. var res = inp && parseFloat(inp.replace(',', '.'));
  61369. // apply sign while we're at it
  61370. return (isNaN(res) ? 0 : res) * sign;
  61371. }
  61372. function positiveMomentsDifference(base, other) {
  61373. var res = {};
  61374. res.months =
  61375. other.month() - base.month() + (other.year() - base.year()) * 12;
  61376. if (base.clone().add(res.months, 'M').isAfter(other)) {
  61377. --res.months;
  61378. }
  61379. res.milliseconds = +other - +base.clone().add(res.months, 'M');
  61380. return res;
  61381. }
  61382. function momentsDifference(base, other) {
  61383. var res;
  61384. if (!(base.isValid() && other.isValid())) {
  61385. return { milliseconds: 0, months: 0 };
  61386. }
  61387. other = cloneWithOffset(other, base);
  61388. if (base.isBefore(other)) {
  61389. res = positiveMomentsDifference(base, other);
  61390. } else {
  61391. res = positiveMomentsDifference(other, base);
  61392. res.milliseconds = -res.milliseconds;
  61393. res.months = -res.months;
  61394. }
  61395. return res;
  61396. }
  61397. // TODO: remove 'name' arg after deprecation is removed
  61398. function createAdder(direction, name) {
  61399. return function (val, period) {
  61400. var dur, tmp;
  61401. //invert the arguments, but complain about it
  61402. if (period !== null && !isNaN(+period)) {
  61403. deprecateSimple(
  61404. name,
  61405. 'moment().' +
  61406. name +
  61407. '(period, number) is deprecated. Please use moment().' +
  61408. name +
  61409. '(number, period). ' +
  61410. 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'
  61411. );
  61412. tmp = val;
  61413. val = period;
  61414. period = tmp;
  61415. }
  61416. dur = createDuration(val, period);
  61417. addSubtract(this, dur, direction);
  61418. return this;
  61419. };
  61420. }
  61421. function addSubtract(mom, duration, isAdding, updateOffset) {
  61422. var milliseconds = duration._milliseconds,
  61423. days = absRound(duration._days),
  61424. months = absRound(duration._months);
  61425. if (!mom.isValid()) {
  61426. // No op
  61427. return;
  61428. }
  61429. updateOffset = updateOffset == null ? true : updateOffset;
  61430. if (months) {
  61431. setMonth(mom, get(mom, 'Month') + months * isAdding);
  61432. }
  61433. if (days) {
  61434. set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);
  61435. }
  61436. if (milliseconds) {
  61437. mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
  61438. }
  61439. if (updateOffset) {
  61440. hooks.updateOffset(mom, days || months);
  61441. }
  61442. }
  61443. var add = createAdder(1, 'add'),
  61444. subtract = createAdder(-1, 'subtract');
  61445. function isString(input) {
  61446. return typeof input === 'string' || input instanceof String;
  61447. }
  61448. // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined
  61449. function isMomentInput(input) {
  61450. return (
  61451. isMoment(input) ||
  61452. isDate(input) ||
  61453. isString(input) ||
  61454. isNumber(input) ||
  61455. isNumberOrStringArray(input) ||
  61456. isMomentInputObject(input) ||
  61457. input === null ||
  61458. input === undefined
  61459. );
  61460. }
  61461. function isMomentInputObject(input) {
  61462. var objectTest = isObject(input) && !isObjectEmpty(input),
  61463. propertyTest = false,
  61464. properties = [
  61465. 'years',
  61466. 'year',
  61467. 'y',
  61468. 'months',
  61469. 'month',
  61470. 'M',
  61471. 'days',
  61472. 'day',
  61473. 'd',
  61474. 'dates',
  61475. 'date',
  61476. 'D',
  61477. 'hours',
  61478. 'hour',
  61479. 'h',
  61480. 'minutes',
  61481. 'minute',
  61482. 'm',
  61483. 'seconds',
  61484. 'second',
  61485. 's',
  61486. 'milliseconds',
  61487. 'millisecond',
  61488. 'ms',
  61489. ],
  61490. i,
  61491. property;
  61492. for (i = 0; i < properties.length; i += 1) {
  61493. property = properties[i];
  61494. propertyTest = propertyTest || hasOwnProp(input, property);
  61495. }
  61496. return objectTest && propertyTest;
  61497. }
  61498. function isNumberOrStringArray(input) {
  61499. var arrayTest = isArray(input),
  61500. dataTypeTest = false;
  61501. if (arrayTest) {
  61502. dataTypeTest =
  61503. input.filter(function (item) {
  61504. return !isNumber(item) && isString(input);
  61505. }).length === 0;
  61506. }
  61507. return arrayTest && dataTypeTest;
  61508. }
  61509. function isCalendarSpec(input) {
  61510. var objectTest = isObject(input) && !isObjectEmpty(input),
  61511. propertyTest = false,
  61512. properties = [
  61513. 'sameDay',
  61514. 'nextDay',
  61515. 'lastDay',
  61516. 'nextWeek',
  61517. 'lastWeek',
  61518. 'sameElse',
  61519. ],
  61520. i,
  61521. property;
  61522. for (i = 0; i < properties.length; i += 1) {
  61523. property = properties[i];
  61524. propertyTest = propertyTest || hasOwnProp(input, property);
  61525. }
  61526. return objectTest && propertyTest;
  61527. }
  61528. function getCalendarFormat(myMoment, now) {
  61529. var diff = myMoment.diff(now, 'days', true);
  61530. return diff < -6
  61531. ? 'sameElse'
  61532. : diff < -1
  61533. ? 'lastWeek'
  61534. : diff < 0
  61535. ? 'lastDay'
  61536. : diff < 1
  61537. ? 'sameDay'
  61538. : diff < 2
  61539. ? 'nextDay'
  61540. : diff < 7
  61541. ? 'nextWeek'
  61542. : 'sameElse';
  61543. }
  61544. function calendar$1(time, formats) {
  61545. // Support for single parameter, formats only overload to the calendar function
  61546. if (arguments.length === 1) {
  61547. if (!arguments[0]) {
  61548. time = undefined;
  61549. formats = undefined;
  61550. } else if (isMomentInput(arguments[0])) {
  61551. time = arguments[0];
  61552. formats = undefined;
  61553. } else if (isCalendarSpec(arguments[0])) {
  61554. formats = arguments[0];
  61555. time = undefined;
  61556. }
  61557. }
  61558. // We want to compare the start of today, vs this.
  61559. // Getting start-of-today depends on whether we're local/utc/offset or not.
  61560. var now = time || createLocal(),
  61561. sod = cloneWithOffset(now, this).startOf('day'),
  61562. format = hooks.calendarFormat(this, sod) || 'sameElse',
  61563. output =
  61564. formats &&
  61565. (isFunction(formats[format])
  61566. ? formats[format].call(this, now)
  61567. : formats[format]);
  61568. return this.format(
  61569. output || this.localeData().calendar(format, this, createLocal(now))
  61570. );
  61571. }
  61572. function clone() {
  61573. return new Moment(this);
  61574. }
  61575. function isAfter(input, units) {
  61576. var localInput = isMoment(input) ? input : createLocal(input);
  61577. if (!(this.isValid() && localInput.isValid())) {
  61578. return false;
  61579. }
  61580. units = normalizeUnits(units) || 'millisecond';
  61581. if (units === 'millisecond') {
  61582. return this.valueOf() > localInput.valueOf();
  61583. } else {
  61584. return localInput.valueOf() < this.clone().startOf(units).valueOf();
  61585. }
  61586. }
  61587. function isBefore(input, units) {
  61588. var localInput = isMoment(input) ? input : createLocal(input);
  61589. if (!(this.isValid() && localInput.isValid())) {
  61590. return false;
  61591. }
  61592. units = normalizeUnits(units) || 'millisecond';
  61593. if (units === 'millisecond') {
  61594. return this.valueOf() < localInput.valueOf();
  61595. } else {
  61596. return this.clone().endOf(units).valueOf() < localInput.valueOf();
  61597. }
  61598. }
  61599. function isBetween(from, to, units, inclusivity) {
  61600. var localFrom = isMoment(from) ? from : createLocal(from),
  61601. localTo = isMoment(to) ? to : createLocal(to);
  61602. if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {
  61603. return false;
  61604. }
  61605. inclusivity = inclusivity || '()';
  61606. return (
  61607. (inclusivity[0] === '('
  61608. ? this.isAfter(localFrom, units)
  61609. : !this.isBefore(localFrom, units)) &&
  61610. (inclusivity[1] === ')'
  61611. ? this.isBefore(localTo, units)
  61612. : !this.isAfter(localTo, units))
  61613. );
  61614. }
  61615. function isSame(input, units) {
  61616. var localInput = isMoment(input) ? input : createLocal(input),
  61617. inputMs;
  61618. if (!(this.isValid() && localInput.isValid())) {
  61619. return false;
  61620. }
  61621. units = normalizeUnits(units) || 'millisecond';
  61622. if (units === 'millisecond') {
  61623. return this.valueOf() === localInput.valueOf();
  61624. } else {
  61625. inputMs = localInput.valueOf();
  61626. return (
  61627. this.clone().startOf(units).valueOf() <= inputMs &&
  61628. inputMs <= this.clone().endOf(units).valueOf()
  61629. );
  61630. }
  61631. }
  61632. function isSameOrAfter(input, units) {
  61633. return this.isSame(input, units) || this.isAfter(input, units);
  61634. }
  61635. function isSameOrBefore(input, units) {
  61636. return this.isSame(input, units) || this.isBefore(input, units);
  61637. }
  61638. function diff(input, units, asFloat) {
  61639. var that, zoneDelta, output;
  61640. if (!this.isValid()) {
  61641. return NaN;
  61642. }
  61643. that = cloneWithOffset(input, this);
  61644. if (!that.isValid()) {
  61645. return NaN;
  61646. }
  61647. zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
  61648. units = normalizeUnits(units);
  61649. switch (units) {
  61650. case 'year':
  61651. output = monthDiff(this, that) / 12;
  61652. break;
  61653. case 'month':
  61654. output = monthDiff(this, that);
  61655. break;
  61656. case 'quarter':
  61657. output = monthDiff(this, that) / 3;
  61658. break;
  61659. case 'second':
  61660. output = (this - that) / 1e3;
  61661. break; // 1000
  61662. case 'minute':
  61663. output = (this - that) / 6e4;
  61664. break; // 1000 * 60
  61665. case 'hour':
  61666. output = (this - that) / 36e5;
  61667. break; // 1000 * 60 * 60
  61668. case 'day':
  61669. output = (this - that - zoneDelta) / 864e5;
  61670. break; // 1000 * 60 * 60 * 24, negate dst
  61671. case 'week':
  61672. output = (this - that - zoneDelta) / 6048e5;
  61673. break; // 1000 * 60 * 60 * 24 * 7, negate dst
  61674. default:
  61675. output = this - that;
  61676. }
  61677. return asFloat ? output : absFloor(output);
  61678. }
  61679. function monthDiff(a, b) {
  61680. if (a.date() < b.date()) {
  61681. // end-of-month calculations work correct when the start month has more
  61682. // days than the end month.
  61683. return -monthDiff(b, a);
  61684. }
  61685. // difference in months
  61686. var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),
  61687. // b is in (anchor - 1 month, anchor + 1 month)
  61688. anchor = a.clone().add(wholeMonthDiff, 'months'),
  61689. anchor2,
  61690. adjust;
  61691. if (b - anchor < 0) {
  61692. anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
  61693. // linear across the month
  61694. adjust = (b - anchor) / (anchor - anchor2);
  61695. } else {
  61696. anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
  61697. // linear across the month
  61698. adjust = (b - anchor) / (anchor2 - anchor);
  61699. }
  61700. //check for negative zero, return zero if negative zero
  61701. return -(wholeMonthDiff + adjust) || 0;
  61702. }
  61703. hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
  61704. hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';
  61705. function toString() {
  61706. return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
  61707. }
  61708. function toISOString(keepOffset) {
  61709. if (!this.isValid()) {
  61710. return null;
  61711. }
  61712. var utc = keepOffset !== true,
  61713. m = utc ? this.clone().utc() : this;
  61714. if (m.year() < 0 || m.year() > 9999) {
  61715. return formatMoment(
  61716. m,
  61717. utc
  61718. ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'
  61719. : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'
  61720. );
  61721. }
  61722. if (isFunction(Date.prototype.toISOString)) {
  61723. // native implementation is ~50x faster, use it when we can
  61724. if (utc) {
  61725. return this.toDate().toISOString();
  61726. } else {
  61727. return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)
  61728. .toISOString()
  61729. .replace('Z', formatMoment(m, 'Z'));
  61730. }
  61731. }
  61732. return formatMoment(
  61733. m,
  61734. utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'
  61735. );
  61736. }
  61737. /**
  61738. * Return a human readable representation of a moment that can
  61739. * also be evaluated to get a new moment which is the same
  61740. *
  61741. * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
  61742. */
  61743. function inspect() {
  61744. if (!this.isValid()) {
  61745. return 'moment.invalid(/* ' + this._i + ' */)';
  61746. }
  61747. var func = 'moment',
  61748. zone = '',
  61749. prefix,
  61750. year,
  61751. datetime,
  61752. suffix;
  61753. if (!this.isLocal()) {
  61754. func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';
  61755. zone = 'Z';
  61756. }
  61757. prefix = '[' + func + '("]';
  61758. year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';
  61759. datetime = '-MM-DD[T]HH:mm:ss.SSS';
  61760. suffix = zone + '[")]';
  61761. return this.format(prefix + year + datetime + suffix);
  61762. }
  61763. function format(inputString) {
  61764. if (!inputString) {
  61765. inputString = this.isUtc()
  61766. ? hooks.defaultFormatUtc
  61767. : hooks.defaultFormat;
  61768. }
  61769. var output = formatMoment(this, inputString);
  61770. return this.localeData().postformat(output);
  61771. }
  61772. function from(time, withoutSuffix) {
  61773. if (
  61774. this.isValid() &&
  61775. ((isMoment(time) && time.isValid()) || createLocal(time).isValid())
  61776. ) {
  61777. return createDuration({ to: this, from: time })
  61778. .locale(this.locale())
  61779. .humanize(!withoutSuffix);
  61780. } else {
  61781. return this.localeData().invalidDate();
  61782. }
  61783. }
  61784. function fromNow(withoutSuffix) {
  61785. return this.from(createLocal(), withoutSuffix);
  61786. }
  61787. function to(time, withoutSuffix) {
  61788. if (
  61789. this.isValid() &&
  61790. ((isMoment(time) && time.isValid()) || createLocal(time).isValid())
  61791. ) {
  61792. return createDuration({ from: this, to: time })
  61793. .locale(this.locale())
  61794. .humanize(!withoutSuffix);
  61795. } else {
  61796. return this.localeData().invalidDate();
  61797. }
  61798. }
  61799. function toNow(withoutSuffix) {
  61800. return this.to(createLocal(), withoutSuffix);
  61801. }
  61802. // If passed a locale key, it will set the locale for this
  61803. // instance. Otherwise, it will return the locale configuration
  61804. // variables for this instance.
  61805. function locale(key) {
  61806. var newLocaleData;
  61807. if (key === undefined) {
  61808. return this._locale._abbr;
  61809. } else {
  61810. newLocaleData = getLocale(key);
  61811. if (newLocaleData != null) {
  61812. this._locale = newLocaleData;
  61813. }
  61814. return this;
  61815. }
  61816. }
  61817. var lang = deprecate(
  61818. 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
  61819. function (key) {
  61820. if (key === undefined) {
  61821. return this.localeData();
  61822. } else {
  61823. return this.locale(key);
  61824. }
  61825. }
  61826. );
  61827. function localeData() {
  61828. return this._locale;
  61829. }
  61830. var MS_PER_SECOND = 1000,
  61831. MS_PER_MINUTE = 60 * MS_PER_SECOND,
  61832. MS_PER_HOUR = 60 * MS_PER_MINUTE,
  61833. MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;
  61834. // actual modulo - handles negative numbers (for dates before 1970):
  61835. function mod$1(dividend, divisor) {
  61836. return ((dividend % divisor) + divisor) % divisor;
  61837. }
  61838. function localStartOfDate(y, m, d) {
  61839. // the date constructor remaps years 0-99 to 1900-1999
  61840. if (y < 100 && y >= 0) {
  61841. // preserve leap years using a full 400 year cycle, then reset
  61842. return new Date(y + 400, m, d) - MS_PER_400_YEARS;
  61843. } else {
  61844. return new Date(y, m, d).valueOf();
  61845. }
  61846. }
  61847. function utcStartOfDate(y, m, d) {
  61848. // Date.UTC remaps years 0-99 to 1900-1999
  61849. if (y < 100 && y >= 0) {
  61850. // preserve leap years using a full 400 year cycle, then reset
  61851. return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;
  61852. } else {
  61853. return Date.UTC(y, m, d);
  61854. }
  61855. }
  61856. function startOf(units) {
  61857. var time, startOfDate;
  61858. units = normalizeUnits(units);
  61859. if (units === undefined || units === 'millisecond' || !this.isValid()) {
  61860. return this;
  61861. }
  61862. startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
  61863. switch (units) {
  61864. case 'year':
  61865. time = startOfDate(this.year(), 0, 1);
  61866. break;
  61867. case 'quarter':
  61868. time = startOfDate(
  61869. this.year(),
  61870. this.month() - (this.month() % 3),
  61871. 1
  61872. );
  61873. break;
  61874. case 'month':
  61875. time = startOfDate(this.year(), this.month(), 1);
  61876. break;
  61877. case 'week':
  61878. time = startOfDate(
  61879. this.year(),
  61880. this.month(),
  61881. this.date() - this.weekday()
  61882. );
  61883. break;
  61884. case 'isoWeek':
  61885. time = startOfDate(
  61886. this.year(),
  61887. this.month(),
  61888. this.date() - (this.isoWeekday() - 1)
  61889. );
  61890. break;
  61891. case 'day':
  61892. case 'date':
  61893. time = startOfDate(this.year(), this.month(), this.date());
  61894. break;
  61895. case 'hour':
  61896. time = this._d.valueOf();
  61897. time -= mod$1(
  61898. time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
  61899. MS_PER_HOUR
  61900. );
  61901. break;
  61902. case 'minute':
  61903. time = this._d.valueOf();
  61904. time -= mod$1(time, MS_PER_MINUTE);
  61905. break;
  61906. case 'second':
  61907. time = this._d.valueOf();
  61908. time -= mod$1(time, MS_PER_SECOND);
  61909. break;
  61910. }
  61911. this._d.setTime(time);
  61912. hooks.updateOffset(this, true);
  61913. return this;
  61914. }
  61915. function endOf(units) {
  61916. var time, startOfDate;
  61917. units = normalizeUnits(units);
  61918. if (units === undefined || units === 'millisecond' || !this.isValid()) {
  61919. return this;
  61920. }
  61921. startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
  61922. switch (units) {
  61923. case 'year':
  61924. time = startOfDate(this.year() + 1, 0, 1) - 1;
  61925. break;
  61926. case 'quarter':
  61927. time =
  61928. startOfDate(
  61929. this.year(),
  61930. this.month() - (this.month() % 3) + 3,
  61931. 1
  61932. ) - 1;
  61933. break;
  61934. case 'month':
  61935. time = startOfDate(this.year(), this.month() + 1, 1) - 1;
  61936. break;
  61937. case 'week':
  61938. time =
  61939. startOfDate(
  61940. this.year(),
  61941. this.month(),
  61942. this.date() - this.weekday() + 7
  61943. ) - 1;
  61944. break;
  61945. case 'isoWeek':
  61946. time =
  61947. startOfDate(
  61948. this.year(),
  61949. this.month(),
  61950. this.date() - (this.isoWeekday() - 1) + 7
  61951. ) - 1;
  61952. break;
  61953. case 'day':
  61954. case 'date':
  61955. time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;
  61956. break;
  61957. case 'hour':
  61958. time = this._d.valueOf();
  61959. time +=
  61960. MS_PER_HOUR -
  61961. mod$1(
  61962. time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
  61963. MS_PER_HOUR
  61964. ) -
  61965. 1;
  61966. break;
  61967. case 'minute':
  61968. time = this._d.valueOf();
  61969. time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;
  61970. break;
  61971. case 'second':
  61972. time = this._d.valueOf();
  61973. time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;
  61974. break;
  61975. }
  61976. this._d.setTime(time);
  61977. hooks.updateOffset(this, true);
  61978. return this;
  61979. }
  61980. function valueOf() {
  61981. return this._d.valueOf() - (this._offset || 0) * 60000;
  61982. }
  61983. function unix() {
  61984. return Math.floor(this.valueOf() / 1000);
  61985. }
  61986. function toDate() {
  61987. return new Date(this.valueOf());
  61988. }
  61989. function toArray() {
  61990. var m = this;
  61991. return [
  61992. m.year(),
  61993. m.month(),
  61994. m.date(),
  61995. m.hour(),
  61996. m.minute(),
  61997. m.second(),
  61998. m.millisecond(),
  61999. ];
  62000. }
  62001. function toObject() {
  62002. var m = this;
  62003. return {
  62004. years: m.year(),
  62005. months: m.month(),
  62006. date: m.date(),
  62007. hours: m.hours(),
  62008. minutes: m.minutes(),
  62009. seconds: m.seconds(),
  62010. milliseconds: m.milliseconds(),
  62011. };
  62012. }
  62013. function toJSON() {
  62014. // new Date(NaN).toJSON() === null
  62015. return this.isValid() ? this.toISOString() : null;
  62016. }
  62017. function isValid$2() {
  62018. return isValid(this);
  62019. }
  62020. function parsingFlags() {
  62021. return extend({}, getParsingFlags(this));
  62022. }
  62023. function invalidAt() {
  62024. return getParsingFlags(this).overflow;
  62025. }
  62026. function creationData() {
  62027. return {
  62028. input: this._i,
  62029. format: this._f,
  62030. locale: this._locale,
  62031. isUTC: this._isUTC,
  62032. strict: this._strict,
  62033. };
  62034. }
  62035. addFormatToken('N', 0, 0, 'eraAbbr');
  62036. addFormatToken('NN', 0, 0, 'eraAbbr');
  62037. addFormatToken('NNN', 0, 0, 'eraAbbr');
  62038. addFormatToken('NNNN', 0, 0, 'eraName');
  62039. addFormatToken('NNNNN', 0, 0, 'eraNarrow');
  62040. addFormatToken('y', ['y', 1], 'yo', 'eraYear');
  62041. addFormatToken('y', ['yy', 2], 0, 'eraYear');
  62042. addFormatToken('y', ['yyy', 3], 0, 'eraYear');
  62043. addFormatToken('y', ['yyyy', 4], 0, 'eraYear');
  62044. addRegexToken('N', matchEraAbbr);
  62045. addRegexToken('NN', matchEraAbbr);
  62046. addRegexToken('NNN', matchEraAbbr);
  62047. addRegexToken('NNNN', matchEraName);
  62048. addRegexToken('NNNNN', matchEraNarrow);
  62049. addParseToken(['N', 'NN', 'NNN', 'NNNN', 'NNNNN'], function (
  62050. input,
  62051. array,
  62052. config,
  62053. token
  62054. ) {
  62055. var era = config._locale.erasParse(input, token, config._strict);
  62056. if (era) {
  62057. getParsingFlags(config).era = era;
  62058. } else {
  62059. getParsingFlags(config).invalidEra = input;
  62060. }
  62061. });
  62062. addRegexToken('y', matchUnsigned);
  62063. addRegexToken('yy', matchUnsigned);
  62064. addRegexToken('yyy', matchUnsigned);
  62065. addRegexToken('yyyy', matchUnsigned);
  62066. addRegexToken('yo', matchEraYearOrdinal);
  62067. addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);
  62068. addParseToken(['yo'], function (input, array, config, token) {
  62069. var match;
  62070. if (config._locale._eraYearOrdinalRegex) {
  62071. match = input.match(config._locale._eraYearOrdinalRegex);
  62072. }
  62073. if (config._locale.eraYearOrdinalParse) {
  62074. array[YEAR] = config._locale.eraYearOrdinalParse(input, match);
  62075. } else {
  62076. array[YEAR] = parseInt(input, 10);
  62077. }
  62078. });
  62079. function localeEras(m, format) {
  62080. var i,
  62081. l,
  62082. date,
  62083. eras = this._eras || getLocale('en')._eras;
  62084. for (i = 0, l = eras.length; i < l; ++i) {
  62085. switch (typeof eras[i].since) {
  62086. case 'string':
  62087. // truncate time
  62088. date = hooks(eras[i].since).startOf('day');
  62089. eras[i].since = date.valueOf();
  62090. break;
  62091. }
  62092. switch (typeof eras[i].until) {
  62093. case 'undefined':
  62094. eras[i].until = +Infinity;
  62095. break;
  62096. case 'string':
  62097. // truncate time
  62098. date = hooks(eras[i].until).startOf('day').valueOf();
  62099. eras[i].until = date.valueOf();
  62100. break;
  62101. }
  62102. }
  62103. return eras;
  62104. }
  62105. function localeErasParse(eraName, format, strict) {
  62106. var i,
  62107. l,
  62108. eras = this.eras(),
  62109. name,
  62110. abbr,
  62111. narrow;
  62112. eraName = eraName.toUpperCase();
  62113. for (i = 0, l = eras.length; i < l; ++i) {
  62114. name = eras[i].name.toUpperCase();
  62115. abbr = eras[i].abbr.toUpperCase();
  62116. narrow = eras[i].narrow.toUpperCase();
  62117. if (strict) {
  62118. switch (format) {
  62119. case 'N':
  62120. case 'NN':
  62121. case 'NNN':
  62122. if (abbr === eraName) {
  62123. return eras[i];
  62124. }
  62125. break;
  62126. case 'NNNN':
  62127. if (name === eraName) {
  62128. return eras[i];
  62129. }
  62130. break;
  62131. case 'NNNNN':
  62132. if (narrow === eraName) {
  62133. return eras[i];
  62134. }
  62135. break;
  62136. }
  62137. } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {
  62138. return eras[i];
  62139. }
  62140. }
  62141. }
  62142. function localeErasConvertYear(era, year) {
  62143. var dir = era.since <= era.until ? +1 : -1;
  62144. if (year === undefined) {
  62145. return hooks(era.since).year();
  62146. } else {
  62147. return hooks(era.since).year() + (year - era.offset) * dir;
  62148. }
  62149. }
  62150. function getEraName() {
  62151. var i,
  62152. l,
  62153. val,
  62154. eras = this.localeData().eras();
  62155. for (i = 0, l = eras.length; i < l; ++i) {
  62156. // truncate time
  62157. val = this.clone().startOf('day').valueOf();
  62158. if (eras[i].since <= val && val <= eras[i].until) {
  62159. return eras[i].name;
  62160. }
  62161. if (eras[i].until <= val && val <= eras[i].since) {
  62162. return eras[i].name;
  62163. }
  62164. }
  62165. return '';
  62166. }
  62167. function getEraNarrow() {
  62168. var i,
  62169. l,
  62170. val,
  62171. eras = this.localeData().eras();
  62172. for (i = 0, l = eras.length; i < l; ++i) {
  62173. // truncate time
  62174. val = this.clone().startOf('day').valueOf();
  62175. if (eras[i].since <= val && val <= eras[i].until) {
  62176. return eras[i].narrow;
  62177. }
  62178. if (eras[i].until <= val && val <= eras[i].since) {
  62179. return eras[i].narrow;
  62180. }
  62181. }
  62182. return '';
  62183. }
  62184. function getEraAbbr() {
  62185. var i,
  62186. l,
  62187. val,
  62188. eras = this.localeData().eras();
  62189. for (i = 0, l = eras.length; i < l; ++i) {
  62190. // truncate time
  62191. val = this.clone().startOf('day').valueOf();
  62192. if (eras[i].since <= val && val <= eras[i].until) {
  62193. return eras[i].abbr;
  62194. }
  62195. if (eras[i].until <= val && val <= eras[i].since) {
  62196. return eras[i].abbr;
  62197. }
  62198. }
  62199. return '';
  62200. }
  62201. function getEraYear() {
  62202. var i,
  62203. l,
  62204. dir,
  62205. val,
  62206. eras = this.localeData().eras();
  62207. for (i = 0, l = eras.length; i < l; ++i) {
  62208. dir = eras[i].since <= eras[i].until ? +1 : -1;
  62209. // truncate time
  62210. val = this.clone().startOf('day').valueOf();
  62211. if (
  62212. (eras[i].since <= val && val <= eras[i].until) ||
  62213. (eras[i].until <= val && val <= eras[i].since)
  62214. ) {
  62215. return (
  62216. (this.year() - hooks(eras[i].since).year()) * dir +
  62217. eras[i].offset
  62218. );
  62219. }
  62220. }
  62221. return this.year();
  62222. }
  62223. function erasNameRegex(isStrict) {
  62224. if (!hasOwnProp(this, '_erasNameRegex')) {
  62225. computeErasParse.call(this);
  62226. }
  62227. return isStrict ? this._erasNameRegex : this._erasRegex;
  62228. }
  62229. function erasAbbrRegex(isStrict) {
  62230. if (!hasOwnProp(this, '_erasAbbrRegex')) {
  62231. computeErasParse.call(this);
  62232. }
  62233. return isStrict ? this._erasAbbrRegex : this._erasRegex;
  62234. }
  62235. function erasNarrowRegex(isStrict) {
  62236. if (!hasOwnProp(this, '_erasNarrowRegex')) {
  62237. computeErasParse.call(this);
  62238. }
  62239. return isStrict ? this._erasNarrowRegex : this._erasRegex;
  62240. }
  62241. function matchEraAbbr(isStrict, locale) {
  62242. return locale.erasAbbrRegex(isStrict);
  62243. }
  62244. function matchEraName(isStrict, locale) {
  62245. return locale.erasNameRegex(isStrict);
  62246. }
  62247. function matchEraNarrow(isStrict, locale) {
  62248. return locale.erasNarrowRegex(isStrict);
  62249. }
  62250. function matchEraYearOrdinal(isStrict, locale) {
  62251. return locale._eraYearOrdinalRegex || matchUnsigned;
  62252. }
  62253. function computeErasParse() {
  62254. var abbrPieces = [],
  62255. namePieces = [],
  62256. narrowPieces = [],
  62257. mixedPieces = [],
  62258. i,
  62259. l,
  62260. eras = this.eras();
  62261. for (i = 0, l = eras.length; i < l; ++i) {
  62262. namePieces.push(regexEscape(eras[i].name));
  62263. abbrPieces.push(regexEscape(eras[i].abbr));
  62264. narrowPieces.push(regexEscape(eras[i].narrow));
  62265. mixedPieces.push(regexEscape(eras[i].name));
  62266. mixedPieces.push(regexEscape(eras[i].abbr));
  62267. mixedPieces.push(regexEscape(eras[i].narrow));
  62268. }
  62269. this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
  62270. this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');
  62271. this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');
  62272. this._erasNarrowRegex = new RegExp(
  62273. '^(' + narrowPieces.join('|') + ')',
  62274. 'i'
  62275. );
  62276. }
  62277. // FORMATTING
  62278. addFormatToken(0, ['gg', 2], 0, function () {
  62279. return this.weekYear() % 100;
  62280. });
  62281. addFormatToken(0, ['GG', 2], 0, function () {
  62282. return this.isoWeekYear() % 100;
  62283. });
  62284. function addWeekYearFormatToken(token, getter) {
  62285. addFormatToken(0, [token, token.length], 0, getter);
  62286. }
  62287. addWeekYearFormatToken('gggg', 'weekYear');
  62288. addWeekYearFormatToken('ggggg', 'weekYear');
  62289. addWeekYearFormatToken('GGGG', 'isoWeekYear');
  62290. addWeekYearFormatToken('GGGGG', 'isoWeekYear');
  62291. // ALIASES
  62292. addUnitAlias('weekYear', 'gg');
  62293. addUnitAlias('isoWeekYear', 'GG');
  62294. // PRIORITY
  62295. addUnitPriority('weekYear', 1);
  62296. addUnitPriority('isoWeekYear', 1);
  62297. // PARSING
  62298. addRegexToken('G', matchSigned);
  62299. addRegexToken('g', matchSigned);
  62300. addRegexToken('GG', match1to2, match2);
  62301. addRegexToken('gg', match1to2, match2);
  62302. addRegexToken('GGGG', match1to4, match4);
  62303. addRegexToken('gggg', match1to4, match4);
  62304. addRegexToken('GGGGG', match1to6, match6);
  62305. addRegexToken('ggggg', match1to6, match6);
  62306. addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (
  62307. input,
  62308. week,
  62309. config,
  62310. token
  62311. ) {
  62312. week[token.substr(0, 2)] = toInt(input);
  62313. });
  62314. addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
  62315. week[token] = hooks.parseTwoDigitYear(input);
  62316. });
  62317. // MOMENTS
  62318. function getSetWeekYear(input) {
  62319. return getSetWeekYearHelper.call(
  62320. this,
  62321. input,
  62322. this.week(),
  62323. this.weekday(),
  62324. this.localeData()._week.dow,
  62325. this.localeData()._week.doy
  62326. );
  62327. }
  62328. function getSetISOWeekYear(input) {
  62329. return getSetWeekYearHelper.call(
  62330. this,
  62331. input,
  62332. this.isoWeek(),
  62333. this.isoWeekday(),
  62334. 1,
  62335. 4
  62336. );
  62337. }
  62338. function getISOWeeksInYear() {
  62339. return weeksInYear(this.year(), 1, 4);
  62340. }
  62341. function getISOWeeksInISOWeekYear() {
  62342. return weeksInYear(this.isoWeekYear(), 1, 4);
  62343. }
  62344. function getWeeksInYear() {
  62345. var weekInfo = this.localeData()._week;
  62346. return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
  62347. }
  62348. function getWeeksInWeekYear() {
  62349. var weekInfo = this.localeData()._week;
  62350. return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);
  62351. }
  62352. function getSetWeekYearHelper(input, week, weekday, dow, doy) {
  62353. var weeksTarget;
  62354. if (input == null) {
  62355. return weekOfYear(this, dow, doy).year;
  62356. } else {
  62357. weeksTarget = weeksInYear(input, dow, doy);
  62358. if (week > weeksTarget) {
  62359. week = weeksTarget;
  62360. }
  62361. return setWeekAll.call(this, input, week, weekday, dow, doy);
  62362. }
  62363. }
  62364. function setWeekAll(weekYear, week, weekday, dow, doy) {
  62365. var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
  62366. date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
  62367. this.year(date.getUTCFullYear());
  62368. this.month(date.getUTCMonth());
  62369. this.date(date.getUTCDate());
  62370. return this;
  62371. }
  62372. // FORMATTING
  62373. addFormatToken('Q', 0, 'Qo', 'quarter');
  62374. // ALIASES
  62375. addUnitAlias('quarter', 'Q');
  62376. // PRIORITY
  62377. addUnitPriority('quarter', 7);
  62378. // PARSING
  62379. addRegexToken('Q', match1);
  62380. addParseToken('Q', function (input, array) {
  62381. array[MONTH] = (toInt(input) - 1) * 3;
  62382. });
  62383. // MOMENTS
  62384. function getSetQuarter(input) {
  62385. return input == null
  62386. ? Math.ceil((this.month() + 1) / 3)
  62387. : this.month((input - 1) * 3 + (this.month() % 3));
  62388. }
  62389. // FORMATTING
  62390. addFormatToken('D', ['DD', 2], 'Do', 'date');
  62391. // ALIASES
  62392. addUnitAlias('date', 'D');
  62393. // PRIORITY
  62394. addUnitPriority('date', 9);
  62395. // PARSING
  62396. addRegexToken('D', match1to2);
  62397. addRegexToken('DD', match1to2, match2);
  62398. addRegexToken('Do', function (isStrict, locale) {
  62399. // TODO: Remove "ordinalParse" fallback in next major release.
  62400. return isStrict
  62401. ? locale._dayOfMonthOrdinalParse || locale._ordinalParse
  62402. : locale._dayOfMonthOrdinalParseLenient;
  62403. });
  62404. addParseToken(['D', 'DD'], DATE);
  62405. addParseToken('Do', function (input, array) {
  62406. array[DATE] = toInt(input.match(match1to2)[0]);
  62407. });
  62408. // MOMENTS
  62409. var getSetDayOfMonth = makeGetSet('Date', true);
  62410. // FORMATTING
  62411. addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
  62412. // ALIASES
  62413. addUnitAlias('dayOfYear', 'DDD');
  62414. // PRIORITY
  62415. addUnitPriority('dayOfYear', 4);
  62416. // PARSING
  62417. addRegexToken('DDD', match1to3);
  62418. addRegexToken('DDDD', match3);
  62419. addParseToken(['DDD', 'DDDD'], function (input, array, config) {
  62420. config._dayOfYear = toInt(input);
  62421. });
  62422. // HELPERS
  62423. // MOMENTS
  62424. function getSetDayOfYear(input) {
  62425. var dayOfYear =
  62426. Math.round(
  62427. (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5
  62428. ) + 1;
  62429. return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');
  62430. }
  62431. // FORMATTING
  62432. addFormatToken('m', ['mm', 2], 0, 'minute');
  62433. // ALIASES
  62434. addUnitAlias('minute', 'm');
  62435. // PRIORITY
  62436. addUnitPriority('minute', 14);
  62437. // PARSING
  62438. addRegexToken('m', match1to2);
  62439. addRegexToken('mm', match1to2, match2);
  62440. addParseToken(['m', 'mm'], MINUTE);
  62441. // MOMENTS
  62442. var getSetMinute = makeGetSet('Minutes', false);
  62443. // FORMATTING
  62444. addFormatToken('s', ['ss', 2], 0, 'second');
  62445. // ALIASES
  62446. addUnitAlias('second', 's');
  62447. // PRIORITY
  62448. addUnitPriority('second', 15);
  62449. // PARSING
  62450. addRegexToken('s', match1to2);
  62451. addRegexToken('ss', match1to2, match2);
  62452. addParseToken(['s', 'ss'], SECOND);
  62453. // MOMENTS
  62454. var getSetSecond = makeGetSet('Seconds', false);
  62455. // FORMATTING
  62456. addFormatToken('S', 0, 0, function () {
  62457. return ~~(this.millisecond() / 100);
  62458. });
  62459. addFormatToken(0, ['SS', 2], 0, function () {
  62460. return ~~(this.millisecond() / 10);
  62461. });
  62462. addFormatToken(0, ['SSS', 3], 0, 'millisecond');
  62463. addFormatToken(0, ['SSSS', 4], 0, function () {
  62464. return this.millisecond() * 10;
  62465. });
  62466. addFormatToken(0, ['SSSSS', 5], 0, function () {
  62467. return this.millisecond() * 100;
  62468. });
  62469. addFormatToken(0, ['SSSSSS', 6], 0, function () {
  62470. return this.millisecond() * 1000;
  62471. });
  62472. addFormatToken(0, ['SSSSSSS', 7], 0, function () {
  62473. return this.millisecond() * 10000;
  62474. });
  62475. addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
  62476. return this.millisecond() * 100000;
  62477. });
  62478. addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
  62479. return this.millisecond() * 1000000;
  62480. });
  62481. // ALIASES
  62482. addUnitAlias('millisecond', 'ms');
  62483. // PRIORITY
  62484. addUnitPriority('millisecond', 16);
  62485. // PARSING
  62486. addRegexToken('S', match1to3, match1);
  62487. addRegexToken('SS', match1to3, match2);
  62488. addRegexToken('SSS', match1to3, match3);
  62489. var token, getSetMillisecond;
  62490. for (token = 'SSSS'; token.length <= 9; token += 'S') {
  62491. addRegexToken(token, matchUnsigned);
  62492. }
  62493. function parseMs(input, array) {
  62494. array[MILLISECOND] = toInt(('0.' + input) * 1000);
  62495. }
  62496. for (token = 'S'; token.length <= 9; token += 'S') {
  62497. addParseToken(token, parseMs);
  62498. }
  62499. getSetMillisecond = makeGetSet('Milliseconds', false);
  62500. // FORMATTING
  62501. addFormatToken('z', 0, 0, 'zoneAbbr');
  62502. addFormatToken('zz', 0, 0, 'zoneName');
  62503. // MOMENTS
  62504. function getZoneAbbr() {
  62505. return this._isUTC ? 'UTC' : '';
  62506. }
  62507. function getZoneName() {
  62508. return this._isUTC ? 'Coordinated Universal Time' : '';
  62509. }
  62510. var proto = Moment.prototype;
  62511. proto.add = add;
  62512. proto.calendar = calendar$1;
  62513. proto.clone = clone;
  62514. proto.diff = diff;
  62515. proto.endOf = endOf;
  62516. proto.format = format;
  62517. proto.from = from;
  62518. proto.fromNow = fromNow;
  62519. proto.to = to;
  62520. proto.toNow = toNow;
  62521. proto.get = stringGet;
  62522. proto.invalidAt = invalidAt;
  62523. proto.isAfter = isAfter;
  62524. proto.isBefore = isBefore;
  62525. proto.isBetween = isBetween;
  62526. proto.isSame = isSame;
  62527. proto.isSameOrAfter = isSameOrAfter;
  62528. proto.isSameOrBefore = isSameOrBefore;
  62529. proto.isValid = isValid$2;
  62530. proto.lang = lang;
  62531. proto.locale = locale;
  62532. proto.localeData = localeData;
  62533. proto.max = prototypeMax;
  62534. proto.min = prototypeMin;
  62535. proto.parsingFlags = parsingFlags;
  62536. proto.set = stringSet;
  62537. proto.startOf = startOf;
  62538. proto.subtract = subtract;
  62539. proto.toArray = toArray;
  62540. proto.toObject = toObject;
  62541. proto.toDate = toDate;
  62542. proto.toISOString = toISOString;
  62543. proto.inspect = inspect;
  62544. if (typeof Symbol !== 'undefined' && Symbol.for != null) {
  62545. proto[Symbol.for('nodejs.util.inspect.custom')] = function () {
  62546. return 'Moment<' + this.format() + '>';
  62547. };
  62548. }
  62549. proto.toJSON = toJSON;
  62550. proto.toString = toString;
  62551. proto.unix = unix;
  62552. proto.valueOf = valueOf;
  62553. proto.creationData = creationData;
  62554. proto.eraName = getEraName;
  62555. proto.eraNarrow = getEraNarrow;
  62556. proto.eraAbbr = getEraAbbr;
  62557. proto.eraYear = getEraYear;
  62558. proto.year = getSetYear;
  62559. proto.isLeapYear = getIsLeapYear;
  62560. proto.weekYear = getSetWeekYear;
  62561. proto.isoWeekYear = getSetISOWeekYear;
  62562. proto.quarter = proto.quarters = getSetQuarter;
  62563. proto.month = getSetMonth;
  62564. proto.daysInMonth = getDaysInMonth;
  62565. proto.week = proto.weeks = getSetWeek;
  62566. proto.isoWeek = proto.isoWeeks = getSetISOWeek;
  62567. proto.weeksInYear = getWeeksInYear;
  62568. proto.weeksInWeekYear = getWeeksInWeekYear;
  62569. proto.isoWeeksInYear = getISOWeeksInYear;
  62570. proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;
  62571. proto.date = getSetDayOfMonth;
  62572. proto.day = proto.days = getSetDayOfWeek;
  62573. proto.weekday = getSetLocaleDayOfWeek;
  62574. proto.isoWeekday = getSetISODayOfWeek;
  62575. proto.dayOfYear = getSetDayOfYear;
  62576. proto.hour = proto.hours = getSetHour;
  62577. proto.minute = proto.minutes = getSetMinute;
  62578. proto.second = proto.seconds = getSetSecond;
  62579. proto.millisecond = proto.milliseconds = getSetMillisecond;
  62580. proto.utcOffset = getSetOffset;
  62581. proto.utc = setOffsetToUTC;
  62582. proto.local = setOffsetToLocal;
  62583. proto.parseZone = setOffsetToParsedOffset;
  62584. proto.hasAlignedHourOffset = hasAlignedHourOffset;
  62585. proto.isDST = isDaylightSavingTime;
  62586. proto.isLocal = isLocal;
  62587. proto.isUtcOffset = isUtcOffset;
  62588. proto.isUtc = isUtc;
  62589. proto.isUTC = isUtc;
  62590. proto.zoneAbbr = getZoneAbbr;
  62591. proto.zoneName = getZoneName;
  62592. proto.dates = deprecate(
  62593. 'dates accessor is deprecated. Use date instead.',
  62594. getSetDayOfMonth
  62595. );
  62596. proto.months = deprecate(
  62597. 'months accessor is deprecated. Use month instead',
  62598. getSetMonth
  62599. );
  62600. proto.years = deprecate(
  62601. 'years accessor is deprecated. Use year instead',
  62602. getSetYear
  62603. );
  62604. proto.zone = deprecate(
  62605. 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',
  62606. getSetZone
  62607. );
  62608. proto.isDSTShifted = deprecate(
  62609. 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',
  62610. isDaylightSavingTimeShifted
  62611. );
  62612. function createUnix(input) {
  62613. return createLocal(input * 1000);
  62614. }
  62615. function createInZone() {
  62616. return createLocal.apply(null, arguments).parseZone();
  62617. }
  62618. function preParsePostFormat(string) {
  62619. return string;
  62620. }
  62621. var proto$1 = Locale.prototype;
  62622. proto$1.calendar = calendar;
  62623. proto$1.longDateFormat = longDateFormat;
  62624. proto$1.invalidDate = invalidDate;
  62625. proto$1.ordinal = ordinal;
  62626. proto$1.preparse = preParsePostFormat;
  62627. proto$1.postformat = preParsePostFormat;
  62628. proto$1.relativeTime = relativeTime;
  62629. proto$1.pastFuture = pastFuture;
  62630. proto$1.set = set;
  62631. proto$1.eras = localeEras;
  62632. proto$1.erasParse = localeErasParse;
  62633. proto$1.erasConvertYear = localeErasConvertYear;
  62634. proto$1.erasAbbrRegex = erasAbbrRegex;
  62635. proto$1.erasNameRegex = erasNameRegex;
  62636. proto$1.erasNarrowRegex = erasNarrowRegex;
  62637. proto$1.months = localeMonths;
  62638. proto$1.monthsShort = localeMonthsShort;
  62639. proto$1.monthsParse = localeMonthsParse;
  62640. proto$1.monthsRegex = monthsRegex;
  62641. proto$1.monthsShortRegex = monthsShortRegex;
  62642. proto$1.week = localeWeek;
  62643. proto$1.firstDayOfYear = localeFirstDayOfYear;
  62644. proto$1.firstDayOfWeek = localeFirstDayOfWeek;
  62645. proto$1.weekdays = localeWeekdays;
  62646. proto$1.weekdaysMin = localeWeekdaysMin;
  62647. proto$1.weekdaysShort = localeWeekdaysShort;
  62648. proto$1.weekdaysParse = localeWeekdaysParse;
  62649. proto$1.weekdaysRegex = weekdaysRegex;
  62650. proto$1.weekdaysShortRegex = weekdaysShortRegex;
  62651. proto$1.weekdaysMinRegex = weekdaysMinRegex;
  62652. proto$1.isPM = localeIsPM;
  62653. proto$1.meridiem = localeMeridiem;
  62654. function get$1(format, index, field, setter) {
  62655. var locale = getLocale(),
  62656. utc = createUTC().set(setter, index);
  62657. return locale[field](utc, format);
  62658. }
  62659. function listMonthsImpl(format, index, field) {
  62660. if (isNumber(format)) {
  62661. index = format;
  62662. format = undefined;
  62663. }
  62664. format = format || '';
  62665. if (index != null) {
  62666. return get$1(format, index, field, 'month');
  62667. }
  62668. var i,
  62669. out = [];
  62670. for (i = 0; i < 12; i++) {
  62671. out[i] = get$1(format, i, field, 'month');
  62672. }
  62673. return out;
  62674. }
  62675. // ()
  62676. // (5)
  62677. // (fmt, 5)
  62678. // (fmt)
  62679. // (true)
  62680. // (true, 5)
  62681. // (true, fmt, 5)
  62682. // (true, fmt)
  62683. function listWeekdaysImpl(localeSorted, format, index, field) {
  62684. if (typeof localeSorted === 'boolean') {
  62685. if (isNumber(format)) {
  62686. index = format;
  62687. format = undefined;
  62688. }
  62689. format = format || '';
  62690. } else {
  62691. format = localeSorted;
  62692. index = format;
  62693. localeSorted = false;
  62694. if (isNumber(format)) {
  62695. index = format;
  62696. format = undefined;
  62697. }
  62698. format = format || '';
  62699. }
  62700. var locale = getLocale(),
  62701. shift = localeSorted ? locale._week.dow : 0,
  62702. i,
  62703. out = [];
  62704. if (index != null) {
  62705. return get$1(format, (index + shift) % 7, field, 'day');
  62706. }
  62707. for (i = 0; i < 7; i++) {
  62708. out[i] = get$1(format, (i + shift) % 7, field, 'day');
  62709. }
  62710. return out;
  62711. }
  62712. function listMonths(format, index) {
  62713. return listMonthsImpl(format, index, 'months');
  62714. }
  62715. function listMonthsShort(format, index) {
  62716. return listMonthsImpl(format, index, 'monthsShort');
  62717. }
  62718. function listWeekdays(localeSorted, format, index) {
  62719. return listWeekdaysImpl(localeSorted, format, index, 'weekdays');
  62720. }
  62721. function listWeekdaysShort(localeSorted, format, index) {
  62722. return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');
  62723. }
  62724. function listWeekdaysMin(localeSorted, format, index) {
  62725. return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');
  62726. }
  62727. getSetGlobalLocale('en', {
  62728. eras: [
  62729. {
  62730. since: '0001-01-01',
  62731. until: +Infinity,
  62732. offset: 1,
  62733. name: 'Anno Domini',
  62734. narrow: 'AD',
  62735. abbr: 'AD',
  62736. },
  62737. {
  62738. since: '0000-12-31',
  62739. until: -Infinity,
  62740. offset: 1,
  62741. name: 'Before Christ',
  62742. narrow: 'BC',
  62743. abbr: 'BC',
  62744. },
  62745. ],
  62746. dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
  62747. ordinal: function (number) {
  62748. var b = number % 10,
  62749. output =
  62750. toInt((number % 100) / 10) === 1
  62751. ? 'th'
  62752. : b === 1
  62753. ? 'st'
  62754. : b === 2
  62755. ? 'nd'
  62756. : b === 3
  62757. ? 'rd'
  62758. : 'th';
  62759. return number + output;
  62760. },
  62761. });
  62762. // Side effect imports
  62763. hooks.lang = deprecate(
  62764. 'moment.lang is deprecated. Use moment.locale instead.',
  62765. getSetGlobalLocale
  62766. );
  62767. hooks.langData = deprecate(
  62768. 'moment.langData is deprecated. Use moment.localeData instead.',
  62769. getLocale
  62770. );
  62771. var mathAbs = Math.abs;
  62772. function abs() {
  62773. var data = this._data;
  62774. this._milliseconds = mathAbs(this._milliseconds);
  62775. this._days = mathAbs(this._days);
  62776. this._months = mathAbs(this._months);
  62777. data.milliseconds = mathAbs(data.milliseconds);
  62778. data.seconds = mathAbs(data.seconds);
  62779. data.minutes = mathAbs(data.minutes);
  62780. data.hours = mathAbs(data.hours);
  62781. data.months = mathAbs(data.months);
  62782. data.years = mathAbs(data.years);
  62783. return this;
  62784. }
  62785. function addSubtract$1(duration, input, value, direction) {
  62786. var other = createDuration(input, value);
  62787. duration._milliseconds += direction * other._milliseconds;
  62788. duration._days += direction * other._days;
  62789. duration._months += direction * other._months;
  62790. return duration._bubble();
  62791. }
  62792. // supports only 2.0-style add(1, 's') or add(duration)
  62793. function add$1(input, value) {
  62794. return addSubtract$1(this, input, value, 1);
  62795. }
  62796. // supports only 2.0-style subtract(1, 's') or subtract(duration)
  62797. function subtract$1(input, value) {
  62798. return addSubtract$1(this, input, value, -1);
  62799. }
  62800. function absCeil(number) {
  62801. if (number < 0) {
  62802. return Math.floor(number);
  62803. } else {
  62804. return Math.ceil(number);
  62805. }
  62806. }
  62807. function bubble() {
  62808. var milliseconds = this._milliseconds,
  62809. days = this._days,
  62810. months = this._months,
  62811. data = this._data,
  62812. seconds,
  62813. minutes,
  62814. hours,
  62815. years,
  62816. monthsFromDays;
  62817. // if we have a mix of positive and negative values, bubble down first
  62818. // check: https://github.com/moment/moment/issues/2166
  62819. if (
  62820. !(
  62821. (milliseconds >= 0 && days >= 0 && months >= 0) ||
  62822. (milliseconds <= 0 && days <= 0 && months <= 0)
  62823. )
  62824. ) {
  62825. milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
  62826. days = 0;
  62827. months = 0;
  62828. }
  62829. // The following code bubbles up values, see the tests for
  62830. // examples of what that means.
  62831. data.milliseconds = milliseconds % 1000;
  62832. seconds = absFloor(milliseconds / 1000);
  62833. data.seconds = seconds % 60;
  62834. minutes = absFloor(seconds / 60);
  62835. data.minutes = minutes % 60;
  62836. hours = absFloor(minutes / 60);
  62837. data.hours = hours % 24;
  62838. days += absFloor(hours / 24);
  62839. // convert days to months
  62840. monthsFromDays = absFloor(daysToMonths(days));
  62841. months += monthsFromDays;
  62842. days -= absCeil(monthsToDays(monthsFromDays));
  62843. // 12 months -> 1 year
  62844. years = absFloor(months / 12);
  62845. months %= 12;
  62846. data.days = days;
  62847. data.months = months;
  62848. data.years = years;
  62849. return this;
  62850. }
  62851. function daysToMonths(days) {
  62852. // 400 years have 146097 days (taking into account leap year rules)
  62853. // 400 years have 12 months === 4800
  62854. return (days * 4800) / 146097;
  62855. }
  62856. function monthsToDays(months) {
  62857. // the reverse of daysToMonths
  62858. return (months * 146097) / 4800;
  62859. }
  62860. function as(units) {
  62861. if (!this.isValid()) {
  62862. return NaN;
  62863. }
  62864. var days,
  62865. months,
  62866. milliseconds = this._milliseconds;
  62867. units = normalizeUnits(units);
  62868. if (units === 'month' || units === 'quarter' || units === 'year') {
  62869. days = this._days + milliseconds / 864e5;
  62870. months = this._months + daysToMonths(days);
  62871. switch (units) {
  62872. case 'month':
  62873. return months;
  62874. case 'quarter':
  62875. return months / 3;
  62876. case 'year':
  62877. return months / 12;
  62878. }
  62879. } else {
  62880. // handle milliseconds separately because of floating point math errors (issue #1867)
  62881. days = this._days + Math.round(monthsToDays(this._months));
  62882. switch (units) {
  62883. case 'week':
  62884. return days / 7 + milliseconds / 6048e5;
  62885. case 'day':
  62886. return days + milliseconds / 864e5;
  62887. case 'hour':
  62888. return days * 24 + milliseconds / 36e5;
  62889. case 'minute':
  62890. return days * 1440 + milliseconds / 6e4;
  62891. case 'second':
  62892. return days * 86400 + milliseconds / 1000;
  62893. // Math.floor prevents floating point math errors here
  62894. case 'millisecond':
  62895. return Math.floor(days * 864e5) + milliseconds;
  62896. default:
  62897. throw new Error('Unknown unit ' + units);
  62898. }
  62899. }
  62900. }
  62901. // TODO: Use this.as('ms')?
  62902. function valueOf$1() {
  62903. if (!this.isValid()) {
  62904. return NaN;
  62905. }
  62906. return (
  62907. this._milliseconds +
  62908. this._days * 864e5 +
  62909. (this._months % 12) * 2592e6 +
  62910. toInt(this._months / 12) * 31536e6
  62911. );
  62912. }
  62913. function makeAs(alias) {
  62914. return function () {
  62915. return this.as(alias);
  62916. };
  62917. }
  62918. var asMilliseconds = makeAs('ms'),
  62919. asSeconds = makeAs('s'),
  62920. asMinutes = makeAs('m'),
  62921. asHours = makeAs('h'),
  62922. asDays = makeAs('d'),
  62923. asWeeks = makeAs('w'),
  62924. asMonths = makeAs('M'),
  62925. asQuarters = makeAs('Q'),
  62926. asYears = makeAs('y');
  62927. function clone$1() {
  62928. return createDuration(this);
  62929. }
  62930. function get$2(units) {
  62931. units = normalizeUnits(units);
  62932. return this.isValid() ? this[units + 's']() : NaN;
  62933. }
  62934. function makeGetter(name) {
  62935. return function () {
  62936. return this.isValid() ? this._data[name] : NaN;
  62937. };
  62938. }
  62939. var milliseconds = makeGetter('milliseconds'),
  62940. seconds = makeGetter('seconds'),
  62941. minutes = makeGetter('minutes'),
  62942. hours = makeGetter('hours'),
  62943. days = makeGetter('days'),
  62944. months = makeGetter('months'),
  62945. years = makeGetter('years');
  62946. function weeks() {
  62947. return absFloor(this.days() / 7);
  62948. }
  62949. var round = Math.round,
  62950. thresholds = {
  62951. ss: 44, // a few seconds to seconds
  62952. s: 45, // seconds to minute
  62953. m: 45, // minutes to hour
  62954. h: 22, // hours to day
  62955. d: 26, // days to month/week
  62956. w: null, // weeks to month
  62957. M: 11, // months to year
  62958. };
  62959. // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
  62960. function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
  62961. return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
  62962. }
  62963. function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {
  62964. var duration = createDuration(posNegDuration).abs(),
  62965. seconds = round(duration.as('s')),
  62966. minutes = round(duration.as('m')),
  62967. hours = round(duration.as('h')),
  62968. days = round(duration.as('d')),
  62969. months = round(duration.as('M')),
  62970. weeks = round(duration.as('w')),
  62971. years = round(duration.as('y')),
  62972. a =
  62973. (seconds <= thresholds.ss && ['s', seconds]) ||
  62974. (seconds < thresholds.s && ['ss', seconds]) ||
  62975. (minutes <= 1 && ['m']) ||
  62976. (minutes < thresholds.m && ['mm', minutes]) ||
  62977. (hours <= 1 && ['h']) ||
  62978. (hours < thresholds.h && ['hh', hours]) ||
  62979. (days <= 1 && ['d']) ||
  62980. (days < thresholds.d && ['dd', days]);
  62981. if (thresholds.w != null) {
  62982. a =
  62983. a ||
  62984. (weeks <= 1 && ['w']) ||
  62985. (weeks < thresholds.w && ['ww', weeks]);
  62986. }
  62987. a = a ||
  62988. (months <= 1 && ['M']) ||
  62989. (months < thresholds.M && ['MM', months]) ||
  62990. (years <= 1 && ['y']) || ['yy', years];
  62991. a[2] = withoutSuffix;
  62992. a[3] = +posNegDuration > 0;
  62993. a[4] = locale;
  62994. return substituteTimeAgo.apply(null, a);
  62995. }
  62996. // This function allows you to set the rounding function for relative time strings
  62997. function getSetRelativeTimeRounding(roundingFunction) {
  62998. if (roundingFunction === undefined) {
  62999. return round;
  63000. }
  63001. if (typeof roundingFunction === 'function') {
  63002. round = roundingFunction;
  63003. return true;
  63004. }
  63005. return false;
  63006. }
  63007. // This function allows you to set a threshold for relative time strings
  63008. function getSetRelativeTimeThreshold(threshold, limit) {
  63009. if (thresholds[threshold] === undefined) {
  63010. return false;
  63011. }
  63012. if (limit === undefined) {
  63013. return thresholds[threshold];
  63014. }
  63015. thresholds[threshold] = limit;
  63016. if (threshold === 's') {
  63017. thresholds.ss = limit - 1;
  63018. }
  63019. return true;
  63020. }
  63021. function humanize(argWithSuffix, argThresholds) {
  63022. if (!this.isValid()) {
  63023. return this.localeData().invalidDate();
  63024. }
  63025. var withSuffix = false,
  63026. th = thresholds,
  63027. locale,
  63028. output;
  63029. if (typeof argWithSuffix === 'object') {
  63030. argThresholds = argWithSuffix;
  63031. argWithSuffix = false;
  63032. }
  63033. if (typeof argWithSuffix === 'boolean') {
  63034. withSuffix = argWithSuffix;
  63035. }
  63036. if (typeof argThresholds === 'object') {
  63037. th = Object.assign({}, thresholds, argThresholds);
  63038. if (argThresholds.s != null && argThresholds.ss == null) {
  63039. th.ss = argThresholds.s - 1;
  63040. }
  63041. }
  63042. locale = this.localeData();
  63043. output = relativeTime$1(this, !withSuffix, th, locale);
  63044. if (withSuffix) {
  63045. output = locale.pastFuture(+this, output);
  63046. }
  63047. return locale.postformat(output);
  63048. }
  63049. var abs$1 = Math.abs;
  63050. function sign(x) {
  63051. return (x > 0) - (x < 0) || +x;
  63052. }
  63053. function toISOString$1() {
  63054. // for ISO strings we do not use the normal bubbling rules:
  63055. // * milliseconds bubble up until they become hours
  63056. // * days do not bubble at all
  63057. // * months bubble up until they become years
  63058. // This is because there is no context-free conversion between hours and days
  63059. // (think of clock changes)
  63060. // and also not between days and months (28-31 days per month)
  63061. if (!this.isValid()) {
  63062. return this.localeData().invalidDate();
  63063. }
  63064. var seconds = abs$1(this._milliseconds) / 1000,
  63065. days = abs$1(this._days),
  63066. months = abs$1(this._months),
  63067. minutes,
  63068. hours,
  63069. years,
  63070. s,
  63071. total = this.asSeconds(),
  63072. totalSign,
  63073. ymSign,
  63074. daysSign,
  63075. hmsSign;
  63076. if (!total) {
  63077. // this is the same as C#'s (Noda) and python (isodate)...
  63078. // but not other JS (goog.date)
  63079. return 'P0D';
  63080. }
  63081. // 3600 seconds -> 60 minutes -> 1 hour
  63082. minutes = absFloor(seconds / 60);
  63083. hours = absFloor(minutes / 60);
  63084. seconds %= 60;
  63085. minutes %= 60;
  63086. // 12 months -> 1 year
  63087. years = absFloor(months / 12);
  63088. months %= 12;
  63089. // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
  63090. s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : '';
  63091. totalSign = total < 0 ? '-' : '';
  63092. ymSign = sign(this._months) !== sign(total) ? '-' : '';
  63093. daysSign = sign(this._days) !== sign(total) ? '-' : '';
  63094. hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';
  63095. return (
  63096. totalSign +
  63097. 'P' +
  63098. (years ? ymSign + years + 'Y' : '') +
  63099. (months ? ymSign + months + 'M' : '') +
  63100. (days ? daysSign + days + 'D' : '') +
  63101. (hours || minutes || seconds ? 'T' : '') +
  63102. (hours ? hmsSign + hours + 'H' : '') +
  63103. (minutes ? hmsSign + minutes + 'M' : '') +
  63104. (seconds ? hmsSign + s + 'S' : '')
  63105. );
  63106. }
  63107. var proto$2 = Duration.prototype;
  63108. proto$2.isValid = isValid$1;
  63109. proto$2.abs = abs;
  63110. proto$2.add = add$1;
  63111. proto$2.subtract = subtract$1;
  63112. proto$2.as = as;
  63113. proto$2.asMilliseconds = asMilliseconds;
  63114. proto$2.asSeconds = asSeconds;
  63115. proto$2.asMinutes = asMinutes;
  63116. proto$2.asHours = asHours;
  63117. proto$2.asDays = asDays;
  63118. proto$2.asWeeks = asWeeks;
  63119. proto$2.asMonths = asMonths;
  63120. proto$2.asQuarters = asQuarters;
  63121. proto$2.asYears = asYears;
  63122. proto$2.valueOf = valueOf$1;
  63123. proto$2._bubble = bubble;
  63124. proto$2.clone = clone$1;
  63125. proto$2.get = get$2;
  63126. proto$2.milliseconds = milliseconds;
  63127. proto$2.seconds = seconds;
  63128. proto$2.minutes = minutes;
  63129. proto$2.hours = hours;
  63130. proto$2.days = days;
  63131. proto$2.weeks = weeks;
  63132. proto$2.months = months;
  63133. proto$2.years = years;
  63134. proto$2.humanize = humanize;
  63135. proto$2.toISOString = toISOString$1;
  63136. proto$2.toString = toISOString$1;
  63137. proto$2.toJSON = toISOString$1;
  63138. proto$2.locale = locale;
  63139. proto$2.localeData = localeData;
  63140. proto$2.toIsoString = deprecate(
  63141. 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',
  63142. toISOString$1
  63143. );
  63144. proto$2.lang = lang;
  63145. // FORMATTING
  63146. addFormatToken('X', 0, 0, 'unix');
  63147. addFormatToken('x', 0, 0, 'valueOf');
  63148. // PARSING
  63149. addRegexToken('x', matchSigned);
  63150. addRegexToken('X', matchTimestamp);
  63151. addParseToken('X', function (input, array, config) {
  63152. config._d = new Date(parseFloat(input) * 1000);
  63153. });
  63154. addParseToken('x', function (input, array, config) {
  63155. config._d = new Date(toInt(input));
  63156. });
  63157. //! moment.js
  63158. hooks.version = '2.29.1';
  63159. setHookCallback(createLocal);
  63160. hooks.fn = proto;
  63161. hooks.min = min;
  63162. hooks.max = max;
  63163. hooks.now = now;
  63164. hooks.utc = createUTC;
  63165. hooks.unix = createUnix;
  63166. hooks.months = listMonths;
  63167. hooks.isDate = isDate;
  63168. hooks.locale = getSetGlobalLocale;
  63169. hooks.invalid = createInvalid;
  63170. hooks.duration = createDuration;
  63171. hooks.isMoment = isMoment;
  63172. hooks.weekdays = listWeekdays;
  63173. hooks.parseZone = createInZone;
  63174. hooks.localeData = getLocale;
  63175. hooks.isDuration = isDuration;
  63176. hooks.monthsShort = listMonthsShort;
  63177. hooks.weekdaysMin = listWeekdaysMin;
  63178. hooks.defineLocale = defineLocale;
  63179. hooks.updateLocale = updateLocale;
  63180. hooks.locales = listLocales;
  63181. hooks.weekdaysShort = listWeekdaysShort;
  63182. hooks.normalizeUnits = normalizeUnits;
  63183. hooks.relativeTimeRounding = getSetRelativeTimeRounding;
  63184. hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
  63185. hooks.calendarFormat = getCalendarFormat;
  63186. hooks.prototype = proto;
  63187. // currently HTML5 input type only supports 24-hour formats
  63188. hooks.HTML5_FMT = {
  63189. DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type="datetime-local" />
  63190. DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type="datetime-local" step="1" />
  63191. DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type="datetime-local" step="0.001" />
  63192. DATE: 'YYYY-MM-DD', // <input type="date" />
  63193. TIME: 'HH:mm', // <input type="time" />
  63194. TIME_SECONDS: 'HH:mm:ss', // <input type="time" step="1" />
  63195. TIME_MS: 'HH:mm:ss.SSS', // <input type="time" step="0.001" />
  63196. WEEK: 'GGGG-[W]WW', // <input type="week" />
  63197. MONTH: 'YYYY-MM', // <input type="month" />
  63198. };
  63199. return hooks;
  63200. })));
  63201. /***/ }),
  63202. /***/ 4366:
  63203. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  63204. var makeIterator = __webpack_require__(54891);
  63205. /**
  63206. * Array filter
  63207. */
  63208. function filter(arr, callback, thisObj) {
  63209. callback = makeIterator(callback, thisObj);
  63210. var results = [];
  63211. if (arr == null) {
  63212. return results;
  63213. }
  63214. var i = -1, len = arr.length, value;
  63215. while (++i < len) {
  63216. value = arr[i];
  63217. if (callback(value, i, arr)) {
  63218. results.push(value);
  63219. }
  63220. }
  63221. return results;
  63222. }
  63223. module.exports = filter;
  63224. /***/ }),
  63225. /***/ 4978:
  63226. /***/ ((module) => {
  63227. /**
  63228. * Array forEach
  63229. */
  63230. function forEach(arr, callback, thisObj) {
  63231. if (arr == null) {
  63232. return;
  63233. }
  63234. var i = -1,
  63235. len = arr.length;
  63236. while (++i < len) {
  63237. // we iterate over sparse items since there is no way to make it
  63238. // work properly on IE 7-8. see #64
  63239. if ( callback.call(thisObj, arr[i], i, arr) === false ) {
  63240. break;
  63241. }
  63242. }
  63243. }
  63244. module.exports = forEach;
  63245. /***/ }),
  63246. /***/ 89451:
  63247. /***/ ((module) => {
  63248. /**
  63249. * Create slice of source array or array-like object
  63250. */
  63251. function slice(arr, start, end){
  63252. var len = arr.length;
  63253. if (start == null) {
  63254. start = 0;
  63255. } else if (start < 0) {
  63256. start = Math.max(len + start, 0);
  63257. } else {
  63258. start = Math.min(start, len);
  63259. }
  63260. if (end == null) {
  63261. end = len;
  63262. } else if (end < 0) {
  63263. end = Math.max(len + end, 0);
  63264. } else {
  63265. end = Math.min(end, len);
  63266. }
  63267. var result = [];
  63268. while (start < end) {
  63269. result.push(arr[start++]);
  63270. }
  63271. return result;
  63272. }
  63273. module.exports = slice;
  63274. /***/ }),
  63275. /***/ 79863:
  63276. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  63277. var filter = __webpack_require__(4366);
  63278. /**
  63279. * @return {array} Array of unique items
  63280. */
  63281. function unique(arr, compare){
  63282. compare = compare || isEqual;
  63283. return filter(arr, function(item, i, arr){
  63284. var n = arr.length;
  63285. while (++i < n) {
  63286. if ( compare(item, arr[i]) ) {
  63287. return false;
  63288. }
  63289. }
  63290. return true;
  63291. });
  63292. }
  63293. function isEqual(a, b){
  63294. return a === b;
  63295. }
  63296. module.exports = unique;
  63297. /***/ }),
  63298. /***/ 84596:
  63299. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  63300. var slice = __webpack_require__(89451);
  63301. /**
  63302. * Return a function that will execute in the given context, optionally adding any additional supplied parameters to the beginning of the arguments collection.
  63303. * @param {Function} fn Function.
  63304. * @param {object} context Execution context.
  63305. * @param {rest} args Arguments (0...n arguments).
  63306. * @return {Function} Wrapped Function.
  63307. */
  63308. function bind(fn, context, args){
  63309. var argsArr = slice(arguments, 2); //curried args
  63310. return function(){
  63311. return fn.apply(context, argsArr.concat(slice(arguments)));
  63312. };
  63313. }
  63314. module.exports = bind;
  63315. /***/ }),
  63316. /***/ 19761:
  63317. /***/ ((module) => {
  63318. /**
  63319. * Returns the first argument provided to it.
  63320. */
  63321. function identity(val){
  63322. return val;
  63323. }
  63324. module.exports = identity;
  63325. /***/ }),
  63326. /***/ 54891:
  63327. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  63328. var identity = __webpack_require__(19761);
  63329. var prop = __webpack_require__(99437);
  63330. var deepMatches = __webpack_require__(28614);
  63331. /**
  63332. * Converts argument into a valid iterator.
  63333. * Used internally on most array/object/collection methods that receives a
  63334. * callback/iterator providing a shortcut syntax.
  63335. */
  63336. function makeIterator(src, thisObj){
  63337. if (src == null) {
  63338. return identity;
  63339. }
  63340. switch(typeof src) {
  63341. case 'function':
  63342. // function is the first to improve perf (most common case)
  63343. // also avoid using `Function#call` if not needed, which boosts
  63344. // perf a lot in some cases
  63345. return (typeof thisObj !== 'undefined')? function(val, i, arr){
  63346. return src.call(thisObj, val, i, arr);
  63347. } : src;
  63348. case 'object':
  63349. return function(val){
  63350. return deepMatches(val, src);
  63351. };
  63352. case 'string':
  63353. case 'number':
  63354. return prop(src);
  63355. }
  63356. }
  63357. module.exports = makeIterator;
  63358. /***/ }),
  63359. /***/ 99437:
  63360. /***/ ((module) => {
  63361. /**
  63362. * Returns a function that gets a property of the passed object
  63363. */
  63364. function prop(name){
  63365. return function(obj){
  63366. return obj[name];
  63367. };
  63368. }
  63369. module.exports = prop;
  63370. /***/ }),
  63371. /***/ 19775:
  63372. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  63373. var isKind = __webpack_require__(52813);
  63374. /**
  63375. */
  63376. var isArray = Array.isArray || function (val) {
  63377. return isKind(val, 'Array');
  63378. };
  63379. module.exports = isArray;
  63380. /***/ }),
  63381. /***/ 52813:
  63382. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  63383. var kindOf = __webpack_require__(96224);
  63384. /**
  63385. * Check if value is from a specific "kind".
  63386. */
  63387. function isKind(val, kind){
  63388. return kindOf(val) === kind;
  63389. }
  63390. module.exports = isKind;
  63391. /***/ }),
  63392. /***/ 96224:
  63393. /***/ ((module) => {
  63394. /**
  63395. * Gets the "kind" of value. (e.g. "String", "Number", etc)
  63396. */
  63397. function kindOf(val) {
  63398. return Object.prototype.toString.call(val).slice(8, -1);
  63399. }
  63400. module.exports = kindOf;
  63401. /***/ }),
  63402. /***/ 4007:
  63403. /***/ ((module) => {
  63404. /**
  63405. * Typecast a value to a String, using an empty string value for null or
  63406. * undefined.
  63407. */
  63408. function toString(val){
  63409. return val == null ? '' : val.toString();
  63410. }
  63411. module.exports = toString;
  63412. /***/ }),
  63413. /***/ 19188:
  63414. /***/ ((module) => {
  63415. /**
  63416. * Clamps value inside range.
  63417. */
  63418. function clamp(val, min, max){
  63419. return val < min? min : (val > max? max : val);
  63420. }
  63421. module.exports = clamp;
  63422. /***/ }),
  63423. /***/ 28614:
  63424. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  63425. var forOwn = __webpack_require__(66463);
  63426. var isArray = __webpack_require__(19775);
  63427. function containsMatch(array, pattern) {
  63428. var i = -1, length = array.length;
  63429. while (++i < length) {
  63430. if (deepMatches(array[i], pattern)) {
  63431. return true;
  63432. }
  63433. }
  63434. return false;
  63435. }
  63436. function matchArray(target, pattern) {
  63437. var i = -1, patternLength = pattern.length;
  63438. while (++i < patternLength) {
  63439. if (!containsMatch(target, pattern[i])) {
  63440. return false;
  63441. }
  63442. }
  63443. return true;
  63444. }
  63445. function matchObject(target, pattern) {
  63446. var result = true;
  63447. forOwn(pattern, function(val, key) {
  63448. if (!deepMatches(target[key], val)) {
  63449. // Return false to break out of forOwn early
  63450. return (result = false);
  63451. }
  63452. });
  63453. return result;
  63454. }
  63455. /**
  63456. * Recursively check if the objects match.
  63457. */
  63458. function deepMatches(target, pattern){
  63459. if (target && typeof target === 'object' &&
  63460. pattern && typeof pattern === 'object') {
  63461. if (isArray(target) && isArray(pattern)) {
  63462. return matchArray(target, pattern);
  63463. } else {
  63464. return matchObject(target, pattern);
  63465. }
  63466. } else {
  63467. return target === pattern;
  63468. }
  63469. }
  63470. module.exports = deepMatches;
  63471. /***/ }),
  63472. /***/ 15473:
  63473. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  63474. var hasOwn = __webpack_require__(12683);
  63475. var _hasDontEnumBug,
  63476. _dontEnums;
  63477. function checkDontEnum(){
  63478. _dontEnums = [
  63479. 'toString',
  63480. 'toLocaleString',
  63481. 'valueOf',
  63482. 'hasOwnProperty',
  63483. 'isPrototypeOf',
  63484. 'propertyIsEnumerable',
  63485. 'constructor'
  63486. ];
  63487. _hasDontEnumBug = true;
  63488. for (var key in {'toString': null}) {
  63489. _hasDontEnumBug = false;
  63490. }
  63491. }
  63492. /**
  63493. * Similar to Array/forEach but works over object properties and fixes Don't
  63494. * Enum bug on IE.
  63495. * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation
  63496. */
  63497. function forIn(obj, fn, thisObj){
  63498. var key, i = 0;
  63499. // no need to check if argument is a real object that way we can use
  63500. // it for arrays, functions, date, etc.
  63501. //post-pone check till needed
  63502. if (_hasDontEnumBug == null) checkDontEnum();
  63503. for (key in obj) {
  63504. if (exec(fn, obj, key, thisObj) === false) {
  63505. break;
  63506. }
  63507. }
  63508. if (_hasDontEnumBug) {
  63509. var ctor = obj.constructor,
  63510. isProto = !!ctor && obj === ctor.prototype;
  63511. while (key = _dontEnums[i++]) {
  63512. // For constructor, if it is a prototype object the constructor
  63513. // is always non-enumerable unless defined otherwise (and
  63514. // enumerated above). For non-prototype objects, it will have
  63515. // to be defined on this object, since it cannot be defined on
  63516. // any prototype objects.
  63517. //
  63518. // For other [[DontEnum]] properties, check if the value is
  63519. // different than Object prototype value.
  63520. if (
  63521. (key !== 'constructor' ||
  63522. (!isProto && hasOwn(obj, key))) &&
  63523. obj[key] !== Object.prototype[key]
  63524. ) {
  63525. if (exec(fn, obj, key, thisObj) === false) {
  63526. break;
  63527. }
  63528. }
  63529. }
  63530. }
  63531. }
  63532. function exec(fn, obj, key, thisObj){
  63533. return fn.call(thisObj, obj[key], key, obj);
  63534. }
  63535. module.exports = forIn;
  63536. /***/ }),
  63537. /***/ 66463:
  63538. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  63539. var hasOwn = __webpack_require__(12683);
  63540. var forIn = __webpack_require__(15473);
  63541. /**
  63542. * Similar to Array/forEach but works over object properties and fixes Don't
  63543. * Enum bug on IE.
  63544. * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation
  63545. */
  63546. function forOwn(obj, fn, thisObj){
  63547. forIn(obj, function(val, key){
  63548. if (hasOwn(obj, key)) {
  63549. return fn.call(thisObj, obj[key], key, obj);
  63550. }
  63551. });
  63552. }
  63553. module.exports = forOwn;
  63554. /***/ }),
  63555. /***/ 12683:
  63556. /***/ ((module) => {
  63557. /**
  63558. * Safer Object.hasOwnProperty
  63559. */
  63560. function hasOwn(obj, prop){
  63561. return Object.prototype.hasOwnProperty.call(obj, prop);
  63562. }
  63563. module.exports = hasOwn;
  63564. /***/ }),
  63565. /***/ 85407:
  63566. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  63567. //automatically generated, do not edit!
  63568. //run `node build` instead
  63569. module.exports = {
  63570. 'contains' : __webpack_require__(58169),
  63571. 'decode' : __webpack_require__(96592),
  63572. 'encode' : __webpack_require__(54706),
  63573. 'getParam' : __webpack_require__(39567),
  63574. 'getQuery' : __webpack_require__(80902),
  63575. 'parse' : __webpack_require__(94460),
  63576. 'setParam' : __webpack_require__(5025)
  63577. };
  63578. /***/ }),
  63579. /***/ 58169:
  63580. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  63581. var getQuery = __webpack_require__(80902);
  63582. /**
  63583. * Checks if query string contains parameter.
  63584. */
  63585. function contains(url, paramName) {
  63586. var regex = new RegExp('(\\?|&)'+ paramName +'=', 'g'); //matches `?param=` or `&param=`
  63587. return regex.test(getQuery(url));
  63588. }
  63589. module.exports = contains;
  63590. /***/ }),
  63591. /***/ 96592:
  63592. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  63593. var typecast = __webpack_require__(37038);
  63594. var isArray = __webpack_require__(19775);
  63595. var hasOwn = __webpack_require__(12683);
  63596. /**
  63597. * Decode query string into an object of keys => vals.
  63598. */
  63599. function decode(queryStr, shouldTypecast) {
  63600. var queryArr = (queryStr || '').replace('?', '').split('&'),
  63601. reg = /([^=]+)=(.+)/,
  63602. i = -1,
  63603. obj = {},
  63604. equalIndex, cur, pValue, pName;
  63605. while ((cur = queryArr[++i])) {
  63606. equalIndex = cur.indexOf('=');
  63607. pName = cur.substring(0, equalIndex);
  63608. pValue = decodeURIComponent(cur.substring(equalIndex + 1));
  63609. if (shouldTypecast !== false) {
  63610. pValue = typecast(pValue);
  63611. }
  63612. if (hasOwn(obj, pName)){
  63613. if(isArray(obj[pName])){
  63614. obj[pName].push(pValue);
  63615. } else {
  63616. obj[pName] = [obj[pName], pValue];
  63617. }
  63618. } else {
  63619. obj[pName] = pValue;
  63620. }
  63621. }
  63622. return obj;
  63623. }
  63624. module.exports = decode;
  63625. /***/ }),
  63626. /***/ 54706:
  63627. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  63628. var forOwn = __webpack_require__(66463);
  63629. var isArray = __webpack_require__(19775);
  63630. var forEach = __webpack_require__(4978);
  63631. /**
  63632. * Encode object into a query string.
  63633. */
  63634. function encode(obj){
  63635. var query = [],
  63636. arrValues, reg;
  63637. forOwn(obj, function (val, key) {
  63638. if (isArray(val)) {
  63639. arrValues = key + '=';
  63640. reg = new RegExp('&'+key+'+=$');
  63641. forEach(val, function (aValue) {
  63642. arrValues += encodeURIComponent(aValue) + '&' + key + '=';
  63643. });
  63644. query.push(arrValues.replace(reg, ''));
  63645. } else {
  63646. query.push(key + '=' + encodeURIComponent(val));
  63647. }
  63648. });
  63649. return (query.length) ? '?' + query.join('&') : '';
  63650. }
  63651. module.exports = encode;
  63652. /***/ }),
  63653. /***/ 39567:
  63654. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  63655. var typecast = __webpack_require__(37038);
  63656. var getQuery = __webpack_require__(80902);
  63657. /**
  63658. * Get query parameter value.
  63659. */
  63660. function getParam(url, param, shouldTypecast){
  63661. var regexp = new RegExp('(\\?|&)'+ param + '=([^&]*)'), //matches `?param=value` or `&param=value`, value = $2
  63662. result = regexp.exec( getQuery(url) ),
  63663. val = (result && result[2])? result[2] : null;
  63664. return shouldTypecast === false? val : typecast(val);
  63665. }
  63666. module.exports = getParam;
  63667. /***/ }),
  63668. /***/ 80902:
  63669. /***/ ((module) => {
  63670. /**
  63671. * Gets full query as string with all special chars decoded.
  63672. */
  63673. function getQuery(url) {
  63674. // url = url.replace(/#.*\?/, '?'); //removes hash (to avoid getting hash query)
  63675. var queryString = /\?[a-zA-Z0-9\=\&\%\$\-\_\.\+\!\*\'\(\)\,]+/.exec(url); //valid chars according to: http://www.ietf.org/rfc/rfc1738.txt
  63676. return (queryString)? decodeURIComponent(queryString[0].replace(/\+/g,' ')) : '';
  63677. }
  63678. module.exports = getQuery;
  63679. /***/ }),
  63680. /***/ 94460:
  63681. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  63682. var decode = __webpack_require__(96592);
  63683. var getQuery = __webpack_require__(80902);
  63684. /**
  63685. * Get query string, parses and decodes it.
  63686. */
  63687. function parse(url, shouldTypecast) {
  63688. return decode(getQuery(url), shouldTypecast);
  63689. }
  63690. module.exports = parse;
  63691. /***/ }),
  63692. /***/ 5025:
  63693. /***/ ((module) => {
  63694. /**
  63695. * Set query string parameter value
  63696. */
  63697. function setParam(url, paramName, value){
  63698. url = url || '';
  63699. var re = new RegExp('(\\?|&)'+ paramName +'=[^&]*' );
  63700. var param = paramName +'='+ encodeURIComponent( value );
  63701. if ( re.test(url) ) {
  63702. return url.replace(re, '$1'+ param);
  63703. } else {
  63704. if (url.indexOf('?') === -1) {
  63705. url += '?';
  63706. }
  63707. if (url.indexOf('=') !== -1) {
  63708. url += '&';
  63709. }
  63710. return url + param;
  63711. }
  63712. }
  63713. module.exports = setParam;
  63714. /***/ }),
  63715. /***/ 88723:
  63716. /***/ ((module) => {
  63717. /**
  63718. * Contains all Unicode white-spaces. Taken from
  63719. * http://en.wikipedia.org/wiki/Whitespace_character.
  63720. */
  63721. module.exports = [
  63722. ' ', '\n', '\r', '\t', '\f', '\v', '\u00A0', '\u1680', '\u180E',
  63723. '\u2000', '\u2001', '\u2002', '\u2003', '\u2004', '\u2005', '\u2006',
  63724. '\u2007', '\u2008', '\u2009', '\u200A', '\u2028', '\u2029', '\u202F',
  63725. '\u205F', '\u3000'
  63726. ];
  63727. /***/ }),
  63728. /***/ 71047:
  63729. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  63730. var toString = __webpack_require__(4007);
  63731. var replaceAccents = __webpack_require__(90568);
  63732. var removeNonWord = __webpack_require__(657);
  63733. var upperCase = __webpack_require__(6608);
  63734. var lowerCase = __webpack_require__(60437);
  63735. /**
  63736. * Convert string to camelCase text.
  63737. */
  63738. function camelCase(str){
  63739. str = toString(str);
  63740. str = replaceAccents(str);
  63741. str = removeNonWord(str)
  63742. .replace(/[\-_]/g, ' '); // convert all hyphens and underscores to spaces
  63743. // handle acronyms
  63744. // matches lowercase chars && uppercase words
  63745. if (/[a-z]/.test(str) && /^|\s[A-Z]+\s|$/.test(str)) {
  63746. // we convert any word that isn't all caps into lowercase
  63747. str = str.replace(/\s(\w+)/g, function(word, m) {
  63748. return /^[A-Z]+$/.test(m) ? word : lowerCase(word);
  63749. });
  63750. } else if (/\s/.test(str)) {
  63751. // if it doesn't contain an acronym and it has spaces we should
  63752. // convert every word to lowercase
  63753. str = lowerCase(str);
  63754. }
  63755. return str
  63756. .replace(/\s[a-z]/g, upperCase) // convert first char of each word to UPPERCASE
  63757. .replace(/^\s*[A-Z]+/g, lowerCase) // convert first word to lowercase
  63758. .replace(/\s+/g, ''); // remove spaces
  63759. }
  63760. module.exports = camelCase;
  63761. /***/ }),
  63762. /***/ 85286:
  63763. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  63764. var toString = __webpack_require__(4007);
  63765. /**
  63766. * Searches for a given substring
  63767. */
  63768. function contains(str, substring, fromIndex){
  63769. str = toString(str);
  63770. substring = toString(substring);
  63771. return str.indexOf(substring, fromIndex) !== -1;
  63772. }
  63773. module.exports = contains;
  63774. /***/ }),
  63775. /***/ 60437:
  63776. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  63777. var toString = __webpack_require__(4007);
  63778. /**
  63779. * "Safer" String.toLowerCase()
  63780. */
  63781. function lowerCase(str){
  63782. str = toString(str);
  63783. return str.toLowerCase();
  63784. }
  63785. module.exports = lowerCase;
  63786. /***/ }),
  63787. /***/ 82516:
  63788. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  63789. var toString = __webpack_require__(4007);
  63790. var WHITE_SPACES = __webpack_require__(88723);
  63791. /**
  63792. * Remove chars from beginning of string.
  63793. */
  63794. function ltrim(str, chars) {
  63795. str = toString(str);
  63796. chars = chars || WHITE_SPACES;
  63797. var start = 0,
  63798. len = str.length,
  63799. charLen = chars.length,
  63800. found = true,
  63801. i, c;
  63802. while (found && start < len) {
  63803. found = false;
  63804. i = -1;
  63805. c = str.charAt(start);
  63806. while (++i < charLen) {
  63807. if (c === chars[i]) {
  63808. found = true;
  63809. start++;
  63810. break;
  63811. }
  63812. }
  63813. }
  63814. return (start >= len) ? '' : str.substr(start, len);
  63815. }
  63816. module.exports = ltrim;
  63817. /***/ }),
  63818. /***/ 657:
  63819. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  63820. var toString = __webpack_require__(4007);
  63821. // This pattern is generated by the _build/pattern-removeNonWord.js script
  63822. var PATTERN = /[^\x20\x2D0-9A-Z\x5Fa-z\xC0-\xD6\xD8-\xF6\xF8-\xFF]/g;
  63823. /**
  63824. * Remove non-word chars.
  63825. */
  63826. function removeNonWord(str){
  63827. str = toString(str);
  63828. return str.replace(PATTERN, '');
  63829. }
  63830. module.exports = removeNonWord;
  63831. /***/ }),
  63832. /***/ 90568:
  63833. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  63834. var toString = __webpack_require__(4007);
  63835. /**
  63836. * Replaces all accented chars with regular ones
  63837. */
  63838. function replaceAccents(str){
  63839. str = toString(str);
  63840. // verifies if the String has accents and replace them
  63841. if (str.search(/[\xC0-\xFF]/g) > -1) {
  63842. str = str
  63843. .replace(/[\xC0-\xC5]/g, "A")
  63844. .replace(/[\xC6]/g, "AE")
  63845. .replace(/[\xC7]/g, "C")
  63846. .replace(/[\xC8-\xCB]/g, "E")
  63847. .replace(/[\xCC-\xCF]/g, "I")
  63848. .replace(/[\xD0]/g, "D")
  63849. .replace(/[\xD1]/g, "N")
  63850. .replace(/[\xD2-\xD6\xD8]/g, "O")
  63851. .replace(/[\xD9-\xDC]/g, "U")
  63852. .replace(/[\xDD]/g, "Y")
  63853. .replace(/[\xDE]/g, "P")
  63854. .replace(/[\xE0-\xE5]/g, "a")
  63855. .replace(/[\xE6]/g, "ae")
  63856. .replace(/[\xE7]/g, "c")
  63857. .replace(/[\xE8-\xEB]/g, "e")
  63858. .replace(/[\xEC-\xEF]/g, "i")
  63859. .replace(/[\xF1]/g, "n")
  63860. .replace(/[\xF2-\xF6\xF8]/g, "o")
  63861. .replace(/[\xF9-\xFC]/g, "u")
  63862. .replace(/[\xFE]/g, "p")
  63863. .replace(/[\xFD\xFF]/g, "y");
  63864. }
  63865. return str;
  63866. }
  63867. module.exports = replaceAccents;
  63868. /***/ }),
  63869. /***/ 95264:
  63870. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  63871. var toString = __webpack_require__(4007);
  63872. var WHITE_SPACES = __webpack_require__(88723);
  63873. /**
  63874. * Remove chars from end of string.
  63875. */
  63876. function rtrim(str, chars) {
  63877. str = toString(str);
  63878. chars = chars || WHITE_SPACES;
  63879. var end = str.length - 1,
  63880. charLen = chars.length,
  63881. found = true,
  63882. i, c;
  63883. while (found && end >= 0) {
  63884. found = false;
  63885. i = -1;
  63886. c = str.charAt(end);
  63887. while (++i < charLen) {
  63888. if (c === chars[i]) {
  63889. found = true;
  63890. end--;
  63891. break;
  63892. }
  63893. }
  63894. }
  63895. return (end >= 0) ? str.substring(0, end + 1) : '';
  63896. }
  63897. module.exports = rtrim;
  63898. /***/ }),
  63899. /***/ 78579:
  63900. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  63901. var toString = __webpack_require__(4007);
  63902. var WHITE_SPACES = __webpack_require__(88723);
  63903. var ltrim = __webpack_require__(82516);
  63904. var rtrim = __webpack_require__(95264);
  63905. /**
  63906. * Remove white-spaces from beginning and end of string.
  63907. */
  63908. function trim(str, chars) {
  63909. str = toString(str);
  63910. chars = chars || WHITE_SPACES;
  63911. return ltrim(rtrim(str, chars), chars);
  63912. }
  63913. module.exports = trim;
  63914. /***/ }),
  63915. /***/ 37038:
  63916. /***/ ((module) => {
  63917. var UNDEF;
  63918. /**
  63919. * Parses string and convert it into a native value.
  63920. */
  63921. function typecast(val) {
  63922. var r;
  63923. if ( val === null || val === 'null' ) {
  63924. r = null;
  63925. } else if ( val === 'true' ) {
  63926. r = true;
  63927. } else if ( val === 'false' ) {
  63928. r = false;
  63929. } else if ( val === UNDEF || val === 'undefined' ) {
  63930. r = UNDEF;
  63931. } else if ( val === '' || isNaN(val) ) {
  63932. //isNaN('') returns false
  63933. r = val;
  63934. } else {
  63935. //parseFloat(null || '') returns NaN
  63936. r = parseFloat(val);
  63937. }
  63938. return r;
  63939. }
  63940. module.exports = typecast;
  63941. /***/ }),
  63942. /***/ 6608:
  63943. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  63944. var toString = __webpack_require__(4007);
  63945. /**
  63946. * "Safer" String.toUpperCase()
  63947. */
  63948. function upperCase(str){
  63949. str = toString(str);
  63950. return str.toUpperCase();
  63951. }
  63952. module.exports = upperCase;
  63953. /***/ }),
  63954. /***/ 35666:
  63955. /***/ ((module) => {
  63956. /**
  63957. * Copyright (c) 2014-present, Facebook, Inc.
  63958. *
  63959. * This source code is licensed under the MIT license found in the
  63960. * LICENSE file in the root directory of this source tree.
  63961. */
  63962. var runtime = (function (exports) {
  63963. "use strict";
  63964. var Op = Object.prototype;
  63965. var hasOwn = Op.hasOwnProperty;
  63966. var undefined; // More compressible than void 0.
  63967. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  63968. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  63969. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  63970. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  63971. function define(obj, key, value) {
  63972. Object.defineProperty(obj, key, {
  63973. value: value,
  63974. enumerable: true,
  63975. configurable: true,
  63976. writable: true
  63977. });
  63978. return obj[key];
  63979. }
  63980. try {
  63981. // IE 8 has a broken Object.defineProperty that only works on DOM objects.
  63982. define({}, "");
  63983. } catch (err) {
  63984. define = function(obj, key, value) {
  63985. return obj[key] = value;
  63986. };
  63987. }
  63988. function wrap(innerFn, outerFn, self, tryLocsList) {
  63989. // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
  63990. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  63991. var generator = Object.create(protoGenerator.prototype);
  63992. var context = new Context(tryLocsList || []);
  63993. // The ._invoke method unifies the implementations of the .next,
  63994. // .throw, and .return methods.
  63995. generator._invoke = makeInvokeMethod(innerFn, self, context);
  63996. return generator;
  63997. }
  63998. exports.wrap = wrap;
  63999. // Try/catch helper to minimize deoptimizations. Returns a completion
  64000. // record like context.tryEntries[i].completion. This interface could
  64001. // have been (and was previously) designed to take a closure to be
  64002. // invoked without arguments, but in all the cases we care about we
  64003. // already have an existing method we want to call, so there's no need
  64004. // to create a new function object. We can even get away with assuming
  64005. // the method takes exactly one argument, since that happens to be true
  64006. // in every case, so we don't have to touch the arguments object. The
  64007. // only additional allocation required is the completion record, which
  64008. // has a stable shape and so hopefully should be cheap to allocate.
  64009. function tryCatch(fn, obj, arg) {
  64010. try {
  64011. return { type: "normal", arg: fn.call(obj, arg) };
  64012. } catch (err) {
  64013. return { type: "throw", arg: err };
  64014. }
  64015. }
  64016. var GenStateSuspendedStart = "suspendedStart";
  64017. var GenStateSuspendedYield = "suspendedYield";
  64018. var GenStateExecuting = "executing";
  64019. var GenStateCompleted = "completed";
  64020. // Returning this object from the innerFn has the same effect as
  64021. // breaking out of the dispatch switch statement.
  64022. var ContinueSentinel = {};
  64023. // Dummy constructor functions that we use as the .constructor and
  64024. // .constructor.prototype properties for functions that return Generator
  64025. // objects. For full spec compliance, you may wish to configure your
  64026. // minifier not to mangle the names of these two functions.
  64027. function Generator() {}
  64028. function GeneratorFunction() {}
  64029. function GeneratorFunctionPrototype() {}
  64030. // This is a polyfill for %IteratorPrototype% for environments that
  64031. // don't natively support it.
  64032. var IteratorPrototype = {};
  64033. IteratorPrototype[iteratorSymbol] = function () {
  64034. return this;
  64035. };
  64036. var getProto = Object.getPrototypeOf;
  64037. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  64038. if (NativeIteratorPrototype &&
  64039. NativeIteratorPrototype !== Op &&
  64040. hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  64041. // This environment has a native %IteratorPrototype%; use it instead
  64042. // of the polyfill.
  64043. IteratorPrototype = NativeIteratorPrototype;
  64044. }
  64045. var Gp = GeneratorFunctionPrototype.prototype =
  64046. Generator.prototype = Object.create(IteratorPrototype);
  64047. GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  64048. GeneratorFunctionPrototype.constructor = GeneratorFunction;
  64049. GeneratorFunction.displayName = define(
  64050. GeneratorFunctionPrototype,
  64051. toStringTagSymbol,
  64052. "GeneratorFunction"
  64053. );
  64054. // Helper for defining the .next, .throw, and .return methods of the
  64055. // Iterator interface in terms of a single ._invoke method.
  64056. function defineIteratorMethods(prototype) {
  64057. ["next", "throw", "return"].forEach(function(method) {
  64058. define(prototype, method, function(arg) {
  64059. return this._invoke(method, arg);
  64060. });
  64061. });
  64062. }
  64063. exports.isGeneratorFunction = function(genFun) {
  64064. var ctor = typeof genFun === "function" && genFun.constructor;
  64065. return ctor
  64066. ? ctor === GeneratorFunction ||
  64067. // For the native GeneratorFunction constructor, the best we can
  64068. // do is to check its .name property.
  64069. (ctor.displayName || ctor.name) === "GeneratorFunction"
  64070. : false;
  64071. };
  64072. exports.mark = function(genFun) {
  64073. if (Object.setPrototypeOf) {
  64074. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  64075. } else {
  64076. genFun.__proto__ = GeneratorFunctionPrototype;
  64077. define(genFun, toStringTagSymbol, "GeneratorFunction");
  64078. }
  64079. genFun.prototype = Object.create(Gp);
  64080. return genFun;
  64081. };
  64082. // Within the body of any async function, `await x` is transformed to
  64083. // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  64084. // `hasOwn.call(value, "__await")` to determine if the yielded value is
  64085. // meant to be awaited.
  64086. exports.awrap = function(arg) {
  64087. return { __await: arg };
  64088. };
  64089. function AsyncIterator(generator, PromiseImpl) {
  64090. function invoke(method, arg, resolve, reject) {
  64091. var record = tryCatch(generator[method], generator, arg);
  64092. if (record.type === "throw") {
  64093. reject(record.arg);
  64094. } else {
  64095. var result = record.arg;
  64096. var value = result.value;
  64097. if (value &&
  64098. typeof value === "object" &&
  64099. hasOwn.call(value, "__await")) {
  64100. return PromiseImpl.resolve(value.__await).then(function(value) {
  64101. invoke("next", value, resolve, reject);
  64102. }, function(err) {
  64103. invoke("throw", err, resolve, reject);
  64104. });
  64105. }
  64106. return PromiseImpl.resolve(value).then(function(unwrapped) {
  64107. // When a yielded Promise is resolved, its final value becomes
  64108. // the .value of the Promise<{value,done}> result for the
  64109. // current iteration.
  64110. result.value = unwrapped;
  64111. resolve(result);
  64112. }, function(error) {
  64113. // If a rejected Promise was yielded, throw the rejection back
  64114. // into the async generator function so it can be handled there.
  64115. return invoke("throw", error, resolve, reject);
  64116. });
  64117. }
  64118. }
  64119. var previousPromise;
  64120. function enqueue(method, arg) {
  64121. function callInvokeWithMethodAndArg() {
  64122. return new PromiseImpl(function(resolve, reject) {
  64123. invoke(method, arg, resolve, reject);
  64124. });
  64125. }
  64126. return previousPromise =
  64127. // If enqueue has been called before, then we want to wait until
  64128. // all previous Promises have been resolved before calling invoke,
  64129. // so that results are always delivered in the correct order. If
  64130. // enqueue has not been called before, then it is important to
  64131. // call invoke immediately, without waiting on a callback to fire,
  64132. // so that the async generator function has the opportunity to do
  64133. // any necessary setup in a predictable way. This predictability
  64134. // is why the Promise constructor synchronously invokes its
  64135. // executor callback, and why async functions synchronously
  64136. // execute code before the first await. Since we implement simple
  64137. // async functions in terms of async generators, it is especially
  64138. // important to get this right, even though it requires care.
  64139. previousPromise ? previousPromise.then(
  64140. callInvokeWithMethodAndArg,
  64141. // Avoid propagating failures to Promises returned by later
  64142. // invocations of the iterator.
  64143. callInvokeWithMethodAndArg
  64144. ) : callInvokeWithMethodAndArg();
  64145. }
  64146. // Define the unified helper method that is used to implement .next,
  64147. // .throw, and .return (see defineIteratorMethods).
  64148. this._invoke = enqueue;
  64149. }
  64150. defineIteratorMethods(AsyncIterator.prototype);
  64151. AsyncIterator.prototype[asyncIteratorSymbol] = function () {
  64152. return this;
  64153. };
  64154. exports.AsyncIterator = AsyncIterator;
  64155. // Note that simple async functions are implemented on top of
  64156. // AsyncIterator objects; they just return a Promise for the value of
  64157. // the final result produced by the iterator.
  64158. exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
  64159. if (PromiseImpl === void 0) PromiseImpl = Promise;
  64160. var iter = new AsyncIterator(
  64161. wrap(innerFn, outerFn, self, tryLocsList),
  64162. PromiseImpl
  64163. );
  64164. return exports.isGeneratorFunction(outerFn)
  64165. ? iter // If outerFn is a generator, return the full iterator.
  64166. : iter.next().then(function(result) {
  64167. return result.done ? result.value : iter.next();
  64168. });
  64169. };
  64170. function makeInvokeMethod(innerFn, self, context) {
  64171. var state = GenStateSuspendedStart;
  64172. return function invoke(method, arg) {
  64173. if (state === GenStateExecuting) {
  64174. throw new Error("Generator is already running");
  64175. }
  64176. if (state === GenStateCompleted) {
  64177. if (method === "throw") {
  64178. throw arg;
  64179. }
  64180. // Be forgiving, per 25.3.3.3.3 of the spec:
  64181. // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
  64182. return doneResult();
  64183. }
  64184. context.method = method;
  64185. context.arg = arg;
  64186. while (true) {
  64187. var delegate = context.delegate;
  64188. if (delegate) {
  64189. var delegateResult = maybeInvokeDelegate(delegate, context);
  64190. if (delegateResult) {
  64191. if (delegateResult === ContinueSentinel) continue;
  64192. return delegateResult;
  64193. }
  64194. }
  64195. if (context.method === "next") {
  64196. // Setting context._sent for legacy support of Babel's
  64197. // function.sent implementation.
  64198. context.sent = context._sent = context.arg;
  64199. } else if (context.method === "throw") {
  64200. if (state === GenStateSuspendedStart) {
  64201. state = GenStateCompleted;
  64202. throw context.arg;
  64203. }
  64204. context.dispatchException(context.arg);
  64205. } else if (context.method === "return") {
  64206. context.abrupt("return", context.arg);
  64207. }
  64208. state = GenStateExecuting;
  64209. var record = tryCatch(innerFn, self, context);
  64210. if (record.type === "normal") {
  64211. // If an exception is thrown from innerFn, we leave state ===
  64212. // GenStateExecuting and loop back for another invocation.
  64213. state = context.done
  64214. ? GenStateCompleted
  64215. : GenStateSuspendedYield;
  64216. if (record.arg === ContinueSentinel) {
  64217. continue;
  64218. }
  64219. return {
  64220. value: record.arg,
  64221. done: context.done
  64222. };
  64223. } else if (record.type === "throw") {
  64224. state = GenStateCompleted;
  64225. // Dispatch the exception by looping back around to the
  64226. // context.dispatchException(context.arg) call above.
  64227. context.method = "throw";
  64228. context.arg = record.arg;
  64229. }
  64230. }
  64231. };
  64232. }
  64233. // Call delegate.iterator[context.method](context.arg) and handle the
  64234. // result, either by returning a { value, done } result from the
  64235. // delegate iterator, or by modifying context.method and context.arg,
  64236. // setting context.delegate to null, and returning the ContinueSentinel.
  64237. function maybeInvokeDelegate(delegate, context) {
  64238. var method = delegate.iterator[context.method];
  64239. if (method === undefined) {
  64240. // A .throw or .return when the delegate iterator has no .throw
  64241. // method always terminates the yield* loop.
  64242. context.delegate = null;
  64243. if (context.method === "throw") {
  64244. // Note: ["return"] must be used for ES3 parsing compatibility.
  64245. if (delegate.iterator["return"]) {
  64246. // If the delegate iterator has a return method, give it a
  64247. // chance to clean up.
  64248. context.method = "return";
  64249. context.arg = undefined;
  64250. maybeInvokeDelegate(delegate, context);
  64251. if (context.method === "throw") {
  64252. // If maybeInvokeDelegate(context) changed context.method from
  64253. // "return" to "throw", let that override the TypeError below.
  64254. return ContinueSentinel;
  64255. }
  64256. }
  64257. context.method = "throw";
  64258. context.arg = new TypeError(
  64259. "The iterator does not provide a 'throw' method");
  64260. }
  64261. return ContinueSentinel;
  64262. }
  64263. var record = tryCatch(method, delegate.iterator, context.arg);
  64264. if (record.type === "throw") {
  64265. context.method = "throw";
  64266. context.arg = record.arg;
  64267. context.delegate = null;
  64268. return ContinueSentinel;
  64269. }
  64270. var info = record.arg;
  64271. if (! info) {
  64272. context.method = "throw";
  64273. context.arg = new TypeError("iterator result is not an object");
  64274. context.delegate = null;
  64275. return ContinueSentinel;
  64276. }
  64277. if (info.done) {
  64278. // Assign the result of the finished delegate to the temporary
  64279. // variable specified by delegate.resultName (see delegateYield).
  64280. context[delegate.resultName] = info.value;
  64281. // Resume execution at the desired location (see delegateYield).
  64282. context.next = delegate.nextLoc;
  64283. // If context.method was "throw" but the delegate handled the
  64284. // exception, let the outer generator proceed normally. If
  64285. // context.method was "next", forget context.arg since it has been
  64286. // "consumed" by the delegate iterator. If context.method was
  64287. // "return", allow the original .return call to continue in the
  64288. // outer generator.
  64289. if (context.method !== "return") {
  64290. context.method = "next";
  64291. context.arg = undefined;
  64292. }
  64293. } else {
  64294. // Re-yield the result returned by the delegate method.
  64295. return info;
  64296. }
  64297. // The delegate iterator is finished, so forget it and continue with
  64298. // the outer generator.
  64299. context.delegate = null;
  64300. return ContinueSentinel;
  64301. }
  64302. // Define Generator.prototype.{next,throw,return} in terms of the
  64303. // unified ._invoke helper method.
  64304. defineIteratorMethods(Gp);
  64305. define(Gp, toStringTagSymbol, "Generator");
  64306. // A Generator should always return itself as the iterator object when the
  64307. // @@iterator function is called on it. Some browsers' implementations of the
  64308. // iterator prototype chain incorrectly implement this, causing the Generator
  64309. // object to not be returned from this call. This ensures that doesn't happen.
  64310. // See https://github.com/facebook/regenerator/issues/274 for more details.
  64311. Gp[iteratorSymbol] = function() {
  64312. return this;
  64313. };
  64314. Gp.toString = function() {
  64315. return "[object Generator]";
  64316. };
  64317. function pushTryEntry(locs) {
  64318. var entry = { tryLoc: locs[0] };
  64319. if (1 in locs) {
  64320. entry.catchLoc = locs[1];
  64321. }
  64322. if (2 in locs) {
  64323. entry.finallyLoc = locs[2];
  64324. entry.afterLoc = locs[3];
  64325. }
  64326. this.tryEntries.push(entry);
  64327. }
  64328. function resetTryEntry(entry) {
  64329. var record = entry.completion || {};
  64330. record.type = "normal";
  64331. delete record.arg;
  64332. entry.completion = record;
  64333. }
  64334. function Context(tryLocsList) {
  64335. // The root entry object (effectively a try statement without a catch
  64336. // or a finally block) gives us a place to store values thrown from
  64337. // locations where there is no enclosing try statement.
  64338. this.tryEntries = [{ tryLoc: "root" }];
  64339. tryLocsList.forEach(pushTryEntry, this);
  64340. this.reset(true);
  64341. }
  64342. exports.keys = function(object) {
  64343. var keys = [];
  64344. for (var key in object) {
  64345. keys.push(key);
  64346. }
  64347. keys.reverse();
  64348. // Rather than returning an object with a next method, we keep
  64349. // things simple and return the next function itself.
  64350. return function next() {
  64351. while (keys.length) {
  64352. var key = keys.pop();
  64353. if (key in object) {
  64354. next.value = key;
  64355. next.done = false;
  64356. return next;
  64357. }
  64358. }
  64359. // To avoid creating an additional object, we just hang the .value
  64360. // and .done properties off the next function object itself. This
  64361. // also ensures that the minifier will not anonymize the function.
  64362. next.done = true;
  64363. return next;
  64364. };
  64365. };
  64366. function values(iterable) {
  64367. if (iterable) {
  64368. var iteratorMethod = iterable[iteratorSymbol];
  64369. if (iteratorMethod) {
  64370. return iteratorMethod.call(iterable);
  64371. }
  64372. if (typeof iterable.next === "function") {
  64373. return iterable;
  64374. }
  64375. if (!isNaN(iterable.length)) {
  64376. var i = -1, next = function next() {
  64377. while (++i < iterable.length) {
  64378. if (hasOwn.call(iterable, i)) {
  64379. next.value = iterable[i];
  64380. next.done = false;
  64381. return next;
  64382. }
  64383. }
  64384. next.value = undefined;
  64385. next.done = true;
  64386. return next;
  64387. };
  64388. return next.next = next;
  64389. }
  64390. }
  64391. // Return an iterator with no values.
  64392. return { next: doneResult };
  64393. }
  64394. exports.values = values;
  64395. function doneResult() {
  64396. return { value: undefined, done: true };
  64397. }
  64398. Context.prototype = {
  64399. constructor: Context,
  64400. reset: function(skipTempReset) {
  64401. this.prev = 0;
  64402. this.next = 0;
  64403. // Resetting context._sent for legacy support of Babel's
  64404. // function.sent implementation.
  64405. this.sent = this._sent = undefined;
  64406. this.done = false;
  64407. this.delegate = null;
  64408. this.method = "next";
  64409. this.arg = undefined;
  64410. this.tryEntries.forEach(resetTryEntry);
  64411. if (!skipTempReset) {
  64412. for (var name in this) {
  64413. // Not sure about the optimal order of these conditions:
  64414. if (name.charAt(0) === "t" &&
  64415. hasOwn.call(this, name) &&
  64416. !isNaN(+name.slice(1))) {
  64417. this[name] = undefined;
  64418. }
  64419. }
  64420. }
  64421. },
  64422. stop: function() {
  64423. this.done = true;
  64424. var rootEntry = this.tryEntries[0];
  64425. var rootRecord = rootEntry.completion;
  64426. if (rootRecord.type === "throw") {
  64427. throw rootRecord.arg;
  64428. }
  64429. return this.rval;
  64430. },
  64431. dispatchException: function(exception) {
  64432. if (this.done) {
  64433. throw exception;
  64434. }
  64435. var context = this;
  64436. function handle(loc, caught) {
  64437. record.type = "throw";
  64438. record.arg = exception;
  64439. context.next = loc;
  64440. if (caught) {
  64441. // If the dispatched exception was caught by a catch block,
  64442. // then let that catch block handle the exception normally.
  64443. context.method = "next";
  64444. context.arg = undefined;
  64445. }
  64446. return !! caught;
  64447. }
  64448. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  64449. var entry = this.tryEntries[i];
  64450. var record = entry.completion;
  64451. if (entry.tryLoc === "root") {
  64452. // Exception thrown outside of any try block that could handle
  64453. // it, so set the completion value of the entire function to
  64454. // throw the exception.
  64455. return handle("end");
  64456. }
  64457. if (entry.tryLoc <= this.prev) {
  64458. var hasCatch = hasOwn.call(entry, "catchLoc");
  64459. var hasFinally = hasOwn.call(entry, "finallyLoc");
  64460. if (hasCatch && hasFinally) {
  64461. if (this.prev < entry.catchLoc) {
  64462. return handle(entry.catchLoc, true);
  64463. } else if (this.prev < entry.finallyLoc) {
  64464. return handle(entry.finallyLoc);
  64465. }
  64466. } else if (hasCatch) {
  64467. if (this.prev < entry.catchLoc) {
  64468. return handle(entry.catchLoc, true);
  64469. }
  64470. } else if (hasFinally) {
  64471. if (this.prev < entry.finallyLoc) {
  64472. return handle(entry.finallyLoc);
  64473. }
  64474. } else {
  64475. throw new Error("try statement without catch or finally");
  64476. }
  64477. }
  64478. }
  64479. },
  64480. abrupt: function(type, arg) {
  64481. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  64482. var entry = this.tryEntries[i];
  64483. if (entry.tryLoc <= this.prev &&
  64484. hasOwn.call(entry, "finallyLoc") &&
  64485. this.prev < entry.finallyLoc) {
  64486. var finallyEntry = entry;
  64487. break;
  64488. }
  64489. }
  64490. if (finallyEntry &&
  64491. (type === "break" ||
  64492. type === "continue") &&
  64493. finallyEntry.tryLoc <= arg &&
  64494. arg <= finallyEntry.finallyLoc) {
  64495. // Ignore the finally entry if control is not jumping to a
  64496. // location outside the try/catch block.
  64497. finallyEntry = null;
  64498. }
  64499. var record = finallyEntry ? finallyEntry.completion : {};
  64500. record.type = type;
  64501. record.arg = arg;
  64502. if (finallyEntry) {
  64503. this.method = "next";
  64504. this.next = finallyEntry.finallyLoc;
  64505. return ContinueSentinel;
  64506. }
  64507. return this.complete(record);
  64508. },
  64509. complete: function(record, afterLoc) {
  64510. if (record.type === "throw") {
  64511. throw record.arg;
  64512. }
  64513. if (record.type === "break" ||
  64514. record.type === "continue") {
  64515. this.next = record.arg;
  64516. } else if (record.type === "return") {
  64517. this.rval = this.arg = record.arg;
  64518. this.method = "return";
  64519. this.next = "end";
  64520. } else if (record.type === "normal" && afterLoc) {
  64521. this.next = afterLoc;
  64522. }
  64523. return ContinueSentinel;
  64524. },
  64525. finish: function(finallyLoc) {
  64526. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  64527. var entry = this.tryEntries[i];
  64528. if (entry.finallyLoc === finallyLoc) {
  64529. this.complete(entry.completion, entry.afterLoc);
  64530. resetTryEntry(entry);
  64531. return ContinueSentinel;
  64532. }
  64533. }
  64534. },
  64535. "catch": function(tryLoc) {
  64536. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  64537. var entry = this.tryEntries[i];
  64538. if (entry.tryLoc === tryLoc) {
  64539. var record = entry.completion;
  64540. if (record.type === "throw") {
  64541. var thrown = record.arg;
  64542. resetTryEntry(entry);
  64543. }
  64544. return thrown;
  64545. }
  64546. }
  64547. // The context.catch method must only be called with a location
  64548. // argument that corresponds to a known catch block.
  64549. throw new Error("illegal catch attempt");
  64550. },
  64551. delegateYield: function(iterable, resultName, nextLoc) {
  64552. this.delegate = {
  64553. iterator: values(iterable),
  64554. resultName: resultName,
  64555. nextLoc: nextLoc
  64556. };
  64557. if (this.method === "next") {
  64558. // Deliberately forget the last sent value so that we don't
  64559. // accidentally pass it on to the delegate.
  64560. this.arg = undefined;
  64561. }
  64562. return ContinueSentinel;
  64563. }
  64564. };
  64565. // Regardless of whether this script is executing as a CommonJS module
  64566. // or not, return the runtime object so that we can declare the variable
  64567. // regeneratorRuntime in the outer scope, which allows this module to be
  64568. // injected easily by `bin/regenerator --include-runtime script.js`.
  64569. return exports;
  64570. }(
  64571. // If this script is executing as a CommonJS module, use module.exports
  64572. // as the regeneratorRuntime namespace. Otherwise create a new empty
  64573. // object. Either way, the resulting object will be used to initialize
  64574. // the regeneratorRuntime variable at the top of this file.
  64575. true ? module.exports : 0
  64576. ));
  64577. try {
  64578. regeneratorRuntime = runtime;
  64579. } catch (accidentalStrictMode) {
  64580. // This module should not be running in strict mode, so the above
  64581. // assignment should always work unless something is misconfigured. Just
  64582. // in case runtime.js accidentally runs in strict mode, we can escape
  64583. // strict mode using a global Function call. This could conceivably fail
  64584. // if a Content Security Policy forbids using Function, but in that case
  64585. // the proper solution is to fix the accidental strict mode problem. If
  64586. // you've misconfigured your bundler to force strict mode and applied a
  64587. // CSP to forbid Function, and you're not willing to fix either of those
  64588. // problems, please detail your unique predicament in a GitHub issue.
  64589. Function("r", "regeneratorRuntime = r")(runtime);
  64590. }
  64591. /***/ }),
  64592. /***/ 25703:
  64593. /***/ (function(module, exports, __webpack_require__) {
  64594. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
  64595. * selectize.js (v0.12.6)
  64596. * Copyright (c) 2013–2015 Brian Reavis & contributors
  64597. *
  64598. * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
  64599. * file except in compliance with the License. You may obtain a copy of the License at:
  64600. * http://www.apache.org/licenses/LICENSE-2.0
  64601. *
  64602. * Unless required by applicable law or agreed to in writing, software distributed under
  64603. * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
  64604. * ANY KIND, either express or implied. See the License for the specific language
  64605. * governing permissions and limitations under the License.
  64606. *
  64607. * @author Brian Reavis <brian@thirdroute.com>
  64608. */
  64609. /*jshint curly:false */
  64610. /*jshint browser:true */
  64611. (function(root, factory) {
  64612. if (true) {
  64613. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(65311),__webpack_require__(55069),__webpack_require__(76252)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  64614. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  64615. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  64616. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  64617. } else {}
  64618. }(this, function($, Sifter, MicroPlugin) {
  64619. 'use strict';
  64620. var highlight = function($element, pattern) {
  64621. if (typeof pattern === 'string' && !pattern.length) return;
  64622. var regex = (typeof pattern === 'string') ? new RegExp(pattern, 'i') : pattern;
  64623. var highlight = function(node) {
  64624. var skip = 0;
  64625. // Wrap matching part of text node with highlighting <span>, e.g.
  64626. // Soccer -> <span class="highlight">Soc</span>cer for regex = /soc/i
  64627. if (node.nodeType === 3) {
  64628. var pos = node.data.search(regex);
  64629. if (pos >= 0 && node.data.length > 0) {
  64630. var match = node.data.match(regex);
  64631. var spannode = document.createElement('span');
  64632. spannode.className = 'highlight';
  64633. var middlebit = node.splitText(pos);
  64634. var endbit = middlebit.splitText(match[0].length);
  64635. var middleclone = middlebit.cloneNode(true);
  64636. spannode.appendChild(middleclone);
  64637. middlebit.parentNode.replaceChild(spannode, middlebit);
  64638. skip = 1;
  64639. }
  64640. }
  64641. // Recurse element node, looking for child text nodes to highlight, unless element
  64642. // is childless, <script>, <style>, or already highlighted: <span class="hightlight">
  64643. else if (node.nodeType === 1 && node.childNodes && !/(script|style)/i.test(node.tagName) && ( node.className !== 'highlight' || node.tagName !== 'SPAN' )) {
  64644. for (var i = 0; i < node.childNodes.length; ++i) {
  64645. i += highlight(node.childNodes[i]);
  64646. }
  64647. }
  64648. return skip;
  64649. };
  64650. return $element.each(function() {
  64651. highlight(this);
  64652. });
  64653. };
  64654. /**
  64655. * removeHighlight fn copied from highlight v5 and
  64656. * edited to remove with() and pass js strict mode
  64657. */
  64658. $.fn.removeHighlight = function() {
  64659. return this.find("span.highlight").each(function() {
  64660. this.parentNode.firstChild.nodeName;
  64661. var parent = this.parentNode;
  64662. parent.replaceChild(this.firstChild, this);
  64663. parent.normalize();
  64664. }).end();
  64665. };
  64666. var MicroEvent = function() {};
  64667. MicroEvent.prototype = {
  64668. on: function(event, fct){
  64669. this._events = this._events || {};
  64670. this._events[event] = this._events[event] || [];
  64671. this._events[event].push(fct);
  64672. },
  64673. off: function(event, fct){
  64674. var n = arguments.length;
  64675. if (n === 0) return delete this._events;
  64676. if (n === 1) return delete this._events[event];
  64677. this._events = this._events || {};
  64678. if (event in this._events === false) return;
  64679. this._events[event].splice(this._events[event].indexOf(fct), 1);
  64680. },
  64681. trigger: function(event /* , args... */){
  64682. this._events = this._events || {};
  64683. if (event in this._events === false) return;
  64684. for (var i = 0; i < this._events[event].length; i++){
  64685. this._events[event][i].apply(this, Array.prototype.slice.call(arguments, 1));
  64686. }
  64687. }
  64688. };
  64689. /**
  64690. * Mixin will delegate all MicroEvent.js function in the destination object.
  64691. *
  64692. * - MicroEvent.mixin(Foobar) will make Foobar able to use MicroEvent
  64693. *
  64694. * @param {object} the object which will support MicroEvent
  64695. */
  64696. MicroEvent.mixin = function(destObject){
  64697. var props = ['on', 'off', 'trigger'];
  64698. for (var i = 0; i < props.length; i++){
  64699. destObject.prototype[props[i]] = MicroEvent.prototype[props[i]];
  64700. }
  64701. };
  64702. var IS_MAC = /Mac/.test(navigator.userAgent);
  64703. var KEY_A = 65;
  64704. var KEY_COMMA = 188;
  64705. var KEY_RETURN = 13;
  64706. var KEY_ESC = 27;
  64707. var KEY_LEFT = 37;
  64708. var KEY_UP = 38;
  64709. var KEY_P = 80;
  64710. var KEY_RIGHT = 39;
  64711. var KEY_DOWN = 40;
  64712. var KEY_N = 78;
  64713. var KEY_BACKSPACE = 8;
  64714. var KEY_DELETE = 46;
  64715. var KEY_SHIFT = 16;
  64716. var KEY_CMD = IS_MAC ? 91 : 17;
  64717. var KEY_CTRL = IS_MAC ? 18 : 17;
  64718. var KEY_TAB = 9;
  64719. var TAG_SELECT = 1;
  64720. var TAG_INPUT = 2;
  64721. // for now, android support in general is too spotty to support validity
  64722. var SUPPORTS_VALIDITY_API = !/android/i.test(window.navigator.userAgent) && !!document.createElement('input').validity;
  64723. var isset = function(object) {
  64724. return typeof object !== 'undefined';
  64725. };
  64726. /**
  64727. * Converts a scalar to its best string representation
  64728. * for hash keys and HTML attribute values.
  64729. *
  64730. * Transformations:
  64731. * 'str' -> 'str'
  64732. * null -> ''
  64733. * undefined -> ''
  64734. * true -> '1'
  64735. * false -> '0'
  64736. * 0 -> '0'
  64737. * 1 -> '1'
  64738. *
  64739. * @param {string} value
  64740. * @returns {string|null}
  64741. */
  64742. var hash_key = function(value) {
  64743. if (typeof value === 'undefined' || value === null) return null;
  64744. if (typeof value === 'boolean') return value ? '1' : '0';
  64745. return value + '';
  64746. };
  64747. /**
  64748. * Escapes a string for use within HTML.
  64749. *
  64750. * @param {string} str
  64751. * @returns {string}
  64752. */
  64753. var escape_html = function(str) {
  64754. return (str + '')
  64755. .replace(/&/g, '&amp;')
  64756. .replace(/</g, '&lt;')
  64757. .replace(/>/g, '&gt;')
  64758. .replace(/"/g, '&quot;');
  64759. };
  64760. /**
  64761. * Escapes "$" characters in replacement strings.
  64762. *
  64763. * @param {string} str
  64764. * @returns {string}
  64765. */
  64766. var escape_replace = function(str) {
  64767. return (str + '').replace(/\$/g, '$$$$');
  64768. };
  64769. var hook = {};
  64770. /**
  64771. * Wraps `method` on `self` so that `fn`
  64772. * is invoked before the original method.
  64773. *
  64774. * @param {object} self
  64775. * @param {string} method
  64776. * @param {function} fn
  64777. */
  64778. hook.before = function(self, method, fn) {
  64779. var original = self[method];
  64780. self[method] = function() {
  64781. fn.apply(self, arguments);
  64782. return original.apply(self, arguments);
  64783. };
  64784. };
  64785. /**
  64786. * Wraps `method` on `self` so that `fn`
  64787. * is invoked after the original method.
  64788. *
  64789. * @param {object} self
  64790. * @param {string} method
  64791. * @param {function} fn
  64792. */
  64793. hook.after = function(self, method, fn) {
  64794. var original = self[method];
  64795. self[method] = function() {
  64796. var result = original.apply(self, arguments);
  64797. fn.apply(self, arguments);
  64798. return result;
  64799. };
  64800. };
  64801. /**
  64802. * Wraps `fn` so that it can only be invoked once.
  64803. *
  64804. * @param {function} fn
  64805. * @returns {function}
  64806. */
  64807. var once = function(fn) {
  64808. var called = false;
  64809. return function() {
  64810. if (called) return;
  64811. called = true;
  64812. fn.apply(this, arguments);
  64813. };
  64814. };
  64815. /**
  64816. * Wraps `fn` so that it can only be called once
  64817. * every `delay` milliseconds (invoked on the falling edge).
  64818. *
  64819. * @param {function} fn
  64820. * @param {int} delay
  64821. * @returns {function}
  64822. */
  64823. var debounce = function(fn, delay) {
  64824. var timeout;
  64825. return function() {
  64826. var self = this;
  64827. var args = arguments;
  64828. window.clearTimeout(timeout);
  64829. timeout = window.setTimeout(function() {
  64830. fn.apply(self, args);
  64831. }, delay);
  64832. };
  64833. };
  64834. /**
  64835. * Debounce all fired events types listed in `types`
  64836. * while executing the provided `fn`.
  64837. *
  64838. * @param {object} self
  64839. * @param {array} types
  64840. * @param {function} fn
  64841. */
  64842. var debounce_events = function(self, types, fn) {
  64843. var type;
  64844. var trigger = self.trigger;
  64845. var event_args = {};
  64846. // override trigger method
  64847. self.trigger = function() {
  64848. var type = arguments[0];
  64849. if (types.indexOf(type) !== -1) {
  64850. event_args[type] = arguments;
  64851. } else {
  64852. return trigger.apply(self, arguments);
  64853. }
  64854. };
  64855. // invoke provided function
  64856. fn.apply(self, []);
  64857. self.trigger = trigger;
  64858. // trigger queued events
  64859. for (type in event_args) {
  64860. if (event_args.hasOwnProperty(type)) {
  64861. trigger.apply(self, event_args[type]);
  64862. }
  64863. }
  64864. };
  64865. /**
  64866. * A workaround for http://bugs.jquery.com/ticket/6696
  64867. *
  64868. * @param {object} $parent - Parent element to listen on.
  64869. * @param {string} event - Event name.
  64870. * @param {string} selector - Descendant selector to filter by.
  64871. * @param {function} fn - Event handler.
  64872. */
  64873. var watchChildEvent = function($parent, event, selector, fn) {
  64874. $parent.on(event, selector, function(e) {
  64875. var child = e.target;
  64876. while (child && child.parentNode !== $parent[0]) {
  64877. child = child.parentNode;
  64878. }
  64879. e.currentTarget = child;
  64880. return fn.apply(this, [e]);
  64881. });
  64882. };
  64883. /**
  64884. * Determines the current selection within a text input control.
  64885. * Returns an object containing:
  64886. * - start
  64887. * - length
  64888. *
  64889. * @param {object} input
  64890. * @returns {object}
  64891. */
  64892. var getSelection = function(input) {
  64893. var result = {};
  64894. if ('selectionStart' in input) {
  64895. result.start = input.selectionStart;
  64896. result.length = input.selectionEnd - result.start;
  64897. } else if (document.selection) {
  64898. input.focus();
  64899. var sel = document.selection.createRange();
  64900. var selLen = document.selection.createRange().text.length;
  64901. sel.moveStart('character', -input.value.length);
  64902. result.start = sel.text.length - selLen;
  64903. result.length = selLen;
  64904. }
  64905. return result;
  64906. };
  64907. /**
  64908. * Copies CSS properties from one element to another.
  64909. *
  64910. * @param {object} $from
  64911. * @param {object} $to
  64912. * @param {array} properties
  64913. */
  64914. var transferStyles = function($from, $to, properties) {
  64915. var i, n, styles = {};
  64916. if (properties) {
  64917. for (i = 0, n = properties.length; i < n; i++) {
  64918. styles[properties[i]] = $from.css(properties[i]);
  64919. }
  64920. } else {
  64921. styles = $from.css();
  64922. }
  64923. $to.css(styles);
  64924. };
  64925. /**
  64926. * Measures the width of a string within a
  64927. * parent element (in pixels).
  64928. *
  64929. * @param {string} str
  64930. * @param {object} $parent
  64931. * @returns {int}
  64932. */
  64933. var measureString = function(str, $parent) {
  64934. if (!str) {
  64935. return 0;
  64936. }
  64937. if (!Selectize.$testInput) {
  64938. Selectize.$testInput = $('<span />').css({
  64939. position: 'absolute',
  64940. top: -99999,
  64941. left: -99999,
  64942. width: 'auto',
  64943. padding: 0,
  64944. whiteSpace: 'pre'
  64945. }).appendTo('body');
  64946. }
  64947. Selectize.$testInput.text(str);
  64948. transferStyles($parent, Selectize.$testInput, [
  64949. 'letterSpacing',
  64950. 'fontSize',
  64951. 'fontFamily',
  64952. 'fontWeight',
  64953. 'textTransform'
  64954. ]);
  64955. return Selectize.$testInput.width();
  64956. };
  64957. /**
  64958. * Sets up an input to grow horizontally as the user
  64959. * types. If the value is changed manually, you can
  64960. * trigger the "update" handler to resize:
  64961. *
  64962. * $input.trigger('update');
  64963. *
  64964. * @param {object} $input
  64965. */
  64966. var autoGrow = function($input) {
  64967. var currentWidth = null;
  64968. var update = function(e, options) {
  64969. var value, keyCode, printable, placeholder, width;
  64970. var shift, character, selection;
  64971. e = e || window.event || {};
  64972. options = options || {};
  64973. if (e.metaKey || e.altKey) return;
  64974. if (!options.force && $input.data('grow') === false) return;
  64975. value = $input.val();
  64976. if (e.type && e.type.toLowerCase() === 'keydown') {
  64977. keyCode = e.keyCode;
  64978. printable = (
  64979. (keyCode >= 48 && keyCode <= 57) || // 0-9
  64980. (keyCode >= 65 && keyCode <= 90) || // a-z
  64981. (keyCode >= 96 && keyCode <= 111) || // numpad 0-9, numeric operators
  64982. (keyCode >= 186 && keyCode <= 222) || // semicolon, equal, comma, dash, etc.
  64983. keyCode === 32 // space
  64984. );
  64985. if (keyCode === KEY_DELETE || keyCode === KEY_BACKSPACE) {
  64986. selection = getSelection($input[0]);
  64987. if (selection.length) {
  64988. value = value.substring(0, selection.start) + value.substring(selection.start + selection.length);
  64989. } else if (keyCode === KEY_BACKSPACE && selection.start) {
  64990. value = value.substring(0, selection.start - 1) + value.substring(selection.start + 1);
  64991. } else if (keyCode === KEY_DELETE && typeof selection.start !== 'undefined') {
  64992. value = value.substring(0, selection.start) + value.substring(selection.start + 1);
  64993. }
  64994. } else if (printable) {
  64995. shift = e.shiftKey;
  64996. character = String.fromCharCode(e.keyCode);
  64997. if (shift) character = character.toUpperCase();
  64998. else character = character.toLowerCase();
  64999. value += character;
  65000. }
  65001. }
  65002. placeholder = $input.attr('placeholder');
  65003. if (!value && placeholder) {
  65004. value = placeholder;
  65005. }
  65006. width = measureString(value, $input) + 4;
  65007. if (width !== currentWidth) {
  65008. currentWidth = width;
  65009. $input.width(width);
  65010. $input.triggerHandler('resize');
  65011. }
  65012. };
  65013. $input.on('keydown keyup update blur', update);
  65014. update();
  65015. };
  65016. var domToString = function(d) {
  65017. var tmp = document.createElement('div');
  65018. tmp.appendChild(d.cloneNode(true));
  65019. return tmp.innerHTML;
  65020. };
  65021. var logError = function(message, options){
  65022. if(!options) options = {};
  65023. var component = "Selectize";
  65024. console.error(component + ": " + message)
  65025. if(options.explanation){
  65026. // console.group is undefined in <IE11
  65027. if(console.group) console.group();
  65028. console.error(options.explanation);
  65029. if(console.group) console.groupEnd();
  65030. }
  65031. }
  65032. var Selectize = function($input, settings) {
  65033. var key, i, n, dir, input, self = this;
  65034. input = $input[0];
  65035. input.selectize = self;
  65036. // detect rtl environment
  65037. var computedStyle = window.getComputedStyle && window.getComputedStyle(input, null);
  65038. dir = computedStyle ? computedStyle.getPropertyValue('direction') : input.currentStyle && input.currentStyle.direction;
  65039. dir = dir || $input.parents('[dir]:first').attr('dir') || '';
  65040. // setup default state
  65041. $.extend(self, {
  65042. order : 0,
  65043. settings : settings,
  65044. $input : $input,
  65045. tabIndex : $input.attr('tabindex') || '',
  65046. tagType : input.tagName.toLowerCase() === 'select' ? TAG_SELECT : TAG_INPUT,
  65047. rtl : /rtl/i.test(dir),
  65048. eventNS : '.selectize' + (++Selectize.count),
  65049. highlightedValue : null,
  65050. isBlurring : false,
  65051. isOpen : false,
  65052. isDisabled : false,
  65053. isRequired : $input.is('[required]'),
  65054. isInvalid : false,
  65055. isLocked : false,
  65056. isFocused : false,
  65057. isInputHidden : false,
  65058. isSetup : false,
  65059. isShiftDown : false,
  65060. isCmdDown : false,
  65061. isCtrlDown : false,
  65062. ignoreFocus : false,
  65063. ignoreBlur : false,
  65064. ignoreHover : false,
  65065. hasOptions : false,
  65066. currentResults : null,
  65067. lastValue : '',
  65068. caretPos : 0,
  65069. loading : 0,
  65070. loadedSearches : {},
  65071. $activeOption : null,
  65072. $activeItems : [],
  65073. optgroups : {},
  65074. options : {},
  65075. userOptions : {},
  65076. items : [],
  65077. renderCache : {},
  65078. onSearchChange : settings.loadThrottle === null ? self.onSearchChange : debounce(self.onSearchChange, settings.loadThrottle)
  65079. });
  65080. // search system
  65081. self.sifter = new Sifter(this.options, {diacritics: settings.diacritics});
  65082. // build options table
  65083. if (self.settings.options) {
  65084. for (i = 0, n = self.settings.options.length; i < n; i++) {
  65085. self.registerOption(self.settings.options[i]);
  65086. }
  65087. delete self.settings.options;
  65088. }
  65089. // build optgroup table
  65090. if (self.settings.optgroups) {
  65091. for (i = 0, n = self.settings.optgroups.length; i < n; i++) {
  65092. self.registerOptionGroup(self.settings.optgroups[i]);
  65093. }
  65094. delete self.settings.optgroups;
  65095. }
  65096. // option-dependent defaults
  65097. self.settings.mode = self.settings.mode || (self.settings.maxItems === 1 ? 'single' : 'multi');
  65098. if (typeof self.settings.hideSelected !== 'boolean') {
  65099. self.settings.hideSelected = self.settings.mode === 'multi';
  65100. }
  65101. self.initializePlugins(self.settings.plugins);
  65102. self.setupCallbacks();
  65103. self.setupTemplates();
  65104. self.setup();
  65105. };
  65106. // mixins
  65107. // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  65108. MicroEvent.mixin(Selectize);
  65109. if(typeof MicroPlugin !== "undefined"){
  65110. MicroPlugin.mixin(Selectize);
  65111. }else{
  65112. logError("Dependency MicroPlugin is missing",
  65113. {explanation:
  65114. "Make sure you either: (1) are using the \"standalone\" "+
  65115. "version of Selectize, or (2) require MicroPlugin before you "+
  65116. "load Selectize."}
  65117. );
  65118. }
  65119. // methods
  65120. // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  65121. $.extend(Selectize.prototype, {
  65122. /**
  65123. * Creates all elements and sets up event bindings.
  65124. */
  65125. setup: function() {
  65126. var self = this;
  65127. var settings = self.settings;
  65128. var eventNS = self.eventNS;
  65129. var $window = $(window);
  65130. var $document = $(document);
  65131. var $input = self.$input;
  65132. var $wrapper;
  65133. var $control;
  65134. var $control_input;
  65135. var $dropdown;
  65136. var $dropdown_content;
  65137. var $dropdown_parent;
  65138. var inputMode;
  65139. var timeout_blur;
  65140. var timeout_focus;
  65141. var classes;
  65142. var classes_plugins;
  65143. var inputId;
  65144. inputMode = self.settings.mode;
  65145. classes = $input.attr('class') || '';
  65146. $wrapper = $('<div>').addClass(settings.wrapperClass).addClass(classes).addClass(inputMode);
  65147. $control = $('<div>').addClass(settings.inputClass).addClass('items').appendTo($wrapper);
  65148. $control_input = $('<input type="text" autocomplete="off" />').appendTo($control).attr('tabindex', $input.is(':disabled') ? '-1' : self.tabIndex);
  65149. $dropdown_parent = $(settings.dropdownParent || $wrapper);
  65150. $dropdown = $('<div>').addClass(settings.dropdownClass).addClass(inputMode).hide().appendTo($dropdown_parent);
  65151. $dropdown_content = $('<div>').addClass(settings.dropdownContentClass).appendTo($dropdown);
  65152. if(inputId = $input.attr('id')) {
  65153. $control_input.attr('id', inputId + '-selectized');
  65154. $("label[for='"+inputId+"']").attr('for', inputId + '-selectized');
  65155. }
  65156. if(self.settings.copyClassesToDropdown) {
  65157. $dropdown.addClass(classes);
  65158. }
  65159. $wrapper.css({
  65160. width: $input[0].style.width
  65161. });
  65162. if (self.plugins.names.length) {
  65163. classes_plugins = 'plugin-' + self.plugins.names.join(' plugin-');
  65164. $wrapper.addClass(classes_plugins);
  65165. $dropdown.addClass(classes_plugins);
  65166. }
  65167. if ((settings.maxItems === null || settings.maxItems > 1) && self.tagType === TAG_SELECT) {
  65168. $input.attr('multiple', 'multiple');
  65169. }
  65170. if (self.settings.placeholder) {
  65171. $control_input.attr('placeholder', settings.placeholder);
  65172. }
  65173. // if splitOn was not passed in, construct it from the delimiter to allow pasting universally
  65174. if (!self.settings.splitOn && self.settings.delimiter) {
  65175. var delimiterEscaped = self.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
  65176. self.settings.splitOn = new RegExp('\\s*' + delimiterEscaped + '+\\s*');
  65177. }
  65178. if ($input.attr('autocorrect')) {
  65179. $control_input.attr('autocorrect', $input.attr('autocorrect'));
  65180. }
  65181. if ($input.attr('autocapitalize')) {
  65182. $control_input.attr('autocapitalize', $input.attr('autocapitalize'));
  65183. }
  65184. $control_input[0].type = $input[0].type;
  65185. self.$wrapper = $wrapper;
  65186. self.$control = $control;
  65187. self.$control_input = $control_input;
  65188. self.$dropdown = $dropdown;
  65189. self.$dropdown_content = $dropdown_content;
  65190. $dropdown.on('mouseenter mousedown click', '[data-disabled]>[data-selectable]', function(e) { e.stopImmediatePropagation(); });
  65191. $dropdown.on('mouseenter', '[data-selectable]', function() { return self.onOptionHover.apply(self, arguments); });
  65192. $dropdown.on('mousedown click', '[data-selectable]', function() { return self.onOptionSelect.apply(self, arguments); });
  65193. watchChildEvent($control, 'mousedown', '*:not(input)', function() { return self.onItemSelect.apply(self, arguments); });
  65194. autoGrow($control_input);
  65195. $control.on({
  65196. mousedown : function() { return self.onMouseDown.apply(self, arguments); },
  65197. click : function() { return self.onClick.apply(self, arguments); }
  65198. });
  65199. $control_input.on({
  65200. mousedown : function(e) { e.stopPropagation(); },
  65201. keydown : function() { return self.onKeyDown.apply(self, arguments); },
  65202. keyup : function() { return self.onKeyUp.apply(self, arguments); },
  65203. keypress : function() { return self.onKeyPress.apply(self, arguments); },
  65204. resize : function() { self.positionDropdown.apply(self, []); },
  65205. blur : function() { return self.onBlur.apply(self, arguments); },
  65206. focus : function() { self.ignoreBlur = false; return self.onFocus.apply(self, arguments); },
  65207. paste : function() { return self.onPaste.apply(self, arguments); }
  65208. });
  65209. $document.on('keydown' + eventNS, function(e) {
  65210. self.isCmdDown = e[IS_MAC ? 'metaKey' : 'ctrlKey'];
  65211. self.isCtrlDown = e[IS_MAC ? 'altKey' : 'ctrlKey'];
  65212. self.isShiftDown = e.shiftKey;
  65213. });
  65214. $document.on('keyup' + eventNS, function(e) {
  65215. if (e.keyCode === KEY_CTRL) self.isCtrlDown = false;
  65216. if (e.keyCode === KEY_SHIFT) self.isShiftDown = false;
  65217. if (e.keyCode === KEY_CMD) self.isCmdDown = false;
  65218. });
  65219. $document.on('mousedown' + eventNS, function(e) {
  65220. if (self.isFocused) {
  65221. // prevent events on the dropdown scrollbar from causing the control to blur
  65222. if (e.target === self.$dropdown[0] || e.target.parentNode === self.$dropdown[0]) {
  65223. return false;
  65224. }
  65225. // blur on click outside
  65226. if (!self.$control.has(e.target).length && e.target !== self.$control[0]) {
  65227. self.blur(e.target);
  65228. }
  65229. }
  65230. });
  65231. $window.on(['scroll' + eventNS, 'resize' + eventNS].join(' '), function() {
  65232. if (self.isOpen) {
  65233. self.positionDropdown.apply(self, arguments);
  65234. }
  65235. });
  65236. $window.on('mousemove' + eventNS, function() {
  65237. self.ignoreHover = false;
  65238. });
  65239. // store original children and tab index so that they can be
  65240. // restored when the destroy() method is called.
  65241. this.revertSettings = {
  65242. $children : $input.children().detach(),
  65243. tabindex : $input.attr('tabindex')
  65244. };
  65245. $input.attr('tabindex', -1).hide().after(self.$wrapper);
  65246. if ($.isArray(settings.items)) {
  65247. self.setValue(settings.items);
  65248. delete settings.items;
  65249. }
  65250. // feature detect for the validation API
  65251. if (SUPPORTS_VALIDITY_API) {
  65252. $input.on('invalid' + eventNS, function(e) {
  65253. e.preventDefault();
  65254. self.isInvalid = true;
  65255. self.refreshState();
  65256. });
  65257. }
  65258. self.updateOriginalInput();
  65259. self.refreshItems();
  65260. self.refreshState();
  65261. self.updatePlaceholder();
  65262. self.isSetup = true;
  65263. if ($input.is(':disabled')) {
  65264. self.disable();
  65265. }
  65266. self.on('change', this.onChange);
  65267. $input.data('selectize', self);
  65268. $input.addClass('selectized');
  65269. self.trigger('initialize');
  65270. // preload options
  65271. if (settings.preload === true) {
  65272. self.onSearchChange('');
  65273. }
  65274. },
  65275. /**
  65276. * Sets up default rendering functions.
  65277. */
  65278. setupTemplates: function() {
  65279. var self = this;
  65280. var field_label = self.settings.labelField;
  65281. var field_optgroup = self.settings.optgroupLabelField;
  65282. var templates = {
  65283. 'optgroup': function(data) {
  65284. return '<div class="optgroup">' + data.html + '</div>';
  65285. },
  65286. 'optgroup_header': function(data, escape) {
  65287. return '<div class="optgroup-header">' + escape(data[field_optgroup]) + '</div>';
  65288. },
  65289. 'option': function(data, escape) {
  65290. return '<div class="option">' + escape(data[field_label]) + '</div>';
  65291. },
  65292. 'item': function(data, escape) {
  65293. return '<div class="item">' + escape(data[field_label]) + '</div>';
  65294. },
  65295. 'option_create': function(data, escape) {
  65296. return '<div class="create">Add <strong>' + escape(data.input) + '</strong>&hellip;</div>';
  65297. }
  65298. };
  65299. self.settings.render = $.extend({}, templates, self.settings.render);
  65300. },
  65301. /**
  65302. * Maps fired events to callbacks provided
  65303. * in the settings used when creating the control.
  65304. */
  65305. setupCallbacks: function() {
  65306. var key, fn, callbacks = {
  65307. 'initialize' : 'onInitialize',
  65308. 'change' : 'onChange',
  65309. 'item_add' : 'onItemAdd',
  65310. 'item_remove' : 'onItemRemove',
  65311. 'clear' : 'onClear',
  65312. 'option_add' : 'onOptionAdd',
  65313. 'option_remove' : 'onOptionRemove',
  65314. 'option_clear' : 'onOptionClear',
  65315. 'optgroup_add' : 'onOptionGroupAdd',
  65316. 'optgroup_remove' : 'onOptionGroupRemove',
  65317. 'optgroup_clear' : 'onOptionGroupClear',
  65318. 'dropdown_open' : 'onDropdownOpen',
  65319. 'dropdown_close' : 'onDropdownClose',
  65320. 'type' : 'onType',
  65321. 'load' : 'onLoad',
  65322. 'focus' : 'onFocus',
  65323. 'blur' : 'onBlur'
  65324. };
  65325. for (key in callbacks) {
  65326. if (callbacks.hasOwnProperty(key)) {
  65327. fn = this.settings[callbacks[key]];
  65328. if (fn) this.on(key, fn);
  65329. }
  65330. }
  65331. },
  65332. /**
  65333. * Triggered when the main control element
  65334. * has a click event.
  65335. *
  65336. * @param {object} e
  65337. * @return {boolean}
  65338. */
  65339. onClick: function(e) {
  65340. var self = this;
  65341. // necessary for mobile webkit devices (manual focus triggering
  65342. // is ignored unless invoked within a click event)
  65343. // also necessary to reopen a dropdown that has been closed by
  65344. // closeAfterSelect
  65345. if (!self.isFocused || !self.isOpen) {
  65346. self.focus();
  65347. e.preventDefault();
  65348. }
  65349. },
  65350. /**
  65351. * Triggered when the main control element
  65352. * has a mouse down event.
  65353. *
  65354. * @param {object} e
  65355. * @return {boolean}
  65356. */
  65357. onMouseDown: function(e) {
  65358. var self = this;
  65359. var defaultPrevented = e.isDefaultPrevented();
  65360. var $target = $(e.target);
  65361. if (self.isFocused) {
  65362. // retain focus by preventing native handling. if the
  65363. // event target is the input it should not be modified.
  65364. // otherwise, text selection within the input won't work.
  65365. if (e.target !== self.$control_input[0]) {
  65366. if (self.settings.mode === 'single') {
  65367. // toggle dropdown
  65368. self.isOpen ? self.close() : self.open();
  65369. } else if (!defaultPrevented) {
  65370. self.setActiveItem(null);
  65371. }
  65372. return false;
  65373. }
  65374. } else {
  65375. // give control focus
  65376. if (!defaultPrevented) {
  65377. window.setTimeout(function() {
  65378. self.focus();
  65379. }, 0);
  65380. }
  65381. }
  65382. },
  65383. /**
  65384. * Triggered when the value of the control has been changed.
  65385. * This should propagate the event to the original DOM
  65386. * input / select element.
  65387. */
  65388. onChange: function() {
  65389. this.$input.trigger('change');
  65390. },
  65391. /**
  65392. * Triggered on <input> paste.
  65393. *
  65394. * @param {object} e
  65395. * @returns {boolean}
  65396. */
  65397. onPaste: function(e) {
  65398. var self = this;
  65399. if (self.isFull() || self.isInputHidden || self.isLocked) {
  65400. e.preventDefault();
  65401. return;
  65402. }
  65403. // If a regex or string is included, this will split the pasted
  65404. // input and create Items for each separate value
  65405. if (self.settings.splitOn) {
  65406. // Wait for pasted text to be recognized in value
  65407. setTimeout(function() {
  65408. var pastedText = self.$control_input.val();
  65409. if(!pastedText.match(self.settings.splitOn)){ return }
  65410. var splitInput = $.trim(pastedText).split(self.settings.splitOn);
  65411. for (var i = 0, n = splitInput.length; i < n; i++) {
  65412. self.createItem(splitInput[i]);
  65413. }
  65414. }, 0);
  65415. }
  65416. },
  65417. /**
  65418. * Triggered on <input> keypress.
  65419. *
  65420. * @param {object} e
  65421. * @returns {boolean}
  65422. */
  65423. onKeyPress: function(e) {
  65424. if (this.isLocked) return e && e.preventDefault();
  65425. var character = String.fromCharCode(e.keyCode || e.which);
  65426. if (this.settings.create && this.settings.mode === 'multi' && character === this.settings.delimiter) {
  65427. this.createItem();
  65428. e.preventDefault();
  65429. return false;
  65430. }
  65431. },
  65432. /**
  65433. * Triggered on <input> keydown.
  65434. *
  65435. * @param {object} e
  65436. * @returns {boolean}
  65437. */
  65438. onKeyDown: function(e) {
  65439. var isInput = e.target === this.$control_input[0];
  65440. var self = this;
  65441. if (self.isLocked) {
  65442. if (e.keyCode !== KEY_TAB) {
  65443. e.preventDefault();
  65444. }
  65445. return;
  65446. }
  65447. switch (e.keyCode) {
  65448. case KEY_A:
  65449. if (self.isCmdDown) {
  65450. self.selectAll();
  65451. return;
  65452. }
  65453. break;
  65454. case KEY_ESC:
  65455. if (self.isOpen) {
  65456. e.preventDefault();
  65457. e.stopPropagation();
  65458. self.close();
  65459. }
  65460. return;
  65461. case KEY_N:
  65462. if (!e.ctrlKey || e.altKey) break;
  65463. case KEY_DOWN:
  65464. if (!self.isOpen && self.hasOptions) {
  65465. self.open();
  65466. } else if (self.$activeOption) {
  65467. self.ignoreHover = true;
  65468. var $next = self.getAdjacentOption(self.$activeOption, 1);
  65469. if ($next.length) self.setActiveOption($next, true, true);
  65470. }
  65471. e.preventDefault();
  65472. return;
  65473. case KEY_P:
  65474. if (!e.ctrlKey || e.altKey) break;
  65475. case KEY_UP:
  65476. if (self.$activeOption) {
  65477. self.ignoreHover = true;
  65478. var $prev = self.getAdjacentOption(self.$activeOption, -1);
  65479. if ($prev.length) self.setActiveOption($prev, true, true);
  65480. }
  65481. e.preventDefault();
  65482. return;
  65483. case KEY_RETURN:
  65484. if (self.isOpen && self.$activeOption) {
  65485. self.onOptionSelect({currentTarget: self.$activeOption});
  65486. e.preventDefault();
  65487. }
  65488. return;
  65489. case KEY_LEFT:
  65490. self.advanceSelection(-1, e);
  65491. return;
  65492. case KEY_RIGHT:
  65493. self.advanceSelection(1, e);
  65494. return;
  65495. case KEY_TAB:
  65496. if (self.settings.selectOnTab && self.isOpen && self.$activeOption) {
  65497. self.onOptionSelect({currentTarget: self.$activeOption});
  65498. // Default behaviour is to jump to the next field, we only want this
  65499. // if the current field doesn't accept any more entries
  65500. if (!self.isFull()) {
  65501. e.preventDefault();
  65502. }
  65503. }
  65504. if (self.settings.create && self.createItem()) {
  65505. e.preventDefault();
  65506. }
  65507. return;
  65508. case KEY_BACKSPACE:
  65509. case KEY_DELETE:
  65510. self.deleteSelection(e);
  65511. return;
  65512. }
  65513. if ((self.isFull() || self.isInputHidden) && !(IS_MAC ? e.metaKey : e.ctrlKey)) {
  65514. e.preventDefault();
  65515. return;
  65516. }
  65517. },
  65518. /**
  65519. * Triggered on <input> keyup.
  65520. *
  65521. * @param {object} e
  65522. * @returns {boolean}
  65523. */
  65524. onKeyUp: function(e) {
  65525. var self = this;
  65526. if (self.isLocked) return e && e.preventDefault();
  65527. var value = self.$control_input.val() || '';
  65528. if (self.lastValue !== value) {
  65529. self.lastValue = value;
  65530. self.onSearchChange(value);
  65531. self.refreshOptions();
  65532. self.trigger('type', value);
  65533. }
  65534. },
  65535. /**
  65536. * Invokes the user-provide option provider / loader.
  65537. *
  65538. * Note: this function is debounced in the Selectize
  65539. * constructor (by `settings.loadThrottle` milliseconds)
  65540. *
  65541. * @param {string} value
  65542. */
  65543. onSearchChange: function(value) {
  65544. var self = this;
  65545. var fn = self.settings.load;
  65546. if (!fn) return;
  65547. if (self.loadedSearches.hasOwnProperty(value)) return;
  65548. self.loadedSearches[value] = true;
  65549. self.load(function(callback) {
  65550. fn.apply(self, [value, callback]);
  65551. });
  65552. },
  65553. /**
  65554. * Triggered on <input> focus.
  65555. *
  65556. * @param {object} e (optional)
  65557. * @returns {boolean}
  65558. */
  65559. onFocus: function(e) {
  65560. var self = this;
  65561. var wasFocused = self.isFocused;
  65562. if (self.isDisabled) {
  65563. self.blur();
  65564. e && e.preventDefault();
  65565. return false;
  65566. }
  65567. if (self.ignoreFocus) return;
  65568. self.isFocused = true;
  65569. if (self.settings.preload === 'focus') self.onSearchChange('');
  65570. if (!wasFocused) self.trigger('focus');
  65571. if (!self.$activeItems.length) {
  65572. self.showInput();
  65573. self.setActiveItem(null);
  65574. self.refreshOptions(!!self.settings.openOnFocus);
  65575. }
  65576. self.refreshState();
  65577. },
  65578. /**
  65579. * Triggered on <input> blur.
  65580. *
  65581. * @param {object} e
  65582. * @param {Element} dest
  65583. */
  65584. onBlur: function(e, dest) {
  65585. var self = this;
  65586. if (!self.isFocused) return;
  65587. self.isFocused = false;
  65588. if (self.ignoreFocus) {
  65589. return;
  65590. } else if (!self.ignoreBlur && document.activeElement === self.$dropdown_content[0]) {
  65591. // necessary to prevent IE closing the dropdown when the scrollbar is clicked
  65592. self.ignoreBlur = true;
  65593. self.onFocus(e);
  65594. return;
  65595. }
  65596. var deactivate = function() {
  65597. self.close();
  65598. self.setTextboxValue('');
  65599. self.setActiveItem(null);
  65600. self.setActiveOption(null);
  65601. self.setCaret(self.items.length);
  65602. self.refreshState();
  65603. // IE11 bug: element still marked as active
  65604. dest && dest.focus && dest.focus();
  65605. self.isBlurring = false;
  65606. self.ignoreFocus = false;
  65607. self.trigger('blur');
  65608. };
  65609. self.isBlurring = true;
  65610. self.ignoreFocus = true;
  65611. if (self.settings.create && self.settings.createOnBlur) {
  65612. self.createItem(null, false, deactivate);
  65613. } else {
  65614. deactivate();
  65615. }
  65616. },
  65617. /**
  65618. * Triggered when the user rolls over
  65619. * an option in the autocomplete dropdown menu.
  65620. *
  65621. * @param {object} e
  65622. * @returns {boolean}
  65623. */
  65624. onOptionHover: function(e) {
  65625. if (this.ignoreHover) return;
  65626. this.setActiveOption(e.currentTarget, false);
  65627. },
  65628. /**
  65629. * Triggered when the user clicks on an option
  65630. * in the autocomplete dropdown menu.
  65631. *
  65632. * @param {object} e
  65633. * @returns {boolean}
  65634. */
  65635. onOptionSelect: function(e) {
  65636. var value, $target, $option, self = this;
  65637. if (e.preventDefault) {
  65638. e.preventDefault();
  65639. e.stopPropagation();
  65640. }
  65641. $target = $(e.currentTarget);
  65642. if ($target.hasClass('create')) {
  65643. self.createItem(null, function() {
  65644. if (self.settings.closeAfterSelect) {
  65645. self.close();
  65646. }
  65647. });
  65648. } else {
  65649. value = $target.attr('data-value');
  65650. if (typeof value !== 'undefined') {
  65651. self.lastQuery = null;
  65652. self.setTextboxValue('');
  65653. self.addItem(value);
  65654. if (self.settings.closeAfterSelect) {
  65655. self.close();
  65656. } else if (!self.settings.hideSelected && e.type && /mouse/.test(e.type)) {
  65657. self.setActiveOption(self.getOption(value));
  65658. }
  65659. }
  65660. }
  65661. },
  65662. /**
  65663. * Triggered when the user clicks on an item
  65664. * that has been selected.
  65665. *
  65666. * @param {object} e
  65667. * @returns {boolean}
  65668. */
  65669. onItemSelect: function(e) {
  65670. var self = this;
  65671. if (self.isLocked) return;
  65672. if (self.settings.mode === 'multi') {
  65673. e.preventDefault();
  65674. self.setActiveItem(e.currentTarget, e);
  65675. }
  65676. },
  65677. /**
  65678. * Invokes the provided method that provides
  65679. * results to a callback---which are then added
  65680. * as options to the control.
  65681. *
  65682. * @param {function} fn
  65683. */
  65684. load: function(fn) {
  65685. var self = this;
  65686. var $wrapper = self.$wrapper.addClass(self.settings.loadingClass);
  65687. self.loading++;
  65688. fn.apply(self, [function(results) {
  65689. self.loading = Math.max(self.loading - 1, 0);
  65690. if (results && results.length) {
  65691. self.addOption(results);
  65692. self.refreshOptions(self.isFocused && !self.isInputHidden);
  65693. }
  65694. if (!self.loading) {
  65695. $wrapper.removeClass(self.settings.loadingClass);
  65696. }
  65697. self.trigger('load', results);
  65698. }]);
  65699. },
  65700. /**
  65701. * Sets the input field of the control to the specified value.
  65702. *
  65703. * @param {string} value
  65704. */
  65705. setTextboxValue: function(value) {
  65706. var $input = this.$control_input;
  65707. var changed = $input.val() !== value;
  65708. if (changed) {
  65709. $input.val(value).triggerHandler('update');
  65710. this.lastValue = value;
  65711. }
  65712. },
  65713. /**
  65714. * Returns the value of the control. If multiple items
  65715. * can be selected (e.g. <select multiple>), this returns
  65716. * an array. If only one item can be selected, this
  65717. * returns a string.
  65718. *
  65719. * @returns {mixed}
  65720. */
  65721. getValue: function() {
  65722. if (this.tagType === TAG_SELECT && this.$input.attr('multiple')) {
  65723. return this.items;
  65724. } else {
  65725. return this.items.join(this.settings.delimiter);
  65726. }
  65727. },
  65728. /**
  65729. * Resets the selected items to the given value.
  65730. *
  65731. * @param {mixed} value
  65732. */
  65733. setValue: function(value, silent) {
  65734. var events = silent ? [] : ['change'];
  65735. debounce_events(this, events, function() {
  65736. this.clear(silent);
  65737. this.addItems(value, silent);
  65738. });
  65739. },
  65740. /**
  65741. * Sets the selected item.
  65742. *
  65743. * @param {object} $item
  65744. * @param {object} e (optional)
  65745. */
  65746. setActiveItem: function($item, e) {
  65747. var self = this;
  65748. var eventName;
  65749. var i, idx, begin, end, item, swap;
  65750. var $last;
  65751. if (self.settings.mode === 'single') return;
  65752. $item = $($item);
  65753. // clear the active selection
  65754. if (!$item.length) {
  65755. $(self.$activeItems).removeClass('active');
  65756. self.$activeItems = [];
  65757. if (self.isFocused) {
  65758. self.showInput();
  65759. }
  65760. return;
  65761. }
  65762. // modify selection
  65763. eventName = e && e.type.toLowerCase();
  65764. if (eventName === 'mousedown' && self.isShiftDown && self.$activeItems.length) {
  65765. $last = self.$control.children('.active:last');
  65766. begin = Array.prototype.indexOf.apply(self.$control[0].childNodes, [$last[0]]);
  65767. end = Array.prototype.indexOf.apply(self.$control[0].childNodes, [$item[0]]);
  65768. if (begin > end) {
  65769. swap = begin;
  65770. begin = end;
  65771. end = swap;
  65772. }
  65773. for (i = begin; i <= end; i++) {
  65774. item = self.$control[0].childNodes[i];
  65775. if (self.$activeItems.indexOf(item) === -1) {
  65776. $(item).addClass('active');
  65777. self.$activeItems.push(item);
  65778. }
  65779. }
  65780. e.preventDefault();
  65781. } else if ((eventName === 'mousedown' && self.isCtrlDown) || (eventName === 'keydown' && this.isShiftDown)) {
  65782. if ($item.hasClass('active')) {
  65783. idx = self.$activeItems.indexOf($item[0]);
  65784. self.$activeItems.splice(idx, 1);
  65785. $item.removeClass('active');
  65786. } else {
  65787. self.$activeItems.push($item.addClass('active')[0]);
  65788. }
  65789. } else {
  65790. $(self.$activeItems).removeClass('active');
  65791. self.$activeItems = [$item.addClass('active')[0]];
  65792. }
  65793. // ensure control has focus
  65794. self.hideInput();
  65795. if (!this.isFocused) {
  65796. self.focus();
  65797. }
  65798. },
  65799. /**
  65800. * Sets the selected item in the dropdown menu
  65801. * of available options.
  65802. *
  65803. * @param {object} $object
  65804. * @param {boolean} scroll
  65805. * @param {boolean} animate
  65806. */
  65807. setActiveOption: function($option, scroll, animate) {
  65808. var height_menu, height_item, y;
  65809. var scroll_top, scroll_bottom;
  65810. var self = this;
  65811. if (self.$activeOption) self.$activeOption.removeClass('active');
  65812. self.$activeOption = null;
  65813. $option = $($option);
  65814. if (!$option.length) return;
  65815. self.$activeOption = $option.addClass('active');
  65816. if (scroll || !isset(scroll)) {
  65817. height_menu = self.$dropdown_content.height();
  65818. height_item = self.$activeOption.outerHeight(true);
  65819. scroll = self.$dropdown_content.scrollTop() || 0;
  65820. y = self.$activeOption.offset().top - self.$dropdown_content.offset().top + scroll;
  65821. scroll_top = y;
  65822. scroll_bottom = y - height_menu + height_item;
  65823. if (y + height_item > height_menu + scroll) {
  65824. self.$dropdown_content.stop().animate({scrollTop: scroll_bottom}, animate ? self.settings.scrollDuration : 0);
  65825. } else if (y < scroll) {
  65826. self.$dropdown_content.stop().animate({scrollTop: scroll_top}, animate ? self.settings.scrollDuration : 0);
  65827. }
  65828. }
  65829. },
  65830. /**
  65831. * Selects all items (CTRL + A).
  65832. */
  65833. selectAll: function() {
  65834. var self = this;
  65835. if (self.settings.mode === 'single') return;
  65836. self.$activeItems = Array.prototype.slice.apply(self.$control.children(':not(input)').addClass('active'));
  65837. if (self.$activeItems.length) {
  65838. self.hideInput();
  65839. self.close();
  65840. }
  65841. self.focus();
  65842. },
  65843. /**
  65844. * Hides the input element out of view, while
  65845. * retaining its focus.
  65846. */
  65847. hideInput: function() {
  65848. var self = this;
  65849. self.setTextboxValue('');
  65850. self.$control_input.css({opacity: 0, position: 'absolute', left: self.rtl ? 10000 : -10000});
  65851. self.isInputHidden = true;
  65852. },
  65853. /**
  65854. * Restores input visibility.
  65855. */
  65856. showInput: function() {
  65857. this.$control_input.css({opacity: 1, position: 'relative', left: 0});
  65858. this.isInputHidden = false;
  65859. },
  65860. /**
  65861. * Gives the control focus.
  65862. */
  65863. focus: function() {
  65864. var self = this;
  65865. if (self.isDisabled) return;
  65866. self.ignoreFocus = true;
  65867. self.$control_input[0].focus();
  65868. window.setTimeout(function() {
  65869. self.ignoreFocus = false;
  65870. self.onFocus();
  65871. }, 0);
  65872. },
  65873. /**
  65874. * Forces the control out of focus.
  65875. *
  65876. * @param {Element} dest
  65877. */
  65878. blur: function(dest) {
  65879. this.$control_input[0].blur();
  65880. this.onBlur(null, dest);
  65881. },
  65882. /**
  65883. * Returns a function that scores an object
  65884. * to show how good of a match it is to the
  65885. * provided query.
  65886. *
  65887. * @param {string} query
  65888. * @param {object} options
  65889. * @return {function}
  65890. */
  65891. getScoreFunction: function(query) {
  65892. return this.sifter.getScoreFunction(query, this.getSearchOptions());
  65893. },
  65894. /**
  65895. * Returns search options for sifter (the system
  65896. * for scoring and sorting results).
  65897. *
  65898. * @see https://github.com/brianreavis/sifter.js
  65899. * @return {object}
  65900. */
  65901. getSearchOptions: function() {
  65902. var settings = this.settings;
  65903. var sort = settings.sortField;
  65904. if (typeof sort === 'string') {
  65905. sort = [{field: sort}];
  65906. }
  65907. return {
  65908. fields : settings.searchField,
  65909. conjunction : settings.searchConjunction,
  65910. sort : sort,
  65911. nesting : settings.nesting
  65912. };
  65913. },
  65914. /**
  65915. * Searches through available options and returns
  65916. * a sorted array of matches.
  65917. *
  65918. * Returns an object containing:
  65919. *
  65920. * - query {string}
  65921. * - tokens {array}
  65922. * - total {int}
  65923. * - items {array}
  65924. *
  65925. * @param {string} query
  65926. * @returns {object}
  65927. */
  65928. search: function(query) {
  65929. var i, value, score, result, calculateScore;
  65930. var self = this;
  65931. var settings = self.settings;
  65932. var options = this.getSearchOptions();
  65933. // validate user-provided result scoring function
  65934. if (settings.score) {
  65935. calculateScore = self.settings.score.apply(this, [query]);
  65936. if (typeof calculateScore !== 'function') {
  65937. throw new Error('Selectize "score" setting must be a function that returns a function');
  65938. }
  65939. }
  65940. // perform search
  65941. if (query !== self.lastQuery) {
  65942. self.lastQuery = query;
  65943. result = self.sifter.search(query, $.extend(options, {score: calculateScore}));
  65944. self.currentResults = result;
  65945. } else {
  65946. result = $.extend(true, {}, self.currentResults);
  65947. }
  65948. // filter out selected items
  65949. if (settings.hideSelected) {
  65950. for (i = result.items.length - 1; i >= 0; i--) {
  65951. if (self.items.indexOf(hash_key(result.items[i].id)) !== -1) {
  65952. result.items.splice(i, 1);
  65953. }
  65954. }
  65955. }
  65956. return result;
  65957. },
  65958. /**
  65959. * Refreshes the list of available options shown
  65960. * in the autocomplete dropdown menu.
  65961. *
  65962. * @param {boolean} triggerDropdown
  65963. */
  65964. refreshOptions: function(triggerDropdown) {
  65965. var i, j, k, n, groups, groups_order, option, option_html, optgroup, optgroups, html, html_children, has_create_option;
  65966. var $active, $active_before, $create;
  65967. if (typeof triggerDropdown === 'undefined') {
  65968. triggerDropdown = true;
  65969. }
  65970. var self = this;
  65971. var query = $.trim(self.$control_input.val());
  65972. var results = self.search(query);
  65973. var $dropdown_content = self.$dropdown_content;
  65974. var active_before = self.$activeOption && hash_key(self.$activeOption.attr('data-value'));
  65975. // build markup
  65976. n = results.items.length;
  65977. if (typeof self.settings.maxOptions === 'number') {
  65978. n = Math.min(n, self.settings.maxOptions);
  65979. }
  65980. // render and group available options individually
  65981. groups = {};
  65982. groups_order = [];
  65983. for (i = 0; i < n; i++) {
  65984. option = self.options[results.items[i].id];
  65985. option_html = self.render('option', option);
  65986. optgroup = option[self.settings.optgroupField] || '';
  65987. optgroups = $.isArray(optgroup) ? optgroup : [optgroup];
  65988. for (j = 0, k = optgroups && optgroups.length; j < k; j++) {
  65989. optgroup = optgroups[j];
  65990. if (!self.optgroups.hasOwnProperty(optgroup)) {
  65991. optgroup = '';
  65992. }
  65993. if (!groups.hasOwnProperty(optgroup)) {
  65994. groups[optgroup] = document.createDocumentFragment();
  65995. groups_order.push(optgroup);
  65996. }
  65997. groups[optgroup].appendChild(option_html);
  65998. }
  65999. }
  66000. // sort optgroups
  66001. if (this.settings.lockOptgroupOrder) {
  66002. groups_order.sort(function(a, b) {
  66003. var a_order = self.optgroups[a].$order || 0;
  66004. var b_order = self.optgroups[b].$order || 0;
  66005. return a_order - b_order;
  66006. });
  66007. }
  66008. // render optgroup headers & join groups
  66009. html = document.createDocumentFragment();
  66010. for (i = 0, n = groups_order.length; i < n; i++) {
  66011. optgroup = groups_order[i];
  66012. if (self.optgroups.hasOwnProperty(optgroup) && groups[optgroup].childNodes.length) {
  66013. // render the optgroup header and options within it,
  66014. // then pass it to the wrapper template
  66015. html_children = document.createDocumentFragment();
  66016. html_children.appendChild(self.render('optgroup_header', self.optgroups[optgroup]));
  66017. html_children.appendChild(groups[optgroup]);
  66018. html.appendChild(self.render('optgroup', $.extend({}, self.optgroups[optgroup], {
  66019. html: domToString(html_children),
  66020. dom: html_children
  66021. })));
  66022. } else {
  66023. html.appendChild(groups[optgroup]);
  66024. }
  66025. }
  66026. $dropdown_content.html(html);
  66027. // highlight matching terms inline
  66028. if (self.settings.highlight) {
  66029. $dropdown_content.removeHighlight();
  66030. if (results.query.length && results.tokens.length) {
  66031. for (i = 0, n = results.tokens.length; i < n; i++) {
  66032. highlight($dropdown_content, results.tokens[i].regex);
  66033. }
  66034. }
  66035. }
  66036. // add "selected" class to selected options
  66037. if (!self.settings.hideSelected) {
  66038. for (i = 0, n = self.items.length; i < n; i++) {
  66039. self.getOption(self.items[i]).addClass('selected');
  66040. }
  66041. }
  66042. // add create option
  66043. has_create_option = self.canCreate(query);
  66044. if (has_create_option) {
  66045. $dropdown_content.prepend(self.render('option_create', {input: query}));
  66046. $create = $($dropdown_content[0].childNodes[0]);
  66047. }
  66048. // activate
  66049. self.hasOptions = results.items.length > 0 || has_create_option;
  66050. if (self.hasOptions) {
  66051. if (results.items.length > 0) {
  66052. $active_before = active_before && self.getOption(active_before);
  66053. if ($active_before && $active_before.length) {
  66054. $active = $active_before;
  66055. } else if (self.settings.mode === 'single' && self.items.length) {
  66056. $active = self.getOption(self.items[0]);
  66057. }
  66058. if (!$active || !$active.length) {
  66059. if ($create && !self.settings.addPrecedence) {
  66060. $active = self.getAdjacentOption($create, 1);
  66061. } else {
  66062. $active = $dropdown_content.find('[data-selectable]:first');
  66063. }
  66064. }
  66065. } else {
  66066. $active = $create;
  66067. }
  66068. self.setActiveOption($active);
  66069. if (triggerDropdown && !self.isOpen) { self.open(); }
  66070. } else {
  66071. self.setActiveOption(null);
  66072. if (triggerDropdown && self.isOpen) { self.close(); }
  66073. }
  66074. },
  66075. /**
  66076. * Adds an available option. If it already exists,
  66077. * nothing will happen. Note: this does not refresh
  66078. * the options list dropdown (use `refreshOptions`
  66079. * for that).
  66080. *
  66081. * Usage:
  66082. *
  66083. * this.addOption(data)
  66084. *
  66085. * @param {object|array} data
  66086. */
  66087. addOption: function(data) {
  66088. var i, n, value, self = this;
  66089. if ($.isArray(data)) {
  66090. for (i = 0, n = data.length; i < n; i++) {
  66091. self.addOption(data[i]);
  66092. }
  66093. return;
  66094. }
  66095. if (value = self.registerOption(data)) {
  66096. self.userOptions[value] = true;
  66097. self.lastQuery = null;
  66098. self.trigger('option_add', value, data);
  66099. }
  66100. },
  66101. /**
  66102. * Registers an option to the pool of options.
  66103. *
  66104. * @param {object} data
  66105. * @return {boolean|string}
  66106. */
  66107. registerOption: function(data) {
  66108. var key = hash_key(data[this.settings.valueField]);
  66109. if (typeof key === 'undefined' || key === null || this.options.hasOwnProperty(key)) return false;
  66110. data.$order = data.$order || ++this.order;
  66111. this.options[key] = data;
  66112. return key;
  66113. },
  66114. /**
  66115. * Registers an option group to the pool of option groups.
  66116. *
  66117. * @param {object} data
  66118. * @return {boolean|string}
  66119. */
  66120. registerOptionGroup: function(data) {
  66121. var key = hash_key(data[this.settings.optgroupValueField]);
  66122. if (!key) return false;
  66123. data.$order = data.$order || ++this.order;
  66124. this.optgroups[key] = data;
  66125. return key;
  66126. },
  66127. /**
  66128. * Registers a new optgroup for options
  66129. * to be bucketed into.
  66130. *
  66131. * @param {string} id
  66132. * @param {object} data
  66133. */
  66134. addOptionGroup: function(id, data) {
  66135. data[this.settings.optgroupValueField] = id;
  66136. if (id = this.registerOptionGroup(data)) {
  66137. this.trigger('optgroup_add', id, data);
  66138. }
  66139. },
  66140. /**
  66141. * Removes an existing option group.
  66142. *
  66143. * @param {string} id
  66144. */
  66145. removeOptionGroup: function(id) {
  66146. if (this.optgroups.hasOwnProperty(id)) {
  66147. delete this.optgroups[id];
  66148. this.renderCache = {};
  66149. this.trigger('optgroup_remove', id);
  66150. }
  66151. },
  66152. /**
  66153. * Clears all existing option groups.
  66154. */
  66155. clearOptionGroups: function() {
  66156. this.optgroups = {};
  66157. this.renderCache = {};
  66158. this.trigger('optgroup_clear');
  66159. },
  66160. /**
  66161. * Updates an option available for selection. If
  66162. * it is visible in the selected items or options
  66163. * dropdown, it will be re-rendered automatically.
  66164. *
  66165. * @param {string} value
  66166. * @param {object} data
  66167. */
  66168. updateOption: function(value, data) {
  66169. var self = this;
  66170. var $item, $item_new;
  66171. var value_new, index_item, cache_items, cache_options, order_old;
  66172. value = hash_key(value);
  66173. value_new = hash_key(data[self.settings.valueField]);
  66174. // sanity checks
  66175. if (value === null) return;
  66176. if (!self.options.hasOwnProperty(value)) return;
  66177. if (typeof value_new !== 'string') throw new Error('Value must be set in option data');
  66178. order_old = self.options[value].$order;
  66179. // update references
  66180. if (value_new !== value) {
  66181. delete self.options[value];
  66182. index_item = self.items.indexOf(value);
  66183. if (index_item !== -1) {
  66184. self.items.splice(index_item, 1, value_new);
  66185. }
  66186. }
  66187. data.$order = data.$order || order_old;
  66188. self.options[value_new] = data;
  66189. // invalidate render cache
  66190. cache_items = self.renderCache['item'];
  66191. cache_options = self.renderCache['option'];
  66192. if (cache_items) {
  66193. delete cache_items[value];
  66194. delete cache_items[value_new];
  66195. }
  66196. if (cache_options) {
  66197. delete cache_options[value];
  66198. delete cache_options[value_new];
  66199. }
  66200. // update the item if it's selected
  66201. if (self.items.indexOf(value_new) !== -1) {
  66202. $item = self.getItem(value);
  66203. $item_new = $(self.render('item', data));
  66204. if ($item.hasClass('active')) $item_new.addClass('active');
  66205. $item.replaceWith($item_new);
  66206. }
  66207. // invalidate last query because we might have updated the sortField
  66208. self.lastQuery = null;
  66209. // update dropdown contents
  66210. if (self.isOpen) {
  66211. self.refreshOptions(false);
  66212. }
  66213. },
  66214. /**
  66215. * Removes a single option.
  66216. *
  66217. * @param {string} value
  66218. * @param {boolean} silent
  66219. */
  66220. removeOption: function(value, silent) {
  66221. var self = this;
  66222. value = hash_key(value);
  66223. var cache_items = self.renderCache['item'];
  66224. var cache_options = self.renderCache['option'];
  66225. if (cache_items) delete cache_items[value];
  66226. if (cache_options) delete cache_options[value];
  66227. delete self.userOptions[value];
  66228. delete self.options[value];
  66229. self.lastQuery = null;
  66230. self.trigger('option_remove', value);
  66231. self.removeItem(value, silent);
  66232. },
  66233. /**
  66234. * Clears all options.
  66235. */
  66236. clearOptions: function() {
  66237. var self = this;
  66238. self.loadedSearches = {};
  66239. self.userOptions = {};
  66240. self.renderCache = {};
  66241. var options = self.options;
  66242. $.each(self.options, function(key, value) {
  66243. if(self.items.indexOf(key) == -1) {
  66244. delete options[key];
  66245. }
  66246. });
  66247. self.options = self.sifter.items = options;
  66248. self.lastQuery = null;
  66249. self.trigger('option_clear');
  66250. },
  66251. /**
  66252. * Returns the jQuery element of the option
  66253. * matching the given value.
  66254. *
  66255. * @param {string} value
  66256. * @returns {object}
  66257. */
  66258. getOption: function(value) {
  66259. return this.getElementWithValue(value, this.$dropdown_content.find('[data-selectable]'));
  66260. },
  66261. /**
  66262. * Returns the jQuery element of the next or
  66263. * previous selectable option.
  66264. *
  66265. * @param {object} $option
  66266. * @param {int} direction can be 1 for next or -1 for previous
  66267. * @return {object}
  66268. */
  66269. getAdjacentOption: function($option, direction) {
  66270. var $options = this.$dropdown.find('[data-selectable]');
  66271. var index = $options.index($option) + direction;
  66272. return index >= 0 && index < $options.length ? $options.eq(index) : $();
  66273. },
  66274. /**
  66275. * Finds the first element with a "data-value" attribute
  66276. * that matches the given value.
  66277. *
  66278. * @param {mixed} value
  66279. * @param {object} $els
  66280. * @return {object}
  66281. */
  66282. getElementWithValue: function(value, $els) {
  66283. value = hash_key(value);
  66284. if (typeof value !== 'undefined' && value !== null) {
  66285. for (var i = 0, n = $els.length; i < n; i++) {
  66286. if ($els[i].getAttribute('data-value') === value) {
  66287. return $($els[i]);
  66288. }
  66289. }
  66290. }
  66291. return $();
  66292. },
  66293. /**
  66294. * Returns the jQuery element of the item
  66295. * matching the given value.
  66296. *
  66297. * @param {string} value
  66298. * @returns {object}
  66299. */
  66300. getItem: function(value) {
  66301. return this.getElementWithValue(value, this.$control.children());
  66302. },
  66303. /**
  66304. * "Selects" multiple items at once. Adds them to the list
  66305. * at the current caret position.
  66306. *
  66307. * @param {string} value
  66308. * @param {boolean} silent
  66309. */
  66310. addItems: function(values, silent) {
  66311. this.buffer = document.createDocumentFragment();
  66312. var childNodes = this.$control[0].childNodes;
  66313. for (var i = 0; i < childNodes.length; i++) {
  66314. this.buffer.appendChild(childNodes[i]);
  66315. }
  66316. var items = $.isArray(values) ? values : [values];
  66317. for (var i = 0, n = items.length; i < n; i++) {
  66318. this.isPending = (i < n - 1);
  66319. this.addItem(items[i], silent);
  66320. }
  66321. var control = this.$control[0];
  66322. control.insertBefore(this.buffer, control.firstChild);
  66323. this.buffer = null;
  66324. },
  66325. /**
  66326. * "Selects" an item. Adds it to the list
  66327. * at the current caret position.
  66328. *
  66329. * @param {string} value
  66330. * @param {boolean} silent
  66331. */
  66332. addItem: function(value, silent) {
  66333. var events = silent ? [] : ['change'];
  66334. debounce_events(this, events, function() {
  66335. var $item, $option, $options;
  66336. var self = this;
  66337. var inputMode = self.settings.mode;
  66338. var i, active, value_next, wasFull;
  66339. value = hash_key(value);
  66340. if (self.items.indexOf(value) !== -1) {
  66341. if (inputMode === 'single') self.close();
  66342. return;
  66343. }
  66344. if (!self.options.hasOwnProperty(value)) return;
  66345. if (inputMode === 'single') self.clear(silent);
  66346. if (inputMode === 'multi' && self.isFull()) return;
  66347. $item = $(self.render('item', self.options[value]));
  66348. wasFull = self.isFull();
  66349. self.items.splice(self.caretPos, 0, value);
  66350. self.insertAtCaret($item);
  66351. if (!self.isPending || (!wasFull && self.isFull())) {
  66352. self.refreshState();
  66353. }
  66354. if (self.isSetup) {
  66355. $options = self.$dropdown_content.find('[data-selectable]');
  66356. // update menu / remove the option (if this is not one item being added as part of series)
  66357. if (!self.isPending) {
  66358. $option = self.getOption(value);
  66359. value_next = self.getAdjacentOption($option, 1).attr('data-value');
  66360. self.refreshOptions(self.isFocused && inputMode !== 'single');
  66361. if (value_next) {
  66362. self.setActiveOption(self.getOption(value_next));
  66363. }
  66364. }
  66365. // hide the menu if the maximum number of items have been selected or no options are left
  66366. if (!$options.length || self.isFull()) {
  66367. self.close();
  66368. } else if (!self.isPending) {
  66369. self.positionDropdown();
  66370. }
  66371. self.updatePlaceholder();
  66372. self.trigger('item_add', value, $item);
  66373. if (!self.isPending) {
  66374. self.updateOriginalInput({silent: silent});
  66375. }
  66376. }
  66377. });
  66378. },
  66379. /**
  66380. * Removes the selected item matching
  66381. * the provided value.
  66382. *
  66383. * @param {string} value
  66384. */
  66385. removeItem: function(value, silent) {
  66386. var self = this;
  66387. var $item, i, idx;
  66388. $item = (value instanceof $) ? value : self.getItem(value);
  66389. value = hash_key($item.attr('data-value'));
  66390. i = self.items.indexOf(value);
  66391. if (i !== -1) {
  66392. $item.remove();
  66393. if ($item.hasClass('active')) {
  66394. idx = self.$activeItems.indexOf($item[0]);
  66395. self.$activeItems.splice(idx, 1);
  66396. }
  66397. self.items.splice(i, 1);
  66398. self.lastQuery = null;
  66399. if (!self.settings.persist && self.userOptions.hasOwnProperty(value)) {
  66400. self.removeOption(value, silent);
  66401. }
  66402. if (i < self.caretPos) {
  66403. self.setCaret(self.caretPos - 1);
  66404. }
  66405. self.refreshState();
  66406. self.updatePlaceholder();
  66407. self.updateOriginalInput({silent: silent});
  66408. self.positionDropdown();
  66409. self.trigger('item_remove', value, $item);
  66410. }
  66411. },
  66412. /**
  66413. * Invokes the `create` method provided in the
  66414. * selectize options that should provide the data
  66415. * for the new item, given the user input.
  66416. *
  66417. * Once this completes, it will be added
  66418. * to the item list.
  66419. *
  66420. * @param {string} value
  66421. * @param {boolean} [triggerDropdown]
  66422. * @param {function} [callback]
  66423. * @return {boolean}
  66424. */
  66425. createItem: function(input, triggerDropdown) {
  66426. var self = this;
  66427. var caret = self.caretPos;
  66428. input = input || $.trim(self.$control_input.val() || '');
  66429. var callback = arguments[arguments.length - 1];
  66430. if (typeof callback !== 'function') callback = function() {};
  66431. if (typeof triggerDropdown !== 'boolean') {
  66432. triggerDropdown = true;
  66433. }
  66434. if (!self.canCreate(input)) {
  66435. callback();
  66436. return false;
  66437. }
  66438. self.lock();
  66439. var setup = (typeof self.settings.create === 'function') ? this.settings.create : function(input) {
  66440. var data = {};
  66441. data[self.settings.labelField] = input;
  66442. data[self.settings.valueField] = input;
  66443. return data;
  66444. };
  66445. var create = once(function(data) {
  66446. self.unlock();
  66447. if (!data || typeof data !== 'object') return callback();
  66448. var value = hash_key(data[self.settings.valueField]);
  66449. if (typeof value !== 'string') return callback();
  66450. self.setTextboxValue('');
  66451. self.addOption(data);
  66452. self.setCaret(caret);
  66453. self.addItem(value);
  66454. self.refreshOptions(triggerDropdown && self.settings.mode !== 'single');
  66455. callback(data);
  66456. });
  66457. var output = setup.apply(this, [input, create]);
  66458. if (typeof output !== 'undefined') {
  66459. create(output);
  66460. }
  66461. return true;
  66462. },
  66463. /**
  66464. * Re-renders the selected item lists.
  66465. */
  66466. refreshItems: function() {
  66467. this.lastQuery = null;
  66468. if (this.isSetup) {
  66469. this.addItem(this.items);
  66470. }
  66471. this.refreshState();
  66472. this.updateOriginalInput();
  66473. },
  66474. /**
  66475. * Updates all state-dependent attributes
  66476. * and CSS classes.
  66477. */
  66478. refreshState: function() {
  66479. this.refreshValidityState();
  66480. this.refreshClasses();
  66481. },
  66482. /**
  66483. * Update the `required` attribute of both input and control input.
  66484. *
  66485. * The `required` property needs to be activated on the control input
  66486. * for the error to be displayed at the right place. `required` also
  66487. * needs to be temporarily deactivated on the input since the input is
  66488. * hidden and can't show errors.
  66489. */
  66490. refreshValidityState: function() {
  66491. if (!this.isRequired) return false;
  66492. var invalid = !this.items.length;
  66493. this.isInvalid = invalid;
  66494. this.$control_input.prop('required', invalid);
  66495. this.$input.prop('required', !invalid);
  66496. },
  66497. /**
  66498. * Updates all state-dependent CSS classes.
  66499. */
  66500. refreshClasses: function() {
  66501. var self = this;
  66502. var isFull = self.isFull();
  66503. var isLocked = self.isLocked;
  66504. self.$wrapper
  66505. .toggleClass('rtl', self.rtl);
  66506. self.$control
  66507. .toggleClass('focus', self.isFocused)
  66508. .toggleClass('disabled', self.isDisabled)
  66509. .toggleClass('required', self.isRequired)
  66510. .toggleClass('invalid', self.isInvalid)
  66511. .toggleClass('locked', isLocked)
  66512. .toggleClass('full', isFull).toggleClass('not-full', !isFull)
  66513. .toggleClass('input-active', self.isFocused && !self.isInputHidden)
  66514. .toggleClass('dropdown-active', self.isOpen)
  66515. .toggleClass('has-options', !$.isEmptyObject(self.options))
  66516. .toggleClass('has-items', self.items.length > 0);
  66517. self.$control_input.data('grow', !isFull && !isLocked);
  66518. },
  66519. /**
  66520. * Determines whether or not more items can be added
  66521. * to the control without exceeding the user-defined maximum.
  66522. *
  66523. * @returns {boolean}
  66524. */
  66525. isFull: function() {
  66526. return this.settings.maxItems !== null && this.items.length >= this.settings.maxItems;
  66527. },
  66528. /**
  66529. * Refreshes the original <select> or <input>
  66530. * element to reflect the current state.
  66531. */
  66532. updateOriginalInput: function(opts) {
  66533. var i, n, options, label, self = this;
  66534. opts = opts || {};
  66535. if (self.tagType === TAG_SELECT) {
  66536. options = [];
  66537. for (i = 0, n = self.items.length; i < n; i++) {
  66538. label = self.options[self.items[i]][self.settings.labelField] || '';
  66539. options.push('<option value="' + escape_html(self.items[i]) + '" selected="selected">' + escape_html(label) + '</option>');
  66540. }
  66541. if (!options.length && !this.$input.attr('multiple')) {
  66542. options.push('<option value="" selected="selected"></option>');
  66543. }
  66544. self.$input.html(options.join(''));
  66545. } else {
  66546. self.$input.val(self.getValue());
  66547. self.$input.attr('value',self.$input.val());
  66548. }
  66549. if (self.isSetup) {
  66550. if (!opts.silent) {
  66551. self.trigger('change', self.$input.val());
  66552. }
  66553. }
  66554. },
  66555. /**
  66556. * Shows/hide the input placeholder depending
  66557. * on if there items in the list already.
  66558. */
  66559. updatePlaceholder: function() {
  66560. if (!this.settings.placeholder) return;
  66561. var $input = this.$control_input;
  66562. if (this.items.length) {
  66563. $input.removeAttr('placeholder');
  66564. } else {
  66565. $input.attr('placeholder', this.settings.placeholder);
  66566. }
  66567. $input.triggerHandler('update', {force: true});
  66568. },
  66569. /**
  66570. * Shows the autocomplete dropdown containing
  66571. * the available options.
  66572. */
  66573. open: function() {
  66574. var self = this;
  66575. if (self.isLocked || self.isOpen || (self.settings.mode === 'multi' && self.isFull())) return;
  66576. self.focus();
  66577. self.isOpen = true;
  66578. self.refreshState();
  66579. self.$dropdown.css({visibility: 'hidden', display: 'block'});
  66580. self.positionDropdown();
  66581. self.$dropdown.css({visibility: 'visible'});
  66582. self.trigger('dropdown_open', self.$dropdown);
  66583. },
  66584. /**
  66585. * Closes the autocomplete dropdown menu.
  66586. */
  66587. close: function() {
  66588. var self = this;
  66589. var trigger = self.isOpen;
  66590. if (self.settings.mode === 'single' && self.items.length) {
  66591. self.hideInput();
  66592. // Do not trigger blur while inside a blur event,
  66593. // this fixes some weird tabbing behavior in FF and IE.
  66594. // See #1164
  66595. if (!self.isBlurring) {
  66596. self.$control_input.blur(); // close keyboard on iOS
  66597. }
  66598. }
  66599. self.isOpen = false;
  66600. self.$dropdown.hide();
  66601. self.setActiveOption(null);
  66602. self.refreshState();
  66603. if (trigger) self.trigger('dropdown_close', self.$dropdown);
  66604. },
  66605. /**
  66606. * Calculates and applies the appropriate
  66607. * position of the dropdown.
  66608. */
  66609. positionDropdown: function() {
  66610. var $control = this.$control;
  66611. var offset = this.settings.dropdownParent === 'body' ? $control.offset() : $control.position();
  66612. offset.top += $control.outerHeight(true);
  66613. this.$dropdown.css({
  66614. width : $control[0].getBoundingClientRect().width,
  66615. top : offset.top,
  66616. left : offset.left
  66617. });
  66618. },
  66619. /**
  66620. * Resets / clears all selected items
  66621. * from the control.
  66622. *
  66623. * @param {boolean} silent
  66624. */
  66625. clear: function(silent) {
  66626. var self = this;
  66627. if (!self.items.length) return;
  66628. self.$control.children(':not(input)').remove();
  66629. self.items = [];
  66630. self.lastQuery = null;
  66631. self.setCaret(0);
  66632. self.setActiveItem(null);
  66633. self.updatePlaceholder();
  66634. self.updateOriginalInput({silent: silent});
  66635. self.refreshState();
  66636. self.showInput();
  66637. self.trigger('clear');
  66638. },
  66639. /**
  66640. * A helper method for inserting an element
  66641. * at the current caret position.
  66642. *
  66643. * @param {object} $el
  66644. */
  66645. insertAtCaret: function($el) {
  66646. var caret = Math.min(this.caretPos, this.items.length);
  66647. var el = $el[0];
  66648. var target = this.buffer || this.$control[0];
  66649. if (caret === 0) {
  66650. target.insertBefore(el, target.firstChild);
  66651. } else {
  66652. target.insertBefore(el, target.childNodes[caret]);
  66653. }
  66654. this.setCaret(caret + 1);
  66655. },
  66656. /**
  66657. * Removes the current selected item(s).
  66658. *
  66659. * @param {object} e (optional)
  66660. * @returns {boolean}
  66661. */
  66662. deleteSelection: function(e) {
  66663. var i, n, direction, selection, values, caret, option_select, $option_select, $tail;
  66664. var self = this;
  66665. direction = (e && e.keyCode === KEY_BACKSPACE) ? -1 : 1;
  66666. selection = getSelection(self.$control_input[0]);
  66667. if (self.$activeOption && !self.settings.hideSelected) {
  66668. option_select = self.getAdjacentOption(self.$activeOption, -1).attr('data-value');
  66669. }
  66670. // determine items that will be removed
  66671. values = [];
  66672. if (self.$activeItems.length) {
  66673. $tail = self.$control.children('.active:' + (direction > 0 ? 'last' : 'first'));
  66674. caret = self.$control.children(':not(input)').index($tail);
  66675. if (direction > 0) { caret++; }
  66676. for (i = 0, n = self.$activeItems.length; i < n; i++) {
  66677. values.push($(self.$activeItems[i]).attr('data-value'));
  66678. }
  66679. if (e) {
  66680. e.preventDefault();
  66681. e.stopPropagation();
  66682. }
  66683. } else if ((self.isFocused || self.settings.mode === 'single') && self.items.length) {
  66684. if (direction < 0 && selection.start === 0 && selection.length === 0) {
  66685. values.push(self.items[self.caretPos - 1]);
  66686. } else if (direction > 0 && selection.start === self.$control_input.val().length) {
  66687. values.push(self.items[self.caretPos]);
  66688. }
  66689. }
  66690. // allow the callback to abort
  66691. if (!values.length || (typeof self.settings.onDelete === 'function' && self.settings.onDelete.apply(self, [values]) === false)) {
  66692. return false;
  66693. }
  66694. // perform removal
  66695. if (typeof caret !== 'undefined') {
  66696. self.setCaret(caret);
  66697. }
  66698. while (values.length) {
  66699. self.removeItem(values.pop());
  66700. }
  66701. self.showInput();
  66702. self.positionDropdown();
  66703. self.refreshOptions(true);
  66704. // select previous option
  66705. if (option_select) {
  66706. $option_select = self.getOption(option_select);
  66707. if ($option_select.length) {
  66708. self.setActiveOption($option_select);
  66709. }
  66710. }
  66711. return true;
  66712. },
  66713. /**
  66714. * Selects the previous / next item (depending
  66715. * on the `direction` argument).
  66716. *
  66717. * > 0 - right
  66718. * < 0 - left
  66719. *
  66720. * @param {int} direction
  66721. * @param {object} e (optional)
  66722. */
  66723. advanceSelection: function(direction, e) {
  66724. var tail, selection, idx, valueLength, cursorAtEdge, $tail;
  66725. var self = this;
  66726. if (direction === 0) return;
  66727. if (self.rtl) direction *= -1;
  66728. tail = direction > 0 ? 'last' : 'first';
  66729. selection = getSelection(self.$control_input[0]);
  66730. if (self.isFocused && !self.isInputHidden) {
  66731. valueLength = self.$control_input.val().length;
  66732. cursorAtEdge = direction < 0
  66733. ? selection.start === 0 && selection.length === 0
  66734. : selection.start === valueLength;
  66735. if (cursorAtEdge && !valueLength) {
  66736. self.advanceCaret(direction, e);
  66737. }
  66738. } else {
  66739. $tail = self.$control.children('.active:' + tail);
  66740. if ($tail.length) {
  66741. idx = self.$control.children(':not(input)').index($tail);
  66742. self.setActiveItem(null);
  66743. self.setCaret(direction > 0 ? idx + 1 : idx);
  66744. }
  66745. }
  66746. },
  66747. /**
  66748. * Moves the caret left / right.
  66749. *
  66750. * @param {int} direction
  66751. * @param {object} e (optional)
  66752. */
  66753. advanceCaret: function(direction, e) {
  66754. var self = this, fn, $adj;
  66755. if (direction === 0) return;
  66756. fn = direction > 0 ? 'next' : 'prev';
  66757. if (self.isShiftDown) {
  66758. $adj = self.$control_input[fn]();
  66759. if ($adj.length) {
  66760. self.hideInput();
  66761. self.setActiveItem($adj);
  66762. e && e.preventDefault();
  66763. }
  66764. } else {
  66765. self.setCaret(self.caretPos + direction);
  66766. }
  66767. },
  66768. /**
  66769. * Moves the caret to the specified index.
  66770. *
  66771. * @param {int} i
  66772. */
  66773. setCaret: function(i) {
  66774. var self = this;
  66775. if (self.settings.mode === 'single') {
  66776. i = self.items.length;
  66777. } else {
  66778. i = Math.max(0, Math.min(self.items.length, i));
  66779. }
  66780. if(!self.isPending) {
  66781. // the input must be moved by leaving it in place and moving the
  66782. // siblings, due to the fact that focus cannot be restored once lost
  66783. // on mobile webkit devices
  66784. var j, n, fn, $children, $child;
  66785. $children = self.$control.children(':not(input)');
  66786. for (j = 0, n = $children.length; j < n; j++) {
  66787. $child = $($children[j]).detach();
  66788. if (j < i) {
  66789. self.$control_input.before($child);
  66790. } else {
  66791. self.$control.append($child);
  66792. }
  66793. }
  66794. }
  66795. self.caretPos = i;
  66796. },
  66797. /**
  66798. * Disables user input on the control. Used while
  66799. * items are being asynchronously created.
  66800. */
  66801. lock: function() {
  66802. this.close();
  66803. this.isLocked = true;
  66804. this.refreshState();
  66805. },
  66806. /**
  66807. * Re-enables user input on the control.
  66808. */
  66809. unlock: function() {
  66810. this.isLocked = false;
  66811. this.refreshState();
  66812. },
  66813. /**
  66814. * Disables user input on the control completely.
  66815. * While disabled, it cannot receive focus.
  66816. */
  66817. disable: function() {
  66818. var self = this;
  66819. self.$input.prop('disabled', true);
  66820. self.$control_input.prop('disabled', true).prop('tabindex', -1);
  66821. self.isDisabled = true;
  66822. self.lock();
  66823. },
  66824. /**
  66825. * Enables the control so that it can respond
  66826. * to focus and user input.
  66827. */
  66828. enable: function() {
  66829. var self = this;
  66830. self.$input.prop('disabled', false);
  66831. self.$control_input.prop('disabled', false).prop('tabindex', self.tabIndex);
  66832. self.isDisabled = false;
  66833. self.unlock();
  66834. },
  66835. /**
  66836. * Completely destroys the control and
  66837. * unbinds all event listeners so that it can
  66838. * be garbage collected.
  66839. */
  66840. destroy: function() {
  66841. var self = this;
  66842. var eventNS = self.eventNS;
  66843. var revertSettings = self.revertSettings;
  66844. self.trigger('destroy');
  66845. self.off();
  66846. self.$wrapper.remove();
  66847. self.$dropdown.remove();
  66848. self.$input
  66849. .html('')
  66850. .append(revertSettings.$children)
  66851. .removeAttr('tabindex')
  66852. .removeClass('selectized')
  66853. .attr({tabindex: revertSettings.tabindex})
  66854. .show();
  66855. self.$control_input.removeData('grow');
  66856. self.$input.removeData('selectize');
  66857. if (--Selectize.count == 0 && Selectize.$testInput) {
  66858. Selectize.$testInput.remove();
  66859. Selectize.$testInput = undefined;
  66860. }
  66861. $(window).off(eventNS);
  66862. $(document).off(eventNS);
  66863. $(document.body).off(eventNS);
  66864. delete self.$input[0].selectize;
  66865. },
  66866. /**
  66867. * A helper method for rendering "item" and
  66868. * "option" templates, given the data.
  66869. *
  66870. * @param {string} templateName
  66871. * @param {object} data
  66872. * @returns {string}
  66873. */
  66874. render: function(templateName, data) {
  66875. var value, id, label;
  66876. var html = '';
  66877. var cache = false;
  66878. var self = this;
  66879. var regex_tag = /^[\t \r\n]*<([a-z][a-z0-9\-_]*(?:\:[a-z][a-z0-9\-_]*)?)/i;
  66880. if (templateName === 'option' || templateName === 'item') {
  66881. value = hash_key(data[self.settings.valueField]);
  66882. cache = !!value;
  66883. }
  66884. // pull markup from cache if it exists
  66885. if (cache) {
  66886. if (!isset(self.renderCache[templateName])) {
  66887. self.renderCache[templateName] = {};
  66888. }
  66889. if (self.renderCache[templateName].hasOwnProperty(value)) {
  66890. return self.renderCache[templateName][value];
  66891. }
  66892. }
  66893. // render markup
  66894. html = $(self.settings.render[templateName].apply(this, [data, escape_html]));
  66895. // add mandatory attributes
  66896. if (templateName === 'option' || templateName === 'option_create') {
  66897. if (!data[self.settings.disabledField]) {
  66898. html.attr('data-selectable', '');
  66899. }
  66900. }
  66901. else if (templateName === 'optgroup') {
  66902. id = data[self.settings.optgroupValueField] || '';
  66903. html.attr('data-group', id);
  66904. if(data[self.settings.disabledField]) {
  66905. html.attr('data-disabled', '');
  66906. }
  66907. }
  66908. if (templateName === 'option' || templateName === 'item') {
  66909. html.attr('data-value', value || '');
  66910. }
  66911. // update cache
  66912. if (cache) {
  66913. self.renderCache[templateName][value] = html[0];
  66914. }
  66915. return html[0];
  66916. },
  66917. /**
  66918. * Clears the render cache for a template. If
  66919. * no template is given, clears all render
  66920. * caches.
  66921. *
  66922. * @param {string} templateName
  66923. */
  66924. clearCache: function(templateName) {
  66925. var self = this;
  66926. if (typeof templateName === 'undefined') {
  66927. self.renderCache = {};
  66928. } else {
  66929. delete self.renderCache[templateName];
  66930. }
  66931. },
  66932. /**
  66933. * Determines whether or not to display the
  66934. * create item prompt, given a user input.
  66935. *
  66936. * @param {string} input
  66937. * @return {boolean}
  66938. */
  66939. canCreate: function(input) {
  66940. var self = this;
  66941. if (!self.settings.create) return false;
  66942. var filter = self.settings.createFilter;
  66943. return input.length
  66944. && (typeof filter !== 'function' || filter.apply(self, [input]))
  66945. && (typeof filter !== 'string' || new RegExp(filter).test(input))
  66946. && (!(filter instanceof RegExp) || filter.test(input));
  66947. }
  66948. });
  66949. Selectize.count = 0;
  66950. Selectize.defaults = {
  66951. options: [],
  66952. optgroups: [],
  66953. plugins: [],
  66954. delimiter: ',',
  66955. splitOn: null, // regexp or string for splitting up values from a paste command
  66956. persist: true,
  66957. diacritics: true,
  66958. create: false,
  66959. createOnBlur: false,
  66960. createFilter: null,
  66961. highlight: true,
  66962. openOnFocus: true,
  66963. maxOptions: 1000,
  66964. maxItems: null,
  66965. hideSelected: null,
  66966. addPrecedence: false,
  66967. selectOnTab: false,
  66968. preload: false,
  66969. allowEmptyOption: false,
  66970. closeAfterSelect: false,
  66971. scrollDuration: 60,
  66972. loadThrottle: 300,
  66973. loadingClass: 'loading',
  66974. dataAttr: 'data-data',
  66975. optgroupField: 'optgroup',
  66976. valueField: 'value',
  66977. labelField: 'text',
  66978. disabledField: 'disabled',
  66979. optgroupLabelField: 'label',
  66980. optgroupValueField: 'value',
  66981. lockOptgroupOrder: false,
  66982. sortField: '$order',
  66983. searchField: ['text'],
  66984. searchConjunction: 'and',
  66985. mode: null,
  66986. wrapperClass: 'selectize-control',
  66987. inputClass: 'selectize-input',
  66988. dropdownClass: 'selectize-dropdown',
  66989. dropdownContentClass: 'selectize-dropdown-content',
  66990. dropdownParent: null,
  66991. copyClassesToDropdown: true,
  66992. /*
  66993. load : null, // function(query, callback) { ... }
  66994. score : null, // function(search) { ... }
  66995. onInitialize : null, // function() { ... }
  66996. onChange : null, // function(value) { ... }
  66997. onItemAdd : null, // function(value, $item) { ... }
  66998. onItemRemove : null, // function(value) { ... }
  66999. onClear : null, // function() { ... }
  67000. onOptionAdd : null, // function(value, data) { ... }
  67001. onOptionRemove : null, // function(value) { ... }
  67002. onOptionClear : null, // function() { ... }
  67003. onOptionGroupAdd : null, // function(id, data) { ... }
  67004. onOptionGroupRemove : null, // function(id) { ... }
  67005. onOptionGroupClear : null, // function() { ... }
  67006. onDropdownOpen : null, // function($dropdown) { ... }
  67007. onDropdownClose : null, // function($dropdown) { ... }
  67008. onType : null, // function(str) { ... }
  67009. onDelete : null, // function(values) { ... }
  67010. */
  67011. render: {
  67012. /*
  67013. item: null,
  67014. optgroup: null,
  67015. optgroup_header: null,
  67016. option: null,
  67017. option_create: null
  67018. */
  67019. }
  67020. };
  67021. $.fn.selectize = function(settings_user) {
  67022. var defaults = $.fn.selectize.defaults;
  67023. var settings = $.extend({}, defaults, settings_user);
  67024. var attr_data = settings.dataAttr;
  67025. var field_label = settings.labelField;
  67026. var field_value = settings.valueField;
  67027. var field_disabled = settings.disabledField;
  67028. var field_optgroup = settings.optgroupField;
  67029. var field_optgroup_label = settings.optgroupLabelField;
  67030. var field_optgroup_value = settings.optgroupValueField;
  67031. /**
  67032. * Initializes selectize from a <input type="text"> element.
  67033. *
  67034. * @param {object} $input
  67035. * @param {object} settings_element
  67036. */
  67037. var init_textbox = function($input, settings_element) {
  67038. var i, n, values, option;
  67039. var data_raw = $input.attr(attr_data);
  67040. if (!data_raw) {
  67041. var value = $.trim($input.val() || '');
  67042. if (!settings.allowEmptyOption && !value.length) return;
  67043. values = value.split(settings.delimiter);
  67044. for (i = 0, n = values.length; i < n; i++) {
  67045. option = {};
  67046. option[field_label] = values[i];
  67047. option[field_value] = values[i];
  67048. settings_element.options.push(option);
  67049. }
  67050. settings_element.items = values;
  67051. } else {
  67052. settings_element.options = JSON.parse(data_raw);
  67053. for (i = 0, n = settings_element.options.length; i < n; i++) {
  67054. settings_element.items.push(settings_element.options[i][field_value]);
  67055. }
  67056. }
  67057. };
  67058. /**
  67059. * Initializes selectize from a <select> element.
  67060. *
  67061. * @param {object} $input
  67062. * @param {object} settings_element
  67063. */
  67064. var init_select = function($input, settings_element) {
  67065. var i, n, tagName, $children, order = 0;
  67066. var options = settings_element.options;
  67067. var optionsMap = {};
  67068. var readData = function($el) {
  67069. var data = attr_data && $el.attr(attr_data);
  67070. if (typeof data === 'string' && data.length) {
  67071. return JSON.parse(data);
  67072. }
  67073. return null;
  67074. };
  67075. var addOption = function($option, group) {
  67076. $option = $($option);
  67077. var value = hash_key($option.val());
  67078. if (!value && !settings.allowEmptyOption) return;
  67079. // if the option already exists, it's probably been
  67080. // duplicated in another optgroup. in this case, push
  67081. // the current group to the "optgroup" property on the
  67082. // existing option so that it's rendered in both places.
  67083. if (optionsMap.hasOwnProperty(value)) {
  67084. if (group) {
  67085. var arr = optionsMap[value][field_optgroup];
  67086. if (!arr) {
  67087. optionsMap[value][field_optgroup] = group;
  67088. } else if (!$.isArray(arr)) {
  67089. optionsMap[value][field_optgroup] = [arr, group];
  67090. } else {
  67091. arr.push(group);
  67092. }
  67093. }
  67094. return;
  67095. }
  67096. var option = readData($option) || {};
  67097. option[field_label] = option[field_label] || $option.text();
  67098. option[field_value] = option[field_value] || value;
  67099. option[field_disabled] = option[field_disabled] || $option.prop('disabled');
  67100. option[field_optgroup] = option[field_optgroup] || group;
  67101. optionsMap[value] = option;
  67102. options.push(option);
  67103. if ($option.is(':selected')) {
  67104. settings_element.items.push(value);
  67105. }
  67106. };
  67107. var addGroup = function($optgroup) {
  67108. var i, n, id, optgroup, $options;
  67109. $optgroup = $($optgroup);
  67110. id = $optgroup.attr('label');
  67111. if (id) {
  67112. optgroup = readData($optgroup) || {};
  67113. optgroup[field_optgroup_label] = id;
  67114. optgroup[field_optgroup_value] = id;
  67115. optgroup[field_disabled] = $optgroup.prop('disabled');
  67116. settings_element.optgroups.push(optgroup);
  67117. }
  67118. $options = $('option', $optgroup);
  67119. for (i = 0, n = $options.length; i < n; i++) {
  67120. addOption($options[i], id);
  67121. }
  67122. };
  67123. settings_element.maxItems = $input.attr('multiple') ? null : 1;
  67124. $children = $input.children();
  67125. for (i = 0, n = $children.length; i < n; i++) {
  67126. tagName = $children[i].tagName.toLowerCase();
  67127. if (tagName === 'optgroup') {
  67128. addGroup($children[i]);
  67129. } else if (tagName === 'option') {
  67130. addOption($children[i]);
  67131. }
  67132. }
  67133. };
  67134. return this.each(function() {
  67135. if (this.selectize) return;
  67136. var instance;
  67137. var $input = $(this);
  67138. var tag_name = this.tagName.toLowerCase();
  67139. var placeholder = $input.attr('placeholder') || $input.attr('data-placeholder');
  67140. if (!placeholder && !settings.allowEmptyOption) {
  67141. placeholder = $input.children('option[value=""]').text();
  67142. }
  67143. var settings_element = {
  67144. 'placeholder' : placeholder,
  67145. 'options' : [],
  67146. 'optgroups' : [],
  67147. 'items' : []
  67148. };
  67149. if (tag_name === 'select') {
  67150. init_select($input, settings_element);
  67151. } else {
  67152. init_textbox($input, settings_element);
  67153. }
  67154. instance = new Selectize($input, $.extend(true, {}, defaults, settings_element, settings_user));
  67155. });
  67156. };
  67157. $.fn.selectize.defaults = Selectize.defaults;
  67158. $.fn.selectize.support = {
  67159. validity: SUPPORTS_VALIDITY_API
  67160. };
  67161. Selectize.define('drag_drop', function(options) {
  67162. if (!$.fn.sortable) throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');
  67163. if (this.settings.mode !== 'multi') return;
  67164. var self = this;
  67165. self.lock = (function() {
  67166. var original = self.lock;
  67167. return function() {
  67168. var sortable = self.$control.data('sortable');
  67169. if (sortable) sortable.disable();
  67170. return original.apply(self, arguments);
  67171. };
  67172. })();
  67173. self.unlock = (function() {
  67174. var original = self.unlock;
  67175. return function() {
  67176. var sortable = self.$control.data('sortable');
  67177. if (sortable) sortable.enable();
  67178. return original.apply(self, arguments);
  67179. };
  67180. })();
  67181. self.setup = (function() {
  67182. var original = self.setup;
  67183. return function() {
  67184. original.apply(this, arguments);
  67185. var $control = self.$control.sortable({
  67186. items: '[data-value]',
  67187. forcePlaceholderSize: true,
  67188. disabled: self.isLocked,
  67189. start: function(e, ui) {
  67190. ui.placeholder.css('width', ui.helper.css('width'));
  67191. $control.css({overflow: 'visible'});
  67192. },
  67193. stop: function() {
  67194. $control.css({overflow: 'hidden'});
  67195. var active = self.$activeItems ? self.$activeItems.slice() : null;
  67196. var values = [];
  67197. $control.children('[data-value]').each(function() {
  67198. values.push($(this).attr('data-value'));
  67199. });
  67200. self.setValue(values);
  67201. self.setActiveItem(active);
  67202. }
  67203. });
  67204. };
  67205. })();
  67206. });
  67207. Selectize.define('dropdown_header', function(options) {
  67208. var self = this;
  67209. options = $.extend({
  67210. title : 'Untitled',
  67211. headerClass : 'selectize-dropdown-header',
  67212. titleRowClass : 'selectize-dropdown-header-title',
  67213. labelClass : 'selectize-dropdown-header-label',
  67214. closeClass : 'selectize-dropdown-header-close',
  67215. html: function(data) {
  67216. return (
  67217. '<div class="' + data.headerClass + '">' +
  67218. '<div class="' + data.titleRowClass + '">' +
  67219. '<span class="' + data.labelClass + '">' + data.title + '</span>' +
  67220. '<a href="javascript:void(0)" class="' + data.closeClass + '">&times;</a>' +
  67221. '</div>' +
  67222. '</div>'
  67223. );
  67224. }
  67225. }, options);
  67226. self.setup = (function() {
  67227. var original = self.setup;
  67228. return function() {
  67229. original.apply(self, arguments);
  67230. self.$dropdown_header = $(options.html(options));
  67231. self.$dropdown.prepend(self.$dropdown_header);
  67232. };
  67233. })();
  67234. });
  67235. Selectize.define('optgroup_columns', function(options) {
  67236. var self = this;
  67237. options = $.extend({
  67238. equalizeWidth : true,
  67239. equalizeHeight : true
  67240. }, options);
  67241. this.getAdjacentOption = function($option, direction) {
  67242. var $options = $option.closest('[data-group]').find('[data-selectable]');
  67243. var index = $options.index($option) + direction;
  67244. return index >= 0 && index < $options.length ? $options.eq(index) : $();
  67245. };
  67246. this.onKeyDown = (function() {
  67247. var original = self.onKeyDown;
  67248. return function(e) {
  67249. var index, $option, $options, $optgroup;
  67250. if (this.isOpen && (e.keyCode === KEY_LEFT || e.keyCode === KEY_RIGHT)) {
  67251. self.ignoreHover = true;
  67252. $optgroup = this.$activeOption.closest('[data-group]');
  67253. index = $optgroup.find('[data-selectable]').index(this.$activeOption);
  67254. if(e.keyCode === KEY_LEFT) {
  67255. $optgroup = $optgroup.prev('[data-group]');
  67256. } else {
  67257. $optgroup = $optgroup.next('[data-group]');
  67258. }
  67259. $options = $optgroup.find('[data-selectable]');
  67260. $option = $options.eq(Math.min($options.length - 1, index));
  67261. if ($option.length) {
  67262. this.setActiveOption($option);
  67263. }
  67264. return;
  67265. }
  67266. return original.apply(this, arguments);
  67267. };
  67268. })();
  67269. var getScrollbarWidth = function() {
  67270. var div;
  67271. var width = getScrollbarWidth.width;
  67272. var doc = document;
  67273. if (typeof width === 'undefined') {
  67274. div = doc.createElement('div');
  67275. div.innerHTML = '<div style="width:50px;height:50px;position:absolute;left:-50px;top:-50px;overflow:auto;"><div style="width:1px;height:100px;"></div></div>';
  67276. div = div.firstChild;
  67277. doc.body.appendChild(div);
  67278. width = getScrollbarWidth.width = div.offsetWidth - div.clientWidth;
  67279. doc.body.removeChild(div);
  67280. }
  67281. return width;
  67282. };
  67283. var equalizeSizes = function() {
  67284. var i, n, height_max, width, width_last, width_parent, $optgroups;
  67285. $optgroups = $('[data-group]', self.$dropdown_content);
  67286. n = $optgroups.length;
  67287. if (!n || !self.$dropdown_content.width()) return;
  67288. if (options.equalizeHeight) {
  67289. height_max = 0;
  67290. for (i = 0; i < n; i++) {
  67291. height_max = Math.max(height_max, $optgroups.eq(i).height());
  67292. }
  67293. $optgroups.css({height: height_max});
  67294. }
  67295. if (options.equalizeWidth) {
  67296. width_parent = self.$dropdown_content.innerWidth() - getScrollbarWidth();
  67297. width = Math.round(width_parent / n);
  67298. $optgroups.css({width: width});
  67299. if (n > 1) {
  67300. width_last = width_parent - width * (n - 1);
  67301. $optgroups.eq(n - 1).css({width: width_last});
  67302. }
  67303. }
  67304. };
  67305. if (options.equalizeHeight || options.equalizeWidth) {
  67306. hook.after(this, 'positionDropdown', equalizeSizes);
  67307. hook.after(this, 'refreshOptions', equalizeSizes);
  67308. }
  67309. });
  67310. Selectize.define('remove_button', function(options) {
  67311. options = $.extend({
  67312. label : '&times;',
  67313. title : 'Remove',
  67314. className : 'remove',
  67315. append : true
  67316. }, options);
  67317. var singleClose = function(thisRef, options) {
  67318. options.className = 'remove-single';
  67319. var self = thisRef;
  67320. var html = '<a href="javascript:void(0)" class="' + options.className + '" tabindex="-1" title="' + escape_html(options.title) + '">' + options.label + '</a>';
  67321. /**
  67322. * Appends an element as a child (with raw HTML).
  67323. *
  67324. * @param {string} html_container
  67325. * @param {string} html_element
  67326. * @return {string}
  67327. */
  67328. var append = function(html_container, html_element) {
  67329. return $('<span>').append(html_container)
  67330. .append(html_element);
  67331. };
  67332. thisRef.setup = (function() {
  67333. var original = self.setup;
  67334. return function() {
  67335. // override the item rendering method to add the button to each
  67336. if (options.append) {
  67337. var id = $(self.$input.context).attr('id');
  67338. var selectizer = $('#'+id);
  67339. var render_item = self.settings.render.item;
  67340. self.settings.render.item = function(data) {
  67341. return append(render_item.apply(thisRef, arguments), html);
  67342. };
  67343. }
  67344. original.apply(thisRef, arguments);
  67345. // add event listener
  67346. thisRef.$control.on('click', '.' + options.className, function(e) {
  67347. e.preventDefault();
  67348. if (self.isLocked) return;
  67349. self.clear();
  67350. });
  67351. };
  67352. })();
  67353. };
  67354. var multiClose = function(thisRef, options) {
  67355. var self = thisRef;
  67356. var html = '<a href="javascript:void(0)" class="' + options.className + '" tabindex="-1" title="' + escape_html(options.title) + '">' + options.label + '</a>';
  67357. /**
  67358. * Appends an element as a child (with raw HTML).
  67359. *
  67360. * @param {string} html_container
  67361. * @param {string} html_element
  67362. * @return {string}
  67363. */
  67364. var append = function(html_container, html_element) {
  67365. var pos = html_container.search(/(<\/[^>]+>\s*)$/);
  67366. return html_container.substring(0, pos) + html_element + html_container.substring(pos);
  67367. };
  67368. thisRef.setup = (function() {
  67369. var original = self.setup;
  67370. return function() {
  67371. // override the item rendering method to add the button to each
  67372. if (options.append) {
  67373. var render_item = self.settings.render.item;
  67374. self.settings.render.item = function(data) {
  67375. return append(render_item.apply(thisRef, arguments), html);
  67376. };
  67377. }
  67378. original.apply(thisRef, arguments);
  67379. // add event listener
  67380. thisRef.$control.on('click', '.' + options.className, function(e) {
  67381. e.preventDefault();
  67382. if (self.isLocked) return;
  67383. var $item = $(e.currentTarget).parent();
  67384. self.setActiveItem($item);
  67385. if (self.deleteSelection()) {
  67386. self.setCaret(self.items.length);
  67387. }
  67388. });
  67389. };
  67390. })();
  67391. };
  67392. if (this.settings.mode === 'single') {
  67393. singleClose(this, options);
  67394. return;
  67395. } else {
  67396. multiClose(this, options);
  67397. }
  67398. });
  67399. Selectize.define('restore_on_backspace', function(options) {
  67400. var self = this;
  67401. options.text = options.text || function(option) {
  67402. return option[this.settings.labelField];
  67403. };
  67404. this.onKeyDown = (function() {
  67405. var original = self.onKeyDown;
  67406. return function(e) {
  67407. var index, option;
  67408. if (e.keyCode === KEY_BACKSPACE && this.$control_input.val() === '' && !this.$activeItems.length) {
  67409. index = this.caretPos - 1;
  67410. if (index >= 0 && index < this.items.length) {
  67411. option = this.options[this.items[index]];
  67412. if (this.deleteSelection(e)) {
  67413. this.setTextboxValue(options.text.apply(this, [option]));
  67414. this.refreshOptions(true);
  67415. }
  67416. e.preventDefault();
  67417. return;
  67418. }
  67419. }
  67420. return original.apply(this, arguments);
  67421. };
  67422. })();
  67423. });
  67424. return Selectize;
  67425. }));
  67426. /***/ }),
  67427. /***/ 55069:
  67428. /***/ (function(module, exports, __webpack_require__) {
  67429. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
  67430. * sifter.js
  67431. * Copyright (c) 2013 Brian Reavis & contributors
  67432. *
  67433. * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
  67434. * file except in compliance with the License. You may obtain a copy of the License at:
  67435. * http://www.apache.org/licenses/LICENSE-2.0
  67436. *
  67437. * Unless required by applicable law or agreed to in writing, software distributed under
  67438. * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
  67439. * ANY KIND, either express or implied. See the License for the specific language
  67440. * governing permissions and limitations under the License.
  67441. *
  67442. * @author Brian Reavis <brian@thirdroute.com>
  67443. */
  67444. (function(root, factory) {
  67445. if (true) {
  67446. !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  67447. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  67448. (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
  67449. __WEBPACK_AMD_DEFINE_FACTORY__),
  67450. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  67451. } else {}
  67452. }(this, function() {
  67453. /**
  67454. * Textually searches arrays and hashes of objects
  67455. * by property (or multiple properties). Designed
  67456. * specifically for autocomplete.
  67457. *
  67458. * @constructor
  67459. * @param {array|object} items
  67460. * @param {object} items
  67461. */
  67462. var Sifter = function(items, settings) {
  67463. this.items = items;
  67464. this.settings = settings || {diacritics: true};
  67465. };
  67466. /**
  67467. * Splits a search string into an array of individual
  67468. * regexps to be used to match results.
  67469. *
  67470. * @param {string} query
  67471. * @returns {array}
  67472. */
  67473. Sifter.prototype.tokenize = function(query) {
  67474. query = trim(String(query || '').toLowerCase());
  67475. if (!query || !query.length) return [];
  67476. var i, n, regex, letter;
  67477. var tokens = [];
  67478. var words = query.split(/ +/);
  67479. for (i = 0, n = words.length; i < n; i++) {
  67480. regex = escape_regex(words[i]);
  67481. if (this.settings.diacritics) {
  67482. for (letter in DIACRITICS) {
  67483. if (DIACRITICS.hasOwnProperty(letter)) {
  67484. regex = regex.replace(new RegExp(letter, 'g'), DIACRITICS[letter]);
  67485. }
  67486. }
  67487. }
  67488. tokens.push({
  67489. string : words[i],
  67490. regex : new RegExp(regex, 'i')
  67491. });
  67492. }
  67493. return tokens;
  67494. };
  67495. /**
  67496. * Iterates over arrays and hashes.
  67497. *
  67498. * ```
  67499. * this.iterator(this.items, function(item, id) {
  67500. * // invoked for each item
  67501. * });
  67502. * ```
  67503. *
  67504. * @param {array|object} object
  67505. */
  67506. Sifter.prototype.iterator = function(object, callback) {
  67507. var iterator;
  67508. if (is_array(object)) {
  67509. iterator = Array.prototype.forEach || function(callback) {
  67510. for (var i = 0, n = this.length; i < n; i++) {
  67511. callback(this[i], i, this);
  67512. }
  67513. };
  67514. } else {
  67515. iterator = function(callback) {
  67516. for (var key in this) {
  67517. if (this.hasOwnProperty(key)) {
  67518. callback(this[key], key, this);
  67519. }
  67520. }
  67521. };
  67522. }
  67523. iterator.apply(object, [callback]);
  67524. };
  67525. /**
  67526. * Returns a function to be used to score individual results.
  67527. *
  67528. * Good matches will have a higher score than poor matches.
  67529. * If an item is not a match, 0 will be returned by the function.
  67530. *
  67531. * @param {object|string} search
  67532. * @param {object} options (optional)
  67533. * @returns {function}
  67534. */
  67535. Sifter.prototype.getScoreFunction = function(search, options) {
  67536. var self, fields, tokens, token_count, nesting;
  67537. self = this;
  67538. search = self.prepareSearch(search, options);
  67539. tokens = search.tokens;
  67540. fields = search.options.fields;
  67541. token_count = tokens.length;
  67542. nesting = search.options.nesting;
  67543. /**
  67544. * Calculates how close of a match the
  67545. * given value is against a search token.
  67546. *
  67547. * @param {mixed} value
  67548. * @param {object} token
  67549. * @return {number}
  67550. */
  67551. var scoreValue = function(value, token) {
  67552. var score, pos;
  67553. if (!value) return 0;
  67554. value = String(value || '');
  67555. pos = value.search(token.regex);
  67556. if (pos === -1) return 0;
  67557. score = token.string.length / value.length;
  67558. if (pos === 0) score += 0.5;
  67559. return score;
  67560. };
  67561. /**
  67562. * Calculates the score of an object
  67563. * against the search query.
  67564. *
  67565. * @param {object} token
  67566. * @param {object} data
  67567. * @return {number}
  67568. */
  67569. var scoreObject = (function() {
  67570. var field_count = fields.length;
  67571. if (!field_count) {
  67572. return function() { return 0; };
  67573. }
  67574. if (field_count === 1) {
  67575. return function(token, data) {
  67576. return scoreValue(getattr(data, fields[0], nesting), token);
  67577. };
  67578. }
  67579. return function(token, data) {
  67580. for (var i = 0, sum = 0; i < field_count; i++) {
  67581. sum += scoreValue(getattr(data, fields[i], nesting), token);
  67582. }
  67583. return sum / field_count;
  67584. };
  67585. })();
  67586. if (!token_count) {
  67587. return function() { return 0; };
  67588. }
  67589. if (token_count === 1) {
  67590. return function(data) {
  67591. return scoreObject(tokens[0], data);
  67592. };
  67593. }
  67594. if (search.options.conjunction === 'and') {
  67595. return function(data) {
  67596. var score;
  67597. for (var i = 0, sum = 0; i < token_count; i++) {
  67598. score = scoreObject(tokens[i], data);
  67599. if (score <= 0) return 0;
  67600. sum += score;
  67601. }
  67602. return sum / token_count;
  67603. };
  67604. } else {
  67605. return function(data) {
  67606. for (var i = 0, sum = 0; i < token_count; i++) {
  67607. sum += scoreObject(tokens[i], data);
  67608. }
  67609. return sum / token_count;
  67610. };
  67611. }
  67612. };
  67613. /**
  67614. * Returns a function that can be used to compare two
  67615. * results, for sorting purposes. If no sorting should
  67616. * be performed, `null` will be returned.
  67617. *
  67618. * @param {string|object} search
  67619. * @param {object} options
  67620. * @return function(a,b)
  67621. */
  67622. Sifter.prototype.getSortFunction = function(search, options) {
  67623. var i, n, self, field, fields, fields_count, multiplier, multipliers, get_field, implicit_score, sort;
  67624. self = this;
  67625. search = self.prepareSearch(search, options);
  67626. sort = (!search.query && options.sort_empty) || options.sort;
  67627. /**
  67628. * Fetches the specified sort field value
  67629. * from a search result item.
  67630. *
  67631. * @param {string} name
  67632. * @param {object} result
  67633. * @return {mixed}
  67634. */
  67635. get_field = function(name, result) {
  67636. if (name === '$score') return result.score;
  67637. return getattr(self.items[result.id], name, options.nesting);
  67638. };
  67639. // parse options
  67640. fields = [];
  67641. if (sort) {
  67642. for (i = 0, n = sort.length; i < n; i++) {
  67643. if (search.query || sort[i].field !== '$score') {
  67644. fields.push(sort[i]);
  67645. }
  67646. }
  67647. }
  67648. // the "$score" field is implied to be the primary
  67649. // sort field, unless it's manually specified
  67650. if (search.query) {
  67651. implicit_score = true;
  67652. for (i = 0, n = fields.length; i < n; i++) {
  67653. if (fields[i].field === '$score') {
  67654. implicit_score = false;
  67655. break;
  67656. }
  67657. }
  67658. if (implicit_score) {
  67659. fields.unshift({field: '$score', direction: 'desc'});
  67660. }
  67661. } else {
  67662. for (i = 0, n = fields.length; i < n; i++) {
  67663. if (fields[i].field === '$score') {
  67664. fields.splice(i, 1);
  67665. break;
  67666. }
  67667. }
  67668. }
  67669. multipliers = [];
  67670. for (i = 0, n = fields.length; i < n; i++) {
  67671. multipliers.push(fields[i].direction === 'desc' ? -1 : 1);
  67672. }
  67673. // build function
  67674. fields_count = fields.length;
  67675. if (!fields_count) {
  67676. return null;
  67677. } else if (fields_count === 1) {
  67678. field = fields[0].field;
  67679. multiplier = multipliers[0];
  67680. return function(a, b) {
  67681. return multiplier * cmp(
  67682. get_field(field, a),
  67683. get_field(field, b)
  67684. );
  67685. };
  67686. } else {
  67687. return function(a, b) {
  67688. var i, result, a_value, b_value, field;
  67689. for (i = 0; i < fields_count; i++) {
  67690. field = fields[i].field;
  67691. result = multipliers[i] * cmp(
  67692. get_field(field, a),
  67693. get_field(field, b)
  67694. );
  67695. if (result) return result;
  67696. }
  67697. return 0;
  67698. };
  67699. }
  67700. };
  67701. /**
  67702. * Parses a search query and returns an object
  67703. * with tokens and fields ready to be populated
  67704. * with results.
  67705. *
  67706. * @param {string} query
  67707. * @param {object} options
  67708. * @returns {object}
  67709. */
  67710. Sifter.prototype.prepareSearch = function(query, options) {
  67711. if (typeof query === 'object') return query;
  67712. options = extend({}, options);
  67713. var option_fields = options.fields;
  67714. var option_sort = options.sort;
  67715. var option_sort_empty = options.sort_empty;
  67716. if (option_fields && !is_array(option_fields)) options.fields = [option_fields];
  67717. if (option_sort && !is_array(option_sort)) options.sort = [option_sort];
  67718. if (option_sort_empty && !is_array(option_sort_empty)) options.sort_empty = [option_sort_empty];
  67719. return {
  67720. options : options,
  67721. query : String(query || '').toLowerCase(),
  67722. tokens : this.tokenize(query),
  67723. total : 0,
  67724. items : []
  67725. };
  67726. };
  67727. /**
  67728. * Searches through all items and returns a sorted array of matches.
  67729. *
  67730. * The `options` parameter can contain:
  67731. *
  67732. * - fields {string|array}
  67733. * - sort {array}
  67734. * - score {function}
  67735. * - filter {bool}
  67736. * - limit {integer}
  67737. *
  67738. * Returns an object containing:
  67739. *
  67740. * - options {object}
  67741. * - query {string}
  67742. * - tokens {array}
  67743. * - total {int}
  67744. * - items {array}
  67745. *
  67746. * @param {string} query
  67747. * @param {object} options
  67748. * @returns {object}
  67749. */
  67750. Sifter.prototype.search = function(query, options) {
  67751. var self = this, value, score, search, calculateScore;
  67752. var fn_sort;
  67753. var fn_score;
  67754. search = this.prepareSearch(query, options);
  67755. options = search.options;
  67756. query = search.query;
  67757. // generate result scoring function
  67758. fn_score = options.score || self.getScoreFunction(search);
  67759. // perform search and sort
  67760. if (query.length) {
  67761. self.iterator(self.items, function(item, id) {
  67762. score = fn_score(item);
  67763. if (options.filter === false || score > 0) {
  67764. search.items.push({'score': score, 'id': id});
  67765. }
  67766. });
  67767. } else {
  67768. self.iterator(self.items, function(item, id) {
  67769. search.items.push({'score': 1, 'id': id});
  67770. });
  67771. }
  67772. fn_sort = self.getSortFunction(search, options);
  67773. if (fn_sort) search.items.sort(fn_sort);
  67774. // apply limits
  67775. search.total = search.items.length;
  67776. if (typeof options.limit === 'number') {
  67777. search.items = search.items.slice(0, options.limit);
  67778. }
  67779. return search;
  67780. };
  67781. // utilities
  67782. // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  67783. var cmp = function(a, b) {
  67784. if (typeof a === 'number' && typeof b === 'number') {
  67785. return a > b ? 1 : (a < b ? -1 : 0);
  67786. }
  67787. a = asciifold(String(a || ''));
  67788. b = asciifold(String(b || ''));
  67789. if (a > b) return 1;
  67790. if (b > a) return -1;
  67791. return 0;
  67792. };
  67793. var extend = function(a, b) {
  67794. var i, n, k, object;
  67795. for (i = 1, n = arguments.length; i < n; i++) {
  67796. object = arguments[i];
  67797. if (!object) continue;
  67798. for (k in object) {
  67799. if (object.hasOwnProperty(k)) {
  67800. a[k] = object[k];
  67801. }
  67802. }
  67803. }
  67804. return a;
  67805. };
  67806. /**
  67807. * A property getter resolving dot-notation
  67808. * @param {Object} obj The root object to fetch property on
  67809. * @param {String} name The optionally dotted property name to fetch
  67810. * @param {Boolean} nesting Handle nesting or not
  67811. * @return {Object} The resolved property value
  67812. */
  67813. var getattr = function(obj, name, nesting) {
  67814. if (!obj || !name) return;
  67815. if (!nesting) return obj[name];
  67816. var names = name.split(".");
  67817. while(names.length && (obj = obj[names.shift()]));
  67818. return obj;
  67819. };
  67820. var trim = function(str) {
  67821. return (str + '').replace(/^\s+|\s+$|/g, '');
  67822. };
  67823. var escape_regex = function(str) {
  67824. return (str + '').replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1');
  67825. };
  67826. var is_array = Array.isArray || (typeof $ !== 'undefined' && $.isArray) || function(object) {
  67827. return Object.prototype.toString.call(object) === '[object Array]';
  67828. };
  67829. var DIACRITICS = {
  67830. 'a': '[aḀḁĂăÂâǍǎȺⱥȦȧẠạÄäÀàÁáĀāÃãÅåąĄÃąĄ]',
  67831. 'b': '[b␢βΒB฿𐌁ᛒ]',
  67832. 'c': '[cĆćĈĉČčĊċC̄c̄ÇçḈḉȻȼƇƈɕᴄCc]',
  67833. 'd': '[dĎďḊḋḐḑḌḍḒḓḎḏĐđD̦d̦ƉɖƊɗƋƌᵭᶁᶑȡᴅDdð]',
  67834. 'e': '[eÉéÈèÊêḘḙĚěĔĕẼẽḚḛẺẻĖėËëĒēȨȩĘęᶒɆɇȄȅẾếỀềỄễỂểḜḝḖḗḔḕȆȇẸẹỆệⱸᴇEeɘǝƏƐε]',
  67835. 'f': '[fƑƒḞḟ]',
  67836. 'g': '[gɢ₲ǤǥĜĝĞğĢģƓɠĠġ]',
  67837. 'h': '[hĤĥĦħḨḩẖẖḤḥḢḣɦʰǶƕ]',
  67838. 'i': '[iÍíÌìĬĭÎîǏǐÏïḮḯĨĩĮįĪīỈỉȈȉȊȋỊịḬḭƗɨɨ̆ᵻᶖİiIıɪIi]',
  67839. 'j': '[jȷĴĵɈɉʝɟʲ]',
  67840. 'k': '[kƘƙꝀꝁḰḱǨǩḲḳḴḵκϰ₭]',
  67841. 'l': '[lŁłĽľĻļĹĺḶḷḸḹḼḽḺḻĿŀȽƚⱠⱡⱢɫɬᶅɭȴʟLl]',
  67842. 'n': '[nŃńǸǹŇňÑñṄṅŅņṆṇṊṋṈṉN̈n̈ƝɲȠƞᵰᶇɳȵɴNnŊŋ]',
  67843. 'o': '[oØøÖöÓóÒòÔôǑǒŐőŎŏȮȯỌọƟɵƠơỎỏŌōÕõǪǫȌȍՕօ]',
  67844. 'p': '[pṔṕṖṗⱣᵽƤƥᵱ]',
  67845. 'q': '[qꝖꝗʠɊɋꝘꝙq̃]',
  67846. 'r': '[rŔŕɌɍŘřŖŗṘṙȐȑȒȓṚṛⱤɽ]',
  67847. 's': '[sŚśṠṡṢṣꞨꞩŜŝŠšŞşȘșS̈s̈]',
  67848. 't': '[tŤťṪṫŢţṬṭƮʈȚțṰṱṮṯƬƭ]',
  67849. 'u': '[uŬŭɄʉỤụÜüÚúÙùÛûǓǔŰűŬŭƯưỦủŪūŨũŲųȔȕ∪]',
  67850. 'v': '[vṼṽṾṿƲʋꝞꝟⱱʋ]',
  67851. 'w': '[wẂẃẀẁŴŵẄẅẆẇẈẉ]',
  67852. 'x': '[xẌẍẊẋχ]',
  67853. 'y': '[yÝýỲỳŶŷŸÿỸỹẎẏỴỵɎɏƳƴ]',
  67854. 'z': '[zŹźẐẑŽžŻżẒẓẔẕƵƶ]'
  67855. };
  67856. var asciifold = (function() {
  67857. var i, n, k, chunk;
  67858. var foreignletters = '';
  67859. var lookup = {};
  67860. for (k in DIACRITICS) {
  67861. if (DIACRITICS.hasOwnProperty(k)) {
  67862. chunk = DIACRITICS[k].substring(2, DIACRITICS[k].length - 1);
  67863. foreignletters += chunk;
  67864. for (i = 0, n = chunk.length; i < n; i++) {
  67865. lookup[chunk.charAt(i)] = k;
  67866. }
  67867. }
  67868. }
  67869. var regexp = new RegExp('[' + foreignletters + ']', 'g');
  67870. return function(str) {
  67871. return str.replace(regexp, function(foreignletter) {
  67872. return lookup[foreignletter];
  67873. }).toLowerCase();
  67874. };
  67875. })();
  67876. // export
  67877. // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  67878. return Sifter;
  67879. }));
  67880. /***/ }),
  67881. /***/ 85766:
  67882. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  67883. /**
  67884. * SimpleBar.js - v5.3.6
  67885. * Scrollbars, simpler.
  67886. * https://grsmto.github.io/simplebar/
  67887. *
  67888. * Made by Adrien Denat from a fork by Jonathan Nicol
  67889. * Under MIT License
  67890. */
  67891. !function(t,e){ true?module.exports=e():0}(this,(function(){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{};function e(t,e){return t(e={exports:{}},e.exports),e.exports}var r,i,n,o="object",s=function(t){return t&&t.Math==Math&&t},a=s(typeof globalThis==o&&globalThis)||s(typeof window==o&&window)||s(typeof self==o&&self)||s(typeof t==o&&t)||Function("return this")(),c=function(t){try{return!!t()}catch(t){return!0}},l=!c((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})),u={}.propertyIsEnumerable,f=Object.getOwnPropertyDescriptor,h={f:f&&!u.call({1:2},1)?function(t){var e=f(this,t);return!!e&&e.enumerable}:u},d=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},p={}.toString,v=function(t){return p.call(t).slice(8,-1)},g="".split,b=c((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==v(t)?g.call(t,""):Object(t)}:Object,y=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},m=function(t){return b(y(t))},x=function(t){return"object"==typeof t?null!==t:"function"==typeof t},E=function(t,e){if(!x(t))return t;var r,i;if(e&&"function"==typeof(r=t.toString)&&!x(i=r.call(t)))return i;if("function"==typeof(r=t.valueOf)&&!x(i=r.call(t)))return i;if(!e&&"function"==typeof(r=t.toString)&&!x(i=r.call(t)))return i;throw TypeError("Can't convert object to primitive value")},w={}.hasOwnProperty,S=function(t,e){return w.call(t,e)},O=a.document,k=x(O)&&x(O.createElement),A=function(t){return k?O.createElement(t):{}},T=!l&&!c((function(){return 7!=Object.defineProperty(A("div"),"a",{get:function(){return 7}}).a})),L=Object.getOwnPropertyDescriptor,z={f:l?L:function(t,e){if(t=m(t),e=E(e,!0),T)try{return L(t,e)}catch(t){}if(S(t,e))return d(!h.f.call(t,e),t[e])}},R=function(t){if(!x(t))throw TypeError(String(t)+" is not an object");return t},_=Object.defineProperty,M={f:l?_:function(t,e,r){if(R(t),e=E(e,!0),R(r),T)try{return _(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}},C=l?function(t,e,r){return M.f(t,e,d(1,r))}:function(t,e,r){return t[e]=r,t},W=function(t,e){try{C(a,t,e)}catch(r){a[t]=e}return e},j=e((function(t){var e=a["__core-js_shared__"]||W("__core-js_shared__",{});(t.exports=function(t,r){return e[t]||(e[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.2.1",mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})})),N=j("native-function-to-string",Function.toString),I=a.WeakMap,B="function"==typeof I&&/native code/.test(N.call(I)),D=0,P=Math.random(),F=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++D+P).toString(36)},V=j("keys"),X=function(t){return V[t]||(V[t]=F(t))},H={},q=a.WeakMap;if(B){var $=new q,Y=$.get,G=$.has,U=$.set;r=function(t,e){return U.call($,t,e),e},i=function(t){return Y.call($,t)||{}},n=function(t){return G.call($,t)}}else{var Q=X("state");H[Q]=!0,r=function(t,e){return C(t,Q,e),e},i=function(t){return S(t,Q)?t[Q]:{}},n=function(t){return S(t,Q)}}var K={set:r,get:i,has:n,enforce:function(t){return n(t)?i(t):r(t,{})},getterFor:function(t){return function(e){var r;if(!x(e)||(r=i(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},J=e((function(t){var e=K.get,r=K.enforce,i=String(N).split("toString");j("inspectSource",(function(t){return N.call(t)})),(t.exports=function(t,e,n,o){var s=!!o&&!!o.unsafe,c=!!o&&!!o.enumerable,l=!!o&&!!o.noTargetGet;"function"==typeof n&&("string"!=typeof e||S(n,"name")||C(n,"name",e),r(n).source=i.join("string"==typeof e?e:"")),t!==a?(s?!l&&t[e]&&(c=!0):delete t[e],c?t[e]=n:C(t,e,n)):c?t[e]=n:W(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||N.call(this)}))})),Z=a,tt=function(t){return"function"==typeof t?t:void 0},et=function(t,e){return arguments.length<2?tt(Z[t])||tt(a[t]):Z[t]&&Z[t][e]||a[t]&&a[t][e]},rt=Math.ceil,it=Math.floor,nt=function(t){return isNaN(t=+t)?0:(t>0?it:rt)(t)},ot=Math.min,st=function(t){return t>0?ot(nt(t),9007199254740991):0},at=Math.max,ct=Math.min,lt=function(t){return function(e,r,i){var n,o=m(e),s=st(o.length),a=function(t,e){var r=nt(t);return r<0?at(r+e,0):ct(r,e)}(i,s);if(t&&r!=r){for(;s>a;)if((n=o[a++])!=n)return!0}else for(;s>a;a++)if((t||a in o)&&o[a]===r)return t||a||0;return!t&&-1}},ut={includes:lt(!0),indexOf:lt(!1)}.indexOf,ft=function(t,e){var r,i=m(t),n=0,o=[];for(r in i)!S(H,r)&&S(i,r)&&o.push(r);for(;e.length>n;)S(i,r=e[n++])&&(~ut(o,r)||o.push(r));return o},ht=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],dt=ht.concat("length","prototype"),pt={f:Object.getOwnPropertyNames||function(t){return ft(t,dt)}},vt={f:Object.getOwnPropertySymbols},gt=et("Reflect","ownKeys")||function(t){var e=pt.f(R(t)),r=vt.f;return r?e.concat(r(t)):e},bt=function(t,e){for(var r=gt(e),i=M.f,n=z.f,o=0;o<r.length;o++){var s=r[o];S(t,s)||i(t,s,n(e,s))}},yt=/#|\.prototype\./,mt=function(t,e){var r=Et[xt(t)];return r==St||r!=wt&&("function"==typeof e?c(e):!!e)},xt=mt.normalize=function(t){return String(t).replace(yt,".").toLowerCase()},Et=mt.data={},wt=mt.NATIVE="N",St=mt.POLYFILL="P",Ot=mt,kt=z.f,At=function(t,e){var r,i,n,o,s,c=t.target,l=t.global,u=t.stat;if(r=l?a:u?a[c]||W(c,{}):(a[c]||{}).prototype)for(i in e){if(o=e[i],n=t.noTargetGet?(s=kt(r,i))&&s.value:r[i],!Ot(l?i:c+(u?".":"#")+i,t.forced)&&void 0!==n){if(typeof o==typeof n)continue;bt(o,n)}(t.sham||n&&n.sham)&&C(o,"sham",!0),J(r,i,o,t)}},Tt=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},Lt=function(t,e,r){if(Tt(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,i){return t.call(e,r,i)};case 3:return function(r,i,n){return t.call(e,r,i,n)}}return function(){return t.apply(e,arguments)}},zt=function(t){return Object(y(t))},Rt=Array.isArray||function(t){return"Array"==v(t)},_t=!!Object.getOwnPropertySymbols&&!c((function(){return!String(Symbol())})),Mt=a.Symbol,Ct=j("wks"),Wt=function(t){return Ct[t]||(Ct[t]=_t&&Mt[t]||(_t?Mt:F)("Symbol."+t))},jt=Wt("species"),Nt=function(t,e){var r;return Rt(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!Rt(r.prototype)?x(r)&&null===(r=r[jt])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===e?0:e)},It=[].push,Bt=function(t){var e=1==t,r=2==t,i=3==t,n=4==t,o=6==t,s=5==t||o;return function(a,c,l,u){for(var f,h,d=zt(a),p=b(d),v=Lt(c,l,3),g=st(p.length),y=0,m=u||Nt,x=e?m(a,g):r?m(a,0):void 0;g>y;y++)if((s||y in p)&&(h=v(f=p[y],y,d),t))if(e)x[y]=h;else if(h)switch(t){case 3:return!0;case 5:return f;case 6:return y;case 2:It.call(x,f)}else if(n)return!1;return o?-1:i||n?n:x}},Dt={forEach:Bt(0),map:Bt(1),filter:Bt(2),some:Bt(3),every:Bt(4),find:Bt(5),findIndex:Bt(6)},Pt=function(t,e){var r=[][t];return!r||!c((function(){r.call(null,e||function(){throw 1},1)}))},Ft=Dt.forEach,Vt=Pt("forEach")?function(t){return Ft(this,t,arguments.length>1?arguments[1]:void 0)}:[].forEach;At({target:"Array",proto:!0,forced:[].forEach!=Vt},{forEach:Vt});var Xt={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 Ht in Xt){var qt=a[Ht],$t=qt&&qt.prototype;if($t&&$t.forEach!==Vt)try{C($t,"forEach",Vt)}catch(t){$t.forEach=Vt}}var Yt=!("undefined"==typeof window||!window.document||!window.document.createElement),Gt=Wt("species"),Ut=Dt.filter;At({target:"Array",proto:!0,forced:!function(t){return!c((function(){var e=[];return(e.constructor={})[Gt]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}("filter")},{filter:function(t){return Ut(this,t,arguments.length>1?arguments[1]:void 0)}});var Qt=Object.keys||function(t){return ft(t,ht)},Kt=l?Object.defineProperties:function(t,e){R(t);for(var r,i=Qt(e),n=i.length,o=0;n>o;)M.f(t,r=i[o++],e[r]);return t},Jt=et("document","documentElement"),Zt=X("IE_PROTO"),te=function(){},ee=function(){var t,e=A("iframe"),r=ht.length;for(e.style.display="none",Jt.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),ee=t.F;r--;)delete ee.prototype[ht[r]];return ee()},re=Object.create||function(t,e){var r;return null!==t?(te.prototype=R(t),r=new te,te.prototype=null,r[Zt]=t):r=ee(),void 0===e?r:Kt(r,e)};H[Zt]=!0;var ie=Wt("unscopables"),ne=Array.prototype;null==ne[ie]&&C(ne,ie,re(null));var oe,se,ae,ce=function(t){ne[ie][t]=!0},le={},ue=!c((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),fe=X("IE_PROTO"),he=Object.prototype,de=ue?Object.getPrototypeOf:function(t){return t=zt(t),S(t,fe)?t[fe]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?he:null},pe=Wt("iterator"),ve=!1;[].keys&&("next"in(ae=[].keys())?(se=de(de(ae)))!==Object.prototype&&(oe=se):ve=!0),null==oe&&(oe={}),S(oe,pe)||C(oe,pe,(function(){return this}));var ge={IteratorPrototype:oe,BUGGY_SAFARI_ITERATORS:ve},be=M.f,ye=Wt("toStringTag"),me=function(t,e,r){t&&!S(t=r?t:t.prototype,ye)&&be(t,ye,{configurable:!0,value:e})},xe=ge.IteratorPrototype,Ee=function(){return this},we=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,i){return R(r),function(t){if(!x(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(i),e?t.call(r,i):r.__proto__=i,r}}():void 0),Se=ge.IteratorPrototype,Oe=ge.BUGGY_SAFARI_ITERATORS,ke=Wt("iterator"),Ae=function(){return this},Te=function(t,e,r,i,n,o,s){!function(t,e,r){var i=e+" Iterator";t.prototype=re(xe,{next:d(1,r)}),me(t,i,!1),le[i]=Ee}(r,e,i);var a,c,l,u=function(t){if(t===n&&g)return g;if(!Oe&&t in p)return p[t];switch(t){case"keys":case"values":case"entries":return function(){return new r(this,t)}}return function(){return new r(this)}},f=e+" Iterator",h=!1,p=t.prototype,v=p[ke]||p["@@iterator"]||n&&p[n],g=!Oe&&v||u(n),b="Array"==e&&p.entries||v;if(b&&(a=de(b.call(new t)),Se!==Object.prototype&&a.next&&(de(a)!==Se&&(we?we(a,Se):"function"!=typeof a[ke]&&C(a,ke,Ae)),me(a,f,!0))),"values"==n&&v&&"values"!==v.name&&(h=!0,g=function(){return v.call(this)}),p[ke]!==g&&C(p,ke,g),le[e]=g,n)if(c={values:u("values"),keys:o?g:u("keys"),entries:u("entries")},s)for(l in c)!Oe&&!h&&l in p||J(p,l,c[l]);else At({target:e,proto:!0,forced:Oe||h},c);return c},Le=K.set,ze=K.getterFor("Array Iterator"),Re=Te(Array,"Array",(function(t,e){Le(this,{type:"Array Iterator",target:m(t),index:0,kind:e})}),(function(){var t=ze(this),e=t.target,r=t.kind,i=t.index++;return!e||i>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:i,done:!1}:"values"==r?{value:e[i],done:!1}:{value:[i,e[i]],done:!1}}),"values");le.Arguments=le.Array,ce("keys"),ce("values"),ce("entries");var _e=Object.assign,Me=!_e||c((function(){var t={},e={},r=Symbol();return t[r]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=_e({},t)[r]||"abcdefghijklmnopqrst"!=Qt(_e({},e)).join("")}))?function(t,e){for(var r=zt(t),i=arguments.length,n=1,o=vt.f,s=h.f;i>n;)for(var a,c=b(arguments[n++]),u=o?Qt(c).concat(o(c)):Qt(c),f=u.length,d=0;f>d;)a=u[d++],l&&!s.call(c,a)||(r[a]=c[a]);return r}:_e;At({target:"Object",stat:!0,forced:Object.assign!==Me},{assign:Me});var Ce=Wt("toStringTag"),We="Arguments"==v(function(){return arguments}()),je=function(t){var e,r,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),Ce))?r:We?v(e):"Object"==(i=v(e))&&"function"==typeof e.callee?"Arguments":i},Ne={};Ne[Wt("toStringTag")]="z";var Ie="[object z]"!==String(Ne)?function(){return"[object "+je(this)+"]"}:Ne.toString,Be=Object.prototype;Ie!==Be.toString&&J(Be,"toString",Ie,{unsafe:!0});var De="\t\n\v\f\r                 \u2028\u2029\ufeff",Pe="["+De+"]",Fe=RegExp("^"+Pe+Pe+"*"),Ve=RegExp(Pe+Pe+"*$"),Xe=function(t){return function(e){var r=String(y(e));return 1&t&&(r=r.replace(Fe,"")),2&t&&(r=r.replace(Ve,"")),r}},He={start:Xe(1),end:Xe(2),trim:Xe(3)}.trim,qe=a.parseInt,$e=/^[+-]?0[Xx]/,Ye=8!==qe(De+"08")||22!==qe(De+"0x16")?function(t,e){var r=He(String(t));return qe(r,e>>>0||($e.test(r)?16:10))}:qe;At({global:!0,forced:parseInt!=Ye},{parseInt:Ye});var Ge=function(t){return function(e,r){var i,n,o=String(y(e)),s=nt(r),a=o.length;return s<0||s>=a?t?"":void 0:(i=o.charCodeAt(s))<55296||i>56319||s+1===a||(n=o.charCodeAt(s+1))<56320||n>57343?t?o.charAt(s):i:t?o.slice(s,s+2):n-56320+(i-55296<<10)+65536}},Ue={codeAt:Ge(!1),charAt:Ge(!0)},Qe=Ue.charAt,Ke=K.set,Je=K.getterFor("String Iterator");Te(String,"String",(function(t){Ke(this,{type:"String Iterator",string:String(t),index:0})}),(function(){var t,e=Je(this),r=e.string,i=e.index;return i>=r.length?{value:void 0,done:!0}:(t=Qe(r,i),e.index+=t.length,{value:t,done:!1})}));var Ze=function(t,e,r){for(var i in e)J(t,i,e[i],r);return t},tr=!c((function(){return Object.isExtensible(Object.preventExtensions({}))})),er=e((function(t){var e=M.f,r=F("meta"),i=0,n=Object.isExtensible||function(){return!0},o=function(t){e(t,r,{value:{objectID:"O"+ ++i,weakData:{}}})},s=t.exports={REQUIRED:!1,fastKey:function(t,e){if(!x(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!S(t,r)){if(!n(t))return"F";if(!e)return"E";o(t)}return t[r].objectID},getWeakData:function(t,e){if(!S(t,r)){if(!n(t))return!0;if(!e)return!1;o(t)}return t[r].weakData},onFreeze:function(t){return tr&&s.REQUIRED&&n(t)&&!S(t,r)&&o(t),t}};H[r]=!0})),rr=(er.REQUIRED,er.fastKey,er.getWeakData,er.onFreeze,Wt("iterator")),ir=Array.prototype,nr=Wt("iterator"),or=function(t,e,r,i){try{return i?e(R(r)[0],r[1]):e(r)}catch(e){var n=t.return;throw void 0!==n&&R(n.call(t)),e}},sr=e((function(t){var e=function(t,e){this.stopped=t,this.result=e};(t.exports=function(t,r,i,n,o){var s,a,c,l,u,f,h,d=Lt(r,i,n?2:1);if(o)s=t;else{if("function"!=typeof(a=function(t){if(null!=t)return t[nr]||t["@@iterator"]||le[je(t)]}(t)))throw TypeError("Target is not iterable");if(void 0!==(h=a)&&(le.Array===h||ir[rr]===h)){for(c=0,l=st(t.length);l>c;c++)if((u=n?d(R(f=t[c])[0],f[1]):d(t[c]))&&u instanceof e)return u;return new e(!1)}s=a.call(t)}for(;!(f=s.next()).done;)if((u=or(s,d,f.value,n))&&u instanceof e)return u;return new e(!1)}).stop=function(t){return new e(!0,t)}})),ar=function(t,e,r){if(!(t instanceof e))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return t},cr=Wt("iterator"),lr=!1;try{var ur=0,fr={next:function(){return{done:!!ur++}},return:function(){lr=!0}};fr[cr]=function(){return this},Array.from(fr,(function(){throw 2}))}catch(t){}var hr=function(t,e,r,i,n){var o=a[t],s=o&&o.prototype,l=o,u=i?"set":"add",f={},h=function(t){var e=s[t];J(s,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(n&&!x(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return n&&!x(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(n&&!x(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 o||!(n||s.forEach&&!c((function(){(new o).entries().next()})))))l=r.getConstructor(e,t,i,u),er.REQUIRED=!0;else if(Ot(t,!0)){var d=new l,p=d[u](n?{}:-0,1)!=d,v=c((function(){d.has(1)})),g=function(t,e){if(!e&&!lr)return!1;var r=!1;try{var i={};i[cr]=function(){return{next:function(){return{done:r=!0}}}},t(i)}catch(t){}return r}((function(t){new o(t)})),b=!n&&c((function(){for(var t=new o,e=5;e--;)t[u](e,e);return!t.has(-0)}));g||((l=e((function(e,r){ar(e,l,t);var n=function(t,e,r){var i,n;return we&&"function"==typeof(i=e.constructor)&&i!==r&&x(n=i.prototype)&&n!==r.prototype&&we(t,n),t}(new o,e,l);return null!=r&&sr(r,n[u],n,i),n}))).prototype=s,s.constructor=l),(v||b)&&(h("delete"),h("has"),i&&h("get")),(b||p)&&h(u),n&&s.clear&&delete s.clear}return f[t]=l,At({global:!0,forced:l!=o},f),me(l,t),n||r.setStrong(l,t,i),l},dr=er.getWeakData,pr=K.set,vr=K.getterFor,gr=Dt.find,br=Dt.findIndex,yr=0,mr=function(t){return t.frozen||(t.frozen=new xr)},xr=function(){this.entries=[]},Er=function(t,e){return gr(t.entries,(function(t){return t[0]===e}))};xr.prototype={get:function(t){var e=Er(this,t);if(e)return e[1]},has:function(t){return!!Er(this,t)},set:function(t,e){var r=Er(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=br(this.entries,(function(e){return e[0]===t}));return~e&&this.entries.splice(e,1),!!~e}};var wr={getConstructor:function(t,e,r,i){var n=t((function(t,o){ar(t,n,e),pr(t,{type:e,id:yr++,frozen:void 0}),null!=o&&sr(o,t[i],t,r)})),o=vr(e),s=function(t,e,r){var i=o(t),n=dr(R(e),!0);return!0===n?mr(i).set(e,r):n[i.id]=r,t};return Ze(n.prototype,{delete:function(t){var e=o(this);if(!x(t))return!1;var r=dr(t);return!0===r?mr(e).delete(t):r&&S(r,e.id)&&delete r[e.id]},has:function(t){var e=o(this);if(!x(t))return!1;var r=dr(t);return!0===r?mr(e).has(t):r&&S(r,e.id)}}),Ze(n.prototype,r?{get:function(t){var e=o(this);if(x(t)){var r=dr(t);return!0===r?mr(e).get(t):r?r[e.id]:void 0}},set:function(t,e){return s(this,t,e)}}:{add:function(t){return s(this,t,!0)}}),n}},Sr=(e((function(t){var e,r=K.enforce,i=!a.ActiveXObject&&"ActiveXObject"in a,n=Object.isExtensible,o=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},s=t.exports=hr("WeakMap",o,wr,!0,!0);if(B&&i){e=wr.getConstructor(o,"WeakMap",!0),er.REQUIRED=!0;var c=s.prototype,l=c.delete,u=c.has,f=c.get,h=c.set;Ze(c,{delete:function(t){if(x(t)&&!n(t)){var i=r(this);return i.frozen||(i.frozen=new e),l.call(this,t)||i.frozen.delete(t)}return l.call(this,t)},has:function(t){if(x(t)&&!n(t)){var i=r(this);return i.frozen||(i.frozen=new e),u.call(this,t)||i.frozen.has(t)}return u.call(this,t)},get:function(t){if(x(t)&&!n(t)){var i=r(this);return i.frozen||(i.frozen=new e),u.call(this,t)?f.call(this,t):i.frozen.get(t)}return f.call(this,t)},set:function(t,i){if(x(t)&&!n(t)){var o=r(this);o.frozen||(o.frozen=new e),u.call(this,t)?h.call(this,t,i):o.frozen.set(t,i)}else h.call(this,t,i);return this}})}})),Wt("iterator")),Or=Wt("toStringTag"),kr=Re.values;for(var Ar in Xt){var Tr=a[Ar],Lr=Tr&&Tr.prototype;if(Lr){if(Lr[Sr]!==kr)try{C(Lr,Sr,kr)}catch(t){Lr[Sr]=kr}if(Lr[Or]||C(Lr,Or,Ar),Xt[Ar])for(var zr in Re)if(Lr[zr]!==Re[zr])try{C(Lr,zr,Re[zr])}catch(t){Lr[zr]=Re[zr]}}}var Rr="Expected a function",_r=NaN,Mr="[object Symbol]",Cr=/^\s+|\s+$/g,Wr=/^[-+]0x[0-9a-f]+$/i,jr=/^0b[01]+$/i,Nr=/^0o[0-7]+$/i,Ir=parseInt,Br="object"==typeof t&&t&&t.Object===Object&&t,Dr="object"==typeof self&&self&&self.Object===Object&&self,Pr=Br||Dr||Function("return this")(),Fr=Object.prototype.toString,Vr=Math.max,Xr=Math.min,Hr=function(){return Pr.Date.now()};function qr(t,e,r){var i,n,o,s,a,c,l=0,u=!1,f=!1,h=!0;if("function"!=typeof t)throw new TypeError(Rr);function d(e){var r=i,o=n;return i=n=void 0,l=e,s=t.apply(o,r)}function p(t){var r=t-c;return void 0===c||r>=e||r<0||f&&t-l>=o}function v(){var t=Hr();if(p(t))return g(t);a=setTimeout(v,function(t){var r=e-(t-c);return f?Xr(r,o-(t-l)):r}(t))}function g(t){return a=void 0,h&&i?d(t):(i=n=void 0,s)}function b(){var t=Hr(),r=p(t);if(i=arguments,n=this,c=t,r){if(void 0===a)return function(t){return l=t,a=setTimeout(v,e),u?d(t):s}(c);if(f)return a=setTimeout(v,e),d(c)}return void 0===a&&(a=setTimeout(v,e)),s}return e=Yr(e)||0,$r(r)&&(u=!!r.leading,o=(f="maxWait"in r)?Vr(Yr(r.maxWait)||0,e):o,h="trailing"in r?!!r.trailing:h),b.cancel=function(){void 0!==a&&clearTimeout(a),l=0,i=c=n=a=void 0},b.flush=function(){return void 0===a?s:g(Hr())},b}function $r(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Yr(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&Fr.call(t)==Mr}(t))return _r;if($r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=$r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Cr,"");var r=jr.test(t);return r||Nr.test(t)?Ir(t.slice(2),r?2:8):Wr.test(t)?_r:+t}var Gr=function(t,e,r){var i=!0,n=!0;if("function"!=typeof t)throw new TypeError(Rr);return $r(r)&&(i="leading"in r?!!r.leading:i,n="trailing"in r?!!r.trailing:n),qr(t,e,{leading:i,maxWait:e,trailing:n})},Ur="Expected a function",Qr=NaN,Kr="[object Symbol]",Jr=/^\s+|\s+$/g,Zr=/^[-+]0x[0-9a-f]+$/i,ti=/^0b[01]+$/i,ei=/^0o[0-7]+$/i,ri=parseInt,ii="object"==typeof t&&t&&t.Object===Object&&t,ni="object"==typeof self&&self&&self.Object===Object&&self,oi=ii||ni||Function("return this")(),si=Object.prototype.toString,ai=Math.max,ci=Math.min,li=function(){return oi.Date.now()};function ui(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function fi(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&si.call(t)==Kr}(t))return Qr;if(ui(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=ui(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Jr,"");var r=ti.test(t);return r||ei.test(t)?ri(t.slice(2),r?2:8):Zr.test(t)?Qr:+t}var hi=function(t,e,r){var i,n,o,s,a,c,l=0,u=!1,f=!1,h=!0;if("function"!=typeof t)throw new TypeError(Ur);function d(e){var r=i,o=n;return i=n=void 0,l=e,s=t.apply(o,r)}function p(t){var r=t-c;return void 0===c||r>=e||r<0||f&&t-l>=o}function v(){var t=li();if(p(t))return g(t);a=setTimeout(v,function(t){var r=e-(t-c);return f?ci(r,o-(t-l)):r}(t))}function g(t){return a=void 0,h&&i?d(t):(i=n=void 0,s)}function b(){var t=li(),r=p(t);if(i=arguments,n=this,c=t,r){if(void 0===a)return function(t){return l=t,a=setTimeout(v,e),u?d(t):s}(c);if(f)return a=setTimeout(v,e),d(c)}return void 0===a&&(a=setTimeout(v,e)),s}return e=fi(e)||0,ui(r)&&(u=!!r.leading,o=(f="maxWait"in r)?ai(fi(r.maxWait)||0,e):o,h="trailing"in r?!!r.trailing:h),b.cancel=function(){void 0!==a&&clearTimeout(a),l=0,i=c=n=a=void 0},b.flush=function(){return void 0===a?s:g(li())},b},di="Expected a function",pi="__lodash_hash_undefined__",vi="[object Function]",gi="[object GeneratorFunction]",bi=/^\[object .+?Constructor\]$/,yi="object"==typeof t&&t&&t.Object===Object&&t,mi="object"==typeof self&&self&&self.Object===Object&&self,xi=yi||mi||Function("return this")();var Ei=Array.prototype,wi=Function.prototype,Si=Object.prototype,Oi=xi["__core-js_shared__"],ki=function(){var t=/[^.]+$/.exec(Oi&&Oi.keys&&Oi.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Ai=wi.toString,Ti=Si.hasOwnProperty,Li=Si.toString,zi=RegExp("^"+Ai.call(Ti).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ri=Ei.splice,_i=Di(xi,"Map"),Mi=Di(Object,"create");function Ci(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}function Wi(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}function ji(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}function Ni(t,e){for(var r,i,n=t.length;n--;)if((r=t[n][0])===(i=e)||r!=r&&i!=i)return n;return-1}function Ii(t){return!(!Fi(t)||(e=t,ki&&ki in e))&&(function(t){var e=Fi(t)?Li.call(t):"";return e==vi||e==gi}(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t)?zi:bi).test(function(t){if(null!=t){try{return Ai.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e}function Bi(t,e){var r,i,n=t.__data__;return("string"==(i=typeof(r=e))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==r:null===r)?n["string"==typeof e?"string":"hash"]:n.map}function Di(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return Ii(r)?r:void 0}function Pi(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError(di);var r=function(){var i=arguments,n=e?e.apply(this,i):i[0],o=r.cache;if(o.has(n))return o.get(n);var s=t.apply(this,i);return r.cache=o.set(n,s),s};return r.cache=new(Pi.Cache||ji),r}function Fi(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}Ci.prototype.clear=function(){this.__data__=Mi?Mi(null):{}},Ci.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},Ci.prototype.get=function(t){var e=this.__data__;if(Mi){var r=e[t];return r===pi?void 0:r}return Ti.call(e,t)?e[t]:void 0},Ci.prototype.has=function(t){var e=this.__data__;return Mi?void 0!==e[t]:Ti.call(e,t)},Ci.prototype.set=function(t,e){return this.__data__[t]=Mi&&void 0===e?pi:e,this},Wi.prototype.clear=function(){this.__data__=[]},Wi.prototype.delete=function(t){var e=this.__data__,r=Ni(e,t);return!(r<0)&&(r==e.length-1?e.pop():Ri.call(e,r,1),!0)},Wi.prototype.get=function(t){var e=this.__data__,r=Ni(e,t);return r<0?void 0:e[r][1]},Wi.prototype.has=function(t){return Ni(this.__data__,t)>-1},Wi.prototype.set=function(t,e){var r=this.__data__,i=Ni(r,t);return i<0?r.push([t,e]):r[i][1]=e,this},ji.prototype.clear=function(){this.__data__={hash:new Ci,map:new(_i||Wi),string:new Ci}},ji.prototype.delete=function(t){return Bi(this,t).delete(t)},ji.prototype.get=function(t){return Bi(this,t).get(t)},ji.prototype.has=function(t){return Bi(this,t).has(t)},ji.prototype.set=function(t,e){return Bi(this,t).set(t,e),this},Pi.Cache=ji;var Vi,Xi=Pi,Hi=[],qi="ResizeObserver loop completed with undelivered notifications.";!function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(Vi||(Vi={}));var $i,Yi=function(t){return Object.freeze(t)},Gi=function(t,e){this.inlineSize=t,this.blockSize=e,Yi(this)},Ui=function(){function t(t,e,r,i){return this.x=t,this.y=e,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Yi(this)}return t.prototype.toJSON=function(){var t=this;return{x:t.x,y:t.y,top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),Qi=function(t){return t instanceof SVGElement&&"getBBox"in t},Ki=function(t){if(Qi(t)){var e=t.getBBox(),r=e.width,i=e.height;return!r&&!i}var n=t,o=n.offsetWidth,s=n.offsetHeight;return!(o||s||t.getClientRects().length)},Ji=function(t){var e,r;if(t instanceof Element)return!0;var i=null===(r=null===(e=t)||void 0===e?void 0:e.ownerDocument)||void 0===r?void 0:r.defaultView;return!!(i&&t instanceof i.Element)},Zi="undefined"!=typeof window?window:{},tn=new WeakMap,en=/auto|scroll/,rn=/^tb|vertical/,nn=/msie|trident/i.test(Zi.navigator&&Zi.navigator.userAgent),on=function(t){return parseFloat(t||"0")},sn=function(t,e,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=!1),new Gi((r?e:t)||0,(r?t:e)||0)},an=Yi({devicePixelContentBoxSize:sn(),borderBoxSize:sn(),contentBoxSize:sn(),contentRect:new Ui(0,0,0,0)}),cn=function(t,e){if(void 0===e&&(e=!1),tn.has(t)&&!e)return tn.get(t);if(Ki(t))return tn.set(t,an),an;var r=getComputedStyle(t),i=Qi(t)&&t.ownerSVGElement&&t.getBBox(),n=!nn&&"border-box"===r.boxSizing,o=rn.test(r.writingMode||""),s=!i&&en.test(r.overflowY||""),a=!i&&en.test(r.overflowX||""),c=i?0:on(r.paddingTop),l=i?0:on(r.paddingRight),u=i?0:on(r.paddingBottom),f=i?0:on(r.paddingLeft),h=i?0:on(r.borderTopWidth),d=i?0:on(r.borderRightWidth),p=i?0:on(r.borderBottomWidth),v=f+l,g=c+u,b=(i?0:on(r.borderLeftWidth))+d,y=h+p,m=a?t.offsetHeight-y-t.clientHeight:0,x=s?t.offsetWidth-b-t.clientWidth:0,E=n?v+b:0,w=n?g+y:0,S=i?i.width:on(r.width)-E-x,O=i?i.height:on(r.height)-w-m,k=S+v+x+b,A=O+g+m+y,T=Yi({devicePixelContentBoxSize:sn(Math.round(S*devicePixelRatio),Math.round(O*devicePixelRatio),o),borderBoxSize:sn(k,A,o),contentBoxSize:sn(S,O,o),contentRect:new Ui(f,c,S,O)});return tn.set(t,T),T},ln=function(t,e,r){var i=cn(t,r),n=i.borderBoxSize,o=i.contentBoxSize,s=i.devicePixelContentBoxSize;switch(e){case Vi.DEVICE_PIXEL_CONTENT_BOX:return s;case Vi.BORDER_BOX:return n;default:return o}},un=function(t){var e=cn(t);this.target=t,this.contentRect=e.contentRect,this.borderBoxSize=Yi([e.borderBoxSize]),this.contentBoxSize=Yi([e.contentBoxSize]),this.devicePixelContentBoxSize=Yi([e.devicePixelContentBoxSize])},fn=function(t){if(Ki(t))return 1/0;for(var e=0,r=t.parentNode;r;)e+=1,r=r.parentNode;return e},hn=function(){var t=1/0,e=[];Hi.forEach((function(r){if(0!==r.activeTargets.length){var i=[];r.activeTargets.forEach((function(e){var r=new un(e.target),n=fn(e.target);i.push(r),e.lastReportedSize=ln(e.target,e.observedBox),n<t&&(t=n)})),e.push((function(){r.callback.call(r.observer,i,r.observer)})),r.activeTargets.splice(0,r.activeTargets.length)}}));for(var r=0,i=e;r<i.length;r++){(0,i[r])()}return t},dn=function(t){Hi.forEach((function(e){e.activeTargets.splice(0,e.activeTargets.length),e.skippedTargets.splice(0,e.skippedTargets.length),e.observationTargets.forEach((function(r){r.isActive()&&(fn(r.target)>t?e.activeTargets.push(r):e.skippedTargets.push(r))}))}))},pn=function(){var t,e=0;for(dn(e);Hi.some((function(t){return t.activeTargets.length>0}));)e=hn(),dn(e);return Hi.some((function(t){return t.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?t=new ErrorEvent("error",{message:qi}):((t=document.createEvent("Event")).initEvent("error",!1,!1),t.message=qi),window.dispatchEvent(t)),e>0},vn=[],gn=function(t){if(!$i){var e=0,r=document.createTextNode("");new MutationObserver((function(){return vn.splice(0).forEach((function(t){return t()}))})).observe(r,{characterData:!0}),$i=function(){r.textContent=""+(e?e--:e++)}}vn.push(t),$i()},bn=0,yn={attributes:!0,characterData:!0,childList:!0,subtree:!0},mn=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],xn=function(t){return void 0===t&&(t=0),Date.now()+t},En=!1,wn=new(function(){function t(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return t.prototype.run=function(t){var e=this;if(void 0===t&&(t=250),!En){En=!0;var r,i=xn(t);r=function(){var r=!1;try{r=pn()}finally{if(En=!1,t=i-xn(),!bn)return;r?e.run(1e3):t>0?e.run(t):e.start()}},gn((function(){requestAnimationFrame(r)}))}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var t=this,e=function(){return t.observer&&t.observer.observe(document.body,yn)};document.body?e():Zi.addEventListener("DOMContentLoaded",e)},t.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),mn.forEach((function(e){return Zi.addEventListener(e,t.listener,!0)})))},t.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),mn.forEach((function(e){return Zi.removeEventListener(e,t.listener,!0)})),this.stopped=!0)},t}()),Sn=function(t){!bn&&t>0&&wn.start(),!(bn+=t)&&wn.stop()},On=function(){function t(t,e){this.target=t,this.observedBox=e||Vi.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var t,e=ln(this.target,this.observedBox,!0);return t=this.target,Qi(t)||function(t){switch(t.tagName){case"INPUT":if("image"!==t.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(t)||"inline"!==getComputedStyle(t).display||(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),kn=function(t,e){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=e},An=new WeakMap,Tn=function(t,e){for(var r=0;r<t.length;r+=1)if(t[r].target===e)return r;return-1},Ln=function(){function t(){}return t.connect=function(t,e){var r=new kn(t,e);An.set(t,r)},t.observe=function(t,e,r){var i=An.get(t),n=0===i.observationTargets.length;Tn(i.observationTargets,e)<0&&(n&&Hi.push(i),i.observationTargets.push(new On(e,r&&r.box)),Sn(1),wn.schedule())},t.unobserve=function(t,e){var r=An.get(t),i=Tn(r.observationTargets,e),n=1===r.observationTargets.length;i>=0&&(n&&Hi.splice(Hi.indexOf(r),1),r.observationTargets.splice(i,1),Sn(-1))},t.disconnect=function(t){var e=this,r=An.get(t);r.observationTargets.slice().forEach((function(r){return e.unobserve(t,r.target)})),r.activeTargets.splice(0,r.activeTargets.length)},t}(),zn=function(){function t(t){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof t)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Ln.connect(this,t)}return t.prototype.observe=function(t,e){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ji(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Ln.observe(this,t,e)},t.prototype.unobserve=function(t){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ji(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Ln.unobserve(this,t)},t.prototype.disconnect=function(){Ln.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}(),Rn=function(t){return function(e,r,i,n){Tt(r);var o=zt(e),s=b(o),a=st(o.length),c=t?a-1:0,l=t?-1:1;if(i<2)for(;;){if(c in s){n=s[c],c+=l;break}if(c+=l,t?c<0:a<=c)throw TypeError("Reduce of empty array with no initial value")}for(;t?c>=0:a>c;c+=l)c in s&&(n=r(n,s[c],c,o));return n}},_n={left:Rn(!1),right:Rn(!0)}.left;At({target:"Array",proto:!0,forced:Pt("reduce")},{reduce:function(t){return _n(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}});var Mn=M.f,Cn=Function.prototype,Wn=Cn.toString,jn=/^\s*function ([^ (]*)/;!l||"name"in Cn||Mn(Cn,"name",{configurable:!0,get:function(){try{return Wn.call(this).match(jn)[1]}catch(t){return""}}});var Nn,In,Bn=function(){var t=R(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},Dn=RegExp.prototype.exec,Pn=String.prototype.replace,Fn=Dn,Vn=(Nn=/a/,In=/b*/g,Dn.call(Nn,"a"),Dn.call(In,"a"),0!==Nn.lastIndex||0!==In.lastIndex),Xn=void 0!==/()??/.exec("")[1];(Vn||Xn)&&(Fn=function(t){var e,r,i,n,o=this;return Xn&&(r=new RegExp("^"+o.source+"$(?!\\s)",Bn.call(o))),Vn&&(e=o.lastIndex),i=Dn.call(o,t),Vn&&i&&(o.lastIndex=o.global?i.index+i[0].length:e),Xn&&i&&i.length>1&&Pn.call(i[0],r,(function(){for(n=1;n<arguments.length-2;n++)void 0===arguments[n]&&(i[n]=void 0)})),i});var Hn=Fn;At({target:"RegExp",proto:!0,forced:/./.exec!==Hn},{exec:Hn});var qn=Wt("species"),$n=!c((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),Yn=!c((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]})),Gn=function(t,e,r,i){var n=Wt(t),o=!c((function(){var e={};return e[n]=function(){return 7},7!=""[t](e)})),s=o&&!c((function(){var e=!1,r=/a/;return r.exec=function(){return e=!0,null},"split"===t&&(r.constructor={},r.constructor[qn]=function(){return r}),r[n](""),!e}));if(!o||!s||"replace"===t&&!$n||"split"===t&&!Yn){var a=/./[n],l=r(n,""[t],(function(t,e,r,i,n){return e.exec===Hn?o&&!n?{done:!0,value:a.call(e,r,i)}:{done:!0,value:t.call(r,e,i)}:{done:!1}})),u=l[0],f=l[1];J(String.prototype,t,u),J(RegExp.prototype,n,2==e?function(t,e){return f.call(t,this,e)}:function(t){return f.call(t,this)}),i&&C(RegExp.prototype[n],"sham",!0)}},Un=Ue.charAt,Qn=function(t,e,r){return e+(r?Un(t,e).length:1)},Kn=function(t,e){var r=t.exec;if("function"==typeof r){var i=r.call(t,e);if("object"!=typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==v(t))throw TypeError("RegExp#exec called on incompatible receiver");return Hn.call(t,e)};Gn("match",1,(function(t,e,r){return[function(e){var r=y(this),i=null==e?void 0:e[t];return void 0!==i?i.call(e,r):new RegExp(e)[t](String(r))},function(t){var i=r(e,t,this);if(i.done)return i.value;var n=R(t),o=String(this);if(!n.global)return Kn(n,o);var s=n.unicode;n.lastIndex=0;for(var a,c=[],l=0;null!==(a=Kn(n,o));){var u=String(a[0]);c[l]=u,""===u&&(n.lastIndex=Qn(o,st(n.lastIndex),s)),l++}return 0===l?null:c}]}));var Jn=Math.max,Zn=Math.min,to=Math.floor,eo=/\$([$&'`]|\d\d?|<[^>]*>)/g,ro=/\$([$&'`]|\d\d?)/g;Gn("replace",2,(function(t,e,r){return[function(r,i){var n=y(this),o=null==r?void 0:r[t];return void 0!==o?o.call(r,n,i):e.call(String(n),r,i)},function(t,n){var o=r(e,t,this,n);if(o.done)return o.value;var s=R(t),a=String(this),c="function"==typeof n;c||(n=String(n));var l=s.global;if(l){var u=s.unicode;s.lastIndex=0}for(var f=[];;){var h=Kn(s,a);if(null===h)break;if(f.push(h),!l)break;""===String(h[0])&&(s.lastIndex=Qn(a,st(s.lastIndex),u))}for(var d,p="",v=0,g=0;g<f.length;g++){h=f[g];for(var b=String(h[0]),y=Jn(Zn(nt(h.index),a.length),0),m=[],x=1;x<h.length;x++)m.push(void 0===(d=h[x])?d:String(d));var E=h.groups;if(c){var w=[b].concat(m,y,a);void 0!==E&&w.push(E);var S=String(n.apply(void 0,w))}else S=i(b,a,y,m,E,n);y>=v&&(p+=a.slice(v,y)+S,v=y+b.length)}return p+a.slice(v)}];function i(t,r,i,n,o,s){var a=i+t.length,c=n.length,l=ro;return void 0!==o&&(o=zt(o),l=eo),e.call(s,l,(function(e,s){var l;switch(s.charAt(0)){case"$":return"$";case"&":return t;case"`":return r.slice(0,i);case"'":return r.slice(a);case"<":l=o[s.slice(1,-1)];break;default:var u=+s;if(0===u)return e;if(u>c){var f=to(u/10);return 0===f?e:f<=c?void 0===n[f-1]?s.charAt(1):n[f-1]+s.charAt(1):e}l=n[u-1]}return void 0===l?"":l}))}}));var io=function(t){return Array.prototype.reduce.call(t,(function(t,e){var r=e.name.match(/data-simplebar-(.+)/);if(r){var i=r[1].replace(/\W+(.)/g,(function(t,e){return e.toUpperCase()}));switch(e.value){case"true":t[i]=!0;break;case"false":t[i]=!1;break;case void 0:t[i]=!0;break;default:t[i]=e.value}}return t}),{})};function no(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView:window}function oo(t){return t&&t.ownerDocument?t.ownerDocument:document}var so=null,ao=null;function co(t){if(null===so){var e=oo(t);if(void 0===e)return so=0;var r=e.body,i=e.createElement("div");i.classList.add("simplebar-hide-scrollbar"),r.appendChild(i);var n=i.getBoundingClientRect().right;r.removeChild(i),so=n}return so}Yt&&window.addEventListener("resize",(function(){ao!==window.devicePixelRatio&&(ao=window.devicePixelRatio,so=null)}));var lo=function(){function t(e,r){var i=this;this.onScroll=function(){var t=no(i.el);i.scrollXTicking||(t.requestAnimationFrame(i.scrollX),i.scrollXTicking=!0),i.scrollYTicking||(t.requestAnimationFrame(i.scrollY),i.scrollYTicking=!0)},this.scrollX=function(){i.axis.x.isOverflowing&&(i.showScrollbar("x"),i.positionScrollbar("x")),i.scrollXTicking=!1},this.scrollY=function(){i.axis.y.isOverflowing&&(i.showScrollbar("y"),i.positionScrollbar("y")),i.scrollYTicking=!1},this.onMouseEnter=function(){i.showScrollbar("x"),i.showScrollbar("y")},this.onMouseMove=function(t){i.mouseX=t.clientX,i.mouseY=t.clientY,(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&i.onMouseMoveForAxis("x"),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&i.onMouseMoveForAxis("y")},this.onMouseLeave=function(){i.onMouseMove.cancel(),(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&i.onMouseLeaveForAxis("x"),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&i.onMouseLeaveForAxis("y"),i.mouseX=-1,i.mouseY=-1},this.onWindowResize=function(){i.scrollbarWidth=i.getScrollbarWidth(),i.hideNativeScrollbar()},this.hideScrollbars=function(){i.axis.x.track.rect=i.axis.x.track.el.getBoundingClientRect(),i.axis.y.track.rect=i.axis.y.track.el.getBoundingClientRect(),i.isWithinBounds(i.axis.y.track.rect)||(i.axis.y.scrollbar.el.classList.remove(i.classNames.visible),i.axis.y.isVisible=!1),i.isWithinBounds(i.axis.x.track.rect)||(i.axis.x.scrollbar.el.classList.remove(i.classNames.visible),i.axis.x.isVisible=!1)},this.onPointerEvent=function(t){var e,r;i.axis.x.track.rect=i.axis.x.track.el.getBoundingClientRect(),i.axis.y.track.rect=i.axis.y.track.el.getBoundingClientRect(),(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&(e=i.isWithinBounds(i.axis.x.track.rect)),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&(r=i.isWithinBounds(i.axis.y.track.rect)),(e||r)&&(t.preventDefault(),t.stopPropagation(),"mousedown"===t.type&&(e&&(i.axis.x.scrollbar.rect=i.axis.x.scrollbar.el.getBoundingClientRect(),i.isWithinBounds(i.axis.x.scrollbar.rect)?i.onDragStart(t,"x"):i.onTrackClick(t,"x")),r&&(i.axis.y.scrollbar.rect=i.axis.y.scrollbar.el.getBoundingClientRect(),i.isWithinBounds(i.axis.y.scrollbar.rect)?i.onDragStart(t,"y"):i.onTrackClick(t,"y"))))},this.drag=function(e){var r=i.axis[i.draggedAxis].track,n=r.rect[i.axis[i.draggedAxis].sizeAttr],o=i.axis[i.draggedAxis].scrollbar,s=i.contentWrapperEl[i.axis[i.draggedAxis].scrollSizeAttr],a=parseInt(i.elStyles[i.axis[i.draggedAxis].sizeAttr],10);e.preventDefault(),e.stopPropagation();var c=(("y"===i.draggedAxis?e.pageY:e.pageX)-r.rect[i.axis[i.draggedAxis].offsetAttr]-i.axis[i.draggedAxis].dragOffset)/(n-o.size)*(s-a);"x"===i.draggedAxis&&(c=i.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?c-(n+o.size):c,c=i.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-c:c),i.contentWrapperEl[i.axis[i.draggedAxis].scrollOffsetAttr]=c},this.onEndDrag=function(t){var e=oo(i.el),r=no(i.el);t.preventDefault(),t.stopPropagation(),i.el.classList.remove(i.classNames.dragging),e.removeEventListener("mousemove",i.drag,!0),e.removeEventListener("mouseup",i.onEndDrag,!0),i.removePreventClickId=r.setTimeout((function(){e.removeEventListener("click",i.preventClick,!0),e.removeEventListener("dblclick",i.preventClick,!0),i.removePreventClickId=null}))},this.preventClick=function(t){t.preventDefault(),t.stopPropagation()},this.el=e,this.minScrollbarWidth=20,this.options=Object.assign({},t.defaultOptions,{},r),this.classNames=Object.assign({},t.defaultOptions.classNames,{},this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,t.instances.has(this.el)||(this.recalculate=Gr(this.recalculate.bind(this),64),this.onMouseMove=Gr(this.onMouseMove.bind(this),64),this.hideScrollbars=hi(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=hi(this.onWindowResize.bind(this),64,{leading:!0}),t.getRtlHelpers=Xi(t.getRtlHelpers),this.init())}t.getRtlHelpers=function(){var e=document.createElement("div");e.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var r=e.firstElementChild;document.body.appendChild(r);var i=r.firstElementChild;r.scrollLeft=0;var n=t.getOffset(r),o=t.getOffset(i);r.scrollLeft=999;var s=t.getOffset(i);return{isRtlScrollingInverted:n.left!==o.left&&o.left-s.left!=0,isRtlScrollbarInverted:n.left!==o.left}},t.getOffset=function(t){var e=t.getBoundingClientRect(),r=oo(t),i=no(t);return{top:e.top+(i.pageYOffset||r.documentElement.scrollTop),left:e.left+(i.pageXOffset||r.documentElement.scrollLeft)}};var e=t.prototype;return e.init=function(){t.instances.set(this.el,this),Yt&&(this.initDOM(),this.setAccessibilityAttributes(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},e.initDOM=function(){var t=this;if(Array.prototype.filter.call(this.el.children,(function(e){return e.classList.contains(t.classNames.wrapper)})).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var e=document.createElement("div"),r=document.createElement("div");e.classList.add(this.classNames.track),r.classList.add(this.classNames.scrollbar),e.appendChild(r),this.axis.x.track.el=e.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=e.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},e.setAccessibilityAttributes=function(){var t=this.options.ariaLabel||"scrollable content";this.contentWrapperEl.setAttribute("tabindex","0"),this.contentWrapperEl.setAttribute("role","region"),this.contentWrapperEl.setAttribute("aria-label",t)},e.initListeners=function(){var t=this,e=no(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(e){t.el.addEventListener(e,t.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(e){t.el.addEventListener(e,t.onPointerEvent,{capture:!0,passive:!0})})),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),e.addEventListener("resize",this.onWindowResize);var r=!1,i=e.ResizeObserver||zn;this.resizeObserver=new i((function(){r&&t.recalculate()})),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),e.requestAnimationFrame((function(){r=!0})),this.mutationObserver=new e.MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},e.recalculate=function(){var t=no(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction;var e=this.heightAutoObserverEl.offsetHeight<=1,r=this.heightAutoObserverEl.offsetWidth<=1,i=this.contentEl.offsetWidth,n=this.contentWrapperEl.offsetWidth,o=this.elStyles.overflowX,s=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var a=this.contentEl.scrollHeight,c=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=e?"auto":"100%",this.placeholderEl.style.width=r?i+"px":"auto",this.placeholderEl.style.height=a+"px";var l=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=c>i,this.axis.y.isOverflowing=a>l,this.axis.x.isOverflowing="hidden"!==o&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==s&&this.axis.y.isOverflowing,this.axis.x.forceVisible="x"===this.options.forceVisible||!0===this.options.forceVisible,this.axis.y.forceVisible="y"===this.options.forceVisible||!0===this.options.forceVisible,this.hideNativeScrollbar();var u=this.axis.x.isOverflowing?this.scrollbarWidth:0,f=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&c>n-f,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&a>l-u,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")},e.getScrollbarSize=function(t){if(void 0===t&&(t="y"),!this.axis[t].isOverflowing)return 0;var e,r=this.contentEl[this.axis[t].scrollSizeAttr],i=this.axis[t].track.el[this.axis[t].offsetSizeAttr],n=i/r;return e=Math.max(~~(n*i),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(e=Math.min(e,this.options.scrollbarMaxSize)),e},e.positionScrollbar=function(e){if(void 0===e&&(e="y"),this.axis[e].isOverflowing){var r=this.contentWrapperEl[this.axis[e].scrollSizeAttr],i=this.axis[e].track.el[this.axis[e].offsetSizeAttr],n=parseInt(this.elStyles[this.axis[e].sizeAttr],10),o=this.axis[e].scrollbar,s=this.contentWrapperEl[this.axis[e].scrollOffsetAttr],a=(s="x"===e&&this.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-s:s)/(r-n),c=~~((i-o.size)*a);c="x"===e&&this.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?c+(i-o.size):c,o.el.style.transform="x"===e?"translate3d("+c+"px, 0, 0)":"translate3d(0, "+c+"px, 0)"}},e.toggleTrackVisibility=function(t){void 0===t&&(t="y");var e=this.axis[t].track.el,r=this.axis[t].scrollbar.el;this.axis[t].isOverflowing||this.axis[t].forceVisible?(e.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll"):(e.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden"),this.axis[t].isOverflowing?r.style.display="block":r.style.display="none"},e.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},e.onMouseMoveForAxis=function(t){void 0===t&&(t="y"),this.axis[t].track.rect=this.axis[t].track.el.getBoundingClientRect(),this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect(),this.isWithinBounds(this.axis[t].scrollbar.rect)?this.axis[t].scrollbar.el.classList.add(this.classNames.hover):this.axis[t].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[t].track.rect)?(this.showScrollbar(t),this.axis[t].track.el.classList.add(this.classNames.hover)):this.axis[t].track.el.classList.remove(this.classNames.hover)},e.onMouseLeaveForAxis=function(t){void 0===t&&(t="y"),this.axis[t].track.el.classList.remove(this.classNames.hover),this.axis[t].scrollbar.el.classList.remove(this.classNames.hover)},e.showScrollbar=function(t){void 0===t&&(t="y");var e=this.axis[t].scrollbar.el;this.axis[t].isVisible||(e.classList.add(this.classNames.visible),this.axis[t].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},e.onDragStart=function(t,e){void 0===e&&(e="y");var r=oo(this.el),i=no(this.el),n=this.axis[e].scrollbar,o="y"===e?t.pageY:t.pageX;this.axis[e].dragOffset=o-n.rect[this.axis[e].offsetAttr],this.draggedAxis=e,this.el.classList.add(this.classNames.dragging),r.addEventListener("mousemove",this.drag,!0),r.addEventListener("mouseup",this.onEndDrag,!0),null===this.removePreventClickId?(r.addEventListener("click",this.preventClick,!0),r.addEventListener("dblclick",this.preventClick,!0)):(i.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},e.onTrackClick=function(t,e){var r=this;if(void 0===e&&(e="y"),this.options.clickOnTrack){var i=no(this.el);this.axis[e].scrollbar.rect=this.axis[e].scrollbar.el.getBoundingClientRect();var n=this.axis[e].scrollbar.rect[this.axis[e].offsetAttr],o=parseInt(this.elStyles[this.axis[e].sizeAttr],10),s=this.contentWrapperEl[this.axis[e].scrollOffsetAttr],a=("y"===e?this.mouseY-n:this.mouseX-n)<0?-1:1,c=-1===a?s-o:s+o;!function t(){var n,o;-1===a?s>c&&(s-=r.options.clickOnTrackSpeed,r.contentWrapperEl.scrollTo(((n={})[r.axis[e].offsetAttr]=s,n)),i.requestAnimationFrame(t)):s<c&&(s+=r.options.clickOnTrackSpeed,r.contentWrapperEl.scrollTo(((o={})[r.axis[e].offsetAttr]=s,o)),i.requestAnimationFrame(t))}()}},e.getContentElement=function(){return this.contentEl},e.getScrollElement=function(){return this.contentWrapperEl},e.getScrollbarWidth=function(){try{return"none"===getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:co(this.el)}catch(t){return co(this.el)}},e.removeListeners=function(){var t=this,e=no(this.el);this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(e){t.el.removeEventListener(e,t.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(e){t.el.removeEventListener(e,t.onPointerEvent,{capture:!0,passive:!0})})),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.recalculate.cancel(),this.onMouseMove.cancel(),this.hideScrollbars.cancel(),this.onWindowResize.cancel()},e.unMount=function(){this.removeListeners(),t.instances.delete(this.el)},e.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},e.findChild=function(t,e){var r=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,(function(t){return r.call(t,e)}))[0]},t}();return lo.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,clickOnTrackSpeed:40,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3},lo.instances=new WeakMap,lo.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),(function(t){"init"===t.getAttribute("data-simplebar")||lo.instances.has(t)||new lo(t,io(t.attributes))}))},lo.removeObserver=function(){this.globalObserver.disconnect()},lo.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),"undefined"!=typeof MutationObserver&&(this.globalObserver=new MutationObserver(lo.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0})),"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))},lo.handleMutations=function(t){t.forEach((function(t){Array.prototype.forEach.call(t.addedNodes,(function(t){1===t.nodeType&&(t.hasAttribute("data-simplebar")?!lo.instances.has(t)&&document.documentElement.contains(t)&&new lo(t,io(t.attributes)):Array.prototype.forEach.call(t.querySelectorAll("[data-simplebar]"),(function(t){"init"!==t.getAttribute("data-simplebar")&&!lo.instances.has(t)&&document.documentElement.contains(t)&&new lo(t,io(t.attributes))})))})),Array.prototype.forEach.call(t.removedNodes,(function(t){1===t.nodeType&&("init"===t.getAttribute("data-simplebar")?lo.instances.has(t)&&!document.documentElement.contains(t)&&lo.instances.get(t).unMount():Array.prototype.forEach.call(t.querySelectorAll('[data-simplebar="init"]'),(function(t){lo.instances.has(t)&&!document.documentElement.contains(t)&&lo.instances.get(t).unMount()})))}))}))},lo.getOptions=io,Yt&&lo.initHtmlApi(),lo}));
  67892. /***/ }),
  67893. /***/ 51474:
  67894. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  67895. "use strict";
  67896. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  67897. /* harmony export */ "ZP": () => (__WEBPACK_DEFAULT_EXPORT__)
  67898. /* harmony export */ });
  67899. /* unused harmony exports MultiDrag, Sortable, Swap */
  67900. /**!
  67901. * Sortable 1.14.0
  67902. * @author RubaXa <trash@rubaxa.org>
  67903. * @author owenm <owen23355@gmail.com>
  67904. * @license MIT
  67905. */
  67906. function ownKeys(object, enumerableOnly) {
  67907. var keys = Object.keys(object);
  67908. if (Object.getOwnPropertySymbols) {
  67909. var symbols = Object.getOwnPropertySymbols(object);
  67910. if (enumerableOnly) {
  67911. symbols = symbols.filter(function (sym) {
  67912. return Object.getOwnPropertyDescriptor(object, sym).enumerable;
  67913. });
  67914. }
  67915. keys.push.apply(keys, symbols);
  67916. }
  67917. return keys;
  67918. }
  67919. function _objectSpread2(target) {
  67920. for (var i = 1; i < arguments.length; i++) {
  67921. var source = arguments[i] != null ? arguments[i] : {};
  67922. if (i % 2) {
  67923. ownKeys(Object(source), true).forEach(function (key) {
  67924. _defineProperty(target, key, source[key]);
  67925. });
  67926. } else if (Object.getOwnPropertyDescriptors) {
  67927. Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
  67928. } else {
  67929. ownKeys(Object(source)).forEach(function (key) {
  67930. Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
  67931. });
  67932. }
  67933. }
  67934. return target;
  67935. }
  67936. function _typeof(obj) {
  67937. "@babel/helpers - typeof";
  67938. if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
  67939. _typeof = function (obj) {
  67940. return typeof obj;
  67941. };
  67942. } else {
  67943. _typeof = function (obj) {
  67944. return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  67945. };
  67946. }
  67947. return _typeof(obj);
  67948. }
  67949. function _defineProperty(obj, key, value) {
  67950. if (key in obj) {
  67951. Object.defineProperty(obj, key, {
  67952. value: value,
  67953. enumerable: true,
  67954. configurable: true,
  67955. writable: true
  67956. });
  67957. } else {
  67958. obj[key] = value;
  67959. }
  67960. return obj;
  67961. }
  67962. function _extends() {
  67963. _extends = Object.assign || function (target) {
  67964. for (var i = 1; i < arguments.length; i++) {
  67965. var source = arguments[i];
  67966. for (var key in source) {
  67967. if (Object.prototype.hasOwnProperty.call(source, key)) {
  67968. target[key] = source[key];
  67969. }
  67970. }
  67971. }
  67972. return target;
  67973. };
  67974. return _extends.apply(this, arguments);
  67975. }
  67976. function _objectWithoutPropertiesLoose(source, excluded) {
  67977. if (source == null) return {};
  67978. var target = {};
  67979. var sourceKeys = Object.keys(source);
  67980. var key, i;
  67981. for (i = 0; i < sourceKeys.length; i++) {
  67982. key = sourceKeys[i];
  67983. if (excluded.indexOf(key) >= 0) continue;
  67984. target[key] = source[key];
  67985. }
  67986. return target;
  67987. }
  67988. function _objectWithoutProperties(source, excluded) {
  67989. if (source == null) return {};
  67990. var target = _objectWithoutPropertiesLoose(source, excluded);
  67991. var key, i;
  67992. if (Object.getOwnPropertySymbols) {
  67993. var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
  67994. for (i = 0; i < sourceSymbolKeys.length; i++) {
  67995. key = sourceSymbolKeys[i];
  67996. if (excluded.indexOf(key) >= 0) continue;
  67997. if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
  67998. target[key] = source[key];
  67999. }
  68000. }
  68001. return target;
  68002. }
  68003. function _toConsumableArray(arr) {
  68004. return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
  68005. }
  68006. function _arrayWithoutHoles(arr) {
  68007. if (Array.isArray(arr)) return _arrayLikeToArray(arr);
  68008. }
  68009. function _iterableToArray(iter) {
  68010. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  68011. }
  68012. function _unsupportedIterableToArray(o, minLen) {
  68013. if (!o) return;
  68014. if (typeof o === "string") return _arrayLikeToArray(o, minLen);
  68015. var n = Object.prototype.toString.call(o).slice(8, -1);
  68016. if (n === "Object" && o.constructor) n = o.constructor.name;
  68017. if (n === "Map" || n === "Set") return Array.from(o);
  68018. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
  68019. }
  68020. function _arrayLikeToArray(arr, len) {
  68021. if (len == null || len > arr.length) len = arr.length;
  68022. for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
  68023. return arr2;
  68024. }
  68025. function _nonIterableSpread() {
  68026. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  68027. }
  68028. var version = "1.14.0";
  68029. function userAgent(pattern) {
  68030. if (typeof window !== 'undefined' && window.navigator) {
  68031. return !! /*@__PURE__*/navigator.userAgent.match(pattern);
  68032. }
  68033. }
  68034. var IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i);
  68035. var Edge = userAgent(/Edge/i);
  68036. var FireFox = userAgent(/firefox/i);
  68037. var Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);
  68038. var IOS = userAgent(/iP(ad|od|hone)/i);
  68039. var ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);
  68040. var captureMode = {
  68041. capture: false,
  68042. passive: false
  68043. };
  68044. function on(el, event, fn) {
  68045. el.addEventListener(event, fn, !IE11OrLess && captureMode);
  68046. }
  68047. function off(el, event, fn) {
  68048. el.removeEventListener(event, fn, !IE11OrLess && captureMode);
  68049. }
  68050. function matches(
  68051. /**HTMLElement*/
  68052. el,
  68053. /**String*/
  68054. selector) {
  68055. if (!selector) return;
  68056. selector[0] === '>' && (selector = selector.substring(1));
  68057. if (el) {
  68058. try {
  68059. if (el.matches) {
  68060. return el.matches(selector);
  68061. } else if (el.msMatchesSelector) {
  68062. return el.msMatchesSelector(selector);
  68063. } else if (el.webkitMatchesSelector) {
  68064. return el.webkitMatchesSelector(selector);
  68065. }
  68066. } catch (_) {
  68067. return false;
  68068. }
  68069. }
  68070. return false;
  68071. }
  68072. function getParentOrHost(el) {
  68073. return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;
  68074. }
  68075. function closest(
  68076. /**HTMLElement*/
  68077. el,
  68078. /**String*/
  68079. selector,
  68080. /**HTMLElement*/
  68081. ctx, includeCTX) {
  68082. if (el) {
  68083. ctx = ctx || document;
  68084. do {
  68085. if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {
  68086. return el;
  68087. }
  68088. if (el === ctx) break;
  68089. /* jshint boss:true */
  68090. } while (el = getParentOrHost(el));
  68091. }
  68092. return null;
  68093. }
  68094. var R_SPACE = /\s+/g;
  68095. function toggleClass(el, name, state) {
  68096. if (el && name) {
  68097. if (el.classList) {
  68098. el.classList[state ? 'add' : 'remove'](name);
  68099. } else {
  68100. var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');
  68101. el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');
  68102. }
  68103. }
  68104. }
  68105. function css(el, prop, val) {
  68106. var style = el && el.style;
  68107. if (style) {
  68108. if (val === void 0) {
  68109. if (document.defaultView && document.defaultView.getComputedStyle) {
  68110. val = document.defaultView.getComputedStyle(el, '');
  68111. } else if (el.currentStyle) {
  68112. val = el.currentStyle;
  68113. }
  68114. return prop === void 0 ? val : val[prop];
  68115. } else {
  68116. if (!(prop in style) && prop.indexOf('webkit') === -1) {
  68117. prop = '-webkit-' + prop;
  68118. }
  68119. style[prop] = val + (typeof val === 'string' ? '' : 'px');
  68120. }
  68121. }
  68122. }
  68123. function matrix(el, selfOnly) {
  68124. var appliedTransforms = '';
  68125. if (typeof el === 'string') {
  68126. appliedTransforms = el;
  68127. } else {
  68128. do {
  68129. var transform = css(el, 'transform');
  68130. if (transform && transform !== 'none') {
  68131. appliedTransforms = transform + ' ' + appliedTransforms;
  68132. }
  68133. /* jshint boss:true */
  68134. } while (!selfOnly && (el = el.parentNode));
  68135. }
  68136. var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
  68137. /*jshint -W056 */
  68138. return matrixFn && new matrixFn(appliedTransforms);
  68139. }
  68140. function find(ctx, tagName, iterator) {
  68141. if (ctx) {
  68142. var list = ctx.getElementsByTagName(tagName),
  68143. i = 0,
  68144. n = list.length;
  68145. if (iterator) {
  68146. for (; i < n; i++) {
  68147. iterator(list[i], i);
  68148. }
  68149. }
  68150. return list;
  68151. }
  68152. return [];
  68153. }
  68154. function getWindowScrollingElement() {
  68155. var scrollingElement = document.scrollingElement;
  68156. if (scrollingElement) {
  68157. return scrollingElement;
  68158. } else {
  68159. return document.documentElement;
  68160. }
  68161. }
  68162. /**
  68163. * Returns the "bounding client rect" of given element
  68164. * @param {HTMLElement} el The element whose boundingClientRect is wanted
  68165. * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container
  68166. * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr
  68167. * @param {[Boolean]} undoScale Whether the container's scale() should be undone
  68168. * @param {[HTMLElement]} container The parent the element will be placed in
  68169. * @return {Object} The boundingClientRect of el, with specified adjustments
  68170. */
  68171. function getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {
  68172. if (!el.getBoundingClientRect && el !== window) return;
  68173. var elRect, top, left, bottom, right, height, width;
  68174. if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {
  68175. elRect = el.getBoundingClientRect();
  68176. top = elRect.top;
  68177. left = elRect.left;
  68178. bottom = elRect.bottom;
  68179. right = elRect.right;
  68180. height = elRect.height;
  68181. width = elRect.width;
  68182. } else {
  68183. top = 0;
  68184. left = 0;
  68185. bottom = window.innerHeight;
  68186. right = window.innerWidth;
  68187. height = window.innerHeight;
  68188. width = window.innerWidth;
  68189. }
  68190. if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {
  68191. // Adjust for translate()
  68192. container = container || el.parentNode; // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)
  68193. // Not needed on <= IE11
  68194. if (!IE11OrLess) {
  68195. do {
  68196. if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {
  68197. var containerRect = container.getBoundingClientRect(); // Set relative to edges of padding box of container
  68198. top -= containerRect.top + parseInt(css(container, 'border-top-width'));
  68199. left -= containerRect.left + parseInt(css(container, 'border-left-width'));
  68200. bottom = top + elRect.height;
  68201. right = left + elRect.width;
  68202. break;
  68203. }
  68204. /* jshint boss:true */
  68205. } while (container = container.parentNode);
  68206. }
  68207. }
  68208. if (undoScale && el !== window) {
  68209. // Adjust for scale()
  68210. var elMatrix = matrix(container || el),
  68211. scaleX = elMatrix && elMatrix.a,
  68212. scaleY = elMatrix && elMatrix.d;
  68213. if (elMatrix) {
  68214. top /= scaleY;
  68215. left /= scaleX;
  68216. width /= scaleX;
  68217. height /= scaleY;
  68218. bottom = top + height;
  68219. right = left + width;
  68220. }
  68221. }
  68222. return {
  68223. top: top,
  68224. left: left,
  68225. bottom: bottom,
  68226. right: right,
  68227. width: width,
  68228. height: height
  68229. };
  68230. }
  68231. /**
  68232. * Checks if a side of an element is scrolled past a side of its parents
  68233. * @param {HTMLElement} el The element who's side being scrolled out of view is in question
  68234. * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')
  68235. * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')
  68236. * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element
  68237. */
  68238. function isScrolledPast(el, elSide, parentSide) {
  68239. var parent = getParentAutoScrollElement(el, true),
  68240. elSideVal = getRect(el)[elSide];
  68241. /* jshint boss:true */
  68242. while (parent) {
  68243. var parentSideVal = getRect(parent)[parentSide],
  68244. visible = void 0;
  68245. if (parentSide === 'top' || parentSide === 'left') {
  68246. visible = elSideVal >= parentSideVal;
  68247. } else {
  68248. visible = elSideVal <= parentSideVal;
  68249. }
  68250. if (!visible) return parent;
  68251. if (parent === getWindowScrollingElement()) break;
  68252. parent = getParentAutoScrollElement(parent, false);
  68253. }
  68254. return false;
  68255. }
  68256. /**
  68257. * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)
  68258. * and non-draggable elements
  68259. * @param {HTMLElement} el The parent element
  68260. * @param {Number} childNum The index of the child
  68261. * @param {Object} options Parent Sortable's options
  68262. * @return {HTMLElement} The child at index childNum, or null if not found
  68263. */
  68264. function getChild(el, childNum, options, includeDragEl) {
  68265. var currentChild = 0,
  68266. i = 0,
  68267. children = el.children;
  68268. while (i < children.length) {
  68269. if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {
  68270. if (currentChild === childNum) {
  68271. return children[i];
  68272. }
  68273. currentChild++;
  68274. }
  68275. i++;
  68276. }
  68277. return null;
  68278. }
  68279. /**
  68280. * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)
  68281. * @param {HTMLElement} el Parent element
  68282. * @param {selector} selector Any other elements that should be ignored
  68283. * @return {HTMLElement} The last child, ignoring ghostEl
  68284. */
  68285. function lastChild(el, selector) {
  68286. var last = el.lastElementChild;
  68287. while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {
  68288. last = last.previousElementSibling;
  68289. }
  68290. return last || null;
  68291. }
  68292. /**
  68293. * Returns the index of an element within its parent for a selected set of
  68294. * elements
  68295. * @param {HTMLElement} el
  68296. * @param {selector} selector
  68297. * @return {number}
  68298. */
  68299. function index(el, selector) {
  68300. var index = 0;
  68301. if (!el || !el.parentNode) {
  68302. return -1;
  68303. }
  68304. /* jshint boss:true */
  68305. while (el = el.previousElementSibling) {
  68306. if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {
  68307. index++;
  68308. }
  68309. }
  68310. return index;
  68311. }
  68312. /**
  68313. * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.
  68314. * The value is returned in real pixels.
  68315. * @param {HTMLElement} el
  68316. * @return {Array} Offsets in the format of [left, top]
  68317. */
  68318. function getRelativeScrollOffset(el) {
  68319. var offsetLeft = 0,
  68320. offsetTop = 0,
  68321. winScroller = getWindowScrollingElement();
  68322. if (el) {
  68323. do {
  68324. var elMatrix = matrix(el),
  68325. scaleX = elMatrix.a,
  68326. scaleY = elMatrix.d;
  68327. offsetLeft += el.scrollLeft * scaleX;
  68328. offsetTop += el.scrollTop * scaleY;
  68329. } while (el !== winScroller && (el = el.parentNode));
  68330. }
  68331. return [offsetLeft, offsetTop];
  68332. }
  68333. /**
  68334. * Returns the index of the object within the given array
  68335. * @param {Array} arr Array that may or may not hold the object
  68336. * @param {Object} obj An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find
  68337. * @return {Number} The index of the object in the array, or -1
  68338. */
  68339. function indexOfObject(arr, obj) {
  68340. for (var i in arr) {
  68341. if (!arr.hasOwnProperty(i)) continue;
  68342. for (var key in obj) {
  68343. if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);
  68344. }
  68345. }
  68346. return -1;
  68347. }
  68348. function getParentAutoScrollElement(el, includeSelf) {
  68349. // skip to window
  68350. if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();
  68351. var elem = el;
  68352. var gotSelf = false;
  68353. do {
  68354. // we don't need to get elem css if it isn't even overflowing in the first place (performance)
  68355. if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {
  68356. var elemCSS = css(elem);
  68357. if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {
  68358. if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();
  68359. if (gotSelf || includeSelf) return elem;
  68360. gotSelf = true;
  68361. }
  68362. }
  68363. /* jshint boss:true */
  68364. } while (elem = elem.parentNode);
  68365. return getWindowScrollingElement();
  68366. }
  68367. function extend(dst, src) {
  68368. if (dst && src) {
  68369. for (var key in src) {
  68370. if (src.hasOwnProperty(key)) {
  68371. dst[key] = src[key];
  68372. }
  68373. }
  68374. }
  68375. return dst;
  68376. }
  68377. function isRectEqual(rect1, rect2) {
  68378. return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);
  68379. }
  68380. var _throttleTimeout;
  68381. function throttle(callback, ms) {
  68382. return function () {
  68383. if (!_throttleTimeout) {
  68384. var args = arguments,
  68385. _this = this;
  68386. if (args.length === 1) {
  68387. callback.call(_this, args[0]);
  68388. } else {
  68389. callback.apply(_this, args);
  68390. }
  68391. _throttleTimeout = setTimeout(function () {
  68392. _throttleTimeout = void 0;
  68393. }, ms);
  68394. }
  68395. };
  68396. }
  68397. function cancelThrottle() {
  68398. clearTimeout(_throttleTimeout);
  68399. _throttleTimeout = void 0;
  68400. }
  68401. function scrollBy(el, x, y) {
  68402. el.scrollLeft += x;
  68403. el.scrollTop += y;
  68404. }
  68405. function clone(el) {
  68406. var Polymer = window.Polymer;
  68407. var $ = window.jQuery || window.Zepto;
  68408. if (Polymer && Polymer.dom) {
  68409. return Polymer.dom(el).cloneNode(true);
  68410. } else if ($) {
  68411. return $(el).clone(true)[0];
  68412. } else {
  68413. return el.cloneNode(true);
  68414. }
  68415. }
  68416. function setRect(el, rect) {
  68417. css(el, 'position', 'absolute');
  68418. css(el, 'top', rect.top);
  68419. css(el, 'left', rect.left);
  68420. css(el, 'width', rect.width);
  68421. css(el, 'height', rect.height);
  68422. }
  68423. function unsetRect(el) {
  68424. css(el, 'position', '');
  68425. css(el, 'top', '');
  68426. css(el, 'left', '');
  68427. css(el, 'width', '');
  68428. css(el, 'height', '');
  68429. }
  68430. var expando = 'Sortable' + new Date().getTime();
  68431. function AnimationStateManager() {
  68432. var animationStates = [],
  68433. animationCallbackId;
  68434. return {
  68435. captureAnimationState: function captureAnimationState() {
  68436. animationStates = [];
  68437. if (!this.options.animation) return;
  68438. var children = [].slice.call(this.el.children);
  68439. children.forEach(function (child) {
  68440. if (css(child, 'display') === 'none' || child === Sortable.ghost) return;
  68441. animationStates.push({
  68442. target: child,
  68443. rect: getRect(child)
  68444. });
  68445. var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect); // If animating: compensate for current animation
  68446. if (child.thisAnimationDuration) {
  68447. var childMatrix = matrix(child, true);
  68448. if (childMatrix) {
  68449. fromRect.top -= childMatrix.f;
  68450. fromRect.left -= childMatrix.e;
  68451. }
  68452. }
  68453. child.fromRect = fromRect;
  68454. });
  68455. },
  68456. addAnimationState: function addAnimationState(state) {
  68457. animationStates.push(state);
  68458. },
  68459. removeAnimationState: function removeAnimationState(target) {
  68460. animationStates.splice(indexOfObject(animationStates, {
  68461. target: target
  68462. }), 1);
  68463. },
  68464. animateAll: function animateAll(callback) {
  68465. var _this = this;
  68466. if (!this.options.animation) {
  68467. clearTimeout(animationCallbackId);
  68468. if (typeof callback === 'function') callback();
  68469. return;
  68470. }
  68471. var animating = false,
  68472. animationTime = 0;
  68473. animationStates.forEach(function (state) {
  68474. var time = 0,
  68475. target = state.target,
  68476. fromRect = target.fromRect,
  68477. toRect = getRect(target),
  68478. prevFromRect = target.prevFromRect,
  68479. prevToRect = target.prevToRect,
  68480. animatingRect = state.rect,
  68481. targetMatrix = matrix(target, true);
  68482. if (targetMatrix) {
  68483. // Compensate for current animation
  68484. toRect.top -= targetMatrix.f;
  68485. toRect.left -= targetMatrix.e;
  68486. }
  68487. target.toRect = toRect;
  68488. if (target.thisAnimationDuration) {
  68489. // Could also check if animatingRect is between fromRect and toRect
  68490. if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) && // Make sure animatingRect is on line between toRect & fromRect
  68491. (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {
  68492. // If returning to same place as started from animation and on same axis
  68493. time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);
  68494. }
  68495. } // if fromRect != toRect: animate
  68496. if (!isRectEqual(toRect, fromRect)) {
  68497. target.prevFromRect = fromRect;
  68498. target.prevToRect = toRect;
  68499. if (!time) {
  68500. time = _this.options.animation;
  68501. }
  68502. _this.animate(target, animatingRect, toRect, time);
  68503. }
  68504. if (time) {
  68505. animating = true;
  68506. animationTime = Math.max(animationTime, time);
  68507. clearTimeout(target.animationResetTimer);
  68508. target.animationResetTimer = setTimeout(function () {
  68509. target.animationTime = 0;
  68510. target.prevFromRect = null;
  68511. target.fromRect = null;
  68512. target.prevToRect = null;
  68513. target.thisAnimationDuration = null;
  68514. }, time);
  68515. target.thisAnimationDuration = time;
  68516. }
  68517. });
  68518. clearTimeout(animationCallbackId);
  68519. if (!animating) {
  68520. if (typeof callback === 'function') callback();
  68521. } else {
  68522. animationCallbackId = setTimeout(function () {
  68523. if (typeof callback === 'function') callback();
  68524. }, animationTime);
  68525. }
  68526. animationStates = [];
  68527. },
  68528. animate: function animate(target, currentRect, toRect, duration) {
  68529. if (duration) {
  68530. css(target, 'transition', '');
  68531. css(target, 'transform', '');
  68532. var elMatrix = matrix(this.el),
  68533. scaleX = elMatrix && elMatrix.a,
  68534. scaleY = elMatrix && elMatrix.d,
  68535. translateX = (currentRect.left - toRect.left) / (scaleX || 1),
  68536. translateY = (currentRect.top - toRect.top) / (scaleY || 1);
  68537. target.animatingX = !!translateX;
  68538. target.animatingY = !!translateY;
  68539. css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');
  68540. this.forRepaintDummy = repaint(target); // repaint
  68541. css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));
  68542. css(target, 'transform', 'translate3d(0,0,0)');
  68543. typeof target.animated === 'number' && clearTimeout(target.animated);
  68544. target.animated = setTimeout(function () {
  68545. css(target, 'transition', '');
  68546. css(target, 'transform', '');
  68547. target.animated = false;
  68548. target.animatingX = false;
  68549. target.animatingY = false;
  68550. }, duration);
  68551. }
  68552. }
  68553. };
  68554. }
  68555. function repaint(target) {
  68556. return target.offsetWidth;
  68557. }
  68558. function calculateRealTime(animatingRect, fromRect, toRect, options) {
  68559. return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;
  68560. }
  68561. var plugins = [];
  68562. var defaults = {
  68563. initializeByDefault: true
  68564. };
  68565. var PluginManager = {
  68566. mount: function mount(plugin) {
  68567. // Set default static properties
  68568. for (var option in defaults) {
  68569. if (defaults.hasOwnProperty(option) && !(option in plugin)) {
  68570. plugin[option] = defaults[option];
  68571. }
  68572. }
  68573. plugins.forEach(function (p) {
  68574. if (p.pluginName === plugin.pluginName) {
  68575. throw "Sortable: Cannot mount plugin ".concat(plugin.pluginName, " more than once");
  68576. }
  68577. });
  68578. plugins.push(plugin);
  68579. },
  68580. pluginEvent: function pluginEvent(eventName, sortable, evt) {
  68581. var _this = this;
  68582. this.eventCanceled = false;
  68583. evt.cancel = function () {
  68584. _this.eventCanceled = true;
  68585. };
  68586. var eventNameGlobal = eventName + 'Global';
  68587. plugins.forEach(function (plugin) {
  68588. if (!sortable[plugin.pluginName]) return; // Fire global events if it exists in this sortable
  68589. if (sortable[plugin.pluginName][eventNameGlobal]) {
  68590. sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({
  68591. sortable: sortable
  68592. }, evt));
  68593. } // Only fire plugin event if plugin is enabled in this sortable,
  68594. // and plugin has event defined
  68595. if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {
  68596. sortable[plugin.pluginName][eventName](_objectSpread2({
  68597. sortable: sortable
  68598. }, evt));
  68599. }
  68600. });
  68601. },
  68602. initializePlugins: function initializePlugins(sortable, el, defaults, options) {
  68603. plugins.forEach(function (plugin) {
  68604. var pluginName = plugin.pluginName;
  68605. if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;
  68606. var initialized = new plugin(sortable, el, sortable.options);
  68607. initialized.sortable = sortable;
  68608. initialized.options = sortable.options;
  68609. sortable[pluginName] = initialized; // Add default options from plugin
  68610. _extends(defaults, initialized.defaults);
  68611. });
  68612. for (var option in sortable.options) {
  68613. if (!sortable.options.hasOwnProperty(option)) continue;
  68614. var modified = this.modifyOption(sortable, option, sortable.options[option]);
  68615. if (typeof modified !== 'undefined') {
  68616. sortable.options[option] = modified;
  68617. }
  68618. }
  68619. },
  68620. getEventProperties: function getEventProperties(name, sortable) {
  68621. var eventProperties = {};
  68622. plugins.forEach(function (plugin) {
  68623. if (typeof plugin.eventProperties !== 'function') return;
  68624. _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));
  68625. });
  68626. return eventProperties;
  68627. },
  68628. modifyOption: function modifyOption(sortable, name, value) {
  68629. var modifiedValue;
  68630. plugins.forEach(function (plugin) {
  68631. // Plugin must exist on the Sortable
  68632. if (!sortable[plugin.pluginName]) return; // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin
  68633. if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {
  68634. modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);
  68635. }
  68636. });
  68637. return modifiedValue;
  68638. }
  68639. };
  68640. function dispatchEvent(_ref) {
  68641. var sortable = _ref.sortable,
  68642. rootEl = _ref.rootEl,
  68643. name = _ref.name,
  68644. targetEl = _ref.targetEl,
  68645. cloneEl = _ref.cloneEl,
  68646. toEl = _ref.toEl,
  68647. fromEl = _ref.fromEl,
  68648. oldIndex = _ref.oldIndex,
  68649. newIndex = _ref.newIndex,
  68650. oldDraggableIndex = _ref.oldDraggableIndex,
  68651. newDraggableIndex = _ref.newDraggableIndex,
  68652. originalEvent = _ref.originalEvent,
  68653. putSortable = _ref.putSortable,
  68654. extraEventProperties = _ref.extraEventProperties;
  68655. sortable = sortable || rootEl && rootEl[expando];
  68656. if (!sortable) return;
  68657. var evt,
  68658. options = sortable.options,
  68659. onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1); // Support for new CustomEvent feature
  68660. if (window.CustomEvent && !IE11OrLess && !Edge) {
  68661. evt = new CustomEvent(name, {
  68662. bubbles: true,
  68663. cancelable: true
  68664. });
  68665. } else {
  68666. evt = document.createEvent('Event');
  68667. evt.initEvent(name, true, true);
  68668. }
  68669. evt.to = toEl || rootEl;
  68670. evt.from = fromEl || rootEl;
  68671. evt.item = targetEl || rootEl;
  68672. evt.clone = cloneEl;
  68673. evt.oldIndex = oldIndex;
  68674. evt.newIndex = newIndex;
  68675. evt.oldDraggableIndex = oldDraggableIndex;
  68676. evt.newDraggableIndex = newDraggableIndex;
  68677. evt.originalEvent = originalEvent;
  68678. evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;
  68679. var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));
  68680. for (var option in allEventProperties) {
  68681. evt[option] = allEventProperties[option];
  68682. }
  68683. if (rootEl) {
  68684. rootEl.dispatchEvent(evt);
  68685. }
  68686. if (options[onName]) {
  68687. options[onName].call(sortable, evt);
  68688. }
  68689. }
  68690. var _excluded = ["evt"];
  68691. var pluginEvent = function pluginEvent(eventName, sortable) {
  68692. var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
  68693. originalEvent = _ref.evt,
  68694. data = _objectWithoutProperties(_ref, _excluded);
  68695. PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({
  68696. dragEl: dragEl,
  68697. parentEl: parentEl,
  68698. ghostEl: ghostEl,
  68699. rootEl: rootEl,
  68700. nextEl: nextEl,
  68701. lastDownEl: lastDownEl,
  68702. cloneEl: cloneEl,
  68703. cloneHidden: cloneHidden,
  68704. dragStarted: moved,
  68705. putSortable: putSortable,
  68706. activeSortable: Sortable.active,
  68707. originalEvent: originalEvent,
  68708. oldIndex: oldIndex,
  68709. oldDraggableIndex: oldDraggableIndex,
  68710. newIndex: newIndex,
  68711. newDraggableIndex: newDraggableIndex,
  68712. hideGhostForTarget: _hideGhostForTarget,
  68713. unhideGhostForTarget: _unhideGhostForTarget,
  68714. cloneNowHidden: function cloneNowHidden() {
  68715. cloneHidden = true;
  68716. },
  68717. cloneNowShown: function cloneNowShown() {
  68718. cloneHidden = false;
  68719. },
  68720. dispatchSortableEvent: function dispatchSortableEvent(name) {
  68721. _dispatchEvent({
  68722. sortable: sortable,
  68723. name: name,
  68724. originalEvent: originalEvent
  68725. });
  68726. }
  68727. }, data));
  68728. };
  68729. function _dispatchEvent(info) {
  68730. dispatchEvent(_objectSpread2({
  68731. putSortable: putSortable,
  68732. cloneEl: cloneEl,
  68733. targetEl: dragEl,
  68734. rootEl: rootEl,
  68735. oldIndex: oldIndex,
  68736. oldDraggableIndex: oldDraggableIndex,
  68737. newIndex: newIndex,
  68738. newDraggableIndex: newDraggableIndex
  68739. }, info));
  68740. }
  68741. var dragEl,
  68742. parentEl,
  68743. ghostEl,
  68744. rootEl,
  68745. nextEl,
  68746. lastDownEl,
  68747. cloneEl,
  68748. cloneHidden,
  68749. oldIndex,
  68750. newIndex,
  68751. oldDraggableIndex,
  68752. newDraggableIndex,
  68753. activeGroup,
  68754. putSortable,
  68755. awaitingDragStarted = false,
  68756. ignoreNextClick = false,
  68757. sortables = [],
  68758. tapEvt,
  68759. touchEvt,
  68760. lastDx,
  68761. lastDy,
  68762. tapDistanceLeft,
  68763. tapDistanceTop,
  68764. moved,
  68765. lastTarget,
  68766. lastDirection,
  68767. pastFirstInvertThresh = false,
  68768. isCircumstantialInvert = false,
  68769. targetMoveDistance,
  68770. // For positioning ghost absolutely
  68771. ghostRelativeParent,
  68772. ghostRelativeParentInitialScroll = [],
  68773. // (left, top)
  68774. _silent = false,
  68775. savedInputChecked = [];
  68776. /** @const */
  68777. var documentExists = typeof document !== 'undefined',
  68778. PositionGhostAbsolutely = IOS,
  68779. CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',
  68780. // This will not pass for IE9, because IE9 DnD only works on anchors
  68781. supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),
  68782. supportCssPointerEvents = function () {
  68783. if (!documentExists) return; // false when <= IE11
  68784. if (IE11OrLess) {
  68785. return false;
  68786. }
  68787. var el = document.createElement('x');
  68788. el.style.cssText = 'pointer-events:auto';
  68789. return el.style.pointerEvents === 'auto';
  68790. }(),
  68791. _detectDirection = function _detectDirection(el, options) {
  68792. var elCSS = css(el),
  68793. elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),
  68794. child1 = getChild(el, 0, options),
  68795. child2 = getChild(el, 1, options),
  68796. firstChildCSS = child1 && css(child1),
  68797. secondChildCSS = child2 && css(child2),
  68798. firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,
  68799. secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;
  68800. if (elCSS.display === 'flex') {
  68801. return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';
  68802. }
  68803. if (elCSS.display === 'grid') {
  68804. return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';
  68805. }
  68806. if (child1 && firstChildCSS["float"] && firstChildCSS["float"] !== 'none') {
  68807. var touchingSideChild2 = firstChildCSS["float"] === 'left' ? 'left' : 'right';
  68808. return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';
  68809. }
  68810. return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal';
  68811. },
  68812. _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {
  68813. var dragElS1Opp = vertical ? dragRect.left : dragRect.top,
  68814. dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,
  68815. dragElOppLength = vertical ? dragRect.width : dragRect.height,
  68816. targetS1Opp = vertical ? targetRect.left : targetRect.top,
  68817. targetS2Opp = vertical ? targetRect.right : targetRect.bottom,
  68818. targetOppLength = vertical ? targetRect.width : targetRect.height;
  68819. return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;
  68820. },
  68821. /**
  68822. * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.
  68823. * @param {Number} x X position
  68824. * @param {Number} y Y position
  68825. * @return {HTMLElement} Element of the first found nearest Sortable
  68826. */
  68827. _detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {
  68828. var ret;
  68829. sortables.some(function (sortable) {
  68830. var threshold = sortable[expando].options.emptyInsertThreshold;
  68831. if (!threshold || lastChild(sortable)) return;
  68832. var rect = getRect(sortable),
  68833. insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,
  68834. insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;
  68835. if (insideHorizontally && insideVertically) {
  68836. return ret = sortable;
  68837. }
  68838. });
  68839. return ret;
  68840. },
  68841. _prepareGroup = function _prepareGroup(options) {
  68842. function toFn(value, pull) {
  68843. return function (to, from, dragEl, evt) {
  68844. var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;
  68845. if (value == null && (pull || sameGroup)) {
  68846. // Default pull value
  68847. // Default pull and put value if same group
  68848. return true;
  68849. } else if (value == null || value === false) {
  68850. return false;
  68851. } else if (pull && value === 'clone') {
  68852. return value;
  68853. } else if (typeof value === 'function') {
  68854. return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);
  68855. } else {
  68856. var otherGroup = (pull ? to : from).options.group.name;
  68857. return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;
  68858. }
  68859. };
  68860. }
  68861. var group = {};
  68862. var originalGroup = options.group;
  68863. if (!originalGroup || _typeof(originalGroup) != 'object') {
  68864. originalGroup = {
  68865. name: originalGroup
  68866. };
  68867. }
  68868. group.name = originalGroup.name;
  68869. group.checkPull = toFn(originalGroup.pull, true);
  68870. group.checkPut = toFn(originalGroup.put);
  68871. group.revertClone = originalGroup.revertClone;
  68872. options.group = group;
  68873. },
  68874. _hideGhostForTarget = function _hideGhostForTarget() {
  68875. if (!supportCssPointerEvents && ghostEl) {
  68876. css(ghostEl, 'display', 'none');
  68877. }
  68878. },
  68879. _unhideGhostForTarget = function _unhideGhostForTarget() {
  68880. if (!supportCssPointerEvents && ghostEl) {
  68881. css(ghostEl, 'display', '');
  68882. }
  68883. }; // #1184 fix - Prevent click event on fallback if dragged but item not changed position
  68884. if (documentExists) {
  68885. document.addEventListener('click', function (evt) {
  68886. if (ignoreNextClick) {
  68887. evt.preventDefault();
  68888. evt.stopPropagation && evt.stopPropagation();
  68889. evt.stopImmediatePropagation && evt.stopImmediatePropagation();
  68890. ignoreNextClick = false;
  68891. return false;
  68892. }
  68893. }, true);
  68894. }
  68895. var nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {
  68896. if (dragEl) {
  68897. evt = evt.touches ? evt.touches[0] : evt;
  68898. var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);
  68899. if (nearest) {
  68900. // Create imitation event
  68901. var event = {};
  68902. for (var i in evt) {
  68903. if (evt.hasOwnProperty(i)) {
  68904. event[i] = evt[i];
  68905. }
  68906. }
  68907. event.target = event.rootEl = nearest;
  68908. event.preventDefault = void 0;
  68909. event.stopPropagation = void 0;
  68910. nearest[expando]._onDragOver(event);
  68911. }
  68912. }
  68913. };
  68914. var _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {
  68915. if (dragEl) {
  68916. dragEl.parentNode[expando]._isOutsideThisEl(evt.target);
  68917. }
  68918. };
  68919. /**
  68920. * @class Sortable
  68921. * @param {HTMLElement} el
  68922. * @param {Object} [options]
  68923. */
  68924. function Sortable(el, options) {
  68925. if (!(el && el.nodeType && el.nodeType === 1)) {
  68926. throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(el));
  68927. }
  68928. this.el = el; // root element
  68929. this.options = options = _extends({}, options); // Export instance
  68930. el[expando] = this;
  68931. var defaults = {
  68932. group: null,
  68933. sort: true,
  68934. disabled: false,
  68935. store: null,
  68936. handle: null,
  68937. draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',
  68938. swapThreshold: 1,
  68939. // percentage; 0 <= x <= 1
  68940. invertSwap: false,
  68941. // invert always
  68942. invertedSwapThreshold: null,
  68943. // will be set to same as swapThreshold if default
  68944. removeCloneOnHide: true,
  68945. direction: function direction() {
  68946. return _detectDirection(el, this.options);
  68947. },
  68948. ghostClass: 'sortable-ghost',
  68949. chosenClass: 'sortable-chosen',
  68950. dragClass: 'sortable-drag',
  68951. ignore: 'a, img',
  68952. filter: null,
  68953. preventOnFilter: true,
  68954. animation: 0,
  68955. easing: null,
  68956. setData: function setData(dataTransfer, dragEl) {
  68957. dataTransfer.setData('Text', dragEl.textContent);
  68958. },
  68959. dropBubble: false,
  68960. dragoverBubble: false,
  68961. dataIdAttr: 'data-id',
  68962. delay: 0,
  68963. delayOnTouchOnly: false,
  68964. touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
  68965. forceFallback: false,
  68966. fallbackClass: 'sortable-fallback',
  68967. fallbackOnBody: false,
  68968. fallbackTolerance: 0,
  68969. fallbackOffset: {
  68970. x: 0,
  68971. y: 0
  68972. },
  68973. supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && !Safari,
  68974. emptyInsertThreshold: 5
  68975. };
  68976. PluginManager.initializePlugins(this, el, defaults); // Set default options
  68977. for (var name in defaults) {
  68978. !(name in options) && (options[name] = defaults[name]);
  68979. }
  68980. _prepareGroup(options); // Bind all private methods
  68981. for (var fn in this) {
  68982. if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
  68983. this[fn] = this[fn].bind(this);
  68984. }
  68985. } // Setup drag mode
  68986. this.nativeDraggable = options.forceFallback ? false : supportDraggable;
  68987. if (this.nativeDraggable) {
  68988. // Touch start threshold cannot be greater than the native dragstart threshold
  68989. this.options.touchStartThreshold = 1;
  68990. } // Bind events
  68991. if (options.supportPointer) {
  68992. on(el, 'pointerdown', this._onTapStart);
  68993. } else {
  68994. on(el, 'mousedown', this._onTapStart);
  68995. on(el, 'touchstart', this._onTapStart);
  68996. }
  68997. if (this.nativeDraggable) {
  68998. on(el, 'dragover', this);
  68999. on(el, 'dragenter', this);
  69000. }
  69001. sortables.push(this.el); // Restore sorting
  69002. options.store && options.store.get && this.sort(options.store.get(this) || []); // Add animation state manager
  69003. _extends(this, AnimationStateManager());
  69004. }
  69005. Sortable.prototype =
  69006. /** @lends Sortable.prototype */
  69007. {
  69008. constructor: Sortable,
  69009. _isOutsideThisEl: function _isOutsideThisEl(target) {
  69010. if (!this.el.contains(target) && target !== this.el) {
  69011. lastTarget = null;
  69012. }
  69013. },
  69014. _getDirection: function _getDirection(evt, target) {
  69015. return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;
  69016. },
  69017. _onTapStart: function _onTapStart(
  69018. /** Event|TouchEvent */
  69019. evt) {
  69020. if (!evt.cancelable) return;
  69021. var _this = this,
  69022. el = this.el,
  69023. options = this.options,
  69024. preventOnFilter = options.preventOnFilter,
  69025. type = evt.type,
  69026. touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,
  69027. target = (touch || evt).target,
  69028. originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,
  69029. filter = options.filter;
  69030. _saveInputCheckedState(el); // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.
  69031. if (dragEl) {
  69032. return;
  69033. }
  69034. if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {
  69035. return; // only left button and enabled
  69036. } // cancel dnd if original target is content editable
  69037. if (originalTarget.isContentEditable) {
  69038. return;
  69039. } // Safari ignores further event handling after mousedown
  69040. if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {
  69041. return;
  69042. }
  69043. target = closest(target, options.draggable, el, false);
  69044. if (target && target.animated) {
  69045. return;
  69046. }
  69047. if (lastDownEl === target) {
  69048. // Ignoring duplicate `down`
  69049. return;
  69050. } // Get the index of the dragged element within its parent
  69051. oldIndex = index(target);
  69052. oldDraggableIndex = index(target, options.draggable); // Check filter
  69053. if (typeof filter === 'function') {
  69054. if (filter.call(this, evt, target, this)) {
  69055. _dispatchEvent({
  69056. sortable: _this,
  69057. rootEl: originalTarget,
  69058. name: 'filter',
  69059. targetEl: target,
  69060. toEl: el,
  69061. fromEl: el
  69062. });
  69063. pluginEvent('filter', _this, {
  69064. evt: evt
  69065. });
  69066. preventOnFilter && evt.cancelable && evt.preventDefault();
  69067. return; // cancel dnd
  69068. }
  69069. } else if (filter) {
  69070. filter = filter.split(',').some(function (criteria) {
  69071. criteria = closest(originalTarget, criteria.trim(), el, false);
  69072. if (criteria) {
  69073. _dispatchEvent({
  69074. sortable: _this,
  69075. rootEl: criteria,
  69076. name: 'filter',
  69077. targetEl: target,
  69078. fromEl: el,
  69079. toEl: el
  69080. });
  69081. pluginEvent('filter', _this, {
  69082. evt: evt
  69083. });
  69084. return true;
  69085. }
  69086. });
  69087. if (filter) {
  69088. preventOnFilter && evt.cancelable && evt.preventDefault();
  69089. return; // cancel dnd
  69090. }
  69091. }
  69092. if (options.handle && !closest(originalTarget, options.handle, el, false)) {
  69093. return;
  69094. } // Prepare `dragstart`
  69095. this._prepareDragStart(evt, touch, target);
  69096. },
  69097. _prepareDragStart: function _prepareDragStart(
  69098. /** Event */
  69099. evt,
  69100. /** Touch */
  69101. touch,
  69102. /** HTMLElement */
  69103. target) {
  69104. var _this = this,
  69105. el = _this.el,
  69106. options = _this.options,
  69107. ownerDocument = el.ownerDocument,
  69108. dragStartFn;
  69109. if (target && !dragEl && target.parentNode === el) {
  69110. var dragRect = getRect(target);
  69111. rootEl = el;
  69112. dragEl = target;
  69113. parentEl = dragEl.parentNode;
  69114. nextEl = dragEl.nextSibling;
  69115. lastDownEl = target;
  69116. activeGroup = options.group;
  69117. Sortable.dragged = dragEl;
  69118. tapEvt = {
  69119. target: dragEl,
  69120. clientX: (touch || evt).clientX,
  69121. clientY: (touch || evt).clientY
  69122. };
  69123. tapDistanceLeft = tapEvt.clientX - dragRect.left;
  69124. tapDistanceTop = tapEvt.clientY - dragRect.top;
  69125. this._lastX = (touch || evt).clientX;
  69126. this._lastY = (touch || evt).clientY;
  69127. dragEl.style['will-change'] = 'all';
  69128. dragStartFn = function dragStartFn() {
  69129. pluginEvent('delayEnded', _this, {
  69130. evt: evt
  69131. });
  69132. if (Sortable.eventCanceled) {
  69133. _this._onDrop();
  69134. return;
  69135. } // Delayed drag has been triggered
  69136. // we can re-enable the events: touchmove/mousemove
  69137. _this._disableDelayedDragEvents();
  69138. if (!FireFox && _this.nativeDraggable) {
  69139. dragEl.draggable = true;
  69140. } // Bind the events: dragstart/dragend
  69141. _this._triggerDragStart(evt, touch); // Drag start event
  69142. _dispatchEvent({
  69143. sortable: _this,
  69144. name: 'choose',
  69145. originalEvent: evt
  69146. }); // Chosen item
  69147. toggleClass(dragEl, options.chosenClass, true);
  69148. }; // Disable "draggable"
  69149. options.ignore.split(',').forEach(function (criteria) {
  69150. find(dragEl, criteria.trim(), _disableDraggable);
  69151. });
  69152. on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);
  69153. on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);
  69154. on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);
  69155. on(ownerDocument, 'mouseup', _this._onDrop);
  69156. on(ownerDocument, 'touchend', _this._onDrop);
  69157. on(ownerDocument, 'touchcancel', _this._onDrop); // Make dragEl draggable (must be before delay for FireFox)
  69158. if (FireFox && this.nativeDraggable) {
  69159. this.options.touchStartThreshold = 4;
  69160. dragEl.draggable = true;
  69161. }
  69162. pluginEvent('delayStart', this, {
  69163. evt: evt
  69164. }); // Delay is impossible for native DnD in Edge or IE
  69165. if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {
  69166. if (Sortable.eventCanceled) {
  69167. this._onDrop();
  69168. return;
  69169. } // If the user moves the pointer or let go the click or touch
  69170. // before the delay has been reached:
  69171. // disable the delayed drag
  69172. on(ownerDocument, 'mouseup', _this._disableDelayedDrag);
  69173. on(ownerDocument, 'touchend', _this._disableDelayedDrag);
  69174. on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);
  69175. on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);
  69176. on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);
  69177. options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);
  69178. _this._dragStartTimer = setTimeout(dragStartFn, options.delay);
  69179. } else {
  69180. dragStartFn();
  69181. }
  69182. }
  69183. },
  69184. _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler(
  69185. /** TouchEvent|PointerEvent **/
  69186. e) {
  69187. var touch = e.touches ? e.touches[0] : e;
  69188. if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {
  69189. this._disableDelayedDrag();
  69190. }
  69191. },
  69192. _disableDelayedDrag: function _disableDelayedDrag() {
  69193. dragEl && _disableDraggable(dragEl);
  69194. clearTimeout(this._dragStartTimer);
  69195. this._disableDelayedDragEvents();
  69196. },
  69197. _disableDelayedDragEvents: function _disableDelayedDragEvents() {
  69198. var ownerDocument = this.el.ownerDocument;
  69199. off(ownerDocument, 'mouseup', this._disableDelayedDrag);
  69200. off(ownerDocument, 'touchend', this._disableDelayedDrag);
  69201. off(ownerDocument, 'touchcancel', this._disableDelayedDrag);
  69202. off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);
  69203. off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);
  69204. off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);
  69205. },
  69206. _triggerDragStart: function _triggerDragStart(
  69207. /** Event */
  69208. evt,
  69209. /** Touch */
  69210. touch) {
  69211. touch = touch || evt.pointerType == 'touch' && evt;
  69212. if (!this.nativeDraggable || touch) {
  69213. if (this.options.supportPointer) {
  69214. on(document, 'pointermove', this._onTouchMove);
  69215. } else if (touch) {
  69216. on(document, 'touchmove', this._onTouchMove);
  69217. } else {
  69218. on(document, 'mousemove', this._onTouchMove);
  69219. }
  69220. } else {
  69221. on(dragEl, 'dragend', this);
  69222. on(rootEl, 'dragstart', this._onDragStart);
  69223. }
  69224. try {
  69225. if (document.selection) {
  69226. // Timeout neccessary for IE9
  69227. _nextTick(function () {
  69228. document.selection.empty();
  69229. });
  69230. } else {
  69231. window.getSelection().removeAllRanges();
  69232. }
  69233. } catch (err) {}
  69234. },
  69235. _dragStarted: function _dragStarted(fallback, evt) {
  69236. awaitingDragStarted = false;
  69237. if (rootEl && dragEl) {
  69238. pluginEvent('dragStarted', this, {
  69239. evt: evt
  69240. });
  69241. if (this.nativeDraggable) {
  69242. on(document, 'dragover', _checkOutsideTargetEl);
  69243. }
  69244. var options = this.options; // Apply effect
  69245. !fallback && toggleClass(dragEl, options.dragClass, false);
  69246. toggleClass(dragEl, options.ghostClass, true);
  69247. Sortable.active = this;
  69248. fallback && this._appendGhost(); // Drag start event
  69249. _dispatchEvent({
  69250. sortable: this,
  69251. name: 'start',
  69252. originalEvent: evt
  69253. });
  69254. } else {
  69255. this._nulling();
  69256. }
  69257. },
  69258. _emulateDragOver: function _emulateDragOver() {
  69259. if (touchEvt) {
  69260. this._lastX = touchEvt.clientX;
  69261. this._lastY = touchEvt.clientY;
  69262. _hideGhostForTarget();
  69263. var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
  69264. var parent = target;
  69265. while (target && target.shadowRoot) {
  69266. target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
  69267. if (target === parent) break;
  69268. parent = target;
  69269. }
  69270. dragEl.parentNode[expando]._isOutsideThisEl(target);
  69271. if (parent) {
  69272. do {
  69273. if (parent[expando]) {
  69274. var inserted = void 0;
  69275. inserted = parent[expando]._onDragOver({
  69276. clientX: touchEvt.clientX,
  69277. clientY: touchEvt.clientY,
  69278. target: target,
  69279. rootEl: parent
  69280. });
  69281. if (inserted && !this.options.dragoverBubble) {
  69282. break;
  69283. }
  69284. }
  69285. target = parent; // store last element
  69286. }
  69287. /* jshint boss:true */
  69288. while (parent = parent.parentNode);
  69289. }
  69290. _unhideGhostForTarget();
  69291. }
  69292. },
  69293. _onTouchMove: function _onTouchMove(
  69294. /**TouchEvent*/
  69295. evt) {
  69296. if (tapEvt) {
  69297. var options = this.options,
  69298. fallbackTolerance = options.fallbackTolerance,
  69299. fallbackOffset = options.fallbackOffset,
  69300. touch = evt.touches ? evt.touches[0] : evt,
  69301. ghostMatrix = ghostEl && matrix(ghostEl, true),
  69302. scaleX = ghostEl && ghostMatrix && ghostMatrix.a,
  69303. scaleY = ghostEl && ghostMatrix && ghostMatrix.d,
  69304. relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),
  69305. dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),
  69306. dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1); // only set the status to dragging, when we are actually dragging
  69307. if (!Sortable.active && !awaitingDragStarted) {
  69308. if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {
  69309. return;
  69310. }
  69311. this._onDragStart(evt, true);
  69312. }
  69313. if (ghostEl) {
  69314. if (ghostMatrix) {
  69315. ghostMatrix.e += dx - (lastDx || 0);
  69316. ghostMatrix.f += dy - (lastDy || 0);
  69317. } else {
  69318. ghostMatrix = {
  69319. a: 1,
  69320. b: 0,
  69321. c: 0,
  69322. d: 1,
  69323. e: dx,
  69324. f: dy
  69325. };
  69326. }
  69327. var cssMatrix = "matrix(".concat(ghostMatrix.a, ",").concat(ghostMatrix.b, ",").concat(ghostMatrix.c, ",").concat(ghostMatrix.d, ",").concat(ghostMatrix.e, ",").concat(ghostMatrix.f, ")");
  69328. css(ghostEl, 'webkitTransform', cssMatrix);
  69329. css(ghostEl, 'mozTransform', cssMatrix);
  69330. css(ghostEl, 'msTransform', cssMatrix);
  69331. css(ghostEl, 'transform', cssMatrix);
  69332. lastDx = dx;
  69333. lastDy = dy;
  69334. touchEvt = touch;
  69335. }
  69336. evt.cancelable && evt.preventDefault();
  69337. }
  69338. },
  69339. _appendGhost: function _appendGhost() {
  69340. // Bug if using scale(): https://stackoverflow.com/questions/2637058
  69341. // Not being adjusted for
  69342. if (!ghostEl) {
  69343. var container = this.options.fallbackOnBody ? document.body : rootEl,
  69344. rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),
  69345. options = this.options; // Position absolutely
  69346. if (PositionGhostAbsolutely) {
  69347. // Get relatively positioned parent
  69348. ghostRelativeParent = container;
  69349. while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {
  69350. ghostRelativeParent = ghostRelativeParent.parentNode;
  69351. }
  69352. if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {
  69353. if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();
  69354. rect.top += ghostRelativeParent.scrollTop;
  69355. rect.left += ghostRelativeParent.scrollLeft;
  69356. } else {
  69357. ghostRelativeParent = getWindowScrollingElement();
  69358. }
  69359. ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);
  69360. }
  69361. ghostEl = dragEl.cloneNode(true);
  69362. toggleClass(ghostEl, options.ghostClass, false);
  69363. toggleClass(ghostEl, options.fallbackClass, true);
  69364. toggleClass(ghostEl, options.dragClass, true);
  69365. css(ghostEl, 'transition', '');
  69366. css(ghostEl, 'transform', '');
  69367. css(ghostEl, 'box-sizing', 'border-box');
  69368. css(ghostEl, 'margin', 0);
  69369. css(ghostEl, 'top', rect.top);
  69370. css(ghostEl, 'left', rect.left);
  69371. css(ghostEl, 'width', rect.width);
  69372. css(ghostEl, 'height', rect.height);
  69373. css(ghostEl, 'opacity', '0.8');
  69374. css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');
  69375. css(ghostEl, 'zIndex', '100000');
  69376. css(ghostEl, 'pointerEvents', 'none');
  69377. Sortable.ghost = ghostEl;
  69378. container.appendChild(ghostEl); // Set transform-origin
  69379. css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');
  69380. }
  69381. },
  69382. _onDragStart: function _onDragStart(
  69383. /**Event*/
  69384. evt,
  69385. /**boolean*/
  69386. fallback) {
  69387. var _this = this;
  69388. var dataTransfer = evt.dataTransfer;
  69389. var options = _this.options;
  69390. pluginEvent('dragStart', this, {
  69391. evt: evt
  69392. });
  69393. if (Sortable.eventCanceled) {
  69394. this._onDrop();
  69395. return;
  69396. }
  69397. pluginEvent('setupClone', this);
  69398. if (!Sortable.eventCanceled) {
  69399. cloneEl = clone(dragEl);
  69400. cloneEl.draggable = false;
  69401. cloneEl.style['will-change'] = '';
  69402. this._hideClone();
  69403. toggleClass(cloneEl, this.options.chosenClass, false);
  69404. Sortable.clone = cloneEl;
  69405. } // #1143: IFrame support workaround
  69406. _this.cloneId = _nextTick(function () {
  69407. pluginEvent('clone', _this);
  69408. if (Sortable.eventCanceled) return;
  69409. if (!_this.options.removeCloneOnHide) {
  69410. rootEl.insertBefore(cloneEl, dragEl);
  69411. }
  69412. _this._hideClone();
  69413. _dispatchEvent({
  69414. sortable: _this,
  69415. name: 'clone'
  69416. });
  69417. });
  69418. !fallback && toggleClass(dragEl, options.dragClass, true); // Set proper drop events
  69419. if (fallback) {
  69420. ignoreNextClick = true;
  69421. _this._loopId = setInterval(_this._emulateDragOver, 50);
  69422. } else {
  69423. // Undo what was set in _prepareDragStart before drag started
  69424. off(document, 'mouseup', _this._onDrop);
  69425. off(document, 'touchend', _this._onDrop);
  69426. off(document, 'touchcancel', _this._onDrop);
  69427. if (dataTransfer) {
  69428. dataTransfer.effectAllowed = 'move';
  69429. options.setData && options.setData.call(_this, dataTransfer, dragEl);
  69430. }
  69431. on(document, 'drop', _this); // #1276 fix:
  69432. css(dragEl, 'transform', 'translateZ(0)');
  69433. }
  69434. awaitingDragStarted = true;
  69435. _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));
  69436. on(document, 'selectstart', _this);
  69437. moved = true;
  69438. if (Safari) {
  69439. css(document.body, 'user-select', 'none');
  69440. }
  69441. },
  69442. // Returns true - if no further action is needed (either inserted or another condition)
  69443. _onDragOver: function _onDragOver(
  69444. /**Event*/
  69445. evt) {
  69446. var el = this.el,
  69447. target = evt.target,
  69448. dragRect,
  69449. targetRect,
  69450. revert,
  69451. options = this.options,
  69452. group = options.group,
  69453. activeSortable = Sortable.active,
  69454. isOwner = activeGroup === group,
  69455. canSort = options.sort,
  69456. fromSortable = putSortable || activeSortable,
  69457. vertical,
  69458. _this = this,
  69459. completedFired = false;
  69460. if (_silent) return;
  69461. function dragOverEvent(name, extra) {
  69462. pluginEvent(name, _this, _objectSpread2({
  69463. evt: evt,
  69464. isOwner: isOwner,
  69465. axis: vertical ? 'vertical' : 'horizontal',
  69466. revert: revert,
  69467. dragRect: dragRect,
  69468. targetRect: targetRect,
  69469. canSort: canSort,
  69470. fromSortable: fromSortable,
  69471. target: target,
  69472. completed: completed,
  69473. onMove: function onMove(target, after) {
  69474. return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);
  69475. },
  69476. changed: changed
  69477. }, extra));
  69478. } // Capture animation state
  69479. function capture() {
  69480. dragOverEvent('dragOverAnimationCapture');
  69481. _this.captureAnimationState();
  69482. if (_this !== fromSortable) {
  69483. fromSortable.captureAnimationState();
  69484. }
  69485. } // Return invocation when dragEl is inserted (or completed)
  69486. function completed(insertion) {
  69487. dragOverEvent('dragOverCompleted', {
  69488. insertion: insertion
  69489. });
  69490. if (insertion) {
  69491. // Clones must be hidden before folding animation to capture dragRectAbsolute properly
  69492. if (isOwner) {
  69493. activeSortable._hideClone();
  69494. } else {
  69495. activeSortable._showClone(_this);
  69496. }
  69497. if (_this !== fromSortable) {
  69498. // Set ghost class to new sortable's ghost class
  69499. toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);
  69500. toggleClass(dragEl, options.ghostClass, true);
  69501. }
  69502. if (putSortable !== _this && _this !== Sortable.active) {
  69503. putSortable = _this;
  69504. } else if (_this === Sortable.active && putSortable) {
  69505. putSortable = null;
  69506. } // Animation
  69507. if (fromSortable === _this) {
  69508. _this._ignoreWhileAnimating = target;
  69509. }
  69510. _this.animateAll(function () {
  69511. dragOverEvent('dragOverAnimationComplete');
  69512. _this._ignoreWhileAnimating = null;
  69513. });
  69514. if (_this !== fromSortable) {
  69515. fromSortable.animateAll();
  69516. fromSortable._ignoreWhileAnimating = null;
  69517. }
  69518. } // Null lastTarget if it is not inside a previously swapped element
  69519. if (target === dragEl && !dragEl.animated || target === el && !target.animated) {
  69520. lastTarget = null;
  69521. } // no bubbling and not fallback
  69522. if (!options.dragoverBubble && !evt.rootEl && target !== document) {
  69523. dragEl.parentNode[expando]._isOutsideThisEl(evt.target); // Do not detect for empty insert if already inserted
  69524. !insertion && nearestEmptyInsertDetectEvent(evt);
  69525. }
  69526. !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();
  69527. return completedFired = true;
  69528. } // Call when dragEl has been inserted
  69529. function changed() {
  69530. newIndex = index(dragEl);
  69531. newDraggableIndex = index(dragEl, options.draggable);
  69532. _dispatchEvent({
  69533. sortable: _this,
  69534. name: 'change',
  69535. toEl: el,
  69536. newIndex: newIndex,
  69537. newDraggableIndex: newDraggableIndex,
  69538. originalEvent: evt
  69539. });
  69540. }
  69541. if (evt.preventDefault !== void 0) {
  69542. evt.cancelable && evt.preventDefault();
  69543. }
  69544. target = closest(target, options.draggable, el, true);
  69545. dragOverEvent('dragOver');
  69546. if (Sortable.eventCanceled) return completedFired;
  69547. if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {
  69548. return completed(false);
  69549. }
  69550. ignoreNextClick = false;
  69551. if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list
  69552. : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {
  69553. vertical = this._getDirection(evt, target) === 'vertical';
  69554. dragRect = getRect(dragEl);
  69555. dragOverEvent('dragOverValid');
  69556. if (Sortable.eventCanceled) return completedFired;
  69557. if (revert) {
  69558. parentEl = rootEl; // actualization
  69559. capture();
  69560. this._hideClone();
  69561. dragOverEvent('revert');
  69562. if (!Sortable.eventCanceled) {
  69563. if (nextEl) {
  69564. rootEl.insertBefore(dragEl, nextEl);
  69565. } else {
  69566. rootEl.appendChild(dragEl);
  69567. }
  69568. }
  69569. return completed(true);
  69570. }
  69571. var elLastChild = lastChild(el, options.draggable);
  69572. if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {
  69573. // Insert to end of list
  69574. // If already at end of list: Do not insert
  69575. if (elLastChild === dragEl) {
  69576. return completed(false);
  69577. } // if there is a last element, it is the target
  69578. if (elLastChild && el === evt.target) {
  69579. target = elLastChild;
  69580. }
  69581. if (target) {
  69582. targetRect = getRect(target);
  69583. }
  69584. if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {
  69585. capture();
  69586. el.appendChild(dragEl);
  69587. parentEl = el; // actualization
  69588. changed();
  69589. return completed(true);
  69590. }
  69591. } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {
  69592. // Insert to start of list
  69593. var firstChild = getChild(el, 0, options, true);
  69594. if (firstChild === dragEl) {
  69595. return completed(false);
  69596. }
  69597. target = firstChild;
  69598. targetRect = getRect(target);
  69599. if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {
  69600. capture();
  69601. el.insertBefore(dragEl, firstChild);
  69602. parentEl = el; // actualization
  69603. changed();
  69604. return completed(true);
  69605. }
  69606. } else if (target.parentNode === el) {
  69607. targetRect = getRect(target);
  69608. var direction = 0,
  69609. targetBeforeFirstSwap,
  69610. differentLevel = dragEl.parentNode !== el,
  69611. differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),
  69612. side1 = vertical ? 'top' : 'left',
  69613. scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),
  69614. scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;
  69615. if (lastTarget !== target) {
  69616. targetBeforeFirstSwap = targetRect[side1];
  69617. pastFirstInvertThresh = false;
  69618. isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;
  69619. }
  69620. direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);
  69621. var sibling;
  69622. if (direction !== 0) {
  69623. // Check if target is beside dragEl in respective direction (ignoring hidden elements)
  69624. var dragIndex = index(dragEl);
  69625. do {
  69626. dragIndex -= direction;
  69627. sibling = parentEl.children[dragIndex];
  69628. } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));
  69629. } // If dragEl is already beside target: Do not insert
  69630. if (direction === 0 || sibling === target) {
  69631. return completed(false);
  69632. }
  69633. lastTarget = target;
  69634. lastDirection = direction;
  69635. var nextSibling = target.nextElementSibling,
  69636. after = false;
  69637. after = direction === 1;
  69638. var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);
  69639. if (moveVector !== false) {
  69640. if (moveVector === 1 || moveVector === -1) {
  69641. after = moveVector === 1;
  69642. }
  69643. _silent = true;
  69644. setTimeout(_unsilent, 30);
  69645. capture();
  69646. if (after && !nextSibling) {
  69647. el.appendChild(dragEl);
  69648. } else {
  69649. target.parentNode.insertBefore(dragEl, after ? nextSibling : target);
  69650. } // Undo chrome's scroll adjustment (has no effect on other browsers)
  69651. if (scrolledPastTop) {
  69652. scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);
  69653. }
  69654. parentEl = dragEl.parentNode; // actualization
  69655. // must be done before animation
  69656. if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {
  69657. targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);
  69658. }
  69659. changed();
  69660. return completed(true);
  69661. }
  69662. }
  69663. if (el.contains(dragEl)) {
  69664. return completed(false);
  69665. }
  69666. }
  69667. return false;
  69668. },
  69669. _ignoreWhileAnimating: null,
  69670. _offMoveEvents: function _offMoveEvents() {
  69671. off(document, 'mousemove', this._onTouchMove);
  69672. off(document, 'touchmove', this._onTouchMove);
  69673. off(document, 'pointermove', this._onTouchMove);
  69674. off(document, 'dragover', nearestEmptyInsertDetectEvent);
  69675. off(document, 'mousemove', nearestEmptyInsertDetectEvent);
  69676. off(document, 'touchmove', nearestEmptyInsertDetectEvent);
  69677. },
  69678. _offUpEvents: function _offUpEvents() {
  69679. var ownerDocument = this.el.ownerDocument;
  69680. off(ownerDocument, 'mouseup', this._onDrop);
  69681. off(ownerDocument, 'touchend', this._onDrop);
  69682. off(ownerDocument, 'pointerup', this._onDrop);
  69683. off(ownerDocument, 'touchcancel', this._onDrop);
  69684. off(document, 'selectstart', this);
  69685. },
  69686. _onDrop: function _onDrop(
  69687. /**Event*/
  69688. evt) {
  69689. var el = this.el,
  69690. options = this.options; // Get the index of the dragged element within its parent
  69691. newIndex = index(dragEl);
  69692. newDraggableIndex = index(dragEl, options.draggable);
  69693. pluginEvent('drop', this, {
  69694. evt: evt
  69695. });
  69696. parentEl = dragEl && dragEl.parentNode; // Get again after plugin event
  69697. newIndex = index(dragEl);
  69698. newDraggableIndex = index(dragEl, options.draggable);
  69699. if (Sortable.eventCanceled) {
  69700. this._nulling();
  69701. return;
  69702. }
  69703. awaitingDragStarted = false;
  69704. isCircumstantialInvert = false;
  69705. pastFirstInvertThresh = false;
  69706. clearInterval(this._loopId);
  69707. clearTimeout(this._dragStartTimer);
  69708. _cancelNextTick(this.cloneId);
  69709. _cancelNextTick(this._dragStartId); // Unbind events
  69710. if (this.nativeDraggable) {
  69711. off(document, 'drop', this);
  69712. off(el, 'dragstart', this._onDragStart);
  69713. }
  69714. this._offMoveEvents();
  69715. this._offUpEvents();
  69716. if (Safari) {
  69717. css(document.body, 'user-select', '');
  69718. }
  69719. css(dragEl, 'transform', '');
  69720. if (evt) {
  69721. if (moved) {
  69722. evt.cancelable && evt.preventDefault();
  69723. !options.dropBubble && evt.stopPropagation();
  69724. }
  69725. ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);
  69726. if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {
  69727. // Remove clone(s)
  69728. cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);
  69729. }
  69730. if (dragEl) {
  69731. if (this.nativeDraggable) {
  69732. off(dragEl, 'dragend', this);
  69733. }
  69734. _disableDraggable(dragEl);
  69735. dragEl.style['will-change'] = ''; // Remove classes
  69736. // ghostClass is added in dragStarted
  69737. if (moved && !awaitingDragStarted) {
  69738. toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);
  69739. }
  69740. toggleClass(dragEl, this.options.chosenClass, false); // Drag stop event
  69741. _dispatchEvent({
  69742. sortable: this,
  69743. name: 'unchoose',
  69744. toEl: parentEl,
  69745. newIndex: null,
  69746. newDraggableIndex: null,
  69747. originalEvent: evt
  69748. });
  69749. if (rootEl !== parentEl) {
  69750. if (newIndex >= 0) {
  69751. // Add event
  69752. _dispatchEvent({
  69753. rootEl: parentEl,
  69754. name: 'add',
  69755. toEl: parentEl,
  69756. fromEl: rootEl,
  69757. originalEvent: evt
  69758. }); // Remove event
  69759. _dispatchEvent({
  69760. sortable: this,
  69761. name: 'remove',
  69762. toEl: parentEl,
  69763. originalEvent: evt
  69764. }); // drag from one list and drop into another
  69765. _dispatchEvent({
  69766. rootEl: parentEl,
  69767. name: 'sort',
  69768. toEl: parentEl,
  69769. fromEl: rootEl,
  69770. originalEvent: evt
  69771. });
  69772. _dispatchEvent({
  69773. sortable: this,
  69774. name: 'sort',
  69775. toEl: parentEl,
  69776. originalEvent: evt
  69777. });
  69778. }
  69779. putSortable && putSortable.save();
  69780. } else {
  69781. if (newIndex !== oldIndex) {
  69782. if (newIndex >= 0) {
  69783. // drag & drop within the same list
  69784. _dispatchEvent({
  69785. sortable: this,
  69786. name: 'update',
  69787. toEl: parentEl,
  69788. originalEvent: evt
  69789. });
  69790. _dispatchEvent({
  69791. sortable: this,
  69792. name: 'sort',
  69793. toEl: parentEl,
  69794. originalEvent: evt
  69795. });
  69796. }
  69797. }
  69798. }
  69799. if (Sortable.active) {
  69800. /* jshint eqnull:true */
  69801. if (newIndex == null || newIndex === -1) {
  69802. newIndex = oldIndex;
  69803. newDraggableIndex = oldDraggableIndex;
  69804. }
  69805. _dispatchEvent({
  69806. sortable: this,
  69807. name: 'end',
  69808. toEl: parentEl,
  69809. originalEvent: evt
  69810. }); // Save sorting
  69811. this.save();
  69812. }
  69813. }
  69814. }
  69815. this._nulling();
  69816. },
  69817. _nulling: function _nulling() {
  69818. pluginEvent('nulling', this);
  69819. rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;
  69820. savedInputChecked.forEach(function (el) {
  69821. el.checked = true;
  69822. });
  69823. savedInputChecked.length = lastDx = lastDy = 0;
  69824. },
  69825. handleEvent: function handleEvent(
  69826. /**Event*/
  69827. evt) {
  69828. switch (evt.type) {
  69829. case 'drop':
  69830. case 'dragend':
  69831. this._onDrop(evt);
  69832. break;
  69833. case 'dragenter':
  69834. case 'dragover':
  69835. if (dragEl) {
  69836. this._onDragOver(evt);
  69837. _globalDragOver(evt);
  69838. }
  69839. break;
  69840. case 'selectstart':
  69841. evt.preventDefault();
  69842. break;
  69843. }
  69844. },
  69845. /**
  69846. * Serializes the item into an array of string.
  69847. * @returns {String[]}
  69848. */
  69849. toArray: function toArray() {
  69850. var order = [],
  69851. el,
  69852. children = this.el.children,
  69853. i = 0,
  69854. n = children.length,
  69855. options = this.options;
  69856. for (; i < n; i++) {
  69857. el = children[i];
  69858. if (closest(el, options.draggable, this.el, false)) {
  69859. order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));
  69860. }
  69861. }
  69862. return order;
  69863. },
  69864. /**
  69865. * Sorts the elements according to the array.
  69866. * @param {String[]} order order of the items
  69867. */
  69868. sort: function sort(order, useAnimation) {
  69869. var items = {},
  69870. rootEl = this.el;
  69871. this.toArray().forEach(function (id, i) {
  69872. var el = rootEl.children[i];
  69873. if (closest(el, this.options.draggable, rootEl, false)) {
  69874. items[id] = el;
  69875. }
  69876. }, this);
  69877. useAnimation && this.captureAnimationState();
  69878. order.forEach(function (id) {
  69879. if (items[id]) {
  69880. rootEl.removeChild(items[id]);
  69881. rootEl.appendChild(items[id]);
  69882. }
  69883. });
  69884. useAnimation && this.animateAll();
  69885. },
  69886. /**
  69887. * Save the current sorting
  69888. */
  69889. save: function save() {
  69890. var store = this.options.store;
  69891. store && store.set && store.set(this);
  69892. },
  69893. /**
  69894. * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
  69895. * @param {HTMLElement} el
  69896. * @param {String} [selector] default: `options.draggable`
  69897. * @returns {HTMLElement|null}
  69898. */
  69899. closest: function closest$1(el, selector) {
  69900. return closest(el, selector || this.options.draggable, this.el, false);
  69901. },
  69902. /**
  69903. * Set/get option
  69904. * @param {string} name
  69905. * @param {*} [value]
  69906. * @returns {*}
  69907. */
  69908. option: function option(name, value) {
  69909. var options = this.options;
  69910. if (value === void 0) {
  69911. return options[name];
  69912. } else {
  69913. var modifiedValue = PluginManager.modifyOption(this, name, value);
  69914. if (typeof modifiedValue !== 'undefined') {
  69915. options[name] = modifiedValue;
  69916. } else {
  69917. options[name] = value;
  69918. }
  69919. if (name === 'group') {
  69920. _prepareGroup(options);
  69921. }
  69922. }
  69923. },
  69924. /**
  69925. * Destroy
  69926. */
  69927. destroy: function destroy() {
  69928. pluginEvent('destroy', this);
  69929. var el = this.el;
  69930. el[expando] = null;
  69931. off(el, 'mousedown', this._onTapStart);
  69932. off(el, 'touchstart', this._onTapStart);
  69933. off(el, 'pointerdown', this._onTapStart);
  69934. if (this.nativeDraggable) {
  69935. off(el, 'dragover', this);
  69936. off(el, 'dragenter', this);
  69937. } // Remove draggable attributes
  69938. Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {
  69939. el.removeAttribute('draggable');
  69940. });
  69941. this._onDrop();
  69942. this._disableDelayedDragEvents();
  69943. sortables.splice(sortables.indexOf(this.el), 1);
  69944. this.el = el = null;
  69945. },
  69946. _hideClone: function _hideClone() {
  69947. if (!cloneHidden) {
  69948. pluginEvent('hideClone', this);
  69949. if (Sortable.eventCanceled) return;
  69950. css(cloneEl, 'display', 'none');
  69951. if (this.options.removeCloneOnHide && cloneEl.parentNode) {
  69952. cloneEl.parentNode.removeChild(cloneEl);
  69953. }
  69954. cloneHidden = true;
  69955. }
  69956. },
  69957. _showClone: function _showClone(putSortable) {
  69958. if (putSortable.lastPutMode !== 'clone') {
  69959. this._hideClone();
  69960. return;
  69961. }
  69962. if (cloneHidden) {
  69963. pluginEvent('showClone', this);
  69964. if (Sortable.eventCanceled) return; // show clone at dragEl or original position
  69965. if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {
  69966. rootEl.insertBefore(cloneEl, dragEl);
  69967. } else if (nextEl) {
  69968. rootEl.insertBefore(cloneEl, nextEl);
  69969. } else {
  69970. rootEl.appendChild(cloneEl);
  69971. }
  69972. if (this.options.group.revertClone) {
  69973. this.animate(dragEl, cloneEl);
  69974. }
  69975. css(cloneEl, 'display', '');
  69976. cloneHidden = false;
  69977. }
  69978. }
  69979. };
  69980. function _globalDragOver(
  69981. /**Event*/
  69982. evt) {
  69983. if (evt.dataTransfer) {
  69984. evt.dataTransfer.dropEffect = 'move';
  69985. }
  69986. evt.cancelable && evt.preventDefault();
  69987. }
  69988. function _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {
  69989. var evt,
  69990. sortable = fromEl[expando],
  69991. onMoveFn = sortable.options.onMove,
  69992. retVal; // Support for new CustomEvent feature
  69993. if (window.CustomEvent && !IE11OrLess && !Edge) {
  69994. evt = new CustomEvent('move', {
  69995. bubbles: true,
  69996. cancelable: true
  69997. });
  69998. } else {
  69999. evt = document.createEvent('Event');
  70000. evt.initEvent('move', true, true);
  70001. }
  70002. evt.to = toEl;
  70003. evt.from = fromEl;
  70004. evt.dragged = dragEl;
  70005. evt.draggedRect = dragRect;
  70006. evt.related = targetEl || toEl;
  70007. evt.relatedRect = targetRect || getRect(toEl);
  70008. evt.willInsertAfter = willInsertAfter;
  70009. evt.originalEvent = originalEvent;
  70010. fromEl.dispatchEvent(evt);
  70011. if (onMoveFn) {
  70012. retVal = onMoveFn.call(sortable, evt, originalEvent);
  70013. }
  70014. return retVal;
  70015. }
  70016. function _disableDraggable(el) {
  70017. el.draggable = false;
  70018. }
  70019. function _unsilent() {
  70020. _silent = false;
  70021. }
  70022. function _ghostIsFirst(evt, vertical, sortable) {
  70023. var rect = getRect(getChild(sortable.el, 0, sortable.options, true));
  70024. var spacer = 10;
  70025. return vertical ? evt.clientX < rect.left - spacer || evt.clientY < rect.top && evt.clientX < rect.right : evt.clientY < rect.top - spacer || evt.clientY < rect.bottom && evt.clientX < rect.left;
  70026. }
  70027. function _ghostIsLast(evt, vertical, sortable) {
  70028. var rect = getRect(lastChild(sortable.el, sortable.options.draggable));
  70029. var spacer = 10;
  70030. return vertical ? evt.clientX > rect.right + spacer || evt.clientX <= rect.right && evt.clientY > rect.bottom && evt.clientX >= rect.left : evt.clientX > rect.right && evt.clientY > rect.top || evt.clientX <= rect.right && evt.clientY > rect.bottom + spacer;
  70031. }
  70032. function _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {
  70033. var mouseOnAxis = vertical ? evt.clientY : evt.clientX,
  70034. targetLength = vertical ? targetRect.height : targetRect.width,
  70035. targetS1 = vertical ? targetRect.top : targetRect.left,
  70036. targetS2 = vertical ? targetRect.bottom : targetRect.right,
  70037. invert = false;
  70038. if (!invertSwap) {
  70039. // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold
  70040. if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {
  70041. // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2
  70042. // check if past first invert threshold on side opposite of lastDirection
  70043. if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {
  70044. // past first invert threshold, do not restrict inverted threshold to dragEl shadow
  70045. pastFirstInvertThresh = true;
  70046. }
  70047. if (!pastFirstInvertThresh) {
  70048. // dragEl shadow (target move distance shadow)
  70049. if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow
  70050. : mouseOnAxis > targetS2 - targetMoveDistance) {
  70051. return -lastDirection;
  70052. }
  70053. } else {
  70054. invert = true;
  70055. }
  70056. } else {
  70057. // Regular
  70058. if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {
  70059. return _getInsertDirection(target);
  70060. }
  70061. }
  70062. }
  70063. invert = invert || invertSwap;
  70064. if (invert) {
  70065. // Invert of regular
  70066. if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {
  70067. return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;
  70068. }
  70069. }
  70070. return 0;
  70071. }
  70072. /**
  70073. * Gets the direction dragEl must be swapped relative to target in order to make it
  70074. * seem that dragEl has been "inserted" into that element's position
  70075. * @param {HTMLElement} target The target whose position dragEl is being inserted at
  70076. * @return {Number} Direction dragEl must be swapped
  70077. */
  70078. function _getInsertDirection(target) {
  70079. if (index(dragEl) < index(target)) {
  70080. return 1;
  70081. } else {
  70082. return -1;
  70083. }
  70084. }
  70085. /**
  70086. * Generate id
  70087. * @param {HTMLElement} el
  70088. * @returns {String}
  70089. * @private
  70090. */
  70091. function _generateId(el) {
  70092. var str = el.tagName + el.className + el.src + el.href + el.textContent,
  70093. i = str.length,
  70094. sum = 0;
  70095. while (i--) {
  70096. sum += str.charCodeAt(i);
  70097. }
  70098. return sum.toString(36);
  70099. }
  70100. function _saveInputCheckedState(root) {
  70101. savedInputChecked.length = 0;
  70102. var inputs = root.getElementsByTagName('input');
  70103. var idx = inputs.length;
  70104. while (idx--) {
  70105. var el = inputs[idx];
  70106. el.checked && savedInputChecked.push(el);
  70107. }
  70108. }
  70109. function _nextTick(fn) {
  70110. return setTimeout(fn, 0);
  70111. }
  70112. function _cancelNextTick(id) {
  70113. return clearTimeout(id);
  70114. } // Fixed #973:
  70115. if (documentExists) {
  70116. on(document, 'touchmove', function (evt) {
  70117. if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {
  70118. evt.preventDefault();
  70119. }
  70120. });
  70121. } // Export utils
  70122. Sortable.utils = {
  70123. on: on,
  70124. off: off,
  70125. css: css,
  70126. find: find,
  70127. is: function is(el, selector) {
  70128. return !!closest(el, selector, el, false);
  70129. },
  70130. extend: extend,
  70131. throttle: throttle,
  70132. closest: closest,
  70133. toggleClass: toggleClass,
  70134. clone: clone,
  70135. index: index,
  70136. nextTick: _nextTick,
  70137. cancelNextTick: _cancelNextTick,
  70138. detectDirection: _detectDirection,
  70139. getChild: getChild
  70140. };
  70141. /**
  70142. * Get the Sortable instance of an element
  70143. * @param {HTMLElement} element The element
  70144. * @return {Sortable|undefined} The instance of Sortable
  70145. */
  70146. Sortable.get = function (element) {
  70147. return element[expando];
  70148. };
  70149. /**
  70150. * Mount a plugin to Sortable
  70151. * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted
  70152. */
  70153. Sortable.mount = function () {
  70154. for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {
  70155. plugins[_key] = arguments[_key];
  70156. }
  70157. if (plugins[0].constructor === Array) plugins = plugins[0];
  70158. plugins.forEach(function (plugin) {
  70159. if (!plugin.prototype || !plugin.prototype.constructor) {
  70160. throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(plugin));
  70161. }
  70162. if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);
  70163. PluginManager.mount(plugin);
  70164. });
  70165. };
  70166. /**
  70167. * Create sortable instance
  70168. * @param {HTMLElement} el
  70169. * @param {Object} [options]
  70170. */
  70171. Sortable.create = function (el, options) {
  70172. return new Sortable(el, options);
  70173. }; // Export
  70174. Sortable.version = version;
  70175. var autoScrolls = [],
  70176. scrollEl,
  70177. scrollRootEl,
  70178. scrolling = false,
  70179. lastAutoScrollX,
  70180. lastAutoScrollY,
  70181. touchEvt$1,
  70182. pointerElemChangedInterval;
  70183. function AutoScrollPlugin() {
  70184. function AutoScroll() {
  70185. this.defaults = {
  70186. scroll: true,
  70187. forceAutoScrollFallback: false,
  70188. scrollSensitivity: 30,
  70189. scrollSpeed: 10,
  70190. bubbleScroll: true
  70191. }; // Bind all private methods
  70192. for (var fn in this) {
  70193. if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
  70194. this[fn] = this[fn].bind(this);
  70195. }
  70196. }
  70197. }
  70198. AutoScroll.prototype = {
  70199. dragStarted: function dragStarted(_ref) {
  70200. var originalEvent = _ref.originalEvent;
  70201. if (this.sortable.nativeDraggable) {
  70202. on(document, 'dragover', this._handleAutoScroll);
  70203. } else {
  70204. if (this.options.supportPointer) {
  70205. on(document, 'pointermove', this._handleFallbackAutoScroll);
  70206. } else if (originalEvent.touches) {
  70207. on(document, 'touchmove', this._handleFallbackAutoScroll);
  70208. } else {
  70209. on(document, 'mousemove', this._handleFallbackAutoScroll);
  70210. }
  70211. }
  70212. },
  70213. dragOverCompleted: function dragOverCompleted(_ref2) {
  70214. var originalEvent = _ref2.originalEvent;
  70215. // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)
  70216. if (!this.options.dragOverBubble && !originalEvent.rootEl) {
  70217. this._handleAutoScroll(originalEvent);
  70218. }
  70219. },
  70220. drop: function drop() {
  70221. if (this.sortable.nativeDraggable) {
  70222. off(document, 'dragover', this._handleAutoScroll);
  70223. } else {
  70224. off(document, 'pointermove', this._handleFallbackAutoScroll);
  70225. off(document, 'touchmove', this._handleFallbackAutoScroll);
  70226. off(document, 'mousemove', this._handleFallbackAutoScroll);
  70227. }
  70228. clearPointerElemChangedInterval();
  70229. clearAutoScrolls();
  70230. cancelThrottle();
  70231. },
  70232. nulling: function nulling() {
  70233. touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;
  70234. autoScrolls.length = 0;
  70235. },
  70236. _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {
  70237. this._handleAutoScroll(evt, true);
  70238. },
  70239. _handleAutoScroll: function _handleAutoScroll(evt, fallback) {
  70240. var _this = this;
  70241. var x = (evt.touches ? evt.touches[0] : evt).clientX,
  70242. y = (evt.touches ? evt.touches[0] : evt).clientY,
  70243. elem = document.elementFromPoint(x, y);
  70244. touchEvt$1 = evt; // IE does not seem to have native autoscroll,
  70245. // Edge's autoscroll seems too conditional,
  70246. // MACOS Safari does not have autoscroll,
  70247. // Firefox and Chrome are good
  70248. if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {
  70249. autoScroll(evt, this.options, elem, fallback); // Listener for pointer element change
  70250. var ogElemScroller = getParentAutoScrollElement(elem, true);
  70251. if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {
  70252. pointerElemChangedInterval && clearPointerElemChangedInterval(); // Detect for pointer elem change, emulating native DnD behaviour
  70253. pointerElemChangedInterval = setInterval(function () {
  70254. var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);
  70255. if (newElem !== ogElemScroller) {
  70256. ogElemScroller = newElem;
  70257. clearAutoScrolls();
  70258. }
  70259. autoScroll(evt, _this.options, newElem, fallback);
  70260. }, 10);
  70261. lastAutoScrollX = x;
  70262. lastAutoScrollY = y;
  70263. }
  70264. } else {
  70265. // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll
  70266. if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {
  70267. clearAutoScrolls();
  70268. return;
  70269. }
  70270. autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);
  70271. }
  70272. }
  70273. };
  70274. return _extends(AutoScroll, {
  70275. pluginName: 'scroll',
  70276. initializeByDefault: true
  70277. });
  70278. }
  70279. function clearAutoScrolls() {
  70280. autoScrolls.forEach(function (autoScroll) {
  70281. clearInterval(autoScroll.pid);
  70282. });
  70283. autoScrolls = [];
  70284. }
  70285. function clearPointerElemChangedInterval() {
  70286. clearInterval(pointerElemChangedInterval);
  70287. }
  70288. var autoScroll = throttle(function (evt, options, rootEl, isFallback) {
  70289. // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521
  70290. if (!options.scroll) return;
  70291. var x = (evt.touches ? evt.touches[0] : evt).clientX,
  70292. y = (evt.touches ? evt.touches[0] : evt).clientY,
  70293. sens = options.scrollSensitivity,
  70294. speed = options.scrollSpeed,
  70295. winScroller = getWindowScrollingElement();
  70296. var scrollThisInstance = false,
  70297. scrollCustomFn; // New scroll root, set scrollEl
  70298. if (scrollRootEl !== rootEl) {
  70299. scrollRootEl = rootEl;
  70300. clearAutoScrolls();
  70301. scrollEl = options.scroll;
  70302. scrollCustomFn = options.scrollFn;
  70303. if (scrollEl === true) {
  70304. scrollEl = getParentAutoScrollElement(rootEl, true);
  70305. }
  70306. }
  70307. var layersOut = 0;
  70308. var currentParent = scrollEl;
  70309. do {
  70310. var el = currentParent,
  70311. rect = getRect(el),
  70312. top = rect.top,
  70313. bottom = rect.bottom,
  70314. left = rect.left,
  70315. right = rect.right,
  70316. width = rect.width,
  70317. height = rect.height,
  70318. canScrollX = void 0,
  70319. canScrollY = void 0,
  70320. scrollWidth = el.scrollWidth,
  70321. scrollHeight = el.scrollHeight,
  70322. elCSS = css(el),
  70323. scrollPosX = el.scrollLeft,
  70324. scrollPosY = el.scrollTop;
  70325. if (el === winScroller) {
  70326. canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');
  70327. canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');
  70328. } else {
  70329. canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');
  70330. canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');
  70331. }
  70332. var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);
  70333. var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);
  70334. if (!autoScrolls[layersOut]) {
  70335. for (var i = 0; i <= layersOut; i++) {
  70336. if (!autoScrolls[i]) {
  70337. autoScrolls[i] = {};
  70338. }
  70339. }
  70340. }
  70341. if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {
  70342. autoScrolls[layersOut].el = el;
  70343. autoScrolls[layersOut].vx = vx;
  70344. autoScrolls[layersOut].vy = vy;
  70345. clearInterval(autoScrolls[layersOut].pid);
  70346. if (vx != 0 || vy != 0) {
  70347. scrollThisInstance = true;
  70348. /* jshint loopfunc:true */
  70349. autoScrolls[layersOut].pid = setInterval(function () {
  70350. // emulate drag over during autoscroll (fallback), emulating native DnD behaviour
  70351. if (isFallback && this.layer === 0) {
  70352. Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely
  70353. }
  70354. var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;
  70355. var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;
  70356. if (typeof scrollCustomFn === 'function') {
  70357. if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {
  70358. return;
  70359. }
  70360. }
  70361. scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);
  70362. }.bind({
  70363. layer: layersOut
  70364. }), 24);
  70365. }
  70366. }
  70367. layersOut++;
  70368. } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));
  70369. scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not
  70370. }, 30);
  70371. var drop = function drop(_ref) {
  70372. var originalEvent = _ref.originalEvent,
  70373. putSortable = _ref.putSortable,
  70374. dragEl = _ref.dragEl,
  70375. activeSortable = _ref.activeSortable,
  70376. dispatchSortableEvent = _ref.dispatchSortableEvent,
  70377. hideGhostForTarget = _ref.hideGhostForTarget,
  70378. unhideGhostForTarget = _ref.unhideGhostForTarget;
  70379. if (!originalEvent) return;
  70380. var toSortable = putSortable || activeSortable;
  70381. hideGhostForTarget();
  70382. var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;
  70383. var target = document.elementFromPoint(touch.clientX, touch.clientY);
  70384. unhideGhostForTarget();
  70385. if (toSortable && !toSortable.el.contains(target)) {
  70386. dispatchSortableEvent('spill');
  70387. this.onSpill({
  70388. dragEl: dragEl,
  70389. putSortable: putSortable
  70390. });
  70391. }
  70392. };
  70393. function Revert() {}
  70394. Revert.prototype = {
  70395. startIndex: null,
  70396. dragStart: function dragStart(_ref2) {
  70397. var oldDraggableIndex = _ref2.oldDraggableIndex;
  70398. this.startIndex = oldDraggableIndex;
  70399. },
  70400. onSpill: function onSpill(_ref3) {
  70401. var dragEl = _ref3.dragEl,
  70402. putSortable = _ref3.putSortable;
  70403. this.sortable.captureAnimationState();
  70404. if (putSortable) {
  70405. putSortable.captureAnimationState();
  70406. }
  70407. var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);
  70408. if (nextSibling) {
  70409. this.sortable.el.insertBefore(dragEl, nextSibling);
  70410. } else {
  70411. this.sortable.el.appendChild(dragEl);
  70412. }
  70413. this.sortable.animateAll();
  70414. if (putSortable) {
  70415. putSortable.animateAll();
  70416. }
  70417. },
  70418. drop: drop
  70419. };
  70420. _extends(Revert, {
  70421. pluginName: 'revertOnSpill'
  70422. });
  70423. function Remove() {}
  70424. Remove.prototype = {
  70425. onSpill: function onSpill(_ref4) {
  70426. var dragEl = _ref4.dragEl,
  70427. putSortable = _ref4.putSortable;
  70428. var parentSortable = putSortable || this.sortable;
  70429. parentSortable.captureAnimationState();
  70430. dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);
  70431. parentSortable.animateAll();
  70432. },
  70433. drop: drop
  70434. };
  70435. _extends(Remove, {
  70436. pluginName: 'removeOnSpill'
  70437. });
  70438. var lastSwapEl;
  70439. function SwapPlugin() {
  70440. function Swap() {
  70441. this.defaults = {
  70442. swapClass: 'sortable-swap-highlight'
  70443. };
  70444. }
  70445. Swap.prototype = {
  70446. dragStart: function dragStart(_ref) {
  70447. var dragEl = _ref.dragEl;
  70448. lastSwapEl = dragEl;
  70449. },
  70450. dragOverValid: function dragOverValid(_ref2) {
  70451. var completed = _ref2.completed,
  70452. target = _ref2.target,
  70453. onMove = _ref2.onMove,
  70454. activeSortable = _ref2.activeSortable,
  70455. changed = _ref2.changed,
  70456. cancel = _ref2.cancel;
  70457. if (!activeSortable.options.swap) return;
  70458. var el = this.sortable.el,
  70459. options = this.options;
  70460. if (target && target !== el) {
  70461. var prevSwapEl = lastSwapEl;
  70462. if (onMove(target) !== false) {
  70463. toggleClass(target, options.swapClass, true);
  70464. lastSwapEl = target;
  70465. } else {
  70466. lastSwapEl = null;
  70467. }
  70468. if (prevSwapEl && prevSwapEl !== lastSwapEl) {
  70469. toggleClass(prevSwapEl, options.swapClass, false);
  70470. }
  70471. }
  70472. changed();
  70473. completed(true);
  70474. cancel();
  70475. },
  70476. drop: function drop(_ref3) {
  70477. var activeSortable = _ref3.activeSortable,
  70478. putSortable = _ref3.putSortable,
  70479. dragEl = _ref3.dragEl;
  70480. var toSortable = putSortable || this.sortable;
  70481. var options = this.options;
  70482. lastSwapEl && toggleClass(lastSwapEl, options.swapClass, false);
  70483. if (lastSwapEl && (options.swap || putSortable && putSortable.options.swap)) {
  70484. if (dragEl !== lastSwapEl) {
  70485. toSortable.captureAnimationState();
  70486. if (toSortable !== activeSortable) activeSortable.captureAnimationState();
  70487. swapNodes(dragEl, lastSwapEl);
  70488. toSortable.animateAll();
  70489. if (toSortable !== activeSortable) activeSortable.animateAll();
  70490. }
  70491. }
  70492. },
  70493. nulling: function nulling() {
  70494. lastSwapEl = null;
  70495. }
  70496. };
  70497. return _extends(Swap, {
  70498. pluginName: 'swap',
  70499. eventProperties: function eventProperties() {
  70500. return {
  70501. swapItem: lastSwapEl
  70502. };
  70503. }
  70504. });
  70505. }
  70506. function swapNodes(n1, n2) {
  70507. var p1 = n1.parentNode,
  70508. p2 = n2.parentNode,
  70509. i1,
  70510. i2;
  70511. if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1)) return;
  70512. i1 = index(n1);
  70513. i2 = index(n2);
  70514. if (p1.isEqualNode(p2) && i1 < i2) {
  70515. i2++;
  70516. }
  70517. p1.insertBefore(n2, p1.children[i1]);
  70518. p2.insertBefore(n1, p2.children[i2]);
  70519. }
  70520. var multiDragElements = (/* unused pure expression or super */ null && ([])),
  70521. multiDragClones = (/* unused pure expression or super */ null && ([])),
  70522. lastMultiDragSelect,
  70523. // for selection with modifier key down (SHIFT)
  70524. multiDragSortable,
  70525. initialFolding = false,
  70526. // Initial multi-drag fold when drag started
  70527. folding = false,
  70528. // Folding any other time
  70529. dragStarted = false,
  70530. dragEl$1,
  70531. clonesFromRect,
  70532. clonesHidden;
  70533. function MultiDragPlugin() {
  70534. function MultiDrag(sortable) {
  70535. // Bind all private methods
  70536. for (var fn in this) {
  70537. if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
  70538. this[fn] = this[fn].bind(this);
  70539. }
  70540. }
  70541. if (sortable.options.supportPointer) {
  70542. on(document, 'pointerup', this._deselectMultiDrag);
  70543. } else {
  70544. on(document, 'mouseup', this._deselectMultiDrag);
  70545. on(document, 'touchend', this._deselectMultiDrag);
  70546. }
  70547. on(document, 'keydown', this._checkKeyDown);
  70548. on(document, 'keyup', this._checkKeyUp);
  70549. this.defaults = {
  70550. selectedClass: 'sortable-selected',
  70551. multiDragKey: null,
  70552. setData: function setData(dataTransfer, dragEl) {
  70553. var data = '';
  70554. if (multiDragElements.length && multiDragSortable === sortable) {
  70555. multiDragElements.forEach(function (multiDragElement, i) {
  70556. data += (!i ? '' : ', ') + multiDragElement.textContent;
  70557. });
  70558. } else {
  70559. data = dragEl.textContent;
  70560. }
  70561. dataTransfer.setData('Text', data);
  70562. }
  70563. };
  70564. }
  70565. MultiDrag.prototype = {
  70566. multiDragKeyDown: false,
  70567. isMultiDrag: false,
  70568. delayStartGlobal: function delayStartGlobal(_ref) {
  70569. var dragged = _ref.dragEl;
  70570. dragEl$1 = dragged;
  70571. },
  70572. delayEnded: function delayEnded() {
  70573. this.isMultiDrag = ~multiDragElements.indexOf(dragEl$1);
  70574. },
  70575. setupClone: function setupClone(_ref2) {
  70576. var sortable = _ref2.sortable,
  70577. cancel = _ref2.cancel;
  70578. if (!this.isMultiDrag) return;
  70579. for (var i = 0; i < multiDragElements.length; i++) {
  70580. multiDragClones.push(clone(multiDragElements[i]));
  70581. multiDragClones[i].sortableIndex = multiDragElements[i].sortableIndex;
  70582. multiDragClones[i].draggable = false;
  70583. multiDragClones[i].style['will-change'] = '';
  70584. toggleClass(multiDragClones[i], this.options.selectedClass, false);
  70585. multiDragElements[i] === dragEl$1 && toggleClass(multiDragClones[i], this.options.chosenClass, false);
  70586. }
  70587. sortable._hideClone();
  70588. cancel();
  70589. },
  70590. clone: function clone(_ref3) {
  70591. var sortable = _ref3.sortable,
  70592. rootEl = _ref3.rootEl,
  70593. dispatchSortableEvent = _ref3.dispatchSortableEvent,
  70594. cancel = _ref3.cancel;
  70595. if (!this.isMultiDrag) return;
  70596. if (!this.options.removeCloneOnHide) {
  70597. if (multiDragElements.length && multiDragSortable === sortable) {
  70598. insertMultiDragClones(true, rootEl);
  70599. dispatchSortableEvent('clone');
  70600. cancel();
  70601. }
  70602. }
  70603. },
  70604. showClone: function showClone(_ref4) {
  70605. var cloneNowShown = _ref4.cloneNowShown,
  70606. rootEl = _ref4.rootEl,
  70607. cancel = _ref4.cancel;
  70608. if (!this.isMultiDrag) return;
  70609. insertMultiDragClones(false, rootEl);
  70610. multiDragClones.forEach(function (clone) {
  70611. css(clone, 'display', '');
  70612. });
  70613. cloneNowShown();
  70614. clonesHidden = false;
  70615. cancel();
  70616. },
  70617. hideClone: function hideClone(_ref5) {
  70618. var _this = this;
  70619. var sortable = _ref5.sortable,
  70620. cloneNowHidden = _ref5.cloneNowHidden,
  70621. cancel = _ref5.cancel;
  70622. if (!this.isMultiDrag) return;
  70623. multiDragClones.forEach(function (clone) {
  70624. css(clone, 'display', 'none');
  70625. if (_this.options.removeCloneOnHide && clone.parentNode) {
  70626. clone.parentNode.removeChild(clone);
  70627. }
  70628. });
  70629. cloneNowHidden();
  70630. clonesHidden = true;
  70631. cancel();
  70632. },
  70633. dragStartGlobal: function dragStartGlobal(_ref6) {
  70634. var sortable = _ref6.sortable;
  70635. if (!this.isMultiDrag && multiDragSortable) {
  70636. multiDragSortable.multiDrag._deselectMultiDrag();
  70637. }
  70638. multiDragElements.forEach(function (multiDragElement) {
  70639. multiDragElement.sortableIndex = index(multiDragElement);
  70640. }); // Sort multi-drag elements
  70641. multiDragElements = multiDragElements.sort(function (a, b) {
  70642. return a.sortableIndex - b.sortableIndex;
  70643. });
  70644. dragStarted = true;
  70645. },
  70646. dragStarted: function dragStarted(_ref7) {
  70647. var _this2 = this;
  70648. var sortable = _ref7.sortable;
  70649. if (!this.isMultiDrag) return;
  70650. if (this.options.sort) {
  70651. // Capture rects,
  70652. // hide multi drag elements (by positioning them absolute),
  70653. // set multi drag elements rects to dragRect,
  70654. // show multi drag elements,
  70655. // animate to rects,
  70656. // unset rects & remove from DOM
  70657. sortable.captureAnimationState();
  70658. if (this.options.animation) {
  70659. multiDragElements.forEach(function (multiDragElement) {
  70660. if (multiDragElement === dragEl$1) return;
  70661. css(multiDragElement, 'position', 'absolute');
  70662. });
  70663. var dragRect = getRect(dragEl$1, false, true, true);
  70664. multiDragElements.forEach(function (multiDragElement) {
  70665. if (multiDragElement === dragEl$1) return;
  70666. setRect(multiDragElement, dragRect);
  70667. });
  70668. folding = true;
  70669. initialFolding = true;
  70670. }
  70671. }
  70672. sortable.animateAll(function () {
  70673. folding = false;
  70674. initialFolding = false;
  70675. if (_this2.options.animation) {
  70676. multiDragElements.forEach(function (multiDragElement) {
  70677. unsetRect(multiDragElement);
  70678. });
  70679. } // Remove all auxiliary multidrag items from el, if sorting enabled
  70680. if (_this2.options.sort) {
  70681. removeMultiDragElements();
  70682. }
  70683. });
  70684. },
  70685. dragOver: function dragOver(_ref8) {
  70686. var target = _ref8.target,
  70687. completed = _ref8.completed,
  70688. cancel = _ref8.cancel;
  70689. if (folding && ~multiDragElements.indexOf(target)) {
  70690. completed(false);
  70691. cancel();
  70692. }
  70693. },
  70694. revert: function revert(_ref9) {
  70695. var fromSortable = _ref9.fromSortable,
  70696. rootEl = _ref9.rootEl,
  70697. sortable = _ref9.sortable,
  70698. dragRect = _ref9.dragRect;
  70699. if (multiDragElements.length > 1) {
  70700. // Setup unfold animation
  70701. multiDragElements.forEach(function (multiDragElement) {
  70702. sortable.addAnimationState({
  70703. target: multiDragElement,
  70704. rect: folding ? getRect(multiDragElement) : dragRect
  70705. });
  70706. unsetRect(multiDragElement);
  70707. multiDragElement.fromRect = dragRect;
  70708. fromSortable.removeAnimationState(multiDragElement);
  70709. });
  70710. folding = false;
  70711. insertMultiDragElements(!this.options.removeCloneOnHide, rootEl);
  70712. }
  70713. },
  70714. dragOverCompleted: function dragOverCompleted(_ref10) {
  70715. var sortable = _ref10.sortable,
  70716. isOwner = _ref10.isOwner,
  70717. insertion = _ref10.insertion,
  70718. activeSortable = _ref10.activeSortable,
  70719. parentEl = _ref10.parentEl,
  70720. putSortable = _ref10.putSortable;
  70721. var options = this.options;
  70722. if (insertion) {
  70723. // Clones must be hidden before folding animation to capture dragRectAbsolute properly
  70724. if (isOwner) {
  70725. activeSortable._hideClone();
  70726. }
  70727. initialFolding = false; // If leaving sort:false root, or already folding - Fold to new location
  70728. if (options.animation && multiDragElements.length > 1 && (folding || !isOwner && !activeSortable.options.sort && !putSortable)) {
  70729. // Fold: Set all multi drag elements's rects to dragEl's rect when multi-drag elements are invisible
  70730. var dragRectAbsolute = getRect(dragEl$1, false, true, true);
  70731. multiDragElements.forEach(function (multiDragElement) {
  70732. if (multiDragElement === dragEl$1) return;
  70733. setRect(multiDragElement, dragRectAbsolute); // Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted
  70734. // while folding, and so that we can capture them again because old sortable will no longer be fromSortable
  70735. parentEl.appendChild(multiDragElement);
  70736. });
  70737. folding = true;
  70738. } // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out
  70739. if (!isOwner) {
  70740. // Only remove if not folding (folding will remove them anyways)
  70741. if (!folding) {
  70742. removeMultiDragElements();
  70743. }
  70744. if (multiDragElements.length > 1) {
  70745. var clonesHiddenBefore = clonesHidden;
  70746. activeSortable._showClone(sortable); // Unfold animation for clones if showing from hidden
  70747. if (activeSortable.options.animation && !clonesHidden && clonesHiddenBefore) {
  70748. multiDragClones.forEach(function (clone) {
  70749. activeSortable.addAnimationState({
  70750. target: clone,
  70751. rect: clonesFromRect
  70752. });
  70753. clone.fromRect = clonesFromRect;
  70754. clone.thisAnimationDuration = null;
  70755. });
  70756. }
  70757. } else {
  70758. activeSortable._showClone(sortable);
  70759. }
  70760. }
  70761. }
  70762. },
  70763. dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) {
  70764. var dragRect = _ref11.dragRect,
  70765. isOwner = _ref11.isOwner,
  70766. activeSortable = _ref11.activeSortable;
  70767. multiDragElements.forEach(function (multiDragElement) {
  70768. multiDragElement.thisAnimationDuration = null;
  70769. });
  70770. if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) {
  70771. clonesFromRect = _extends({}, dragRect);
  70772. var dragMatrix = matrix(dragEl$1, true);
  70773. clonesFromRect.top -= dragMatrix.f;
  70774. clonesFromRect.left -= dragMatrix.e;
  70775. }
  70776. },
  70777. dragOverAnimationComplete: function dragOverAnimationComplete() {
  70778. if (folding) {
  70779. folding = false;
  70780. removeMultiDragElements();
  70781. }
  70782. },
  70783. drop: function drop(_ref12) {
  70784. var evt = _ref12.originalEvent,
  70785. rootEl = _ref12.rootEl,
  70786. parentEl = _ref12.parentEl,
  70787. sortable = _ref12.sortable,
  70788. dispatchSortableEvent = _ref12.dispatchSortableEvent,
  70789. oldIndex = _ref12.oldIndex,
  70790. putSortable = _ref12.putSortable;
  70791. var toSortable = putSortable || this.sortable;
  70792. if (!evt) return;
  70793. var options = this.options,
  70794. children = parentEl.children; // Multi-drag selection
  70795. if (!dragStarted) {
  70796. if (options.multiDragKey && !this.multiDragKeyDown) {
  70797. this._deselectMultiDrag();
  70798. }
  70799. toggleClass(dragEl$1, options.selectedClass, !~multiDragElements.indexOf(dragEl$1));
  70800. if (!~multiDragElements.indexOf(dragEl$1)) {
  70801. multiDragElements.push(dragEl$1);
  70802. dispatchEvent({
  70803. sortable: sortable,
  70804. rootEl: rootEl,
  70805. name: 'select',
  70806. targetEl: dragEl$1,
  70807. originalEvt: evt
  70808. }); // Modifier activated, select from last to dragEl
  70809. if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) {
  70810. var lastIndex = index(lastMultiDragSelect),
  70811. currentIndex = index(dragEl$1);
  70812. if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {
  70813. // Must include lastMultiDragSelect (select it), in case modified selection from no selection
  70814. // (but previous selection existed)
  70815. var n, i;
  70816. if (currentIndex > lastIndex) {
  70817. i = lastIndex;
  70818. n = currentIndex;
  70819. } else {
  70820. i = currentIndex;
  70821. n = lastIndex + 1;
  70822. }
  70823. for (; i < n; i++) {
  70824. if (~multiDragElements.indexOf(children[i])) continue;
  70825. toggleClass(children[i], options.selectedClass, true);
  70826. multiDragElements.push(children[i]);
  70827. dispatchEvent({
  70828. sortable: sortable,
  70829. rootEl: rootEl,
  70830. name: 'select',
  70831. targetEl: children[i],
  70832. originalEvt: evt
  70833. });
  70834. }
  70835. }
  70836. } else {
  70837. lastMultiDragSelect = dragEl$1;
  70838. }
  70839. multiDragSortable = toSortable;
  70840. } else {
  70841. multiDragElements.splice(multiDragElements.indexOf(dragEl$1), 1);
  70842. lastMultiDragSelect = null;
  70843. dispatchEvent({
  70844. sortable: sortable,
  70845. rootEl: rootEl,
  70846. name: 'deselect',
  70847. targetEl: dragEl$1,
  70848. originalEvt: evt
  70849. });
  70850. }
  70851. } // Multi-drag drop
  70852. if (dragStarted && this.isMultiDrag) {
  70853. folding = false; // Do not "unfold" after around dragEl if reverted
  70854. if ((parentEl[expando].options.sort || parentEl !== rootEl) && multiDragElements.length > 1) {
  70855. var dragRect = getRect(dragEl$1),
  70856. multiDragIndex = index(dragEl$1, ':not(.' + this.options.selectedClass + ')');
  70857. if (!initialFolding && options.animation) dragEl$1.thisAnimationDuration = null;
  70858. toSortable.captureAnimationState();
  70859. if (!initialFolding) {
  70860. if (options.animation) {
  70861. dragEl$1.fromRect = dragRect;
  70862. multiDragElements.forEach(function (multiDragElement) {
  70863. multiDragElement.thisAnimationDuration = null;
  70864. if (multiDragElement !== dragEl$1) {
  70865. var rect = folding ? getRect(multiDragElement) : dragRect;
  70866. multiDragElement.fromRect = rect; // Prepare unfold animation
  70867. toSortable.addAnimationState({
  70868. target: multiDragElement,
  70869. rect: rect
  70870. });
  70871. }
  70872. });
  70873. } // Multi drag elements are not necessarily removed from the DOM on drop, so to reinsert
  70874. // properly they must all be removed
  70875. removeMultiDragElements();
  70876. multiDragElements.forEach(function (multiDragElement) {
  70877. if (children[multiDragIndex]) {
  70878. parentEl.insertBefore(multiDragElement, children[multiDragIndex]);
  70879. } else {
  70880. parentEl.appendChild(multiDragElement);
  70881. }
  70882. multiDragIndex++;
  70883. }); // If initial folding is done, the elements may have changed position because they are now
  70884. // unfolding around dragEl, even though dragEl may not have his index changed, so update event
  70885. // must be fired here as Sortable will not.
  70886. if (oldIndex === index(dragEl$1)) {
  70887. var update = false;
  70888. multiDragElements.forEach(function (multiDragElement) {
  70889. if (multiDragElement.sortableIndex !== index(multiDragElement)) {
  70890. update = true;
  70891. return;
  70892. }
  70893. });
  70894. if (update) {
  70895. dispatchSortableEvent('update');
  70896. }
  70897. }
  70898. } // Must be done after capturing individual rects (scroll bar)
  70899. multiDragElements.forEach(function (multiDragElement) {
  70900. unsetRect(multiDragElement);
  70901. });
  70902. toSortable.animateAll();
  70903. }
  70904. multiDragSortable = toSortable;
  70905. } // Remove clones if necessary
  70906. if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {
  70907. multiDragClones.forEach(function (clone) {
  70908. clone.parentNode && clone.parentNode.removeChild(clone);
  70909. });
  70910. }
  70911. },
  70912. nullingGlobal: function nullingGlobal() {
  70913. this.isMultiDrag = dragStarted = false;
  70914. multiDragClones.length = 0;
  70915. },
  70916. destroyGlobal: function destroyGlobal() {
  70917. this._deselectMultiDrag();
  70918. off(document, 'pointerup', this._deselectMultiDrag);
  70919. off(document, 'mouseup', this._deselectMultiDrag);
  70920. off(document, 'touchend', this._deselectMultiDrag);
  70921. off(document, 'keydown', this._checkKeyDown);
  70922. off(document, 'keyup', this._checkKeyUp);
  70923. },
  70924. _deselectMultiDrag: function _deselectMultiDrag(evt) {
  70925. if (typeof dragStarted !== "undefined" && dragStarted) return; // Only deselect if selection is in this sortable
  70926. if (multiDragSortable !== this.sortable) return; // Only deselect if target is not item in this sortable
  70927. if (evt && closest(evt.target, this.options.draggable, this.sortable.el, false)) return; // Only deselect if left click
  70928. if (evt && evt.button !== 0) return;
  70929. while (multiDragElements.length) {
  70930. var el = multiDragElements[0];
  70931. toggleClass(el, this.options.selectedClass, false);
  70932. multiDragElements.shift();
  70933. dispatchEvent({
  70934. sortable: this.sortable,
  70935. rootEl: this.sortable.el,
  70936. name: 'deselect',
  70937. targetEl: el,
  70938. originalEvt: evt
  70939. });
  70940. }
  70941. },
  70942. _checkKeyDown: function _checkKeyDown(evt) {
  70943. if (evt.key === this.options.multiDragKey) {
  70944. this.multiDragKeyDown = true;
  70945. }
  70946. },
  70947. _checkKeyUp: function _checkKeyUp(evt) {
  70948. if (evt.key === this.options.multiDragKey) {
  70949. this.multiDragKeyDown = false;
  70950. }
  70951. }
  70952. };
  70953. return _extends(MultiDrag, {
  70954. // Static methods & properties
  70955. pluginName: 'multiDrag',
  70956. utils: {
  70957. /**
  70958. * Selects the provided multi-drag item
  70959. * @param {HTMLElement} el The element to be selected
  70960. */
  70961. select: function select(el) {
  70962. var sortable = el.parentNode[expando];
  70963. if (!sortable || !sortable.options.multiDrag || ~multiDragElements.indexOf(el)) return;
  70964. if (multiDragSortable && multiDragSortable !== sortable) {
  70965. multiDragSortable.multiDrag._deselectMultiDrag();
  70966. multiDragSortable = sortable;
  70967. }
  70968. toggleClass(el, sortable.options.selectedClass, true);
  70969. multiDragElements.push(el);
  70970. },
  70971. /**
  70972. * Deselects the provided multi-drag item
  70973. * @param {HTMLElement} el The element to be deselected
  70974. */
  70975. deselect: function deselect(el) {
  70976. var sortable = el.parentNode[expando],
  70977. index = multiDragElements.indexOf(el);
  70978. if (!sortable || !sortable.options.multiDrag || !~index) return;
  70979. toggleClass(el, sortable.options.selectedClass, false);
  70980. multiDragElements.splice(index, 1);
  70981. }
  70982. },
  70983. eventProperties: function eventProperties() {
  70984. var _this3 = this;
  70985. var oldIndicies = [],
  70986. newIndicies = [];
  70987. multiDragElements.forEach(function (multiDragElement) {
  70988. oldIndicies.push({
  70989. multiDragElement: multiDragElement,
  70990. index: multiDragElement.sortableIndex
  70991. }); // multiDragElements will already be sorted if folding
  70992. var newIndex;
  70993. if (folding && multiDragElement !== dragEl$1) {
  70994. newIndex = -1;
  70995. } else if (folding) {
  70996. newIndex = index(multiDragElement, ':not(.' + _this3.options.selectedClass + ')');
  70997. } else {
  70998. newIndex = index(multiDragElement);
  70999. }
  71000. newIndicies.push({
  71001. multiDragElement: multiDragElement,
  71002. index: newIndex
  71003. });
  71004. });
  71005. return {
  71006. items: _toConsumableArray(multiDragElements),
  71007. clones: [].concat(multiDragClones),
  71008. oldIndicies: oldIndicies,
  71009. newIndicies: newIndicies
  71010. };
  71011. },
  71012. optionListeners: {
  71013. multiDragKey: function multiDragKey(key) {
  71014. key = key.toLowerCase();
  71015. if (key === 'ctrl') {
  71016. key = 'Control';
  71017. } else if (key.length > 1) {
  71018. key = key.charAt(0).toUpperCase() + key.substr(1);
  71019. }
  71020. return key;
  71021. }
  71022. }
  71023. });
  71024. }
  71025. function insertMultiDragElements(clonesInserted, rootEl) {
  71026. multiDragElements.forEach(function (multiDragElement, i) {
  71027. var target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)];
  71028. if (target) {
  71029. rootEl.insertBefore(multiDragElement, target);
  71030. } else {
  71031. rootEl.appendChild(multiDragElement);
  71032. }
  71033. });
  71034. }
  71035. /**
  71036. * Insert multi-drag clones
  71037. * @param {[Boolean]} elementsInserted Whether the multi-drag elements are inserted
  71038. * @param {HTMLElement} rootEl
  71039. */
  71040. function insertMultiDragClones(elementsInserted, rootEl) {
  71041. multiDragClones.forEach(function (clone, i) {
  71042. var target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)];
  71043. if (target) {
  71044. rootEl.insertBefore(clone, target);
  71045. } else {
  71046. rootEl.appendChild(clone);
  71047. }
  71048. });
  71049. }
  71050. function removeMultiDragElements() {
  71051. multiDragElements.forEach(function (multiDragElement) {
  71052. if (multiDragElement === dragEl$1) return;
  71053. multiDragElement.parentNode && multiDragElement.parentNode.removeChild(multiDragElement);
  71054. });
  71055. }
  71056. Sortable.mount(new AutoScrollPlugin());
  71057. Sortable.mount(Remove, Revert);
  71058. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Sortable);
  71059. /***/ }),
  71060. /***/ 989:
  71061. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  71062. module.exports = __webpack_require__(63268);
  71063. /***/ }),
  71064. /***/ 63268:
  71065. /***/ (function(module, exports) {
  71066. var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (root) {
  71067. 'use strict';
  71068. /**
  71069. * charMap
  71070. * @type {Object}
  71071. */
  71072. var charMap = {
  71073. // latin
  71074. 'À': 'A',
  71075. 'Á': 'A',
  71076. 'Â': 'A',
  71077. 'Ã': 'A',
  71078. 'Ä': 'Ae',
  71079. 'Å': 'A',
  71080. 'Æ': 'AE',
  71081. 'Ç': 'C',
  71082. 'È': 'E',
  71083. 'É': 'E',
  71084. 'Ê': 'E',
  71085. 'Ë': 'E',
  71086. 'Ì': 'I',
  71087. 'Í': 'I',
  71088. 'Î': 'I',
  71089. 'Ï': 'I',
  71090. 'Ð': 'D',
  71091. 'Ñ': 'N',
  71092. 'Ò': 'O',
  71093. 'Ó': 'O',
  71094. 'Ô': 'O',
  71095. 'Õ': 'O',
  71096. 'Ö': 'Oe',
  71097. 'Ő': 'O',
  71098. 'Ø': 'O',
  71099. 'Ù': 'U',
  71100. 'Ú': 'U',
  71101. 'Û': 'U',
  71102. 'Ü': 'Ue',
  71103. 'Ű': 'U',
  71104. 'Ý': 'Y',
  71105. 'Þ': 'TH',
  71106. 'ß': 'ss',
  71107. 'à': 'a',
  71108. 'á': 'a',
  71109. 'â': 'a',
  71110. 'ã': 'a',
  71111. 'ä': 'ae',
  71112. 'å': 'a',
  71113. 'æ': 'ae',
  71114. 'ç': 'c',
  71115. 'è': 'e',
  71116. 'é': 'e',
  71117. 'ê': 'e',
  71118. 'ë': 'e',
  71119. 'ì': 'i',
  71120. 'í': 'i',
  71121. 'î': 'i',
  71122. 'ï': 'i',
  71123. 'ð': 'd',
  71124. 'ñ': 'n',
  71125. 'ò': 'o',
  71126. 'ó': 'o',
  71127. 'ô': 'o',
  71128. 'õ': 'o',
  71129. 'ö': 'oe',
  71130. 'ő': 'o',
  71131. 'ø': 'o',
  71132. 'ù': 'u',
  71133. 'ú': 'u',
  71134. 'û': 'u',
  71135. 'ü': 'ue',
  71136. 'ű': 'u',
  71137. 'ý': 'y',
  71138. 'þ': 'th',
  71139. 'ÿ': 'y',
  71140. 'ẞ': 'SS',
  71141. // language specific
  71142. // Arabic
  71143. 'ا': 'a',
  71144. 'أ': 'a',
  71145. 'إ': 'i',
  71146. 'آ': 'aa',
  71147. 'ؤ': 'u',
  71148. 'ئ': 'e',
  71149. 'ء': 'a',
  71150. 'ب': 'b',
  71151. 'ت': 't',
  71152. 'ث': 'th',
  71153. 'ج': 'j',
  71154. 'ح': 'h',
  71155. 'خ': 'kh',
  71156. 'د': 'd',
  71157. 'ذ': 'th',
  71158. 'ر': 'r',
  71159. 'ز': 'z',
  71160. 'س': 's',
  71161. 'ش': 'sh',
  71162. 'ص': 's',
  71163. 'ض': 'dh',
  71164. 'ط': 't',
  71165. 'ظ': 'z',
  71166. 'ع': 'a',
  71167. 'غ': 'gh',
  71168. 'ف': 'f',
  71169. 'ق': 'q',
  71170. 'ك': 'k',
  71171. 'ل': 'l',
  71172. 'م': 'm',
  71173. 'ن': 'n',
  71174. 'ه': 'h',
  71175. 'و': 'w',
  71176. 'ي': 'y',
  71177. 'ى': 'a',
  71178. 'ة': 'h',
  71179. 'ﻻ': 'la',
  71180. 'ﻷ': 'laa',
  71181. 'ﻹ': 'lai',
  71182. 'ﻵ': 'laa',
  71183. // Persian additional characters than Arabic
  71184. 'گ': 'g',
  71185. 'چ': 'ch',
  71186. 'پ': 'p',
  71187. 'ژ': 'zh',
  71188. 'ک': 'k',
  71189. 'ی': 'y',
  71190. // Arabic diactrics
  71191. 'َ': 'a',
  71192. 'ً': 'an',
  71193. 'ِ': 'e',
  71194. 'ٍ': 'en',
  71195. 'ُ': 'u',
  71196. 'ٌ': 'on',
  71197. 'ْ': '',
  71198. // Arabic numbers
  71199. '٠': '0',
  71200. '١': '1',
  71201. '٢': '2',
  71202. '٣': '3',
  71203. '٤': '4',
  71204. '٥': '5',
  71205. '٦': '6',
  71206. '٧': '7',
  71207. '٨': '8',
  71208. '٩': '9',
  71209. // Persian numbers
  71210. '۰': '0',
  71211. '۱': '1',
  71212. '۲': '2',
  71213. '۳': '3',
  71214. '۴': '4',
  71215. '۵': '5',
  71216. '۶': '6',
  71217. '۷': '7',
  71218. '۸': '8',
  71219. '۹': '9',
  71220. // Burmese consonants
  71221. 'က': 'k',
  71222. 'ခ': 'kh',
  71223. 'ဂ': 'g',
  71224. 'ဃ': 'ga',
  71225. 'င': 'ng',
  71226. 'စ': 's',
  71227. 'ဆ': 'sa',
  71228. 'ဇ': 'z',
  71229. 'စျ': 'za',
  71230. 'ည': 'ny',
  71231. 'ဋ': 't',
  71232. 'ဌ': 'ta',
  71233. 'ဍ': 'd',
  71234. 'ဎ': 'da',
  71235. 'ဏ': 'na',
  71236. 'တ': 't',
  71237. 'ထ': 'ta',
  71238. 'ဒ': 'd',
  71239. 'ဓ': 'da',
  71240. 'န': 'n',
  71241. 'ပ': 'p',
  71242. 'ဖ': 'pa',
  71243. 'ဗ': 'b',
  71244. 'ဘ': 'ba',
  71245. 'မ': 'm',
  71246. 'ယ': 'y',
  71247. 'ရ': 'ya',
  71248. 'လ': 'l',
  71249. 'ဝ': 'w',
  71250. 'သ': 'th',
  71251. 'ဟ': 'h',
  71252. 'ဠ': 'la',
  71253. 'အ': 'a',
  71254. // consonant character combos
  71255. 'ြ': 'y',
  71256. 'ျ': 'ya',
  71257. 'ွ': 'w',
  71258. 'ြွ': 'yw',
  71259. 'ျွ': 'ywa',
  71260. 'ှ': 'h',
  71261. // independent vowels
  71262. 'ဧ': 'e',
  71263. '၏': '-e',
  71264. 'ဣ': 'i',
  71265. 'ဤ': '-i',
  71266. 'ဉ': 'u',
  71267. 'ဦ': '-u',
  71268. 'ဩ': 'aw',
  71269. 'သြော': 'aw',
  71270. 'ဪ': 'aw',
  71271. // numbers
  71272. '၀': '0',
  71273. '၁': '1',
  71274. '၂': '2',
  71275. '၃': '3',
  71276. '၄': '4',
  71277. '၅': '5',
  71278. '၆': '6',
  71279. '၇': '7',
  71280. '၈': '8',
  71281. '၉': '9',
  71282. // virama and tone marks which are silent in transliteration
  71283. '္': '',
  71284. '့': '',
  71285. 'း': '',
  71286. // Czech
  71287. 'č': 'c',
  71288. 'ď': 'd',
  71289. 'ě': 'e',
  71290. 'ň': 'n',
  71291. 'ř': 'r',
  71292. 'š': 's',
  71293. 'ť': 't',
  71294. 'ů': 'u',
  71295. 'ž': 'z',
  71296. 'Č': 'C',
  71297. 'Ď': 'D',
  71298. 'Ě': 'E',
  71299. 'Ň': 'N',
  71300. 'Ř': 'R',
  71301. 'Š': 'S',
  71302. 'Ť': 'T',
  71303. 'Ů': 'U',
  71304. 'Ž': 'Z',
  71305. // Dhivehi
  71306. 'ހ': 'h',
  71307. 'ށ': 'sh',
  71308. 'ނ': 'n',
  71309. 'ރ': 'r',
  71310. 'ބ': 'b',
  71311. 'ޅ': 'lh',
  71312. 'ކ': 'k',
  71313. 'އ': 'a',
  71314. 'ވ': 'v',
  71315. 'މ': 'm',
  71316. 'ފ': 'f',
  71317. 'ދ': 'dh',
  71318. 'ތ': 'th',
  71319. 'ލ': 'l',
  71320. 'ގ': 'g',
  71321. 'ޏ': 'gn',
  71322. 'ސ': 's',
  71323. 'ޑ': 'd',
  71324. 'ޒ': 'z',
  71325. 'ޓ': 't',
  71326. 'ޔ': 'y',
  71327. 'ޕ': 'p',
  71328. 'ޖ': 'j',
  71329. 'ޗ': 'ch',
  71330. 'ޘ': 'tt',
  71331. 'ޙ': 'hh',
  71332. 'ޚ': 'kh',
  71333. 'ޛ': 'th',
  71334. 'ޜ': 'z',
  71335. 'ޝ': 'sh',
  71336. 'ޞ': 's',
  71337. 'ޟ': 'd',
  71338. 'ޠ': 't',
  71339. 'ޡ': 'z',
  71340. 'ޢ': 'a',
  71341. 'ޣ': 'gh',
  71342. 'ޤ': 'q',
  71343. 'ޥ': 'w',
  71344. 'ަ': 'a',
  71345. 'ާ': 'aa',
  71346. 'ި': 'i',
  71347. 'ީ': 'ee',
  71348. 'ު': 'u',
  71349. 'ޫ': 'oo',
  71350. 'ެ': 'e',
  71351. 'ޭ': 'ey',
  71352. 'ޮ': 'o',
  71353. 'ޯ': 'oa',
  71354. 'ް': '',
  71355. // Georgian https://en.wikipedia.org/wiki/Romanization_of_Georgian
  71356. // National system (2002)
  71357. 'ა': 'a',
  71358. 'ბ': 'b',
  71359. 'გ': 'g',
  71360. 'დ': 'd',
  71361. 'ე': 'e',
  71362. 'ვ': 'v',
  71363. 'ზ': 'z',
  71364. 'თ': 't',
  71365. 'ი': 'i',
  71366. 'კ': 'k',
  71367. 'ლ': 'l',
  71368. 'მ': 'm',
  71369. 'ნ': 'n',
  71370. 'ო': 'o',
  71371. 'პ': 'p',
  71372. 'ჟ': 'zh',
  71373. 'რ': 'r',
  71374. 'ს': 's',
  71375. 'ტ': 't',
  71376. 'უ': 'u',
  71377. 'ფ': 'p',
  71378. 'ქ': 'k',
  71379. 'ღ': 'gh',
  71380. 'ყ': 'q',
  71381. 'შ': 'sh',
  71382. 'ჩ': 'ch',
  71383. 'ც': 'ts',
  71384. 'ძ': 'dz',
  71385. 'წ': 'ts',
  71386. 'ჭ': 'ch',
  71387. 'ხ': 'kh',
  71388. 'ჯ': 'j',
  71389. 'ჰ': 'h',
  71390. // Greek
  71391. 'α': 'a',
  71392. 'β': 'v',
  71393. 'γ': 'g',
  71394. 'δ': 'd',
  71395. 'ε': 'e',
  71396. 'ζ': 'z',
  71397. 'η': 'i',
  71398. 'θ': 'th',
  71399. 'ι': 'i',
  71400. 'κ': 'k',
  71401. 'λ': 'l',
  71402. 'μ': 'm',
  71403. 'ν': 'n',
  71404. 'ξ': 'ks',
  71405. 'ο': 'o',
  71406. 'π': 'p',
  71407. 'ρ': 'r',
  71408. 'σ': 's',
  71409. 'τ': 't',
  71410. 'υ': 'y',
  71411. 'φ': 'f',
  71412. 'χ': 'x',
  71413. 'ψ': 'ps',
  71414. 'ω': 'o',
  71415. 'ά': 'a',
  71416. 'έ': 'e',
  71417. 'ί': 'i',
  71418. 'ό': 'o',
  71419. 'ύ': 'y',
  71420. 'ή': 'i',
  71421. 'ώ': 'o',
  71422. 'ς': 's',
  71423. 'ϊ': 'i',
  71424. 'ΰ': 'y',
  71425. 'ϋ': 'y',
  71426. 'ΐ': 'i',
  71427. 'Α': 'A',
  71428. 'Β': 'B',
  71429. 'Γ': 'G',
  71430. 'Δ': 'D',
  71431. 'Ε': 'E',
  71432. 'Ζ': 'Z',
  71433. 'Η': 'I',
  71434. 'Θ': 'TH',
  71435. 'Ι': 'I',
  71436. 'Κ': 'K',
  71437. 'Λ': 'L',
  71438. 'Μ': 'M',
  71439. 'Ν': 'N',
  71440. 'Ξ': 'KS',
  71441. 'Ο': 'O',
  71442. 'Π': 'P',
  71443. 'Ρ': 'R',
  71444. 'Σ': 'S',
  71445. 'Τ': 'T',
  71446. 'Υ': 'Y',
  71447. 'Φ': 'F',
  71448. 'Χ': 'X',
  71449. 'Ψ': 'PS',
  71450. 'Ω': 'O',
  71451. 'Ά': 'A',
  71452. 'Έ': 'E',
  71453. 'Ί': 'I',
  71454. 'Ό': 'O',
  71455. 'Ύ': 'Y',
  71456. 'Ή': 'I',
  71457. 'Ώ': 'O',
  71458. 'Ϊ': 'I',
  71459. 'Ϋ': 'Y',
  71460. // Latvian
  71461. 'ā': 'a',
  71462. // 'č': 'c', // duplicate
  71463. 'ē': 'e',
  71464. 'ģ': 'g',
  71465. 'ī': 'i',
  71466. 'ķ': 'k',
  71467. 'ļ': 'l',
  71468. 'ņ': 'n',
  71469. // 'š': 's', // duplicate
  71470. 'ū': 'u',
  71471. // 'ž': 'z', // duplicate
  71472. 'Ā': 'A',
  71473. // 'Č': 'C', // duplicate
  71474. 'Ē': 'E',
  71475. 'Ģ': 'G',
  71476. 'Ī': 'I',
  71477. 'Ķ': 'k',
  71478. 'Ļ': 'L',
  71479. 'Ņ': 'N',
  71480. // 'Š': 'S', // duplicate
  71481. 'Ū': 'U',
  71482. // 'Ž': 'Z', // duplicate
  71483. // Macedonian
  71484. 'Ќ': 'Kj',
  71485. 'ќ': 'kj',
  71486. 'Љ': 'Lj',
  71487. 'љ': 'lj',
  71488. 'Њ': 'Nj',
  71489. 'њ': 'nj',
  71490. 'Тс': 'Ts',
  71491. 'тс': 'ts',
  71492. // Polish
  71493. 'ą': 'a',
  71494. 'ć': 'c',
  71495. 'ę': 'e',
  71496. 'ł': 'l',
  71497. 'ń': 'n',
  71498. // 'ó': 'o', // duplicate
  71499. 'ś': 's',
  71500. 'ź': 'z',
  71501. 'ż': 'z',
  71502. 'Ą': 'A',
  71503. 'Ć': 'C',
  71504. 'Ę': 'E',
  71505. 'Ł': 'L',
  71506. 'Ń': 'N',
  71507. 'Ś': 'S',
  71508. 'Ź': 'Z',
  71509. 'Ż': 'Z',
  71510. // Ukranian
  71511. 'Є': 'Ye',
  71512. 'І': 'I',
  71513. 'Ї': 'Yi',
  71514. 'Ґ': 'G',
  71515. 'є': 'ye',
  71516. 'і': 'i',
  71517. 'ї': 'yi',
  71518. 'ґ': 'g',
  71519. // Romanian
  71520. 'ă': 'a',
  71521. 'Ă': 'A',
  71522. 'ș': 's',
  71523. 'Ș': 'S',
  71524. // 'ş': 's', // duplicate
  71525. // 'Ş': 'S', // duplicate
  71526. 'ț': 't',
  71527. 'Ț': 'T',
  71528. 'ţ': 't',
  71529. 'Ţ': 'T',
  71530. // Russian https://en.wikipedia.org/wiki/Romanization_of_Russian
  71531. // ICAO
  71532. 'а': 'a',
  71533. 'б': 'b',
  71534. 'в': 'v',
  71535. 'г': 'g',
  71536. 'д': 'd',
  71537. 'е': 'e',
  71538. 'ё': 'yo',
  71539. 'ж': 'zh',
  71540. 'з': 'z',
  71541. 'и': 'i',
  71542. 'й': 'i',
  71543. 'к': 'k',
  71544. 'л': 'l',
  71545. 'м': 'm',
  71546. 'н': 'n',
  71547. 'о': 'o',
  71548. 'п': 'p',
  71549. 'р': 'r',
  71550. 'с': 's',
  71551. 'т': 't',
  71552. 'у': 'u',
  71553. 'ф': 'f',
  71554. 'х': 'kh',
  71555. 'ц': 'c',
  71556. 'ч': 'ch',
  71557. 'ш': 'sh',
  71558. 'щ': 'sh',
  71559. 'ъ': '',
  71560. 'ы': 'y',
  71561. 'ь': '',
  71562. 'э': 'e',
  71563. 'ю': 'yu',
  71564. 'я': 'ya',
  71565. 'А': 'A',
  71566. 'Б': 'B',
  71567. 'В': 'V',
  71568. 'Г': 'G',
  71569. 'Д': 'D',
  71570. 'Е': 'E',
  71571. 'Ё': 'Yo',
  71572. 'Ж': 'Zh',
  71573. 'З': 'Z',
  71574. 'И': 'I',
  71575. 'Й': 'I',
  71576. 'К': 'K',
  71577. 'Л': 'L',
  71578. 'М': 'M',
  71579. 'Н': 'N',
  71580. 'О': 'O',
  71581. 'П': 'P',
  71582. 'Р': 'R',
  71583. 'С': 'S',
  71584. 'Т': 'T',
  71585. 'У': 'U',
  71586. 'Ф': 'F',
  71587. 'Х': 'Kh',
  71588. 'Ц': 'C',
  71589. 'Ч': 'Ch',
  71590. 'Ш': 'Sh',
  71591. 'Щ': 'Sh',
  71592. 'Ъ': '',
  71593. 'Ы': 'Y',
  71594. 'Ь': '',
  71595. 'Э': 'E',
  71596. 'Ю': 'Yu',
  71597. 'Я': 'Ya',
  71598. // Serbian
  71599. 'ђ': 'dj',
  71600. 'ј': 'j',
  71601. // 'љ': 'lj', // duplicate
  71602. // 'њ': 'nj', // duplicate
  71603. 'ћ': 'c',
  71604. 'џ': 'dz',
  71605. 'Ђ': 'Dj',
  71606. 'Ј': 'j',
  71607. // 'Љ': 'Lj', // duplicate
  71608. // 'Њ': 'Nj', // duplicate
  71609. 'Ћ': 'C',
  71610. 'Џ': 'Dz',
  71611. // Slovak
  71612. 'ľ': 'l',
  71613. 'ĺ': 'l',
  71614. 'ŕ': 'r',
  71615. 'Ľ': 'L',
  71616. 'Ĺ': 'L',
  71617. 'Ŕ': 'R',
  71618. // Turkish
  71619. 'ş': 's',
  71620. 'Ş': 'S',
  71621. 'ı': 'i',
  71622. 'İ': 'I',
  71623. // 'ç': 'c', // duplicate
  71624. // 'Ç': 'C', // duplicate
  71625. // 'ü': 'u', // duplicate, see langCharMap
  71626. // 'Ü': 'U', // duplicate, see langCharMap
  71627. // 'ö': 'o', // duplicate, see langCharMap
  71628. // 'Ö': 'O', // duplicate, see langCharMap
  71629. 'ğ': 'g',
  71630. 'Ğ': 'G',
  71631. // Vietnamese
  71632. 'ả': 'a',
  71633. 'Ả': 'A',
  71634. 'ẳ': 'a',
  71635. 'Ẳ': 'A',
  71636. 'ẩ': 'a',
  71637. 'Ẩ': 'A',
  71638. 'đ': 'd',
  71639. 'Đ': 'D',
  71640. 'ẹ': 'e',
  71641. 'Ẹ': 'E',
  71642. 'ẽ': 'e',
  71643. 'Ẽ': 'E',
  71644. 'ẻ': 'e',
  71645. 'Ẻ': 'E',
  71646. 'ế': 'e',
  71647. 'Ế': 'E',
  71648. 'ề': 'e',
  71649. 'Ề': 'E',
  71650. 'ệ': 'e',
  71651. 'Ệ': 'E',
  71652. 'ễ': 'e',
  71653. 'Ễ': 'E',
  71654. 'ể': 'e',
  71655. 'Ể': 'E',
  71656. 'ỏ': 'o',
  71657. 'ọ': 'o',
  71658. 'Ọ': 'o',
  71659. 'ố': 'o',
  71660. 'Ố': 'O',
  71661. 'ồ': 'o',
  71662. 'Ồ': 'O',
  71663. 'ổ': 'o',
  71664. 'Ổ': 'O',
  71665. 'ộ': 'o',
  71666. 'Ộ': 'O',
  71667. 'ỗ': 'o',
  71668. 'Ỗ': 'O',
  71669. 'ơ': 'o',
  71670. 'Ơ': 'O',
  71671. 'ớ': 'o',
  71672. 'Ớ': 'O',
  71673. 'ờ': 'o',
  71674. 'Ờ': 'O',
  71675. 'ợ': 'o',
  71676. 'Ợ': 'O',
  71677. 'ỡ': 'o',
  71678. 'Ỡ': 'O',
  71679. 'Ở': 'o',
  71680. 'ở': 'o',
  71681. 'ị': 'i',
  71682. 'Ị': 'I',
  71683. 'ĩ': 'i',
  71684. 'Ĩ': 'I',
  71685. 'ỉ': 'i',
  71686. 'Ỉ': 'i',
  71687. 'ủ': 'u',
  71688. 'Ủ': 'U',
  71689. 'ụ': 'u',
  71690. 'Ụ': 'U',
  71691. 'ũ': 'u',
  71692. 'Ũ': 'U',
  71693. 'ư': 'u',
  71694. 'Ư': 'U',
  71695. 'ứ': 'u',
  71696. 'Ứ': 'U',
  71697. 'ừ': 'u',
  71698. 'Ừ': 'U',
  71699. 'ự': 'u',
  71700. 'Ự': 'U',
  71701. 'ữ': 'u',
  71702. 'Ữ': 'U',
  71703. 'ử': 'u',
  71704. 'Ử': 'ư',
  71705. 'ỷ': 'y',
  71706. 'Ỷ': 'y',
  71707. 'ỳ': 'y',
  71708. 'Ỳ': 'Y',
  71709. 'ỵ': 'y',
  71710. 'Ỵ': 'Y',
  71711. 'ỹ': 'y',
  71712. 'Ỹ': 'Y',
  71713. 'ạ': 'a',
  71714. 'Ạ': 'A',
  71715. 'ấ': 'a',
  71716. 'Ấ': 'A',
  71717. 'ầ': 'a',
  71718. 'Ầ': 'A',
  71719. 'ậ': 'a',
  71720. 'Ậ': 'A',
  71721. 'ẫ': 'a',
  71722. 'Ẫ': 'A',
  71723. // 'ă': 'a', // duplicate
  71724. // 'Ă': 'A', // duplicate
  71725. 'ắ': 'a',
  71726. 'Ắ': 'A',
  71727. 'ằ': 'a',
  71728. 'Ằ': 'A',
  71729. 'ặ': 'a',
  71730. 'Ặ': 'A',
  71731. 'ẵ': 'a',
  71732. 'Ẵ': 'A',
  71733. "⓪": "0",
  71734. "①": "1",
  71735. "②": "2",
  71736. "③": "3",
  71737. "④": "4",
  71738. "⑤": "5",
  71739. "⑥": "6",
  71740. "⑦": "7",
  71741. "⑧": "8",
  71742. "⑨": "9",
  71743. "⑩": "10",
  71744. "⑪": "11",
  71745. "⑫": "12",
  71746. "⑬": "13",
  71747. "⑭": "14",
  71748. "⑮": "15",
  71749. "⑯": "16",
  71750. "⑰": "17",
  71751. "⑱": "18",
  71752. "⑲": "18",
  71753. "⑳": "18",
  71754. "⓵": "1",
  71755. "⓶": "2",
  71756. "⓷": "3",
  71757. "⓸": "4",
  71758. "⓹": "5",
  71759. "⓺": "6",
  71760. "⓻": "7",
  71761. "⓼": "8",
  71762. "⓽": "9",
  71763. "⓾": "10",
  71764. "⓿": "0",
  71765. "⓫": "11",
  71766. "⓬": "12",
  71767. "⓭": "13",
  71768. "⓮": "14",
  71769. "⓯": "15",
  71770. "⓰": "16",
  71771. "⓱": "17",
  71772. "⓲": "18",
  71773. "⓳": "19",
  71774. "⓴": "20",
  71775. "Ⓐ": "A",
  71776. "Ⓑ": "B",
  71777. "Ⓒ": "C",
  71778. "Ⓓ": "D",
  71779. "Ⓔ": "E",
  71780. "Ⓕ": "F",
  71781. "Ⓖ": "G",
  71782. "Ⓗ": "H",
  71783. "Ⓘ": "I",
  71784. "Ⓙ": "J",
  71785. "Ⓚ": "K",
  71786. "Ⓛ": "L",
  71787. "Ⓜ": "M",
  71788. "Ⓝ": "N",
  71789. "Ⓞ": "O",
  71790. "Ⓟ": "P",
  71791. "Ⓠ": "Q",
  71792. "Ⓡ": "R",
  71793. "Ⓢ": "S",
  71794. "Ⓣ": "T",
  71795. "Ⓤ": "U",
  71796. "Ⓥ": "V",
  71797. "Ⓦ": "W",
  71798. "Ⓧ": "X",
  71799. "Ⓨ": "Y",
  71800. "Ⓩ": "Z",
  71801. "ⓐ": "a",
  71802. "ⓑ": "b",
  71803. "ⓒ": "c",
  71804. "ⓓ": "d",
  71805. "ⓔ": "e",
  71806. "ⓕ": "f",
  71807. "ⓖ": "g",
  71808. "ⓗ": "h",
  71809. "ⓘ": "i",
  71810. "ⓙ": "j",
  71811. "ⓚ": "k",
  71812. "ⓛ": "l",
  71813. "ⓜ": "m",
  71814. "ⓝ": "n",
  71815. "ⓞ": "o",
  71816. "ⓟ": "p",
  71817. "ⓠ": "q",
  71818. "ⓡ": "r",
  71819. "ⓢ": "s",
  71820. "ⓣ": "t",
  71821. "ⓤ": "u",
  71822. "ⓦ": "v",
  71823. "ⓥ": "w",
  71824. "ⓧ": "x",
  71825. "ⓨ": "y",
  71826. "ⓩ": "z",
  71827. // symbols
  71828. '“': '"',
  71829. '”': '"',
  71830. '‘': "'",
  71831. '’': "'",
  71832. '∂': 'd',
  71833. 'ƒ': 'f',
  71834. '™': '(TM)',
  71835. '©': '(C)',
  71836. 'œ': 'oe',
  71837. 'Œ': 'OE',
  71838. '®': '(R)',
  71839. '†': '+',
  71840. '℠': '(SM)',
  71841. '…': '...',
  71842. '˚': 'o',
  71843. 'º': 'o',
  71844. 'ª': 'a',
  71845. '•': '*',
  71846. '၊': ',',
  71847. '။': '.',
  71848. // currency
  71849. '$': 'USD',
  71850. '€': 'EUR',
  71851. '₢': 'BRN',
  71852. '₣': 'FRF',
  71853. '£': 'GBP',
  71854. '₤': 'ITL',
  71855. '₦': 'NGN',
  71856. '₧': 'ESP',
  71857. '₩': 'KRW',
  71858. '₪': 'ILS',
  71859. '₫': 'VND',
  71860. '₭': 'LAK',
  71861. '₮': 'MNT',
  71862. '₯': 'GRD',
  71863. '₱': 'ARS',
  71864. '₲': 'PYG',
  71865. '₳': 'ARA',
  71866. '₴': 'UAH',
  71867. '₵': 'GHS',
  71868. '¢': 'cent',
  71869. '¥': 'CNY',
  71870. '元': 'CNY',
  71871. '円': 'YEN',
  71872. '﷼': 'IRR',
  71873. '₠': 'EWE',
  71874. '฿': 'THB',
  71875. '₨': 'INR',
  71876. '₹': 'INR',
  71877. '₰': 'PF',
  71878. '₺': 'TRY',
  71879. '؋': 'AFN',
  71880. '₼': 'AZN',
  71881. 'лв': 'BGN',
  71882. '៛': 'KHR',
  71883. '₡': 'CRC',
  71884. '₸': 'KZT',
  71885. 'ден': 'MKD',
  71886. 'zł': 'PLN',
  71887. '₽': 'RUB',
  71888. '₾': 'GEL'
  71889. };
  71890. /**
  71891. * special look ahead character array
  71892. * These characters form with consonants to become 'single'/consonant combo
  71893. * @type [Array]
  71894. */
  71895. var lookAheadCharArray = [
  71896. // burmese
  71897. '်',
  71898. // Dhivehi
  71899. 'ް'
  71900. ];
  71901. /**
  71902. * diatricMap for languages where transliteration changes entirely as more diatrics are added
  71903. * @type {Object}
  71904. */
  71905. var diatricMap = {
  71906. // Burmese
  71907. // dependent vowels
  71908. 'ာ': 'a',
  71909. 'ါ': 'a',
  71910. 'ေ': 'e',
  71911. 'ဲ': 'e',
  71912. 'ိ': 'i',
  71913. 'ီ': 'i',
  71914. 'ို': 'o',
  71915. 'ု': 'u',
  71916. 'ူ': 'u',
  71917. 'ေါင်': 'aung',
  71918. 'ော': 'aw',
  71919. 'ော်': 'aw',
  71920. 'ေါ': 'aw',
  71921. 'ေါ်': 'aw',
  71922. '်': '်', // this is special case but the character will be converted to latin in the code
  71923. 'က်': 'et',
  71924. 'ိုက်': 'aik',
  71925. 'ောက်': 'auk',
  71926. 'င်': 'in',
  71927. 'ိုင်': 'aing',
  71928. 'ောင်': 'aung',
  71929. 'စ်': 'it',
  71930. 'ည်': 'i',
  71931. 'တ်': 'at',
  71932. 'ိတ်': 'eik',
  71933. 'ုတ်': 'ok',
  71934. 'ွတ်': 'ut',
  71935. 'ေတ်': 'it',
  71936. 'ဒ်': 'd',
  71937. 'ိုဒ်': 'ok',
  71938. 'ုဒ်': 'ait',
  71939. 'န်': 'an',
  71940. 'ာန်': 'an',
  71941. 'ိန်': 'ein',
  71942. 'ုန်': 'on',
  71943. 'ွန်': 'un',
  71944. 'ပ်': 'at',
  71945. 'ိပ်': 'eik',
  71946. 'ုပ်': 'ok',
  71947. 'ွပ်': 'ut',
  71948. 'န်ုပ်': 'nub',
  71949. 'မ်': 'an',
  71950. 'ိမ်': 'ein',
  71951. 'ုမ်': 'on',
  71952. 'ွမ်': 'un',
  71953. 'ယ်': 'e',
  71954. 'ိုလ်': 'ol',
  71955. 'ဉ်': 'in',
  71956. 'ံ': 'an',
  71957. 'ိံ': 'ein',
  71958. 'ုံ': 'on',
  71959. // Dhivehi
  71960. 'ައް': 'ah',
  71961. 'ަށް': 'ah'
  71962. };
  71963. /**
  71964. * langCharMap language specific characters translations
  71965. * @type {Object}
  71966. */
  71967. var langCharMap = {
  71968. 'en': {}, // default language
  71969. 'az': { // Azerbaijani
  71970. 'ç': 'c',
  71971. 'ə': 'e',
  71972. 'ğ': 'g',
  71973. 'ı': 'i',
  71974. 'ö': 'o',
  71975. 'ş': 's',
  71976. 'ü': 'u',
  71977. 'Ç': 'C',
  71978. 'Ə': 'E',
  71979. 'Ğ': 'G',
  71980. 'İ': 'I',
  71981. 'Ö': 'O',
  71982. 'Ş': 'S',
  71983. 'Ü': 'U'
  71984. },
  71985. 'cs': { // Czech
  71986. 'č': 'c',
  71987. 'ď': 'd',
  71988. 'ě': 'e',
  71989. 'ň': 'n',
  71990. 'ř': 'r',
  71991. 'š': 's',
  71992. 'ť': 't',
  71993. 'ů': 'u',
  71994. 'ž': 'z',
  71995. 'Č': 'C',
  71996. 'Ď': 'D',
  71997. 'Ě': 'E',
  71998. 'Ň': 'N',
  71999. 'Ř': 'R',
  72000. 'Š': 'S',
  72001. 'Ť': 'T',
  72002. 'Ů': 'U',
  72003. 'Ž': 'Z'
  72004. },
  72005. 'fi': { // Finnish
  72006. // 'å': 'a', duplicate see charMap/latin
  72007. // 'Å': 'A', duplicate see charMap/latin
  72008. 'ä': 'a', // ok
  72009. 'Ä': 'A', // ok
  72010. 'ö': 'o', // ok
  72011. 'Ö': 'O' // ok
  72012. },
  72013. 'hu': { // Hungarian
  72014. 'ä': 'a', // ok
  72015. 'Ä': 'A', // ok
  72016. // 'á': 'a', duplicate see charMap/latin
  72017. // 'Á': 'A', duplicate see charMap/latin
  72018. 'ö': 'o', // ok
  72019. 'Ö': 'O', // ok
  72020. // 'ő': 'o', duplicate see charMap/latin
  72021. // 'Ő': 'O', duplicate see charMap/latin
  72022. 'ü': 'u',
  72023. 'Ü': 'U',
  72024. 'ű': 'u',
  72025. 'Ű': 'U'
  72026. },
  72027. 'lt': { // Lithuanian
  72028. 'ą': 'a',
  72029. 'č': 'c',
  72030. 'ę': 'e',
  72031. 'ė': 'e',
  72032. 'į': 'i',
  72033. 'š': 's',
  72034. 'ų': 'u',
  72035. 'ū': 'u',
  72036. 'ž': 'z',
  72037. 'Ą': 'A',
  72038. 'Č': 'C',
  72039. 'Ę': 'E',
  72040. 'Ė': 'E',
  72041. 'Į': 'I',
  72042. 'Š': 'S',
  72043. 'Ų': 'U',
  72044. 'Ū': 'U'
  72045. },
  72046. 'lv': { // Latvian
  72047. 'ā': 'a',
  72048. 'č': 'c',
  72049. 'ē': 'e',
  72050. 'ģ': 'g',
  72051. 'ī': 'i',
  72052. 'ķ': 'k',
  72053. 'ļ': 'l',
  72054. 'ņ': 'n',
  72055. 'š': 's',
  72056. 'ū': 'u',
  72057. 'ž': 'z',
  72058. 'Ā': 'A',
  72059. 'Č': 'C',
  72060. 'Ē': 'E',
  72061. 'Ģ': 'G',
  72062. 'Ī': 'i',
  72063. 'Ķ': 'k',
  72064. 'Ļ': 'L',
  72065. 'Ņ': 'N',
  72066. 'Š': 'S',
  72067. 'Ū': 'u',
  72068. 'Ž': 'Z'
  72069. },
  72070. 'pl': { // Polish
  72071. 'ą': 'a',
  72072. 'ć': 'c',
  72073. 'ę': 'e',
  72074. 'ł': 'l',
  72075. 'ń': 'n',
  72076. 'ó': 'o',
  72077. 'ś': 's',
  72078. 'ź': 'z',
  72079. 'ż': 'z',
  72080. 'Ą': 'A',
  72081. 'Ć': 'C',
  72082. 'Ę': 'e',
  72083. 'Ł': 'L',
  72084. 'Ń': 'N',
  72085. 'Ó': 'O',
  72086. 'Ś': 'S',
  72087. 'Ź': 'Z',
  72088. 'Ż': 'Z'
  72089. },
  72090. 'sv': { // Swedish
  72091. // 'å': 'a', duplicate see charMap/latin
  72092. // 'Å': 'A', duplicate see charMap/latin
  72093. 'ä': 'a', // ok
  72094. 'Ä': 'A', // ok
  72095. 'ö': 'o', // ok
  72096. 'Ö': 'O' // ok
  72097. },
  72098. 'sk': { // Slovak
  72099. 'ä': 'a',
  72100. 'Ä': 'A'
  72101. },
  72102. 'sr': { // Serbian
  72103. 'љ': 'lj',
  72104. 'њ': 'nj',
  72105. 'Љ': 'Lj',
  72106. 'Њ': 'Nj',
  72107. 'đ': 'dj',
  72108. 'Đ': 'Dj'
  72109. },
  72110. 'tr': { // Turkish
  72111. 'Ü': 'U',
  72112. 'Ö': 'O',
  72113. 'ü': 'u',
  72114. 'ö': 'o'
  72115. }
  72116. };
  72117. /**
  72118. * symbolMap language specific symbol translations
  72119. * translations must be transliterated already
  72120. * @type {Object}
  72121. */
  72122. var symbolMap = {
  72123. 'ar': {
  72124. '∆': 'delta',
  72125. '∞': 'la-nihaya',
  72126. '♥': 'hob',
  72127. '&': 'wa',
  72128. '|': 'aw',
  72129. '<': 'aqal-men',
  72130. '>': 'akbar-men',
  72131. '∑': 'majmou',
  72132. '¤': 'omla'
  72133. },
  72134. 'az': {},
  72135. 'ca': {
  72136. '∆': 'delta',
  72137. '∞': 'infinit',
  72138. '♥': 'amor',
  72139. '&': 'i',
  72140. '|': 'o',
  72141. '<': 'menys que',
  72142. '>': 'mes que',
  72143. '∑': 'suma dels',
  72144. '¤': 'moneda'
  72145. },
  72146. 'cs': {
  72147. '∆': 'delta',
  72148. '∞': 'nekonecno',
  72149. '♥': 'laska',
  72150. '&': 'a',
  72151. '|': 'nebo',
  72152. '<': 'mensi nez',
  72153. '>': 'vetsi nez',
  72154. '∑': 'soucet',
  72155. '¤': 'mena'
  72156. },
  72157. 'de': {
  72158. '∆': 'delta',
  72159. '∞': 'unendlich',
  72160. '♥': 'Liebe',
  72161. '&': 'und',
  72162. '|': 'oder',
  72163. '<': 'kleiner als',
  72164. '>': 'groesser als',
  72165. '∑': 'Summe von',
  72166. '¤': 'Waehrung'
  72167. },
  72168. 'dv': {
  72169. '∆': 'delta',
  72170. '∞': 'kolunulaa',
  72171. '♥': 'loabi',
  72172. '&': 'aai',
  72173. '|': 'noonee',
  72174. '<': 'ah vure kuda',
  72175. '>': 'ah vure bodu',
  72176. '∑': 'jumula',
  72177. '¤': 'faisaa'
  72178. },
  72179. 'en': {
  72180. '∆': 'delta',
  72181. '∞': 'infinity',
  72182. '♥': 'love',
  72183. '&': 'and',
  72184. '|': 'or',
  72185. '<': 'less than',
  72186. '>': 'greater than',
  72187. '∑': 'sum',
  72188. '¤': 'currency'
  72189. },
  72190. 'es': {
  72191. '∆': 'delta',
  72192. '∞': 'infinito',
  72193. '♥': 'amor',
  72194. '&': 'y',
  72195. '|': 'u',
  72196. '<': 'menos que',
  72197. '>': 'mas que',
  72198. '∑': 'suma de los',
  72199. '¤': 'moneda'
  72200. },
  72201. 'fa': {
  72202. '∆': 'delta',
  72203. '∞': 'bi-nahayat',
  72204. '♥': 'eshgh',
  72205. '&': 'va',
  72206. '|': 'ya',
  72207. '<': 'kamtar-az',
  72208. '>': 'bishtar-az',
  72209. '∑': 'majmooe',
  72210. '¤': 'vahed'
  72211. },
  72212. 'fi': {
  72213. '∆': 'delta',
  72214. '∞': 'aarettomyys',
  72215. '♥': 'rakkaus',
  72216. '&': 'ja',
  72217. '|': 'tai',
  72218. '<': 'pienempi kuin',
  72219. '>': 'suurempi kuin',
  72220. '∑': 'summa',
  72221. '¤': 'valuutta'
  72222. },
  72223. 'fr': {
  72224. '∆': 'delta',
  72225. '∞': 'infiniment',
  72226. '♥': 'Amour',
  72227. '&': 'et',
  72228. '|': 'ou',
  72229. '<': 'moins que',
  72230. '>': 'superieure a',
  72231. '∑': 'somme des',
  72232. '¤': 'monnaie'
  72233. },
  72234. 'ge': {
  72235. '∆': 'delta',
  72236. '∞': 'usasruloba',
  72237. '♥': 'siqvaruli',
  72238. '&': 'da',
  72239. '|': 'an',
  72240. '<': 'naklebi',
  72241. '>': 'meti',
  72242. '∑': 'jami',
  72243. '¤': 'valuta'
  72244. },
  72245. 'gr': {},
  72246. 'hu': {
  72247. '∆': 'delta',
  72248. '∞': 'vegtelen',
  72249. '♥': 'szerelem',
  72250. '&': 'es',
  72251. '|': 'vagy',
  72252. '<': 'kisebb mint',
  72253. '>': 'nagyobb mint',
  72254. '∑': 'szumma',
  72255. '¤': 'penznem'
  72256. },
  72257. 'it': {
  72258. '∆': 'delta',
  72259. '∞': 'infinito',
  72260. '♥': 'amore',
  72261. '&': 'e',
  72262. '|': 'o',
  72263. '<': 'minore di',
  72264. '>': 'maggiore di',
  72265. '∑': 'somma',
  72266. '¤': 'moneta'
  72267. },
  72268. 'lt': {
  72269. '∆': 'delta',
  72270. '∞': 'begalybe',
  72271. '♥': 'meile',
  72272. '&': 'ir',
  72273. '|': 'ar',
  72274. '<': 'maziau nei',
  72275. '>': 'daugiau nei',
  72276. '∑': 'suma',
  72277. '¤': 'valiuta'
  72278. },
  72279. 'lv': {
  72280. '∆': 'delta',
  72281. '∞': 'bezgaliba',
  72282. '♥': 'milestiba',
  72283. '&': 'un',
  72284. '|': 'vai',
  72285. '<': 'mazak neka',
  72286. '>': 'lielaks neka',
  72287. '∑': 'summa',
  72288. '¤': 'valuta'
  72289. },
  72290. 'my': {
  72291. '∆': 'kwahkhyaet',
  72292. '∞': 'asaonasme',
  72293. '♥': 'akhyait',
  72294. '&': 'nhin',
  72295. '|': 'tho',
  72296. '<': 'ngethaw',
  72297. '>': 'kyithaw',
  72298. '∑': 'paungld',
  72299. '¤': 'ngwekye'
  72300. },
  72301. 'mk': {},
  72302. 'nl': {
  72303. '∆': 'delta',
  72304. '∞': 'oneindig',
  72305. '♥': 'liefde',
  72306. '&': 'en',
  72307. '|': 'of',
  72308. '<': 'kleiner dan',
  72309. '>': 'groter dan',
  72310. '∑': 'som',
  72311. '¤': 'valuta'
  72312. },
  72313. 'pl': {
  72314. '∆': 'delta',
  72315. '∞': 'nieskonczonosc',
  72316. '♥': 'milosc',
  72317. '&': 'i',
  72318. '|': 'lub',
  72319. '<': 'mniejsze niz',
  72320. '>': 'wieksze niz',
  72321. '∑': 'suma',
  72322. '¤': 'waluta'
  72323. },
  72324. 'pt': {
  72325. '∆': 'delta',
  72326. '∞': 'infinito',
  72327. '♥': 'amor',
  72328. '&': 'e',
  72329. '|': 'ou',
  72330. '<': 'menor que',
  72331. '>': 'maior que',
  72332. '∑': 'soma',
  72333. '¤': 'moeda'
  72334. },
  72335. 'ro': {
  72336. '∆': 'delta',
  72337. '∞': 'infinit',
  72338. '♥': 'dragoste',
  72339. '&': 'si',
  72340. '|': 'sau',
  72341. '<': 'mai mic ca',
  72342. '>': 'mai mare ca',
  72343. '∑': 'suma',
  72344. '¤': 'valuta'
  72345. },
  72346. 'ru': {
  72347. '∆': 'delta',
  72348. '∞': 'beskonechno',
  72349. '♥': 'lubov',
  72350. '&': 'i',
  72351. '|': 'ili',
  72352. '<': 'menshe',
  72353. '>': 'bolshe',
  72354. '∑': 'summa',
  72355. '¤': 'valjuta'
  72356. },
  72357. 'sk': {
  72358. '∆': 'delta',
  72359. '∞': 'nekonecno',
  72360. '♥': 'laska',
  72361. '&': 'a',
  72362. '|': 'alebo',
  72363. '<': 'menej ako',
  72364. '>': 'viac ako',
  72365. '∑': 'sucet',
  72366. '¤': 'mena'
  72367. },
  72368. 'sr': {},
  72369. 'tr': {
  72370. '∆': 'delta',
  72371. '∞': 'sonsuzluk',
  72372. '♥': 'ask',
  72373. '&': 've',
  72374. '|': 'veya',
  72375. '<': 'kucuktur',
  72376. '>': 'buyuktur',
  72377. '∑': 'toplam',
  72378. '¤': 'para birimi'
  72379. },
  72380. 'uk': {
  72381. '∆': 'delta',
  72382. '∞': 'bezkinechnist',
  72383. '♥': 'lubov',
  72384. '&': 'i',
  72385. '|': 'abo',
  72386. '<': 'menshe',
  72387. '>': 'bilshe',
  72388. '∑': 'suma',
  72389. '¤': 'valjuta'
  72390. },
  72391. 'vn': {
  72392. '∆': 'delta',
  72393. '∞': 'vo cuc',
  72394. '♥': 'yeu',
  72395. '&': 'va',
  72396. '|': 'hoac',
  72397. '<': 'nho hon',
  72398. '>': 'lon hon',
  72399. '∑': 'tong',
  72400. '¤': 'tien te'
  72401. }
  72402. };
  72403. var uricChars = [';', '?', ':', '@', '&', '=', '+', '$', ',', '/'].join('');
  72404. var uricNoSlashChars = [';', '?', ':', '@', '&', '=', '+', '$', ','].join('');
  72405. var markChars = ['.', '!', '~', '*', "'", '(', ')'].join('');
  72406. /**
  72407. * getSlug
  72408. * @param {string} input input string
  72409. * @param {object|string} opts config object or separator string/char
  72410. * @api public
  72411. * @return {string} sluggified string
  72412. */
  72413. var getSlug = function getSlug(input, opts) {
  72414. var separator = '-';
  72415. var result = '';
  72416. var diatricString = '';
  72417. var convertSymbols = true;
  72418. var customReplacements = {};
  72419. var maintainCase;
  72420. var titleCase;
  72421. var truncate;
  72422. var uricFlag;
  72423. var uricNoSlashFlag;
  72424. var markFlag;
  72425. var symbol;
  72426. var langChar;
  72427. var lucky;
  72428. var i;
  72429. var ch;
  72430. var l;
  72431. var lastCharWasSymbol;
  72432. var lastCharWasDiatric;
  72433. var allowedChars = '';
  72434. if (typeof input !== 'string') {
  72435. return '';
  72436. }
  72437. if (typeof opts === 'string') {
  72438. separator = opts;
  72439. }
  72440. symbol = symbolMap.en;
  72441. langChar = langCharMap.en;
  72442. if (typeof opts === 'object') {
  72443. maintainCase = opts.maintainCase || false;
  72444. customReplacements = (opts.custom && typeof opts.custom === 'object') ? opts.custom : customReplacements;
  72445. truncate = (+opts.truncate > 1 && opts.truncate) || false;
  72446. uricFlag = opts.uric || false;
  72447. uricNoSlashFlag = opts.uricNoSlash || false;
  72448. markFlag = opts.mark || false;
  72449. convertSymbols = (opts.symbols === false || opts.lang === false) ? false : true;
  72450. separator = opts.separator || separator;
  72451. if (uricFlag) {
  72452. allowedChars += uricChars;
  72453. }
  72454. if (uricNoSlashFlag) {
  72455. allowedChars += uricNoSlashChars;
  72456. }
  72457. if (markFlag) {
  72458. allowedChars += markChars;
  72459. }
  72460. symbol = (opts.lang && symbolMap[opts.lang] && convertSymbols) ?
  72461. symbolMap[opts.lang] : (convertSymbols ? symbolMap.en : {});
  72462. langChar = (opts.lang && langCharMap[opts.lang]) ?
  72463. langCharMap[opts.lang] :
  72464. opts.lang === false || opts.lang === true ? {} : langCharMap.en;
  72465. // if titleCase config is an Array, rewrite to object format
  72466. if (opts.titleCase && typeof opts.titleCase.length === 'number' && Array.prototype.toString.call(opts.titleCase)) {
  72467. opts.titleCase.forEach(function (v) {
  72468. customReplacements[v + ''] = v + '';
  72469. });
  72470. titleCase = true;
  72471. } else {
  72472. titleCase = !!opts.titleCase;
  72473. }
  72474. // if custom config is an Array, rewrite to object format
  72475. if (opts.custom && typeof opts.custom.length === 'number' && Array.prototype.toString.call(opts.custom)) {
  72476. opts.custom.forEach(function (v) {
  72477. customReplacements[v + ''] = v + '';
  72478. });
  72479. }
  72480. // custom replacements
  72481. Object.keys(customReplacements).forEach(function (v) {
  72482. var r;
  72483. if (v.length > 1) {
  72484. r = new RegExp('\\b' + escapeChars(v) + '\\b', 'gi');
  72485. } else {
  72486. r = new RegExp(escapeChars(v), 'gi');
  72487. }
  72488. input = input.replace(r, customReplacements[v]);
  72489. });
  72490. // add all custom replacement to allowed charlist
  72491. for (ch in customReplacements) {
  72492. allowedChars += ch;
  72493. }
  72494. }
  72495. allowedChars += separator;
  72496. // escape all necessary chars
  72497. allowedChars = escapeChars(allowedChars);
  72498. // trim whitespaces
  72499. input = input.replace(/(^\s+|\s+$)/g, '');
  72500. lastCharWasSymbol = false;
  72501. lastCharWasDiatric = false;
  72502. for (i = 0, l = input.length; i < l; i++) {
  72503. ch = input[i];
  72504. if (isReplacedCustomChar(ch, customReplacements)) {
  72505. // don't convert a already converted char
  72506. lastCharWasSymbol = false;
  72507. } else if (langChar[ch]) {
  72508. // process language specific diactrics chars conversion
  72509. ch = lastCharWasSymbol && langChar[ch].match(/[A-Za-z0-9]/) ? ' ' + langChar[ch] : langChar[ch];
  72510. lastCharWasSymbol = false;
  72511. } else if (ch in charMap) {
  72512. // the transliteration changes entirely when some special characters are added
  72513. if (i + 1 < l && lookAheadCharArray.indexOf(input[i + 1]) >= 0) {
  72514. diatricString += ch;
  72515. ch = '';
  72516. } else if (lastCharWasDiatric === true) {
  72517. ch = diatricMap[diatricString] + charMap[ch];
  72518. diatricString = '';
  72519. } else {
  72520. // process diactrics chars
  72521. ch = lastCharWasSymbol && charMap[ch].match(/[A-Za-z0-9]/) ? ' ' + charMap[ch] : charMap[ch];
  72522. }
  72523. lastCharWasSymbol = false;
  72524. lastCharWasDiatric = false;
  72525. } else if (ch in diatricMap) {
  72526. diatricString += ch;
  72527. ch = '';
  72528. // end of string, put the whole meaningful word
  72529. if (i === l - 1) {
  72530. ch = diatricMap[diatricString];
  72531. }
  72532. lastCharWasDiatric = true;
  72533. } else if (
  72534. // process symbol chars
  72535. symbol[ch] && !(uricFlag && uricChars
  72536. .indexOf(ch) !== -1) && !(uricNoSlashFlag && uricNoSlashChars
  72537. // .indexOf(ch) !== -1) && !(markFlag && markChars
  72538. .indexOf(ch) !== -1)) {
  72539. ch = lastCharWasSymbol || result.substr(-1).match(/[A-Za-z0-9]/) ? separator + symbol[ch] : symbol[ch];
  72540. ch += input[i + 1] !== void 0 && input[i + 1].match(/[A-Za-z0-9]/) ? separator : '';
  72541. lastCharWasSymbol = true;
  72542. } else {
  72543. if (lastCharWasDiatric === true) {
  72544. ch = diatricMap[diatricString] + ch;
  72545. diatricString = '';
  72546. lastCharWasDiatric = false;
  72547. } else if (lastCharWasSymbol && (/[A-Za-z0-9]/.test(ch) || result.substr(-1).match(/A-Za-z0-9]/))) {
  72548. // process latin chars
  72549. ch = ' ' + ch;
  72550. }
  72551. lastCharWasSymbol = false;
  72552. }
  72553. // add allowed chars
  72554. result += ch.replace(new RegExp('[^\\w\\s' + allowedChars + '_-]', 'g'), separator);
  72555. }
  72556. if (titleCase) {
  72557. result = result.replace(/(\w)(\S*)/g, function (_, i, r) {
  72558. var j = i.toUpperCase() + (r !== null ? r : '');
  72559. return (Object.keys(customReplacements).indexOf(j.toLowerCase()) < 0) ? j : j.toLowerCase();
  72560. });
  72561. }
  72562. // eliminate duplicate separators
  72563. // add separator
  72564. // trim separators from start and end
  72565. result = result.replace(/\s+/g, separator)
  72566. .replace(new RegExp('\\' + separator + '+', 'g'), separator)
  72567. .replace(new RegExp('(^\\' + separator + '+|\\' + separator + '+$)', 'g'), '');
  72568. if (truncate && result.length > truncate) {
  72569. lucky = result.charAt(truncate) === separator;
  72570. result = result.slice(0, truncate);
  72571. if (!lucky) {
  72572. result = result.slice(0, result.lastIndexOf(separator));
  72573. }
  72574. }
  72575. if (!maintainCase && !titleCase) {
  72576. result = result.toLowerCase();
  72577. }
  72578. return result;
  72579. };
  72580. /**
  72581. * createSlug curried(opts)(input)
  72582. * @param {object|string} opts config object or input string
  72583. * @return {Function} function getSlugWithConfig()
  72584. **/
  72585. var createSlug = function createSlug(opts) {
  72586. /**
  72587. * getSlugWithConfig
  72588. * @param {string} input string
  72589. * @return {string} slug string
  72590. */
  72591. return function getSlugWithConfig(input) {
  72592. return getSlug(input, opts);
  72593. };
  72594. };
  72595. /**
  72596. * escape Chars
  72597. * @param {string} input string
  72598. */
  72599. var escapeChars = function escapeChars(input) {
  72600. return input.replace(/[-\\^$*+?.()|[\]{}\/]/g, '\\$&');
  72601. };
  72602. /**
  72603. * check if the char is an already converted char from custom list
  72604. * @param {char} ch character to check
  72605. * @param {object} customReplacements custom translation map
  72606. */
  72607. var isReplacedCustomChar = function (ch, customReplacements) {
  72608. for (var c in customReplacements) {
  72609. if (customReplacements[c] === ch) {
  72610. return true;
  72611. }
  72612. }
  72613. };
  72614. if ( true && module.exports) {
  72615. // export functions for use in Node
  72616. module.exports = getSlug;
  72617. module.exports.createSlug = createSlug;
  72618. } else if (true) {
  72619. // export function for use in AMD
  72620. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
  72621. return getSlug;
  72622. }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
  72623. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  72624. } else {}
  72625. })(this);
  72626. /***/ }),
  72627. /***/ 46226:
  72628. /***/ ((__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) => {
  72629. "use strict";
  72630. /* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(93379);
  72631. /* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
  72632. /* harmony import */ var _style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7795);
  72633. /* harmony import */ var _style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);
  72634. /* harmony import */ var _style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(90569);
  72635. /* harmony import */ var _style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);
  72636. /* harmony import */ var _style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3565);
  72637. /* harmony import */ var _style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);
  72638. /* harmony import */ var _style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(70609);
  72639. /* harmony import */ var _style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);
  72640. /* harmony import */ var _style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(44589);
  72641. /* harmony import */ var _style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);
  72642. /* harmony import */ var _css_loader_dist_cjs_js_lint_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(39735);
  72643. var options = {};
  72644. options.styleTagTransform = (_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
  72645. options.setAttributes = (_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
  72646. options.insert = _style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
  72647. options.domAPI = (_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
  72648. options.insertStyleElement = (_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
  72649. var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_lint_css__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z, options);
  72650. /* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = (_css_loader_dist_cjs_js_lint_css__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z && _css_loader_dist_cjs_js_lint_css__WEBPACK_IMPORTED_MODULE_6__/* ["default"].locals */ .Z.locals ? _css_loader_dist_cjs_js_lint_css__WEBPACK_IMPORTED_MODULE_6__/* ["default"].locals */ .Z.locals : undefined);
  72651. /***/ }),
  72652. /***/ 93379:
  72653. /***/ ((module) => {
  72654. "use strict";
  72655. var stylesInDOM = [];
  72656. function getIndexByIdentifier(identifier) {
  72657. var result = -1;
  72658. for (var i = 0; i < stylesInDOM.length; i++) {
  72659. if (stylesInDOM[i].identifier === identifier) {
  72660. result = i;
  72661. break;
  72662. }
  72663. }
  72664. return result;
  72665. }
  72666. function modulesToDom(list, options) {
  72667. var idCountMap = {};
  72668. var identifiers = [];
  72669. for (var i = 0; i < list.length; i++) {
  72670. var item = list[i];
  72671. var id = options.base ? item[0] + options.base : item[0];
  72672. var count = idCountMap[id] || 0;
  72673. var identifier = "".concat(id, " ").concat(count);
  72674. idCountMap[id] = count + 1;
  72675. var indexByIdentifier = getIndexByIdentifier(identifier);
  72676. var obj = {
  72677. css: item[1],
  72678. media: item[2],
  72679. sourceMap: item[3],
  72680. supports: item[4],
  72681. layer: item[5]
  72682. };
  72683. if (indexByIdentifier !== -1) {
  72684. stylesInDOM[indexByIdentifier].references++;
  72685. stylesInDOM[indexByIdentifier].updater(obj);
  72686. } else {
  72687. var updater = addElementStyle(obj, options);
  72688. options.byIndex = i;
  72689. stylesInDOM.splice(i, 0, {
  72690. identifier: identifier,
  72691. updater: updater,
  72692. references: 1
  72693. });
  72694. }
  72695. identifiers.push(identifier);
  72696. }
  72697. return identifiers;
  72698. }
  72699. function addElementStyle(obj, options) {
  72700. var api = options.domAPI(options);
  72701. api.update(obj);
  72702. var updater = function updater(newObj) {
  72703. if (newObj) {
  72704. if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {
  72705. return;
  72706. }
  72707. api.update(obj = newObj);
  72708. } else {
  72709. api.remove();
  72710. }
  72711. };
  72712. return updater;
  72713. }
  72714. module.exports = function (list, options) {
  72715. options = options || {};
  72716. list = list || [];
  72717. var lastIdentifiers = modulesToDom(list, options);
  72718. return function update(newList) {
  72719. newList = newList || [];
  72720. for (var i = 0; i < lastIdentifiers.length; i++) {
  72721. var identifier = lastIdentifiers[i];
  72722. var index = getIndexByIdentifier(identifier);
  72723. stylesInDOM[index].references--;
  72724. }
  72725. var newLastIdentifiers = modulesToDom(newList, options);
  72726. for (var _i = 0; _i < lastIdentifiers.length; _i++) {
  72727. var _identifier = lastIdentifiers[_i];
  72728. var _index = getIndexByIdentifier(_identifier);
  72729. if (stylesInDOM[_index].references === 0) {
  72730. stylesInDOM[_index].updater();
  72731. stylesInDOM.splice(_index, 1);
  72732. }
  72733. }
  72734. lastIdentifiers = newLastIdentifiers;
  72735. };
  72736. };
  72737. /***/ }),
  72738. /***/ 90569:
  72739. /***/ ((module) => {
  72740. "use strict";
  72741. var memo = {};
  72742. /* istanbul ignore next */
  72743. function getTarget(target) {
  72744. if (typeof memo[target] === "undefined") {
  72745. var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself
  72746. if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
  72747. try {
  72748. // This will throw an exception if access to iframe is blocked
  72749. // due to cross-origin restrictions
  72750. styleTarget = styleTarget.contentDocument.head;
  72751. } catch (e) {
  72752. // istanbul ignore next
  72753. styleTarget = null;
  72754. }
  72755. }
  72756. memo[target] = styleTarget;
  72757. }
  72758. return memo[target];
  72759. }
  72760. /* istanbul ignore next */
  72761. function insertBySelector(insert, style) {
  72762. var target = getTarget(insert);
  72763. if (!target) {
  72764. throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
  72765. }
  72766. target.appendChild(style);
  72767. }
  72768. module.exports = insertBySelector;
  72769. /***/ }),
  72770. /***/ 70609:
  72771. /***/ ((module) => {
  72772. "use strict";
  72773. /* istanbul ignore next */
  72774. function insertStyleElement(options) {
  72775. var element = document.createElement("style");
  72776. options.setAttributes(element, options.attributes);
  72777. options.insert(element, options.options);
  72778. return element;
  72779. }
  72780. module.exports = insertStyleElement;
  72781. /***/ }),
  72782. /***/ 3565:
  72783. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  72784. "use strict";
  72785. /* istanbul ignore next */
  72786. function setAttributesWithoutAttributes(styleElement) {
  72787. var nonce = true ? __webpack_require__.nc : 0;
  72788. if (nonce) {
  72789. styleElement.setAttribute("nonce", nonce);
  72790. }
  72791. }
  72792. module.exports = setAttributesWithoutAttributes;
  72793. /***/ }),
  72794. /***/ 7795:
  72795. /***/ ((module) => {
  72796. "use strict";
  72797. /* istanbul ignore next */
  72798. function apply(styleElement, options, obj) {
  72799. var css = "";
  72800. if (obj.supports) {
  72801. css += "@supports (".concat(obj.supports, ") {");
  72802. }
  72803. if (obj.media) {
  72804. css += "@media ".concat(obj.media, " {");
  72805. }
  72806. var needLayer = typeof obj.layer !== "undefined";
  72807. if (needLayer) {
  72808. css += "@layer".concat(obj.layer.length > 0 ? " ".concat(obj.layer) : "", " {");
  72809. }
  72810. css += obj.css;
  72811. if (needLayer) {
  72812. css += "}";
  72813. }
  72814. if (obj.media) {
  72815. css += "}";
  72816. }
  72817. if (obj.supports) {
  72818. css += "}";
  72819. }
  72820. var sourceMap = obj.sourceMap;
  72821. if (sourceMap && typeof btoa !== "undefined") {
  72822. css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */");
  72823. } // For old IE
  72824. /* istanbul ignore if */
  72825. options.styleTagTransform(css, styleElement, options.options);
  72826. }
  72827. function removeStyleElement(styleElement) {
  72828. // istanbul ignore if
  72829. if (styleElement.parentNode === null) {
  72830. return false;
  72831. }
  72832. styleElement.parentNode.removeChild(styleElement);
  72833. }
  72834. /* istanbul ignore next */
  72835. function domAPI(options) {
  72836. var styleElement = options.insertStyleElement(options);
  72837. return {
  72838. update: function update(obj) {
  72839. apply(styleElement, options, obj);
  72840. },
  72841. remove: function remove() {
  72842. removeStyleElement(styleElement);
  72843. }
  72844. };
  72845. }
  72846. module.exports = domAPI;
  72847. /***/ }),
  72848. /***/ 44589:
  72849. /***/ ((module) => {
  72850. "use strict";
  72851. /* istanbul ignore next */
  72852. function styleTagTransform(css, styleElement) {
  72853. if (styleElement.styleSheet) {
  72854. styleElement.styleSheet.cssText = css;
  72855. } else {
  72856. while (styleElement.firstChild) {
  72857. styleElement.removeChild(styleElement.firstChild);
  72858. }
  72859. styleElement.appendChild(document.createTextNode(css));
  72860. }
  72861. }
  72862. module.exports = styleTagTransform;
  72863. /***/ }),
  72864. /***/ 8901:
  72865. /***/ ((module, exports, __webpack_require__) => {
  72866. var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
  72867. * Toastr
  72868. * Copyright 2012-2015
  72869. * Authors: John Papa, Hans Fjällemark, and Tim Ferrell.
  72870. * All Rights Reserved.
  72871. * Use, reproduction, distribution, and modification of this code is subject to the terms and
  72872. * conditions of the MIT license, available at http://www.opensource.org/licenses/mit-license.php
  72873. *
  72874. * ARIA Support: Greta Krafsig
  72875. *
  72876. * Project: https://github.com/CodeSeven/toastr
  72877. */
  72878. /* global define */
  72879. (function (define) {
  72880. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(65311)], __WEBPACK_AMD_DEFINE_RESULT__ = (function ($) {
  72881. return (function () {
  72882. var $container;
  72883. var listener;
  72884. var toastId = 0;
  72885. var toastType = {
  72886. error: 'error',
  72887. info: 'info',
  72888. success: 'success',
  72889. warning: 'warning'
  72890. };
  72891. var toastr = {
  72892. clear: clear,
  72893. remove: remove,
  72894. error: error,
  72895. getContainer: getContainer,
  72896. info: info,
  72897. options: {},
  72898. subscribe: subscribe,
  72899. success: success,
  72900. version: '2.1.4',
  72901. warning: warning
  72902. };
  72903. var previousToast;
  72904. return toastr;
  72905. ////////////////
  72906. function error(message, title, optionsOverride) {
  72907. return notify({
  72908. type: toastType.error,
  72909. iconClass: getOptions().iconClasses.error,
  72910. message: message,
  72911. optionsOverride: optionsOverride,
  72912. title: title
  72913. });
  72914. }
  72915. function getContainer(options, create) {
  72916. if (!options) { options = getOptions(); }
  72917. $container = $('#' + options.containerId);
  72918. if ($container.length) {
  72919. return $container;
  72920. }
  72921. if (create) {
  72922. $container = createContainer(options);
  72923. }
  72924. return $container;
  72925. }
  72926. function info(message, title, optionsOverride) {
  72927. return notify({
  72928. type: toastType.info,
  72929. iconClass: getOptions().iconClasses.info,
  72930. message: message,
  72931. optionsOverride: optionsOverride,
  72932. title: title
  72933. });
  72934. }
  72935. function subscribe(callback) {
  72936. listener = callback;
  72937. }
  72938. function success(message, title, optionsOverride) {
  72939. return notify({
  72940. type: toastType.success,
  72941. iconClass: getOptions().iconClasses.success,
  72942. message: message,
  72943. optionsOverride: optionsOverride,
  72944. title: title
  72945. });
  72946. }
  72947. function warning(message, title, optionsOverride) {
  72948. return notify({
  72949. type: toastType.warning,
  72950. iconClass: getOptions().iconClasses.warning,
  72951. message: message,
  72952. optionsOverride: optionsOverride,
  72953. title: title
  72954. });
  72955. }
  72956. function clear($toastElement, clearOptions) {
  72957. var options = getOptions();
  72958. if (!$container) { getContainer(options); }
  72959. if (!clearToast($toastElement, options, clearOptions)) {
  72960. clearContainer(options);
  72961. }
  72962. }
  72963. function remove($toastElement) {
  72964. var options = getOptions();
  72965. if (!$container) { getContainer(options); }
  72966. if ($toastElement && $(':focus', $toastElement).length === 0) {
  72967. removeToast($toastElement);
  72968. return;
  72969. }
  72970. if ($container.children().length) {
  72971. $container.remove();
  72972. }
  72973. }
  72974. // internal functions
  72975. function clearContainer (options) {
  72976. var toastsToClear = $container.children();
  72977. for (var i = toastsToClear.length - 1; i >= 0; i--) {
  72978. clearToast($(toastsToClear[i]), options);
  72979. }
  72980. }
  72981. function clearToast ($toastElement, options, clearOptions) {
  72982. var force = clearOptions && clearOptions.force ? clearOptions.force : false;
  72983. if ($toastElement && (force || $(':focus', $toastElement).length === 0)) {
  72984. $toastElement[options.hideMethod]({
  72985. duration: options.hideDuration,
  72986. easing: options.hideEasing,
  72987. complete: function () { removeToast($toastElement); }
  72988. });
  72989. return true;
  72990. }
  72991. return false;
  72992. }
  72993. function createContainer(options) {
  72994. $container = $('<div/>')
  72995. .attr('id', options.containerId)
  72996. .addClass(options.positionClass);
  72997. $container.appendTo($(options.target));
  72998. return $container;
  72999. }
  73000. function getDefaults() {
  73001. return {
  73002. tapToDismiss: true,
  73003. toastClass: 'toast',
  73004. containerId: 'toast-container',
  73005. debug: false,
  73006. showMethod: 'fadeIn', //fadeIn, slideDown, and show are built into jQuery
  73007. showDuration: 300,
  73008. showEasing: 'swing', //swing and linear are built into jQuery
  73009. onShown: undefined,
  73010. hideMethod: 'fadeOut',
  73011. hideDuration: 1000,
  73012. hideEasing: 'swing',
  73013. onHidden: undefined,
  73014. closeMethod: false,
  73015. closeDuration: false,
  73016. closeEasing: false,
  73017. closeOnHover: true,
  73018. extendedTimeOut: 1000,
  73019. iconClasses: {
  73020. error: 'toast-error',
  73021. info: 'toast-info',
  73022. success: 'toast-success',
  73023. warning: 'toast-warning'
  73024. },
  73025. iconClass: 'toast-info',
  73026. positionClass: 'toast-top-right',
  73027. timeOut: 5000, // Set timeOut and extendedTimeOut to 0 to make it sticky
  73028. titleClass: 'toast-title',
  73029. messageClass: 'toast-message',
  73030. escapeHtml: false,
  73031. target: 'body',
  73032. closeHtml: '<button type="button">&times;</button>',
  73033. closeClass: 'toast-close-button',
  73034. newestOnTop: true,
  73035. preventDuplicates: false,
  73036. progressBar: false,
  73037. progressClass: 'toast-progress',
  73038. rtl: false
  73039. };
  73040. }
  73041. function publish(args) {
  73042. if (!listener) { return; }
  73043. listener(args);
  73044. }
  73045. function notify(map) {
  73046. var options = getOptions();
  73047. var iconClass = map.iconClass || options.iconClass;
  73048. if (typeof (map.optionsOverride) !== 'undefined') {
  73049. options = $.extend(options, map.optionsOverride);
  73050. iconClass = map.optionsOverride.iconClass || iconClass;
  73051. }
  73052. if (shouldExit(options, map)) { return; }
  73053. toastId++;
  73054. $container = getContainer(options, true);
  73055. var intervalId = null;
  73056. var $toastElement = $('<div/>');
  73057. var $titleElement = $('<div/>');
  73058. var $messageElement = $('<div/>');
  73059. var $progressElement = $('<div/>');
  73060. var $closeElement = $(options.closeHtml);
  73061. var progressBar = {
  73062. intervalId: null,
  73063. hideEta: null,
  73064. maxHideTime: null
  73065. };
  73066. var response = {
  73067. toastId: toastId,
  73068. state: 'visible',
  73069. startTime: new Date(),
  73070. options: options,
  73071. map: map
  73072. };
  73073. personalizeToast();
  73074. displayToast();
  73075. handleEvents();
  73076. publish(response);
  73077. if (options.debug && console) {
  73078. console.log(response);
  73079. }
  73080. return $toastElement;
  73081. function escapeHtml(source) {
  73082. if (source == null) {
  73083. source = '';
  73084. }
  73085. return source
  73086. .replace(/&/g, '&amp;')
  73087. .replace(/"/g, '&quot;')
  73088. .replace(/'/g, '&#39;')
  73089. .replace(/</g, '&lt;')
  73090. .replace(/>/g, '&gt;');
  73091. }
  73092. function personalizeToast() {
  73093. setIcon();
  73094. setTitle();
  73095. setMessage();
  73096. setCloseButton();
  73097. setProgressBar();
  73098. setRTL();
  73099. setSequence();
  73100. setAria();
  73101. }
  73102. function setAria() {
  73103. var ariaValue = '';
  73104. switch (map.iconClass) {
  73105. case 'toast-success':
  73106. case 'toast-info':
  73107. ariaValue = 'polite';
  73108. break;
  73109. default:
  73110. ariaValue = 'assertive';
  73111. }
  73112. $toastElement.attr('aria-live', ariaValue);
  73113. }
  73114. function handleEvents() {
  73115. if (options.closeOnHover) {
  73116. $toastElement.hover(stickAround, delayedHideToast);
  73117. }
  73118. if (!options.onclick && options.tapToDismiss) {
  73119. $toastElement.click(hideToast);
  73120. }
  73121. if (options.closeButton && $closeElement) {
  73122. $closeElement.click(function (event) {
  73123. if (event.stopPropagation) {
  73124. event.stopPropagation();
  73125. } else if (event.cancelBubble !== undefined && event.cancelBubble !== true) {
  73126. event.cancelBubble = true;
  73127. }
  73128. if (options.onCloseClick) {
  73129. options.onCloseClick(event);
  73130. }
  73131. hideToast(true);
  73132. });
  73133. }
  73134. if (options.onclick) {
  73135. $toastElement.click(function (event) {
  73136. options.onclick(event);
  73137. hideToast();
  73138. });
  73139. }
  73140. }
  73141. function displayToast() {
  73142. $toastElement.hide();
  73143. $toastElement[options.showMethod](
  73144. {duration: options.showDuration, easing: options.showEasing, complete: options.onShown}
  73145. );
  73146. if (options.timeOut > 0) {
  73147. intervalId = setTimeout(hideToast, options.timeOut);
  73148. progressBar.maxHideTime = parseFloat(options.timeOut);
  73149. progressBar.hideEta = new Date().getTime() + progressBar.maxHideTime;
  73150. if (options.progressBar) {
  73151. progressBar.intervalId = setInterval(updateProgress, 10);
  73152. }
  73153. }
  73154. }
  73155. function setIcon() {
  73156. if (map.iconClass) {
  73157. $toastElement.addClass(options.toastClass).addClass(iconClass);
  73158. }
  73159. }
  73160. function setSequence() {
  73161. if (options.newestOnTop) {
  73162. $container.prepend($toastElement);
  73163. } else {
  73164. $container.append($toastElement);
  73165. }
  73166. }
  73167. function setTitle() {
  73168. if (map.title) {
  73169. var suffix = map.title;
  73170. if (options.escapeHtml) {
  73171. suffix = escapeHtml(map.title);
  73172. }
  73173. $titleElement.append(suffix).addClass(options.titleClass);
  73174. $toastElement.append($titleElement);
  73175. }
  73176. }
  73177. function setMessage() {
  73178. if (map.message) {
  73179. var suffix = map.message;
  73180. if (options.escapeHtml) {
  73181. suffix = escapeHtml(map.message);
  73182. }
  73183. $messageElement.append(suffix).addClass(options.messageClass);
  73184. $toastElement.append($messageElement);
  73185. }
  73186. }
  73187. function setCloseButton() {
  73188. if (options.closeButton) {
  73189. $closeElement.addClass(options.closeClass).attr('role', 'button');
  73190. $toastElement.prepend($closeElement);
  73191. }
  73192. }
  73193. function setProgressBar() {
  73194. if (options.progressBar) {
  73195. $progressElement.addClass(options.progressClass);
  73196. $toastElement.prepend($progressElement);
  73197. }
  73198. }
  73199. function setRTL() {
  73200. if (options.rtl) {
  73201. $toastElement.addClass('rtl');
  73202. }
  73203. }
  73204. function shouldExit(options, map) {
  73205. if (options.preventDuplicates) {
  73206. if (map.message === previousToast) {
  73207. return true;
  73208. } else {
  73209. previousToast = map.message;
  73210. }
  73211. }
  73212. return false;
  73213. }
  73214. function hideToast(override) {
  73215. var method = override && options.closeMethod !== false ? options.closeMethod : options.hideMethod;
  73216. var duration = override && options.closeDuration !== false ?
  73217. options.closeDuration : options.hideDuration;
  73218. var easing = override && options.closeEasing !== false ? options.closeEasing : options.hideEasing;
  73219. if ($(':focus', $toastElement).length && !override) {
  73220. return;
  73221. }
  73222. clearTimeout(progressBar.intervalId);
  73223. return $toastElement[method]({
  73224. duration: duration,
  73225. easing: easing,
  73226. complete: function () {
  73227. removeToast($toastElement);
  73228. clearTimeout(intervalId);
  73229. if (options.onHidden && response.state !== 'hidden') {
  73230. options.onHidden();
  73231. }
  73232. response.state = 'hidden';
  73233. response.endTime = new Date();
  73234. publish(response);
  73235. }
  73236. });
  73237. }
  73238. function delayedHideToast() {
  73239. if (options.timeOut > 0 || options.extendedTimeOut > 0) {
  73240. intervalId = setTimeout(hideToast, options.extendedTimeOut);
  73241. progressBar.maxHideTime = parseFloat(options.extendedTimeOut);
  73242. progressBar.hideEta = new Date().getTime() + progressBar.maxHideTime;
  73243. }
  73244. }
  73245. function stickAround() {
  73246. clearTimeout(intervalId);
  73247. progressBar.hideEta = 0;
  73248. $toastElement.stop(true, true)[options.showMethod](
  73249. {duration: options.showDuration, easing: options.showEasing}
  73250. );
  73251. }
  73252. function updateProgress() {
  73253. var percentage = ((progressBar.hideEta - (new Date().getTime())) / progressBar.maxHideTime) * 100;
  73254. $progressElement.width(percentage + '%');
  73255. }
  73256. }
  73257. function getOptions() {
  73258. return $.extend({}, getDefaults(), toastr.options);
  73259. }
  73260. function removeToast($toastElement) {
  73261. if (!$container) { $container = getContainer(); }
  73262. if ($toastElement.is(':visible')) {
  73263. return;
  73264. }
  73265. $toastElement.remove();
  73266. $toastElement = null;
  73267. if ($container.children().length === 0) {
  73268. $container.remove();
  73269. previousToast = undefined;
  73270. }
  73271. }
  73272. })();
  73273. }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
  73274. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  73275. }(__webpack_require__.amdD));
  73276. /***/ }),
  73277. /***/ 29950:
  73278. /***/ ((module) => {
  73279. "use strict";
  73280. /**
  73281. * DEVELOPED BY
  73282. * GIL LOPES BUENO
  73283. * gilbueno.mail@gmail.com
  73284. *
  73285. * WORKS WITH:
  73286. * IE 9+, FF 4+, SF 5+, WebKit, CH 7+, OP 12+, BESEN, Rhino 1.7+
  73287. *
  73288. * FORK:
  73289. * https://github.com/melanke/Watch.JS
  73290. */
  73291. (function (factory) {
  73292. if (true) {
  73293. // Node. Does not work with strict CommonJS, but
  73294. // only CommonJS-like enviroments that support module.exports,
  73295. // like Node.
  73296. module.exports = factory();
  73297. } else {}
  73298. }(function () {
  73299. var WatchJS = {
  73300. noMore: false
  73301. },
  73302. defineWatcher,
  73303. unwatchOne,
  73304. callWatchers;
  73305. var isFunction = function (functionToCheck) {
  73306. var getType = {};
  73307. return functionToCheck && getType.toString.call(functionToCheck) == '[object Function]';
  73308. };
  73309. var isInt = function (x) {
  73310. return x % 1 === 0;
  73311. };
  73312. var isArray = function(obj) {
  73313. return Object.prototype.toString.call(obj) === '[object Array]';
  73314. };
  73315. var isModernBrowser = function () {
  73316. return Object.defineProperty || Object.prototype.__defineGetter__;
  73317. };
  73318. var defineGetAndSet = function (obj, propName, getter, setter) {
  73319. try {
  73320. Object.defineProperty(obj, propName, {
  73321. get: getter,
  73322. set: setter,
  73323. enumerable: true,
  73324. configurable: true
  73325. });
  73326. } catch(error) {
  73327. try{
  73328. Object.prototype.__defineGetter__.call(obj, propName, getter);
  73329. Object.prototype.__defineSetter__.call(obj, propName, setter);
  73330. }catch(error2){
  73331. throw "watchJS error: browser not supported :/"
  73332. }
  73333. }
  73334. };
  73335. var defineProp = function (obj, propName, value) {
  73336. try {
  73337. Object.defineProperty(obj, propName, {
  73338. enumerable: false,
  73339. configurable: true,
  73340. writable: false,
  73341. value: value
  73342. });
  73343. } catch(error) {
  73344. obj[propName] = value;
  73345. }
  73346. };
  73347. var watch = function () {
  73348. if (isFunction(arguments[1])) {
  73349. watchAll.apply(this, arguments);
  73350. } else if (isArray(arguments[1])) {
  73351. watchMany.apply(this, arguments);
  73352. } else {
  73353. watchOne.apply(this, arguments);
  73354. }
  73355. };
  73356. var watchAll = function (obj, watcher, level) {
  73357. if (obj instanceof String || (!(obj instanceof Object) && !isArray(obj))) { //accepts only objects and array (not string)
  73358. return;
  73359. }
  73360. var props = [];
  73361. if(isArray(obj)) {
  73362. for (var prop = 0; prop < obj.length; prop++) { //for each item if obj is an array
  73363. props.push(prop); //put in the props
  73364. }
  73365. } else {
  73366. for (var prop2 in obj) { //for each attribute if obj is an object
  73367. props.push(prop2); //put in the props
  73368. }
  73369. }
  73370. watchMany(obj, props, watcher, level); //watch all itens of the props
  73371. };
  73372. var watchMany = function (obj, props, watcher, level) {
  73373. for (var prop in props) { //watch each attribute of "props" if is an object
  73374. watchOne(obj, props[prop], watcher, level);
  73375. }
  73376. };
  73377. var watchOne = function (obj, prop, watcher, level) {
  73378. if(isFunction(obj[prop])) { //dont watch if it is a function
  73379. return;
  73380. }
  73381. if(obj[prop] != null && (level === undefined || level > 0)){
  73382. if(level !== undefined){
  73383. level--;
  73384. }
  73385. watchAll(obj[prop], watcher, level); //recursively watch all attributes of this
  73386. }
  73387. defineWatcher(obj, prop, watcher);
  73388. };
  73389. var unwatch = function () {
  73390. if (isFunction(arguments[1])) {
  73391. unwatchAll.apply(this, arguments);
  73392. } else if (isArray(arguments[1])) {
  73393. unwatchMany.apply(this, arguments);
  73394. } else {
  73395. unwatchOne.apply(this, arguments);
  73396. }
  73397. };
  73398. var unwatchAll = function (obj, watcher) {
  73399. if (obj instanceof String || (!(obj instanceof Object) && !isArray(obj))) { //accepts only objects and array (not string)
  73400. return;
  73401. }
  73402. var props = [];
  73403. if (isArray(obj)) {
  73404. for (var prop = 0; prop < obj.length; prop++) { //for each item if obj is an array
  73405. props.push(prop); //put in the props
  73406. }
  73407. } else {
  73408. for (var prop2 in obj) { //for each attribute if obj is an object
  73409. props.push(prop2); //put in the props
  73410. }
  73411. }
  73412. unwatchMany(obj, props, watcher); //watch all itens of the props
  73413. };
  73414. var unwatchMany = function (obj, props, watcher) {
  73415. for (var prop2 in props) { //watch each attribute of "props" if is an object
  73416. unwatchOne(obj, props[prop2], watcher);
  73417. }
  73418. };
  73419. if(isModernBrowser()){
  73420. defineWatcher = function (obj, prop, watcher) {
  73421. var val = obj[prop];
  73422. watchFunctions(obj, prop);
  73423. if (!obj.watchers) {
  73424. defineProp(obj, "watchers", {});
  73425. }
  73426. if (!obj.watchers[prop]) {
  73427. obj.watchers[prop] = [];
  73428. }
  73429. obj.watchers[prop].push(watcher); //add the new watcher in the watchers array
  73430. var getter = function () {
  73431. return val;
  73432. };
  73433. var setter = function (newval) {
  73434. var oldval = val;
  73435. val = newval;
  73436. if (obj[prop]){
  73437. watchAll(obj[prop], watcher);
  73438. }
  73439. watchFunctions(obj, prop);
  73440. if (!WatchJS.noMore){
  73441. if (JSON.stringify(oldval) !== JSON.stringify(newval)) {
  73442. callWatchers(obj, prop, "set", newval, oldval);
  73443. WatchJS.noMore = false;
  73444. }
  73445. }
  73446. };
  73447. defineGetAndSet(obj, prop, getter, setter);
  73448. };
  73449. callWatchers = function (obj, prop, action, newval, oldval) {
  73450. for (var wr in obj.watchers[prop]) {
  73451. if (isInt(wr)){
  73452. obj.watchers[prop][wr].call(obj, prop, action, newval, oldval);
  73453. }
  73454. }
  73455. };
  73456. // @todo code related to "watchFunctions" is certainly buggy
  73457. var methodNames = ['pop', 'push', 'reverse', 'shift', 'sort', 'slice', 'unshift'];
  73458. var defineArrayMethodWatcher = function (obj, prop, original, methodName) {
  73459. defineProp(obj[prop], methodName, function () {
  73460. var response = original.apply(obj[prop], arguments);
  73461. watchOne(obj, obj[prop]);
  73462. if (methodName !== 'slice') {
  73463. callWatchers(obj, prop, methodName,arguments);
  73464. }
  73465. return response;
  73466. });
  73467. };
  73468. var watchFunctions = function(obj, prop) {
  73469. if ((!obj[prop]) || (obj[prop] instanceof String) || (!isArray(obj[prop]))) {
  73470. return;
  73471. }
  73472. for (var i = methodNames.length, methodName; i--;) {
  73473. methodName = methodNames[i];
  73474. defineArrayMethodWatcher(obj, prop, obj[prop][methodName], methodName);
  73475. }
  73476. };
  73477. unwatchOne = function (obj, prop, watcher) {
  73478. for(var i in obj.watchers[prop]){
  73479. var w = obj.watchers[prop][i];
  73480. if(w == watcher) {
  73481. obj.watchers[prop].splice(i, 1);
  73482. }
  73483. }
  73484. };
  73485. } else {
  73486. //this implementation dont work because it cant handle the gap between "settings".
  73487. //I mean, if you use a setter for an attribute after another setter of the same attribute it will only fire the second
  73488. //but I think we could think something to fix it
  73489. var subjects = [];
  73490. defineWatcher = function(obj, prop, watcher){
  73491. subjects.push({
  73492. obj: obj,
  73493. prop: prop,
  73494. serialized: JSON.stringify(obj[prop]),
  73495. watcher: watcher
  73496. });
  73497. };
  73498. unwatchOne = function (obj, prop, watcher) {
  73499. for (var i in subjects) {
  73500. var subj = subjects[i];
  73501. if (subj.obj == obj && subj.prop == prop && subj.watcher == watcher) {
  73502. subjects.splice(i, 1);
  73503. }
  73504. }
  73505. };
  73506. callWatchers = function (obj, prop, action, value) {
  73507. for (var i in subjects) {
  73508. var subj = subjects[i];
  73509. if (subj.obj == obj && subj.prop == prop) {
  73510. subj.watcher.call(obj, prop, action, value);
  73511. }
  73512. }
  73513. };
  73514. var loop = function(){
  73515. for(var i in subjects){
  73516. var subj = subjects[i];
  73517. var newSer = JSON.stringify(subj.obj[subj.prop]);
  73518. if(newSer != subj.serialized){
  73519. subj.watcher.call(subj.obj, subj.prop, subj.obj[subj.prop], JSON.parse(subj.serialized));
  73520. subj.serialized = newSer;
  73521. }
  73522. }
  73523. };
  73524. setInterval(loop, 50);
  73525. }
  73526. WatchJS.watch = watch;
  73527. WatchJS.unwatch = unwatch;
  73528. WatchJS.callWatchers = callWatchers;
  73529. return WatchJS;
  73530. }));
  73531. /***/ }),
  73532. /***/ 1272:
  73533. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  73534. "use strict";
  73535. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  73536. /* harmony export */ "ZP": () => (__WEBPACK_DEFAULT_EXPORT__)
  73537. /* harmony export */ });
  73538. /* unused harmony exports CORE_SCHEMA, DEFAULT_SCHEMA, FAILSAFE_SCHEMA, JSON_SCHEMA, Schema, Type, YAMLException, dump, load, loadAll, safeDump, safeLoad, safeLoadAll, types */
  73539. /*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
  73540. function isNothing(subject) {
  73541. return (typeof subject === 'undefined') || (subject === null);
  73542. }
  73543. function isObject(subject) {
  73544. return (typeof subject === 'object') && (subject !== null);
  73545. }
  73546. function toArray(sequence) {
  73547. if (Array.isArray(sequence)) return sequence;
  73548. else if (isNothing(sequence)) return [];
  73549. return [ sequence ];
  73550. }
  73551. function extend(target, source) {
  73552. var index, length, key, sourceKeys;
  73553. if (source) {
  73554. sourceKeys = Object.keys(source);
  73555. for (index = 0, length = sourceKeys.length; index < length; index += 1) {
  73556. key = sourceKeys[index];
  73557. target[key] = source[key];
  73558. }
  73559. }
  73560. return target;
  73561. }
  73562. function repeat(string, count) {
  73563. var result = '', cycle;
  73564. for (cycle = 0; cycle < count; cycle += 1) {
  73565. result += string;
  73566. }
  73567. return result;
  73568. }
  73569. function isNegativeZero(number) {
  73570. return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number);
  73571. }
  73572. var isNothing_1 = isNothing;
  73573. var isObject_1 = isObject;
  73574. var toArray_1 = toArray;
  73575. var repeat_1 = repeat;
  73576. var isNegativeZero_1 = isNegativeZero;
  73577. var extend_1 = extend;
  73578. var common = {
  73579. isNothing: isNothing_1,
  73580. isObject: isObject_1,
  73581. toArray: toArray_1,
  73582. repeat: repeat_1,
  73583. isNegativeZero: isNegativeZero_1,
  73584. extend: extend_1
  73585. };
  73586. // YAML error class. http://stackoverflow.com/questions/8458984
  73587. function formatError(exception, compact) {
  73588. var where = '', message = exception.reason || '(unknown reason)';
  73589. if (!exception.mark) return message;
  73590. if (exception.mark.name) {
  73591. where += 'in "' + exception.mark.name + '" ';
  73592. }
  73593. where += '(' + (exception.mark.line + 1) + ':' + (exception.mark.column + 1) + ')';
  73594. if (!compact && exception.mark.snippet) {
  73595. where += '\n\n' + exception.mark.snippet;
  73596. }
  73597. return message + ' ' + where;
  73598. }
  73599. function YAMLException$1(reason, mark) {
  73600. // Super constructor
  73601. Error.call(this);
  73602. this.name = 'YAMLException';
  73603. this.reason = reason;
  73604. this.mark = mark;
  73605. this.message = formatError(this, false);
  73606. // Include stack trace in error object
  73607. if (Error.captureStackTrace) {
  73608. // Chrome and NodeJS
  73609. Error.captureStackTrace(this, this.constructor);
  73610. } else {
  73611. // FF, IE 10+ and Safari 6+. Fallback for others
  73612. this.stack = (new Error()).stack || '';
  73613. }
  73614. }
  73615. // Inherit from Error
  73616. YAMLException$1.prototype = Object.create(Error.prototype);
  73617. YAMLException$1.prototype.constructor = YAMLException$1;
  73618. YAMLException$1.prototype.toString = function toString(compact) {
  73619. return this.name + ': ' + formatError(this, compact);
  73620. };
  73621. var exception = YAMLException$1;
  73622. // get snippet for a single line, respecting maxLength
  73623. function getLine(buffer, lineStart, lineEnd, position, maxLineLength) {
  73624. var head = '';
  73625. var tail = '';
  73626. var maxHalfLength = Math.floor(maxLineLength / 2) - 1;
  73627. if (position - lineStart > maxHalfLength) {
  73628. head = ' ... ';
  73629. lineStart = position - maxHalfLength + head.length;
  73630. }
  73631. if (lineEnd - position > maxHalfLength) {
  73632. tail = ' ...';
  73633. lineEnd = position + maxHalfLength - tail.length;
  73634. }
  73635. return {
  73636. str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, '→') + tail,
  73637. pos: position - lineStart + head.length // relative position
  73638. };
  73639. }
  73640. function padStart(string, max) {
  73641. return common.repeat(' ', max - string.length) + string;
  73642. }
  73643. function makeSnippet(mark, options) {
  73644. options = Object.create(options || null);
  73645. if (!mark.buffer) return null;
  73646. if (!options.maxLength) options.maxLength = 79;
  73647. if (typeof options.indent !== 'number') options.indent = 1;
  73648. if (typeof options.linesBefore !== 'number') options.linesBefore = 3;
  73649. if (typeof options.linesAfter !== 'number') options.linesAfter = 2;
  73650. var re = /\r?\n|\r|\0/g;
  73651. var lineStarts = [ 0 ];
  73652. var lineEnds = [];
  73653. var match;
  73654. var foundLineNo = -1;
  73655. while ((match = re.exec(mark.buffer))) {
  73656. lineEnds.push(match.index);
  73657. lineStarts.push(match.index + match[0].length);
  73658. if (mark.position <= match.index && foundLineNo < 0) {
  73659. foundLineNo = lineStarts.length - 2;
  73660. }
  73661. }
  73662. if (foundLineNo < 0) foundLineNo = lineStarts.length - 1;
  73663. var result = '', i, line;
  73664. var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length;
  73665. var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3);
  73666. for (i = 1; i <= options.linesBefore; i++) {
  73667. if (foundLineNo - i < 0) break;
  73668. line = getLine(
  73669. mark.buffer,
  73670. lineStarts[foundLineNo - i],
  73671. lineEnds[foundLineNo - i],
  73672. mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]),
  73673. maxLineLength
  73674. );
  73675. result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) +
  73676. ' | ' + line.str + '\n' + result;
  73677. }
  73678. line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);
  73679. result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) +
  73680. ' | ' + line.str + '\n';
  73681. result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\n';
  73682. for (i = 1; i <= options.linesAfter; i++) {
  73683. if (foundLineNo + i >= lineEnds.length) break;
  73684. line = getLine(
  73685. mark.buffer,
  73686. lineStarts[foundLineNo + i],
  73687. lineEnds[foundLineNo + i],
  73688. mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]),
  73689. maxLineLength
  73690. );
  73691. result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) +
  73692. ' | ' + line.str + '\n';
  73693. }
  73694. return result.replace(/\n$/, '');
  73695. }
  73696. var snippet = makeSnippet;
  73697. var TYPE_CONSTRUCTOR_OPTIONS = [
  73698. 'kind',
  73699. 'multi',
  73700. 'resolve',
  73701. 'construct',
  73702. 'instanceOf',
  73703. 'predicate',
  73704. 'represent',
  73705. 'representName',
  73706. 'defaultStyle',
  73707. 'styleAliases'
  73708. ];
  73709. var YAML_NODE_KINDS = [
  73710. 'scalar',
  73711. 'sequence',
  73712. 'mapping'
  73713. ];
  73714. function compileStyleAliases(map) {
  73715. var result = {};
  73716. if (map !== null) {
  73717. Object.keys(map).forEach(function (style) {
  73718. map[style].forEach(function (alias) {
  73719. result[String(alias)] = style;
  73720. });
  73721. });
  73722. }
  73723. return result;
  73724. }
  73725. function Type$1(tag, options) {
  73726. options = options || {};
  73727. Object.keys(options).forEach(function (name) {
  73728. if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {
  73729. throw new exception('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.');
  73730. }
  73731. });
  73732. // TODO: Add tag format check.
  73733. this.options = options; // keep original options in case user wants to extend this type later
  73734. this.tag = tag;
  73735. this.kind = options['kind'] || null;
  73736. this.resolve = options['resolve'] || function () { return true; };
  73737. this.construct = options['construct'] || function (data) { return data; };
  73738. this.instanceOf = options['instanceOf'] || null;
  73739. this.predicate = options['predicate'] || null;
  73740. this.represent = options['represent'] || null;
  73741. this.representName = options['representName'] || null;
  73742. this.defaultStyle = options['defaultStyle'] || null;
  73743. this.multi = options['multi'] || false;
  73744. this.styleAliases = compileStyleAliases(options['styleAliases'] || null);
  73745. if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {
  73746. throw new exception('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.');
  73747. }
  73748. }
  73749. var type = Type$1;
  73750. /*eslint-disable max-len*/
  73751. function compileList(schema, name) {
  73752. var result = [];
  73753. schema[name].forEach(function (currentType) {
  73754. var newIndex = result.length;
  73755. result.forEach(function (previousType, previousIndex) {
  73756. if (previousType.tag === currentType.tag &&
  73757. previousType.kind === currentType.kind &&
  73758. previousType.multi === currentType.multi) {
  73759. newIndex = previousIndex;
  73760. }
  73761. });
  73762. result[newIndex] = currentType;
  73763. });
  73764. return result;
  73765. }
  73766. function compileMap(/* lists... */) {
  73767. var result = {
  73768. scalar: {},
  73769. sequence: {},
  73770. mapping: {},
  73771. fallback: {},
  73772. multi: {
  73773. scalar: [],
  73774. sequence: [],
  73775. mapping: [],
  73776. fallback: []
  73777. }
  73778. }, index, length;
  73779. function collectType(type) {
  73780. if (type.multi) {
  73781. result.multi[type.kind].push(type);
  73782. result.multi['fallback'].push(type);
  73783. } else {
  73784. result[type.kind][type.tag] = result['fallback'][type.tag] = type;
  73785. }
  73786. }
  73787. for (index = 0, length = arguments.length; index < length; index += 1) {
  73788. arguments[index].forEach(collectType);
  73789. }
  73790. return result;
  73791. }
  73792. function Schema$1(definition) {
  73793. return this.extend(definition);
  73794. }
  73795. Schema$1.prototype.extend = function extend(definition) {
  73796. var implicit = [];
  73797. var explicit = [];
  73798. if (definition instanceof type) {
  73799. // Schema.extend(type)
  73800. explicit.push(definition);
  73801. } else if (Array.isArray(definition)) {
  73802. // Schema.extend([ type1, type2, ... ])
  73803. explicit = explicit.concat(definition);
  73804. } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) {
  73805. // Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] })
  73806. if (definition.implicit) implicit = implicit.concat(definition.implicit);
  73807. if (definition.explicit) explicit = explicit.concat(definition.explicit);
  73808. } else {
  73809. throw new exception('Schema.extend argument should be a Type, [ Type ], ' +
  73810. 'or a schema definition ({ implicit: [...], explicit: [...] })');
  73811. }
  73812. implicit.forEach(function (type$1) {
  73813. if (!(type$1 instanceof type)) {
  73814. throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.');
  73815. }
  73816. if (type$1.loadKind && type$1.loadKind !== 'scalar') {
  73817. throw new exception('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.');
  73818. }
  73819. if (type$1.multi) {
  73820. throw new exception('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.');
  73821. }
  73822. });
  73823. explicit.forEach(function (type$1) {
  73824. if (!(type$1 instanceof type)) {
  73825. throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.');
  73826. }
  73827. });
  73828. var result = Object.create(Schema$1.prototype);
  73829. result.implicit = (this.implicit || []).concat(implicit);
  73830. result.explicit = (this.explicit || []).concat(explicit);
  73831. result.compiledImplicit = compileList(result, 'implicit');
  73832. result.compiledExplicit = compileList(result, 'explicit');
  73833. result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit);
  73834. return result;
  73835. };
  73836. var schema = Schema$1;
  73837. var str = new type('tag:yaml.org,2002:str', {
  73838. kind: 'scalar',
  73839. construct: function (data) { return data !== null ? data : ''; }
  73840. });
  73841. var seq = new type('tag:yaml.org,2002:seq', {
  73842. kind: 'sequence',
  73843. construct: function (data) { return data !== null ? data : []; }
  73844. });
  73845. var map = new type('tag:yaml.org,2002:map', {
  73846. kind: 'mapping',
  73847. construct: function (data) { return data !== null ? data : {}; }
  73848. });
  73849. var failsafe = new schema({
  73850. explicit: [
  73851. str,
  73852. seq,
  73853. map
  73854. ]
  73855. });
  73856. function resolveYamlNull(data) {
  73857. if (data === null) return true;
  73858. var max = data.length;
  73859. return (max === 1 && data === '~') ||
  73860. (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL'));
  73861. }
  73862. function constructYamlNull() {
  73863. return null;
  73864. }
  73865. function isNull(object) {
  73866. return object === null;
  73867. }
  73868. var _null = new type('tag:yaml.org,2002:null', {
  73869. kind: 'scalar',
  73870. resolve: resolveYamlNull,
  73871. construct: constructYamlNull,
  73872. predicate: isNull,
  73873. represent: {
  73874. canonical: function () { return '~'; },
  73875. lowercase: function () { return 'null'; },
  73876. uppercase: function () { return 'NULL'; },
  73877. camelcase: function () { return 'Null'; },
  73878. empty: function () { return ''; }
  73879. },
  73880. defaultStyle: 'lowercase'
  73881. });
  73882. function resolveYamlBoolean(data) {
  73883. if (data === null) return false;
  73884. var max = data.length;
  73885. return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) ||
  73886. (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE'));
  73887. }
  73888. function constructYamlBoolean(data) {
  73889. return data === 'true' ||
  73890. data === 'True' ||
  73891. data === 'TRUE';
  73892. }
  73893. function isBoolean(object) {
  73894. return Object.prototype.toString.call(object) === '[object Boolean]';
  73895. }
  73896. var bool = new type('tag:yaml.org,2002:bool', {
  73897. kind: 'scalar',
  73898. resolve: resolveYamlBoolean,
  73899. construct: constructYamlBoolean,
  73900. predicate: isBoolean,
  73901. represent: {
  73902. lowercase: function (object) { return object ? 'true' : 'false'; },
  73903. uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; },
  73904. camelcase: function (object) { return object ? 'True' : 'False'; }
  73905. },
  73906. defaultStyle: 'lowercase'
  73907. });
  73908. function isHexCode(c) {
  73909. return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) ||
  73910. ((0x41/* A */ <= c) && (c <= 0x46/* F */)) ||
  73911. ((0x61/* a */ <= c) && (c <= 0x66/* f */));
  73912. }
  73913. function isOctCode(c) {
  73914. return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */));
  73915. }
  73916. function isDecCode(c) {
  73917. return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */));
  73918. }
  73919. function resolveYamlInteger(data) {
  73920. if (data === null) return false;
  73921. var max = data.length,
  73922. index = 0,
  73923. hasDigits = false,
  73924. ch;
  73925. if (!max) return false;
  73926. ch = data[index];
  73927. // sign
  73928. if (ch === '-' || ch === '+') {
  73929. ch = data[++index];
  73930. }
  73931. if (ch === '0') {
  73932. // 0
  73933. if (index + 1 === max) return true;
  73934. ch = data[++index];
  73935. // base 2, base 8, base 16
  73936. if (ch === 'b') {
  73937. // base 2
  73938. index++;
  73939. for (; index < max; index++) {
  73940. ch = data[index];
  73941. if (ch === '_') continue;
  73942. if (ch !== '0' && ch !== '1') return false;
  73943. hasDigits = true;
  73944. }
  73945. return hasDigits && ch !== '_';
  73946. }
  73947. if (ch === 'x') {
  73948. // base 16
  73949. index++;
  73950. for (; index < max; index++) {
  73951. ch = data[index];
  73952. if (ch === '_') continue;
  73953. if (!isHexCode(data.charCodeAt(index))) return false;
  73954. hasDigits = true;
  73955. }
  73956. return hasDigits && ch !== '_';
  73957. }
  73958. if (ch === 'o') {
  73959. // base 8
  73960. index++;
  73961. for (; index < max; index++) {
  73962. ch = data[index];
  73963. if (ch === '_') continue;
  73964. if (!isOctCode(data.charCodeAt(index))) return false;
  73965. hasDigits = true;
  73966. }
  73967. return hasDigits && ch !== '_';
  73968. }
  73969. }
  73970. // base 10 (except 0)
  73971. // value should not start with `_`;
  73972. if (ch === '_') return false;
  73973. for (; index < max; index++) {
  73974. ch = data[index];
  73975. if (ch === '_') continue;
  73976. if (!isDecCode(data.charCodeAt(index))) {
  73977. return false;
  73978. }
  73979. hasDigits = true;
  73980. }
  73981. // Should have digits and should not end with `_`
  73982. if (!hasDigits || ch === '_') return false;
  73983. return true;
  73984. }
  73985. function constructYamlInteger(data) {
  73986. var value = data, sign = 1, ch;
  73987. if (value.indexOf('_') !== -1) {
  73988. value = value.replace(/_/g, '');
  73989. }
  73990. ch = value[0];
  73991. if (ch === '-' || ch === '+') {
  73992. if (ch === '-') sign = -1;
  73993. value = value.slice(1);
  73994. ch = value[0];
  73995. }
  73996. if (value === '0') return 0;
  73997. if (ch === '0') {
  73998. if (value[1] === 'b') return sign * parseInt(value.slice(2), 2);
  73999. if (value[1] === 'x') return sign * parseInt(value.slice(2), 16);
  74000. if (value[1] === 'o') return sign * parseInt(value.slice(2), 8);
  74001. }
  74002. return sign * parseInt(value, 10);
  74003. }
  74004. function isInteger(object) {
  74005. return (Object.prototype.toString.call(object)) === '[object Number]' &&
  74006. (object % 1 === 0 && !common.isNegativeZero(object));
  74007. }
  74008. var int = new type('tag:yaml.org,2002:int', {
  74009. kind: 'scalar',
  74010. resolve: resolveYamlInteger,
  74011. construct: constructYamlInteger,
  74012. predicate: isInteger,
  74013. represent: {
  74014. binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); },
  74015. octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1); },
  74016. decimal: function (obj) { return obj.toString(10); },
  74017. /* eslint-disable max-len */
  74018. hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); }
  74019. },
  74020. defaultStyle: 'decimal',
  74021. styleAliases: {
  74022. binary: [ 2, 'bin' ],
  74023. octal: [ 8, 'oct' ],
  74024. decimal: [ 10, 'dec' ],
  74025. hexadecimal: [ 16, 'hex' ]
  74026. }
  74027. });
  74028. var YAML_FLOAT_PATTERN = new RegExp(
  74029. // 2.5e4, 2.5 and integers
  74030. '^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' +
  74031. // .2e4, .2
  74032. // special case, seems not from spec
  74033. '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' +
  74034. // .inf
  74035. '|[-+]?\\.(?:inf|Inf|INF)' +
  74036. // .nan
  74037. '|\\.(?:nan|NaN|NAN))$');
  74038. function resolveYamlFloat(data) {
  74039. if (data === null) return false;
  74040. if (!YAML_FLOAT_PATTERN.test(data) ||
  74041. // Quick hack to not allow integers end with `_`
  74042. // Probably should update regexp & check speed
  74043. data[data.length - 1] === '_') {
  74044. return false;
  74045. }
  74046. return true;
  74047. }
  74048. function constructYamlFloat(data) {
  74049. var value, sign;
  74050. value = data.replace(/_/g, '').toLowerCase();
  74051. sign = value[0] === '-' ? -1 : 1;
  74052. if ('+-'.indexOf(value[0]) >= 0) {
  74053. value = value.slice(1);
  74054. }
  74055. if (value === '.inf') {
  74056. return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
  74057. } else if (value === '.nan') {
  74058. return NaN;
  74059. }
  74060. return sign * parseFloat(value, 10);
  74061. }
  74062. var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;
  74063. function representYamlFloat(object, style) {
  74064. var res;
  74065. if (isNaN(object)) {
  74066. switch (style) {
  74067. case 'lowercase': return '.nan';
  74068. case 'uppercase': return '.NAN';
  74069. case 'camelcase': return '.NaN';
  74070. }
  74071. } else if (Number.POSITIVE_INFINITY === object) {
  74072. switch (style) {
  74073. case 'lowercase': return '.inf';
  74074. case 'uppercase': return '.INF';
  74075. case 'camelcase': return '.Inf';
  74076. }
  74077. } else if (Number.NEGATIVE_INFINITY === object) {
  74078. switch (style) {
  74079. case 'lowercase': return '-.inf';
  74080. case 'uppercase': return '-.INF';
  74081. case 'camelcase': return '-.Inf';
  74082. }
  74083. } else if (common.isNegativeZero(object)) {
  74084. return '-0.0';
  74085. }
  74086. res = object.toString(10);
  74087. // JS stringifier can build scientific format without dots: 5e-100,
  74088. // while YAML requres dot: 5.e-100. Fix it with simple hack
  74089. return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res;
  74090. }
  74091. function isFloat(object) {
  74092. return (Object.prototype.toString.call(object) === '[object Number]') &&
  74093. (object % 1 !== 0 || common.isNegativeZero(object));
  74094. }
  74095. var float = new type('tag:yaml.org,2002:float', {
  74096. kind: 'scalar',
  74097. resolve: resolveYamlFloat,
  74098. construct: constructYamlFloat,
  74099. predicate: isFloat,
  74100. represent: representYamlFloat,
  74101. defaultStyle: 'lowercase'
  74102. });
  74103. var json = failsafe.extend({
  74104. implicit: [
  74105. _null,
  74106. bool,
  74107. int,
  74108. float
  74109. ]
  74110. });
  74111. var core = json;
  74112. var YAML_DATE_REGEXP = new RegExp(
  74113. '^([0-9][0-9][0-9][0-9])' + // [1] year
  74114. '-([0-9][0-9])' + // [2] month
  74115. '-([0-9][0-9])$'); // [3] day
  74116. var YAML_TIMESTAMP_REGEXP = new RegExp(
  74117. '^([0-9][0-9][0-9][0-9])' + // [1] year
  74118. '-([0-9][0-9]?)' + // [2] month
  74119. '-([0-9][0-9]?)' + // [3] day
  74120. '(?:[Tt]|[ \\t]+)' + // ...
  74121. '([0-9][0-9]?)' + // [4] hour
  74122. ':([0-9][0-9])' + // [5] minute
  74123. ':([0-9][0-9])' + // [6] second
  74124. '(?:\\.([0-9]*))?' + // [7] fraction
  74125. '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour
  74126. '(?::([0-9][0-9]))?))?$'); // [11] tz_minute
  74127. function resolveYamlTimestamp(data) {
  74128. if (data === null) return false;
  74129. if (YAML_DATE_REGEXP.exec(data) !== null) return true;
  74130. if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true;
  74131. return false;
  74132. }
  74133. function constructYamlTimestamp(data) {
  74134. var match, year, month, day, hour, minute, second, fraction = 0,
  74135. delta = null, tz_hour, tz_minute, date;
  74136. match = YAML_DATE_REGEXP.exec(data);
  74137. if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data);
  74138. if (match === null) throw new Error('Date resolve error');
  74139. // match: [1] year [2] month [3] day
  74140. year = +(match[1]);
  74141. month = +(match[2]) - 1; // JS month starts with 0
  74142. day = +(match[3]);
  74143. if (!match[4]) { // no hour
  74144. return new Date(Date.UTC(year, month, day));
  74145. }
  74146. // match: [4] hour [5] minute [6] second [7] fraction
  74147. hour = +(match[4]);
  74148. minute = +(match[5]);
  74149. second = +(match[6]);
  74150. if (match[7]) {
  74151. fraction = match[7].slice(0, 3);
  74152. while (fraction.length < 3) { // milli-seconds
  74153. fraction += '0';
  74154. }
  74155. fraction = +fraction;
  74156. }
  74157. // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute
  74158. if (match[9]) {
  74159. tz_hour = +(match[10]);
  74160. tz_minute = +(match[11] || 0);
  74161. delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds
  74162. if (match[9] === '-') delta = -delta;
  74163. }
  74164. date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));
  74165. if (delta) date.setTime(date.getTime() - delta);
  74166. return date;
  74167. }
  74168. function representYamlTimestamp(object /*, style*/) {
  74169. return object.toISOString();
  74170. }
  74171. var timestamp = new type('tag:yaml.org,2002:timestamp', {
  74172. kind: 'scalar',
  74173. resolve: resolveYamlTimestamp,
  74174. construct: constructYamlTimestamp,
  74175. instanceOf: Date,
  74176. represent: representYamlTimestamp
  74177. });
  74178. function resolveYamlMerge(data) {
  74179. return data === '<<' || data === null;
  74180. }
  74181. var merge = new type('tag:yaml.org,2002:merge', {
  74182. kind: 'scalar',
  74183. resolve: resolveYamlMerge
  74184. });
  74185. /*eslint-disable no-bitwise*/
  74186. // [ 64, 65, 66 ] -> [ padding, CR, LF ]
  74187. var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r';
  74188. function resolveYamlBinary(data) {
  74189. if (data === null) return false;
  74190. var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP;
  74191. // Convert one by one.
  74192. for (idx = 0; idx < max; idx++) {
  74193. code = map.indexOf(data.charAt(idx));
  74194. // Skip CR/LF
  74195. if (code > 64) continue;
  74196. // Fail on illegal characters
  74197. if (code < 0) return false;
  74198. bitlen += 6;
  74199. }
  74200. // If there are any bits left, source was corrupted
  74201. return (bitlen % 8) === 0;
  74202. }
  74203. function constructYamlBinary(data) {
  74204. var idx, tailbits,
  74205. input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan
  74206. max = input.length,
  74207. map = BASE64_MAP,
  74208. bits = 0,
  74209. result = [];
  74210. // Collect by 6*4 bits (3 bytes)
  74211. for (idx = 0; idx < max; idx++) {
  74212. if ((idx % 4 === 0) && idx) {
  74213. result.push((bits >> 16) & 0xFF);
  74214. result.push((bits >> 8) & 0xFF);
  74215. result.push(bits & 0xFF);
  74216. }
  74217. bits = (bits << 6) | map.indexOf(input.charAt(idx));
  74218. }
  74219. // Dump tail
  74220. tailbits = (max % 4) * 6;
  74221. if (tailbits === 0) {
  74222. result.push((bits >> 16) & 0xFF);
  74223. result.push((bits >> 8) & 0xFF);
  74224. result.push(bits & 0xFF);
  74225. } else if (tailbits === 18) {
  74226. result.push((bits >> 10) & 0xFF);
  74227. result.push((bits >> 2) & 0xFF);
  74228. } else if (tailbits === 12) {
  74229. result.push((bits >> 4) & 0xFF);
  74230. }
  74231. return new Uint8Array(result);
  74232. }
  74233. function representYamlBinary(object /*, style*/) {
  74234. var result = '', bits = 0, idx, tail,
  74235. max = object.length,
  74236. map = BASE64_MAP;
  74237. // Convert every three bytes to 4 ASCII characters.
  74238. for (idx = 0; idx < max; idx++) {
  74239. if ((idx % 3 === 0) && idx) {
  74240. result += map[(bits >> 18) & 0x3F];
  74241. result += map[(bits >> 12) & 0x3F];
  74242. result += map[(bits >> 6) & 0x3F];
  74243. result += map[bits & 0x3F];
  74244. }
  74245. bits = (bits << 8) + object[idx];
  74246. }
  74247. // Dump tail
  74248. tail = max % 3;
  74249. if (tail === 0) {
  74250. result += map[(bits >> 18) & 0x3F];
  74251. result += map[(bits >> 12) & 0x3F];
  74252. result += map[(bits >> 6) & 0x3F];
  74253. result += map[bits & 0x3F];
  74254. } else if (tail === 2) {
  74255. result += map[(bits >> 10) & 0x3F];
  74256. result += map[(bits >> 4) & 0x3F];
  74257. result += map[(bits << 2) & 0x3F];
  74258. result += map[64];
  74259. } else if (tail === 1) {
  74260. result += map[(bits >> 2) & 0x3F];
  74261. result += map[(bits << 4) & 0x3F];
  74262. result += map[64];
  74263. result += map[64];
  74264. }
  74265. return result;
  74266. }
  74267. function isBinary(obj) {
  74268. return Object.prototype.toString.call(obj) === '[object Uint8Array]';
  74269. }
  74270. var binary = new type('tag:yaml.org,2002:binary', {
  74271. kind: 'scalar',
  74272. resolve: resolveYamlBinary,
  74273. construct: constructYamlBinary,
  74274. predicate: isBinary,
  74275. represent: representYamlBinary
  74276. });
  74277. var _hasOwnProperty$3 = Object.prototype.hasOwnProperty;
  74278. var _toString$2 = Object.prototype.toString;
  74279. function resolveYamlOmap(data) {
  74280. if (data === null) return true;
  74281. var objectKeys = [], index, length, pair, pairKey, pairHasKey,
  74282. object = data;
  74283. for (index = 0, length = object.length; index < length; index += 1) {
  74284. pair = object[index];
  74285. pairHasKey = false;
  74286. if (_toString$2.call(pair) !== '[object Object]') return false;
  74287. for (pairKey in pair) {
  74288. if (_hasOwnProperty$3.call(pair, pairKey)) {
  74289. if (!pairHasKey) pairHasKey = true;
  74290. else return false;
  74291. }
  74292. }
  74293. if (!pairHasKey) return false;
  74294. if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey);
  74295. else return false;
  74296. }
  74297. return true;
  74298. }
  74299. function constructYamlOmap(data) {
  74300. return data !== null ? data : [];
  74301. }
  74302. var omap = new type('tag:yaml.org,2002:omap', {
  74303. kind: 'sequence',
  74304. resolve: resolveYamlOmap,
  74305. construct: constructYamlOmap
  74306. });
  74307. var _toString$1 = Object.prototype.toString;
  74308. function resolveYamlPairs(data) {
  74309. if (data === null) return true;
  74310. var index, length, pair, keys, result,
  74311. object = data;
  74312. result = new Array(object.length);
  74313. for (index = 0, length = object.length; index < length; index += 1) {
  74314. pair = object[index];
  74315. if (_toString$1.call(pair) !== '[object Object]') return false;
  74316. keys = Object.keys(pair);
  74317. if (keys.length !== 1) return false;
  74318. result[index] = [ keys[0], pair[keys[0]] ];
  74319. }
  74320. return true;
  74321. }
  74322. function constructYamlPairs(data) {
  74323. if (data === null) return [];
  74324. var index, length, pair, keys, result,
  74325. object = data;
  74326. result = new Array(object.length);
  74327. for (index = 0, length = object.length; index < length; index += 1) {
  74328. pair = object[index];
  74329. keys = Object.keys(pair);
  74330. result[index] = [ keys[0], pair[keys[0]] ];
  74331. }
  74332. return result;
  74333. }
  74334. var pairs = new type('tag:yaml.org,2002:pairs', {
  74335. kind: 'sequence',
  74336. resolve: resolveYamlPairs,
  74337. construct: constructYamlPairs
  74338. });
  74339. var _hasOwnProperty$2 = Object.prototype.hasOwnProperty;
  74340. function resolveYamlSet(data) {
  74341. if (data === null) return true;
  74342. var key, object = data;
  74343. for (key in object) {
  74344. if (_hasOwnProperty$2.call(object, key)) {
  74345. if (object[key] !== null) return false;
  74346. }
  74347. }
  74348. return true;
  74349. }
  74350. function constructYamlSet(data) {
  74351. return data !== null ? data : {};
  74352. }
  74353. var set = new type('tag:yaml.org,2002:set', {
  74354. kind: 'mapping',
  74355. resolve: resolveYamlSet,
  74356. construct: constructYamlSet
  74357. });
  74358. var _default = core.extend({
  74359. implicit: [
  74360. timestamp,
  74361. merge
  74362. ],
  74363. explicit: [
  74364. binary,
  74365. omap,
  74366. pairs,
  74367. set
  74368. ]
  74369. });
  74370. /*eslint-disable max-len,no-use-before-define*/
  74371. var _hasOwnProperty$1 = Object.prototype.hasOwnProperty;
  74372. var CONTEXT_FLOW_IN = 1;
  74373. var CONTEXT_FLOW_OUT = 2;
  74374. var CONTEXT_BLOCK_IN = 3;
  74375. var CONTEXT_BLOCK_OUT = 4;
  74376. var CHOMPING_CLIP = 1;
  74377. var CHOMPING_STRIP = 2;
  74378. var CHOMPING_KEEP = 3;
  74379. var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
  74380. var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/;
  74381. var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/;
  74382. var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i;
  74383. var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
  74384. function _class(obj) { return Object.prototype.toString.call(obj); }
  74385. function is_EOL(c) {
  74386. return (c === 0x0A/* LF */) || (c === 0x0D/* CR */);
  74387. }
  74388. function is_WHITE_SPACE(c) {
  74389. return (c === 0x09/* Tab */) || (c === 0x20/* Space */);
  74390. }
  74391. function is_WS_OR_EOL(c) {
  74392. return (c === 0x09/* Tab */) ||
  74393. (c === 0x20/* Space */) ||
  74394. (c === 0x0A/* LF */) ||
  74395. (c === 0x0D/* CR */);
  74396. }
  74397. function is_FLOW_INDICATOR(c) {
  74398. return c === 0x2C/* , */ ||
  74399. c === 0x5B/* [ */ ||
  74400. c === 0x5D/* ] */ ||
  74401. c === 0x7B/* { */ ||
  74402. c === 0x7D/* } */;
  74403. }
  74404. function fromHexCode(c) {
  74405. var lc;
  74406. if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {
  74407. return c - 0x30;
  74408. }
  74409. /*eslint-disable no-bitwise*/
  74410. lc = c | 0x20;
  74411. if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) {
  74412. return lc - 0x61 + 10;
  74413. }
  74414. return -1;
  74415. }
  74416. function escapedHexLen(c) {
  74417. if (c === 0x78/* x */) { return 2; }
  74418. if (c === 0x75/* u */) { return 4; }
  74419. if (c === 0x55/* U */) { return 8; }
  74420. return 0;
  74421. }
  74422. function fromDecimalCode(c) {
  74423. if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {
  74424. return c - 0x30;
  74425. }
  74426. return -1;
  74427. }
  74428. function simpleEscapeSequence(c) {
  74429. /* eslint-disable indent */
  74430. return (c === 0x30/* 0 */) ? '\x00' :
  74431. (c === 0x61/* a */) ? '\x07' :
  74432. (c === 0x62/* b */) ? '\x08' :
  74433. (c === 0x74/* t */) ? '\x09' :
  74434. (c === 0x09/* Tab */) ? '\x09' :
  74435. (c === 0x6E/* n */) ? '\x0A' :
  74436. (c === 0x76/* v */) ? '\x0B' :
  74437. (c === 0x66/* f */) ? '\x0C' :
  74438. (c === 0x72/* r */) ? '\x0D' :
  74439. (c === 0x65/* e */) ? '\x1B' :
  74440. (c === 0x20/* Space */) ? ' ' :
  74441. (c === 0x22/* " */) ? '\x22' :
  74442. (c === 0x2F/* / */) ? '/' :
  74443. (c === 0x5C/* \ */) ? '\x5C' :
  74444. (c === 0x4E/* N */) ? '\x85' :
  74445. (c === 0x5F/* _ */) ? '\xA0' :
  74446. (c === 0x4C/* L */) ? '\u2028' :
  74447. (c === 0x50/* P */) ? '\u2029' : '';
  74448. }
  74449. function charFromCodepoint(c) {
  74450. if (c <= 0xFFFF) {
  74451. return String.fromCharCode(c);
  74452. }
  74453. // Encode UTF-16 surrogate pair
  74454. // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF
  74455. return String.fromCharCode(
  74456. ((c - 0x010000) >> 10) + 0xD800,
  74457. ((c - 0x010000) & 0x03FF) + 0xDC00
  74458. );
  74459. }
  74460. var simpleEscapeCheck = new Array(256); // integer, for fast access
  74461. var simpleEscapeMap = new Array(256);
  74462. for (var i = 0; i < 256; i++) {
  74463. simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;
  74464. simpleEscapeMap[i] = simpleEscapeSequence(i);
  74465. }
  74466. function State$1(input, options) {
  74467. this.input = input;
  74468. this.filename = options['filename'] || null;
  74469. this.schema = options['schema'] || _default;
  74470. this.onWarning = options['onWarning'] || null;
  74471. // (Hidden) Remove? makes the loader to expect YAML 1.1 documents
  74472. // if such documents have no explicit %YAML directive
  74473. this.legacy = options['legacy'] || false;
  74474. this.json = options['json'] || false;
  74475. this.listener = options['listener'] || null;
  74476. this.implicitTypes = this.schema.compiledImplicit;
  74477. this.typeMap = this.schema.compiledTypeMap;
  74478. this.length = input.length;
  74479. this.position = 0;
  74480. this.line = 0;
  74481. this.lineStart = 0;
  74482. this.lineIndent = 0;
  74483. // position of first leading tab in the current line,
  74484. // used to make sure there are no tabs in the indentation
  74485. this.firstTabInLine = -1;
  74486. this.documents = [];
  74487. /*
  74488. this.version;
  74489. this.checkLineBreaks;
  74490. this.tagMap;
  74491. this.anchorMap;
  74492. this.tag;
  74493. this.anchor;
  74494. this.kind;
  74495. this.result;*/
  74496. }
  74497. function generateError(state, message) {
  74498. var mark = {
  74499. name: state.filename,
  74500. buffer: state.input.slice(0, -1), // omit trailing \0
  74501. position: state.position,
  74502. line: state.line,
  74503. column: state.position - state.lineStart
  74504. };
  74505. mark.snippet = snippet(mark);
  74506. return new exception(message, mark);
  74507. }
  74508. function throwError(state, message) {
  74509. throw generateError(state, message);
  74510. }
  74511. function throwWarning(state, message) {
  74512. if (state.onWarning) {
  74513. state.onWarning.call(null, generateError(state, message));
  74514. }
  74515. }
  74516. var directiveHandlers = {
  74517. YAML: function handleYamlDirective(state, name, args) {
  74518. var match, major, minor;
  74519. if (state.version !== null) {
  74520. throwError(state, 'duplication of %YAML directive');
  74521. }
  74522. if (args.length !== 1) {
  74523. throwError(state, 'YAML directive accepts exactly one argument');
  74524. }
  74525. match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
  74526. if (match === null) {
  74527. throwError(state, 'ill-formed argument of the YAML directive');
  74528. }
  74529. major = parseInt(match[1], 10);
  74530. minor = parseInt(match[2], 10);
  74531. if (major !== 1) {
  74532. throwError(state, 'unacceptable YAML version of the document');
  74533. }
  74534. state.version = args[0];
  74535. state.checkLineBreaks = (minor < 2);
  74536. if (minor !== 1 && minor !== 2) {
  74537. throwWarning(state, 'unsupported YAML version of the document');
  74538. }
  74539. },
  74540. TAG: function handleTagDirective(state, name, args) {
  74541. var handle, prefix;
  74542. if (args.length !== 2) {
  74543. throwError(state, 'TAG directive accepts exactly two arguments');
  74544. }
  74545. handle = args[0];
  74546. prefix = args[1];
  74547. if (!PATTERN_TAG_HANDLE.test(handle)) {
  74548. throwError(state, 'ill-formed tag handle (first argument) of the TAG directive');
  74549. }
  74550. if (_hasOwnProperty$1.call(state.tagMap, handle)) {
  74551. throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle');
  74552. }
  74553. if (!PATTERN_TAG_URI.test(prefix)) {
  74554. throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive');
  74555. }
  74556. try {
  74557. prefix = decodeURIComponent(prefix);
  74558. } catch (err) {
  74559. throwError(state, 'tag prefix is malformed: ' + prefix);
  74560. }
  74561. state.tagMap[handle] = prefix;
  74562. }
  74563. };
  74564. function captureSegment(state, start, end, checkJson) {
  74565. var _position, _length, _character, _result;
  74566. if (start < end) {
  74567. _result = state.input.slice(start, end);
  74568. if (checkJson) {
  74569. for (_position = 0, _length = _result.length; _position < _length; _position += 1) {
  74570. _character = _result.charCodeAt(_position);
  74571. if (!(_character === 0x09 ||
  74572. (0x20 <= _character && _character <= 0x10FFFF))) {
  74573. throwError(state, 'expected valid JSON character');
  74574. }
  74575. }
  74576. } else if (PATTERN_NON_PRINTABLE.test(_result)) {
  74577. throwError(state, 'the stream contains non-printable characters');
  74578. }
  74579. state.result += _result;
  74580. }
  74581. }
  74582. function mergeMappings(state, destination, source, overridableKeys) {
  74583. var sourceKeys, key, index, quantity;
  74584. if (!common.isObject(source)) {
  74585. throwError(state, 'cannot merge mappings; the provided source object is unacceptable');
  74586. }
  74587. sourceKeys = Object.keys(source);
  74588. for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
  74589. key = sourceKeys[index];
  74590. if (!_hasOwnProperty$1.call(destination, key)) {
  74591. destination[key] = source[key];
  74592. overridableKeys[key] = true;
  74593. }
  74594. }
  74595. }
  74596. function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode,
  74597. startLine, startLineStart, startPos) {
  74598. var index, quantity;
  74599. // The output is a plain object here, so keys can only be strings.
  74600. // We need to convert keyNode to a string, but doing so can hang the process
  74601. // (deeply nested arrays that explode exponentially using aliases).
  74602. if (Array.isArray(keyNode)) {
  74603. keyNode = Array.prototype.slice.call(keyNode);
  74604. for (index = 0, quantity = keyNode.length; index < quantity; index += 1) {
  74605. if (Array.isArray(keyNode[index])) {
  74606. throwError(state, 'nested arrays are not supported inside keys');
  74607. }
  74608. if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') {
  74609. keyNode[index] = '[object Object]';
  74610. }
  74611. }
  74612. }
  74613. // Avoid code execution in load() via toString property
  74614. // (still use its own toString for arrays, timestamps,
  74615. // and whatever user schema extensions happen to have @@toStringTag)
  74616. if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') {
  74617. keyNode = '[object Object]';
  74618. }
  74619. keyNode = String(keyNode);
  74620. if (_result === null) {
  74621. _result = {};
  74622. }
  74623. if (keyTag === 'tag:yaml.org,2002:merge') {
  74624. if (Array.isArray(valueNode)) {
  74625. for (index = 0, quantity = valueNode.length; index < quantity; index += 1) {
  74626. mergeMappings(state, _result, valueNode[index], overridableKeys);
  74627. }
  74628. } else {
  74629. mergeMappings(state, _result, valueNode, overridableKeys);
  74630. }
  74631. } else {
  74632. if (!state.json &&
  74633. !_hasOwnProperty$1.call(overridableKeys, keyNode) &&
  74634. _hasOwnProperty$1.call(_result, keyNode)) {
  74635. state.line = startLine || state.line;
  74636. state.lineStart = startLineStart || state.lineStart;
  74637. state.position = startPos || state.position;
  74638. throwError(state, 'duplicated mapping key');
  74639. }
  74640. // used for this specific key only because Object.defineProperty is slow
  74641. if (keyNode === '__proto__') {
  74642. Object.defineProperty(_result, keyNode, {
  74643. configurable: true,
  74644. enumerable: true,
  74645. writable: true,
  74646. value: valueNode
  74647. });
  74648. } else {
  74649. _result[keyNode] = valueNode;
  74650. }
  74651. delete overridableKeys[keyNode];
  74652. }
  74653. return _result;
  74654. }
  74655. function readLineBreak(state) {
  74656. var ch;
  74657. ch = state.input.charCodeAt(state.position);
  74658. if (ch === 0x0A/* LF */) {
  74659. state.position++;
  74660. } else if (ch === 0x0D/* CR */) {
  74661. state.position++;
  74662. if (state.input.charCodeAt(state.position) === 0x0A/* LF */) {
  74663. state.position++;
  74664. }
  74665. } else {
  74666. throwError(state, 'a line break is expected');
  74667. }
  74668. state.line += 1;
  74669. state.lineStart = state.position;
  74670. state.firstTabInLine = -1;
  74671. }
  74672. function skipSeparationSpace(state, allowComments, checkIndent) {
  74673. var lineBreaks = 0,
  74674. ch = state.input.charCodeAt(state.position);
  74675. while (ch !== 0) {
  74676. while (is_WHITE_SPACE(ch)) {
  74677. if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) {
  74678. state.firstTabInLine = state.position;
  74679. }
  74680. ch = state.input.charCodeAt(++state.position);
  74681. }
  74682. if (allowComments && ch === 0x23/* # */) {
  74683. do {
  74684. ch = state.input.charCodeAt(++state.position);
  74685. } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0);
  74686. }
  74687. if (is_EOL(ch)) {
  74688. readLineBreak(state);
  74689. ch = state.input.charCodeAt(state.position);
  74690. lineBreaks++;
  74691. state.lineIndent = 0;
  74692. while (ch === 0x20/* Space */) {
  74693. state.lineIndent++;
  74694. ch = state.input.charCodeAt(++state.position);
  74695. }
  74696. } else {
  74697. break;
  74698. }
  74699. }
  74700. if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {
  74701. throwWarning(state, 'deficient indentation');
  74702. }
  74703. return lineBreaks;
  74704. }
  74705. function testDocumentSeparator(state) {
  74706. var _position = state.position,
  74707. ch;
  74708. ch = state.input.charCodeAt(_position);
  74709. // Condition state.position === state.lineStart is tested
  74710. // in parent on each call, for efficiency. No needs to test here again.
  74711. if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) &&
  74712. ch === state.input.charCodeAt(_position + 1) &&
  74713. ch === state.input.charCodeAt(_position + 2)) {
  74714. _position += 3;
  74715. ch = state.input.charCodeAt(_position);
  74716. if (ch === 0 || is_WS_OR_EOL(ch)) {
  74717. return true;
  74718. }
  74719. }
  74720. return false;
  74721. }
  74722. function writeFoldedLines(state, count) {
  74723. if (count === 1) {
  74724. state.result += ' ';
  74725. } else if (count > 1) {
  74726. state.result += common.repeat('\n', count - 1);
  74727. }
  74728. }
  74729. function readPlainScalar(state, nodeIndent, withinFlowCollection) {
  74730. var preceding,
  74731. following,
  74732. captureStart,
  74733. captureEnd,
  74734. hasPendingContent,
  74735. _line,
  74736. _lineStart,
  74737. _lineIndent,
  74738. _kind = state.kind,
  74739. _result = state.result,
  74740. ch;
  74741. ch = state.input.charCodeAt(state.position);
  74742. if (is_WS_OR_EOL(ch) ||
  74743. is_FLOW_INDICATOR(ch) ||
  74744. ch === 0x23/* # */ ||
  74745. ch === 0x26/* & */ ||
  74746. ch === 0x2A/* * */ ||
  74747. ch === 0x21/* ! */ ||
  74748. ch === 0x7C/* | */ ||
  74749. ch === 0x3E/* > */ ||
  74750. ch === 0x27/* ' */ ||
  74751. ch === 0x22/* " */ ||
  74752. ch === 0x25/* % */ ||
  74753. ch === 0x40/* @ */ ||
  74754. ch === 0x60/* ` */) {
  74755. return false;
  74756. }
  74757. if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) {
  74758. following = state.input.charCodeAt(state.position + 1);
  74759. if (is_WS_OR_EOL(following) ||
  74760. withinFlowCollection && is_FLOW_INDICATOR(following)) {
  74761. return false;
  74762. }
  74763. }
  74764. state.kind = 'scalar';
  74765. state.result = '';
  74766. captureStart = captureEnd = state.position;
  74767. hasPendingContent = false;
  74768. while (ch !== 0) {
  74769. if (ch === 0x3A/* : */) {
  74770. following = state.input.charCodeAt(state.position + 1);
  74771. if (is_WS_OR_EOL(following) ||
  74772. withinFlowCollection && is_FLOW_INDICATOR(following)) {
  74773. break;
  74774. }
  74775. } else if (ch === 0x23/* # */) {
  74776. preceding = state.input.charCodeAt(state.position - 1);
  74777. if (is_WS_OR_EOL(preceding)) {
  74778. break;
  74779. }
  74780. } else if ((state.position === state.lineStart && testDocumentSeparator(state)) ||
  74781. withinFlowCollection && is_FLOW_INDICATOR(ch)) {
  74782. break;
  74783. } else if (is_EOL(ch)) {
  74784. _line = state.line;
  74785. _lineStart = state.lineStart;
  74786. _lineIndent = state.lineIndent;
  74787. skipSeparationSpace(state, false, -1);
  74788. if (state.lineIndent >= nodeIndent) {
  74789. hasPendingContent = true;
  74790. ch = state.input.charCodeAt(state.position);
  74791. continue;
  74792. } else {
  74793. state.position = captureEnd;
  74794. state.line = _line;
  74795. state.lineStart = _lineStart;
  74796. state.lineIndent = _lineIndent;
  74797. break;
  74798. }
  74799. }
  74800. if (hasPendingContent) {
  74801. captureSegment(state, captureStart, captureEnd, false);
  74802. writeFoldedLines(state, state.line - _line);
  74803. captureStart = captureEnd = state.position;
  74804. hasPendingContent = false;
  74805. }
  74806. if (!is_WHITE_SPACE(ch)) {
  74807. captureEnd = state.position + 1;
  74808. }
  74809. ch = state.input.charCodeAt(++state.position);
  74810. }
  74811. captureSegment(state, captureStart, captureEnd, false);
  74812. if (state.result) {
  74813. return true;
  74814. }
  74815. state.kind = _kind;
  74816. state.result = _result;
  74817. return false;
  74818. }
  74819. function readSingleQuotedScalar(state, nodeIndent) {
  74820. var ch,
  74821. captureStart, captureEnd;
  74822. ch = state.input.charCodeAt(state.position);
  74823. if (ch !== 0x27/* ' */) {
  74824. return false;
  74825. }
  74826. state.kind = 'scalar';
  74827. state.result = '';
  74828. state.position++;
  74829. captureStart = captureEnd = state.position;
  74830. while ((ch = state.input.charCodeAt(state.position)) !== 0) {
  74831. if (ch === 0x27/* ' */) {
  74832. captureSegment(state, captureStart, state.position, true);
  74833. ch = state.input.charCodeAt(++state.position);
  74834. if (ch === 0x27/* ' */) {
  74835. captureStart = state.position;
  74836. state.position++;
  74837. captureEnd = state.position;
  74838. } else {
  74839. return true;
  74840. }
  74841. } else if (is_EOL(ch)) {
  74842. captureSegment(state, captureStart, captureEnd, true);
  74843. writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
  74844. captureStart = captureEnd = state.position;
  74845. } else if (state.position === state.lineStart && testDocumentSeparator(state)) {
  74846. throwError(state, 'unexpected end of the document within a single quoted scalar');
  74847. } else {
  74848. state.position++;
  74849. captureEnd = state.position;
  74850. }
  74851. }
  74852. throwError(state, 'unexpected end of the stream within a single quoted scalar');
  74853. }
  74854. function readDoubleQuotedScalar(state, nodeIndent) {
  74855. var captureStart,
  74856. captureEnd,
  74857. hexLength,
  74858. hexResult,
  74859. tmp,
  74860. ch;
  74861. ch = state.input.charCodeAt(state.position);
  74862. if (ch !== 0x22/* " */) {
  74863. return false;
  74864. }
  74865. state.kind = 'scalar';
  74866. state.result = '';
  74867. state.position++;
  74868. captureStart = captureEnd = state.position;
  74869. while ((ch = state.input.charCodeAt(state.position)) !== 0) {
  74870. if (ch === 0x22/* " */) {
  74871. captureSegment(state, captureStart, state.position, true);
  74872. state.position++;
  74873. return true;
  74874. } else if (ch === 0x5C/* \ */) {
  74875. captureSegment(state, captureStart, state.position, true);
  74876. ch = state.input.charCodeAt(++state.position);
  74877. if (is_EOL(ch)) {
  74878. skipSeparationSpace(state, false, nodeIndent);
  74879. // TODO: rework to inline fn with no type cast?
  74880. } else if (ch < 256 && simpleEscapeCheck[ch]) {
  74881. state.result += simpleEscapeMap[ch];
  74882. state.position++;
  74883. } else if ((tmp = escapedHexLen(ch)) > 0) {
  74884. hexLength = tmp;
  74885. hexResult = 0;
  74886. for (; hexLength > 0; hexLength--) {
  74887. ch = state.input.charCodeAt(++state.position);
  74888. if ((tmp = fromHexCode(ch)) >= 0) {
  74889. hexResult = (hexResult << 4) + tmp;
  74890. } else {
  74891. throwError(state, 'expected hexadecimal character');
  74892. }
  74893. }
  74894. state.result += charFromCodepoint(hexResult);
  74895. state.position++;
  74896. } else {
  74897. throwError(state, 'unknown escape sequence');
  74898. }
  74899. captureStart = captureEnd = state.position;
  74900. } else if (is_EOL(ch)) {
  74901. captureSegment(state, captureStart, captureEnd, true);
  74902. writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
  74903. captureStart = captureEnd = state.position;
  74904. } else if (state.position === state.lineStart && testDocumentSeparator(state)) {
  74905. throwError(state, 'unexpected end of the document within a double quoted scalar');
  74906. } else {
  74907. state.position++;
  74908. captureEnd = state.position;
  74909. }
  74910. }
  74911. throwError(state, 'unexpected end of the stream within a double quoted scalar');
  74912. }
  74913. function readFlowCollection(state, nodeIndent) {
  74914. var readNext = true,
  74915. _line,
  74916. _lineStart,
  74917. _pos,
  74918. _tag = state.tag,
  74919. _result,
  74920. _anchor = state.anchor,
  74921. following,
  74922. terminator,
  74923. isPair,
  74924. isExplicitPair,
  74925. isMapping,
  74926. overridableKeys = Object.create(null),
  74927. keyNode,
  74928. keyTag,
  74929. valueNode,
  74930. ch;
  74931. ch = state.input.charCodeAt(state.position);
  74932. if (ch === 0x5B/* [ */) {
  74933. terminator = 0x5D;/* ] */
  74934. isMapping = false;
  74935. _result = [];
  74936. } else if (ch === 0x7B/* { */) {
  74937. terminator = 0x7D;/* } */
  74938. isMapping = true;
  74939. _result = {};
  74940. } else {
  74941. return false;
  74942. }
  74943. if (state.anchor !== null) {
  74944. state.anchorMap[state.anchor] = _result;
  74945. }
  74946. ch = state.input.charCodeAt(++state.position);
  74947. while (ch !== 0) {
  74948. skipSeparationSpace(state, true, nodeIndent);
  74949. ch = state.input.charCodeAt(state.position);
  74950. if (ch === terminator) {
  74951. state.position++;
  74952. state.tag = _tag;
  74953. state.anchor = _anchor;
  74954. state.kind = isMapping ? 'mapping' : 'sequence';
  74955. state.result = _result;
  74956. return true;
  74957. } else if (!readNext) {
  74958. throwError(state, 'missed comma between flow collection entries');
  74959. } else if (ch === 0x2C/* , */) {
  74960. // "flow collection entries can never be completely empty", as per YAML 1.2, section 7.4
  74961. throwError(state, "expected the node content, but found ','");
  74962. }
  74963. keyTag = keyNode = valueNode = null;
  74964. isPair = isExplicitPair = false;
  74965. if (ch === 0x3F/* ? */) {
  74966. following = state.input.charCodeAt(state.position + 1);
  74967. if (is_WS_OR_EOL(following)) {
  74968. isPair = isExplicitPair = true;
  74969. state.position++;
  74970. skipSeparationSpace(state, true, nodeIndent);
  74971. }
  74972. }
  74973. _line = state.line; // Save the current line.
  74974. _lineStart = state.lineStart;
  74975. _pos = state.position;
  74976. composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);
  74977. keyTag = state.tag;
  74978. keyNode = state.result;
  74979. skipSeparationSpace(state, true, nodeIndent);
  74980. ch = state.input.charCodeAt(state.position);
  74981. if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) {
  74982. isPair = true;
  74983. ch = state.input.charCodeAt(++state.position);
  74984. skipSeparationSpace(state, true, nodeIndent);
  74985. composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);
  74986. valueNode = state.result;
  74987. }
  74988. if (isMapping) {
  74989. storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos);
  74990. } else if (isPair) {
  74991. _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos));
  74992. } else {
  74993. _result.push(keyNode);
  74994. }
  74995. skipSeparationSpace(state, true, nodeIndent);
  74996. ch = state.input.charCodeAt(state.position);
  74997. if (ch === 0x2C/* , */) {
  74998. readNext = true;
  74999. ch = state.input.charCodeAt(++state.position);
  75000. } else {
  75001. readNext = false;
  75002. }
  75003. }
  75004. throwError(state, 'unexpected end of the stream within a flow collection');
  75005. }
  75006. function readBlockScalar(state, nodeIndent) {
  75007. var captureStart,
  75008. folding,
  75009. chomping = CHOMPING_CLIP,
  75010. didReadContent = false,
  75011. detectedIndent = false,
  75012. textIndent = nodeIndent,
  75013. emptyLines = 0,
  75014. atMoreIndented = false,
  75015. tmp,
  75016. ch;
  75017. ch = state.input.charCodeAt(state.position);
  75018. if (ch === 0x7C/* | */) {
  75019. folding = false;
  75020. } else if (ch === 0x3E/* > */) {
  75021. folding = true;
  75022. } else {
  75023. return false;
  75024. }
  75025. state.kind = 'scalar';
  75026. state.result = '';
  75027. while (ch !== 0) {
  75028. ch = state.input.charCodeAt(++state.position);
  75029. if (ch === 0x2B/* + */ || ch === 0x2D/* - */) {
  75030. if (CHOMPING_CLIP === chomping) {
  75031. chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP;
  75032. } else {
  75033. throwError(state, 'repeat of a chomping mode identifier');
  75034. }
  75035. } else if ((tmp = fromDecimalCode(ch)) >= 0) {
  75036. if (tmp === 0) {
  75037. throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one');
  75038. } else if (!detectedIndent) {
  75039. textIndent = nodeIndent + tmp - 1;
  75040. detectedIndent = true;
  75041. } else {
  75042. throwError(state, 'repeat of an indentation width identifier');
  75043. }
  75044. } else {
  75045. break;
  75046. }
  75047. }
  75048. if (is_WHITE_SPACE(ch)) {
  75049. do { ch = state.input.charCodeAt(++state.position); }
  75050. while (is_WHITE_SPACE(ch));
  75051. if (ch === 0x23/* # */) {
  75052. do { ch = state.input.charCodeAt(++state.position); }
  75053. while (!is_EOL(ch) && (ch !== 0));
  75054. }
  75055. }
  75056. while (ch !== 0) {
  75057. readLineBreak(state);
  75058. state.lineIndent = 0;
  75059. ch = state.input.charCodeAt(state.position);
  75060. while ((!detectedIndent || state.lineIndent < textIndent) &&
  75061. (ch === 0x20/* Space */)) {
  75062. state.lineIndent++;
  75063. ch = state.input.charCodeAt(++state.position);
  75064. }
  75065. if (!detectedIndent && state.lineIndent > textIndent) {
  75066. textIndent = state.lineIndent;
  75067. }
  75068. if (is_EOL(ch)) {
  75069. emptyLines++;
  75070. continue;
  75071. }
  75072. // End of the scalar.
  75073. if (state.lineIndent < textIndent) {
  75074. // Perform the chomping.
  75075. if (chomping === CHOMPING_KEEP) {
  75076. state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines);
  75077. } else if (chomping === CHOMPING_CLIP) {
  75078. if (didReadContent) { // i.e. only if the scalar is not empty.
  75079. state.result += '\n';
  75080. }
  75081. }
  75082. // Break this `while` cycle and go to the funciton's epilogue.
  75083. break;
  75084. }
  75085. // Folded style: use fancy rules to handle line breaks.
  75086. if (folding) {
  75087. // Lines starting with white space characters (more-indented lines) are not folded.
  75088. if (is_WHITE_SPACE(ch)) {
  75089. atMoreIndented = true;
  75090. // except for the first content line (cf. Example 8.1)
  75091. state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines);
  75092. // End of more-indented block.
  75093. } else if (atMoreIndented) {
  75094. atMoreIndented = false;
  75095. state.result += common.repeat('\n', emptyLines + 1);
  75096. // Just one line break - perceive as the same line.
  75097. } else if (emptyLines === 0) {
  75098. if (didReadContent) { // i.e. only if we have already read some scalar content.
  75099. state.result += ' ';
  75100. }
  75101. // Several line breaks - perceive as different lines.
  75102. } else {
  75103. state.result += common.repeat('\n', emptyLines);
  75104. }
  75105. // Literal style: just add exact number of line breaks between content lines.
  75106. } else {
  75107. // Keep all line breaks except the header line break.
  75108. state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines);
  75109. }
  75110. didReadContent = true;
  75111. detectedIndent = true;
  75112. emptyLines = 0;
  75113. captureStart = state.position;
  75114. while (!is_EOL(ch) && (ch !== 0)) {
  75115. ch = state.input.charCodeAt(++state.position);
  75116. }
  75117. captureSegment(state, captureStart, state.position, false);
  75118. }
  75119. return true;
  75120. }
  75121. function readBlockSequence(state, nodeIndent) {
  75122. var _line,
  75123. _tag = state.tag,
  75124. _anchor = state.anchor,
  75125. _result = [],
  75126. following,
  75127. detected = false,
  75128. ch;
  75129. // there is a leading tab before this token, so it can't be a block sequence/mapping;
  75130. // it can still be flow sequence/mapping or a scalar
  75131. if (state.firstTabInLine !== -1) return false;
  75132. if (state.anchor !== null) {
  75133. state.anchorMap[state.anchor] = _result;
  75134. }
  75135. ch = state.input.charCodeAt(state.position);
  75136. while (ch !== 0) {
  75137. if (state.firstTabInLine !== -1) {
  75138. state.position = state.firstTabInLine;
  75139. throwError(state, 'tab characters must not be used in indentation');
  75140. }
  75141. if (ch !== 0x2D/* - */) {
  75142. break;
  75143. }
  75144. following = state.input.charCodeAt(state.position + 1);
  75145. if (!is_WS_OR_EOL(following)) {
  75146. break;
  75147. }
  75148. detected = true;
  75149. state.position++;
  75150. if (skipSeparationSpace(state, true, -1)) {
  75151. if (state.lineIndent <= nodeIndent) {
  75152. _result.push(null);
  75153. ch = state.input.charCodeAt(state.position);
  75154. continue;
  75155. }
  75156. }
  75157. _line = state.line;
  75158. composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);
  75159. _result.push(state.result);
  75160. skipSeparationSpace(state, true, -1);
  75161. ch = state.input.charCodeAt(state.position);
  75162. if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {
  75163. throwError(state, 'bad indentation of a sequence entry');
  75164. } else if (state.lineIndent < nodeIndent) {
  75165. break;
  75166. }
  75167. }
  75168. if (detected) {
  75169. state.tag = _tag;
  75170. state.anchor = _anchor;
  75171. state.kind = 'sequence';
  75172. state.result = _result;
  75173. return true;
  75174. }
  75175. return false;
  75176. }
  75177. function readBlockMapping(state, nodeIndent, flowIndent) {
  75178. var following,
  75179. allowCompact,
  75180. _line,
  75181. _keyLine,
  75182. _keyLineStart,
  75183. _keyPos,
  75184. _tag = state.tag,
  75185. _anchor = state.anchor,
  75186. _result = {},
  75187. overridableKeys = Object.create(null),
  75188. keyTag = null,
  75189. keyNode = null,
  75190. valueNode = null,
  75191. atExplicitKey = false,
  75192. detected = false,
  75193. ch;
  75194. // there is a leading tab before this token, so it can't be a block sequence/mapping;
  75195. // it can still be flow sequence/mapping or a scalar
  75196. if (state.firstTabInLine !== -1) return false;
  75197. if (state.anchor !== null) {
  75198. state.anchorMap[state.anchor] = _result;
  75199. }
  75200. ch = state.input.charCodeAt(state.position);
  75201. while (ch !== 0) {
  75202. if (!atExplicitKey && state.firstTabInLine !== -1) {
  75203. state.position = state.firstTabInLine;
  75204. throwError(state, 'tab characters must not be used in indentation');
  75205. }
  75206. following = state.input.charCodeAt(state.position + 1);
  75207. _line = state.line; // Save the current line.
  75208. //
  75209. // Explicit notation case. There are two separate blocks:
  75210. // first for the key (denoted by "?") and second for the value (denoted by ":")
  75211. //
  75212. if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) {
  75213. if (ch === 0x3F/* ? */) {
  75214. if (atExplicitKey) {
  75215. storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
  75216. keyTag = keyNode = valueNode = null;
  75217. }
  75218. detected = true;
  75219. atExplicitKey = true;
  75220. allowCompact = true;
  75221. } else if (atExplicitKey) {
  75222. // i.e. 0x3A/* : */ === character after the explicit key.
  75223. atExplicitKey = false;
  75224. allowCompact = true;
  75225. } else {
  75226. throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line');
  75227. }
  75228. state.position += 1;
  75229. ch = following;
  75230. //
  75231. // Implicit notation case. Flow-style node as the key first, then ":", and the value.
  75232. //
  75233. } else {
  75234. _keyLine = state.line;
  75235. _keyLineStart = state.lineStart;
  75236. _keyPos = state.position;
  75237. if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {
  75238. // Neither implicit nor explicit notation.
  75239. // Reading is done. Go to the epilogue.
  75240. break;
  75241. }
  75242. if (state.line === _line) {
  75243. ch = state.input.charCodeAt(state.position);
  75244. while (is_WHITE_SPACE(ch)) {
  75245. ch = state.input.charCodeAt(++state.position);
  75246. }
  75247. if (ch === 0x3A/* : */) {
  75248. ch = state.input.charCodeAt(++state.position);
  75249. if (!is_WS_OR_EOL(ch)) {
  75250. throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping');
  75251. }
  75252. if (atExplicitKey) {
  75253. storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
  75254. keyTag = keyNode = valueNode = null;
  75255. }
  75256. detected = true;
  75257. atExplicitKey = false;
  75258. allowCompact = false;
  75259. keyTag = state.tag;
  75260. keyNode = state.result;
  75261. } else if (detected) {
  75262. throwError(state, 'can not read an implicit mapping pair; a colon is missed');
  75263. } else {
  75264. state.tag = _tag;
  75265. state.anchor = _anchor;
  75266. return true; // Keep the result of `composeNode`.
  75267. }
  75268. } else if (detected) {
  75269. throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key');
  75270. } else {
  75271. state.tag = _tag;
  75272. state.anchor = _anchor;
  75273. return true; // Keep the result of `composeNode`.
  75274. }
  75275. }
  75276. //
  75277. // Common reading code for both explicit and implicit notations.
  75278. //
  75279. if (state.line === _line || state.lineIndent > nodeIndent) {
  75280. if (atExplicitKey) {
  75281. _keyLine = state.line;
  75282. _keyLineStart = state.lineStart;
  75283. _keyPos = state.position;
  75284. }
  75285. if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {
  75286. if (atExplicitKey) {
  75287. keyNode = state.result;
  75288. } else {
  75289. valueNode = state.result;
  75290. }
  75291. }
  75292. if (!atExplicitKey) {
  75293. storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos);
  75294. keyTag = keyNode = valueNode = null;
  75295. }
  75296. skipSeparationSpace(state, true, -1);
  75297. ch = state.input.charCodeAt(state.position);
  75298. }
  75299. if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {
  75300. throwError(state, 'bad indentation of a mapping entry');
  75301. } else if (state.lineIndent < nodeIndent) {
  75302. break;
  75303. }
  75304. }
  75305. //
  75306. // Epilogue.
  75307. //
  75308. // Special case: last mapping's node contains only the key in explicit notation.
  75309. if (atExplicitKey) {
  75310. storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
  75311. }
  75312. // Expose the resulting mapping.
  75313. if (detected) {
  75314. state.tag = _tag;
  75315. state.anchor = _anchor;
  75316. state.kind = 'mapping';
  75317. state.result = _result;
  75318. }
  75319. return detected;
  75320. }
  75321. function readTagProperty(state) {
  75322. var _position,
  75323. isVerbatim = false,
  75324. isNamed = false,
  75325. tagHandle,
  75326. tagName,
  75327. ch;
  75328. ch = state.input.charCodeAt(state.position);
  75329. if (ch !== 0x21/* ! */) return false;
  75330. if (state.tag !== null) {
  75331. throwError(state, 'duplication of a tag property');
  75332. }
  75333. ch = state.input.charCodeAt(++state.position);
  75334. if (ch === 0x3C/* < */) {
  75335. isVerbatim = true;
  75336. ch = state.input.charCodeAt(++state.position);
  75337. } else if (ch === 0x21/* ! */) {
  75338. isNamed = true;
  75339. tagHandle = '!!';
  75340. ch = state.input.charCodeAt(++state.position);
  75341. } else {
  75342. tagHandle = '!';
  75343. }
  75344. _position = state.position;
  75345. if (isVerbatim) {
  75346. do { ch = state.input.charCodeAt(++state.position); }
  75347. while (ch !== 0 && ch !== 0x3E/* > */);
  75348. if (state.position < state.length) {
  75349. tagName = state.input.slice(_position, state.position);
  75350. ch = state.input.charCodeAt(++state.position);
  75351. } else {
  75352. throwError(state, 'unexpected end of the stream within a verbatim tag');
  75353. }
  75354. } else {
  75355. while (ch !== 0 && !is_WS_OR_EOL(ch)) {
  75356. if (ch === 0x21/* ! */) {
  75357. if (!isNamed) {
  75358. tagHandle = state.input.slice(_position - 1, state.position + 1);
  75359. if (!PATTERN_TAG_HANDLE.test(tagHandle)) {
  75360. throwError(state, 'named tag handle cannot contain such characters');
  75361. }
  75362. isNamed = true;
  75363. _position = state.position + 1;
  75364. } else {
  75365. throwError(state, 'tag suffix cannot contain exclamation marks');
  75366. }
  75367. }
  75368. ch = state.input.charCodeAt(++state.position);
  75369. }
  75370. tagName = state.input.slice(_position, state.position);
  75371. if (PATTERN_FLOW_INDICATORS.test(tagName)) {
  75372. throwError(state, 'tag suffix cannot contain flow indicator characters');
  75373. }
  75374. }
  75375. if (tagName && !PATTERN_TAG_URI.test(tagName)) {
  75376. throwError(state, 'tag name cannot contain such characters: ' + tagName);
  75377. }
  75378. try {
  75379. tagName = decodeURIComponent(tagName);
  75380. } catch (err) {
  75381. throwError(state, 'tag name is malformed: ' + tagName);
  75382. }
  75383. if (isVerbatim) {
  75384. state.tag = tagName;
  75385. } else if (_hasOwnProperty$1.call(state.tagMap, tagHandle)) {
  75386. state.tag = state.tagMap[tagHandle] + tagName;
  75387. } else if (tagHandle === '!') {
  75388. state.tag = '!' + tagName;
  75389. } else if (tagHandle === '!!') {
  75390. state.tag = 'tag:yaml.org,2002:' + tagName;
  75391. } else {
  75392. throwError(state, 'undeclared tag handle "' + tagHandle + '"');
  75393. }
  75394. return true;
  75395. }
  75396. function readAnchorProperty(state) {
  75397. var _position,
  75398. ch;
  75399. ch = state.input.charCodeAt(state.position);
  75400. if (ch !== 0x26/* & */) return false;
  75401. if (state.anchor !== null) {
  75402. throwError(state, 'duplication of an anchor property');
  75403. }
  75404. ch = state.input.charCodeAt(++state.position);
  75405. _position = state.position;
  75406. while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {
  75407. ch = state.input.charCodeAt(++state.position);
  75408. }
  75409. if (state.position === _position) {
  75410. throwError(state, 'name of an anchor node must contain at least one character');
  75411. }
  75412. state.anchor = state.input.slice(_position, state.position);
  75413. return true;
  75414. }
  75415. function readAlias(state) {
  75416. var _position, alias,
  75417. ch;
  75418. ch = state.input.charCodeAt(state.position);
  75419. if (ch !== 0x2A/* * */) return false;
  75420. ch = state.input.charCodeAt(++state.position);
  75421. _position = state.position;
  75422. while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {
  75423. ch = state.input.charCodeAt(++state.position);
  75424. }
  75425. if (state.position === _position) {
  75426. throwError(state, 'name of an alias node must contain at least one character');
  75427. }
  75428. alias = state.input.slice(_position, state.position);
  75429. if (!_hasOwnProperty$1.call(state.anchorMap, alias)) {
  75430. throwError(state, 'unidentified alias "' + alias + '"');
  75431. }
  75432. state.result = state.anchorMap[alias];
  75433. skipSeparationSpace(state, true, -1);
  75434. return true;
  75435. }
  75436. function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {
  75437. var allowBlockStyles,
  75438. allowBlockScalars,
  75439. allowBlockCollections,
  75440. indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this<parent
  75441. atNewLine = false,
  75442. hasContent = false,
  75443. typeIndex,
  75444. typeQuantity,
  75445. typeList,
  75446. type,
  75447. flowIndent,
  75448. blockIndent;
  75449. if (state.listener !== null) {
  75450. state.listener('open', state);
  75451. }
  75452. state.tag = null;
  75453. state.anchor = null;
  75454. state.kind = null;
  75455. state.result = null;
  75456. allowBlockStyles = allowBlockScalars = allowBlockCollections =
  75457. CONTEXT_BLOCK_OUT === nodeContext ||
  75458. CONTEXT_BLOCK_IN === nodeContext;
  75459. if (allowToSeek) {
  75460. if (skipSeparationSpace(state, true, -1)) {
  75461. atNewLine = true;
  75462. if (state.lineIndent > parentIndent) {
  75463. indentStatus = 1;
  75464. } else if (state.lineIndent === parentIndent) {
  75465. indentStatus = 0;
  75466. } else if (state.lineIndent < parentIndent) {
  75467. indentStatus = -1;
  75468. }
  75469. }
  75470. }
  75471. if (indentStatus === 1) {
  75472. while (readTagProperty(state) || readAnchorProperty(state)) {
  75473. if (skipSeparationSpace(state, true, -1)) {
  75474. atNewLine = true;
  75475. allowBlockCollections = allowBlockStyles;
  75476. if (state.lineIndent > parentIndent) {
  75477. indentStatus = 1;
  75478. } else if (state.lineIndent === parentIndent) {
  75479. indentStatus = 0;
  75480. } else if (state.lineIndent < parentIndent) {
  75481. indentStatus = -1;
  75482. }
  75483. } else {
  75484. allowBlockCollections = false;
  75485. }
  75486. }
  75487. }
  75488. if (allowBlockCollections) {
  75489. allowBlockCollections = atNewLine || allowCompact;
  75490. }
  75491. if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {
  75492. if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {
  75493. flowIndent = parentIndent;
  75494. } else {
  75495. flowIndent = parentIndent + 1;
  75496. }
  75497. blockIndent = state.position - state.lineStart;
  75498. if (indentStatus === 1) {
  75499. if (allowBlockCollections &&
  75500. (readBlockSequence(state, blockIndent) ||
  75501. readBlockMapping(state, blockIndent, flowIndent)) ||
  75502. readFlowCollection(state, flowIndent)) {
  75503. hasContent = true;
  75504. } else {
  75505. if ((allowBlockScalars && readBlockScalar(state, flowIndent)) ||
  75506. readSingleQuotedScalar(state, flowIndent) ||
  75507. readDoubleQuotedScalar(state, flowIndent)) {
  75508. hasContent = true;
  75509. } else if (readAlias(state)) {
  75510. hasContent = true;
  75511. if (state.tag !== null || state.anchor !== null) {
  75512. throwError(state, 'alias node should not have any properties');
  75513. }
  75514. } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {
  75515. hasContent = true;
  75516. if (state.tag === null) {
  75517. state.tag = '?';
  75518. }
  75519. }
  75520. if (state.anchor !== null) {
  75521. state.anchorMap[state.anchor] = state.result;
  75522. }
  75523. }
  75524. } else if (indentStatus === 0) {
  75525. // Special case: block sequences are allowed to have same indentation level as the parent.
  75526. // http://www.yaml.org/spec/1.2/spec.html#id2799784
  75527. hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);
  75528. }
  75529. }
  75530. if (state.tag === null) {
  75531. if (state.anchor !== null) {
  75532. state.anchorMap[state.anchor] = state.result;
  75533. }
  75534. } else if (state.tag === '?') {
  75535. // Implicit resolving is not allowed for non-scalar types, and '?'
  75536. // non-specific tag is only automatically assigned to plain scalars.
  75537. //
  75538. // We only need to check kind conformity in case user explicitly assigns '?'
  75539. // tag, for example like this: "!<?> [0]"
  75540. //
  75541. if (state.result !== null && state.kind !== 'scalar') {
  75542. throwError(state, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + state.kind + '"');
  75543. }
  75544. for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {
  75545. type = state.implicitTypes[typeIndex];
  75546. if (type.resolve(state.result)) { // `state.result` updated in resolver if matched
  75547. state.result = type.construct(state.result);
  75548. state.tag = type.tag;
  75549. if (state.anchor !== null) {
  75550. state.anchorMap[state.anchor] = state.result;
  75551. }
  75552. break;
  75553. }
  75554. }
  75555. } else if (state.tag !== '!') {
  75556. if (_hasOwnProperty$1.call(state.typeMap[state.kind || 'fallback'], state.tag)) {
  75557. type = state.typeMap[state.kind || 'fallback'][state.tag];
  75558. } else {
  75559. // looking for multi type
  75560. type = null;
  75561. typeList = state.typeMap.multi[state.kind || 'fallback'];
  75562. for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) {
  75563. if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) {
  75564. type = typeList[typeIndex];
  75565. break;
  75566. }
  75567. }
  75568. }
  75569. if (!type) {
  75570. throwError(state, 'unknown tag !<' + state.tag + '>');
  75571. }
  75572. if (state.result !== null && type.kind !== state.kind) {
  75573. throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"');
  75574. }
  75575. if (!type.resolve(state.result, state.tag)) { // `state.result` updated in resolver if matched
  75576. throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag');
  75577. } else {
  75578. state.result = type.construct(state.result, state.tag);
  75579. if (state.anchor !== null) {
  75580. state.anchorMap[state.anchor] = state.result;
  75581. }
  75582. }
  75583. }
  75584. if (state.listener !== null) {
  75585. state.listener('close', state);
  75586. }
  75587. return state.tag !== null || state.anchor !== null || hasContent;
  75588. }
  75589. function readDocument(state) {
  75590. var documentStart = state.position,
  75591. _position,
  75592. directiveName,
  75593. directiveArgs,
  75594. hasDirectives = false,
  75595. ch;
  75596. state.version = null;
  75597. state.checkLineBreaks = state.legacy;
  75598. state.tagMap = Object.create(null);
  75599. state.anchorMap = Object.create(null);
  75600. while ((ch = state.input.charCodeAt(state.position)) !== 0) {
  75601. skipSeparationSpace(state, true, -1);
  75602. ch = state.input.charCodeAt(state.position);
  75603. if (state.lineIndent > 0 || ch !== 0x25/* % */) {
  75604. break;
  75605. }
  75606. hasDirectives = true;
  75607. ch = state.input.charCodeAt(++state.position);
  75608. _position = state.position;
  75609. while (ch !== 0 && !is_WS_OR_EOL(ch)) {
  75610. ch = state.input.charCodeAt(++state.position);
  75611. }
  75612. directiveName = state.input.slice(_position, state.position);
  75613. directiveArgs = [];
  75614. if (directiveName.length < 1) {
  75615. throwError(state, 'directive name must not be less than one character in length');
  75616. }
  75617. while (ch !== 0) {
  75618. while (is_WHITE_SPACE(ch)) {
  75619. ch = state.input.charCodeAt(++state.position);
  75620. }
  75621. if (ch === 0x23/* # */) {
  75622. do { ch = state.input.charCodeAt(++state.position); }
  75623. while (ch !== 0 && !is_EOL(ch));
  75624. break;
  75625. }
  75626. if (is_EOL(ch)) break;
  75627. _position = state.position;
  75628. while (ch !== 0 && !is_WS_OR_EOL(ch)) {
  75629. ch = state.input.charCodeAt(++state.position);
  75630. }
  75631. directiveArgs.push(state.input.slice(_position, state.position));
  75632. }
  75633. if (ch !== 0) readLineBreak(state);
  75634. if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) {
  75635. directiveHandlers[directiveName](state, directiveName, directiveArgs);
  75636. } else {
  75637. throwWarning(state, 'unknown document directive "' + directiveName + '"');
  75638. }
  75639. }
  75640. skipSeparationSpace(state, true, -1);
  75641. if (state.lineIndent === 0 &&
  75642. state.input.charCodeAt(state.position) === 0x2D/* - */ &&
  75643. state.input.charCodeAt(state.position + 1) === 0x2D/* - */ &&
  75644. state.input.charCodeAt(state.position + 2) === 0x2D/* - */) {
  75645. state.position += 3;
  75646. skipSeparationSpace(state, true, -1);
  75647. } else if (hasDirectives) {
  75648. throwError(state, 'directives end mark is expected');
  75649. }
  75650. composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);
  75651. skipSeparationSpace(state, true, -1);
  75652. if (state.checkLineBreaks &&
  75653. PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {
  75654. throwWarning(state, 'non-ASCII line breaks are interpreted as content');
  75655. }
  75656. state.documents.push(state.result);
  75657. if (state.position === state.lineStart && testDocumentSeparator(state)) {
  75658. if (state.input.charCodeAt(state.position) === 0x2E/* . */) {
  75659. state.position += 3;
  75660. skipSeparationSpace(state, true, -1);
  75661. }
  75662. return;
  75663. }
  75664. if (state.position < (state.length - 1)) {
  75665. throwError(state, 'end of the stream or a document separator is expected');
  75666. } else {
  75667. return;
  75668. }
  75669. }
  75670. function loadDocuments(input, options) {
  75671. input = String(input);
  75672. options = options || {};
  75673. if (input.length !== 0) {
  75674. // Add tailing `\n` if not exists
  75675. if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ &&
  75676. input.charCodeAt(input.length - 1) !== 0x0D/* CR */) {
  75677. input += '\n';
  75678. }
  75679. // Strip BOM
  75680. if (input.charCodeAt(0) === 0xFEFF) {
  75681. input = input.slice(1);
  75682. }
  75683. }
  75684. var state = new State$1(input, options);
  75685. var nullpos = input.indexOf('\0');
  75686. if (nullpos !== -1) {
  75687. state.position = nullpos;
  75688. throwError(state, 'null byte is not allowed in input');
  75689. }
  75690. // Use 0 as string terminator. That significantly simplifies bounds check.
  75691. state.input += '\0';
  75692. while (state.input.charCodeAt(state.position) === 0x20/* Space */) {
  75693. state.lineIndent += 1;
  75694. state.position += 1;
  75695. }
  75696. while (state.position < (state.length - 1)) {
  75697. readDocument(state);
  75698. }
  75699. return state.documents;
  75700. }
  75701. function loadAll$1(input, iterator, options) {
  75702. if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') {
  75703. options = iterator;
  75704. iterator = null;
  75705. }
  75706. var documents = loadDocuments(input, options);
  75707. if (typeof iterator !== 'function') {
  75708. return documents;
  75709. }
  75710. for (var index = 0, length = documents.length; index < length; index += 1) {
  75711. iterator(documents[index]);
  75712. }
  75713. }
  75714. function load$1(input, options) {
  75715. var documents = loadDocuments(input, options);
  75716. if (documents.length === 0) {
  75717. /*eslint-disable no-undefined*/
  75718. return undefined;
  75719. } else if (documents.length === 1) {
  75720. return documents[0];
  75721. }
  75722. throw new exception('expected a single document in the stream, but found more');
  75723. }
  75724. var loadAll_1 = loadAll$1;
  75725. var load_1 = load$1;
  75726. var loader = {
  75727. loadAll: loadAll_1,
  75728. load: load_1
  75729. };
  75730. /*eslint-disable no-use-before-define*/
  75731. var _toString = Object.prototype.toString;
  75732. var _hasOwnProperty = Object.prototype.hasOwnProperty;
  75733. var CHAR_BOM = 0xFEFF;
  75734. var CHAR_TAB = 0x09; /* Tab */
  75735. var CHAR_LINE_FEED = 0x0A; /* LF */
  75736. var CHAR_CARRIAGE_RETURN = 0x0D; /* CR */
  75737. var CHAR_SPACE = 0x20; /* Space */
  75738. var CHAR_EXCLAMATION = 0x21; /* ! */
  75739. var CHAR_DOUBLE_QUOTE = 0x22; /* " */
  75740. var CHAR_SHARP = 0x23; /* # */
  75741. var CHAR_PERCENT = 0x25; /* % */
  75742. var CHAR_AMPERSAND = 0x26; /* & */
  75743. var CHAR_SINGLE_QUOTE = 0x27; /* ' */
  75744. var CHAR_ASTERISK = 0x2A; /* * */
  75745. var CHAR_COMMA = 0x2C; /* , */
  75746. var CHAR_MINUS = 0x2D; /* - */
  75747. var CHAR_COLON = 0x3A; /* : */
  75748. var CHAR_EQUALS = 0x3D; /* = */
  75749. var CHAR_GREATER_THAN = 0x3E; /* > */
  75750. var CHAR_QUESTION = 0x3F; /* ? */
  75751. var CHAR_COMMERCIAL_AT = 0x40; /* @ */
  75752. var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */
  75753. var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */
  75754. var CHAR_GRAVE_ACCENT = 0x60; /* ` */
  75755. var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */
  75756. var CHAR_VERTICAL_LINE = 0x7C; /* | */
  75757. var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */
  75758. var ESCAPE_SEQUENCES = {};
  75759. ESCAPE_SEQUENCES[0x00] = '\\0';
  75760. ESCAPE_SEQUENCES[0x07] = '\\a';
  75761. ESCAPE_SEQUENCES[0x08] = '\\b';
  75762. ESCAPE_SEQUENCES[0x09] = '\\t';
  75763. ESCAPE_SEQUENCES[0x0A] = '\\n';
  75764. ESCAPE_SEQUENCES[0x0B] = '\\v';
  75765. ESCAPE_SEQUENCES[0x0C] = '\\f';
  75766. ESCAPE_SEQUENCES[0x0D] = '\\r';
  75767. ESCAPE_SEQUENCES[0x1B] = '\\e';
  75768. ESCAPE_SEQUENCES[0x22] = '\\"';
  75769. ESCAPE_SEQUENCES[0x5C] = '\\\\';
  75770. ESCAPE_SEQUENCES[0x85] = '\\N';
  75771. ESCAPE_SEQUENCES[0xA0] = '\\_';
  75772. ESCAPE_SEQUENCES[0x2028] = '\\L';
  75773. ESCAPE_SEQUENCES[0x2029] = '\\P';
  75774. var DEPRECATED_BOOLEANS_SYNTAX = [
  75775. 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON',
  75776. 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF'
  75777. ];
  75778. var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
  75779. function compileStyleMap(schema, map) {
  75780. var result, keys, index, length, tag, style, type;
  75781. if (map === null) return {};
  75782. result = {};
  75783. keys = Object.keys(map);
  75784. for (index = 0, length = keys.length; index < length; index += 1) {
  75785. tag = keys[index];
  75786. style = String(map[tag]);
  75787. if (tag.slice(0, 2) === '!!') {
  75788. tag = 'tag:yaml.org,2002:' + tag.slice(2);
  75789. }
  75790. type = schema.compiledTypeMap['fallback'][tag];
  75791. if (type && _hasOwnProperty.call(type.styleAliases, style)) {
  75792. style = type.styleAliases[style];
  75793. }
  75794. result[tag] = style;
  75795. }
  75796. return result;
  75797. }
  75798. function encodeHex(character) {
  75799. var string, handle, length;
  75800. string = character.toString(16).toUpperCase();
  75801. if (character <= 0xFF) {
  75802. handle = 'x';
  75803. length = 2;
  75804. } else if (character <= 0xFFFF) {
  75805. handle = 'u';
  75806. length = 4;
  75807. } else if (character <= 0xFFFFFFFF) {
  75808. handle = 'U';
  75809. length = 8;
  75810. } else {
  75811. throw new exception('code point within a string may not be greater than 0xFFFFFFFF');
  75812. }
  75813. return '\\' + handle + common.repeat('0', length - string.length) + string;
  75814. }
  75815. var QUOTING_TYPE_SINGLE = 1,
  75816. QUOTING_TYPE_DOUBLE = 2;
  75817. function State(options) {
  75818. this.schema = options['schema'] || _default;
  75819. this.indent = Math.max(1, (options['indent'] || 2));
  75820. this.noArrayIndent = options['noArrayIndent'] || false;
  75821. this.skipInvalid = options['skipInvalid'] || false;
  75822. this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']);
  75823. this.styleMap = compileStyleMap(this.schema, options['styles'] || null);
  75824. this.sortKeys = options['sortKeys'] || false;
  75825. this.lineWidth = options['lineWidth'] || 80;
  75826. this.noRefs = options['noRefs'] || false;
  75827. this.noCompatMode = options['noCompatMode'] || false;
  75828. this.condenseFlow = options['condenseFlow'] || false;
  75829. this.quotingType = options['quotingType'] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE;
  75830. this.forceQuotes = options['forceQuotes'] || false;
  75831. this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null;
  75832. this.implicitTypes = this.schema.compiledImplicit;
  75833. this.explicitTypes = this.schema.compiledExplicit;
  75834. this.tag = null;
  75835. this.result = '';
  75836. this.duplicates = [];
  75837. this.usedDuplicates = null;
  75838. }
  75839. // Indents every line in a string. Empty lines (\n only) are not indented.
  75840. function indentString(string, spaces) {
  75841. var ind = common.repeat(' ', spaces),
  75842. position = 0,
  75843. next = -1,
  75844. result = '',
  75845. line,
  75846. length = string.length;
  75847. while (position < length) {
  75848. next = string.indexOf('\n', position);
  75849. if (next === -1) {
  75850. line = string.slice(position);
  75851. position = length;
  75852. } else {
  75853. line = string.slice(position, next + 1);
  75854. position = next + 1;
  75855. }
  75856. if (line.length && line !== '\n') result += ind;
  75857. result += line;
  75858. }
  75859. return result;
  75860. }
  75861. function generateNextLine(state, level) {
  75862. return '\n' + common.repeat(' ', state.indent * level);
  75863. }
  75864. function testImplicitResolving(state, str) {
  75865. var index, length, type;
  75866. for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {
  75867. type = state.implicitTypes[index];
  75868. if (type.resolve(str)) {
  75869. return true;
  75870. }
  75871. }
  75872. return false;
  75873. }
  75874. // [33] s-white ::= s-space | s-tab
  75875. function isWhitespace(c) {
  75876. return c === CHAR_SPACE || c === CHAR_TAB;
  75877. }
  75878. // Returns true if the character can be printed without escaping.
  75879. // From YAML 1.2: "any allowed characters known to be non-printable
  75880. // should also be escaped. [However,] This isn’t mandatory"
  75881. // Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029.
  75882. function isPrintable(c) {
  75883. return (0x00020 <= c && c <= 0x00007E)
  75884. || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029)
  75885. || ((0x0E000 <= c && c <= 0x00FFFD) && c !== CHAR_BOM)
  75886. || (0x10000 <= c && c <= 0x10FFFF);
  75887. }
  75888. // [34] ns-char ::= nb-char - s-white
  75889. // [27] nb-char ::= c-printable - b-char - c-byte-order-mark
  75890. // [26] b-char ::= b-line-feed | b-carriage-return
  75891. // Including s-white (for some reason, examples doesn't match specs in this aspect)
  75892. // ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark
  75893. function isNsCharOrWhitespace(c) {
  75894. return isPrintable(c)
  75895. && c !== CHAR_BOM
  75896. // - b-char
  75897. && c !== CHAR_CARRIAGE_RETURN
  75898. && c !== CHAR_LINE_FEED;
  75899. }
  75900. // [127] ns-plain-safe(c) ::= c = flow-out ⇒ ns-plain-safe-out
  75901. // c = flow-in ⇒ ns-plain-safe-in
  75902. // c = block-key ⇒ ns-plain-safe-out
  75903. // c = flow-key ⇒ ns-plain-safe-in
  75904. // [128] ns-plain-safe-out ::= ns-char
  75905. // [129] ns-plain-safe-in ::= ns-char - c-flow-indicator
  75906. // [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - “:” - “#” )
  75907. // | ( /* An ns-char preceding */ “#” )
  75908. // | ( “:” /* Followed by an ns-plain-safe(c) */ )
  75909. function isPlainSafe(c, prev, inblock) {
  75910. var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c);
  75911. var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c);
  75912. return (
  75913. // ns-plain-safe
  75914. inblock ? // c = flow-in
  75915. cIsNsCharOrWhitespace
  75916. : cIsNsCharOrWhitespace
  75917. // - c-flow-indicator
  75918. && c !== CHAR_COMMA
  75919. && c !== CHAR_LEFT_SQUARE_BRACKET
  75920. && c !== CHAR_RIGHT_SQUARE_BRACKET
  75921. && c !== CHAR_LEFT_CURLY_BRACKET
  75922. && c !== CHAR_RIGHT_CURLY_BRACKET
  75923. )
  75924. // ns-plain-char
  75925. && c !== CHAR_SHARP // false on '#'
  75926. && !(prev === CHAR_COLON && !cIsNsChar) // false on ': '
  75927. || (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) // change to true on '[^ ]#'
  75928. || (prev === CHAR_COLON && cIsNsChar); // change to true on ':[^ ]'
  75929. }
  75930. // Simplified test for values allowed as the first character in plain style.
  75931. function isPlainSafeFirst(c) {
  75932. // Uses a subset of ns-char - c-indicator
  75933. // where ns-char = nb-char - s-white.
  75934. // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part
  75935. return isPrintable(c) && c !== CHAR_BOM
  75936. && !isWhitespace(c) // - s-white
  75937. // - (c-indicator ::=
  75938. // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”
  75939. && c !== CHAR_MINUS
  75940. && c !== CHAR_QUESTION
  75941. && c !== CHAR_COLON
  75942. && c !== CHAR_COMMA
  75943. && c !== CHAR_LEFT_SQUARE_BRACKET
  75944. && c !== CHAR_RIGHT_SQUARE_BRACKET
  75945. && c !== CHAR_LEFT_CURLY_BRACKET
  75946. && c !== CHAR_RIGHT_CURLY_BRACKET
  75947. // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “"”
  75948. && c !== CHAR_SHARP
  75949. && c !== CHAR_AMPERSAND
  75950. && c !== CHAR_ASTERISK
  75951. && c !== CHAR_EXCLAMATION
  75952. && c !== CHAR_VERTICAL_LINE
  75953. && c !== CHAR_EQUALS
  75954. && c !== CHAR_GREATER_THAN
  75955. && c !== CHAR_SINGLE_QUOTE
  75956. && c !== CHAR_DOUBLE_QUOTE
  75957. // | “%” | “@” | “`”)
  75958. && c !== CHAR_PERCENT
  75959. && c !== CHAR_COMMERCIAL_AT
  75960. && c !== CHAR_GRAVE_ACCENT;
  75961. }
  75962. // Simplified test for values allowed as the last character in plain style.
  75963. function isPlainSafeLast(c) {
  75964. // just not whitespace or colon, it will be checked to be plain character later
  75965. return !isWhitespace(c) && c !== CHAR_COLON;
  75966. }
  75967. // Same as 'string'.codePointAt(pos), but works in older browsers.
  75968. function codePointAt(string, pos) {
  75969. var first = string.charCodeAt(pos), second;
  75970. if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) {
  75971. second = string.charCodeAt(pos + 1);
  75972. if (second >= 0xDC00 && second <= 0xDFFF) {
  75973. // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
  75974. return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
  75975. }
  75976. }
  75977. return first;
  75978. }
  75979. // Determines whether block indentation indicator is required.
  75980. function needIndentIndicator(string) {
  75981. var leadingSpaceRe = /^\n* /;
  75982. return leadingSpaceRe.test(string);
  75983. }
  75984. var STYLE_PLAIN = 1,
  75985. STYLE_SINGLE = 2,
  75986. STYLE_LITERAL = 3,
  75987. STYLE_FOLDED = 4,
  75988. STYLE_DOUBLE = 5;
  75989. // Determines which scalar styles are possible and returns the preferred style.
  75990. // lineWidth = -1 => no limit.
  75991. // Pre-conditions: str.length > 0.
  75992. // Post-conditions:
  75993. // STYLE_PLAIN or STYLE_SINGLE => no \n are in the string.
  75994. // STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1).
  75995. // STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1).
  75996. function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth,
  75997. testAmbiguousType, quotingType, forceQuotes, inblock) {
  75998. var i;
  75999. var char = 0;
  76000. var prevChar = null;
  76001. var hasLineBreak = false;
  76002. var hasFoldableLine = false; // only checked if shouldTrackWidth
  76003. var shouldTrackWidth = lineWidth !== -1;
  76004. var previousLineBreak = -1; // count the first line correctly
  76005. var plain = isPlainSafeFirst(codePointAt(string, 0))
  76006. && isPlainSafeLast(codePointAt(string, string.length - 1));
  76007. if (singleLineOnly || forceQuotes) {
  76008. // Case: no block styles.
  76009. // Check for disallowed characters to rule out plain and single.
  76010. for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {
  76011. char = codePointAt(string, i);
  76012. if (!isPrintable(char)) {
  76013. return STYLE_DOUBLE;
  76014. }
  76015. plain = plain && isPlainSafe(char, prevChar, inblock);
  76016. prevChar = char;
  76017. }
  76018. } else {
  76019. // Case: block styles permitted.
  76020. for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {
  76021. char = codePointAt(string, i);
  76022. if (char === CHAR_LINE_FEED) {
  76023. hasLineBreak = true;
  76024. // Check if any line can be folded.
  76025. if (shouldTrackWidth) {
  76026. hasFoldableLine = hasFoldableLine ||
  76027. // Foldable line = too long, and not more-indented.
  76028. (i - previousLineBreak - 1 > lineWidth &&
  76029. string[previousLineBreak + 1] !== ' ');
  76030. previousLineBreak = i;
  76031. }
  76032. } else if (!isPrintable(char)) {
  76033. return STYLE_DOUBLE;
  76034. }
  76035. plain = plain && isPlainSafe(char, prevChar, inblock);
  76036. prevChar = char;
  76037. }
  76038. // in case the end is missing a \n
  76039. hasFoldableLine = hasFoldableLine || (shouldTrackWidth &&
  76040. (i - previousLineBreak - 1 > lineWidth &&
  76041. string[previousLineBreak + 1] !== ' '));
  76042. }
  76043. // Although every style can represent \n without escaping, prefer block styles
  76044. // for multiline, since they're more readable and they don't add empty lines.
  76045. // Also prefer folding a super-long line.
  76046. if (!hasLineBreak && !hasFoldableLine) {
  76047. // Strings interpretable as another type have to be quoted;
  76048. // e.g. the string 'true' vs. the boolean true.
  76049. if (plain && !forceQuotes && !testAmbiguousType(string)) {
  76050. return STYLE_PLAIN;
  76051. }
  76052. return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;
  76053. }
  76054. // Edge case: block indentation indicator can only have one digit.
  76055. if (indentPerLevel > 9 && needIndentIndicator(string)) {
  76056. return STYLE_DOUBLE;
  76057. }
  76058. // At this point we know block styles are valid.
  76059. // Prefer literal style unless we want to fold.
  76060. if (!forceQuotes) {
  76061. return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL;
  76062. }
  76063. return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;
  76064. }
  76065. // Note: line breaking/folding is implemented for only the folded style.
  76066. // NB. We drop the last trailing newline (if any) of a returned block scalar
  76067. // since the dumper adds its own newline. This always works:
  76068. // • No ending newline => unaffected; already using strip "-" chomping.
  76069. // • Ending newline => removed then restored.
  76070. // Importantly, this keeps the "+" chomp indicator from gaining an extra line.
  76071. function writeScalar(state, string, level, iskey, inblock) {
  76072. state.dump = (function () {
  76073. if (string.length === 0) {
  76074. return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''";
  76075. }
  76076. if (!state.noCompatMode) {
  76077. if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) {
  76078. return state.quotingType === QUOTING_TYPE_DOUBLE ? ('"' + string + '"') : ("'" + string + "'");
  76079. }
  76080. }
  76081. var indent = state.indent * Math.max(1, level); // no 0-indent scalars
  76082. // As indentation gets deeper, let the width decrease monotonically
  76083. // to the lower bound min(state.lineWidth, 40).
  76084. // Note that this implies
  76085. // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound.
  76086. // state.lineWidth > 40 + state.indent: width decreases until the lower bound.
  76087. // This behaves better than a constant minimum width which disallows narrower options,
  76088. // or an indent threshold which causes the width to suddenly increase.
  76089. var lineWidth = state.lineWidth === -1
  76090. ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);
  76091. // Without knowing if keys are implicit/explicit, assume implicit for safety.
  76092. var singleLineOnly = iskey
  76093. // No block styles in flow mode.
  76094. || (state.flowLevel > -1 && level >= state.flowLevel);
  76095. function testAmbiguity(string) {
  76096. return testImplicitResolving(state, string);
  76097. }
  76098. switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth,
  76099. testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) {
  76100. case STYLE_PLAIN:
  76101. return string;
  76102. case STYLE_SINGLE:
  76103. return "'" + string.replace(/'/g, "''") + "'";
  76104. case STYLE_LITERAL:
  76105. return '|' + blockHeader(string, state.indent)
  76106. + dropEndingNewline(indentString(string, indent));
  76107. case STYLE_FOLDED:
  76108. return '>' + blockHeader(string, state.indent)
  76109. + dropEndingNewline(indentString(foldString(string, lineWidth), indent));
  76110. case STYLE_DOUBLE:
  76111. return '"' + escapeString(string) + '"';
  76112. default:
  76113. throw new exception('impossible error: invalid scalar style');
  76114. }
  76115. }());
  76116. }
  76117. // Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9.
  76118. function blockHeader(string, indentPerLevel) {
  76119. var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : '';
  76120. // note the special case: the string '\n' counts as a "trailing" empty line.
  76121. var clip = string[string.length - 1] === '\n';
  76122. var keep = clip && (string[string.length - 2] === '\n' || string === '\n');
  76123. var chomp = keep ? '+' : (clip ? '' : '-');
  76124. return indentIndicator + chomp + '\n';
  76125. }
  76126. // (See the note for writeScalar.)
  76127. function dropEndingNewline(string) {
  76128. return string[string.length - 1] === '\n' ? string.slice(0, -1) : string;
  76129. }
  76130. // Note: a long line without a suitable break point will exceed the width limit.
  76131. // Pre-conditions: every char in str isPrintable, str.length > 0, width > 0.
  76132. function foldString(string, width) {
  76133. // In folded style, $k$ consecutive newlines output as $k+1$ newlines—
  76134. // unless they're before or after a more-indented line, or at the very
  76135. // beginning or end, in which case $k$ maps to $k$.
  76136. // Therefore, parse each chunk as newline(s) followed by a content line.
  76137. var lineRe = /(\n+)([^\n]*)/g;
  76138. // first line (possibly an empty line)
  76139. var result = (function () {
  76140. var nextLF = string.indexOf('\n');
  76141. nextLF = nextLF !== -1 ? nextLF : string.length;
  76142. lineRe.lastIndex = nextLF;
  76143. return foldLine(string.slice(0, nextLF), width);
  76144. }());
  76145. // If we haven't reached the first content line yet, don't add an extra \n.
  76146. var prevMoreIndented = string[0] === '\n' || string[0] === ' ';
  76147. var moreIndented;
  76148. // rest of the lines
  76149. var match;
  76150. while ((match = lineRe.exec(string))) {
  76151. var prefix = match[1], line = match[2];
  76152. moreIndented = (line[0] === ' ');
  76153. result += prefix
  76154. + (!prevMoreIndented && !moreIndented && line !== ''
  76155. ? '\n' : '')
  76156. + foldLine(line, width);
  76157. prevMoreIndented = moreIndented;
  76158. }
  76159. return result;
  76160. }
  76161. // Greedy line breaking.
  76162. // Picks the longest line under the limit each time,
  76163. // otherwise settles for the shortest line over the limit.
  76164. // NB. More-indented lines *cannot* be folded, as that would add an extra \n.
  76165. function foldLine(line, width) {
  76166. if (line === '' || line[0] === ' ') return line;
  76167. // Since a more-indented line adds a \n, breaks can't be followed by a space.
  76168. var breakRe = / [^ ]/g; // note: the match index will always be <= length-2.
  76169. var match;
  76170. // start is an inclusive index. end, curr, and next are exclusive.
  76171. var start = 0, end, curr = 0, next = 0;
  76172. var result = '';
  76173. // Invariants: 0 <= start <= length-1.
  76174. // 0 <= curr <= next <= max(0, length-2). curr - start <= width.
  76175. // Inside the loop:
  76176. // A match implies length >= 2, so curr and next are <= length-2.
  76177. while ((match = breakRe.exec(line))) {
  76178. next = match.index;
  76179. // maintain invariant: curr - start <= width
  76180. if (next - start > width) {
  76181. end = (curr > start) ? curr : next; // derive end <= length-2
  76182. result += '\n' + line.slice(start, end);
  76183. // skip the space that was output as \n
  76184. start = end + 1; // derive start <= length-1
  76185. }
  76186. curr = next;
  76187. }
  76188. // By the invariants, start <= length-1, so there is something left over.
  76189. // It is either the whole string or a part starting from non-whitespace.
  76190. result += '\n';
  76191. // Insert a break if the remainder is too long and there is a break available.
  76192. if (line.length - start > width && curr > start) {
  76193. result += line.slice(start, curr) + '\n' + line.slice(curr + 1);
  76194. } else {
  76195. result += line.slice(start);
  76196. }
  76197. return result.slice(1); // drop extra \n joiner
  76198. }
  76199. // Escapes a double-quoted string.
  76200. function escapeString(string) {
  76201. var result = '';
  76202. var char = 0;
  76203. var escapeSeq;
  76204. for (var i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {
  76205. char = codePointAt(string, i);
  76206. escapeSeq = ESCAPE_SEQUENCES[char];
  76207. if (!escapeSeq && isPrintable(char)) {
  76208. result += string[i];
  76209. if (char >= 0x10000) result += string[i + 1];
  76210. } else {
  76211. result += escapeSeq || encodeHex(char);
  76212. }
  76213. }
  76214. return result;
  76215. }
  76216. function writeFlowSequence(state, level, object) {
  76217. var _result = '',
  76218. _tag = state.tag,
  76219. index,
  76220. length,
  76221. value;
  76222. for (index = 0, length = object.length; index < length; index += 1) {
  76223. value = object[index];
  76224. if (state.replacer) {
  76225. value = state.replacer.call(object, String(index), value);
  76226. }
  76227. // Write only valid elements, put null instead of invalid elements.
  76228. if (writeNode(state, level, value, false, false) ||
  76229. (typeof value === 'undefined' &&
  76230. writeNode(state, level, null, false, false))) {
  76231. if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : '');
  76232. _result += state.dump;
  76233. }
  76234. }
  76235. state.tag = _tag;
  76236. state.dump = '[' + _result + ']';
  76237. }
  76238. function writeBlockSequence(state, level, object, compact) {
  76239. var _result = '',
  76240. _tag = state.tag,
  76241. index,
  76242. length,
  76243. value;
  76244. for (index = 0, length = object.length; index < length; index += 1) {
  76245. value = object[index];
  76246. if (state.replacer) {
  76247. value = state.replacer.call(object, String(index), value);
  76248. }
  76249. // Write only valid elements, put null instead of invalid elements.
  76250. if (writeNode(state, level + 1, value, true, true, false, true) ||
  76251. (typeof value === 'undefined' &&
  76252. writeNode(state, level + 1, null, true, true, false, true))) {
  76253. if (!compact || _result !== '') {
  76254. _result += generateNextLine(state, level);
  76255. }
  76256. if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
  76257. _result += '-';
  76258. } else {
  76259. _result += '- ';
  76260. }
  76261. _result += state.dump;
  76262. }
  76263. }
  76264. state.tag = _tag;
  76265. state.dump = _result || '[]'; // Empty sequence if no valid values.
  76266. }
  76267. function writeFlowMapping(state, level, object) {
  76268. var _result = '',
  76269. _tag = state.tag,
  76270. objectKeyList = Object.keys(object),
  76271. index,
  76272. length,
  76273. objectKey,
  76274. objectValue,
  76275. pairBuffer;
  76276. for (index = 0, length = objectKeyList.length; index < length; index += 1) {
  76277. pairBuffer = '';
  76278. if (_result !== '') pairBuffer += ', ';
  76279. if (state.condenseFlow) pairBuffer += '"';
  76280. objectKey = objectKeyList[index];
  76281. objectValue = object[objectKey];
  76282. if (state.replacer) {
  76283. objectValue = state.replacer.call(object, objectKey, objectValue);
  76284. }
  76285. if (!writeNode(state, level, objectKey, false, false)) {
  76286. continue; // Skip this pair because of invalid key;
  76287. }
  76288. if (state.dump.length > 1024) pairBuffer += '? ';
  76289. pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' ');
  76290. if (!writeNode(state, level, objectValue, false, false)) {
  76291. continue; // Skip this pair because of invalid value.
  76292. }
  76293. pairBuffer += state.dump;
  76294. // Both key and value are valid.
  76295. _result += pairBuffer;
  76296. }
  76297. state.tag = _tag;
  76298. state.dump = '{' + _result + '}';
  76299. }
  76300. function writeBlockMapping(state, level, object, compact) {
  76301. var _result = '',
  76302. _tag = state.tag,
  76303. objectKeyList = Object.keys(object),
  76304. index,
  76305. length,
  76306. objectKey,
  76307. objectValue,
  76308. explicitPair,
  76309. pairBuffer;
  76310. // Allow sorting keys so that the output file is deterministic
  76311. if (state.sortKeys === true) {
  76312. // Default sorting
  76313. objectKeyList.sort();
  76314. } else if (typeof state.sortKeys === 'function') {
  76315. // Custom sort function
  76316. objectKeyList.sort(state.sortKeys);
  76317. } else if (state.sortKeys) {
  76318. // Something is wrong
  76319. throw new exception('sortKeys must be a boolean or a function');
  76320. }
  76321. for (index = 0, length = objectKeyList.length; index < length; index += 1) {
  76322. pairBuffer = '';
  76323. if (!compact || _result !== '') {
  76324. pairBuffer += generateNextLine(state, level);
  76325. }
  76326. objectKey = objectKeyList[index];
  76327. objectValue = object[objectKey];
  76328. if (state.replacer) {
  76329. objectValue = state.replacer.call(object, objectKey, objectValue);
  76330. }
  76331. if (!writeNode(state, level + 1, objectKey, true, true, true)) {
  76332. continue; // Skip this pair because of invalid key.
  76333. }
  76334. explicitPair = (state.tag !== null && state.tag !== '?') ||
  76335. (state.dump && state.dump.length > 1024);
  76336. if (explicitPair) {
  76337. if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
  76338. pairBuffer += '?';
  76339. } else {
  76340. pairBuffer += '? ';
  76341. }
  76342. }
  76343. pairBuffer += state.dump;
  76344. if (explicitPair) {
  76345. pairBuffer += generateNextLine(state, level);
  76346. }
  76347. if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {
  76348. continue; // Skip this pair because of invalid value.
  76349. }
  76350. if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
  76351. pairBuffer += ':';
  76352. } else {
  76353. pairBuffer += ': ';
  76354. }
  76355. pairBuffer += state.dump;
  76356. // Both key and value are valid.
  76357. _result += pairBuffer;
  76358. }
  76359. state.tag = _tag;
  76360. state.dump = _result || '{}'; // Empty mapping if no valid pairs.
  76361. }
  76362. function detectType(state, object, explicit) {
  76363. var _result, typeList, index, length, type, style;
  76364. typeList = explicit ? state.explicitTypes : state.implicitTypes;
  76365. for (index = 0, length = typeList.length; index < length; index += 1) {
  76366. type = typeList[index];
  76367. if ((type.instanceOf || type.predicate) &&
  76368. (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) &&
  76369. (!type.predicate || type.predicate(object))) {
  76370. if (explicit) {
  76371. if (type.multi && type.representName) {
  76372. state.tag = type.representName(object);
  76373. } else {
  76374. state.tag = type.tag;
  76375. }
  76376. } else {
  76377. state.tag = '?';
  76378. }
  76379. if (type.represent) {
  76380. style = state.styleMap[type.tag] || type.defaultStyle;
  76381. if (_toString.call(type.represent) === '[object Function]') {
  76382. _result = type.represent(object, style);
  76383. } else if (_hasOwnProperty.call(type.represent, style)) {
  76384. _result = type.represent[style](object, style);
  76385. } else {
  76386. throw new exception('!<' + type.tag + '> tag resolver accepts not "' + style + '" style');
  76387. }
  76388. state.dump = _result;
  76389. }
  76390. return true;
  76391. }
  76392. }
  76393. return false;
  76394. }
  76395. // Serializes `object` and writes it to global `result`.
  76396. // Returns true on success, or false on invalid object.
  76397. //
  76398. function writeNode(state, level, object, block, compact, iskey, isblockseq) {
  76399. state.tag = null;
  76400. state.dump = object;
  76401. if (!detectType(state, object, false)) {
  76402. detectType(state, object, true);
  76403. }
  76404. var type = _toString.call(state.dump);
  76405. var inblock = block;
  76406. var tagStr;
  76407. if (block) {
  76408. block = (state.flowLevel < 0 || state.flowLevel > level);
  76409. }
  76410. var objectOrArray = type === '[object Object]' || type === '[object Array]',
  76411. duplicateIndex,
  76412. duplicate;
  76413. if (objectOrArray) {
  76414. duplicateIndex = state.duplicates.indexOf(object);
  76415. duplicate = duplicateIndex !== -1;
  76416. }
  76417. if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) {
  76418. compact = false;
  76419. }
  76420. if (duplicate && state.usedDuplicates[duplicateIndex]) {
  76421. state.dump = '*ref_' + duplicateIndex;
  76422. } else {
  76423. if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {
  76424. state.usedDuplicates[duplicateIndex] = true;
  76425. }
  76426. if (type === '[object Object]') {
  76427. if (block && (Object.keys(state.dump).length !== 0)) {
  76428. writeBlockMapping(state, level, state.dump, compact);
  76429. if (duplicate) {
  76430. state.dump = '&ref_' + duplicateIndex + state.dump;
  76431. }
  76432. } else {
  76433. writeFlowMapping(state, level, state.dump);
  76434. if (duplicate) {
  76435. state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;
  76436. }
  76437. }
  76438. } else if (type === '[object Array]') {
  76439. if (block && (state.dump.length !== 0)) {
  76440. if (state.noArrayIndent && !isblockseq && level > 0) {
  76441. writeBlockSequence(state, level - 1, state.dump, compact);
  76442. } else {
  76443. writeBlockSequence(state, level, state.dump, compact);
  76444. }
  76445. if (duplicate) {
  76446. state.dump = '&ref_' + duplicateIndex + state.dump;
  76447. }
  76448. } else {
  76449. writeFlowSequence(state, level, state.dump);
  76450. if (duplicate) {
  76451. state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;
  76452. }
  76453. }
  76454. } else if (type === '[object String]') {
  76455. if (state.tag !== '?') {
  76456. writeScalar(state, state.dump, level, iskey, inblock);
  76457. }
  76458. } else if (type === '[object Undefined]') {
  76459. return false;
  76460. } else {
  76461. if (state.skipInvalid) return false;
  76462. throw new exception('unacceptable kind of an object to dump ' + type);
  76463. }
  76464. if (state.tag !== null && state.tag !== '?') {
  76465. // Need to encode all characters except those allowed by the spec:
  76466. //
  76467. // [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */
  76468. // [36] ns-hex-digit ::= ns-dec-digit
  76469. // | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */
  76470. // [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */
  76471. // [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | “-”
  76472. // [39] ns-uri-char ::= “%” ns-hex-digit ns-hex-digit | ns-word-char | “#”
  76473. // | “;” | “/” | “?” | “:” | “@” | “&” | “=” | “+” | “$” | “,”
  76474. // | “_” | “.” | “!” | “~” | “*” | “'” | “(” | “)” | “[” | “]”
  76475. //
  76476. // Also need to encode '!' because it has special meaning (end of tag prefix).
  76477. //
  76478. tagStr = encodeURI(
  76479. state.tag[0] === '!' ? state.tag.slice(1) : state.tag
  76480. ).replace(/!/g, '%21');
  76481. if (state.tag[0] === '!') {
  76482. tagStr = '!' + tagStr;
  76483. } else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') {
  76484. tagStr = '!!' + tagStr.slice(18);
  76485. } else {
  76486. tagStr = '!<' + tagStr + '>';
  76487. }
  76488. state.dump = tagStr + ' ' + state.dump;
  76489. }
  76490. }
  76491. return true;
  76492. }
  76493. function getDuplicateReferences(object, state) {
  76494. var objects = [],
  76495. duplicatesIndexes = [],
  76496. index,
  76497. length;
  76498. inspectNode(object, objects, duplicatesIndexes);
  76499. for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) {
  76500. state.duplicates.push(objects[duplicatesIndexes[index]]);
  76501. }
  76502. state.usedDuplicates = new Array(length);
  76503. }
  76504. function inspectNode(object, objects, duplicatesIndexes) {
  76505. var objectKeyList,
  76506. index,
  76507. length;
  76508. if (object !== null && typeof object === 'object') {
  76509. index = objects.indexOf(object);
  76510. if (index !== -1) {
  76511. if (duplicatesIndexes.indexOf(index) === -1) {
  76512. duplicatesIndexes.push(index);
  76513. }
  76514. } else {
  76515. objects.push(object);
  76516. if (Array.isArray(object)) {
  76517. for (index = 0, length = object.length; index < length; index += 1) {
  76518. inspectNode(object[index], objects, duplicatesIndexes);
  76519. }
  76520. } else {
  76521. objectKeyList = Object.keys(object);
  76522. for (index = 0, length = objectKeyList.length; index < length; index += 1) {
  76523. inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);
  76524. }
  76525. }
  76526. }
  76527. }
  76528. }
  76529. function dump$1(input, options) {
  76530. options = options || {};
  76531. var state = new State(options);
  76532. if (!state.noRefs) getDuplicateReferences(input, state);
  76533. var value = input;
  76534. if (state.replacer) {
  76535. value = state.replacer.call({ '': value }, '', value);
  76536. }
  76537. if (writeNode(state, 0, value, true, true)) return state.dump + '\n';
  76538. return '';
  76539. }
  76540. var dump_1 = dump$1;
  76541. var dumper = {
  76542. dump: dump_1
  76543. };
  76544. function renamed(from, to) {
  76545. return function () {
  76546. throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' +
  76547. 'Use yaml.' + to + ' instead, which is now safe by default.');
  76548. };
  76549. }
  76550. var Type = type;
  76551. var Schema = schema;
  76552. var FAILSAFE_SCHEMA = failsafe;
  76553. var JSON_SCHEMA = json;
  76554. var CORE_SCHEMA = core;
  76555. var DEFAULT_SCHEMA = _default;
  76556. var load = loader.load;
  76557. var loadAll = loader.loadAll;
  76558. var dump = dumper.dump;
  76559. var YAMLException = exception;
  76560. // Re-export all types in case user wants to create custom schema
  76561. var types = {
  76562. binary: binary,
  76563. float: float,
  76564. map: map,
  76565. null: _null,
  76566. pairs: pairs,
  76567. set: set,
  76568. timestamp: timestamp,
  76569. bool: bool,
  76570. int: int,
  76571. merge: merge,
  76572. omap: omap,
  76573. seq: seq,
  76574. str: str
  76575. };
  76576. // Removed functions from JS-YAML 3.0.x
  76577. var safeLoad = renamed('safeLoad', 'load');
  76578. var safeLoadAll = renamed('safeLoadAll', 'loadAll');
  76579. var safeDump = renamed('safeDump', 'dump');
  76580. var jsYaml = {
  76581. Type: Type,
  76582. Schema: Schema,
  76583. FAILSAFE_SCHEMA: FAILSAFE_SCHEMA,
  76584. JSON_SCHEMA: JSON_SCHEMA,
  76585. CORE_SCHEMA: CORE_SCHEMA,
  76586. DEFAULT_SCHEMA: DEFAULT_SCHEMA,
  76587. load: load,
  76588. loadAll: loadAll,
  76589. dump: dump,
  76590. YAMLException: YAMLException,
  76591. types: types,
  76592. safeLoad: safeLoad,
  76593. safeLoadAll: safeLoadAll,
  76594. safeDump: safeDump
  76595. };
  76596. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (jsYaml);
  76597. /***/ })
  76598. }]);