Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

dropzone-amd-module.js 333KB

il y a 2 ans
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441
  1. (function webpackUniversalModuleDefinition(root, factory) {
  2. if(typeof exports === 'object' && typeof module === 'object')
  3. module.exports = factory();
  4. else if(typeof define === 'function' && define.amd)
  5. define([], factory);
  6. else {
  7. var a = factory();
  8. for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
  9. }
  10. })(self, function() {
  11. return /******/ (function() { // webpackBootstrap
  12. /******/ var __webpack_modules__ = ({
  13. /***/ 3099:
  14. /***/ (function(module) {
  15. module.exports = function (it) {
  16. if (typeof it != 'function') {
  17. throw TypeError(String(it) + ' is not a function');
  18. } return it;
  19. };
  20. /***/ }),
  21. /***/ 6077:
  22. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  23. var isObject = __webpack_require__(111);
  24. module.exports = function (it) {
  25. if (!isObject(it) && it !== null) {
  26. throw TypeError("Can't set " + String(it) + ' as a prototype');
  27. } return it;
  28. };
  29. /***/ }),
  30. /***/ 1223:
  31. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32. var wellKnownSymbol = __webpack_require__(5112);
  33. var create = __webpack_require__(30);
  34. var definePropertyModule = __webpack_require__(3070);
  35. var UNSCOPABLES = wellKnownSymbol('unscopables');
  36. var ArrayPrototype = Array.prototype;
  37. // Array.prototype[@@unscopables]
  38. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  39. if (ArrayPrototype[UNSCOPABLES] == undefined) {
  40. definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
  41. configurable: true,
  42. value: create(null)
  43. });
  44. }
  45. // add a key to Array.prototype[@@unscopables]
  46. module.exports = function (key) {
  47. ArrayPrototype[UNSCOPABLES][key] = true;
  48. };
  49. /***/ }),
  50. /***/ 1530:
  51. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  52. "use strict";
  53. var charAt = __webpack_require__(8710).charAt;
  54. // `AdvanceStringIndex` abstract operation
  55. // https://tc39.es/ecma262/#sec-advancestringindex
  56. module.exports = function (S, index, unicode) {
  57. return index + (unicode ? charAt(S, index).length : 1);
  58. };
  59. /***/ }),
  60. /***/ 5787:
  61. /***/ (function(module) {
  62. module.exports = function (it, Constructor, name) {
  63. if (!(it instanceof Constructor)) {
  64. throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');
  65. } return it;
  66. };
  67. /***/ }),
  68. /***/ 9670:
  69. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  70. var isObject = __webpack_require__(111);
  71. module.exports = function (it) {
  72. if (!isObject(it)) {
  73. throw TypeError(String(it) + ' is not an object');
  74. } return it;
  75. };
  76. /***/ }),
  77. /***/ 4019:
  78. /***/ (function(module) {
  79. module.exports = typeof ArrayBuffer !== 'undefined' && typeof DataView !== 'undefined';
  80. /***/ }),
  81. /***/ 260:
  82. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  83. "use strict";
  84. var NATIVE_ARRAY_BUFFER = __webpack_require__(4019);
  85. var DESCRIPTORS = __webpack_require__(9781);
  86. var global = __webpack_require__(7854);
  87. var isObject = __webpack_require__(111);
  88. var has = __webpack_require__(6656);
  89. var classof = __webpack_require__(648);
  90. var createNonEnumerableProperty = __webpack_require__(8880);
  91. var redefine = __webpack_require__(1320);
  92. var defineProperty = __webpack_require__(3070).f;
  93. var getPrototypeOf = __webpack_require__(9518);
  94. var setPrototypeOf = __webpack_require__(7674);
  95. var wellKnownSymbol = __webpack_require__(5112);
  96. var uid = __webpack_require__(9711);
  97. var Int8Array = global.Int8Array;
  98. var Int8ArrayPrototype = Int8Array && Int8Array.prototype;
  99. var Uint8ClampedArray = global.Uint8ClampedArray;
  100. var Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;
  101. var TypedArray = Int8Array && getPrototypeOf(Int8Array);
  102. var TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf(Int8ArrayPrototype);
  103. var ObjectPrototype = Object.prototype;
  104. var isPrototypeOf = ObjectPrototype.isPrototypeOf;
  105. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  106. var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
  107. // Fixing native typed arrays in Opera Presto crashes the browser, see #595
  108. var NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(global.opera) !== 'Opera';
  109. var TYPED_ARRAY_TAG_REQIRED = false;
  110. var NAME;
  111. var TypedArrayConstructorsList = {
  112. Int8Array: 1,
  113. Uint8Array: 1,
  114. Uint8ClampedArray: 1,
  115. Int16Array: 2,
  116. Uint16Array: 2,
  117. Int32Array: 4,
  118. Uint32Array: 4,
  119. Float32Array: 4,
  120. Float64Array: 8
  121. };
  122. var BigIntArrayConstructorsList = {
  123. BigInt64Array: 8,
  124. BigUint64Array: 8
  125. };
  126. var isView = function isView(it) {
  127. if (!isObject(it)) return false;
  128. var klass = classof(it);
  129. return klass === 'DataView'
  130. || has(TypedArrayConstructorsList, klass)
  131. || has(BigIntArrayConstructorsList, klass);
  132. };
  133. var isTypedArray = function (it) {
  134. if (!isObject(it)) return false;
  135. var klass = classof(it);
  136. return has(TypedArrayConstructorsList, klass)
  137. || has(BigIntArrayConstructorsList, klass);
  138. };
  139. var aTypedArray = function (it) {
  140. if (isTypedArray(it)) return it;
  141. throw TypeError('Target is not a typed array');
  142. };
  143. var aTypedArrayConstructor = function (C) {
  144. if (setPrototypeOf) {
  145. if (isPrototypeOf.call(TypedArray, C)) return C;
  146. } else for (var ARRAY in TypedArrayConstructorsList) if (has(TypedArrayConstructorsList, NAME)) {
  147. var TypedArrayConstructor = global[ARRAY];
  148. if (TypedArrayConstructor && (C === TypedArrayConstructor || isPrototypeOf.call(TypedArrayConstructor, C))) {
  149. return C;
  150. }
  151. } throw TypeError('Target is not a typed array constructor');
  152. };
  153. var exportTypedArrayMethod = function (KEY, property, forced) {
  154. if (!DESCRIPTORS) return;
  155. if (forced) for (var ARRAY in TypedArrayConstructorsList) {
  156. var TypedArrayConstructor = global[ARRAY];
  157. if (TypedArrayConstructor && has(TypedArrayConstructor.prototype, KEY)) {
  158. delete TypedArrayConstructor.prototype[KEY];
  159. }
  160. }
  161. if (!TypedArrayPrototype[KEY] || forced) {
  162. redefine(TypedArrayPrototype, KEY, forced ? property
  163. : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property);
  164. }
  165. };
  166. var exportTypedArrayStaticMethod = function (KEY, property, forced) {
  167. var ARRAY, TypedArrayConstructor;
  168. if (!DESCRIPTORS) return;
  169. if (setPrototypeOf) {
  170. if (forced) for (ARRAY in TypedArrayConstructorsList) {
  171. TypedArrayConstructor = global[ARRAY];
  172. if (TypedArrayConstructor && has(TypedArrayConstructor, KEY)) {
  173. delete TypedArrayConstructor[KEY];
  174. }
  175. }
  176. if (!TypedArray[KEY] || forced) {
  177. // V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable
  178. try {
  179. return redefine(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && Int8Array[KEY] || property);
  180. } catch (error) { /* empty */ }
  181. } else return;
  182. }
  183. for (ARRAY in TypedArrayConstructorsList) {
  184. TypedArrayConstructor = global[ARRAY];
  185. if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {
  186. redefine(TypedArrayConstructor, KEY, property);
  187. }
  188. }
  189. };
  190. for (NAME in TypedArrayConstructorsList) {
  191. if (!global[NAME]) NATIVE_ARRAY_BUFFER_VIEWS = false;
  192. }
  193. // WebKit bug - typed arrays constructors prototype is Object.prototype
  194. if (!NATIVE_ARRAY_BUFFER_VIEWS || typeof TypedArray != 'function' || TypedArray === Function.prototype) {
  195. // eslint-disable-next-line no-shadow -- safe
  196. TypedArray = function TypedArray() {
  197. throw TypeError('Incorrect invocation');
  198. };
  199. if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
  200. if (global[NAME]) setPrototypeOf(global[NAME], TypedArray);
  201. }
  202. }
  203. if (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) {
  204. TypedArrayPrototype = TypedArray.prototype;
  205. if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
  206. if (global[NAME]) setPrototypeOf(global[NAME].prototype, TypedArrayPrototype);
  207. }
  208. }
  209. // WebKit bug - one more object in Uint8ClampedArray prototype chain
  210. if (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {
  211. setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);
  212. }
  213. if (DESCRIPTORS && !has(TypedArrayPrototype, TO_STRING_TAG)) {
  214. TYPED_ARRAY_TAG_REQIRED = true;
  215. defineProperty(TypedArrayPrototype, TO_STRING_TAG, { get: function () {
  216. return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;
  217. } });
  218. for (NAME in TypedArrayConstructorsList) if (global[NAME]) {
  219. createNonEnumerableProperty(global[NAME], TYPED_ARRAY_TAG, NAME);
  220. }
  221. }
  222. module.exports = {
  223. NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,
  224. TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQIRED && TYPED_ARRAY_TAG,
  225. aTypedArray: aTypedArray,
  226. aTypedArrayConstructor: aTypedArrayConstructor,
  227. exportTypedArrayMethod: exportTypedArrayMethod,
  228. exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,
  229. isView: isView,
  230. isTypedArray: isTypedArray,
  231. TypedArray: TypedArray,
  232. TypedArrayPrototype: TypedArrayPrototype
  233. };
  234. /***/ }),
  235. /***/ 3331:
  236. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  237. "use strict";
  238. var global = __webpack_require__(7854);
  239. var DESCRIPTORS = __webpack_require__(9781);
  240. var NATIVE_ARRAY_BUFFER = __webpack_require__(4019);
  241. var createNonEnumerableProperty = __webpack_require__(8880);
  242. var redefineAll = __webpack_require__(2248);
  243. var fails = __webpack_require__(7293);
  244. var anInstance = __webpack_require__(5787);
  245. var toInteger = __webpack_require__(9958);
  246. var toLength = __webpack_require__(7466);
  247. var toIndex = __webpack_require__(7067);
  248. var IEEE754 = __webpack_require__(1179);
  249. var getPrototypeOf = __webpack_require__(9518);
  250. var setPrototypeOf = __webpack_require__(7674);
  251. var getOwnPropertyNames = __webpack_require__(8006).f;
  252. var defineProperty = __webpack_require__(3070).f;
  253. var arrayFill = __webpack_require__(1285);
  254. var setToStringTag = __webpack_require__(8003);
  255. var InternalStateModule = __webpack_require__(9909);
  256. var getInternalState = InternalStateModule.get;
  257. var setInternalState = InternalStateModule.set;
  258. var ARRAY_BUFFER = 'ArrayBuffer';
  259. var DATA_VIEW = 'DataView';
  260. var PROTOTYPE = 'prototype';
  261. var WRONG_LENGTH = 'Wrong length';
  262. var WRONG_INDEX = 'Wrong index';
  263. var NativeArrayBuffer = global[ARRAY_BUFFER];
  264. var $ArrayBuffer = NativeArrayBuffer;
  265. var $DataView = global[DATA_VIEW];
  266. var $DataViewPrototype = $DataView && $DataView[PROTOTYPE];
  267. var ObjectPrototype = Object.prototype;
  268. var RangeError = global.RangeError;
  269. var packIEEE754 = IEEE754.pack;
  270. var unpackIEEE754 = IEEE754.unpack;
  271. var packInt8 = function (number) {
  272. return [number & 0xFF];
  273. };
  274. var packInt16 = function (number) {
  275. return [number & 0xFF, number >> 8 & 0xFF];
  276. };
  277. var packInt32 = function (number) {
  278. return [number & 0xFF, number >> 8 & 0xFF, number >> 16 & 0xFF, number >> 24 & 0xFF];
  279. };
  280. var unpackInt32 = function (buffer) {
  281. return buffer[3] << 24 | buffer[2] << 16 | buffer[1] << 8 | buffer[0];
  282. };
  283. var packFloat32 = function (number) {
  284. return packIEEE754(number, 23, 4);
  285. };
  286. var packFloat64 = function (number) {
  287. return packIEEE754(number, 52, 8);
  288. };
  289. var addGetter = function (Constructor, key) {
  290. defineProperty(Constructor[PROTOTYPE], key, { get: function () { return getInternalState(this)[key]; } });
  291. };
  292. var get = function (view, count, index, isLittleEndian) {
  293. var intIndex = toIndex(index);
  294. var store = getInternalState(view);
  295. if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);
  296. var bytes = getInternalState(store.buffer).bytes;
  297. var start = intIndex + store.byteOffset;
  298. var pack = bytes.slice(start, start + count);
  299. return isLittleEndian ? pack : pack.reverse();
  300. };
  301. var set = function (view, count, index, conversion, value, isLittleEndian) {
  302. var intIndex = toIndex(index);
  303. var store = getInternalState(view);
  304. if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);
  305. var bytes = getInternalState(store.buffer).bytes;
  306. var start = intIndex + store.byteOffset;
  307. var pack = conversion(+value);
  308. for (var i = 0; i < count; i++) bytes[start + i] = pack[isLittleEndian ? i : count - i - 1];
  309. };
  310. if (!NATIVE_ARRAY_BUFFER) {
  311. $ArrayBuffer = function ArrayBuffer(length) {
  312. anInstance(this, $ArrayBuffer, ARRAY_BUFFER);
  313. var byteLength = toIndex(length);
  314. setInternalState(this, {
  315. bytes: arrayFill.call(new Array(byteLength), 0),
  316. byteLength: byteLength
  317. });
  318. if (!DESCRIPTORS) this.byteLength = byteLength;
  319. };
  320. $DataView = function DataView(buffer, byteOffset, byteLength) {
  321. anInstance(this, $DataView, DATA_VIEW);
  322. anInstance(buffer, $ArrayBuffer, DATA_VIEW);
  323. var bufferLength = getInternalState(buffer).byteLength;
  324. var offset = toInteger(byteOffset);
  325. if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset');
  326. byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
  327. if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);
  328. setInternalState(this, {
  329. buffer: buffer,
  330. byteLength: byteLength,
  331. byteOffset: offset
  332. });
  333. if (!DESCRIPTORS) {
  334. this.buffer = buffer;
  335. this.byteLength = byteLength;
  336. this.byteOffset = offset;
  337. }
  338. };
  339. if (DESCRIPTORS) {
  340. addGetter($ArrayBuffer, 'byteLength');
  341. addGetter($DataView, 'buffer');
  342. addGetter($DataView, 'byteLength');
  343. addGetter($DataView, 'byteOffset');
  344. }
  345. redefineAll($DataView[PROTOTYPE], {
  346. getInt8: function getInt8(byteOffset) {
  347. return get(this, 1, byteOffset)[0] << 24 >> 24;
  348. },
  349. getUint8: function getUint8(byteOffset) {
  350. return get(this, 1, byteOffset)[0];
  351. },
  352. getInt16: function getInt16(byteOffset /* , littleEndian */) {
  353. var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);
  354. return (bytes[1] << 8 | bytes[0]) << 16 >> 16;
  355. },
  356. getUint16: function getUint16(byteOffset /* , littleEndian */) {
  357. var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);
  358. return bytes[1] << 8 | bytes[0];
  359. },
  360. getInt32: function getInt32(byteOffset /* , littleEndian */) {
  361. return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined));
  362. },
  363. getUint32: function getUint32(byteOffset /* , littleEndian */) {
  364. return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)) >>> 0;
  365. },
  366. getFloat32: function getFloat32(byteOffset /* , littleEndian */) {
  367. return unpackIEEE754(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 23);
  368. },
  369. getFloat64: function getFloat64(byteOffset /* , littleEndian */) {
  370. return unpackIEEE754(get(this, 8, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 52);
  371. },
  372. setInt8: function setInt8(byteOffset, value) {
  373. set(this, 1, byteOffset, packInt8, value);
  374. },
  375. setUint8: function setUint8(byteOffset, value) {
  376. set(this, 1, byteOffset, packInt8, value);
  377. },
  378. setInt16: function setInt16(byteOffset, value /* , littleEndian */) {
  379. set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);
  380. },
  381. setUint16: function setUint16(byteOffset, value /* , littleEndian */) {
  382. set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);
  383. },
  384. setInt32: function setInt32(byteOffset, value /* , littleEndian */) {
  385. set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);
  386. },
  387. setUint32: function setUint32(byteOffset, value /* , littleEndian */) {
  388. set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);
  389. },
  390. setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {
  391. set(this, 4, byteOffset, packFloat32, value, arguments.length > 2 ? arguments[2] : undefined);
  392. },
  393. setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {
  394. set(this, 8, byteOffset, packFloat64, value, arguments.length > 2 ? arguments[2] : undefined);
  395. }
  396. });
  397. } else {
  398. /* eslint-disable no-new -- required for testing */
  399. if (!fails(function () {
  400. NativeArrayBuffer(1);
  401. }) || !fails(function () {
  402. new NativeArrayBuffer(-1);
  403. }) || fails(function () {
  404. new NativeArrayBuffer();
  405. new NativeArrayBuffer(1.5);
  406. new NativeArrayBuffer(NaN);
  407. return NativeArrayBuffer.name != ARRAY_BUFFER;
  408. })) {
  409. /* eslint-enable no-new -- required for testing */
  410. $ArrayBuffer = function ArrayBuffer(length) {
  411. anInstance(this, $ArrayBuffer);
  412. return new NativeArrayBuffer(toIndex(length));
  413. };
  414. var ArrayBufferPrototype = $ArrayBuffer[PROTOTYPE] = NativeArrayBuffer[PROTOTYPE];
  415. for (var keys = getOwnPropertyNames(NativeArrayBuffer), j = 0, key; keys.length > j;) {
  416. if (!((key = keys[j++]) in $ArrayBuffer)) {
  417. createNonEnumerableProperty($ArrayBuffer, key, NativeArrayBuffer[key]);
  418. }
  419. }
  420. ArrayBufferPrototype.constructor = $ArrayBuffer;
  421. }
  422. // WebKit bug - the same parent prototype for typed arrays and data view
  423. if (setPrototypeOf && getPrototypeOf($DataViewPrototype) !== ObjectPrototype) {
  424. setPrototypeOf($DataViewPrototype, ObjectPrototype);
  425. }
  426. // iOS Safari 7.x bug
  427. var testView = new $DataView(new $ArrayBuffer(2));
  428. var nativeSetInt8 = $DataViewPrototype.setInt8;
  429. testView.setInt8(0, 2147483648);
  430. testView.setInt8(1, 2147483649);
  431. if (testView.getInt8(0) || !testView.getInt8(1)) redefineAll($DataViewPrototype, {
  432. setInt8: function setInt8(byteOffset, value) {
  433. nativeSetInt8.call(this, byteOffset, value << 24 >> 24);
  434. },
  435. setUint8: function setUint8(byteOffset, value) {
  436. nativeSetInt8.call(this, byteOffset, value << 24 >> 24);
  437. }
  438. }, { unsafe: true });
  439. }
  440. setToStringTag($ArrayBuffer, ARRAY_BUFFER);
  441. setToStringTag($DataView, DATA_VIEW);
  442. module.exports = {
  443. ArrayBuffer: $ArrayBuffer,
  444. DataView: $DataView
  445. };
  446. /***/ }),
  447. /***/ 1048:
  448. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  449. "use strict";
  450. var toObject = __webpack_require__(7908);
  451. var toAbsoluteIndex = __webpack_require__(1400);
  452. var toLength = __webpack_require__(7466);
  453. var min = Math.min;
  454. // `Array.prototype.copyWithin` method implementation
  455. // https://tc39.es/ecma262/#sec-array.prototype.copywithin
  456. module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {
  457. var O = toObject(this);
  458. var len = toLength(O.length);
  459. var to = toAbsoluteIndex(target, len);
  460. var from = toAbsoluteIndex(start, len);
  461. var end = arguments.length > 2 ? arguments[2] : undefined;
  462. var count = min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);
  463. var inc = 1;
  464. if (from < to && to < from + count) {
  465. inc = -1;
  466. from += count - 1;
  467. to += count - 1;
  468. }
  469. while (count-- > 0) {
  470. if (from in O) O[to] = O[from];
  471. else delete O[to];
  472. to += inc;
  473. from += inc;
  474. } return O;
  475. };
  476. /***/ }),
  477. /***/ 1285:
  478. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  479. "use strict";
  480. var toObject = __webpack_require__(7908);
  481. var toAbsoluteIndex = __webpack_require__(1400);
  482. var toLength = __webpack_require__(7466);
  483. // `Array.prototype.fill` method implementation
  484. // https://tc39.es/ecma262/#sec-array.prototype.fill
  485. module.exports = function fill(value /* , start = 0, end = @length */) {
  486. var O = toObject(this);
  487. var length = toLength(O.length);
  488. var argumentsLength = arguments.length;
  489. var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);
  490. var end = argumentsLength > 2 ? arguments[2] : undefined;
  491. var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
  492. while (endPos > index) O[index++] = value;
  493. return O;
  494. };
  495. /***/ }),
  496. /***/ 8533:
  497. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  498. "use strict";
  499. var $forEach = __webpack_require__(2092).forEach;
  500. var arrayMethodIsStrict = __webpack_require__(9341);
  501. var STRICT_METHOD = arrayMethodIsStrict('forEach');
  502. // `Array.prototype.forEach` method implementation
  503. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  504. module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
  505. return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  506. } : [].forEach;
  507. /***/ }),
  508. /***/ 8457:
  509. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  510. "use strict";
  511. var bind = __webpack_require__(9974);
  512. var toObject = __webpack_require__(7908);
  513. var callWithSafeIterationClosing = __webpack_require__(3411);
  514. var isArrayIteratorMethod = __webpack_require__(7659);
  515. var toLength = __webpack_require__(7466);
  516. var createProperty = __webpack_require__(6135);
  517. var getIteratorMethod = __webpack_require__(1246);
  518. // `Array.from` method implementation
  519. // https://tc39.es/ecma262/#sec-array.from
  520. module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
  521. var O = toObject(arrayLike);
  522. var C = typeof this == 'function' ? this : Array;
  523. var argumentsLength = arguments.length;
  524. var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
  525. var mapping = mapfn !== undefined;
  526. var iteratorMethod = getIteratorMethod(O);
  527. var index = 0;
  528. var length, result, step, iterator, next, value;
  529. if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);
  530. // if the target is not iterable or it's an array with the default iterator - use a simple case
  531. if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {
  532. iterator = iteratorMethod.call(O);
  533. next = iterator.next;
  534. result = new C();
  535. for (;!(step = next.call(iterator)).done; index++) {
  536. value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
  537. createProperty(result, index, value);
  538. }
  539. } else {
  540. length = toLength(O.length);
  541. result = new C(length);
  542. for (;length > index; index++) {
  543. value = mapping ? mapfn(O[index], index) : O[index];
  544. createProperty(result, index, value);
  545. }
  546. }
  547. result.length = index;
  548. return result;
  549. };
  550. /***/ }),
  551. /***/ 1318:
  552. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  553. var toIndexedObject = __webpack_require__(5656);
  554. var toLength = __webpack_require__(7466);
  555. var toAbsoluteIndex = __webpack_require__(1400);
  556. // `Array.prototype.{ indexOf, includes }` methods implementation
  557. var createMethod = function (IS_INCLUDES) {
  558. return function ($this, el, fromIndex) {
  559. var O = toIndexedObject($this);
  560. var length = toLength(O.length);
  561. var index = toAbsoluteIndex(fromIndex, length);
  562. var value;
  563. // Array#includes uses SameValueZero equality algorithm
  564. // eslint-disable-next-line no-self-compare -- NaN check
  565. if (IS_INCLUDES && el != el) while (length > index) {
  566. value = O[index++];
  567. // eslint-disable-next-line no-self-compare -- NaN check
  568. if (value != value) return true;
  569. // Array#indexOf ignores holes, Array#includes - not
  570. } else for (;length > index; index++) {
  571. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  572. } return !IS_INCLUDES && -1;
  573. };
  574. };
  575. module.exports = {
  576. // `Array.prototype.includes` method
  577. // https://tc39.es/ecma262/#sec-array.prototype.includes
  578. includes: createMethod(true),
  579. // `Array.prototype.indexOf` method
  580. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  581. indexOf: createMethod(false)
  582. };
  583. /***/ }),
  584. /***/ 2092:
  585. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  586. var bind = __webpack_require__(9974);
  587. var IndexedObject = __webpack_require__(8361);
  588. var toObject = __webpack_require__(7908);
  589. var toLength = __webpack_require__(7466);
  590. var arraySpeciesCreate = __webpack_require__(5417);
  591. var push = [].push;
  592. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation
  593. var createMethod = function (TYPE) {
  594. var IS_MAP = TYPE == 1;
  595. var IS_FILTER = TYPE == 2;
  596. var IS_SOME = TYPE == 3;
  597. var IS_EVERY = TYPE == 4;
  598. var IS_FIND_INDEX = TYPE == 6;
  599. var IS_FILTER_OUT = TYPE == 7;
  600. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  601. return function ($this, callbackfn, that, specificCreate) {
  602. var O = toObject($this);
  603. var self = IndexedObject(O);
  604. var boundFunction = bind(callbackfn, that, 3);
  605. var length = toLength(self.length);
  606. var index = 0;
  607. var create = specificCreate || arraySpeciesCreate;
  608. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;
  609. var value, result;
  610. for (;length > index; index++) if (NO_HOLES || index in self) {
  611. value = self[index];
  612. result = boundFunction(value, index, O);
  613. if (TYPE) {
  614. if (IS_MAP) target[index] = result; // map
  615. else if (result) switch (TYPE) {
  616. case 3: return true; // some
  617. case 5: return value; // find
  618. case 6: return index; // findIndex
  619. case 2: push.call(target, value); // filter
  620. } else switch (TYPE) {
  621. case 4: return false; // every
  622. case 7: push.call(target, value); // filterOut
  623. }
  624. }
  625. }
  626. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  627. };
  628. };
  629. module.exports = {
  630. // `Array.prototype.forEach` method
  631. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  632. forEach: createMethod(0),
  633. // `Array.prototype.map` method
  634. // https://tc39.es/ecma262/#sec-array.prototype.map
  635. map: createMethod(1),
  636. // `Array.prototype.filter` method
  637. // https://tc39.es/ecma262/#sec-array.prototype.filter
  638. filter: createMethod(2),
  639. // `Array.prototype.some` method
  640. // https://tc39.es/ecma262/#sec-array.prototype.some
  641. some: createMethod(3),
  642. // `Array.prototype.every` method
  643. // https://tc39.es/ecma262/#sec-array.prototype.every
  644. every: createMethod(4),
  645. // `Array.prototype.find` method
  646. // https://tc39.es/ecma262/#sec-array.prototype.find
  647. find: createMethod(5),
  648. // `Array.prototype.findIndex` method
  649. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  650. findIndex: createMethod(6),
  651. // `Array.prototype.filterOut` method
  652. // https://github.com/tc39/proposal-array-filtering
  653. filterOut: createMethod(7)
  654. };
  655. /***/ }),
  656. /***/ 6583:
  657. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  658. "use strict";
  659. var toIndexedObject = __webpack_require__(5656);
  660. var toInteger = __webpack_require__(9958);
  661. var toLength = __webpack_require__(7466);
  662. var arrayMethodIsStrict = __webpack_require__(9341);
  663. var min = Math.min;
  664. var nativeLastIndexOf = [].lastIndexOf;
  665. var NEGATIVE_ZERO = !!nativeLastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;
  666. var STRICT_METHOD = arrayMethodIsStrict('lastIndexOf');
  667. var FORCED = NEGATIVE_ZERO || !STRICT_METHOD;
  668. // `Array.prototype.lastIndexOf` method implementation
  669. // https://tc39.es/ecma262/#sec-array.prototype.lastindexof
  670. module.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
  671. // convert -0 to +0
  672. if (NEGATIVE_ZERO) return nativeLastIndexOf.apply(this, arguments) || 0;
  673. var O = toIndexedObject(this);
  674. var length = toLength(O.length);
  675. var index = length - 1;
  676. if (arguments.length > 1) index = min(index, toInteger(arguments[1]));
  677. if (index < 0) index = length + index;
  678. for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;
  679. return -1;
  680. } : nativeLastIndexOf;
  681. /***/ }),
  682. /***/ 1194:
  683. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  684. var fails = __webpack_require__(7293);
  685. var wellKnownSymbol = __webpack_require__(5112);
  686. var V8_VERSION = __webpack_require__(7392);
  687. var SPECIES = wellKnownSymbol('species');
  688. module.exports = function (METHOD_NAME) {
  689. // We can't use this feature detection in V8 since it causes
  690. // deoptimization and serious performance degradation
  691. // https://github.com/zloirock/core-js/issues/677
  692. return V8_VERSION >= 51 || !fails(function () {
  693. var array = [];
  694. var constructor = array.constructor = {};
  695. constructor[SPECIES] = function () {
  696. return { foo: 1 };
  697. };
  698. return array[METHOD_NAME](Boolean).foo !== 1;
  699. });
  700. };
  701. /***/ }),
  702. /***/ 9341:
  703. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  704. "use strict";
  705. var fails = __webpack_require__(7293);
  706. module.exports = function (METHOD_NAME, argument) {
  707. var method = [][METHOD_NAME];
  708. return !!method && fails(function () {
  709. // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing
  710. method.call(null, argument || function () { throw 1; }, 1);
  711. });
  712. };
  713. /***/ }),
  714. /***/ 3671:
  715. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  716. var aFunction = __webpack_require__(3099);
  717. var toObject = __webpack_require__(7908);
  718. var IndexedObject = __webpack_require__(8361);
  719. var toLength = __webpack_require__(7466);
  720. // `Array.prototype.{ reduce, reduceRight }` methods implementation
  721. var createMethod = function (IS_RIGHT) {
  722. return function (that, callbackfn, argumentsLength, memo) {
  723. aFunction(callbackfn);
  724. var O = toObject(that);
  725. var self = IndexedObject(O);
  726. var length = toLength(O.length);
  727. var index = IS_RIGHT ? length - 1 : 0;
  728. var i = IS_RIGHT ? -1 : 1;
  729. if (argumentsLength < 2) while (true) {
  730. if (index in self) {
  731. memo = self[index];
  732. index += i;
  733. break;
  734. }
  735. index += i;
  736. if (IS_RIGHT ? index < 0 : length <= index) {
  737. throw TypeError('Reduce of empty array with no initial value');
  738. }
  739. }
  740. for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
  741. memo = callbackfn(memo, self[index], index, O);
  742. }
  743. return memo;
  744. };
  745. };
  746. module.exports = {
  747. // `Array.prototype.reduce` method
  748. // https://tc39.es/ecma262/#sec-array.prototype.reduce
  749. left: createMethod(false),
  750. // `Array.prototype.reduceRight` method
  751. // https://tc39.es/ecma262/#sec-array.prototype.reduceright
  752. right: createMethod(true)
  753. };
  754. /***/ }),
  755. /***/ 5417:
  756. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  757. var isObject = __webpack_require__(111);
  758. var isArray = __webpack_require__(3157);
  759. var wellKnownSymbol = __webpack_require__(5112);
  760. var SPECIES = wellKnownSymbol('species');
  761. // `ArraySpeciesCreate` abstract operation
  762. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  763. module.exports = function (originalArray, length) {
  764. var C;
  765. if (isArray(originalArray)) {
  766. C = originalArray.constructor;
  767. // cross-realm fallback
  768. if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
  769. else if (isObject(C)) {
  770. C = C[SPECIES];
  771. if (C === null) C = undefined;
  772. }
  773. } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
  774. };
  775. /***/ }),
  776. /***/ 3411:
  777. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  778. var anObject = __webpack_require__(9670);
  779. var iteratorClose = __webpack_require__(9212);
  780. // call something on iterator step with safe closing on error
  781. module.exports = function (iterator, fn, value, ENTRIES) {
  782. try {
  783. return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
  784. // 7.4.6 IteratorClose(iterator, completion)
  785. } catch (error) {
  786. iteratorClose(iterator);
  787. throw error;
  788. }
  789. };
  790. /***/ }),
  791. /***/ 7072:
  792. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  793. var wellKnownSymbol = __webpack_require__(5112);
  794. var ITERATOR = wellKnownSymbol('iterator');
  795. var SAFE_CLOSING = false;
  796. try {
  797. var called = 0;
  798. var iteratorWithReturn = {
  799. next: function () {
  800. return { done: !!called++ };
  801. },
  802. 'return': function () {
  803. SAFE_CLOSING = true;
  804. }
  805. };
  806. iteratorWithReturn[ITERATOR] = function () {
  807. return this;
  808. };
  809. // eslint-disable-next-line no-throw-literal -- required for testing
  810. Array.from(iteratorWithReturn, function () { throw 2; });
  811. } catch (error) { /* empty */ }
  812. module.exports = function (exec, SKIP_CLOSING) {
  813. if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
  814. var ITERATION_SUPPORT = false;
  815. try {
  816. var object = {};
  817. object[ITERATOR] = function () {
  818. return {
  819. next: function () {
  820. return { done: ITERATION_SUPPORT = true };
  821. }
  822. };
  823. };
  824. exec(object);
  825. } catch (error) { /* empty */ }
  826. return ITERATION_SUPPORT;
  827. };
  828. /***/ }),
  829. /***/ 4326:
  830. /***/ (function(module) {
  831. var toString = {}.toString;
  832. module.exports = function (it) {
  833. return toString.call(it).slice(8, -1);
  834. };
  835. /***/ }),
  836. /***/ 648:
  837. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  838. var TO_STRING_TAG_SUPPORT = __webpack_require__(1694);
  839. var classofRaw = __webpack_require__(4326);
  840. var wellKnownSymbol = __webpack_require__(5112);
  841. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  842. // ES3 wrong here
  843. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
  844. // fallback for IE11 Script Access Denied error
  845. var tryGet = function (it, key) {
  846. try {
  847. return it[key];
  848. } catch (error) { /* empty */ }
  849. };
  850. // getting tag from ES6+ `Object.prototype.toString`
  851. module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
  852. var O, tag, result;
  853. return it === undefined ? 'Undefined' : it === null ? 'Null'
  854. // @@toStringTag case
  855. : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag
  856. // builtinTag case
  857. : CORRECT_ARGUMENTS ? classofRaw(O)
  858. // ES3 arguments fallback
  859. : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
  860. };
  861. /***/ }),
  862. /***/ 9920:
  863. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  864. var has = __webpack_require__(6656);
  865. var ownKeys = __webpack_require__(3887);
  866. var getOwnPropertyDescriptorModule = __webpack_require__(1236);
  867. var definePropertyModule = __webpack_require__(3070);
  868. module.exports = function (target, source) {
  869. var keys = ownKeys(source);
  870. var defineProperty = definePropertyModule.f;
  871. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  872. for (var i = 0; i < keys.length; i++) {
  873. var key = keys[i];
  874. if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  875. }
  876. };
  877. /***/ }),
  878. /***/ 8544:
  879. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  880. var fails = __webpack_require__(7293);
  881. module.exports = !fails(function () {
  882. function F() { /* empty */ }
  883. F.prototype.constructor = null;
  884. return Object.getPrototypeOf(new F()) !== F.prototype;
  885. });
  886. /***/ }),
  887. /***/ 4994:
  888. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  889. "use strict";
  890. var IteratorPrototype = __webpack_require__(3383).IteratorPrototype;
  891. var create = __webpack_require__(30);
  892. var createPropertyDescriptor = __webpack_require__(9114);
  893. var setToStringTag = __webpack_require__(8003);
  894. var Iterators = __webpack_require__(7497);
  895. var returnThis = function () { return this; };
  896. module.exports = function (IteratorConstructor, NAME, next) {
  897. var TO_STRING_TAG = NAME + ' Iterator';
  898. IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });
  899. setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
  900. Iterators[TO_STRING_TAG] = returnThis;
  901. return IteratorConstructor;
  902. };
  903. /***/ }),
  904. /***/ 8880:
  905. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  906. var DESCRIPTORS = __webpack_require__(9781);
  907. var definePropertyModule = __webpack_require__(3070);
  908. var createPropertyDescriptor = __webpack_require__(9114);
  909. module.exports = DESCRIPTORS ? function (object, key, value) {
  910. return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
  911. } : function (object, key, value) {
  912. object[key] = value;
  913. return object;
  914. };
  915. /***/ }),
  916. /***/ 9114:
  917. /***/ (function(module) {
  918. module.exports = function (bitmap, value) {
  919. return {
  920. enumerable: !(bitmap & 1),
  921. configurable: !(bitmap & 2),
  922. writable: !(bitmap & 4),
  923. value: value
  924. };
  925. };
  926. /***/ }),
  927. /***/ 6135:
  928. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  929. "use strict";
  930. var toPrimitive = __webpack_require__(7593);
  931. var definePropertyModule = __webpack_require__(3070);
  932. var createPropertyDescriptor = __webpack_require__(9114);
  933. module.exports = function (object, key, value) {
  934. var propertyKey = toPrimitive(key);
  935. if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
  936. else object[propertyKey] = value;
  937. };
  938. /***/ }),
  939. /***/ 654:
  940. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  941. "use strict";
  942. var $ = __webpack_require__(2109);
  943. var createIteratorConstructor = __webpack_require__(4994);
  944. var getPrototypeOf = __webpack_require__(9518);
  945. var setPrototypeOf = __webpack_require__(7674);
  946. var setToStringTag = __webpack_require__(8003);
  947. var createNonEnumerableProperty = __webpack_require__(8880);
  948. var redefine = __webpack_require__(1320);
  949. var wellKnownSymbol = __webpack_require__(5112);
  950. var IS_PURE = __webpack_require__(1913);
  951. var Iterators = __webpack_require__(7497);
  952. var IteratorsCore = __webpack_require__(3383);
  953. var IteratorPrototype = IteratorsCore.IteratorPrototype;
  954. var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
  955. var ITERATOR = wellKnownSymbol('iterator');
  956. var KEYS = 'keys';
  957. var VALUES = 'values';
  958. var ENTRIES = 'entries';
  959. var returnThis = function () { return this; };
  960. module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
  961. createIteratorConstructor(IteratorConstructor, NAME, next);
  962. var getIterationMethod = function (KIND) {
  963. if (KIND === DEFAULT && defaultIterator) return defaultIterator;
  964. if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
  965. switch (KIND) {
  966. case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
  967. case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
  968. case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
  969. } return function () { return new IteratorConstructor(this); };
  970. };
  971. var TO_STRING_TAG = NAME + ' Iterator';
  972. var INCORRECT_VALUES_NAME = false;
  973. var IterablePrototype = Iterable.prototype;
  974. var nativeIterator = IterablePrototype[ITERATOR]
  975. || IterablePrototype['@@iterator']
  976. || DEFAULT && IterablePrototype[DEFAULT];
  977. var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
  978. var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
  979. var CurrentIteratorPrototype, methods, KEY;
  980. // fix native
  981. if (anyNativeIterator) {
  982. CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
  983. if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
  984. if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
  985. if (setPrototypeOf) {
  986. setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
  987. } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {
  988. createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);
  989. }
  990. }
  991. // Set @@toStringTag to native iterators
  992. setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
  993. if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;
  994. }
  995. }
  996. // fix Array#{values, @@iterator}.name in V8 / FF
  997. if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
  998. INCORRECT_VALUES_NAME = true;
  999. defaultIterator = function values() { return nativeIterator.call(this); };
  1000. }
  1001. // define iterator
  1002. if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {
  1003. createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);
  1004. }
  1005. Iterators[NAME] = defaultIterator;
  1006. // export additional methods
  1007. if (DEFAULT) {
  1008. methods = {
  1009. values: getIterationMethod(VALUES),
  1010. keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
  1011. entries: getIterationMethod(ENTRIES)
  1012. };
  1013. if (FORCED) for (KEY in methods) {
  1014. if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
  1015. redefine(IterablePrototype, KEY, methods[KEY]);
  1016. }
  1017. } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
  1018. }
  1019. return methods;
  1020. };
  1021. /***/ }),
  1022. /***/ 9781:
  1023. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1024. var fails = __webpack_require__(7293);
  1025. // Detect IE8's incomplete defineProperty implementation
  1026. module.exports = !fails(function () {
  1027. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
  1028. });
  1029. /***/ }),
  1030. /***/ 317:
  1031. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1032. var global = __webpack_require__(7854);
  1033. var isObject = __webpack_require__(111);
  1034. var document = global.document;
  1035. // typeof document.createElement is 'object' in old IE
  1036. var EXISTS = isObject(document) && isObject(document.createElement);
  1037. module.exports = function (it) {
  1038. return EXISTS ? document.createElement(it) : {};
  1039. };
  1040. /***/ }),
  1041. /***/ 8324:
  1042. /***/ (function(module) {
  1043. // iterable DOM collections
  1044. // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
  1045. module.exports = {
  1046. CSSRuleList: 0,
  1047. CSSStyleDeclaration: 0,
  1048. CSSValueList: 0,
  1049. ClientRectList: 0,
  1050. DOMRectList: 0,
  1051. DOMStringList: 0,
  1052. DOMTokenList: 1,
  1053. DataTransferItemList: 0,
  1054. FileList: 0,
  1055. HTMLAllCollection: 0,
  1056. HTMLCollection: 0,
  1057. HTMLFormElement: 0,
  1058. HTMLSelectElement: 0,
  1059. MediaList: 0,
  1060. MimeTypeArray: 0,
  1061. NamedNodeMap: 0,
  1062. NodeList: 1,
  1063. PaintRequestList: 0,
  1064. Plugin: 0,
  1065. PluginArray: 0,
  1066. SVGLengthList: 0,
  1067. SVGNumberList: 0,
  1068. SVGPathSegList: 0,
  1069. SVGPointList: 0,
  1070. SVGStringList: 0,
  1071. SVGTransformList: 0,
  1072. SourceBufferList: 0,
  1073. StyleSheetList: 0,
  1074. TextTrackCueList: 0,
  1075. TextTrackList: 0,
  1076. TouchList: 0
  1077. };
  1078. /***/ }),
  1079. /***/ 8113:
  1080. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1081. var getBuiltIn = __webpack_require__(5005);
  1082. module.exports = getBuiltIn('navigator', 'userAgent') || '';
  1083. /***/ }),
  1084. /***/ 7392:
  1085. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1086. var global = __webpack_require__(7854);
  1087. var userAgent = __webpack_require__(8113);
  1088. var process = global.process;
  1089. var versions = process && process.versions;
  1090. var v8 = versions && versions.v8;
  1091. var match, version;
  1092. if (v8) {
  1093. match = v8.split('.');
  1094. version = match[0] + match[1];
  1095. } else if (userAgent) {
  1096. match = userAgent.match(/Edge\/(\d+)/);
  1097. if (!match || match[1] >= 74) {
  1098. match = userAgent.match(/Chrome\/(\d+)/);
  1099. if (match) version = match[1];
  1100. }
  1101. }
  1102. module.exports = version && +version;
  1103. /***/ }),
  1104. /***/ 748:
  1105. /***/ (function(module) {
  1106. // IE8- don't enum bug keys
  1107. module.exports = [
  1108. 'constructor',
  1109. 'hasOwnProperty',
  1110. 'isPrototypeOf',
  1111. 'propertyIsEnumerable',
  1112. 'toLocaleString',
  1113. 'toString',
  1114. 'valueOf'
  1115. ];
  1116. /***/ }),
  1117. /***/ 2109:
  1118. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1119. var global = __webpack_require__(7854);
  1120. var getOwnPropertyDescriptor = __webpack_require__(1236).f;
  1121. var createNonEnumerableProperty = __webpack_require__(8880);
  1122. var redefine = __webpack_require__(1320);
  1123. var setGlobal = __webpack_require__(3505);
  1124. var copyConstructorProperties = __webpack_require__(9920);
  1125. var isForced = __webpack_require__(4705);
  1126. /*
  1127. options.target - name of the target object
  1128. options.global - target is the global object
  1129. options.stat - export as static methods of target
  1130. options.proto - export as prototype methods of target
  1131. options.real - real prototype method for the `pure` version
  1132. options.forced - export even if the native feature is available
  1133. options.bind - bind methods to the target, required for the `pure` version
  1134. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  1135. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  1136. options.sham - add a flag to not completely full polyfills
  1137. options.enumerable - export as enumerable property
  1138. options.noTargetGet - prevent calling a getter on target
  1139. */
  1140. module.exports = function (options, source) {
  1141. var TARGET = options.target;
  1142. var GLOBAL = options.global;
  1143. var STATIC = options.stat;
  1144. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  1145. if (GLOBAL) {
  1146. target = global;
  1147. } else if (STATIC) {
  1148. target = global[TARGET] || setGlobal(TARGET, {});
  1149. } else {
  1150. target = (global[TARGET] || {}).prototype;
  1151. }
  1152. if (target) for (key in source) {
  1153. sourceProperty = source[key];
  1154. if (options.noTargetGet) {
  1155. descriptor = getOwnPropertyDescriptor(target, key);
  1156. targetProperty = descriptor && descriptor.value;
  1157. } else targetProperty = target[key];
  1158. FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  1159. // contained in target
  1160. if (!FORCED && targetProperty !== undefined) {
  1161. if (typeof sourceProperty === typeof targetProperty) continue;
  1162. copyConstructorProperties(sourceProperty, targetProperty);
  1163. }
  1164. // add a flag to not completely full polyfills
  1165. if (options.sham || (targetProperty && targetProperty.sham)) {
  1166. createNonEnumerableProperty(sourceProperty, 'sham', true);
  1167. }
  1168. // extend global
  1169. redefine(target, key, sourceProperty, options);
  1170. }
  1171. };
  1172. /***/ }),
  1173. /***/ 7293:
  1174. /***/ (function(module) {
  1175. module.exports = function (exec) {
  1176. try {
  1177. return !!exec();
  1178. } catch (error) {
  1179. return true;
  1180. }
  1181. };
  1182. /***/ }),
  1183. /***/ 7007:
  1184. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1185. "use strict";
  1186. // TODO: Remove from `core-js@4` since it's moved to entry points
  1187. __webpack_require__(4916);
  1188. var redefine = __webpack_require__(1320);
  1189. var fails = __webpack_require__(7293);
  1190. var wellKnownSymbol = __webpack_require__(5112);
  1191. var regexpExec = __webpack_require__(2261);
  1192. var createNonEnumerableProperty = __webpack_require__(8880);
  1193. var SPECIES = wellKnownSymbol('species');
  1194. var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
  1195. // #replace needs built-in support for named groups.
  1196. // #match works fine because it just return the exec results, even if it has
  1197. // a "grops" property.
  1198. var re = /./;
  1199. re.exec = function () {
  1200. var result = [];
  1201. result.groups = { a: '7' };
  1202. return result;
  1203. };
  1204. return ''.replace(re, '$<a>') !== '7';
  1205. });
  1206. // IE <= 11 replaces $0 with the whole match, as if it was $&
  1207. // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
  1208. var REPLACE_KEEPS_$0 = (function () {
  1209. return 'a'.replace(/./, '$0') === '$0';
  1210. })();
  1211. var REPLACE = wellKnownSymbol('replace');
  1212. // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
  1213. var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
  1214. if (/./[REPLACE]) {
  1215. return /./[REPLACE]('a', '$0') === '';
  1216. }
  1217. return false;
  1218. })();
  1219. // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
  1220. // Weex JS has frozen built-in prototypes, so use try / catch wrapper
  1221. var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
  1222. // eslint-disable-next-line regexp/no-empty-group -- required for testing
  1223. var re = /(?:)/;
  1224. var originalExec = re.exec;
  1225. re.exec = function () { return originalExec.apply(this, arguments); };
  1226. var result = 'ab'.split(re);
  1227. return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
  1228. });
  1229. module.exports = function (KEY, length, exec, sham) {
  1230. var SYMBOL = wellKnownSymbol(KEY);
  1231. var DELEGATES_TO_SYMBOL = !fails(function () {
  1232. // String methods call symbol-named RegEp methods
  1233. var O = {};
  1234. O[SYMBOL] = function () { return 7; };
  1235. return ''[KEY](O) != 7;
  1236. });
  1237. var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
  1238. // Symbol-named RegExp methods call .exec
  1239. var execCalled = false;
  1240. var re = /a/;
  1241. if (KEY === 'split') {
  1242. // We can't use real regex here since it causes deoptimization
  1243. // and serious performance degradation in V8
  1244. // https://github.com/zloirock/core-js/issues/306
  1245. re = {};
  1246. // RegExp[@@split] doesn't call the regex's exec method, but first creates
  1247. // a new one. We need to return the patched regex when creating the new one.
  1248. re.constructor = {};
  1249. re.constructor[SPECIES] = function () { return re; };
  1250. re.flags = '';
  1251. re[SYMBOL] = /./[SYMBOL];
  1252. }
  1253. re.exec = function () { execCalled = true; return null; };
  1254. re[SYMBOL]('');
  1255. return !execCalled;
  1256. });
  1257. if (
  1258. !DELEGATES_TO_SYMBOL ||
  1259. !DELEGATES_TO_EXEC ||
  1260. (KEY === 'replace' && !(
  1261. REPLACE_SUPPORTS_NAMED_GROUPS &&
  1262. REPLACE_KEEPS_$0 &&
  1263. !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
  1264. )) ||
  1265. (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
  1266. ) {
  1267. var nativeRegExpMethod = /./[SYMBOL];
  1268. var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
  1269. if (regexp.exec === regexpExec) {
  1270. if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
  1271. // The native String method already delegates to @@method (this
  1272. // polyfilled function), leasing to infinite recursion.
  1273. // We avoid it by directly calling the native @@method method.
  1274. return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
  1275. }
  1276. return { done: true, value: nativeMethod.call(str, regexp, arg2) };
  1277. }
  1278. return { done: false };
  1279. }, {
  1280. REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,
  1281. REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
  1282. });
  1283. var stringMethod = methods[0];
  1284. var regexMethod = methods[1];
  1285. redefine(String.prototype, KEY, stringMethod);
  1286. redefine(RegExp.prototype, SYMBOL, length == 2
  1287. // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
  1288. // 21.2.5.11 RegExp.prototype[@@split](string, limit)
  1289. ? function (string, arg) { return regexMethod.call(string, this, arg); }
  1290. // 21.2.5.6 RegExp.prototype[@@match](string)
  1291. // 21.2.5.9 RegExp.prototype[@@search](string)
  1292. : function (string) { return regexMethod.call(string, this); }
  1293. );
  1294. }
  1295. if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);
  1296. };
  1297. /***/ }),
  1298. /***/ 9974:
  1299. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1300. var aFunction = __webpack_require__(3099);
  1301. // optional / simple context binding
  1302. module.exports = function (fn, that, length) {
  1303. aFunction(fn);
  1304. if (that === undefined) return fn;
  1305. switch (length) {
  1306. case 0: return function () {
  1307. return fn.call(that);
  1308. };
  1309. case 1: return function (a) {
  1310. return fn.call(that, a);
  1311. };
  1312. case 2: return function (a, b) {
  1313. return fn.call(that, a, b);
  1314. };
  1315. case 3: return function (a, b, c) {
  1316. return fn.call(that, a, b, c);
  1317. };
  1318. }
  1319. return function (/* ...args */) {
  1320. return fn.apply(that, arguments);
  1321. };
  1322. };
  1323. /***/ }),
  1324. /***/ 5005:
  1325. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1326. var path = __webpack_require__(857);
  1327. var global = __webpack_require__(7854);
  1328. var aFunction = function (variable) {
  1329. return typeof variable == 'function' ? variable : undefined;
  1330. };
  1331. module.exports = function (namespace, method) {
  1332. return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])
  1333. : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];
  1334. };
  1335. /***/ }),
  1336. /***/ 1246:
  1337. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1338. var classof = __webpack_require__(648);
  1339. var Iterators = __webpack_require__(7497);
  1340. var wellKnownSymbol = __webpack_require__(5112);
  1341. var ITERATOR = wellKnownSymbol('iterator');
  1342. module.exports = function (it) {
  1343. if (it != undefined) return it[ITERATOR]
  1344. || it['@@iterator']
  1345. || Iterators[classof(it)];
  1346. };
  1347. /***/ }),
  1348. /***/ 8554:
  1349. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1350. var anObject = __webpack_require__(9670);
  1351. var getIteratorMethod = __webpack_require__(1246);
  1352. module.exports = function (it) {
  1353. var iteratorMethod = getIteratorMethod(it);
  1354. if (typeof iteratorMethod != 'function') {
  1355. throw TypeError(String(it) + ' is not iterable');
  1356. } return anObject(iteratorMethod.call(it));
  1357. };
  1358. /***/ }),
  1359. /***/ 647:
  1360. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1361. var toObject = __webpack_require__(7908);
  1362. var floor = Math.floor;
  1363. var replace = ''.replace;
  1364. var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g;
  1365. var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g;
  1366. // https://tc39.es/ecma262/#sec-getsubstitution
  1367. module.exports = function (matched, str, position, captures, namedCaptures, replacement) {
  1368. var tailPos = position + matched.length;
  1369. var m = captures.length;
  1370. var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
  1371. if (namedCaptures !== undefined) {
  1372. namedCaptures = toObject(namedCaptures);
  1373. symbols = SUBSTITUTION_SYMBOLS;
  1374. }
  1375. return replace.call(replacement, symbols, function (match, ch) {
  1376. var capture;
  1377. switch (ch.charAt(0)) {
  1378. case '$': return '$';
  1379. case '&': return matched;
  1380. case '`': return str.slice(0, position);
  1381. case "'": return str.slice(tailPos);
  1382. case '<':
  1383. capture = namedCaptures[ch.slice(1, -1)];
  1384. break;
  1385. default: // \d\d?
  1386. var n = +ch;
  1387. if (n === 0) return match;
  1388. if (n > m) {
  1389. var f = floor(n / 10);
  1390. if (f === 0) return match;
  1391. if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
  1392. return match;
  1393. }
  1394. capture = captures[n - 1];
  1395. }
  1396. return capture === undefined ? '' : capture;
  1397. });
  1398. };
  1399. /***/ }),
  1400. /***/ 7854:
  1401. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1402. var check = function (it) {
  1403. return it && it.Math == Math && it;
  1404. };
  1405. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  1406. module.exports =
  1407. /* global globalThis -- safe */
  1408. check(typeof globalThis == 'object' && globalThis) ||
  1409. check(typeof window == 'object' && window) ||
  1410. check(typeof self == 'object' && self) ||
  1411. check(typeof __webpack_require__.g == 'object' && __webpack_require__.g) ||
  1412. // eslint-disable-next-line no-new-func -- fallback
  1413. (function () { return this; })() || Function('return this')();
  1414. /***/ }),
  1415. /***/ 6656:
  1416. /***/ (function(module) {
  1417. var hasOwnProperty = {}.hasOwnProperty;
  1418. module.exports = function (it, key) {
  1419. return hasOwnProperty.call(it, key);
  1420. };
  1421. /***/ }),
  1422. /***/ 3501:
  1423. /***/ (function(module) {
  1424. module.exports = {};
  1425. /***/ }),
  1426. /***/ 490:
  1427. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1428. var getBuiltIn = __webpack_require__(5005);
  1429. module.exports = getBuiltIn('document', 'documentElement');
  1430. /***/ }),
  1431. /***/ 4664:
  1432. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1433. var DESCRIPTORS = __webpack_require__(9781);
  1434. var fails = __webpack_require__(7293);
  1435. var createElement = __webpack_require__(317);
  1436. // Thank's IE8 for his funny defineProperty
  1437. module.exports = !DESCRIPTORS && !fails(function () {
  1438. return Object.defineProperty(createElement('div'), 'a', {
  1439. get: function () { return 7; }
  1440. }).a != 7;
  1441. });
  1442. /***/ }),
  1443. /***/ 1179:
  1444. /***/ (function(module) {
  1445. // IEEE754 conversions based on https://github.com/feross/ieee754
  1446. var abs = Math.abs;
  1447. var pow = Math.pow;
  1448. var floor = Math.floor;
  1449. var log = Math.log;
  1450. var LN2 = Math.LN2;
  1451. var pack = function (number, mantissaLength, bytes) {
  1452. var buffer = new Array(bytes);
  1453. var exponentLength = bytes * 8 - mantissaLength - 1;
  1454. var eMax = (1 << exponentLength) - 1;
  1455. var eBias = eMax >> 1;
  1456. var rt = mantissaLength === 23 ? pow(2, -24) - pow(2, -77) : 0;
  1457. var sign = number < 0 || number === 0 && 1 / number < 0 ? 1 : 0;
  1458. var index = 0;
  1459. var exponent, mantissa, c;
  1460. number = abs(number);
  1461. // eslint-disable-next-line no-self-compare -- NaN check
  1462. if (number != number || number === Infinity) {
  1463. // eslint-disable-next-line no-self-compare -- NaN check
  1464. mantissa = number != number ? 1 : 0;
  1465. exponent = eMax;
  1466. } else {
  1467. exponent = floor(log(number) / LN2);
  1468. if (number * (c = pow(2, -exponent)) < 1) {
  1469. exponent--;
  1470. c *= 2;
  1471. }
  1472. if (exponent + eBias >= 1) {
  1473. number += rt / c;
  1474. } else {
  1475. number += rt * pow(2, 1 - eBias);
  1476. }
  1477. if (number * c >= 2) {
  1478. exponent++;
  1479. c /= 2;
  1480. }
  1481. if (exponent + eBias >= eMax) {
  1482. mantissa = 0;
  1483. exponent = eMax;
  1484. } else if (exponent + eBias >= 1) {
  1485. mantissa = (number * c - 1) * pow(2, mantissaLength);
  1486. exponent = exponent + eBias;
  1487. } else {
  1488. mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength);
  1489. exponent = 0;
  1490. }
  1491. }
  1492. for (; mantissaLength >= 8; buffer[index++] = mantissa & 255, mantissa /= 256, mantissaLength -= 8);
  1493. exponent = exponent << mantissaLength | mantissa;
  1494. exponentLength += mantissaLength;
  1495. for (; exponentLength > 0; buffer[index++] = exponent & 255, exponent /= 256, exponentLength -= 8);
  1496. buffer[--index] |= sign * 128;
  1497. return buffer;
  1498. };
  1499. var unpack = function (buffer, mantissaLength) {
  1500. var bytes = buffer.length;
  1501. var exponentLength = bytes * 8 - mantissaLength - 1;
  1502. var eMax = (1 << exponentLength) - 1;
  1503. var eBias = eMax >> 1;
  1504. var nBits = exponentLength - 7;
  1505. var index = bytes - 1;
  1506. var sign = buffer[index--];
  1507. var exponent = sign & 127;
  1508. var mantissa;
  1509. sign >>= 7;
  1510. for (; nBits > 0; exponent = exponent * 256 + buffer[index], index--, nBits -= 8);
  1511. mantissa = exponent & (1 << -nBits) - 1;
  1512. exponent >>= -nBits;
  1513. nBits += mantissaLength;
  1514. for (; nBits > 0; mantissa = mantissa * 256 + buffer[index], index--, nBits -= 8);
  1515. if (exponent === 0) {
  1516. exponent = 1 - eBias;
  1517. } else if (exponent === eMax) {
  1518. return mantissa ? NaN : sign ? -Infinity : Infinity;
  1519. } else {
  1520. mantissa = mantissa + pow(2, mantissaLength);
  1521. exponent = exponent - eBias;
  1522. } return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength);
  1523. };
  1524. module.exports = {
  1525. pack: pack,
  1526. unpack: unpack
  1527. };
  1528. /***/ }),
  1529. /***/ 8361:
  1530. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1531. var fails = __webpack_require__(7293);
  1532. var classof = __webpack_require__(4326);
  1533. var split = ''.split;
  1534. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  1535. module.exports = fails(function () {
  1536. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  1537. // eslint-disable-next-line no-prototype-builtins -- safe
  1538. return !Object('z').propertyIsEnumerable(0);
  1539. }) ? function (it) {
  1540. return classof(it) == 'String' ? split.call(it, '') : Object(it);
  1541. } : Object;
  1542. /***/ }),
  1543. /***/ 9587:
  1544. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1545. var isObject = __webpack_require__(111);
  1546. var setPrototypeOf = __webpack_require__(7674);
  1547. // makes subclassing work correct for wrapped built-ins
  1548. module.exports = function ($this, dummy, Wrapper) {
  1549. var NewTarget, NewTargetPrototype;
  1550. if (
  1551. // it can work only with native `setPrototypeOf`
  1552. setPrototypeOf &&
  1553. // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
  1554. typeof (NewTarget = dummy.constructor) == 'function' &&
  1555. NewTarget !== Wrapper &&
  1556. isObject(NewTargetPrototype = NewTarget.prototype) &&
  1557. NewTargetPrototype !== Wrapper.prototype
  1558. ) setPrototypeOf($this, NewTargetPrototype);
  1559. return $this;
  1560. };
  1561. /***/ }),
  1562. /***/ 2788:
  1563. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1564. var store = __webpack_require__(5465);
  1565. var functionToString = Function.toString;
  1566. // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
  1567. if (typeof store.inspectSource != 'function') {
  1568. store.inspectSource = function (it) {
  1569. return functionToString.call(it);
  1570. };
  1571. }
  1572. module.exports = store.inspectSource;
  1573. /***/ }),
  1574. /***/ 9909:
  1575. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1576. var NATIVE_WEAK_MAP = __webpack_require__(8536);
  1577. var global = __webpack_require__(7854);
  1578. var isObject = __webpack_require__(111);
  1579. var createNonEnumerableProperty = __webpack_require__(8880);
  1580. var objectHas = __webpack_require__(6656);
  1581. var shared = __webpack_require__(5465);
  1582. var sharedKey = __webpack_require__(6200);
  1583. var hiddenKeys = __webpack_require__(3501);
  1584. var WeakMap = global.WeakMap;
  1585. var set, get, has;
  1586. var enforce = function (it) {
  1587. return has(it) ? get(it) : set(it, {});
  1588. };
  1589. var getterFor = function (TYPE) {
  1590. return function (it) {
  1591. var state;
  1592. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  1593. throw TypeError('Incompatible receiver, ' + TYPE + ' required');
  1594. } return state;
  1595. };
  1596. };
  1597. if (NATIVE_WEAK_MAP) {
  1598. var store = shared.state || (shared.state = new WeakMap());
  1599. var wmget = store.get;
  1600. var wmhas = store.has;
  1601. var wmset = store.set;
  1602. set = function (it, metadata) {
  1603. metadata.facade = it;
  1604. wmset.call(store, it, metadata);
  1605. return metadata;
  1606. };
  1607. get = function (it) {
  1608. return wmget.call(store, it) || {};
  1609. };
  1610. has = function (it) {
  1611. return wmhas.call(store, it);
  1612. };
  1613. } else {
  1614. var STATE = sharedKey('state');
  1615. hiddenKeys[STATE] = true;
  1616. set = function (it, metadata) {
  1617. metadata.facade = it;
  1618. createNonEnumerableProperty(it, STATE, metadata);
  1619. return metadata;
  1620. };
  1621. get = function (it) {
  1622. return objectHas(it, STATE) ? it[STATE] : {};
  1623. };
  1624. has = function (it) {
  1625. return objectHas(it, STATE);
  1626. };
  1627. }
  1628. module.exports = {
  1629. set: set,
  1630. get: get,
  1631. has: has,
  1632. enforce: enforce,
  1633. getterFor: getterFor
  1634. };
  1635. /***/ }),
  1636. /***/ 7659:
  1637. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1638. var wellKnownSymbol = __webpack_require__(5112);
  1639. var Iterators = __webpack_require__(7497);
  1640. var ITERATOR = wellKnownSymbol('iterator');
  1641. var ArrayPrototype = Array.prototype;
  1642. // check on default Array iterator
  1643. module.exports = function (it) {
  1644. return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
  1645. };
  1646. /***/ }),
  1647. /***/ 3157:
  1648. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1649. var classof = __webpack_require__(4326);
  1650. // `IsArray` abstract operation
  1651. // https://tc39.es/ecma262/#sec-isarray
  1652. module.exports = Array.isArray || function isArray(arg) {
  1653. return classof(arg) == 'Array';
  1654. };
  1655. /***/ }),
  1656. /***/ 4705:
  1657. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1658. var fails = __webpack_require__(7293);
  1659. var replacement = /#|\.prototype\./;
  1660. var isForced = function (feature, detection) {
  1661. var value = data[normalize(feature)];
  1662. return value == POLYFILL ? true
  1663. : value == NATIVE ? false
  1664. : typeof detection == 'function' ? fails(detection)
  1665. : !!detection;
  1666. };
  1667. var normalize = isForced.normalize = function (string) {
  1668. return String(string).replace(replacement, '.').toLowerCase();
  1669. };
  1670. var data = isForced.data = {};
  1671. var NATIVE = isForced.NATIVE = 'N';
  1672. var POLYFILL = isForced.POLYFILL = 'P';
  1673. module.exports = isForced;
  1674. /***/ }),
  1675. /***/ 111:
  1676. /***/ (function(module) {
  1677. module.exports = function (it) {
  1678. return typeof it === 'object' ? it !== null : typeof it === 'function';
  1679. };
  1680. /***/ }),
  1681. /***/ 1913:
  1682. /***/ (function(module) {
  1683. module.exports = false;
  1684. /***/ }),
  1685. /***/ 7850:
  1686. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1687. var isObject = __webpack_require__(111);
  1688. var classof = __webpack_require__(4326);
  1689. var wellKnownSymbol = __webpack_require__(5112);
  1690. var MATCH = wellKnownSymbol('match');
  1691. // `IsRegExp` abstract operation
  1692. // https://tc39.es/ecma262/#sec-isregexp
  1693. module.exports = function (it) {
  1694. var isRegExp;
  1695. return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');
  1696. };
  1697. /***/ }),
  1698. /***/ 9212:
  1699. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1700. var anObject = __webpack_require__(9670);
  1701. module.exports = function (iterator) {
  1702. var returnMethod = iterator['return'];
  1703. if (returnMethod !== undefined) {
  1704. return anObject(returnMethod.call(iterator)).value;
  1705. }
  1706. };
  1707. /***/ }),
  1708. /***/ 3383:
  1709. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1710. "use strict";
  1711. var fails = __webpack_require__(7293);
  1712. var getPrototypeOf = __webpack_require__(9518);
  1713. var createNonEnumerableProperty = __webpack_require__(8880);
  1714. var has = __webpack_require__(6656);
  1715. var wellKnownSymbol = __webpack_require__(5112);
  1716. var IS_PURE = __webpack_require__(1913);
  1717. var ITERATOR = wellKnownSymbol('iterator');
  1718. var BUGGY_SAFARI_ITERATORS = false;
  1719. var returnThis = function () { return this; };
  1720. // `%IteratorPrototype%` object
  1721. // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
  1722. var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
  1723. if ([].keys) {
  1724. arrayIterator = [].keys();
  1725. // Safari 8 has buggy iterators w/o `next`
  1726. if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
  1727. else {
  1728. PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
  1729. if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
  1730. }
  1731. }
  1732. var NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {
  1733. var test = {};
  1734. // FF44- legacy iterators case
  1735. return IteratorPrototype[ITERATOR].call(test) !== test;
  1736. });
  1737. if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};
  1738. // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
  1739. if ((!IS_PURE || NEW_ITERATOR_PROTOTYPE) && !has(IteratorPrototype, ITERATOR)) {
  1740. createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);
  1741. }
  1742. module.exports = {
  1743. IteratorPrototype: IteratorPrototype,
  1744. BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
  1745. };
  1746. /***/ }),
  1747. /***/ 7497:
  1748. /***/ (function(module) {
  1749. module.exports = {};
  1750. /***/ }),
  1751. /***/ 133:
  1752. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1753. var fails = __webpack_require__(7293);
  1754. module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
  1755. // Chrome 38 Symbol has incorrect toString conversion
  1756. /* global Symbol -- required for testing */
  1757. return !String(Symbol());
  1758. });
  1759. /***/ }),
  1760. /***/ 590:
  1761. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1762. var fails = __webpack_require__(7293);
  1763. var wellKnownSymbol = __webpack_require__(5112);
  1764. var IS_PURE = __webpack_require__(1913);
  1765. var ITERATOR = wellKnownSymbol('iterator');
  1766. module.exports = !fails(function () {
  1767. var url = new URL('b?a=1&b=2&c=3', 'http://a');
  1768. var searchParams = url.searchParams;
  1769. var result = '';
  1770. url.pathname = 'c%20d';
  1771. searchParams.forEach(function (value, key) {
  1772. searchParams['delete']('b');
  1773. result += key + value;
  1774. });
  1775. return (IS_PURE && !url.toJSON)
  1776. || !searchParams.sort
  1777. || url.href !== 'http://a/c%20d?a=1&c=3'
  1778. || searchParams.get('c') !== '3'
  1779. || String(new URLSearchParams('?a=1')) !== 'a=1'
  1780. || !searchParams[ITERATOR]
  1781. // throws in Edge
  1782. || new URL('https://a@b').username !== 'a'
  1783. || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'
  1784. // not punycoded in Edge
  1785. || new URL('http://тест').host !== 'xn--e1aybc'
  1786. // not escaped in Chrome 62-
  1787. || new URL('http://a#б').hash !== '#%D0%B1'
  1788. // fails in Chrome 66-
  1789. || result !== 'a1c3'
  1790. // throws in Safari
  1791. || new URL('http://x', undefined).host !== 'x';
  1792. });
  1793. /***/ }),
  1794. /***/ 8536:
  1795. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1796. var global = __webpack_require__(7854);
  1797. var inspectSource = __webpack_require__(2788);
  1798. var WeakMap = global.WeakMap;
  1799. module.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
  1800. /***/ }),
  1801. /***/ 1574:
  1802. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1803. "use strict";
  1804. var DESCRIPTORS = __webpack_require__(9781);
  1805. var fails = __webpack_require__(7293);
  1806. var objectKeys = __webpack_require__(1956);
  1807. var getOwnPropertySymbolsModule = __webpack_require__(5181);
  1808. var propertyIsEnumerableModule = __webpack_require__(5296);
  1809. var toObject = __webpack_require__(7908);
  1810. var IndexedObject = __webpack_require__(8361);
  1811. var nativeAssign = Object.assign;
  1812. var defineProperty = Object.defineProperty;
  1813. // `Object.assign` method
  1814. // https://tc39.es/ecma262/#sec-object.assign
  1815. module.exports = !nativeAssign || fails(function () {
  1816. // should have correct order of operations (Edge bug)
  1817. if (DESCRIPTORS && nativeAssign({ b: 1 }, nativeAssign(defineProperty({}, 'a', {
  1818. enumerable: true,
  1819. get: function () {
  1820. defineProperty(this, 'b', {
  1821. value: 3,
  1822. enumerable: false
  1823. });
  1824. }
  1825. }), { b: 2 })).b !== 1) return true;
  1826. // should work with symbols and should have deterministic property order (V8 bug)
  1827. var A = {};
  1828. var B = {};
  1829. /* global Symbol -- required for testing */
  1830. var symbol = Symbol();
  1831. var alphabet = 'abcdefghijklmnopqrst';
  1832. A[symbol] = 7;
  1833. alphabet.split('').forEach(function (chr) { B[chr] = chr; });
  1834. return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;
  1835. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
  1836. var T = toObject(target);
  1837. var argumentsLength = arguments.length;
  1838. var index = 1;
  1839. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  1840. var propertyIsEnumerable = propertyIsEnumerableModule.f;
  1841. while (argumentsLength > index) {
  1842. var S = IndexedObject(arguments[index++]);
  1843. var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
  1844. var length = keys.length;
  1845. var j = 0;
  1846. var key;
  1847. while (length > j) {
  1848. key = keys[j++];
  1849. if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];
  1850. }
  1851. } return T;
  1852. } : nativeAssign;
  1853. /***/ }),
  1854. /***/ 30:
  1855. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1856. var anObject = __webpack_require__(9670);
  1857. var defineProperties = __webpack_require__(6048);
  1858. var enumBugKeys = __webpack_require__(748);
  1859. var hiddenKeys = __webpack_require__(3501);
  1860. var html = __webpack_require__(490);
  1861. var documentCreateElement = __webpack_require__(317);
  1862. var sharedKey = __webpack_require__(6200);
  1863. var GT = '>';
  1864. var LT = '<';
  1865. var PROTOTYPE = 'prototype';
  1866. var SCRIPT = 'script';
  1867. var IE_PROTO = sharedKey('IE_PROTO');
  1868. var EmptyConstructor = function () { /* empty */ };
  1869. var scriptTag = function (content) {
  1870. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  1871. };
  1872. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  1873. var NullProtoObjectViaActiveX = function (activeXDocument) {
  1874. activeXDocument.write(scriptTag(''));
  1875. activeXDocument.close();
  1876. var temp = activeXDocument.parentWindow.Object;
  1877. activeXDocument = null; // avoid memory leak
  1878. return temp;
  1879. };
  1880. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  1881. var NullProtoObjectViaIFrame = function () {
  1882. // Thrash, waste and sodomy: IE GC bug
  1883. var iframe = documentCreateElement('iframe');
  1884. var JS = 'java' + SCRIPT + ':';
  1885. var iframeDocument;
  1886. iframe.style.display = 'none';
  1887. html.appendChild(iframe);
  1888. // https://github.com/zloirock/core-js/issues/475
  1889. iframe.src = String(JS);
  1890. iframeDocument = iframe.contentWindow.document;
  1891. iframeDocument.open();
  1892. iframeDocument.write(scriptTag('document.F=Object'));
  1893. iframeDocument.close();
  1894. return iframeDocument.F;
  1895. };
  1896. // Check for document.domain and active x support
  1897. // No need to use active x approach when document.domain is not set
  1898. // see https://github.com/es-shims/es5-shim/issues/150
  1899. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  1900. // avoid IE GC bug
  1901. var activeXDocument;
  1902. var NullProtoObject = function () {
  1903. try {
  1904. /* global ActiveXObject -- old IE */
  1905. activeXDocument = document.domain && new ActiveXObject('htmlfile');
  1906. } catch (error) { /* ignore */ }
  1907. NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
  1908. var length = enumBugKeys.length;
  1909. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  1910. return NullProtoObject();
  1911. };
  1912. hiddenKeys[IE_PROTO] = true;
  1913. // `Object.create` method
  1914. // https://tc39.es/ecma262/#sec-object.create
  1915. module.exports = Object.create || function create(O, Properties) {
  1916. var result;
  1917. if (O !== null) {
  1918. EmptyConstructor[PROTOTYPE] = anObject(O);
  1919. result = new EmptyConstructor();
  1920. EmptyConstructor[PROTOTYPE] = null;
  1921. // add "__proto__" for Object.getPrototypeOf polyfill
  1922. result[IE_PROTO] = O;
  1923. } else result = NullProtoObject();
  1924. return Properties === undefined ? result : defineProperties(result, Properties);
  1925. };
  1926. /***/ }),
  1927. /***/ 6048:
  1928. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1929. var DESCRIPTORS = __webpack_require__(9781);
  1930. var definePropertyModule = __webpack_require__(3070);
  1931. var anObject = __webpack_require__(9670);
  1932. var objectKeys = __webpack_require__(1956);
  1933. // `Object.defineProperties` method
  1934. // https://tc39.es/ecma262/#sec-object.defineproperties
  1935. module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {
  1936. anObject(O);
  1937. var keys = objectKeys(Properties);
  1938. var length = keys.length;
  1939. var index = 0;
  1940. var key;
  1941. while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);
  1942. return O;
  1943. };
  1944. /***/ }),
  1945. /***/ 3070:
  1946. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  1947. var DESCRIPTORS = __webpack_require__(9781);
  1948. var IE8_DOM_DEFINE = __webpack_require__(4664);
  1949. var anObject = __webpack_require__(9670);
  1950. var toPrimitive = __webpack_require__(7593);
  1951. var nativeDefineProperty = Object.defineProperty;
  1952. // `Object.defineProperty` method
  1953. // https://tc39.es/ecma262/#sec-object.defineproperty
  1954. exports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
  1955. anObject(O);
  1956. P = toPrimitive(P, true);
  1957. anObject(Attributes);
  1958. if (IE8_DOM_DEFINE) try {
  1959. return nativeDefineProperty(O, P, Attributes);
  1960. } catch (error) { /* empty */ }
  1961. if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
  1962. if ('value' in Attributes) O[P] = Attributes.value;
  1963. return O;
  1964. };
  1965. /***/ }),
  1966. /***/ 1236:
  1967. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  1968. var DESCRIPTORS = __webpack_require__(9781);
  1969. var propertyIsEnumerableModule = __webpack_require__(5296);
  1970. var createPropertyDescriptor = __webpack_require__(9114);
  1971. var toIndexedObject = __webpack_require__(5656);
  1972. var toPrimitive = __webpack_require__(7593);
  1973. var has = __webpack_require__(6656);
  1974. var IE8_DOM_DEFINE = __webpack_require__(4664);
  1975. var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  1976. // `Object.getOwnPropertyDescriptor` method
  1977. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  1978. exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  1979. O = toIndexedObject(O);
  1980. P = toPrimitive(P, true);
  1981. if (IE8_DOM_DEFINE) try {
  1982. return nativeGetOwnPropertyDescriptor(O, P);
  1983. } catch (error) { /* empty */ }
  1984. if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);
  1985. };
  1986. /***/ }),
  1987. /***/ 8006:
  1988. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  1989. var internalObjectKeys = __webpack_require__(6324);
  1990. var enumBugKeys = __webpack_require__(748);
  1991. var hiddenKeys = enumBugKeys.concat('length', 'prototype');
  1992. // `Object.getOwnPropertyNames` method
  1993. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  1994. exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  1995. return internalObjectKeys(O, hiddenKeys);
  1996. };
  1997. /***/ }),
  1998. /***/ 5181:
  1999. /***/ (function(__unused_webpack_module, exports) {
  2000. exports.f = Object.getOwnPropertySymbols;
  2001. /***/ }),
  2002. /***/ 9518:
  2003. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2004. var has = __webpack_require__(6656);
  2005. var toObject = __webpack_require__(7908);
  2006. var sharedKey = __webpack_require__(6200);
  2007. var CORRECT_PROTOTYPE_GETTER = __webpack_require__(8544);
  2008. var IE_PROTO = sharedKey('IE_PROTO');
  2009. var ObjectPrototype = Object.prototype;
  2010. // `Object.getPrototypeOf` method
  2011. // https://tc39.es/ecma262/#sec-object.getprototypeof
  2012. module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {
  2013. O = toObject(O);
  2014. if (has(O, IE_PROTO)) return O[IE_PROTO];
  2015. if (typeof O.constructor == 'function' && O instanceof O.constructor) {
  2016. return O.constructor.prototype;
  2017. } return O instanceof Object ? ObjectPrototype : null;
  2018. };
  2019. /***/ }),
  2020. /***/ 6324:
  2021. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2022. var has = __webpack_require__(6656);
  2023. var toIndexedObject = __webpack_require__(5656);
  2024. var indexOf = __webpack_require__(1318).indexOf;
  2025. var hiddenKeys = __webpack_require__(3501);
  2026. module.exports = function (object, names) {
  2027. var O = toIndexedObject(object);
  2028. var i = 0;
  2029. var result = [];
  2030. var key;
  2031. for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
  2032. // Don't enum bug & hidden keys
  2033. while (names.length > i) if (has(O, key = names[i++])) {
  2034. ~indexOf(result, key) || result.push(key);
  2035. }
  2036. return result;
  2037. };
  2038. /***/ }),
  2039. /***/ 1956:
  2040. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2041. var internalObjectKeys = __webpack_require__(6324);
  2042. var enumBugKeys = __webpack_require__(748);
  2043. // `Object.keys` method
  2044. // https://tc39.es/ecma262/#sec-object.keys
  2045. module.exports = Object.keys || function keys(O) {
  2046. return internalObjectKeys(O, enumBugKeys);
  2047. };
  2048. /***/ }),
  2049. /***/ 5296:
  2050. /***/ (function(__unused_webpack_module, exports) {
  2051. "use strict";
  2052. var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
  2053. var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  2054. // Nashorn ~ JDK8 bug
  2055. var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
  2056. // `Object.prototype.propertyIsEnumerable` method implementation
  2057. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  2058. exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  2059. var descriptor = getOwnPropertyDescriptor(this, V);
  2060. return !!descriptor && descriptor.enumerable;
  2061. } : nativePropertyIsEnumerable;
  2062. /***/ }),
  2063. /***/ 7674:
  2064. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2065. /* eslint-disable no-proto -- safe */
  2066. var anObject = __webpack_require__(9670);
  2067. var aPossiblePrototype = __webpack_require__(6077);
  2068. // `Object.setPrototypeOf` method
  2069. // https://tc39.es/ecma262/#sec-object.setprototypeof
  2070. // Works with __proto__ only. Old v8 can't work with null proto objects.
  2071. module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
  2072. var CORRECT_SETTER = false;
  2073. var test = {};
  2074. var setter;
  2075. try {
  2076. setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
  2077. setter.call(test, []);
  2078. CORRECT_SETTER = test instanceof Array;
  2079. } catch (error) { /* empty */ }
  2080. return function setPrototypeOf(O, proto) {
  2081. anObject(O);
  2082. aPossiblePrototype(proto);
  2083. if (CORRECT_SETTER) setter.call(O, proto);
  2084. else O.__proto__ = proto;
  2085. return O;
  2086. };
  2087. }() : undefined);
  2088. /***/ }),
  2089. /***/ 288:
  2090. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2091. "use strict";
  2092. var TO_STRING_TAG_SUPPORT = __webpack_require__(1694);
  2093. var classof = __webpack_require__(648);
  2094. // `Object.prototype.toString` method implementation
  2095. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  2096. module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {
  2097. return '[object ' + classof(this) + ']';
  2098. };
  2099. /***/ }),
  2100. /***/ 3887:
  2101. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2102. var getBuiltIn = __webpack_require__(5005);
  2103. var getOwnPropertyNamesModule = __webpack_require__(8006);
  2104. var getOwnPropertySymbolsModule = __webpack_require__(5181);
  2105. var anObject = __webpack_require__(9670);
  2106. // all object keys, includes non-enumerable and symbols
  2107. module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  2108. var keys = getOwnPropertyNamesModule.f(anObject(it));
  2109. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  2110. return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
  2111. };
  2112. /***/ }),
  2113. /***/ 857:
  2114. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2115. var global = __webpack_require__(7854);
  2116. module.exports = global;
  2117. /***/ }),
  2118. /***/ 2248:
  2119. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2120. var redefine = __webpack_require__(1320);
  2121. module.exports = function (target, src, options) {
  2122. for (var key in src) redefine(target, key, src[key], options);
  2123. return target;
  2124. };
  2125. /***/ }),
  2126. /***/ 1320:
  2127. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2128. var global = __webpack_require__(7854);
  2129. var createNonEnumerableProperty = __webpack_require__(8880);
  2130. var has = __webpack_require__(6656);
  2131. var setGlobal = __webpack_require__(3505);
  2132. var inspectSource = __webpack_require__(2788);
  2133. var InternalStateModule = __webpack_require__(9909);
  2134. var getInternalState = InternalStateModule.get;
  2135. var enforceInternalState = InternalStateModule.enforce;
  2136. var TEMPLATE = String(String).split('String');
  2137. (module.exports = function (O, key, value, options) {
  2138. var unsafe = options ? !!options.unsafe : false;
  2139. var simple = options ? !!options.enumerable : false;
  2140. var noTargetGet = options ? !!options.noTargetGet : false;
  2141. var state;
  2142. if (typeof value == 'function') {
  2143. if (typeof key == 'string' && !has(value, 'name')) {
  2144. createNonEnumerableProperty(value, 'name', key);
  2145. }
  2146. state = enforceInternalState(value);
  2147. if (!state.source) {
  2148. state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
  2149. }
  2150. }
  2151. if (O === global) {
  2152. if (simple) O[key] = value;
  2153. else setGlobal(key, value);
  2154. return;
  2155. } else if (!unsafe) {
  2156. delete O[key];
  2157. } else if (!noTargetGet && O[key]) {
  2158. simple = true;
  2159. }
  2160. if (simple) O[key] = value;
  2161. else createNonEnumerableProperty(O, key, value);
  2162. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  2163. })(Function.prototype, 'toString', function toString() {
  2164. return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
  2165. });
  2166. /***/ }),
  2167. /***/ 7651:
  2168. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2169. var classof = __webpack_require__(4326);
  2170. var regexpExec = __webpack_require__(2261);
  2171. // `RegExpExec` abstract operation
  2172. // https://tc39.es/ecma262/#sec-regexpexec
  2173. module.exports = function (R, S) {
  2174. var exec = R.exec;
  2175. if (typeof exec === 'function') {
  2176. var result = exec.call(R, S);
  2177. if (typeof result !== 'object') {
  2178. throw TypeError('RegExp exec method returned something other than an Object or null');
  2179. }
  2180. return result;
  2181. }
  2182. if (classof(R) !== 'RegExp') {
  2183. throw TypeError('RegExp#exec called on incompatible receiver');
  2184. }
  2185. return regexpExec.call(R, S);
  2186. };
  2187. /***/ }),
  2188. /***/ 2261:
  2189. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2190. "use strict";
  2191. var regexpFlags = __webpack_require__(7066);
  2192. var stickyHelpers = __webpack_require__(2999);
  2193. var nativeExec = RegExp.prototype.exec;
  2194. // This always refers to the native implementation, because the
  2195. // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
  2196. // which loads this file before patching the method.
  2197. var nativeReplace = String.prototype.replace;
  2198. var patchedExec = nativeExec;
  2199. var UPDATES_LAST_INDEX_WRONG = (function () {
  2200. var re1 = /a/;
  2201. var re2 = /b*/g;
  2202. nativeExec.call(re1, 'a');
  2203. nativeExec.call(re2, 'a');
  2204. return re1.lastIndex !== 0 || re2.lastIndex !== 0;
  2205. })();
  2206. var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET;
  2207. // nonparticipating capturing group, copied from es5-shim's String#split patch.
  2208. // eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing
  2209. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
  2210. var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y;
  2211. if (PATCH) {
  2212. patchedExec = function exec(str) {
  2213. var re = this;
  2214. var lastIndex, reCopy, match, i;
  2215. var sticky = UNSUPPORTED_Y && re.sticky;
  2216. var flags = regexpFlags.call(re);
  2217. var source = re.source;
  2218. var charsAdded = 0;
  2219. var strCopy = str;
  2220. if (sticky) {
  2221. flags = flags.replace('y', '');
  2222. if (flags.indexOf('g') === -1) {
  2223. flags += 'g';
  2224. }
  2225. strCopy = String(str).slice(re.lastIndex);
  2226. // Support anchored sticky behavior.
  2227. if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) {
  2228. source = '(?: ' + source + ')';
  2229. strCopy = ' ' + strCopy;
  2230. charsAdded++;
  2231. }
  2232. // ^(? + rx + ) is needed, in combination with some str slicing, to
  2233. // simulate the 'y' flag.
  2234. reCopy = new RegExp('^(?:' + source + ')', flags);
  2235. }
  2236. if (NPCG_INCLUDED) {
  2237. reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
  2238. }
  2239. if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
  2240. match = nativeExec.call(sticky ? reCopy : re, strCopy);
  2241. if (sticky) {
  2242. if (match) {
  2243. match.input = match.input.slice(charsAdded);
  2244. match[0] = match[0].slice(charsAdded);
  2245. match.index = re.lastIndex;
  2246. re.lastIndex += match[0].length;
  2247. } else re.lastIndex = 0;
  2248. } else if (UPDATES_LAST_INDEX_WRONG && match) {
  2249. re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
  2250. }
  2251. if (NPCG_INCLUDED && match && match.length > 1) {
  2252. // Fix browsers whose `exec` methods don't consistently return `undefined`
  2253. // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
  2254. nativeReplace.call(match[0], reCopy, function () {
  2255. for (i = 1; i < arguments.length - 2; i++) {
  2256. if (arguments[i] === undefined) match[i] = undefined;
  2257. }
  2258. });
  2259. }
  2260. return match;
  2261. };
  2262. }
  2263. module.exports = patchedExec;
  2264. /***/ }),
  2265. /***/ 7066:
  2266. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2267. "use strict";
  2268. var anObject = __webpack_require__(9670);
  2269. // `RegExp.prototype.flags` getter implementation
  2270. // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
  2271. module.exports = function () {
  2272. var that = anObject(this);
  2273. var result = '';
  2274. if (that.global) result += 'g';
  2275. if (that.ignoreCase) result += 'i';
  2276. if (that.multiline) result += 'm';
  2277. if (that.dotAll) result += 's';
  2278. if (that.unicode) result += 'u';
  2279. if (that.sticky) result += 'y';
  2280. return result;
  2281. };
  2282. /***/ }),
  2283. /***/ 2999:
  2284. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  2285. "use strict";
  2286. var fails = __webpack_require__(7293);
  2287. // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
  2288. // so we use an intermediate function.
  2289. function RE(s, f) {
  2290. return RegExp(s, f);
  2291. }
  2292. exports.UNSUPPORTED_Y = fails(function () {
  2293. // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
  2294. var re = RE('a', 'y');
  2295. re.lastIndex = 2;
  2296. return re.exec('abcd') != null;
  2297. });
  2298. exports.BROKEN_CARET = fails(function () {
  2299. // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
  2300. var re = RE('^r', 'gy');
  2301. re.lastIndex = 2;
  2302. return re.exec('str') != null;
  2303. });
  2304. /***/ }),
  2305. /***/ 4488:
  2306. /***/ (function(module) {
  2307. // `RequireObjectCoercible` abstract operation
  2308. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  2309. module.exports = function (it) {
  2310. if (it == undefined) throw TypeError("Can't call method on " + it);
  2311. return it;
  2312. };
  2313. /***/ }),
  2314. /***/ 3505:
  2315. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2316. var global = __webpack_require__(7854);
  2317. var createNonEnumerableProperty = __webpack_require__(8880);
  2318. module.exports = function (key, value) {
  2319. try {
  2320. createNonEnumerableProperty(global, key, value);
  2321. } catch (error) {
  2322. global[key] = value;
  2323. } return value;
  2324. };
  2325. /***/ }),
  2326. /***/ 6340:
  2327. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2328. "use strict";
  2329. var getBuiltIn = __webpack_require__(5005);
  2330. var definePropertyModule = __webpack_require__(3070);
  2331. var wellKnownSymbol = __webpack_require__(5112);
  2332. var DESCRIPTORS = __webpack_require__(9781);
  2333. var SPECIES = wellKnownSymbol('species');
  2334. module.exports = function (CONSTRUCTOR_NAME) {
  2335. var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
  2336. var defineProperty = definePropertyModule.f;
  2337. if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {
  2338. defineProperty(Constructor, SPECIES, {
  2339. configurable: true,
  2340. get: function () { return this; }
  2341. });
  2342. }
  2343. };
  2344. /***/ }),
  2345. /***/ 8003:
  2346. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2347. var defineProperty = __webpack_require__(3070).f;
  2348. var has = __webpack_require__(6656);
  2349. var wellKnownSymbol = __webpack_require__(5112);
  2350. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  2351. module.exports = function (it, TAG, STATIC) {
  2352. if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
  2353. defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });
  2354. }
  2355. };
  2356. /***/ }),
  2357. /***/ 6200:
  2358. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2359. var shared = __webpack_require__(2309);
  2360. var uid = __webpack_require__(9711);
  2361. var keys = shared('keys');
  2362. module.exports = function (key) {
  2363. return keys[key] || (keys[key] = uid(key));
  2364. };
  2365. /***/ }),
  2366. /***/ 5465:
  2367. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2368. var global = __webpack_require__(7854);
  2369. var setGlobal = __webpack_require__(3505);
  2370. var SHARED = '__core-js_shared__';
  2371. var store = global[SHARED] || setGlobal(SHARED, {});
  2372. module.exports = store;
  2373. /***/ }),
  2374. /***/ 2309:
  2375. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2376. var IS_PURE = __webpack_require__(1913);
  2377. var store = __webpack_require__(5465);
  2378. (module.exports = function (key, value) {
  2379. return store[key] || (store[key] = value !== undefined ? value : {});
  2380. })('versions', []).push({
  2381. version: '3.9.0',
  2382. mode: IS_PURE ? 'pure' : 'global',
  2383. copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
  2384. });
  2385. /***/ }),
  2386. /***/ 6707:
  2387. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2388. var anObject = __webpack_require__(9670);
  2389. var aFunction = __webpack_require__(3099);
  2390. var wellKnownSymbol = __webpack_require__(5112);
  2391. var SPECIES = wellKnownSymbol('species');
  2392. // `SpeciesConstructor` abstract operation
  2393. // https://tc39.es/ecma262/#sec-speciesconstructor
  2394. module.exports = function (O, defaultConstructor) {
  2395. var C = anObject(O).constructor;
  2396. var S;
  2397. return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S);
  2398. };
  2399. /***/ }),
  2400. /***/ 8710:
  2401. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2402. var toInteger = __webpack_require__(9958);
  2403. var requireObjectCoercible = __webpack_require__(4488);
  2404. // `String.prototype.{ codePointAt, at }` methods implementation
  2405. var createMethod = function (CONVERT_TO_STRING) {
  2406. return function ($this, pos) {
  2407. var S = String(requireObjectCoercible($this));
  2408. var position = toInteger(pos);
  2409. var size = S.length;
  2410. var first, second;
  2411. if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
  2412. first = S.charCodeAt(position);
  2413. return first < 0xD800 || first > 0xDBFF || position + 1 === size
  2414. || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
  2415. ? CONVERT_TO_STRING ? S.charAt(position) : first
  2416. : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
  2417. };
  2418. };
  2419. module.exports = {
  2420. // `String.prototype.codePointAt` method
  2421. // https://tc39.es/ecma262/#sec-string.prototype.codepointat
  2422. codeAt: createMethod(false),
  2423. // `String.prototype.at` method
  2424. // https://github.com/mathiasbynens/String.prototype.at
  2425. charAt: createMethod(true)
  2426. };
  2427. /***/ }),
  2428. /***/ 3197:
  2429. /***/ (function(module) {
  2430. "use strict";
  2431. // based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js
  2432. var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
  2433. var base = 36;
  2434. var tMin = 1;
  2435. var tMax = 26;
  2436. var skew = 38;
  2437. var damp = 700;
  2438. var initialBias = 72;
  2439. var initialN = 128; // 0x80
  2440. var delimiter = '-'; // '\x2D'
  2441. var regexNonASCII = /[^\0-\u007E]/; // non-ASCII chars
  2442. var regexSeparators = /[.\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
  2443. var OVERFLOW_ERROR = 'Overflow: input needs wider integers to process';
  2444. var baseMinusTMin = base - tMin;
  2445. var floor = Math.floor;
  2446. var stringFromCharCode = String.fromCharCode;
  2447. /**
  2448. * Creates an array containing the numeric code points of each Unicode
  2449. * character in the string. While JavaScript uses UCS-2 internally,
  2450. * this function will convert a pair of surrogate halves (each of which
  2451. * UCS-2 exposes as separate characters) into a single code point,
  2452. * matching UTF-16.
  2453. */
  2454. var ucs2decode = function (string) {
  2455. var output = [];
  2456. var counter = 0;
  2457. var length = string.length;
  2458. while (counter < length) {
  2459. var value = string.charCodeAt(counter++);
  2460. if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
  2461. // It's a high surrogate, and there is a next character.
  2462. var extra = string.charCodeAt(counter++);
  2463. if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.
  2464. output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
  2465. } else {
  2466. // It's an unmatched surrogate; only append this code unit, in case the
  2467. // next code unit is the high surrogate of a surrogate pair.
  2468. output.push(value);
  2469. counter--;
  2470. }
  2471. } else {
  2472. output.push(value);
  2473. }
  2474. }
  2475. return output;
  2476. };
  2477. /**
  2478. * Converts a digit/integer into a basic code point.
  2479. */
  2480. var digitToBasic = function (digit) {
  2481. // 0..25 map to ASCII a..z or A..Z
  2482. // 26..35 map to ASCII 0..9
  2483. return digit + 22 + 75 * (digit < 26);
  2484. };
  2485. /**
  2486. * Bias adaptation function as per section 3.4 of RFC 3492.
  2487. * https://tools.ietf.org/html/rfc3492#section-3.4
  2488. */
  2489. var adapt = function (delta, numPoints, firstTime) {
  2490. var k = 0;
  2491. delta = firstTime ? floor(delta / damp) : delta >> 1;
  2492. delta += floor(delta / numPoints);
  2493. for (; delta > baseMinusTMin * tMax >> 1; k += base) {
  2494. delta = floor(delta / baseMinusTMin);
  2495. }
  2496. return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
  2497. };
  2498. /**
  2499. * Converts a string of Unicode symbols (e.g. a domain name label) to a
  2500. * Punycode string of ASCII-only symbols.
  2501. */
  2502. // eslint-disable-next-line max-statements -- TODO
  2503. var encode = function (input) {
  2504. var output = [];
  2505. // Convert the input in UCS-2 to an array of Unicode code points.
  2506. input = ucs2decode(input);
  2507. // Cache the length.
  2508. var inputLength = input.length;
  2509. // Initialize the state.
  2510. var n = initialN;
  2511. var delta = 0;
  2512. var bias = initialBias;
  2513. var i, currentValue;
  2514. // Handle the basic code points.
  2515. for (i = 0; i < input.length; i++) {
  2516. currentValue = input[i];
  2517. if (currentValue < 0x80) {
  2518. output.push(stringFromCharCode(currentValue));
  2519. }
  2520. }
  2521. var basicLength = output.length; // number of basic code points.
  2522. var handledCPCount = basicLength; // number of code points that have been handled;
  2523. // Finish the basic string with a delimiter unless it's empty.
  2524. if (basicLength) {
  2525. output.push(delimiter);
  2526. }
  2527. // Main encoding loop:
  2528. while (handledCPCount < inputLength) {
  2529. // All non-basic code points < n have been handled already. Find the next larger one:
  2530. var m = maxInt;
  2531. for (i = 0; i < input.length; i++) {
  2532. currentValue = input[i];
  2533. if (currentValue >= n && currentValue < m) {
  2534. m = currentValue;
  2535. }
  2536. }
  2537. // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, but guard against overflow.
  2538. var handledCPCountPlusOne = handledCPCount + 1;
  2539. if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
  2540. throw RangeError(OVERFLOW_ERROR);
  2541. }
  2542. delta += (m - n) * handledCPCountPlusOne;
  2543. n = m;
  2544. for (i = 0; i < input.length; i++) {
  2545. currentValue = input[i];
  2546. if (currentValue < n && ++delta > maxInt) {
  2547. throw RangeError(OVERFLOW_ERROR);
  2548. }
  2549. if (currentValue == n) {
  2550. // Represent delta as a generalized variable-length integer.
  2551. var q = delta;
  2552. for (var k = base; /* no condition */; k += base) {
  2553. var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
  2554. if (q < t) break;
  2555. var qMinusT = q - t;
  2556. var baseMinusT = base - t;
  2557. output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT)));
  2558. q = floor(qMinusT / baseMinusT);
  2559. }
  2560. output.push(stringFromCharCode(digitToBasic(q)));
  2561. bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
  2562. delta = 0;
  2563. ++handledCPCount;
  2564. }
  2565. }
  2566. ++delta;
  2567. ++n;
  2568. }
  2569. return output.join('');
  2570. };
  2571. module.exports = function (input) {
  2572. var encoded = [];
  2573. var labels = input.toLowerCase().replace(regexSeparators, '\u002E').split('.');
  2574. var i, label;
  2575. for (i = 0; i < labels.length; i++) {
  2576. label = labels[i];
  2577. encoded.push(regexNonASCII.test(label) ? 'xn--' + encode(label) : label);
  2578. }
  2579. return encoded.join('.');
  2580. };
  2581. /***/ }),
  2582. /***/ 6091:
  2583. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2584. var fails = __webpack_require__(7293);
  2585. var whitespaces = __webpack_require__(1361);
  2586. var non = '\u200B\u0085\u180E';
  2587. // check that a method works with the correct list
  2588. // of whitespaces and has a correct name
  2589. module.exports = function (METHOD_NAME) {
  2590. return fails(function () {
  2591. return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;
  2592. });
  2593. };
  2594. /***/ }),
  2595. /***/ 3111:
  2596. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2597. var requireObjectCoercible = __webpack_require__(4488);
  2598. var whitespaces = __webpack_require__(1361);
  2599. var whitespace = '[' + whitespaces + ']';
  2600. var ltrim = RegExp('^' + whitespace + whitespace + '*');
  2601. var rtrim = RegExp(whitespace + whitespace + '*$');
  2602. // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
  2603. var createMethod = function (TYPE) {
  2604. return function ($this) {
  2605. var string = String(requireObjectCoercible($this));
  2606. if (TYPE & 1) string = string.replace(ltrim, '');
  2607. if (TYPE & 2) string = string.replace(rtrim, '');
  2608. return string;
  2609. };
  2610. };
  2611. module.exports = {
  2612. // `String.prototype.{ trimLeft, trimStart }` methods
  2613. // https://tc39.es/ecma262/#sec-string.prototype.trimstart
  2614. start: createMethod(1),
  2615. // `String.prototype.{ trimRight, trimEnd }` methods
  2616. // https://tc39.es/ecma262/#sec-string.prototype.trimend
  2617. end: createMethod(2),
  2618. // `String.prototype.trim` method
  2619. // https://tc39.es/ecma262/#sec-string.prototype.trim
  2620. trim: createMethod(3)
  2621. };
  2622. /***/ }),
  2623. /***/ 1400:
  2624. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2625. var toInteger = __webpack_require__(9958);
  2626. var max = Math.max;
  2627. var min = Math.min;
  2628. // Helper for a popular repeating case of the spec:
  2629. // Let integer be ? ToInteger(index).
  2630. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  2631. module.exports = function (index, length) {
  2632. var integer = toInteger(index);
  2633. return integer < 0 ? max(integer + length, 0) : min(integer, length);
  2634. };
  2635. /***/ }),
  2636. /***/ 7067:
  2637. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2638. var toInteger = __webpack_require__(9958);
  2639. var toLength = __webpack_require__(7466);
  2640. // `ToIndex` abstract operation
  2641. // https://tc39.es/ecma262/#sec-toindex
  2642. module.exports = function (it) {
  2643. if (it === undefined) return 0;
  2644. var number = toInteger(it);
  2645. var length = toLength(number);
  2646. if (number !== length) throw RangeError('Wrong length or index');
  2647. return length;
  2648. };
  2649. /***/ }),
  2650. /***/ 5656:
  2651. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2652. // toObject with fallback for non-array-like ES3 strings
  2653. var IndexedObject = __webpack_require__(8361);
  2654. var requireObjectCoercible = __webpack_require__(4488);
  2655. module.exports = function (it) {
  2656. return IndexedObject(requireObjectCoercible(it));
  2657. };
  2658. /***/ }),
  2659. /***/ 9958:
  2660. /***/ (function(module) {
  2661. var ceil = Math.ceil;
  2662. var floor = Math.floor;
  2663. // `ToInteger` abstract operation
  2664. // https://tc39.es/ecma262/#sec-tointeger
  2665. module.exports = function (argument) {
  2666. return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
  2667. };
  2668. /***/ }),
  2669. /***/ 7466:
  2670. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2671. var toInteger = __webpack_require__(9958);
  2672. var min = Math.min;
  2673. // `ToLength` abstract operation
  2674. // https://tc39.es/ecma262/#sec-tolength
  2675. module.exports = function (argument) {
  2676. return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  2677. };
  2678. /***/ }),
  2679. /***/ 7908:
  2680. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2681. var requireObjectCoercible = __webpack_require__(4488);
  2682. // `ToObject` abstract operation
  2683. // https://tc39.es/ecma262/#sec-toobject
  2684. module.exports = function (argument) {
  2685. return Object(requireObjectCoercible(argument));
  2686. };
  2687. /***/ }),
  2688. /***/ 4590:
  2689. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2690. var toPositiveInteger = __webpack_require__(3002);
  2691. module.exports = function (it, BYTES) {
  2692. var offset = toPositiveInteger(it);
  2693. if (offset % BYTES) throw RangeError('Wrong offset');
  2694. return offset;
  2695. };
  2696. /***/ }),
  2697. /***/ 3002:
  2698. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2699. var toInteger = __webpack_require__(9958);
  2700. module.exports = function (it) {
  2701. var result = toInteger(it);
  2702. if (result < 0) throw RangeError("The argument can't be less than 0");
  2703. return result;
  2704. };
  2705. /***/ }),
  2706. /***/ 7593:
  2707. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2708. var isObject = __webpack_require__(111);
  2709. // `ToPrimitive` abstract operation
  2710. // https://tc39.es/ecma262/#sec-toprimitive
  2711. // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  2712. // and the second argument - flag - preferred type is a string
  2713. module.exports = function (input, PREFERRED_STRING) {
  2714. if (!isObject(input)) return input;
  2715. var fn, val;
  2716. if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  2717. if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
  2718. if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  2719. throw TypeError("Can't convert object to primitive value");
  2720. };
  2721. /***/ }),
  2722. /***/ 1694:
  2723. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2724. var wellKnownSymbol = __webpack_require__(5112);
  2725. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  2726. var test = {};
  2727. test[TO_STRING_TAG] = 'z';
  2728. module.exports = String(test) === '[object z]';
  2729. /***/ }),
  2730. /***/ 9843:
  2731. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2732. "use strict";
  2733. var $ = __webpack_require__(2109);
  2734. var global = __webpack_require__(7854);
  2735. var DESCRIPTORS = __webpack_require__(9781);
  2736. var TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = __webpack_require__(3832);
  2737. var ArrayBufferViewCore = __webpack_require__(260);
  2738. var ArrayBufferModule = __webpack_require__(3331);
  2739. var anInstance = __webpack_require__(5787);
  2740. var createPropertyDescriptor = __webpack_require__(9114);
  2741. var createNonEnumerableProperty = __webpack_require__(8880);
  2742. var toLength = __webpack_require__(7466);
  2743. var toIndex = __webpack_require__(7067);
  2744. var toOffset = __webpack_require__(4590);
  2745. var toPrimitive = __webpack_require__(7593);
  2746. var has = __webpack_require__(6656);
  2747. var classof = __webpack_require__(648);
  2748. var isObject = __webpack_require__(111);
  2749. var create = __webpack_require__(30);
  2750. var setPrototypeOf = __webpack_require__(7674);
  2751. var getOwnPropertyNames = __webpack_require__(8006).f;
  2752. var typedArrayFrom = __webpack_require__(7321);
  2753. var forEach = __webpack_require__(2092).forEach;
  2754. var setSpecies = __webpack_require__(6340);
  2755. var definePropertyModule = __webpack_require__(3070);
  2756. var getOwnPropertyDescriptorModule = __webpack_require__(1236);
  2757. var InternalStateModule = __webpack_require__(9909);
  2758. var inheritIfRequired = __webpack_require__(9587);
  2759. var getInternalState = InternalStateModule.get;
  2760. var setInternalState = InternalStateModule.set;
  2761. var nativeDefineProperty = definePropertyModule.f;
  2762. var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  2763. var round = Math.round;
  2764. var RangeError = global.RangeError;
  2765. var ArrayBuffer = ArrayBufferModule.ArrayBuffer;
  2766. var DataView = ArrayBufferModule.DataView;
  2767. var NATIVE_ARRAY_BUFFER_VIEWS = ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;
  2768. var TYPED_ARRAY_TAG = ArrayBufferViewCore.TYPED_ARRAY_TAG;
  2769. var TypedArray = ArrayBufferViewCore.TypedArray;
  2770. var TypedArrayPrototype = ArrayBufferViewCore.TypedArrayPrototype;
  2771. var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
  2772. var isTypedArray = ArrayBufferViewCore.isTypedArray;
  2773. var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';
  2774. var WRONG_LENGTH = 'Wrong length';
  2775. var fromList = function (C, list) {
  2776. var index = 0;
  2777. var length = list.length;
  2778. var result = new (aTypedArrayConstructor(C))(length);
  2779. while (length > index) result[index] = list[index++];
  2780. return result;
  2781. };
  2782. var addGetter = function (it, key) {
  2783. nativeDefineProperty(it, key, { get: function () {
  2784. return getInternalState(this)[key];
  2785. } });
  2786. };
  2787. var isArrayBuffer = function (it) {
  2788. var klass;
  2789. return it instanceof ArrayBuffer || (klass = classof(it)) == 'ArrayBuffer' || klass == 'SharedArrayBuffer';
  2790. };
  2791. var isTypedArrayIndex = function (target, key) {
  2792. return isTypedArray(target)
  2793. && typeof key != 'symbol'
  2794. && key in target
  2795. && String(+key) == String(key);
  2796. };
  2797. var wrappedGetOwnPropertyDescriptor = function getOwnPropertyDescriptor(target, key) {
  2798. return isTypedArrayIndex(target, key = toPrimitive(key, true))
  2799. ? createPropertyDescriptor(2, target[key])
  2800. : nativeGetOwnPropertyDescriptor(target, key);
  2801. };
  2802. var wrappedDefineProperty = function defineProperty(target, key, descriptor) {
  2803. if (isTypedArrayIndex(target, key = toPrimitive(key, true))
  2804. && isObject(descriptor)
  2805. && has(descriptor, 'value')
  2806. && !has(descriptor, 'get')
  2807. && !has(descriptor, 'set')
  2808. // TODO: add validation descriptor w/o calling accessors
  2809. && !descriptor.configurable
  2810. && (!has(descriptor, 'writable') || descriptor.writable)
  2811. && (!has(descriptor, 'enumerable') || descriptor.enumerable)
  2812. ) {
  2813. target[key] = descriptor.value;
  2814. return target;
  2815. } return nativeDefineProperty(target, key, descriptor);
  2816. };
  2817. if (DESCRIPTORS) {
  2818. if (!NATIVE_ARRAY_BUFFER_VIEWS) {
  2819. getOwnPropertyDescriptorModule.f = wrappedGetOwnPropertyDescriptor;
  2820. definePropertyModule.f = wrappedDefineProperty;
  2821. addGetter(TypedArrayPrototype, 'buffer');
  2822. addGetter(TypedArrayPrototype, 'byteOffset');
  2823. addGetter(TypedArrayPrototype, 'byteLength');
  2824. addGetter(TypedArrayPrototype, 'length');
  2825. }
  2826. $({ target: 'Object', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, {
  2827. getOwnPropertyDescriptor: wrappedGetOwnPropertyDescriptor,
  2828. defineProperty: wrappedDefineProperty
  2829. });
  2830. module.exports = function (TYPE, wrapper, CLAMPED) {
  2831. var BYTES = TYPE.match(/\d+$/)[0] / 8;
  2832. var CONSTRUCTOR_NAME = TYPE + (CLAMPED ? 'Clamped' : '') + 'Array';
  2833. var GETTER = 'get' + TYPE;
  2834. var SETTER = 'set' + TYPE;
  2835. var NativeTypedArrayConstructor = global[CONSTRUCTOR_NAME];
  2836. var TypedArrayConstructor = NativeTypedArrayConstructor;
  2837. var TypedArrayConstructorPrototype = TypedArrayConstructor && TypedArrayConstructor.prototype;
  2838. var exported = {};
  2839. var getter = function (that, index) {
  2840. var data = getInternalState(that);
  2841. return data.view[GETTER](index * BYTES + data.byteOffset, true);
  2842. };
  2843. var setter = function (that, index, value) {
  2844. var data = getInternalState(that);
  2845. if (CLAMPED) value = (value = round(value)) < 0 ? 0 : value > 0xFF ? 0xFF : value & 0xFF;
  2846. data.view[SETTER](index * BYTES + data.byteOffset, value, true);
  2847. };
  2848. var addElement = function (that, index) {
  2849. nativeDefineProperty(that, index, {
  2850. get: function () {
  2851. return getter(this, index);
  2852. },
  2853. set: function (value) {
  2854. return setter(this, index, value);
  2855. },
  2856. enumerable: true
  2857. });
  2858. };
  2859. if (!NATIVE_ARRAY_BUFFER_VIEWS) {
  2860. TypedArrayConstructor = wrapper(function (that, data, offset, $length) {
  2861. anInstance(that, TypedArrayConstructor, CONSTRUCTOR_NAME);
  2862. var index = 0;
  2863. var byteOffset = 0;
  2864. var buffer, byteLength, length;
  2865. if (!isObject(data)) {
  2866. length = toIndex(data);
  2867. byteLength = length * BYTES;
  2868. buffer = new ArrayBuffer(byteLength);
  2869. } else if (isArrayBuffer(data)) {
  2870. buffer = data;
  2871. byteOffset = toOffset(offset, BYTES);
  2872. var $len = data.byteLength;
  2873. if ($length === undefined) {
  2874. if ($len % BYTES) throw RangeError(WRONG_LENGTH);
  2875. byteLength = $len - byteOffset;
  2876. if (byteLength < 0) throw RangeError(WRONG_LENGTH);
  2877. } else {
  2878. byteLength = toLength($length) * BYTES;
  2879. if (byteLength + byteOffset > $len) throw RangeError(WRONG_LENGTH);
  2880. }
  2881. length = byteLength / BYTES;
  2882. } else if (isTypedArray(data)) {
  2883. return fromList(TypedArrayConstructor, data);
  2884. } else {
  2885. return typedArrayFrom.call(TypedArrayConstructor, data);
  2886. }
  2887. setInternalState(that, {
  2888. buffer: buffer,
  2889. byteOffset: byteOffset,
  2890. byteLength: byteLength,
  2891. length: length,
  2892. view: new DataView(buffer)
  2893. });
  2894. while (index < length) addElement(that, index++);
  2895. });
  2896. if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);
  2897. TypedArrayConstructorPrototype = TypedArrayConstructor.prototype = create(TypedArrayPrototype);
  2898. } else if (TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS) {
  2899. TypedArrayConstructor = wrapper(function (dummy, data, typedArrayOffset, $length) {
  2900. anInstance(dummy, TypedArrayConstructor, CONSTRUCTOR_NAME);
  2901. return inheritIfRequired(function () {
  2902. if (!isObject(data)) return new NativeTypedArrayConstructor(toIndex(data));
  2903. if (isArrayBuffer(data)) return $length !== undefined
  2904. ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES), $length)
  2905. : typedArrayOffset !== undefined
  2906. ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES))
  2907. : new NativeTypedArrayConstructor(data);
  2908. if (isTypedArray(data)) return fromList(TypedArrayConstructor, data);
  2909. return typedArrayFrom.call(TypedArrayConstructor, data);
  2910. }(), dummy, TypedArrayConstructor);
  2911. });
  2912. if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);
  2913. forEach(getOwnPropertyNames(NativeTypedArrayConstructor), function (key) {
  2914. if (!(key in TypedArrayConstructor)) {
  2915. createNonEnumerableProperty(TypedArrayConstructor, key, NativeTypedArrayConstructor[key]);
  2916. }
  2917. });
  2918. TypedArrayConstructor.prototype = TypedArrayConstructorPrototype;
  2919. }
  2920. if (TypedArrayConstructorPrototype.constructor !== TypedArrayConstructor) {
  2921. createNonEnumerableProperty(TypedArrayConstructorPrototype, 'constructor', TypedArrayConstructor);
  2922. }
  2923. if (TYPED_ARRAY_TAG) {
  2924. createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_TAG, CONSTRUCTOR_NAME);
  2925. }
  2926. exported[CONSTRUCTOR_NAME] = TypedArrayConstructor;
  2927. $({
  2928. global: true, forced: TypedArrayConstructor != NativeTypedArrayConstructor, sham: !NATIVE_ARRAY_BUFFER_VIEWS
  2929. }, exported);
  2930. if (!(BYTES_PER_ELEMENT in TypedArrayConstructor)) {
  2931. createNonEnumerableProperty(TypedArrayConstructor, BYTES_PER_ELEMENT, BYTES);
  2932. }
  2933. if (!(BYTES_PER_ELEMENT in TypedArrayConstructorPrototype)) {
  2934. createNonEnumerableProperty(TypedArrayConstructorPrototype, BYTES_PER_ELEMENT, BYTES);
  2935. }
  2936. setSpecies(CONSTRUCTOR_NAME);
  2937. };
  2938. } else module.exports = function () { /* empty */ };
  2939. /***/ }),
  2940. /***/ 3832:
  2941. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2942. /* eslint-disable no-new -- required for testing */
  2943. var global = __webpack_require__(7854);
  2944. var fails = __webpack_require__(7293);
  2945. var checkCorrectnessOfIteration = __webpack_require__(7072);
  2946. var NATIVE_ARRAY_BUFFER_VIEWS = __webpack_require__(260).NATIVE_ARRAY_BUFFER_VIEWS;
  2947. var ArrayBuffer = global.ArrayBuffer;
  2948. var Int8Array = global.Int8Array;
  2949. module.exports = !NATIVE_ARRAY_BUFFER_VIEWS || !fails(function () {
  2950. Int8Array(1);
  2951. }) || !fails(function () {
  2952. new Int8Array(-1);
  2953. }) || !checkCorrectnessOfIteration(function (iterable) {
  2954. new Int8Array();
  2955. new Int8Array(null);
  2956. new Int8Array(1.5);
  2957. new Int8Array(iterable);
  2958. }, true) || fails(function () {
  2959. // Safari (11+) bug - a reason why even Safari 13 should load a typed array polyfill
  2960. return new Int8Array(new ArrayBuffer(2), 1, undefined).length !== 1;
  2961. });
  2962. /***/ }),
  2963. /***/ 3074:
  2964. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2965. var aTypedArrayConstructor = __webpack_require__(260).aTypedArrayConstructor;
  2966. var speciesConstructor = __webpack_require__(6707);
  2967. module.exports = function (instance, list) {
  2968. var C = speciesConstructor(instance, instance.constructor);
  2969. var index = 0;
  2970. var length = list.length;
  2971. var result = new (aTypedArrayConstructor(C))(length);
  2972. while (length > index) result[index] = list[index++];
  2973. return result;
  2974. };
  2975. /***/ }),
  2976. /***/ 7321:
  2977. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2978. var toObject = __webpack_require__(7908);
  2979. var toLength = __webpack_require__(7466);
  2980. var getIteratorMethod = __webpack_require__(1246);
  2981. var isArrayIteratorMethod = __webpack_require__(7659);
  2982. var bind = __webpack_require__(9974);
  2983. var aTypedArrayConstructor = __webpack_require__(260).aTypedArrayConstructor;
  2984. module.exports = function from(source /* , mapfn, thisArg */) {
  2985. var O = toObject(source);
  2986. var argumentsLength = arguments.length;
  2987. var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
  2988. var mapping = mapfn !== undefined;
  2989. var iteratorMethod = getIteratorMethod(O);
  2990. var i, length, result, step, iterator, next;
  2991. if (iteratorMethod != undefined && !isArrayIteratorMethod(iteratorMethod)) {
  2992. iterator = iteratorMethod.call(O);
  2993. next = iterator.next;
  2994. O = [];
  2995. while (!(step = next.call(iterator)).done) {
  2996. O.push(step.value);
  2997. }
  2998. }
  2999. if (mapping && argumentsLength > 2) {
  3000. mapfn = bind(mapfn, arguments[2], 2);
  3001. }
  3002. length = toLength(O.length);
  3003. result = new (aTypedArrayConstructor(this))(length);
  3004. for (i = 0; length > i; i++) {
  3005. result[i] = mapping ? mapfn(O[i], i) : O[i];
  3006. }
  3007. return result;
  3008. };
  3009. /***/ }),
  3010. /***/ 9711:
  3011. /***/ (function(module) {
  3012. var id = 0;
  3013. var postfix = Math.random();
  3014. module.exports = function (key) {
  3015. return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
  3016. };
  3017. /***/ }),
  3018. /***/ 3307:
  3019. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3020. var NATIVE_SYMBOL = __webpack_require__(133);
  3021. module.exports = NATIVE_SYMBOL
  3022. /* global Symbol -- safe */
  3023. && !Symbol.sham
  3024. && typeof Symbol.iterator == 'symbol';
  3025. /***/ }),
  3026. /***/ 5112:
  3027. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3028. var global = __webpack_require__(7854);
  3029. var shared = __webpack_require__(2309);
  3030. var has = __webpack_require__(6656);
  3031. var uid = __webpack_require__(9711);
  3032. var NATIVE_SYMBOL = __webpack_require__(133);
  3033. var USE_SYMBOL_AS_UID = __webpack_require__(3307);
  3034. var WellKnownSymbolsStore = shared('wks');
  3035. var Symbol = global.Symbol;
  3036. var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;
  3037. module.exports = function (name) {
  3038. if (!has(WellKnownSymbolsStore, name)) {
  3039. if (NATIVE_SYMBOL && has(Symbol, name)) WellKnownSymbolsStore[name] = Symbol[name];
  3040. else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
  3041. } return WellKnownSymbolsStore[name];
  3042. };
  3043. /***/ }),
  3044. /***/ 1361:
  3045. /***/ (function(module) {
  3046. // a string of all valid unicode whitespaces
  3047. module.exports = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
  3048. '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
  3049. /***/ }),
  3050. /***/ 8264:
  3051. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3052. "use strict";
  3053. var $ = __webpack_require__(2109);
  3054. var global = __webpack_require__(7854);
  3055. var arrayBufferModule = __webpack_require__(3331);
  3056. var setSpecies = __webpack_require__(6340);
  3057. var ARRAY_BUFFER = 'ArrayBuffer';
  3058. var ArrayBuffer = arrayBufferModule[ARRAY_BUFFER];
  3059. var NativeArrayBuffer = global[ARRAY_BUFFER];
  3060. // `ArrayBuffer` constructor
  3061. // https://tc39.es/ecma262/#sec-arraybuffer-constructor
  3062. $({ global: true, forced: NativeArrayBuffer !== ArrayBuffer }, {
  3063. ArrayBuffer: ArrayBuffer
  3064. });
  3065. setSpecies(ARRAY_BUFFER);
  3066. /***/ }),
  3067. /***/ 2222:
  3068. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3069. "use strict";
  3070. var $ = __webpack_require__(2109);
  3071. var fails = __webpack_require__(7293);
  3072. var isArray = __webpack_require__(3157);
  3073. var isObject = __webpack_require__(111);
  3074. var toObject = __webpack_require__(7908);
  3075. var toLength = __webpack_require__(7466);
  3076. var createProperty = __webpack_require__(6135);
  3077. var arraySpeciesCreate = __webpack_require__(5417);
  3078. var arrayMethodHasSpeciesSupport = __webpack_require__(1194);
  3079. var wellKnownSymbol = __webpack_require__(5112);
  3080. var V8_VERSION = __webpack_require__(7392);
  3081. var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
  3082. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
  3083. var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
  3084. // We can't use this feature detection in V8 since it causes
  3085. // deoptimization and serious performance degradation
  3086. // https://github.com/zloirock/core-js/issues/679
  3087. var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {
  3088. var array = [];
  3089. array[IS_CONCAT_SPREADABLE] = false;
  3090. return array.concat()[0] !== array;
  3091. });
  3092. var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
  3093. var isConcatSpreadable = function (O) {
  3094. if (!isObject(O)) return false;
  3095. var spreadable = O[IS_CONCAT_SPREADABLE];
  3096. return spreadable !== undefined ? !!spreadable : isArray(O);
  3097. };
  3098. var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
  3099. // `Array.prototype.concat` method
  3100. // https://tc39.es/ecma262/#sec-array.prototype.concat
  3101. // with adding support of @@isConcatSpreadable and @@species
  3102. $({ target: 'Array', proto: true, forced: FORCED }, {
  3103. // eslint-disable-next-line no-unused-vars -- required for `.length`
  3104. concat: function concat(arg) {
  3105. var O = toObject(this);
  3106. var A = arraySpeciesCreate(O, 0);
  3107. var n = 0;
  3108. var i, k, length, len, E;
  3109. for (i = -1, length = arguments.length; i < length; i++) {
  3110. E = i === -1 ? O : arguments[i];
  3111. if (isConcatSpreadable(E)) {
  3112. len = toLength(E.length);
  3113. if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  3114. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  3115. } else {
  3116. if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  3117. createProperty(A, n++, E);
  3118. }
  3119. }
  3120. A.length = n;
  3121. return A;
  3122. }
  3123. });
  3124. /***/ }),
  3125. /***/ 7327:
  3126. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3127. "use strict";
  3128. var $ = __webpack_require__(2109);
  3129. var $filter = __webpack_require__(2092).filter;
  3130. var arrayMethodHasSpeciesSupport = __webpack_require__(1194);
  3131. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
  3132. // `Array.prototype.filter` method
  3133. // https://tc39.es/ecma262/#sec-array.prototype.filter
  3134. // with adding support of @@species
  3135. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  3136. filter: function filter(callbackfn /* , thisArg */) {
  3137. return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  3138. }
  3139. });
  3140. /***/ }),
  3141. /***/ 2772:
  3142. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3143. "use strict";
  3144. var $ = __webpack_require__(2109);
  3145. var $indexOf = __webpack_require__(1318).indexOf;
  3146. var arrayMethodIsStrict = __webpack_require__(9341);
  3147. var nativeIndexOf = [].indexOf;
  3148. var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;
  3149. var STRICT_METHOD = arrayMethodIsStrict('indexOf');
  3150. // `Array.prototype.indexOf` method
  3151. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  3152. $({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD }, {
  3153. indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
  3154. return NEGATIVE_ZERO
  3155. // convert -0 to +0
  3156. ? nativeIndexOf.apply(this, arguments) || 0
  3157. : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);
  3158. }
  3159. });
  3160. /***/ }),
  3161. /***/ 6992:
  3162. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3163. "use strict";
  3164. var toIndexedObject = __webpack_require__(5656);
  3165. var addToUnscopables = __webpack_require__(1223);
  3166. var Iterators = __webpack_require__(7497);
  3167. var InternalStateModule = __webpack_require__(9909);
  3168. var defineIterator = __webpack_require__(654);
  3169. var ARRAY_ITERATOR = 'Array Iterator';
  3170. var setInternalState = InternalStateModule.set;
  3171. var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
  3172. // `Array.prototype.entries` method
  3173. // https://tc39.es/ecma262/#sec-array.prototype.entries
  3174. // `Array.prototype.keys` method
  3175. // https://tc39.es/ecma262/#sec-array.prototype.keys
  3176. // `Array.prototype.values` method
  3177. // https://tc39.es/ecma262/#sec-array.prototype.values
  3178. // `Array.prototype[@@iterator]` method
  3179. // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
  3180. // `CreateArrayIterator` internal method
  3181. // https://tc39.es/ecma262/#sec-createarrayiterator
  3182. module.exports = defineIterator(Array, 'Array', function (iterated, kind) {
  3183. setInternalState(this, {
  3184. type: ARRAY_ITERATOR,
  3185. target: toIndexedObject(iterated), // target
  3186. index: 0, // next index
  3187. kind: kind // kind
  3188. });
  3189. // `%ArrayIteratorPrototype%.next` method
  3190. // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
  3191. }, function () {
  3192. var state = getInternalState(this);
  3193. var target = state.target;
  3194. var kind = state.kind;
  3195. var index = state.index++;
  3196. if (!target || index >= target.length) {
  3197. state.target = undefined;
  3198. return { value: undefined, done: true };
  3199. }
  3200. if (kind == 'keys') return { value: index, done: false };
  3201. if (kind == 'values') return { value: target[index], done: false };
  3202. return { value: [index, target[index]], done: false };
  3203. }, 'values');
  3204. // argumentsList[@@iterator] is %ArrayProto_values%
  3205. // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
  3206. // https://tc39.es/ecma262/#sec-createmappedargumentsobject
  3207. Iterators.Arguments = Iterators.Array;
  3208. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  3209. addToUnscopables('keys');
  3210. addToUnscopables('values');
  3211. addToUnscopables('entries');
  3212. /***/ }),
  3213. /***/ 1249:
  3214. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3215. "use strict";
  3216. var $ = __webpack_require__(2109);
  3217. var $map = __webpack_require__(2092).map;
  3218. var arrayMethodHasSpeciesSupport = __webpack_require__(1194);
  3219. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
  3220. // `Array.prototype.map` method
  3221. // https://tc39.es/ecma262/#sec-array.prototype.map
  3222. // with adding support of @@species
  3223. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  3224. map: function map(callbackfn /* , thisArg */) {
  3225. return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  3226. }
  3227. });
  3228. /***/ }),
  3229. /***/ 7042:
  3230. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3231. "use strict";
  3232. var $ = __webpack_require__(2109);
  3233. var isObject = __webpack_require__(111);
  3234. var isArray = __webpack_require__(3157);
  3235. var toAbsoluteIndex = __webpack_require__(1400);
  3236. var toLength = __webpack_require__(7466);
  3237. var toIndexedObject = __webpack_require__(5656);
  3238. var createProperty = __webpack_require__(6135);
  3239. var wellKnownSymbol = __webpack_require__(5112);
  3240. var arrayMethodHasSpeciesSupport = __webpack_require__(1194);
  3241. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');
  3242. var SPECIES = wellKnownSymbol('species');
  3243. var nativeSlice = [].slice;
  3244. var max = Math.max;
  3245. // `Array.prototype.slice` method
  3246. // https://tc39.es/ecma262/#sec-array.prototype.slice
  3247. // fallback for not array-like ES3 strings and DOM objects
  3248. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  3249. slice: function slice(start, end) {
  3250. var O = toIndexedObject(this);
  3251. var length = toLength(O.length);
  3252. var k = toAbsoluteIndex(start, length);
  3253. var fin = toAbsoluteIndex(end === undefined ? length : end, length);
  3254. // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
  3255. var Constructor, result, n;
  3256. if (isArray(O)) {
  3257. Constructor = O.constructor;
  3258. // cross-realm fallback
  3259. if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {
  3260. Constructor = undefined;
  3261. } else if (isObject(Constructor)) {
  3262. Constructor = Constructor[SPECIES];
  3263. if (Constructor === null) Constructor = undefined;
  3264. }
  3265. if (Constructor === Array || Constructor === undefined) {
  3266. return nativeSlice.call(O, k, fin);
  3267. }
  3268. }
  3269. result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));
  3270. for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
  3271. result.length = n;
  3272. return result;
  3273. }
  3274. });
  3275. /***/ }),
  3276. /***/ 561:
  3277. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3278. "use strict";
  3279. var $ = __webpack_require__(2109);
  3280. var toAbsoluteIndex = __webpack_require__(1400);
  3281. var toInteger = __webpack_require__(9958);
  3282. var toLength = __webpack_require__(7466);
  3283. var toObject = __webpack_require__(7908);
  3284. var arraySpeciesCreate = __webpack_require__(5417);
  3285. var createProperty = __webpack_require__(6135);
  3286. var arrayMethodHasSpeciesSupport = __webpack_require__(1194);
  3287. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');
  3288. var max = Math.max;
  3289. var min = Math.min;
  3290. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
  3291. var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';
  3292. // `Array.prototype.splice` method
  3293. // https://tc39.es/ecma262/#sec-array.prototype.splice
  3294. // with adding support of @@species
  3295. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  3296. splice: function splice(start, deleteCount /* , ...items */) {
  3297. var O = toObject(this);
  3298. var len = toLength(O.length);
  3299. var actualStart = toAbsoluteIndex(start, len);
  3300. var argumentsLength = arguments.length;
  3301. var insertCount, actualDeleteCount, A, k, from, to;
  3302. if (argumentsLength === 0) {
  3303. insertCount = actualDeleteCount = 0;
  3304. } else if (argumentsLength === 1) {
  3305. insertCount = 0;
  3306. actualDeleteCount = len - actualStart;
  3307. } else {
  3308. insertCount = argumentsLength - 2;
  3309. actualDeleteCount = min(max(toInteger(deleteCount), 0), len - actualStart);
  3310. }
  3311. if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {
  3312. throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);
  3313. }
  3314. A = arraySpeciesCreate(O, actualDeleteCount);
  3315. for (k = 0; k < actualDeleteCount; k++) {
  3316. from = actualStart + k;
  3317. if (from in O) createProperty(A, k, O[from]);
  3318. }
  3319. A.length = actualDeleteCount;
  3320. if (insertCount < actualDeleteCount) {
  3321. for (k = actualStart; k < len - actualDeleteCount; k++) {
  3322. from = k + actualDeleteCount;
  3323. to = k + insertCount;
  3324. if (from in O) O[to] = O[from];
  3325. else delete O[to];
  3326. }
  3327. for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];
  3328. } else if (insertCount > actualDeleteCount) {
  3329. for (k = len - actualDeleteCount; k > actualStart; k--) {
  3330. from = k + actualDeleteCount - 1;
  3331. to = k + insertCount - 1;
  3332. if (from in O) O[to] = O[from];
  3333. else delete O[to];
  3334. }
  3335. }
  3336. for (k = 0; k < insertCount; k++) {
  3337. O[k + actualStart] = arguments[k + 2];
  3338. }
  3339. O.length = len - actualDeleteCount + insertCount;
  3340. return A;
  3341. }
  3342. });
  3343. /***/ }),
  3344. /***/ 8309:
  3345. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3346. var DESCRIPTORS = __webpack_require__(9781);
  3347. var defineProperty = __webpack_require__(3070).f;
  3348. var FunctionPrototype = Function.prototype;
  3349. var FunctionPrototypeToString = FunctionPrototype.toString;
  3350. var nameRE = /^\s*function ([^ (]*)/;
  3351. var NAME = 'name';
  3352. // Function instances `.name` property
  3353. // https://tc39.es/ecma262/#sec-function-instances-name
  3354. if (DESCRIPTORS && !(NAME in FunctionPrototype)) {
  3355. defineProperty(FunctionPrototype, NAME, {
  3356. configurable: true,
  3357. get: function () {
  3358. try {
  3359. return FunctionPrototypeToString.call(this).match(nameRE)[1];
  3360. } catch (error) {
  3361. return '';
  3362. }
  3363. }
  3364. });
  3365. }
  3366. /***/ }),
  3367. /***/ 489:
  3368. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3369. var $ = __webpack_require__(2109);
  3370. var fails = __webpack_require__(7293);
  3371. var toObject = __webpack_require__(7908);
  3372. var nativeGetPrototypeOf = __webpack_require__(9518);
  3373. var CORRECT_PROTOTYPE_GETTER = __webpack_require__(8544);
  3374. var FAILS_ON_PRIMITIVES = fails(function () { nativeGetPrototypeOf(1); });
  3375. // `Object.getPrototypeOf` method
  3376. // https://tc39.es/ecma262/#sec-object.getprototypeof
  3377. $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PROTOTYPE_GETTER }, {
  3378. getPrototypeOf: function getPrototypeOf(it) {
  3379. return nativeGetPrototypeOf(toObject(it));
  3380. }
  3381. });
  3382. /***/ }),
  3383. /***/ 1539:
  3384. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3385. var TO_STRING_TAG_SUPPORT = __webpack_require__(1694);
  3386. var redefine = __webpack_require__(1320);
  3387. var toString = __webpack_require__(288);
  3388. // `Object.prototype.toString` method
  3389. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  3390. if (!TO_STRING_TAG_SUPPORT) {
  3391. redefine(Object.prototype, 'toString', toString, { unsafe: true });
  3392. }
  3393. /***/ }),
  3394. /***/ 4916:
  3395. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3396. "use strict";
  3397. var $ = __webpack_require__(2109);
  3398. var exec = __webpack_require__(2261);
  3399. // `RegExp.prototype.exec` method
  3400. // https://tc39.es/ecma262/#sec-regexp.prototype.exec
  3401. $({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
  3402. exec: exec
  3403. });
  3404. /***/ }),
  3405. /***/ 9714:
  3406. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3407. "use strict";
  3408. var redefine = __webpack_require__(1320);
  3409. var anObject = __webpack_require__(9670);
  3410. var fails = __webpack_require__(7293);
  3411. var flags = __webpack_require__(7066);
  3412. var TO_STRING = 'toString';
  3413. var RegExpPrototype = RegExp.prototype;
  3414. var nativeToString = RegExpPrototype[TO_STRING];
  3415. var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
  3416. // FF44- RegExp#toString has a wrong name
  3417. var INCORRECT_NAME = nativeToString.name != TO_STRING;
  3418. // `RegExp.prototype.toString` method
  3419. // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
  3420. if (NOT_GENERIC || INCORRECT_NAME) {
  3421. redefine(RegExp.prototype, TO_STRING, function toString() {
  3422. var R = anObject(this);
  3423. var p = String(R.source);
  3424. var rf = R.flags;
  3425. var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf);
  3426. return '/' + p + '/' + f;
  3427. }, { unsafe: true });
  3428. }
  3429. /***/ }),
  3430. /***/ 8783:
  3431. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3432. "use strict";
  3433. var charAt = __webpack_require__(8710).charAt;
  3434. var InternalStateModule = __webpack_require__(9909);
  3435. var defineIterator = __webpack_require__(654);
  3436. var STRING_ITERATOR = 'String Iterator';
  3437. var setInternalState = InternalStateModule.set;
  3438. var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);
  3439. // `String.prototype[@@iterator]` method
  3440. // https://tc39.es/ecma262/#sec-string.prototype-@@iterator
  3441. defineIterator(String, 'String', function (iterated) {
  3442. setInternalState(this, {
  3443. type: STRING_ITERATOR,
  3444. string: String(iterated),
  3445. index: 0
  3446. });
  3447. // `%StringIteratorPrototype%.next` method
  3448. // https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next
  3449. }, function next() {
  3450. var state = getInternalState(this);
  3451. var string = state.string;
  3452. var index = state.index;
  3453. var point;
  3454. if (index >= string.length) return { value: undefined, done: true };
  3455. point = charAt(string, index);
  3456. state.index += point.length;
  3457. return { value: point, done: false };
  3458. });
  3459. /***/ }),
  3460. /***/ 4723:
  3461. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3462. "use strict";
  3463. var fixRegExpWellKnownSymbolLogic = __webpack_require__(7007);
  3464. var anObject = __webpack_require__(9670);
  3465. var toLength = __webpack_require__(7466);
  3466. var requireObjectCoercible = __webpack_require__(4488);
  3467. var advanceStringIndex = __webpack_require__(1530);
  3468. var regExpExec = __webpack_require__(7651);
  3469. // @@match logic
  3470. fixRegExpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {
  3471. return [
  3472. // `String.prototype.match` method
  3473. // https://tc39.es/ecma262/#sec-string.prototype.match
  3474. function match(regexp) {
  3475. var O = requireObjectCoercible(this);
  3476. var matcher = regexp == undefined ? undefined : regexp[MATCH];
  3477. return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
  3478. },
  3479. // `RegExp.prototype[@@match]` method
  3480. // https://tc39.es/ecma262/#sec-regexp.prototype-@@match
  3481. function (regexp) {
  3482. var res = maybeCallNative(nativeMatch, regexp, this);
  3483. if (res.done) return res.value;
  3484. var rx = anObject(regexp);
  3485. var S = String(this);
  3486. if (!rx.global) return regExpExec(rx, S);
  3487. var fullUnicode = rx.unicode;
  3488. rx.lastIndex = 0;
  3489. var A = [];
  3490. var n = 0;
  3491. var result;
  3492. while ((result = regExpExec(rx, S)) !== null) {
  3493. var matchStr = String(result[0]);
  3494. A[n] = matchStr;
  3495. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  3496. n++;
  3497. }
  3498. return n === 0 ? null : A;
  3499. }
  3500. ];
  3501. });
  3502. /***/ }),
  3503. /***/ 5306:
  3504. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3505. "use strict";
  3506. var fixRegExpWellKnownSymbolLogic = __webpack_require__(7007);
  3507. var anObject = __webpack_require__(9670);
  3508. var toLength = __webpack_require__(7466);
  3509. var toInteger = __webpack_require__(9958);
  3510. var requireObjectCoercible = __webpack_require__(4488);
  3511. var advanceStringIndex = __webpack_require__(1530);
  3512. var getSubstitution = __webpack_require__(647);
  3513. var regExpExec = __webpack_require__(7651);
  3514. var max = Math.max;
  3515. var min = Math.min;
  3516. var maybeToString = function (it) {
  3517. return it === undefined ? it : String(it);
  3518. };
  3519. // @@replace logic
  3520. fixRegExpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {
  3521. var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;
  3522. var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0;
  3523. var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
  3524. return [
  3525. // `String.prototype.replace` method
  3526. // https://tc39.es/ecma262/#sec-string.prototype.replace
  3527. function replace(searchValue, replaceValue) {
  3528. var O = requireObjectCoercible(this);
  3529. var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
  3530. return replacer !== undefined
  3531. ? replacer.call(searchValue, O, replaceValue)
  3532. : nativeReplace.call(String(O), searchValue, replaceValue);
  3533. },
  3534. // `RegExp.prototype[@@replace]` method
  3535. // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
  3536. function (regexp, replaceValue) {
  3537. if (
  3538. (!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||
  3539. (typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1)
  3540. ) {
  3541. var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
  3542. if (res.done) return res.value;
  3543. }
  3544. var rx = anObject(regexp);
  3545. var S = String(this);
  3546. var functionalReplace = typeof replaceValue === 'function';
  3547. if (!functionalReplace) replaceValue = String(replaceValue);
  3548. var global = rx.global;
  3549. if (global) {
  3550. var fullUnicode = rx.unicode;
  3551. rx.lastIndex = 0;
  3552. }
  3553. var results = [];
  3554. while (true) {
  3555. var result = regExpExec(rx, S);
  3556. if (result === null) break;
  3557. results.push(result);
  3558. if (!global) break;
  3559. var matchStr = String(result[0]);
  3560. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  3561. }
  3562. var accumulatedResult = '';
  3563. var nextSourcePosition = 0;
  3564. for (var i = 0; i < results.length; i++) {
  3565. result = results[i];
  3566. var matched = String(result[0]);
  3567. var position = max(min(toInteger(result.index), S.length), 0);
  3568. var captures = [];
  3569. // NOTE: This is equivalent to
  3570. // captures = result.slice(1).map(maybeToString)
  3571. // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
  3572. // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
  3573. // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
  3574. for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
  3575. var namedCaptures = result.groups;
  3576. if (functionalReplace) {
  3577. var replacerArgs = [matched].concat(captures, position, S);
  3578. if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
  3579. var replacement = String(replaceValue.apply(undefined, replacerArgs));
  3580. } else {
  3581. replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
  3582. }
  3583. if (position >= nextSourcePosition) {
  3584. accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
  3585. nextSourcePosition = position + matched.length;
  3586. }
  3587. }
  3588. return accumulatedResult + S.slice(nextSourcePosition);
  3589. }
  3590. ];
  3591. });
  3592. /***/ }),
  3593. /***/ 3123:
  3594. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3595. "use strict";
  3596. var fixRegExpWellKnownSymbolLogic = __webpack_require__(7007);
  3597. var isRegExp = __webpack_require__(7850);
  3598. var anObject = __webpack_require__(9670);
  3599. var requireObjectCoercible = __webpack_require__(4488);
  3600. var speciesConstructor = __webpack_require__(6707);
  3601. var advanceStringIndex = __webpack_require__(1530);
  3602. var toLength = __webpack_require__(7466);
  3603. var callRegExpExec = __webpack_require__(7651);
  3604. var regexpExec = __webpack_require__(2261);
  3605. var fails = __webpack_require__(7293);
  3606. var arrayPush = [].push;
  3607. var min = Math.min;
  3608. var MAX_UINT32 = 0xFFFFFFFF;
  3609. // babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
  3610. var SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); });
  3611. // @@split logic
  3612. fixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) {
  3613. var internalSplit;
  3614. if (
  3615. 'abbc'.split(/(b)*/)[1] == 'c' ||
  3616. // eslint-disable-next-line regexp/no-empty-group -- required for testing
  3617. 'test'.split(/(?:)/, -1).length != 4 ||
  3618. 'ab'.split(/(?:ab)*/).length != 2 ||
  3619. '.'.split(/(.?)(.?)/).length != 4 ||
  3620. // eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing
  3621. '.'.split(/()()/).length > 1 ||
  3622. ''.split(/.?/).length
  3623. ) {
  3624. // based on es5-shim implementation, need to rework it
  3625. internalSplit = function (separator, limit) {
  3626. var string = String(requireObjectCoercible(this));
  3627. var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
  3628. if (lim === 0) return [];
  3629. if (separator === undefined) return [string];
  3630. // If `separator` is not a regex, use native split
  3631. if (!isRegExp(separator)) {
  3632. return nativeSplit.call(string, separator, lim);
  3633. }
  3634. var output = [];
  3635. var flags = (separator.ignoreCase ? 'i' : '') +
  3636. (separator.multiline ? 'm' : '') +
  3637. (separator.unicode ? 'u' : '') +
  3638. (separator.sticky ? 'y' : '');
  3639. var lastLastIndex = 0;
  3640. // Make `global` and avoid `lastIndex` issues by working with a copy
  3641. var separatorCopy = new RegExp(separator.source, flags + 'g');
  3642. var match, lastIndex, lastLength;
  3643. while (match = regexpExec.call(separatorCopy, string)) {
  3644. lastIndex = separatorCopy.lastIndex;
  3645. if (lastIndex > lastLastIndex) {
  3646. output.push(string.slice(lastLastIndex, match.index));
  3647. if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));
  3648. lastLength = match[0].length;
  3649. lastLastIndex = lastIndex;
  3650. if (output.length >= lim) break;
  3651. }
  3652. if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
  3653. }
  3654. if (lastLastIndex === string.length) {
  3655. if (lastLength || !separatorCopy.test('')) output.push('');
  3656. } else output.push(string.slice(lastLastIndex));
  3657. return output.length > lim ? output.slice(0, lim) : output;
  3658. };
  3659. // Chakra, V8
  3660. } else if ('0'.split(undefined, 0).length) {
  3661. internalSplit = function (separator, limit) {
  3662. return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);
  3663. };
  3664. } else internalSplit = nativeSplit;
  3665. return [
  3666. // `String.prototype.split` method
  3667. // https://tc39.es/ecma262/#sec-string.prototype.split
  3668. function split(separator, limit) {
  3669. var O = requireObjectCoercible(this);
  3670. var splitter = separator == undefined ? undefined : separator[SPLIT];
  3671. return splitter !== undefined
  3672. ? splitter.call(separator, O, limit)
  3673. : internalSplit.call(String(O), separator, limit);
  3674. },
  3675. // `RegExp.prototype[@@split]` method
  3676. // https://tc39.es/ecma262/#sec-regexp.prototype-@@split
  3677. //
  3678. // NOTE: This cannot be properly polyfilled in engines that don't support
  3679. // the 'y' flag.
  3680. function (regexp, limit) {
  3681. var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit);
  3682. if (res.done) return res.value;
  3683. var rx = anObject(regexp);
  3684. var S = String(this);
  3685. var C = speciesConstructor(rx, RegExp);
  3686. var unicodeMatching = rx.unicode;
  3687. var flags = (rx.ignoreCase ? 'i' : '') +
  3688. (rx.multiline ? 'm' : '') +
  3689. (rx.unicode ? 'u' : '') +
  3690. (SUPPORTS_Y ? 'y' : 'g');
  3691. // ^(? + rx + ) is needed, in combination with some S slicing, to
  3692. // simulate the 'y' flag.
  3693. var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);
  3694. var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
  3695. if (lim === 0) return [];
  3696. if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
  3697. var p = 0;
  3698. var q = 0;
  3699. var A = [];
  3700. while (q < S.length) {
  3701. splitter.lastIndex = SUPPORTS_Y ? q : 0;
  3702. var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q));
  3703. var e;
  3704. if (
  3705. z === null ||
  3706. (e = min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p
  3707. ) {
  3708. q = advanceStringIndex(S, q, unicodeMatching);
  3709. } else {
  3710. A.push(S.slice(p, q));
  3711. if (A.length === lim) return A;
  3712. for (var i = 1; i <= z.length - 1; i++) {
  3713. A.push(z[i]);
  3714. if (A.length === lim) return A;
  3715. }
  3716. q = p = e;
  3717. }
  3718. }
  3719. A.push(S.slice(p));
  3720. return A;
  3721. }
  3722. ];
  3723. }, !SUPPORTS_Y);
  3724. /***/ }),
  3725. /***/ 3210:
  3726. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3727. "use strict";
  3728. var $ = __webpack_require__(2109);
  3729. var $trim = __webpack_require__(3111).trim;
  3730. var forcedStringTrimMethod = __webpack_require__(6091);
  3731. // `String.prototype.trim` method
  3732. // https://tc39.es/ecma262/#sec-string.prototype.trim
  3733. $({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
  3734. trim: function trim() {
  3735. return $trim(this);
  3736. }
  3737. });
  3738. /***/ }),
  3739. /***/ 2990:
  3740. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3741. "use strict";
  3742. var ArrayBufferViewCore = __webpack_require__(260);
  3743. var $copyWithin = __webpack_require__(1048);
  3744. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  3745. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  3746. // `%TypedArray%.prototype.copyWithin` method
  3747. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.copywithin
  3748. exportTypedArrayMethod('copyWithin', function copyWithin(target, start /* , end */) {
  3749. return $copyWithin.call(aTypedArray(this), target, start, arguments.length > 2 ? arguments[2] : undefined);
  3750. });
  3751. /***/ }),
  3752. /***/ 8927:
  3753. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3754. "use strict";
  3755. var ArrayBufferViewCore = __webpack_require__(260);
  3756. var $every = __webpack_require__(2092).every;
  3757. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  3758. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  3759. // `%TypedArray%.prototype.every` method
  3760. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.every
  3761. exportTypedArrayMethod('every', function every(callbackfn /* , thisArg */) {
  3762. return $every(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  3763. });
  3764. /***/ }),
  3765. /***/ 3105:
  3766. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3767. "use strict";
  3768. var ArrayBufferViewCore = __webpack_require__(260);
  3769. var $fill = __webpack_require__(1285);
  3770. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  3771. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  3772. // `%TypedArray%.prototype.fill` method
  3773. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill
  3774. // eslint-disable-next-line no-unused-vars -- required for `.length`
  3775. exportTypedArrayMethod('fill', function fill(value /* , start, end */) {
  3776. return $fill.apply(aTypedArray(this), arguments);
  3777. });
  3778. /***/ }),
  3779. /***/ 5035:
  3780. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3781. "use strict";
  3782. var ArrayBufferViewCore = __webpack_require__(260);
  3783. var $filter = __webpack_require__(2092).filter;
  3784. var fromSpeciesAndList = __webpack_require__(3074);
  3785. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  3786. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  3787. // `%TypedArray%.prototype.filter` method
  3788. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.filter
  3789. exportTypedArrayMethod('filter', function filter(callbackfn /* , thisArg */) {
  3790. var list = $filter(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  3791. return fromSpeciesAndList(this, list);
  3792. });
  3793. /***/ }),
  3794. /***/ 7174:
  3795. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3796. "use strict";
  3797. var ArrayBufferViewCore = __webpack_require__(260);
  3798. var $findIndex = __webpack_require__(2092).findIndex;
  3799. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  3800. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  3801. // `%TypedArray%.prototype.findIndex` method
  3802. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.findindex
  3803. exportTypedArrayMethod('findIndex', function findIndex(predicate /* , thisArg */) {
  3804. return $findIndex(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
  3805. });
  3806. /***/ }),
  3807. /***/ 4345:
  3808. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3809. "use strict";
  3810. var ArrayBufferViewCore = __webpack_require__(260);
  3811. var $find = __webpack_require__(2092).find;
  3812. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  3813. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  3814. // `%TypedArray%.prototype.find` method
  3815. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.find
  3816. exportTypedArrayMethod('find', function find(predicate /* , thisArg */) {
  3817. return $find(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
  3818. });
  3819. /***/ }),
  3820. /***/ 2846:
  3821. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3822. "use strict";
  3823. var ArrayBufferViewCore = __webpack_require__(260);
  3824. var $forEach = __webpack_require__(2092).forEach;
  3825. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  3826. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  3827. // `%TypedArray%.prototype.forEach` method
  3828. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.foreach
  3829. exportTypedArrayMethod('forEach', function forEach(callbackfn /* , thisArg */) {
  3830. $forEach(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  3831. });
  3832. /***/ }),
  3833. /***/ 4731:
  3834. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3835. "use strict";
  3836. var ArrayBufferViewCore = __webpack_require__(260);
  3837. var $includes = __webpack_require__(1318).includes;
  3838. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  3839. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  3840. // `%TypedArray%.prototype.includes` method
  3841. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.includes
  3842. exportTypedArrayMethod('includes', function includes(searchElement /* , fromIndex */) {
  3843. return $includes(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
  3844. });
  3845. /***/ }),
  3846. /***/ 7209:
  3847. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3848. "use strict";
  3849. var ArrayBufferViewCore = __webpack_require__(260);
  3850. var $indexOf = __webpack_require__(1318).indexOf;
  3851. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  3852. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  3853. // `%TypedArray%.prototype.indexOf` method
  3854. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.indexof
  3855. exportTypedArrayMethod('indexOf', function indexOf(searchElement /* , fromIndex */) {
  3856. return $indexOf(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
  3857. });
  3858. /***/ }),
  3859. /***/ 6319:
  3860. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3861. "use strict";
  3862. var global = __webpack_require__(7854);
  3863. var ArrayBufferViewCore = __webpack_require__(260);
  3864. var ArrayIterators = __webpack_require__(6992);
  3865. var wellKnownSymbol = __webpack_require__(5112);
  3866. var ITERATOR = wellKnownSymbol('iterator');
  3867. var Uint8Array = global.Uint8Array;
  3868. var arrayValues = ArrayIterators.values;
  3869. var arrayKeys = ArrayIterators.keys;
  3870. var arrayEntries = ArrayIterators.entries;
  3871. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  3872. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  3873. var nativeTypedArrayIterator = Uint8Array && Uint8Array.prototype[ITERATOR];
  3874. var CORRECT_ITER_NAME = !!nativeTypedArrayIterator
  3875. && (nativeTypedArrayIterator.name == 'values' || nativeTypedArrayIterator.name == undefined);
  3876. var typedArrayValues = function values() {
  3877. return arrayValues.call(aTypedArray(this));
  3878. };
  3879. // `%TypedArray%.prototype.entries` method
  3880. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.entries
  3881. exportTypedArrayMethod('entries', function entries() {
  3882. return arrayEntries.call(aTypedArray(this));
  3883. });
  3884. // `%TypedArray%.prototype.keys` method
  3885. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys
  3886. exportTypedArrayMethod('keys', function keys() {
  3887. return arrayKeys.call(aTypedArray(this));
  3888. });
  3889. // `%TypedArray%.prototype.values` method
  3890. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.values
  3891. exportTypedArrayMethod('values', typedArrayValues, !CORRECT_ITER_NAME);
  3892. // `%TypedArray%.prototype[@@iterator]` method
  3893. // https://tc39.es/ecma262/#sec-%typedarray%.prototype-@@iterator
  3894. exportTypedArrayMethod(ITERATOR, typedArrayValues, !CORRECT_ITER_NAME);
  3895. /***/ }),
  3896. /***/ 8867:
  3897. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3898. "use strict";
  3899. var ArrayBufferViewCore = __webpack_require__(260);
  3900. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  3901. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  3902. var $join = [].join;
  3903. // `%TypedArray%.prototype.join` method
  3904. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.join
  3905. // eslint-disable-next-line no-unused-vars -- required for `.length`
  3906. exportTypedArrayMethod('join', function join(separator) {
  3907. return $join.apply(aTypedArray(this), arguments);
  3908. });
  3909. /***/ }),
  3910. /***/ 7789:
  3911. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3912. "use strict";
  3913. var ArrayBufferViewCore = __webpack_require__(260);
  3914. var $lastIndexOf = __webpack_require__(6583);
  3915. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  3916. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  3917. // `%TypedArray%.prototype.lastIndexOf` method
  3918. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.lastindexof
  3919. // eslint-disable-next-line no-unused-vars -- required for `.length`
  3920. exportTypedArrayMethod('lastIndexOf', function lastIndexOf(searchElement /* , fromIndex */) {
  3921. return $lastIndexOf.apply(aTypedArray(this), arguments);
  3922. });
  3923. /***/ }),
  3924. /***/ 3739:
  3925. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3926. "use strict";
  3927. var ArrayBufferViewCore = __webpack_require__(260);
  3928. var $map = __webpack_require__(2092).map;
  3929. var speciesConstructor = __webpack_require__(6707);
  3930. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  3931. var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
  3932. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  3933. // `%TypedArray%.prototype.map` method
  3934. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.map
  3935. exportTypedArrayMethod('map', function map(mapfn /* , thisArg */) {
  3936. return $map(aTypedArray(this), mapfn, arguments.length > 1 ? arguments[1] : undefined, function (O, length) {
  3937. return new (aTypedArrayConstructor(speciesConstructor(O, O.constructor)))(length);
  3938. });
  3939. });
  3940. /***/ }),
  3941. /***/ 4483:
  3942. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3943. "use strict";
  3944. var ArrayBufferViewCore = __webpack_require__(260);
  3945. var $reduceRight = __webpack_require__(3671).right;
  3946. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  3947. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  3948. // `%TypedArray%.prototype.reduceRicht` method
  3949. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduceright
  3950. exportTypedArrayMethod('reduceRight', function reduceRight(callbackfn /* , initialValue */) {
  3951. return $reduceRight(aTypedArray(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
  3952. });
  3953. /***/ }),
  3954. /***/ 9368:
  3955. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3956. "use strict";
  3957. var ArrayBufferViewCore = __webpack_require__(260);
  3958. var $reduce = __webpack_require__(3671).left;
  3959. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  3960. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  3961. // `%TypedArray%.prototype.reduce` method
  3962. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduce
  3963. exportTypedArrayMethod('reduce', function reduce(callbackfn /* , initialValue */) {
  3964. return $reduce(aTypedArray(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
  3965. });
  3966. /***/ }),
  3967. /***/ 2056:
  3968. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3969. "use strict";
  3970. var ArrayBufferViewCore = __webpack_require__(260);
  3971. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  3972. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  3973. var floor = Math.floor;
  3974. // `%TypedArray%.prototype.reverse` method
  3975. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.reverse
  3976. exportTypedArrayMethod('reverse', function reverse() {
  3977. var that = this;
  3978. var length = aTypedArray(that).length;
  3979. var middle = floor(length / 2);
  3980. var index = 0;
  3981. var value;
  3982. while (index < middle) {
  3983. value = that[index];
  3984. that[index++] = that[--length];
  3985. that[length] = value;
  3986. } return that;
  3987. });
  3988. /***/ }),
  3989. /***/ 3462:
  3990. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3991. "use strict";
  3992. var ArrayBufferViewCore = __webpack_require__(260);
  3993. var toLength = __webpack_require__(7466);
  3994. var toOffset = __webpack_require__(4590);
  3995. var toObject = __webpack_require__(7908);
  3996. var fails = __webpack_require__(7293);
  3997. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  3998. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  3999. var FORCED = fails(function () {
  4000. /* global Int8Array -- safe */
  4001. new Int8Array(1).set({});
  4002. });
  4003. // `%TypedArray%.prototype.set` method
  4004. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.set
  4005. exportTypedArrayMethod('set', function set(arrayLike /* , offset */) {
  4006. aTypedArray(this);
  4007. var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);
  4008. var length = this.length;
  4009. var src = toObject(arrayLike);
  4010. var len = toLength(src.length);
  4011. var index = 0;
  4012. if (len + offset > length) throw RangeError('Wrong length');
  4013. while (index < len) this[offset + index] = src[index++];
  4014. }, FORCED);
  4015. /***/ }),
  4016. /***/ 678:
  4017. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  4018. "use strict";
  4019. var ArrayBufferViewCore = __webpack_require__(260);
  4020. var speciesConstructor = __webpack_require__(6707);
  4021. var fails = __webpack_require__(7293);
  4022. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  4023. var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
  4024. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  4025. var $slice = [].slice;
  4026. var FORCED = fails(function () {
  4027. /* global Int8Array -- safe */
  4028. new Int8Array(1).slice();
  4029. });
  4030. // `%TypedArray%.prototype.slice` method
  4031. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice
  4032. exportTypedArrayMethod('slice', function slice(start, end) {
  4033. var list = $slice.call(aTypedArray(this), start, end);
  4034. var C = speciesConstructor(this, this.constructor);
  4035. var index = 0;
  4036. var length = list.length;
  4037. var result = new (aTypedArrayConstructor(C))(length);
  4038. while (length > index) result[index] = list[index++];
  4039. return result;
  4040. }, FORCED);
  4041. /***/ }),
  4042. /***/ 7462:
  4043. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  4044. "use strict";
  4045. var ArrayBufferViewCore = __webpack_require__(260);
  4046. var $some = __webpack_require__(2092).some;
  4047. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  4048. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  4049. // `%TypedArray%.prototype.some` method
  4050. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.some
  4051. exportTypedArrayMethod('some', function some(callbackfn /* , thisArg */) {
  4052. return $some(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  4053. });
  4054. /***/ }),
  4055. /***/ 3824:
  4056. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  4057. "use strict";
  4058. var ArrayBufferViewCore = __webpack_require__(260);
  4059. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  4060. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  4061. var $sort = [].sort;
  4062. // `%TypedArray%.prototype.sort` method
  4063. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort
  4064. exportTypedArrayMethod('sort', function sort(comparefn) {
  4065. return $sort.call(aTypedArray(this), comparefn);
  4066. });
  4067. /***/ }),
  4068. /***/ 5021:
  4069. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  4070. "use strict";
  4071. var ArrayBufferViewCore = __webpack_require__(260);
  4072. var toLength = __webpack_require__(7466);
  4073. var toAbsoluteIndex = __webpack_require__(1400);
  4074. var speciesConstructor = __webpack_require__(6707);
  4075. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  4076. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  4077. // `%TypedArray%.prototype.subarray` method
  4078. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.subarray
  4079. exportTypedArrayMethod('subarray', function subarray(begin, end) {
  4080. var O = aTypedArray(this);
  4081. var length = O.length;
  4082. var beginIndex = toAbsoluteIndex(begin, length);
  4083. return new (speciesConstructor(O, O.constructor))(
  4084. O.buffer,
  4085. O.byteOffset + beginIndex * O.BYTES_PER_ELEMENT,
  4086. toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - beginIndex)
  4087. );
  4088. });
  4089. /***/ }),
  4090. /***/ 2974:
  4091. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  4092. "use strict";
  4093. var global = __webpack_require__(7854);
  4094. var ArrayBufferViewCore = __webpack_require__(260);
  4095. var fails = __webpack_require__(7293);
  4096. var Int8Array = global.Int8Array;
  4097. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  4098. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  4099. var $toLocaleString = [].toLocaleString;
  4100. var $slice = [].slice;
  4101. // iOS Safari 6.x fails here
  4102. var TO_LOCALE_STRING_BUG = !!Int8Array && fails(function () {
  4103. $toLocaleString.call(new Int8Array(1));
  4104. });
  4105. var FORCED = fails(function () {
  4106. return [1, 2].toLocaleString() != new Int8Array([1, 2]).toLocaleString();
  4107. }) || !fails(function () {
  4108. Int8Array.prototype.toLocaleString.call([1, 2]);
  4109. });
  4110. // `%TypedArray%.prototype.toLocaleString` method
  4111. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring
  4112. exportTypedArrayMethod('toLocaleString', function toLocaleString() {
  4113. return $toLocaleString.apply(TO_LOCALE_STRING_BUG ? $slice.call(aTypedArray(this)) : aTypedArray(this), arguments);
  4114. }, FORCED);
  4115. /***/ }),
  4116. /***/ 5016:
  4117. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  4118. "use strict";
  4119. var exportTypedArrayMethod = __webpack_require__(260).exportTypedArrayMethod;
  4120. var fails = __webpack_require__(7293);
  4121. var global = __webpack_require__(7854);
  4122. var Uint8Array = global.Uint8Array;
  4123. var Uint8ArrayPrototype = Uint8Array && Uint8Array.prototype || {};
  4124. var arrayToString = [].toString;
  4125. var arrayJoin = [].join;
  4126. if (fails(function () { arrayToString.call({}); })) {
  4127. arrayToString = function toString() {
  4128. return arrayJoin.call(this);
  4129. };
  4130. }
  4131. var IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString != arrayToString;
  4132. // `%TypedArray%.prototype.toString` method
  4133. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.tostring
  4134. exportTypedArrayMethod('toString', arrayToString, IS_NOT_ARRAY_METHOD);
  4135. /***/ }),
  4136. /***/ 2472:
  4137. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  4138. var createTypedArrayConstructor = __webpack_require__(9843);
  4139. // `Uint8Array` constructor
  4140. // https://tc39.es/ecma262/#sec-typedarray-objects
  4141. createTypedArrayConstructor('Uint8', function (init) {
  4142. return function Uint8Array(data, byteOffset, length) {
  4143. return init(this, data, byteOffset, length);
  4144. };
  4145. });
  4146. /***/ }),
  4147. /***/ 4747:
  4148. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  4149. var global = __webpack_require__(7854);
  4150. var DOMIterables = __webpack_require__(8324);
  4151. var forEach = __webpack_require__(8533);
  4152. var createNonEnumerableProperty = __webpack_require__(8880);
  4153. for (var COLLECTION_NAME in DOMIterables) {
  4154. var Collection = global[COLLECTION_NAME];
  4155. var CollectionPrototype = Collection && Collection.prototype;
  4156. // some Chrome versions have non-configurable methods on DOMTokenList
  4157. if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
  4158. createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
  4159. } catch (error) {
  4160. CollectionPrototype.forEach = forEach;
  4161. }
  4162. }
  4163. /***/ }),
  4164. /***/ 3948:
  4165. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  4166. var global = __webpack_require__(7854);
  4167. var DOMIterables = __webpack_require__(8324);
  4168. var ArrayIteratorMethods = __webpack_require__(6992);
  4169. var createNonEnumerableProperty = __webpack_require__(8880);
  4170. var wellKnownSymbol = __webpack_require__(5112);
  4171. var ITERATOR = wellKnownSymbol('iterator');
  4172. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  4173. var ArrayValues = ArrayIteratorMethods.values;
  4174. for (var COLLECTION_NAME in DOMIterables) {
  4175. var Collection = global[COLLECTION_NAME];
  4176. var CollectionPrototype = Collection && Collection.prototype;
  4177. if (CollectionPrototype) {
  4178. // some Chrome versions have non-configurable methods on DOMTokenList
  4179. if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
  4180. createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
  4181. } catch (error) {
  4182. CollectionPrototype[ITERATOR] = ArrayValues;
  4183. }
  4184. if (!CollectionPrototype[TO_STRING_TAG]) {
  4185. createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
  4186. }
  4187. if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
  4188. // some Chrome versions have non-configurable methods on DOMTokenList
  4189. if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
  4190. createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
  4191. } catch (error) {
  4192. CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
  4193. }
  4194. }
  4195. }
  4196. }
  4197. /***/ }),
  4198. /***/ 1637:
  4199. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  4200. "use strict";
  4201. // TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
  4202. __webpack_require__(6992);
  4203. var $ = __webpack_require__(2109);
  4204. var getBuiltIn = __webpack_require__(5005);
  4205. var USE_NATIVE_URL = __webpack_require__(590);
  4206. var redefine = __webpack_require__(1320);
  4207. var redefineAll = __webpack_require__(2248);
  4208. var setToStringTag = __webpack_require__(8003);
  4209. var createIteratorConstructor = __webpack_require__(4994);
  4210. var InternalStateModule = __webpack_require__(9909);
  4211. var anInstance = __webpack_require__(5787);
  4212. var hasOwn = __webpack_require__(6656);
  4213. var bind = __webpack_require__(9974);
  4214. var classof = __webpack_require__(648);
  4215. var anObject = __webpack_require__(9670);
  4216. var isObject = __webpack_require__(111);
  4217. var create = __webpack_require__(30);
  4218. var createPropertyDescriptor = __webpack_require__(9114);
  4219. var getIterator = __webpack_require__(8554);
  4220. var getIteratorMethod = __webpack_require__(1246);
  4221. var wellKnownSymbol = __webpack_require__(5112);
  4222. var $fetch = getBuiltIn('fetch');
  4223. var Headers = getBuiltIn('Headers');
  4224. var ITERATOR = wellKnownSymbol('iterator');
  4225. var URL_SEARCH_PARAMS = 'URLSearchParams';
  4226. var URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';
  4227. var setInternalState = InternalStateModule.set;
  4228. var getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS);
  4229. var getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR);
  4230. var plus = /\+/g;
  4231. var sequences = Array(4);
  4232. var percentSequence = function (bytes) {
  4233. return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\da-f]{2}){' + bytes + '})', 'gi'));
  4234. };
  4235. var percentDecode = function (sequence) {
  4236. try {
  4237. return decodeURIComponent(sequence);
  4238. } catch (error) {
  4239. return sequence;
  4240. }
  4241. };
  4242. var deserialize = function (it) {
  4243. var result = it.replace(plus, ' ');
  4244. var bytes = 4;
  4245. try {
  4246. return decodeURIComponent(result);
  4247. } catch (error) {
  4248. while (bytes) {
  4249. result = result.replace(percentSequence(bytes--), percentDecode);
  4250. }
  4251. return result;
  4252. }
  4253. };
  4254. var find = /[!'()~]|%20/g;
  4255. var replace = {
  4256. '!': '%21',
  4257. "'": '%27',
  4258. '(': '%28',
  4259. ')': '%29',
  4260. '~': '%7E',
  4261. '%20': '+'
  4262. };
  4263. var replacer = function (match) {
  4264. return replace[match];
  4265. };
  4266. var serialize = function (it) {
  4267. return encodeURIComponent(it).replace(find, replacer);
  4268. };
  4269. var parseSearchParams = function (result, query) {
  4270. if (query) {
  4271. var attributes = query.split('&');
  4272. var index = 0;
  4273. var attribute, entry;
  4274. while (index < attributes.length) {
  4275. attribute = attributes[index++];
  4276. if (attribute.length) {
  4277. entry = attribute.split('=');
  4278. result.push({
  4279. key: deserialize(entry.shift()),
  4280. value: deserialize(entry.join('='))
  4281. });
  4282. }
  4283. }
  4284. }
  4285. };
  4286. var updateSearchParams = function (query) {
  4287. this.entries.length = 0;
  4288. parseSearchParams(this.entries, query);
  4289. };
  4290. var validateArgumentsLength = function (passed, required) {
  4291. if (passed < required) throw TypeError('Not enough arguments');
  4292. };
  4293. var URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {
  4294. setInternalState(this, {
  4295. type: URL_SEARCH_PARAMS_ITERATOR,
  4296. iterator: getIterator(getInternalParamsState(params).entries),
  4297. kind: kind
  4298. });
  4299. }, 'Iterator', function next() {
  4300. var state = getInternalIteratorState(this);
  4301. var kind = state.kind;
  4302. var step = state.iterator.next();
  4303. var entry = step.value;
  4304. if (!step.done) {
  4305. step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];
  4306. } return step;
  4307. });
  4308. // `URLSearchParams` constructor
  4309. // https://url.spec.whatwg.org/#interface-urlsearchparams
  4310. var URLSearchParamsConstructor = function URLSearchParams(/* init */) {
  4311. anInstance(this, URLSearchParamsConstructor, URL_SEARCH_PARAMS);
  4312. var init = arguments.length > 0 ? arguments[0] : undefined;
  4313. var that = this;
  4314. var entries = [];
  4315. var iteratorMethod, iterator, next, step, entryIterator, entryNext, first, second, key;
  4316. setInternalState(that, {
  4317. type: URL_SEARCH_PARAMS,
  4318. entries: entries,
  4319. updateURL: function () { /* empty */ },
  4320. updateSearchParams: updateSearchParams
  4321. });
  4322. if (init !== undefined) {
  4323. if (isObject(init)) {
  4324. iteratorMethod = getIteratorMethod(init);
  4325. if (typeof iteratorMethod === 'function') {
  4326. iterator = iteratorMethod.call(init);
  4327. next = iterator.next;
  4328. while (!(step = next.call(iterator)).done) {
  4329. entryIterator = getIterator(anObject(step.value));
  4330. entryNext = entryIterator.next;
  4331. if (
  4332. (first = entryNext.call(entryIterator)).done ||
  4333. (second = entryNext.call(entryIterator)).done ||
  4334. !entryNext.call(entryIterator).done
  4335. ) throw TypeError('Expected sequence with length 2');
  4336. entries.push({ key: first.value + '', value: second.value + '' });
  4337. }
  4338. } else for (key in init) if (hasOwn(init, key)) entries.push({ key: key, value: init[key] + '' });
  4339. } else {
  4340. parseSearchParams(entries, typeof init === 'string' ? init.charAt(0) === '?' ? init.slice(1) : init : init + '');
  4341. }
  4342. }
  4343. };
  4344. var URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;
  4345. redefineAll(URLSearchParamsPrototype, {
  4346. // `URLSearchParams.prototype.append` method
  4347. // https://url.spec.whatwg.org/#dom-urlsearchparams-append
  4348. append: function append(name, value) {
  4349. validateArgumentsLength(arguments.length, 2);
  4350. var state = getInternalParamsState(this);
  4351. state.entries.push({ key: name + '', value: value + '' });
  4352. state.updateURL();
  4353. },
  4354. // `URLSearchParams.prototype.delete` method
  4355. // https://url.spec.whatwg.org/#dom-urlsearchparams-delete
  4356. 'delete': function (name) {
  4357. validateArgumentsLength(arguments.length, 1);
  4358. var state = getInternalParamsState(this);
  4359. var entries = state.entries;
  4360. var key = name + '';
  4361. var index = 0;
  4362. while (index < entries.length) {
  4363. if (entries[index].key === key) entries.splice(index, 1);
  4364. else index++;
  4365. }
  4366. state.updateURL();
  4367. },
  4368. // `URLSearchParams.prototype.get` method
  4369. // https://url.spec.whatwg.org/#dom-urlsearchparams-get
  4370. get: function get(name) {
  4371. validateArgumentsLength(arguments.length, 1);
  4372. var entries = getInternalParamsState(this).entries;
  4373. var key = name + '';
  4374. var index = 0;
  4375. for (; index < entries.length; index++) {
  4376. if (entries[index].key === key) return entries[index].value;
  4377. }
  4378. return null;
  4379. },
  4380. // `URLSearchParams.prototype.getAll` method
  4381. // https://url.spec.whatwg.org/#dom-urlsearchparams-getall
  4382. getAll: function getAll(name) {
  4383. validateArgumentsLength(arguments.length, 1);
  4384. var entries = getInternalParamsState(this).entries;
  4385. var key = name + '';
  4386. var result = [];
  4387. var index = 0;
  4388. for (; index < entries.length; index++) {
  4389. if (entries[index].key === key) result.push(entries[index].value);
  4390. }
  4391. return result;
  4392. },
  4393. // `URLSearchParams.prototype.has` method
  4394. // https://url.spec.whatwg.org/#dom-urlsearchparams-has
  4395. has: function has(name) {
  4396. validateArgumentsLength(arguments.length, 1);
  4397. var entries = getInternalParamsState(this).entries;
  4398. var key = name + '';
  4399. var index = 0;
  4400. while (index < entries.length) {
  4401. if (entries[index++].key === key) return true;
  4402. }
  4403. return false;
  4404. },
  4405. // `URLSearchParams.prototype.set` method
  4406. // https://url.spec.whatwg.org/#dom-urlsearchparams-set
  4407. set: function set(name, value) {
  4408. validateArgumentsLength(arguments.length, 1);
  4409. var state = getInternalParamsState(this);
  4410. var entries = state.entries;
  4411. var found = false;
  4412. var key = name + '';
  4413. var val = value + '';
  4414. var index = 0;
  4415. var entry;
  4416. for (; index < entries.length; index++) {
  4417. entry = entries[index];
  4418. if (entry.key === key) {
  4419. if (found) entries.splice(index--, 1);
  4420. else {
  4421. found = true;
  4422. entry.value = val;
  4423. }
  4424. }
  4425. }
  4426. if (!found) entries.push({ key: key, value: val });
  4427. state.updateURL();
  4428. },
  4429. // `URLSearchParams.prototype.sort` method
  4430. // https://url.spec.whatwg.org/#dom-urlsearchparams-sort
  4431. sort: function sort() {
  4432. var state = getInternalParamsState(this);
  4433. var entries = state.entries;
  4434. // Array#sort is not stable in some engines
  4435. var slice = entries.slice();
  4436. var entry, entriesIndex, sliceIndex;
  4437. entries.length = 0;
  4438. for (sliceIndex = 0; sliceIndex < slice.length; sliceIndex++) {
  4439. entry = slice[sliceIndex];
  4440. for (entriesIndex = 0; entriesIndex < sliceIndex; entriesIndex++) {
  4441. if (entries[entriesIndex].key > entry.key) {
  4442. entries.splice(entriesIndex, 0, entry);
  4443. break;
  4444. }
  4445. }
  4446. if (entriesIndex === sliceIndex) entries.push(entry);
  4447. }
  4448. state.updateURL();
  4449. },
  4450. // `URLSearchParams.prototype.forEach` method
  4451. forEach: function forEach(callback /* , thisArg */) {
  4452. var entries = getInternalParamsState(this).entries;
  4453. var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined, 3);
  4454. var index = 0;
  4455. var entry;
  4456. while (index < entries.length) {
  4457. entry = entries[index++];
  4458. boundFunction(entry.value, entry.key, this);
  4459. }
  4460. },
  4461. // `URLSearchParams.prototype.keys` method
  4462. keys: function keys() {
  4463. return new URLSearchParamsIterator(this, 'keys');
  4464. },
  4465. // `URLSearchParams.prototype.values` method
  4466. values: function values() {
  4467. return new URLSearchParamsIterator(this, 'values');
  4468. },
  4469. // `URLSearchParams.prototype.entries` method
  4470. entries: function entries() {
  4471. return new URLSearchParamsIterator(this, 'entries');
  4472. }
  4473. }, { enumerable: true });
  4474. // `URLSearchParams.prototype[@@iterator]` method
  4475. redefine(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries);
  4476. // `URLSearchParams.prototype.toString` method
  4477. // https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior
  4478. redefine(URLSearchParamsPrototype, 'toString', function toString() {
  4479. var entries = getInternalParamsState(this).entries;
  4480. var result = [];
  4481. var index = 0;
  4482. var entry;
  4483. while (index < entries.length) {
  4484. entry = entries[index++];
  4485. result.push(serialize(entry.key) + '=' + serialize(entry.value));
  4486. } return result.join('&');
  4487. }, { enumerable: true });
  4488. setToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS);
  4489. $({ global: true, forced: !USE_NATIVE_URL }, {
  4490. URLSearchParams: URLSearchParamsConstructor
  4491. });
  4492. // Wrap `fetch` for correct work with polyfilled `URLSearchParams`
  4493. // https://github.com/zloirock/core-js/issues/674
  4494. if (!USE_NATIVE_URL && typeof $fetch == 'function' && typeof Headers == 'function') {
  4495. $({ global: true, enumerable: true, forced: true }, {
  4496. fetch: function fetch(input /* , init */) {
  4497. var args = [input];
  4498. var init, body, headers;
  4499. if (arguments.length > 1) {
  4500. init = arguments[1];
  4501. if (isObject(init)) {
  4502. body = init.body;
  4503. if (classof(body) === URL_SEARCH_PARAMS) {
  4504. headers = init.headers ? new Headers(init.headers) : new Headers();
  4505. if (!headers.has('content-type')) {
  4506. headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
  4507. }
  4508. init = create(init, {
  4509. body: createPropertyDescriptor(0, String(body)),
  4510. headers: createPropertyDescriptor(0, headers)
  4511. });
  4512. }
  4513. }
  4514. args.push(init);
  4515. } return $fetch.apply(this, args);
  4516. }
  4517. });
  4518. }
  4519. module.exports = {
  4520. URLSearchParams: URLSearchParamsConstructor,
  4521. getState: getInternalParamsState
  4522. };
  4523. /***/ }),
  4524. /***/ 285:
  4525. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  4526. "use strict";
  4527. // TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
  4528. __webpack_require__(8783);
  4529. var $ = __webpack_require__(2109);
  4530. var DESCRIPTORS = __webpack_require__(9781);
  4531. var USE_NATIVE_URL = __webpack_require__(590);
  4532. var global = __webpack_require__(7854);
  4533. var defineProperties = __webpack_require__(6048);
  4534. var redefine = __webpack_require__(1320);
  4535. var anInstance = __webpack_require__(5787);
  4536. var has = __webpack_require__(6656);
  4537. var assign = __webpack_require__(1574);
  4538. var arrayFrom = __webpack_require__(8457);
  4539. var codeAt = __webpack_require__(8710).codeAt;
  4540. var toASCII = __webpack_require__(3197);
  4541. var setToStringTag = __webpack_require__(8003);
  4542. var URLSearchParamsModule = __webpack_require__(1637);
  4543. var InternalStateModule = __webpack_require__(9909);
  4544. var NativeURL = global.URL;
  4545. var URLSearchParams = URLSearchParamsModule.URLSearchParams;
  4546. var getInternalSearchParamsState = URLSearchParamsModule.getState;
  4547. var setInternalState = InternalStateModule.set;
  4548. var getInternalURLState = InternalStateModule.getterFor('URL');
  4549. var floor = Math.floor;
  4550. var pow = Math.pow;
  4551. var INVALID_AUTHORITY = 'Invalid authority';
  4552. var INVALID_SCHEME = 'Invalid scheme';
  4553. var INVALID_HOST = 'Invalid host';
  4554. var INVALID_PORT = 'Invalid port';
  4555. var ALPHA = /[A-Za-z]/;
  4556. var ALPHANUMERIC = /[\d+-.A-Za-z]/;
  4557. var DIGIT = /\d/;
  4558. var HEX_START = /^(0x|0X)/;
  4559. var OCT = /^[0-7]+$/;
  4560. var DEC = /^\d+$/;
  4561. var HEX = /^[\dA-Fa-f]+$/;
  4562. /* eslint-disable no-control-regex -- safe */
  4563. var FORBIDDEN_HOST_CODE_POINT = /[\u0000\t\u000A\u000D #%/:?@[\\]]/;
  4564. var FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\u0000\t\u000A\u000D #/:?@[\\]]/;
  4565. var LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g;
  4566. var TAB_AND_NEW_LINE = /[\t\u000A\u000D]/g;
  4567. /* eslint-enable no-control-regex -- safe */
  4568. var EOF;
  4569. var parseHost = function (url, input) {
  4570. var result, codePoints, index;
  4571. if (input.charAt(0) == '[') {
  4572. if (input.charAt(input.length - 1) != ']') return INVALID_HOST;
  4573. result = parseIPv6(input.slice(1, -1));
  4574. if (!result) return INVALID_HOST;
  4575. url.host = result;
  4576. // opaque host
  4577. } else if (!isSpecial(url)) {
  4578. if (FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(input)) return INVALID_HOST;
  4579. result = '';
  4580. codePoints = arrayFrom(input);
  4581. for (index = 0; index < codePoints.length; index++) {
  4582. result += percentEncode(codePoints[index], C0ControlPercentEncodeSet);
  4583. }
  4584. url.host = result;
  4585. } else {
  4586. input = toASCII(input);
  4587. if (FORBIDDEN_HOST_CODE_POINT.test(input)) return INVALID_HOST;
  4588. result = parseIPv4(input);
  4589. if (result === null) return INVALID_HOST;
  4590. url.host = result;
  4591. }
  4592. };
  4593. var parseIPv4 = function (input) {
  4594. var parts = input.split('.');
  4595. var partsLength, numbers, index, part, radix, number, ipv4;
  4596. if (parts.length && parts[parts.length - 1] == '') {
  4597. parts.pop();
  4598. }
  4599. partsLength = parts.length;
  4600. if (partsLength > 4) return input;
  4601. numbers = [];
  4602. for (index = 0; index < partsLength; index++) {
  4603. part = parts[index];
  4604. if (part == '') return input;
  4605. radix = 10;
  4606. if (part.length > 1 && part.charAt(0) == '0') {
  4607. radix = HEX_START.test(part) ? 16 : 8;
  4608. part = part.slice(radix == 8 ? 1 : 2);
  4609. }
  4610. if (part === '') {
  4611. number = 0;
  4612. } else {
  4613. if (!(radix == 10 ? DEC : radix == 8 ? OCT : HEX).test(part)) return input;
  4614. number = parseInt(part, radix);
  4615. }
  4616. numbers.push(number);
  4617. }
  4618. for (index = 0; index < partsLength; index++) {
  4619. number = numbers[index];
  4620. if (index == partsLength - 1) {
  4621. if (number >= pow(256, 5 - partsLength)) return null;
  4622. } else if (number > 255) return null;
  4623. }
  4624. ipv4 = numbers.pop();
  4625. for (index = 0; index < numbers.length; index++) {
  4626. ipv4 += numbers[index] * pow(256, 3 - index);
  4627. }
  4628. return ipv4;
  4629. };
  4630. // eslint-disable-next-line max-statements -- TODO
  4631. var parseIPv6 = function (input) {
  4632. var address = [0, 0, 0, 0, 0, 0, 0, 0];
  4633. var pieceIndex = 0;
  4634. var compress = null;
  4635. var pointer = 0;
  4636. var value, length, numbersSeen, ipv4Piece, number, swaps, swap;
  4637. var char = function () {
  4638. return input.charAt(pointer);
  4639. };
  4640. if (char() == ':') {
  4641. if (input.charAt(1) != ':') return;
  4642. pointer += 2;
  4643. pieceIndex++;
  4644. compress = pieceIndex;
  4645. }
  4646. while (char()) {
  4647. if (pieceIndex == 8) return;
  4648. if (char() == ':') {
  4649. if (compress !== null) return;
  4650. pointer++;
  4651. pieceIndex++;
  4652. compress = pieceIndex;
  4653. continue;
  4654. }
  4655. value = length = 0;
  4656. while (length < 4 && HEX.test(char())) {
  4657. value = value * 16 + parseInt(char(), 16);
  4658. pointer++;
  4659. length++;
  4660. }
  4661. if (char() == '.') {
  4662. if (length == 0) return;
  4663. pointer -= length;
  4664. if (pieceIndex > 6) return;
  4665. numbersSeen = 0;
  4666. while (char()) {
  4667. ipv4Piece = null;
  4668. if (numbersSeen > 0) {
  4669. if (char() == '.' && numbersSeen < 4) pointer++;
  4670. else return;
  4671. }
  4672. if (!DIGIT.test(char())) return;
  4673. while (DIGIT.test(char())) {
  4674. number = parseInt(char(), 10);
  4675. if (ipv4Piece === null) ipv4Piece = number;
  4676. else if (ipv4Piece == 0) return;
  4677. else ipv4Piece = ipv4Piece * 10 + number;
  4678. if (ipv4Piece > 255) return;
  4679. pointer++;
  4680. }
  4681. address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece;
  4682. numbersSeen++;
  4683. if (numbersSeen == 2 || numbersSeen == 4) pieceIndex++;
  4684. }
  4685. if (numbersSeen != 4) return;
  4686. break;
  4687. } else if (char() == ':') {
  4688. pointer++;
  4689. if (!char()) return;
  4690. } else if (char()) return;
  4691. address[pieceIndex++] = value;
  4692. }
  4693. if (compress !== null) {
  4694. swaps = pieceIndex - compress;
  4695. pieceIndex = 7;
  4696. while (pieceIndex != 0 && swaps > 0) {
  4697. swap = address[pieceIndex];
  4698. address[pieceIndex--] = address[compress + swaps - 1];
  4699. address[compress + --swaps] = swap;
  4700. }
  4701. } else if (pieceIndex != 8) return;
  4702. return address;
  4703. };
  4704. var findLongestZeroSequence = function (ipv6) {
  4705. var maxIndex = null;
  4706. var maxLength = 1;
  4707. var currStart = null;
  4708. var currLength = 0;
  4709. var index = 0;
  4710. for (; index < 8; index++) {
  4711. if (ipv6[index] !== 0) {
  4712. if (currLength > maxLength) {
  4713. maxIndex = currStart;
  4714. maxLength = currLength;
  4715. }
  4716. currStart = null;
  4717. currLength = 0;
  4718. } else {
  4719. if (currStart === null) currStart = index;
  4720. ++currLength;
  4721. }
  4722. }
  4723. if (currLength > maxLength) {
  4724. maxIndex = currStart;
  4725. maxLength = currLength;
  4726. }
  4727. return maxIndex;
  4728. };
  4729. var serializeHost = function (host) {
  4730. var result, index, compress, ignore0;
  4731. // ipv4
  4732. if (typeof host == 'number') {
  4733. result = [];
  4734. for (index = 0; index < 4; index++) {
  4735. result.unshift(host % 256);
  4736. host = floor(host / 256);
  4737. } return result.join('.');
  4738. // ipv6
  4739. } else if (typeof host == 'object') {
  4740. result = '';
  4741. compress = findLongestZeroSequence(host);
  4742. for (index = 0; index < 8; index++) {
  4743. if (ignore0 && host[index] === 0) continue;
  4744. if (ignore0) ignore0 = false;
  4745. if (compress === index) {
  4746. result += index ? ':' : '::';
  4747. ignore0 = true;
  4748. } else {
  4749. result += host[index].toString(16);
  4750. if (index < 7) result += ':';
  4751. }
  4752. }
  4753. return '[' + result + ']';
  4754. } return host;
  4755. };
  4756. var C0ControlPercentEncodeSet = {};
  4757. var fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, {
  4758. ' ': 1, '"': 1, '<': 1, '>': 1, '`': 1
  4759. });
  4760. var pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, {
  4761. '#': 1, '?': 1, '{': 1, '}': 1
  4762. });
  4763. var userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, {
  4764. '/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\': 1, ']': 1, '^': 1, '|': 1
  4765. });
  4766. var percentEncode = function (char, set) {
  4767. var code = codeAt(char, 0);
  4768. return code > 0x20 && code < 0x7F && !has(set, char) ? char : encodeURIComponent(char);
  4769. };
  4770. var specialSchemes = {
  4771. ftp: 21,
  4772. file: null,
  4773. http: 80,
  4774. https: 443,
  4775. ws: 80,
  4776. wss: 443
  4777. };
  4778. var isSpecial = function (url) {
  4779. return has(specialSchemes, url.scheme);
  4780. };
  4781. var includesCredentials = function (url) {
  4782. return url.username != '' || url.password != '';
  4783. };
  4784. var cannotHaveUsernamePasswordPort = function (url) {
  4785. return !url.host || url.cannotBeABaseURL || url.scheme == 'file';
  4786. };
  4787. var isWindowsDriveLetter = function (string, normalized) {
  4788. var second;
  4789. return string.length == 2 && ALPHA.test(string.charAt(0))
  4790. && ((second = string.charAt(1)) == ':' || (!normalized && second == '|'));
  4791. };
  4792. var startsWithWindowsDriveLetter = function (string) {
  4793. var third;
  4794. return string.length > 1 && isWindowsDriveLetter(string.slice(0, 2)) && (
  4795. string.length == 2 ||
  4796. ((third = string.charAt(2)) === '/' || third === '\\' || third === '?' || third === '#')
  4797. );
  4798. };
  4799. var shortenURLsPath = function (url) {
  4800. var path = url.path;
  4801. var pathSize = path.length;
  4802. if (pathSize && (url.scheme != 'file' || pathSize != 1 || !isWindowsDriveLetter(path[0], true))) {
  4803. path.pop();
  4804. }
  4805. };
  4806. var isSingleDot = function (segment) {
  4807. return segment === '.' || segment.toLowerCase() === '%2e';
  4808. };
  4809. var isDoubleDot = function (segment) {
  4810. segment = segment.toLowerCase();
  4811. return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e';
  4812. };
  4813. // States:
  4814. var SCHEME_START = {};
  4815. var SCHEME = {};
  4816. var NO_SCHEME = {};
  4817. var SPECIAL_RELATIVE_OR_AUTHORITY = {};
  4818. var PATH_OR_AUTHORITY = {};
  4819. var RELATIVE = {};
  4820. var RELATIVE_SLASH = {};
  4821. var SPECIAL_AUTHORITY_SLASHES = {};
  4822. var SPECIAL_AUTHORITY_IGNORE_SLASHES = {};
  4823. var AUTHORITY = {};
  4824. var HOST = {};
  4825. var HOSTNAME = {};
  4826. var PORT = {};
  4827. var FILE = {};
  4828. var FILE_SLASH = {};
  4829. var FILE_HOST = {};
  4830. var PATH_START = {};
  4831. var PATH = {};
  4832. var CANNOT_BE_A_BASE_URL_PATH = {};
  4833. var QUERY = {};
  4834. var FRAGMENT = {};
  4835. // eslint-disable-next-line max-statements -- TODO
  4836. var parseURL = function (url, input, stateOverride, base) {
  4837. var state = stateOverride || SCHEME_START;
  4838. var pointer = 0;
  4839. var buffer = '';
  4840. var seenAt = false;
  4841. var seenBracket = false;
  4842. var seenPasswordToken = false;
  4843. var codePoints, char, bufferCodePoints, failure;
  4844. if (!stateOverride) {
  4845. url.scheme = '';
  4846. url.username = '';
  4847. url.password = '';
  4848. url.host = null;
  4849. url.port = null;
  4850. url.path = [];
  4851. url.query = null;
  4852. url.fragment = null;
  4853. url.cannotBeABaseURL = false;
  4854. input = input.replace(LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE, '');
  4855. }
  4856. input = input.replace(TAB_AND_NEW_LINE, '');
  4857. codePoints = arrayFrom(input);
  4858. while (pointer <= codePoints.length) {
  4859. char = codePoints[pointer];
  4860. switch (state) {
  4861. case SCHEME_START:
  4862. if (char && ALPHA.test(char)) {
  4863. buffer += char.toLowerCase();
  4864. state = SCHEME;
  4865. } else if (!stateOverride) {
  4866. state = NO_SCHEME;
  4867. continue;
  4868. } else return INVALID_SCHEME;
  4869. break;
  4870. case SCHEME:
  4871. if (char && (ALPHANUMERIC.test(char) || char == '+' || char == '-' || char == '.')) {
  4872. buffer += char.toLowerCase();
  4873. } else if (char == ':') {
  4874. if (stateOverride && (
  4875. (isSpecial(url) != has(specialSchemes, buffer)) ||
  4876. (buffer == 'file' && (includesCredentials(url) || url.port !== null)) ||
  4877. (url.scheme == 'file' && !url.host)
  4878. )) return;
  4879. url.scheme = buffer;
  4880. if (stateOverride) {
  4881. if (isSpecial(url) && specialSchemes[url.scheme] == url.port) url.port = null;
  4882. return;
  4883. }
  4884. buffer = '';
  4885. if (url.scheme == 'file') {
  4886. state = FILE;
  4887. } else if (isSpecial(url) && base && base.scheme == url.scheme) {
  4888. state = SPECIAL_RELATIVE_OR_AUTHORITY;
  4889. } else if (isSpecial(url)) {
  4890. state = SPECIAL_AUTHORITY_SLASHES;
  4891. } else if (codePoints[pointer + 1] == '/') {
  4892. state = PATH_OR_AUTHORITY;
  4893. pointer++;
  4894. } else {
  4895. url.cannotBeABaseURL = true;
  4896. url.path.push('');
  4897. state = CANNOT_BE_A_BASE_URL_PATH;
  4898. }
  4899. } else if (!stateOverride) {
  4900. buffer = '';
  4901. state = NO_SCHEME;
  4902. pointer = 0;
  4903. continue;
  4904. } else return INVALID_SCHEME;
  4905. break;
  4906. case NO_SCHEME:
  4907. if (!base || (base.cannotBeABaseURL && char != '#')) return INVALID_SCHEME;
  4908. if (base.cannotBeABaseURL && char == '#') {
  4909. url.scheme = base.scheme;
  4910. url.path = base.path.slice();
  4911. url.query = base.query;
  4912. url.fragment = '';
  4913. url.cannotBeABaseURL = true;
  4914. state = FRAGMENT;
  4915. break;
  4916. }
  4917. state = base.scheme == 'file' ? FILE : RELATIVE;
  4918. continue;
  4919. case SPECIAL_RELATIVE_OR_AUTHORITY:
  4920. if (char == '/' && codePoints[pointer + 1] == '/') {
  4921. state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
  4922. pointer++;
  4923. } else {
  4924. state = RELATIVE;
  4925. continue;
  4926. } break;
  4927. case PATH_OR_AUTHORITY:
  4928. if (char == '/') {
  4929. state = AUTHORITY;
  4930. break;
  4931. } else {
  4932. state = PATH;
  4933. continue;
  4934. }
  4935. case RELATIVE:
  4936. url.scheme = base.scheme;
  4937. if (char == EOF) {
  4938. url.username = base.username;
  4939. url.password = base.password;
  4940. url.host = base.host;
  4941. url.port = base.port;
  4942. url.path = base.path.slice();
  4943. url.query = base.query;
  4944. } else if (char == '/' || (char == '\\' && isSpecial(url))) {
  4945. state = RELATIVE_SLASH;
  4946. } else if (char == '?') {
  4947. url.username = base.username;
  4948. url.password = base.password;
  4949. url.host = base.host;
  4950. url.port = base.port;
  4951. url.path = base.path.slice();
  4952. url.query = '';
  4953. state = QUERY;
  4954. } else if (char == '#') {
  4955. url.username = base.username;
  4956. url.password = base.password;
  4957. url.host = base.host;
  4958. url.port = base.port;
  4959. url.path = base.path.slice();
  4960. url.query = base.query;
  4961. url.fragment = '';
  4962. state = FRAGMENT;
  4963. } else {
  4964. url.username = base.username;
  4965. url.password = base.password;
  4966. url.host = base.host;
  4967. url.port = base.port;
  4968. url.path = base.path.slice();
  4969. url.path.pop();
  4970. state = PATH;
  4971. continue;
  4972. } break;
  4973. case RELATIVE_SLASH:
  4974. if (isSpecial(url) && (char == '/' || char == '\\')) {
  4975. state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
  4976. } else if (char == '/') {
  4977. state = AUTHORITY;
  4978. } else {
  4979. url.username = base.username;
  4980. url.password = base.password;
  4981. url.host = base.host;
  4982. url.port = base.port;
  4983. state = PATH;
  4984. continue;
  4985. } break;
  4986. case SPECIAL_AUTHORITY_SLASHES:
  4987. state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
  4988. if (char != '/' || buffer.charAt(pointer + 1) != '/') continue;
  4989. pointer++;
  4990. break;
  4991. case SPECIAL_AUTHORITY_IGNORE_SLASHES:
  4992. if (char != '/' && char != '\\') {
  4993. state = AUTHORITY;
  4994. continue;
  4995. } break;
  4996. case AUTHORITY:
  4997. if (char == '@') {
  4998. if (seenAt) buffer = '%40' + buffer;
  4999. seenAt = true;
  5000. bufferCodePoints = arrayFrom(buffer);
  5001. for (var i = 0; i < bufferCodePoints.length; i++) {
  5002. var codePoint = bufferCodePoints[i];
  5003. if (codePoint == ':' && !seenPasswordToken) {
  5004. seenPasswordToken = true;
  5005. continue;
  5006. }
  5007. var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet);
  5008. if (seenPasswordToken) url.password += encodedCodePoints;
  5009. else url.username += encodedCodePoints;
  5010. }
  5011. buffer = '';
  5012. } else if (
  5013. char == EOF || char == '/' || char == '?' || char == '#' ||
  5014. (char == '\\' && isSpecial(url))
  5015. ) {
  5016. if (seenAt && buffer == '') return INVALID_AUTHORITY;
  5017. pointer -= arrayFrom(buffer).length + 1;
  5018. buffer = '';
  5019. state = HOST;
  5020. } else buffer += char;
  5021. break;
  5022. case HOST:
  5023. case HOSTNAME:
  5024. if (stateOverride && url.scheme == 'file') {
  5025. state = FILE_HOST;
  5026. continue;
  5027. } else if (char == ':' && !seenBracket) {
  5028. if (buffer == '') return INVALID_HOST;
  5029. failure = parseHost(url, buffer);
  5030. if (failure) return failure;
  5031. buffer = '';
  5032. state = PORT;
  5033. if (stateOverride == HOSTNAME) return;
  5034. } else if (
  5035. char == EOF || char == '/' || char == '?' || char == '#' ||
  5036. (char == '\\' && isSpecial(url))
  5037. ) {
  5038. if (isSpecial(url) && buffer == '') return INVALID_HOST;
  5039. if (stateOverride && buffer == '' && (includesCredentials(url) || url.port !== null)) return;
  5040. failure = parseHost(url, buffer);
  5041. if (failure) return failure;
  5042. buffer = '';
  5043. state = PATH_START;
  5044. if (stateOverride) return;
  5045. continue;
  5046. } else {
  5047. if (char == '[') seenBracket = true;
  5048. else if (char == ']') seenBracket = false;
  5049. buffer += char;
  5050. } break;
  5051. case PORT:
  5052. if (DIGIT.test(char)) {
  5053. buffer += char;
  5054. } else if (
  5055. char == EOF || char == '/' || char == '?' || char == '#' ||
  5056. (char == '\\' && isSpecial(url)) ||
  5057. stateOverride
  5058. ) {
  5059. if (buffer != '') {
  5060. var port = parseInt(buffer, 10);
  5061. if (port > 0xFFFF) return INVALID_PORT;
  5062. url.port = (isSpecial(url) && port === specialSchemes[url.scheme]) ? null : port;
  5063. buffer = '';
  5064. }
  5065. if (stateOverride) return;
  5066. state = PATH_START;
  5067. continue;
  5068. } else return INVALID_PORT;
  5069. break;
  5070. case FILE:
  5071. url.scheme = 'file';
  5072. if (char == '/' || char == '\\') state = FILE_SLASH;
  5073. else if (base && base.scheme == 'file') {
  5074. if (char == EOF) {
  5075. url.host = base.host;
  5076. url.path = base.path.slice();
  5077. url.query = base.query;
  5078. } else if (char == '?') {
  5079. url.host = base.host;
  5080. url.path = base.path.slice();
  5081. url.query = '';
  5082. state = QUERY;
  5083. } else if (char == '#') {
  5084. url.host = base.host;
  5085. url.path = base.path.slice();
  5086. url.query = base.query;
  5087. url.fragment = '';
  5088. state = FRAGMENT;
  5089. } else {
  5090. if (!startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {
  5091. url.host = base.host;
  5092. url.path = base.path.slice();
  5093. shortenURLsPath(url);
  5094. }
  5095. state = PATH;
  5096. continue;
  5097. }
  5098. } else {
  5099. state = PATH;
  5100. continue;
  5101. } break;
  5102. case FILE_SLASH:
  5103. if (char == '/' || char == '\\') {
  5104. state = FILE_HOST;
  5105. break;
  5106. }
  5107. if (base && base.scheme == 'file' && !startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {
  5108. if (isWindowsDriveLetter(base.path[0], true)) url.path.push(base.path[0]);
  5109. else url.host = base.host;
  5110. }
  5111. state = PATH;
  5112. continue;
  5113. case FILE_HOST:
  5114. if (char == EOF || char == '/' || char == '\\' || char == '?' || char == '#') {
  5115. if (!stateOverride && isWindowsDriveLetter(buffer)) {
  5116. state = PATH;
  5117. } else if (buffer == '') {
  5118. url.host = '';
  5119. if (stateOverride) return;
  5120. state = PATH_START;
  5121. } else {
  5122. failure = parseHost(url, buffer);
  5123. if (failure) return failure;
  5124. if (url.host == 'localhost') url.host = '';
  5125. if (stateOverride) return;
  5126. buffer = '';
  5127. state = PATH_START;
  5128. } continue;
  5129. } else buffer += char;
  5130. break;
  5131. case PATH_START:
  5132. if (isSpecial(url)) {
  5133. state = PATH;
  5134. if (char != '/' && char != '\\') continue;
  5135. } else if (!stateOverride && char == '?') {
  5136. url.query = '';
  5137. state = QUERY;
  5138. } else if (!stateOverride && char == '#') {
  5139. url.fragment = '';
  5140. state = FRAGMENT;
  5141. } else if (char != EOF) {
  5142. state = PATH;
  5143. if (char != '/') continue;
  5144. } break;
  5145. case PATH:
  5146. if (
  5147. char == EOF || char == '/' ||
  5148. (char == '\\' && isSpecial(url)) ||
  5149. (!stateOverride && (char == '?' || char == '#'))
  5150. ) {
  5151. if (isDoubleDot(buffer)) {
  5152. shortenURLsPath(url);
  5153. if (char != '/' && !(char == '\\' && isSpecial(url))) {
  5154. url.path.push('');
  5155. }
  5156. } else if (isSingleDot(buffer)) {
  5157. if (char != '/' && !(char == '\\' && isSpecial(url))) {
  5158. url.path.push('');
  5159. }
  5160. } else {
  5161. if (url.scheme == 'file' && !url.path.length && isWindowsDriveLetter(buffer)) {
  5162. if (url.host) url.host = '';
  5163. buffer = buffer.charAt(0) + ':'; // normalize windows drive letter
  5164. }
  5165. url.path.push(buffer);
  5166. }
  5167. buffer = '';
  5168. if (url.scheme == 'file' && (char == EOF || char == '?' || char == '#')) {
  5169. while (url.path.length > 1 && url.path[0] === '') {
  5170. url.path.shift();
  5171. }
  5172. }
  5173. if (char == '?') {
  5174. url.query = '';
  5175. state = QUERY;
  5176. } else if (char == '#') {
  5177. url.fragment = '';
  5178. state = FRAGMENT;
  5179. }
  5180. } else {
  5181. buffer += percentEncode(char, pathPercentEncodeSet);
  5182. } break;
  5183. case CANNOT_BE_A_BASE_URL_PATH:
  5184. if (char == '?') {
  5185. url.query = '';
  5186. state = QUERY;
  5187. } else if (char == '#') {
  5188. url.fragment = '';
  5189. state = FRAGMENT;
  5190. } else if (char != EOF) {
  5191. url.path[0] += percentEncode(char, C0ControlPercentEncodeSet);
  5192. } break;
  5193. case QUERY:
  5194. if (!stateOverride && char == '#') {
  5195. url.fragment = '';
  5196. state = FRAGMENT;
  5197. } else if (char != EOF) {
  5198. if (char == "'" && isSpecial(url)) url.query += '%27';
  5199. else if (char == '#') url.query += '%23';
  5200. else url.query += percentEncode(char, C0ControlPercentEncodeSet);
  5201. } break;
  5202. case FRAGMENT:
  5203. if (char != EOF) url.fragment += percentEncode(char, fragmentPercentEncodeSet);
  5204. break;
  5205. }
  5206. pointer++;
  5207. }
  5208. };
  5209. // `URL` constructor
  5210. // https://url.spec.whatwg.org/#url-class
  5211. var URLConstructor = function URL(url /* , base */) {
  5212. var that = anInstance(this, URLConstructor, 'URL');
  5213. var base = arguments.length > 1 ? arguments[1] : undefined;
  5214. var urlString = String(url);
  5215. var state = setInternalState(that, { type: 'URL' });
  5216. var baseState, failure;
  5217. if (base !== undefined) {
  5218. if (base instanceof URLConstructor) baseState = getInternalURLState(base);
  5219. else {
  5220. failure = parseURL(baseState = {}, String(base));
  5221. if (failure) throw TypeError(failure);
  5222. }
  5223. }
  5224. failure = parseURL(state, urlString, null, baseState);
  5225. if (failure) throw TypeError(failure);
  5226. var searchParams = state.searchParams = new URLSearchParams();
  5227. var searchParamsState = getInternalSearchParamsState(searchParams);
  5228. searchParamsState.updateSearchParams(state.query);
  5229. searchParamsState.updateURL = function () {
  5230. state.query = String(searchParams) || null;
  5231. };
  5232. if (!DESCRIPTORS) {
  5233. that.href = serializeURL.call(that);
  5234. that.origin = getOrigin.call(that);
  5235. that.protocol = getProtocol.call(that);
  5236. that.username = getUsername.call(that);
  5237. that.password = getPassword.call(that);
  5238. that.host = getHost.call(that);
  5239. that.hostname = getHostname.call(that);
  5240. that.port = getPort.call(that);
  5241. that.pathname = getPathname.call(that);
  5242. that.search = getSearch.call(that);
  5243. that.searchParams = getSearchParams.call(that);
  5244. that.hash = getHash.call(that);
  5245. }
  5246. };
  5247. var URLPrototype = URLConstructor.prototype;
  5248. var serializeURL = function () {
  5249. var url = getInternalURLState(this);
  5250. var scheme = url.scheme;
  5251. var username = url.username;
  5252. var password = url.password;
  5253. var host = url.host;
  5254. var port = url.port;
  5255. var path = url.path;
  5256. var query = url.query;
  5257. var fragment = url.fragment;
  5258. var output = scheme + ':';
  5259. if (host !== null) {
  5260. output += '//';
  5261. if (includesCredentials(url)) {
  5262. output += username + (password ? ':' + password : '') + '@';
  5263. }
  5264. output += serializeHost(host);
  5265. if (port !== null) output += ':' + port;
  5266. } else if (scheme == 'file') output += '//';
  5267. output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';
  5268. if (query !== null) output += '?' + query;
  5269. if (fragment !== null) output += '#' + fragment;
  5270. return output;
  5271. };
  5272. var getOrigin = function () {
  5273. var url = getInternalURLState(this);
  5274. var scheme = url.scheme;
  5275. var port = url.port;
  5276. if (scheme == 'blob') try {
  5277. return new URL(scheme.path[0]).origin;
  5278. } catch (error) {
  5279. return 'null';
  5280. }
  5281. if (scheme == 'file' || !isSpecial(url)) return 'null';
  5282. return scheme + '://' + serializeHost(url.host) + (port !== null ? ':' + port : '');
  5283. };
  5284. var getProtocol = function () {
  5285. return getInternalURLState(this).scheme + ':';
  5286. };
  5287. var getUsername = function () {
  5288. return getInternalURLState(this).username;
  5289. };
  5290. var getPassword = function () {
  5291. return getInternalURLState(this).password;
  5292. };
  5293. var getHost = function () {
  5294. var url = getInternalURLState(this);
  5295. var host = url.host;
  5296. var port = url.port;
  5297. return host === null ? ''
  5298. : port === null ? serializeHost(host)
  5299. : serializeHost(host) + ':' + port;
  5300. };
  5301. var getHostname = function () {
  5302. var host = getInternalURLState(this).host;
  5303. return host === null ? '' : serializeHost(host);
  5304. };
  5305. var getPort = function () {
  5306. var port = getInternalURLState(this).port;
  5307. return port === null ? '' : String(port);
  5308. };
  5309. var getPathname = function () {
  5310. var url = getInternalURLState(this);
  5311. var path = url.path;
  5312. return url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';
  5313. };
  5314. var getSearch = function () {
  5315. var query = getInternalURLState(this).query;
  5316. return query ? '?' + query : '';
  5317. };
  5318. var getSearchParams = function () {
  5319. return getInternalURLState(this).searchParams;
  5320. };
  5321. var getHash = function () {
  5322. var fragment = getInternalURLState(this).fragment;
  5323. return fragment ? '#' + fragment : '';
  5324. };
  5325. var accessorDescriptor = function (getter, setter) {
  5326. return { get: getter, set: setter, configurable: true, enumerable: true };
  5327. };
  5328. if (DESCRIPTORS) {
  5329. defineProperties(URLPrototype, {
  5330. // `URL.prototype.href` accessors pair
  5331. // https://url.spec.whatwg.org/#dom-url-href
  5332. href: accessorDescriptor(serializeURL, function (href) {
  5333. var url = getInternalURLState(this);
  5334. var urlString = String(href);
  5335. var failure = parseURL(url, urlString);
  5336. if (failure) throw TypeError(failure);
  5337. getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);
  5338. }),
  5339. // `URL.prototype.origin` getter
  5340. // https://url.spec.whatwg.org/#dom-url-origin
  5341. origin: accessorDescriptor(getOrigin),
  5342. // `URL.prototype.protocol` accessors pair
  5343. // https://url.spec.whatwg.org/#dom-url-protocol
  5344. protocol: accessorDescriptor(getProtocol, function (protocol) {
  5345. var url = getInternalURLState(this);
  5346. parseURL(url, String(protocol) + ':', SCHEME_START);
  5347. }),
  5348. // `URL.prototype.username` accessors pair
  5349. // https://url.spec.whatwg.org/#dom-url-username
  5350. username: accessorDescriptor(getUsername, function (username) {
  5351. var url = getInternalURLState(this);
  5352. var codePoints = arrayFrom(String(username));
  5353. if (cannotHaveUsernamePasswordPort(url)) return;
  5354. url.username = '';
  5355. for (var i = 0; i < codePoints.length; i++) {
  5356. url.username += percentEncode(codePoints[i], userinfoPercentEncodeSet);
  5357. }
  5358. }),
  5359. // `URL.prototype.password` accessors pair
  5360. // https://url.spec.whatwg.org/#dom-url-password
  5361. password: accessorDescriptor(getPassword, function (password) {
  5362. var url = getInternalURLState(this);
  5363. var codePoints = arrayFrom(String(password));
  5364. if (cannotHaveUsernamePasswordPort(url)) return;
  5365. url.password = '';
  5366. for (var i = 0; i < codePoints.length; i++) {
  5367. url.password += percentEncode(codePoints[i], userinfoPercentEncodeSet);
  5368. }
  5369. }),
  5370. // `URL.prototype.host` accessors pair
  5371. // https://url.spec.whatwg.org/#dom-url-host
  5372. host: accessorDescriptor(getHost, function (host) {
  5373. var url = getInternalURLState(this);
  5374. if (url.cannotBeABaseURL) return;
  5375. parseURL(url, String(host), HOST);
  5376. }),
  5377. // `URL.prototype.hostname` accessors pair
  5378. // https://url.spec.whatwg.org/#dom-url-hostname
  5379. hostname: accessorDescriptor(getHostname, function (hostname) {
  5380. var url = getInternalURLState(this);
  5381. if (url.cannotBeABaseURL) return;
  5382. parseURL(url, String(hostname), HOSTNAME);
  5383. }),
  5384. // `URL.prototype.port` accessors pair
  5385. // https://url.spec.whatwg.org/#dom-url-port
  5386. port: accessorDescriptor(getPort, function (port) {
  5387. var url = getInternalURLState(this);
  5388. if (cannotHaveUsernamePasswordPort(url)) return;
  5389. port = String(port);
  5390. if (port == '') url.port = null;
  5391. else parseURL(url, port, PORT);
  5392. }),
  5393. // `URL.prototype.pathname` accessors pair
  5394. // https://url.spec.whatwg.org/#dom-url-pathname
  5395. pathname: accessorDescriptor(getPathname, function (pathname) {
  5396. var url = getInternalURLState(this);
  5397. if (url.cannotBeABaseURL) return;
  5398. url.path = [];
  5399. parseURL(url, pathname + '', PATH_START);
  5400. }),
  5401. // `URL.prototype.search` accessors pair
  5402. // https://url.spec.whatwg.org/#dom-url-search
  5403. search: accessorDescriptor(getSearch, function (search) {
  5404. var url = getInternalURLState(this);
  5405. search = String(search);
  5406. if (search == '') {
  5407. url.query = null;
  5408. } else {
  5409. if ('?' == search.charAt(0)) search = search.slice(1);
  5410. url.query = '';
  5411. parseURL(url, search, QUERY);
  5412. }
  5413. getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);
  5414. }),
  5415. // `URL.prototype.searchParams` getter
  5416. // https://url.spec.whatwg.org/#dom-url-searchparams
  5417. searchParams: accessorDescriptor(getSearchParams),
  5418. // `URL.prototype.hash` accessors pair
  5419. // https://url.spec.whatwg.org/#dom-url-hash
  5420. hash: accessorDescriptor(getHash, function (hash) {
  5421. var url = getInternalURLState(this);
  5422. hash = String(hash);
  5423. if (hash == '') {
  5424. url.fragment = null;
  5425. return;
  5426. }
  5427. if ('#' == hash.charAt(0)) hash = hash.slice(1);
  5428. url.fragment = '';
  5429. parseURL(url, hash, FRAGMENT);
  5430. })
  5431. });
  5432. }
  5433. // `URL.prototype.toJSON` method
  5434. // https://url.spec.whatwg.org/#dom-url-tojson
  5435. redefine(URLPrototype, 'toJSON', function toJSON() {
  5436. return serializeURL.call(this);
  5437. }, { enumerable: true });
  5438. // `URL.prototype.toString` method
  5439. // https://url.spec.whatwg.org/#URL-stringification-behavior
  5440. redefine(URLPrototype, 'toString', function toString() {
  5441. return serializeURL.call(this);
  5442. }, { enumerable: true });
  5443. if (NativeURL) {
  5444. var nativeCreateObjectURL = NativeURL.createObjectURL;
  5445. var nativeRevokeObjectURL = NativeURL.revokeObjectURL;
  5446. // `URL.createObjectURL` method
  5447. // https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL
  5448. // eslint-disable-next-line no-unused-vars -- required for `.length`
  5449. if (nativeCreateObjectURL) redefine(URLConstructor, 'createObjectURL', function createObjectURL(blob) {
  5450. return nativeCreateObjectURL.apply(NativeURL, arguments);
  5451. });
  5452. // `URL.revokeObjectURL` method
  5453. // https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL
  5454. // eslint-disable-next-line no-unused-vars -- required for `.length`
  5455. if (nativeRevokeObjectURL) redefine(URLConstructor, 'revokeObjectURL', function revokeObjectURL(url) {
  5456. return nativeRevokeObjectURL.apply(NativeURL, arguments);
  5457. });
  5458. }
  5459. setToStringTag(URLConstructor, 'URL');
  5460. $({ global: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, {
  5461. URL: URLConstructor
  5462. });
  5463. /***/ })
  5464. /******/ });
  5465. /************************************************************************/
  5466. /******/ // The module cache
  5467. /******/ var __webpack_module_cache__ = {};
  5468. /******/
  5469. /******/ // The require function
  5470. /******/ function __webpack_require__(moduleId) {
  5471. /******/ // Check if module is in cache
  5472. /******/ if(__webpack_module_cache__[moduleId]) {
  5473. /******/ return __webpack_module_cache__[moduleId].exports;
  5474. /******/ }
  5475. /******/ // Create a new module (and put it into the cache)
  5476. /******/ var module = __webpack_module_cache__[moduleId] = {
  5477. /******/ // no module.id needed
  5478. /******/ // no module.loaded needed
  5479. /******/ exports: {}
  5480. /******/ };
  5481. /******/
  5482. /******/ // Execute the module function
  5483. /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
  5484. /******/
  5485. /******/ // Return the exports of the module
  5486. /******/ return module.exports;
  5487. /******/ }
  5488. /******/
  5489. /************************************************************************/
  5490. /******/ /* webpack/runtime/define property getters */
  5491. /******/ !function() {
  5492. /******/ // define getter functions for harmony exports
  5493. /******/ __webpack_require__.d = function(exports, definition) {
  5494. /******/ for(var key in definition) {
  5495. /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
  5496. /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
  5497. /******/ }
  5498. /******/ }
  5499. /******/ };
  5500. /******/ }();
  5501. /******/
  5502. /******/ /* webpack/runtime/global */
  5503. /******/ !function() {
  5504. /******/ __webpack_require__.g = (function() {
  5505. /******/ if (typeof globalThis === 'object') return globalThis;
  5506. /******/ try {
  5507. /******/ return this || new Function('return this')();
  5508. /******/ } catch (e) {
  5509. /******/ if (typeof window === 'object') return window;
  5510. /******/ }
  5511. /******/ })();
  5512. /******/ }();
  5513. /******/
  5514. /******/ /* webpack/runtime/hasOwnProperty shorthand */
  5515. /******/ !function() {
  5516. /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
  5517. /******/ }();
  5518. /******/
  5519. /******/ /* webpack/runtime/make namespace object */
  5520. /******/ !function() {
  5521. /******/ // define __esModule on exports
  5522. /******/ __webpack_require__.r = function(exports) {
  5523. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  5524. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  5525. /******/ }
  5526. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  5527. /******/ };
  5528. /******/ }();
  5529. /******/
  5530. /************************************************************************/
  5531. var __webpack_exports__ = {};
  5532. // This entry need to be wrapped in an IIFE because it need to be in strict mode.
  5533. !function() {
  5534. "use strict";
  5535. // ESM COMPAT FLAG
  5536. __webpack_require__.r(__webpack_exports__);
  5537. // EXPORTS
  5538. __webpack_require__.d(__webpack_exports__, {
  5539. "Dropzone": function() { return /* reexport */ Dropzone; },
  5540. "default": function() { return /* binding */ dropzone_dist; }
  5541. });
  5542. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js
  5543. var es_array_concat = __webpack_require__(2222);
  5544. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.filter.js
  5545. var es_array_filter = __webpack_require__(7327);
  5546. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.index-of.js
  5547. var es_array_index_of = __webpack_require__(2772);
  5548. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.iterator.js
  5549. var es_array_iterator = __webpack_require__(6992);
  5550. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.map.js
  5551. var es_array_map = __webpack_require__(1249);
  5552. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.slice.js
  5553. var es_array_slice = __webpack_require__(7042);
  5554. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.splice.js
  5555. var es_array_splice = __webpack_require__(561);
  5556. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array-buffer.constructor.js
  5557. var es_array_buffer_constructor = __webpack_require__(8264);
  5558. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.function.name.js
  5559. var es_function_name = __webpack_require__(8309);
  5560. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.get-prototype-of.js
  5561. var es_object_get_prototype_of = __webpack_require__(489);
  5562. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.to-string.js
  5563. var es_object_to_string = __webpack_require__(1539);
  5564. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.exec.js
  5565. var es_regexp_exec = __webpack_require__(4916);
  5566. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.to-string.js
  5567. var es_regexp_to_string = __webpack_require__(9714);
  5568. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.iterator.js
  5569. var es_string_iterator = __webpack_require__(8783);
  5570. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.match.js
  5571. var es_string_match = __webpack_require__(4723);
  5572. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.replace.js
  5573. var es_string_replace = __webpack_require__(5306);
  5574. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.split.js
  5575. var es_string_split = __webpack_require__(3123);
  5576. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.trim.js
  5577. var es_string_trim = __webpack_require__(3210);
  5578. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.uint8-array.js
  5579. var es_typed_array_uint8_array = __webpack_require__(2472);
  5580. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.copy-within.js
  5581. var es_typed_array_copy_within = __webpack_require__(2990);
  5582. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.every.js
  5583. var es_typed_array_every = __webpack_require__(8927);
  5584. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.fill.js
  5585. var es_typed_array_fill = __webpack_require__(3105);
  5586. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.filter.js
  5587. var es_typed_array_filter = __webpack_require__(5035);
  5588. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.find.js
  5589. var es_typed_array_find = __webpack_require__(4345);
  5590. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.find-index.js
  5591. var es_typed_array_find_index = __webpack_require__(7174);
  5592. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.for-each.js
  5593. var es_typed_array_for_each = __webpack_require__(2846);
  5594. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.includes.js
  5595. var es_typed_array_includes = __webpack_require__(4731);
  5596. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.index-of.js
  5597. var es_typed_array_index_of = __webpack_require__(7209);
  5598. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.iterator.js
  5599. var es_typed_array_iterator = __webpack_require__(6319);
  5600. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.join.js
  5601. var es_typed_array_join = __webpack_require__(8867);
  5602. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.last-index-of.js
  5603. var es_typed_array_last_index_of = __webpack_require__(7789);
  5604. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.map.js
  5605. var es_typed_array_map = __webpack_require__(3739);
  5606. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.reduce.js
  5607. var es_typed_array_reduce = __webpack_require__(9368);
  5608. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.reduce-right.js
  5609. var es_typed_array_reduce_right = __webpack_require__(4483);
  5610. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.reverse.js
  5611. var es_typed_array_reverse = __webpack_require__(2056);
  5612. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.set.js
  5613. var es_typed_array_set = __webpack_require__(3462);
  5614. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.slice.js
  5615. var es_typed_array_slice = __webpack_require__(678);
  5616. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.some.js
  5617. var es_typed_array_some = __webpack_require__(7462);
  5618. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.sort.js
  5619. var es_typed_array_sort = __webpack_require__(3824);
  5620. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.subarray.js
  5621. var es_typed_array_subarray = __webpack_require__(5021);
  5622. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.to-locale-string.js
  5623. var es_typed_array_to_locale_string = __webpack_require__(2974);
  5624. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.to-string.js
  5625. var es_typed_array_to_string = __webpack_require__(5016);
  5626. // EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.for-each.js
  5627. var web_dom_collections_for_each = __webpack_require__(4747);
  5628. // EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.iterator.js
  5629. var web_dom_collections_iterator = __webpack_require__(3948);
  5630. // EXTERNAL MODULE: ./node_modules/core-js/modules/web.url.js
  5631. var web_url = __webpack_require__(285);
  5632. ;// CONCATENATED MODULE: ./src/emitter.js
  5633. 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; } } }; }
  5634. 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); }
  5635. 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; }
  5636. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  5637. 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); } }
  5638. function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
  5639. // The Emitter class provides the ability to call `.on()` on Dropzone to listen
  5640. // to events.
  5641. // It is strongly based on component's emitter class, and I removed the
  5642. // functionality because of the dependency hell with different frameworks.
  5643. var Emitter = /*#__PURE__*/function () {
  5644. function Emitter() {
  5645. _classCallCheck(this, Emitter);
  5646. }
  5647. _createClass(Emitter, [{
  5648. key: "on",
  5649. value: // Add an event listener for given event
  5650. function on(event, fn) {
  5651. this._callbacks = this._callbacks || {}; // Create namespace for this event
  5652. if (!this._callbacks[event]) {
  5653. this._callbacks[event] = [];
  5654. }
  5655. this._callbacks[event].push(fn);
  5656. return this;
  5657. }
  5658. }, {
  5659. key: "emit",
  5660. value: function emit(event) {
  5661. this._callbacks = this._callbacks || {};
  5662. var callbacks = this._callbacks[event];
  5663. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  5664. args[_key - 1] = arguments[_key];
  5665. }
  5666. if (callbacks) {
  5667. var _iterator = _createForOfIteratorHelper(callbacks, true),
  5668. _step;
  5669. try {
  5670. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  5671. var callback = _step.value;
  5672. callback.apply(this, args);
  5673. }
  5674. } catch (err) {
  5675. _iterator.e(err);
  5676. } finally {
  5677. _iterator.f();
  5678. }
  5679. } // trigger a corresponding DOM event
  5680. if (this.element) {
  5681. this.element.dispatchEvent(this.makeEvent("dropzone:" + event, {
  5682. args: args
  5683. }));
  5684. }
  5685. return this;
  5686. }
  5687. }, {
  5688. key: "makeEvent",
  5689. value: function makeEvent(eventName, detail) {
  5690. var params = {
  5691. bubbles: true,
  5692. cancelable: true,
  5693. detail: detail
  5694. };
  5695. if (typeof window.CustomEvent === "function") {
  5696. return new CustomEvent(eventName, params);
  5697. } else {
  5698. // IE 11 support
  5699. // https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent
  5700. var evt = document.createEvent("CustomEvent");
  5701. evt.initCustomEvent(eventName, params.bubbles, params.cancelable, params.detail);
  5702. return evt;
  5703. }
  5704. } // Remove event listener for given event. If fn is not provided, all event
  5705. // listeners for that event will be removed. If neither is provided, all
  5706. // event listeners will be removed.
  5707. }, {
  5708. key: "off",
  5709. value: function off(event, fn) {
  5710. if (!this._callbacks || arguments.length === 0) {
  5711. this._callbacks = {};
  5712. return this;
  5713. } // specific event
  5714. var callbacks = this._callbacks[event];
  5715. if (!callbacks) {
  5716. return this;
  5717. } // remove all handlers
  5718. if (arguments.length === 1) {
  5719. delete this._callbacks[event];
  5720. return this;
  5721. } // remove specific handler
  5722. for (var i = 0; i < callbacks.length; i++) {
  5723. var callback = callbacks[i];
  5724. if (callback === fn) {
  5725. callbacks.splice(i, 1);
  5726. break;
  5727. }
  5728. }
  5729. return this;
  5730. }
  5731. }]);
  5732. return Emitter;
  5733. }();
  5734. ;// CONCATENATED MODULE: ./src/preview-template.html
  5735. // Module
  5736. 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> ";
  5737. // Exports
  5738. /* harmony default export */ var preview_template = (code);
  5739. ;// CONCATENATED MODULE: ./src/options.js
  5740. 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; } } }; }
  5741. 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); }
  5742. 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; }
  5743. var defaultOptions = {
  5744. /**
  5745. * Has to be specified on elements other than form (or when the form
  5746. * doesn't have an `action` attribute). You can also
  5747. * provide a function that will be called with `files` and
  5748. * must return the url (since `v3.12.0`)
  5749. */
  5750. url: null,
  5751. /**
  5752. * Can be changed to `"put"` if necessary. You can also provide a function
  5753. * that will be called with `files` and must return the method (since `v3.12.0`).
  5754. */
  5755. method: "post",
  5756. /**
  5757. * Will be set on the XHRequest.
  5758. */
  5759. withCredentials: false,
  5760. /**
  5761. * The timeout for the XHR requests in milliseconds (since `v4.4.0`).
  5762. * If set to null or 0, no timeout is going to be set.
  5763. */
  5764. timeout: null,
  5765. /**
  5766. * How many file uploads to process in parallel (See the
  5767. * Enqueuing file uploads documentation section for more info)
  5768. */
  5769. parallelUploads: 2,
  5770. /**
  5771. * Whether to send multiple files in one request. If
  5772. * this it set to true, then the fallback file input element will
  5773. * have the `multiple` attribute as well. This option will
  5774. * also trigger additional events (like `processingmultiple`). See the events
  5775. * documentation section for more information.
  5776. */
  5777. uploadMultiple: false,
  5778. /**
  5779. * Whether you want files to be uploaded in chunks to your server. This can't be
  5780. * used in combination with `uploadMultiple`.
  5781. *
  5782. * See [chunksUploaded](#config-chunksUploaded) for the callback to finalise an upload.
  5783. */
  5784. chunking: false,
  5785. /**
  5786. * If `chunking` is enabled, this defines whether **every** file should be chunked,
  5787. * even if the file size is below chunkSize. This means, that the additional chunk
  5788. * form data will be submitted and the `chunksUploaded` callback will be invoked.
  5789. */
  5790. forceChunking: false,
  5791. /**
  5792. * If `chunking` is `true`, then this defines the chunk size in bytes.
  5793. */
  5794. chunkSize: 2000000,
  5795. /**
  5796. * If `true`, the individual chunks of a file are being uploaded simultaneously.
  5797. */
  5798. parallelChunkUploads: false,
  5799. /**
  5800. * Whether a chunk should be retried if it fails.
  5801. */
  5802. retryChunks: false,
  5803. /**
  5804. * If `retryChunks` is true, how many times should it be retried.
  5805. */
  5806. retryChunksLimit: 3,
  5807. /**
  5808. * The maximum filesize (in bytes) that is allowed to be uploaded.
  5809. */
  5810. maxFilesize: 256,
  5811. /**
  5812. * The name of the file param that gets transferred.
  5813. * **NOTE**: If you have the option `uploadMultiple` set to `true`, then
  5814. * Dropzone will append `[]` to the name.
  5815. */
  5816. paramName: "file",
  5817. /**
  5818. * Whether thumbnails for images should be generated
  5819. */
  5820. createImageThumbnails: true,
  5821. /**
  5822. * In MB. When the filename exceeds this limit, the thumbnail will not be generated.
  5823. */
  5824. maxThumbnailFilesize: 10,
  5825. /**
  5826. * If `null`, the ratio of the image will be used to calculate it.
  5827. */
  5828. thumbnailWidth: 120,
  5829. /**
  5830. * The same as `thumbnailWidth`. If both are null, images will not be resized.
  5831. */
  5832. thumbnailHeight: 120,
  5833. /**
  5834. * How the images should be scaled down in case both, `thumbnailWidth` and `thumbnailHeight` are provided.
  5835. * Can be either `contain` or `crop`.
  5836. */
  5837. thumbnailMethod: "crop",
  5838. /**
  5839. * If set, images will be resized to these dimensions before being **uploaded**.
  5840. * If only one, `resizeWidth` **or** `resizeHeight` is provided, the original aspect
  5841. * ratio of the file will be preserved.
  5842. *
  5843. * The `options.transformFile` function uses these options, so if the `transformFile` function
  5844. * is overridden, these options don't do anything.
  5845. */
  5846. resizeWidth: null,
  5847. /**
  5848. * See `resizeWidth`.
  5849. */
  5850. resizeHeight: null,
  5851. /**
  5852. * The mime type of the resized image (before it gets uploaded to the server).
  5853. * If `null` the original mime type will be used. To force jpeg, for example, use `image/jpeg`.
  5854. * See `resizeWidth` for more information.
  5855. */
  5856. resizeMimeType: null,
  5857. /**
  5858. * The quality of the resized images. See `resizeWidth`.
  5859. */
  5860. resizeQuality: 0.8,
  5861. /**
  5862. * How the images should be scaled down in case both, `resizeWidth` and `resizeHeight` are provided.
  5863. * Can be either `contain` or `crop`.
  5864. */
  5865. resizeMethod: "contain",
  5866. /**
  5867. * The base that is used to calculate the **displayed** filesize. You can
  5868. * change this to 1024 if you would rather display kibibytes, mebibytes,
  5869. * etc... 1024 is technically incorrect, because `1024 bytes` are `1 kibibyte`
  5870. * not `1 kilobyte`. You can change this to `1024` if you don't care about
  5871. * validity.
  5872. */
  5873. filesizeBase: 1000,
  5874. /**
  5875. * If not `null` defines how many files this Dropzone handles. If it exceeds,
  5876. * the event `maxfilesexceeded` will be called. The dropzone element gets the
  5877. * class `dz-max-files-reached` accordingly so you can provide visual
  5878. * feedback.
  5879. */
  5880. maxFiles: null,
  5881. /**
  5882. * An optional object to send additional headers to the server. Eg:
  5883. * `{ "My-Awesome-Header": "header value" }`
  5884. */
  5885. headers: null,
  5886. /**
  5887. * If `true`, the dropzone element itself will be clickable, if `false`
  5888. * nothing will be clickable.
  5889. *
  5890. * You can also pass an HTML element, a CSS selector (for multiple elements)
  5891. * or an array of those. In that case, all of those elements will trigger an
  5892. * upload when clicked.
  5893. */
  5894. clickable: true,
  5895. /**
  5896. * Whether hidden files in directories should be ignored.
  5897. */
  5898. ignoreHiddenFiles: true,
  5899. /**
  5900. * The default implementation of `accept` checks the file's mime type or
  5901. * extension against this list. This is a comma separated list of mime
  5902. * types or file extensions.
  5903. *
  5904. * Eg.: `image/*,application/pdf,.psd`
  5905. *
  5906. * If the Dropzone is `clickable` this option will also be used as
  5907. * [`accept`](https://developer.mozilla.org/en-US/docs/HTML/Element/input#attr-accept)
  5908. * parameter on the hidden file input as well.
  5909. */
  5910. acceptedFiles: null,
  5911. /**
  5912. * **Deprecated!**
  5913. * Use acceptedFiles instead.
  5914. */
  5915. acceptedMimeTypes: null,
  5916. /**
  5917. * If false, files will be added to the queue but the queue will not be
  5918. * processed automatically.
  5919. * This can be useful if you need some additional user input before sending
  5920. * files (or if you want want all files sent at once).
  5921. * If you're ready to send the file simply call `myDropzone.processQueue()`.
  5922. *
  5923. * See the [enqueuing file uploads](#enqueuing-file-uploads) documentation
  5924. * section for more information.
  5925. */
  5926. autoProcessQueue: true,
  5927. /**
  5928. * If false, files added to the dropzone will not be queued by default.
  5929. * You'll have to call `enqueueFile(file)` manually.
  5930. */
  5931. autoQueue: true,
  5932. /**
  5933. * If `true`, this will add a link to every file preview to remove or cancel (if
  5934. * already uploading) the file. The `dictCancelUpload`, `dictCancelUploadConfirmation`
  5935. * and `dictRemoveFile` options are used for the wording.
  5936. */
  5937. addRemoveLinks: false,
  5938. /**
  5939. * Defines where to display the file previews – if `null` the
  5940. * Dropzone element itself is used. Can be a plain `HTMLElement` or a CSS
  5941. * selector. The element should have the `dropzone-previews` class so
  5942. * the previews are displayed properly.
  5943. */
  5944. previewsContainer: null,
  5945. /**
  5946. * Set this to `true` if you don't want previews to be shown.
  5947. */
  5948. disablePreviews: false,
  5949. /**
  5950. * This is the element the hidden input field (which is used when clicking on the
  5951. * dropzone to trigger file selection) will be appended to. This might
  5952. * be important in case you use frameworks to switch the content of your page.
  5953. *
  5954. * Can be a selector string, or an element directly.
  5955. */
  5956. hiddenInputContainer: "body",
  5957. /**
  5958. * If null, no capture type will be specified
  5959. * If camera, mobile devices will skip the file selection and choose camera
  5960. * If microphone, mobile devices will skip the file selection and choose the microphone
  5961. * If camcorder, mobile devices will skip the file selection and choose the camera in video mode
  5962. * On apple devices multiple must be set to false. AcceptedFiles may need to
  5963. * be set to an appropriate mime type (e.g. "image/*", "audio/*", or "video/*").
  5964. */
  5965. capture: null,
  5966. /**
  5967. * **Deprecated**. Use `renameFile` instead.
  5968. */
  5969. renameFilename: null,
  5970. /**
  5971. * A function that is invoked before the file is uploaded to the server and renames the file.
  5972. * This function gets the `File` as argument and can use the `file.name`. The actual name of the
  5973. * file that gets used during the upload can be accessed through `file.upload.filename`.
  5974. */
  5975. renameFile: null,
  5976. /**
  5977. * If `true` the fallback will be forced. This is very useful to test your server
  5978. * implementations first and make sure that everything works as
  5979. * expected without dropzone if you experience problems, and to test
  5980. * how your fallbacks will look.
  5981. */
  5982. forceFallback: false,
  5983. /**
  5984. * The text used before any files are dropped.
  5985. */
  5986. dictDefaultMessage: "Drop files here to upload",
  5987. /**
  5988. * The text that replaces the default message text it the browser is not supported.
  5989. */
  5990. dictFallbackMessage: "Your browser does not support drag'n'drop file uploads.",
  5991. /**
  5992. * The text that will be added before the fallback form.
  5993. * If you provide a fallback element yourself, or if this option is `null` this will
  5994. * be ignored.
  5995. */
  5996. dictFallbackText: "Please use the fallback form below to upload your files like in the olden days.",
  5997. /**
  5998. * If the filesize is too big.
  5999. * `{{filesize}}` and `{{maxFilesize}}` will be replaced with the respective configuration values.
  6000. */
  6001. dictFileTooBig: "File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",
  6002. /**
  6003. * If the file doesn't match the file type.
  6004. */
  6005. dictInvalidFileType: "You can't upload files of this type.",
  6006. /**
  6007. * If the server response was invalid.
  6008. * `{{statusCode}}` will be replaced with the servers status code.
  6009. */
  6010. dictResponseError: "Server responded with {{statusCode}} code.",
  6011. /**
  6012. * If `addRemoveLinks` is true, the text to be used for the cancel upload link.
  6013. */
  6014. dictCancelUpload: "Cancel upload",
  6015. /**
  6016. * The text that is displayed if an upload was manually canceled
  6017. */
  6018. dictUploadCanceled: "Upload canceled.",
  6019. /**
  6020. * If `addRemoveLinks` is true, the text to be used for confirmation when cancelling upload.
  6021. */
  6022. dictCancelUploadConfirmation: "Are you sure you want to cancel this upload?",
  6023. /**
  6024. * If `addRemoveLinks` is true, the text to be used to remove a file.
  6025. */
  6026. dictRemoveFile: "Remove file",
  6027. /**
  6028. * If this is not null, then the user will be prompted before removing a file.
  6029. */
  6030. dictRemoveFileConfirmation: null,
  6031. /**
  6032. * Displayed if `maxFiles` is st and exceeded.
  6033. * The string `{{maxFiles}}` will be replaced by the configuration value.
  6034. */
  6035. dictMaxFilesExceeded: "You can not upload any more files.",
  6036. /**
  6037. * Allows you to translate the different units. Starting with `tb` for terabytes and going down to
  6038. * `b` for bytes.
  6039. */
  6040. dictFileSizeUnits: {
  6041. tb: "TB",
  6042. gb: "GB",
  6043. mb: "MB",
  6044. kb: "KB",
  6045. b: "b"
  6046. },
  6047. /**
  6048. * Called when dropzone initialized
  6049. * You can add event listeners here
  6050. */
  6051. init: function init() {},
  6052. /**
  6053. * Can be an **object** of additional parameters to transfer to the server, **or** a `Function`
  6054. * that gets invoked with the `files`, `xhr` and, if it's a chunked upload, `chunk` arguments. In case
  6055. * of a function, this needs to return a map.
  6056. *
  6057. * The default implementation does nothing for normal uploads, but adds relevant information for
  6058. * chunked uploads.
  6059. *
  6060. * This is the same as adding hidden input fields in the form element.
  6061. */
  6062. params: function params(files, xhr, chunk) {
  6063. if (chunk) {
  6064. return {
  6065. dzuuid: chunk.file.upload.uuid,
  6066. dzchunkindex: chunk.index,
  6067. dztotalfilesize: chunk.file.size,
  6068. dzchunksize: this.options.chunkSize,
  6069. dztotalchunkcount: chunk.file.upload.totalChunkCount,
  6070. dzchunkbyteoffset: chunk.index * this.options.chunkSize
  6071. };
  6072. }
  6073. },
  6074. /**
  6075. * A function that gets a [file](https://developer.mozilla.org/en-US/docs/DOM/File)
  6076. * and a `done` function as parameters.
  6077. *
  6078. * If the done function is invoked without arguments, the file is "accepted" and will
  6079. * be processed. If you pass an error message, the file is rejected, and the error
  6080. * message will be displayed.
  6081. * This function will not be called if the file is too big or doesn't match the mime types.
  6082. */
  6083. accept: function accept(file, done) {
  6084. return done();
  6085. },
  6086. /**
  6087. * The callback that will be invoked when all chunks have been uploaded for a file.
  6088. * It gets the file for which the chunks have been uploaded as the first parameter,
  6089. * and the `done` function as second. `done()` needs to be invoked when everything
  6090. * needed to finish the upload process is done.
  6091. */
  6092. chunksUploaded: function chunksUploaded(file, done) {
  6093. done();
  6094. },
  6095. /**
  6096. * Gets called when the browser is not supported.
  6097. * The default implementation shows the fallback input field and adds
  6098. * a text.
  6099. */
  6100. fallback: function fallback() {
  6101. // This code should pass in IE7... :(
  6102. var messageElement;
  6103. this.element.className = "".concat(this.element.className, " dz-browser-not-supported");
  6104. var _iterator = options_createForOfIteratorHelper(this.element.getElementsByTagName("div"), true),
  6105. _step;
  6106. try {
  6107. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  6108. var child = _step.value;
  6109. if (/(^| )dz-message($| )/.test(child.className)) {
  6110. messageElement = child;
  6111. child.className = "dz-message"; // Removes the 'dz-default' class
  6112. break;
  6113. }
  6114. }
  6115. } catch (err) {
  6116. _iterator.e(err);
  6117. } finally {
  6118. _iterator.f();
  6119. }
  6120. if (!messageElement) {
  6121. messageElement = Dropzone.createElement('<div class="dz-message"><span></span></div>');
  6122. this.element.appendChild(messageElement);
  6123. }
  6124. var span = messageElement.getElementsByTagName("span")[0];
  6125. if (span) {
  6126. if (span.textContent != null) {
  6127. span.textContent = this.options.dictFallbackMessage;
  6128. } else if (span.innerText != null) {
  6129. span.innerText = this.options.dictFallbackMessage;
  6130. }
  6131. }
  6132. return this.element.appendChild(this.getFallbackForm());
  6133. },
  6134. /**
  6135. * Gets called to calculate the thumbnail dimensions.
  6136. *
  6137. * It gets `file`, `width` and `height` (both may be `null`) as parameters and must return an object containing:
  6138. *
  6139. * - `srcWidth` & `srcHeight` (required)
  6140. * - `trgWidth` & `trgHeight` (required)
  6141. * - `srcX` & `srcY` (optional, default `0`)
  6142. * - `trgX` & `trgY` (optional, default `0`)
  6143. *
  6144. * Those values are going to be used by `ctx.drawImage()`.
  6145. */
  6146. resize: function resize(file, width, height, resizeMethod) {
  6147. var info = {
  6148. srcX: 0,
  6149. srcY: 0,
  6150. srcWidth: file.width,
  6151. srcHeight: file.height
  6152. };
  6153. var srcRatio = file.width / file.height; // Automatically calculate dimensions if not specified
  6154. if (width == null && height == null) {
  6155. width = info.srcWidth;
  6156. height = info.srcHeight;
  6157. } else if (width == null) {
  6158. width = height * srcRatio;
  6159. } else if (height == null) {
  6160. height = width / srcRatio;
  6161. } // Make sure images aren't upscaled
  6162. width = Math.min(width, info.srcWidth);
  6163. height = Math.min(height, info.srcHeight);
  6164. var trgRatio = width / height;
  6165. if (info.srcWidth > width || info.srcHeight > height) {
  6166. // Image is bigger and needs rescaling
  6167. if (resizeMethod === "crop") {
  6168. if (srcRatio > trgRatio) {
  6169. info.srcHeight = file.height;
  6170. info.srcWidth = info.srcHeight * trgRatio;
  6171. } else {
  6172. info.srcWidth = file.width;
  6173. info.srcHeight = info.srcWidth / trgRatio;
  6174. }
  6175. } else if (resizeMethod === "contain") {
  6176. // Method 'contain'
  6177. if (srcRatio > trgRatio) {
  6178. height = width / srcRatio;
  6179. } else {
  6180. width = height * srcRatio;
  6181. }
  6182. } else {
  6183. throw new Error("Unknown resizeMethod '".concat(resizeMethod, "'"));
  6184. }
  6185. }
  6186. info.srcX = (file.width - info.srcWidth) / 2;
  6187. info.srcY = (file.height - info.srcHeight) / 2;
  6188. info.trgWidth = width;
  6189. info.trgHeight = height;
  6190. return info;
  6191. },
  6192. /**
  6193. * Can be used to transform the file (for example, resize an image if necessary).
  6194. *
  6195. * The default implementation uses `resizeWidth` and `resizeHeight` (if provided) and resizes
  6196. * images according to those dimensions.
  6197. *
  6198. * Gets the `file` as the first parameter, and a `done()` function as the second, that needs
  6199. * to be invoked with the file when the transformation is done.
  6200. */
  6201. transformFile: function transformFile(file, done) {
  6202. if ((this.options.resizeWidth || this.options.resizeHeight) && file.type.match(/image.*/)) {
  6203. return this.resizeImage(file, this.options.resizeWidth, this.options.resizeHeight, this.options.resizeMethod, done);
  6204. } else {
  6205. return done(file);
  6206. }
  6207. },
  6208. /**
  6209. * A string that contains the template used for each dropped
  6210. * file. Change it to fulfill your needs but make sure to properly
  6211. * provide all elements.
  6212. *
  6213. * If you want to use an actual HTML element instead of providing a String
  6214. * as a config option, you could create a div with the id `tpl`,
  6215. * put the template inside it and provide the element like this:
  6216. *
  6217. * document
  6218. * .querySelector('#tpl')
  6219. * .innerHTML
  6220. *
  6221. */
  6222. previewTemplate: preview_template,
  6223. /*
  6224. Those functions register themselves to the events on init and handle all
  6225. the user interface specific stuff. Overwriting them won't break the upload
  6226. but can break the way it's displayed.
  6227. You can overwrite them if you don't like the default behavior. If you just
  6228. want to add an additional event handler, register it on the dropzone object
  6229. and don't overwrite those options.
  6230. */
  6231. // Those are self explanatory and simply concern the DragnDrop.
  6232. drop: function drop(e) {
  6233. return this.element.classList.remove("dz-drag-hover");
  6234. },
  6235. dragstart: function dragstart(e) {},
  6236. dragend: function dragend(e) {
  6237. return this.element.classList.remove("dz-drag-hover");
  6238. },
  6239. dragenter: function dragenter(e) {
  6240. return this.element.classList.add("dz-drag-hover");
  6241. },
  6242. dragover: function dragover(e) {
  6243. return this.element.classList.add("dz-drag-hover");
  6244. },
  6245. dragleave: function dragleave(e) {
  6246. return this.element.classList.remove("dz-drag-hover");
  6247. },
  6248. paste: function paste(e) {},
  6249. // Called whenever there are no files left in the dropzone anymore, and the
  6250. // dropzone should be displayed as if in the initial state.
  6251. reset: function reset() {
  6252. return this.element.classList.remove("dz-started");
  6253. },
  6254. // Called when a file is added to the queue
  6255. // Receives `file`
  6256. addedfile: function addedfile(file) {
  6257. var _this = this;
  6258. if (this.element === this.previewsContainer) {
  6259. this.element.classList.add("dz-started");
  6260. }
  6261. if (this.previewsContainer && !this.options.disablePreviews) {
  6262. file.previewElement = Dropzone.createElement(this.options.previewTemplate.trim());
  6263. file.previewTemplate = file.previewElement; // Backwards compatibility
  6264. this.previewsContainer.appendChild(file.previewElement);
  6265. var _iterator2 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-name]"), true),
  6266. _step2;
  6267. try {
  6268. for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
  6269. var node = _step2.value;
  6270. node.textContent = file.name;
  6271. }
  6272. } catch (err) {
  6273. _iterator2.e(err);
  6274. } finally {
  6275. _iterator2.f();
  6276. }
  6277. var _iterator3 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-size]"), true),
  6278. _step3;
  6279. try {
  6280. for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
  6281. node = _step3.value;
  6282. node.innerHTML = this.filesize(file.size);
  6283. }
  6284. } catch (err) {
  6285. _iterator3.e(err);
  6286. } finally {
  6287. _iterator3.f();
  6288. }
  6289. if (this.options.addRemoveLinks) {
  6290. file._removeLink = Dropzone.createElement("<a class=\"dz-remove\" href=\"javascript:undefined;\" data-dz-remove>".concat(this.options.dictRemoveFile, "</a>"));
  6291. file.previewElement.appendChild(file._removeLink);
  6292. }
  6293. var removeFileEvent = function removeFileEvent(e) {
  6294. e.preventDefault();
  6295. e.stopPropagation();
  6296. if (file.status === Dropzone.UPLOADING) {
  6297. return Dropzone.confirm(_this.options.dictCancelUploadConfirmation, function () {
  6298. return _this.removeFile(file);
  6299. });
  6300. } else {
  6301. if (_this.options.dictRemoveFileConfirmation) {
  6302. return Dropzone.confirm(_this.options.dictRemoveFileConfirmation, function () {
  6303. return _this.removeFile(file);
  6304. });
  6305. } else {
  6306. return _this.removeFile(file);
  6307. }
  6308. }
  6309. };
  6310. var _iterator4 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-remove]"), true),
  6311. _step4;
  6312. try {
  6313. for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
  6314. var removeLink = _step4.value;
  6315. removeLink.addEventListener("click", removeFileEvent);
  6316. }
  6317. } catch (err) {
  6318. _iterator4.e(err);
  6319. } finally {
  6320. _iterator4.f();
  6321. }
  6322. }
  6323. },
  6324. // Called whenever a file is removed.
  6325. removedfile: function removedfile(file) {
  6326. if (file.previewElement != null && file.previewElement.parentNode != null) {
  6327. file.previewElement.parentNode.removeChild(file.previewElement);
  6328. }
  6329. return this._updateMaxFilesReachedClass();
  6330. },
  6331. // Called when a thumbnail has been generated
  6332. // Receives `file` and `dataUrl`
  6333. thumbnail: function thumbnail(file, dataUrl) {
  6334. if (file.previewElement) {
  6335. file.previewElement.classList.remove("dz-file-preview");
  6336. var _iterator5 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-thumbnail]"), true),
  6337. _step5;
  6338. try {
  6339. for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
  6340. var thumbnailElement = _step5.value;
  6341. thumbnailElement.alt = file.name;
  6342. thumbnailElement.src = dataUrl;
  6343. }
  6344. } catch (err) {
  6345. _iterator5.e(err);
  6346. } finally {
  6347. _iterator5.f();
  6348. }
  6349. return setTimeout(function () {
  6350. return file.previewElement.classList.add("dz-image-preview");
  6351. }, 1);
  6352. }
  6353. },
  6354. // Called whenever an error occurs
  6355. // Receives `file` and `message`
  6356. error: function error(file, message) {
  6357. if (file.previewElement) {
  6358. file.previewElement.classList.add("dz-error");
  6359. if (typeof message !== "string" && message.error) {
  6360. message = message.error;
  6361. }
  6362. var _iterator6 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-errormessage]"), true),
  6363. _step6;
  6364. try {
  6365. for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
  6366. var node = _step6.value;
  6367. node.textContent = message;
  6368. }
  6369. } catch (err) {
  6370. _iterator6.e(err);
  6371. } finally {
  6372. _iterator6.f();
  6373. }
  6374. }
  6375. },
  6376. errormultiple: function errormultiple() {},
  6377. // Called when a file gets processed. Since there is a cue, not all added
  6378. // files are processed immediately.
  6379. // Receives `file`
  6380. processing: function processing(file) {
  6381. if (file.previewElement) {
  6382. file.previewElement.classList.add("dz-processing");
  6383. if (file._removeLink) {
  6384. return file._removeLink.innerHTML = this.options.dictCancelUpload;
  6385. }
  6386. }
  6387. },
  6388. processingmultiple: function processingmultiple() {},
  6389. // Called whenever the upload progress gets updated.
  6390. // Receives `file`, `progress` (percentage 0-100) and `bytesSent`.
  6391. // To get the total number of bytes of the file, use `file.size`
  6392. uploadprogress: function uploadprogress(file, progress, bytesSent) {
  6393. if (file.previewElement) {
  6394. var _iterator7 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-uploadprogress]"), true),
  6395. _step7;
  6396. try {
  6397. for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
  6398. var node = _step7.value;
  6399. node.nodeName === "PROGRESS" ? node.value = progress : node.style.width = "".concat(progress, "%");
  6400. }
  6401. } catch (err) {
  6402. _iterator7.e(err);
  6403. } finally {
  6404. _iterator7.f();
  6405. }
  6406. }
  6407. },
  6408. // Called whenever the total upload progress gets updated.
  6409. // Called with totalUploadProgress (0-100), totalBytes and totalBytesSent
  6410. totaluploadprogress: function totaluploadprogress() {},
  6411. // Called just before the file is sent. Gets the `xhr` object as second
  6412. // parameter, so you can modify it (for example to add a CSRF token) and a
  6413. // `formData` object to add additional information.
  6414. sending: function sending() {},
  6415. sendingmultiple: function sendingmultiple() {},
  6416. // When the complete upload is finished and successful
  6417. // Receives `file`
  6418. success: function success(file) {
  6419. if (file.previewElement) {
  6420. return file.previewElement.classList.add("dz-success");
  6421. }
  6422. },
  6423. successmultiple: function successmultiple() {},
  6424. // When the upload is canceled.
  6425. canceled: function canceled(file) {
  6426. return this.emit("error", file, this.options.dictUploadCanceled);
  6427. },
  6428. canceledmultiple: function canceledmultiple() {},
  6429. // When the upload is finished, either with success or an error.
  6430. // Receives `file`
  6431. complete: function complete(file) {
  6432. if (file._removeLink) {
  6433. file._removeLink.innerHTML = this.options.dictRemoveFile;
  6434. }
  6435. if (file.previewElement) {
  6436. return file.previewElement.classList.add("dz-complete");
  6437. }
  6438. },
  6439. completemultiple: function completemultiple() {},
  6440. maxfilesexceeded: function maxfilesexceeded() {},
  6441. maxfilesreached: function maxfilesreached() {},
  6442. queuecomplete: function queuecomplete() {},
  6443. addedfiles: function addedfiles() {}
  6444. };
  6445. /* harmony default export */ var src_options = (defaultOptions);
  6446. ;// CONCATENATED MODULE: ./src/dropzone.js
  6447. 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); }
  6448. 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; } } }; }
  6449. 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); }
  6450. 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; }
  6451. function dropzone_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  6452. 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); } }
  6453. function dropzone_createClass(Constructor, protoProps, staticProps) { if (protoProps) dropzone_defineProperties(Constructor.prototype, protoProps); if (staticProps) dropzone_defineProperties(Constructor, staticProps); return Constructor; }
  6454. 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); }
  6455. function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
  6456. 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); }; }
  6457. function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
  6458. function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  6459. 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; } }
  6460. function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
  6461. var Dropzone = /*#__PURE__*/function (_Emitter) {
  6462. _inherits(Dropzone, _Emitter);
  6463. var _super = _createSuper(Dropzone);
  6464. function Dropzone(el, options) {
  6465. var _this;
  6466. dropzone_classCallCheck(this, Dropzone);
  6467. _this = _super.call(this);
  6468. var fallback, left;
  6469. _this.element = el; // For backwards compatibility since the version was in the prototype previously
  6470. _this.version = Dropzone.version;
  6471. _this.clickableElements = [];
  6472. _this.listeners = [];
  6473. _this.files = []; // All files
  6474. if (typeof _this.element === "string") {
  6475. _this.element = document.querySelector(_this.element);
  6476. } // Not checking if instance of HTMLElement or Element since IE9 is extremely weird.
  6477. if (!_this.element || _this.element.nodeType == null) {
  6478. throw new Error("Invalid dropzone element.");
  6479. }
  6480. if (_this.element.dropzone) {
  6481. throw new Error("Dropzone already attached.");
  6482. } // Now add this dropzone to the instances.
  6483. Dropzone.instances.push(_assertThisInitialized(_this)); // Put the dropzone inside the element itself.
  6484. _this.element.dropzone = _assertThisInitialized(_this);
  6485. var elementOptions = (left = Dropzone.optionsForElement(_this.element)) != null ? left : {};
  6486. _this.options = Dropzone.extend({}, src_options, elementOptions, options != null ? options : {});
  6487. _this.options.previewTemplate = _this.options.previewTemplate.replace(/\n*/g, ""); // If the browser failed, just call the fallback and leave
  6488. if (_this.options.forceFallback || !Dropzone.isBrowserSupported()) {
  6489. return _possibleConstructorReturn(_this, _this.options.fallback.call(_assertThisInitialized(_this)));
  6490. } // @options.url = @element.getAttribute "action" unless @options.url?
  6491. if (_this.options.url == null) {
  6492. _this.options.url = _this.element.getAttribute("action");
  6493. }
  6494. if (!_this.options.url) {
  6495. throw new Error("No URL provided.");
  6496. }
  6497. if (_this.options.acceptedFiles && _this.options.acceptedMimeTypes) {
  6498. throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");
  6499. }
  6500. if (_this.options.uploadMultiple && _this.options.chunking) {
  6501. throw new Error("You cannot set both: uploadMultiple and chunking.");
  6502. } // Backwards compatibility
  6503. if (_this.options.acceptedMimeTypes) {
  6504. _this.options.acceptedFiles = _this.options.acceptedMimeTypes;
  6505. delete _this.options.acceptedMimeTypes;
  6506. } // Backwards compatibility
  6507. if (_this.options.renameFilename != null) {
  6508. _this.options.renameFile = function (file) {
  6509. return _this.options.renameFilename.call(_assertThisInitialized(_this), file.name, file);
  6510. };
  6511. }
  6512. if (typeof _this.options.method === "string") {
  6513. _this.options.method = _this.options.method.toUpperCase();
  6514. }
  6515. if ((fallback = _this.getExistingFallback()) && fallback.parentNode) {
  6516. // Remove the fallback
  6517. fallback.parentNode.removeChild(fallback);
  6518. } // Display previews in the previewsContainer element or the Dropzone element unless explicitly set to false
  6519. if (_this.options.previewsContainer !== false) {
  6520. if (_this.options.previewsContainer) {
  6521. _this.previewsContainer = Dropzone.getElement(_this.options.previewsContainer, "previewsContainer");
  6522. } else {
  6523. _this.previewsContainer = _this.element;
  6524. }
  6525. }
  6526. if (_this.options.clickable) {
  6527. if (_this.options.clickable === true) {
  6528. _this.clickableElements = [_this.element];
  6529. } else {
  6530. _this.clickableElements = Dropzone.getElements(_this.options.clickable, "clickable");
  6531. }
  6532. }
  6533. _this.init();
  6534. return _this;
  6535. } // Returns all files that have been accepted
  6536. dropzone_createClass(Dropzone, [{
  6537. key: "getAcceptedFiles",
  6538. value: function getAcceptedFiles() {
  6539. return this.files.filter(function (file) {
  6540. return file.accepted;
  6541. }).map(function (file) {
  6542. return file;
  6543. });
  6544. } // Returns all files that have been rejected
  6545. // Not sure when that's going to be useful, but added for completeness.
  6546. }, {
  6547. key: "getRejectedFiles",
  6548. value: function getRejectedFiles() {
  6549. return this.files.filter(function (file) {
  6550. return !file.accepted;
  6551. }).map(function (file) {
  6552. return file;
  6553. });
  6554. }
  6555. }, {
  6556. key: "getFilesWithStatus",
  6557. value: function getFilesWithStatus(status) {
  6558. return this.files.filter(function (file) {
  6559. return file.status === status;
  6560. }).map(function (file) {
  6561. return file;
  6562. });
  6563. } // Returns all files that are in the queue
  6564. }, {
  6565. key: "getQueuedFiles",
  6566. value: function getQueuedFiles() {
  6567. return this.getFilesWithStatus(Dropzone.QUEUED);
  6568. }
  6569. }, {
  6570. key: "getUploadingFiles",
  6571. value: function getUploadingFiles() {
  6572. return this.getFilesWithStatus(Dropzone.UPLOADING);
  6573. }
  6574. }, {
  6575. key: "getAddedFiles",
  6576. value: function getAddedFiles() {
  6577. return this.getFilesWithStatus(Dropzone.ADDED);
  6578. } // Files that are either queued or uploading
  6579. }, {
  6580. key: "getActiveFiles",
  6581. value: function getActiveFiles() {
  6582. return this.files.filter(function (file) {
  6583. return file.status === Dropzone.UPLOADING || file.status === Dropzone.QUEUED;
  6584. }).map(function (file) {
  6585. return file;
  6586. });
  6587. } // The function that gets called when Dropzone is initialized. You
  6588. // can (and should) setup event listeners inside this function.
  6589. }, {
  6590. key: "init",
  6591. value: function init() {
  6592. var _this2 = this;
  6593. // In case it isn't set already
  6594. if (this.element.tagName === "form") {
  6595. this.element.setAttribute("enctype", "multipart/form-data");
  6596. }
  6597. if (this.element.classList.contains("dropzone") && !this.element.querySelector(".dz-message")) {
  6598. this.element.appendChild(Dropzone.createElement("<div class=\"dz-default dz-message\"><button class=\"dz-button\" type=\"button\">".concat(this.options.dictDefaultMessage, "</button></div>")));
  6599. }
  6600. if (this.clickableElements.length) {
  6601. var setupHiddenFileInput = function setupHiddenFileInput() {
  6602. if (_this2.hiddenFileInput) {
  6603. _this2.hiddenFileInput.parentNode.removeChild(_this2.hiddenFileInput);
  6604. }
  6605. _this2.hiddenFileInput = document.createElement("input");
  6606. _this2.hiddenFileInput.setAttribute("type", "file");
  6607. if (_this2.options.maxFiles === null || _this2.options.maxFiles > 1) {
  6608. _this2.hiddenFileInput.setAttribute("multiple", "multiple");
  6609. }
  6610. _this2.hiddenFileInput.className = "dz-hidden-input";
  6611. if (_this2.options.acceptedFiles !== null) {
  6612. _this2.hiddenFileInput.setAttribute("accept", _this2.options.acceptedFiles);
  6613. }
  6614. if (_this2.options.capture !== null) {
  6615. _this2.hiddenFileInput.setAttribute("capture", _this2.options.capture);
  6616. } // Making sure that no one can "tab" into this field.
  6617. _this2.hiddenFileInput.setAttribute("tabindex", "-1"); // Not setting `display="none"` because some browsers don't accept clicks
  6618. // on elements that aren't displayed.
  6619. _this2.hiddenFileInput.style.visibility = "hidden";
  6620. _this2.hiddenFileInput.style.position = "absolute";
  6621. _this2.hiddenFileInput.style.top = "0";
  6622. _this2.hiddenFileInput.style.left = "0";
  6623. _this2.hiddenFileInput.style.height = "0";
  6624. _this2.hiddenFileInput.style.width = "0";
  6625. Dropzone.getElement(_this2.options.hiddenInputContainer, "hiddenInputContainer").appendChild(_this2.hiddenFileInput);
  6626. _this2.hiddenFileInput.addEventListener("change", function () {
  6627. var files = _this2.hiddenFileInput.files;
  6628. if (files.length) {
  6629. var _iterator = dropzone_createForOfIteratorHelper(files, true),
  6630. _step;
  6631. try {
  6632. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  6633. var file = _step.value;
  6634. _this2.addFile(file);
  6635. }
  6636. } catch (err) {
  6637. _iterator.e(err);
  6638. } finally {
  6639. _iterator.f();
  6640. }
  6641. }
  6642. _this2.emit("addedfiles", files);
  6643. setupHiddenFileInput();
  6644. });
  6645. };
  6646. setupHiddenFileInput();
  6647. }
  6648. this.URL = window.URL !== null ? window.URL : window.webkitURL; // Setup all event listeners on the Dropzone object itself.
  6649. // They're not in @setupEventListeners() because they shouldn't be removed
  6650. // again when the dropzone gets disabled.
  6651. var _iterator2 = dropzone_createForOfIteratorHelper(this.events, true),
  6652. _step2;
  6653. try {
  6654. for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
  6655. var eventName = _step2.value;
  6656. this.on(eventName, this.options[eventName]);
  6657. }
  6658. } catch (err) {
  6659. _iterator2.e(err);
  6660. } finally {
  6661. _iterator2.f();
  6662. }
  6663. this.on("uploadprogress", function () {
  6664. return _this2.updateTotalUploadProgress();
  6665. });
  6666. this.on("removedfile", function () {
  6667. return _this2.updateTotalUploadProgress();
  6668. });
  6669. this.on("canceled", function (file) {
  6670. return _this2.emit("complete", file);
  6671. }); // Emit a `queuecomplete` event if all files finished uploading.
  6672. this.on("complete", function (file) {
  6673. if (_this2.getAddedFiles().length === 0 && _this2.getUploadingFiles().length === 0 && _this2.getQueuedFiles().length === 0) {
  6674. // This needs to be deferred so that `queuecomplete` really triggers after `complete`
  6675. return setTimeout(function () {
  6676. return _this2.emit("queuecomplete");
  6677. }, 0);
  6678. }
  6679. });
  6680. var containsFiles = function containsFiles(e) {
  6681. if (e.dataTransfer.types) {
  6682. // Because e.dataTransfer.types is an Object in
  6683. // IE, we need to iterate like this instead of
  6684. // using e.dataTransfer.types.some()
  6685. for (var i = 0; i < e.dataTransfer.types.length; i++) {
  6686. if (e.dataTransfer.types[i] === "Files") return true;
  6687. }
  6688. }
  6689. return false;
  6690. };
  6691. var noPropagation = function noPropagation(e) {
  6692. // If there are no files, we don't want to stop
  6693. // propagation so we don't interfere with other
  6694. // drag and drop behaviour.
  6695. if (!containsFiles(e)) return;
  6696. e.stopPropagation();
  6697. if (e.preventDefault) {
  6698. return e.preventDefault();
  6699. } else {
  6700. return e.returnValue = false;
  6701. }
  6702. }; // Create the listeners
  6703. this.listeners = [{
  6704. element: this.element,
  6705. events: {
  6706. dragstart: function dragstart(e) {
  6707. return _this2.emit("dragstart", e);
  6708. },
  6709. dragenter: function dragenter(e) {
  6710. noPropagation(e);
  6711. return _this2.emit("dragenter", e);
  6712. },
  6713. dragover: function dragover(e) {
  6714. // Makes it possible to drag files from chrome's download bar
  6715. // http://stackoverflow.com/questions/19526430/drag-and-drop-file-uploads-from-chrome-downloads-bar
  6716. // Try is required to prevent bug in Internet Explorer 11 (SCRIPT65535 exception)
  6717. var efct;
  6718. try {
  6719. efct = e.dataTransfer.effectAllowed;
  6720. } catch (error) {}
  6721. e.dataTransfer.dropEffect = "move" === efct || "linkMove" === efct ? "move" : "copy";
  6722. noPropagation(e);
  6723. return _this2.emit("dragover", e);
  6724. },
  6725. dragleave: function dragleave(e) {
  6726. return _this2.emit("dragleave", e);
  6727. },
  6728. drop: function drop(e) {
  6729. noPropagation(e);
  6730. return _this2.drop(e);
  6731. },
  6732. dragend: function dragend(e) {
  6733. return _this2.emit("dragend", e);
  6734. }
  6735. } // This is disabled right now, because the browsers don't implement it properly.
  6736. // "paste": (e) =>
  6737. // noPropagation e
  6738. // @paste e
  6739. }];
  6740. this.clickableElements.forEach(function (clickableElement) {
  6741. return _this2.listeners.push({
  6742. element: clickableElement,
  6743. events: {
  6744. click: function click(evt) {
  6745. // Only the actual dropzone or the message element should trigger file selection
  6746. if (clickableElement !== _this2.element || evt.target === _this2.element || Dropzone.elementInside(evt.target, _this2.element.querySelector(".dz-message"))) {
  6747. _this2.hiddenFileInput.click(); // Forward the click
  6748. }
  6749. return true;
  6750. }
  6751. }
  6752. });
  6753. });
  6754. this.enable();
  6755. return this.options.init.call(this);
  6756. } // Not fully tested yet
  6757. }, {
  6758. key: "destroy",
  6759. value: function destroy() {
  6760. this.disable();
  6761. this.removeAllFiles(true);
  6762. if (this.hiddenFileInput != null ? this.hiddenFileInput.parentNode : undefined) {
  6763. this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput);
  6764. this.hiddenFileInput = null;
  6765. }
  6766. delete this.element.dropzone;
  6767. return Dropzone.instances.splice(Dropzone.instances.indexOf(this), 1);
  6768. }
  6769. }, {
  6770. key: "updateTotalUploadProgress",
  6771. value: function updateTotalUploadProgress() {
  6772. var totalUploadProgress;
  6773. var totalBytesSent = 0;
  6774. var totalBytes = 0;
  6775. var activeFiles = this.getActiveFiles();
  6776. if (activeFiles.length) {
  6777. var _iterator3 = dropzone_createForOfIteratorHelper(this.getActiveFiles(), true),
  6778. _step3;
  6779. try {
  6780. for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
  6781. var file = _step3.value;
  6782. totalBytesSent += file.upload.bytesSent;
  6783. totalBytes += file.upload.total;
  6784. }
  6785. } catch (err) {
  6786. _iterator3.e(err);
  6787. } finally {
  6788. _iterator3.f();
  6789. }
  6790. totalUploadProgress = 100 * totalBytesSent / totalBytes;
  6791. } else {
  6792. totalUploadProgress = 100;
  6793. }
  6794. return this.emit("totaluploadprogress", totalUploadProgress, totalBytes, totalBytesSent);
  6795. } // @options.paramName can be a function taking one parameter rather than a string.
  6796. // A parameter name for a file is obtained simply by calling this with an index number.
  6797. }, {
  6798. key: "_getParamName",
  6799. value: function _getParamName(n) {
  6800. if (typeof this.options.paramName === "function") {
  6801. return this.options.paramName(n);
  6802. } else {
  6803. return "".concat(this.options.paramName).concat(this.options.uploadMultiple ? "[".concat(n, "]") : "");
  6804. }
  6805. } // If @options.renameFile is a function,
  6806. // the function will be used to rename the file.name before appending it to the formData
  6807. }, {
  6808. key: "_renameFile",
  6809. value: function _renameFile(file) {
  6810. if (typeof this.options.renameFile !== "function") {
  6811. return file.name;
  6812. }
  6813. return this.options.renameFile(file);
  6814. } // Returns a form that can be used as fallback if the browser does not support DragnDrop
  6815. //
  6816. // If the dropzone is already a form, only the input field and button are returned. Otherwise a complete form element is provided.
  6817. // This code has to pass in IE7 :(
  6818. }, {
  6819. key: "getFallbackForm",
  6820. value: function getFallbackForm() {
  6821. var existingFallback, form;
  6822. if (existingFallback = this.getExistingFallback()) {
  6823. return existingFallback;
  6824. }
  6825. var fieldsString = '<div class="dz-fallback">';
  6826. if (this.options.dictFallbackText) {
  6827. fieldsString += "<p>".concat(this.options.dictFallbackText, "</p>");
  6828. }
  6829. fieldsString += "<input type=\"file\" name=\"".concat(this._getParamName(0), "\" ").concat(this.options.uploadMultiple ? 'multiple="multiple"' : undefined, " /><input type=\"submit\" value=\"Upload!\"></div>");
  6830. var fields = Dropzone.createElement(fieldsString);
  6831. if (this.element.tagName !== "FORM") {
  6832. form = Dropzone.createElement("<form action=\"".concat(this.options.url, "\" enctype=\"multipart/form-data\" method=\"").concat(this.options.method, "\"></form>"));
  6833. form.appendChild(fields);
  6834. } else {
  6835. // Make sure that the enctype and method attributes are set properly
  6836. this.element.setAttribute("enctype", "multipart/form-data");
  6837. this.element.setAttribute("method", this.options.method);
  6838. }
  6839. return form != null ? form : fields;
  6840. } // Returns the fallback elements if they exist already
  6841. //
  6842. // This code has to pass in IE7 :(
  6843. }, {
  6844. key: "getExistingFallback",
  6845. value: function getExistingFallback() {
  6846. var getFallback = function getFallback(elements) {
  6847. var _iterator4 = dropzone_createForOfIteratorHelper(elements, true),
  6848. _step4;
  6849. try {
  6850. for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
  6851. var el = _step4.value;
  6852. if (/(^| )fallback($| )/.test(el.className)) {
  6853. return el;
  6854. }
  6855. }
  6856. } catch (err) {
  6857. _iterator4.e(err);
  6858. } finally {
  6859. _iterator4.f();
  6860. }
  6861. };
  6862. for (var _i = 0, _arr = ["div", "form"]; _i < _arr.length; _i++) {
  6863. var tagName = _arr[_i];
  6864. var fallback;
  6865. if (fallback = getFallback(this.element.getElementsByTagName(tagName))) {
  6866. return fallback;
  6867. }
  6868. }
  6869. } // Activates all listeners stored in @listeners
  6870. }, {
  6871. key: "setupEventListeners",
  6872. value: function setupEventListeners() {
  6873. return this.listeners.map(function (elementListeners) {
  6874. return function () {
  6875. var result = [];
  6876. for (var event in elementListeners.events) {
  6877. var listener = elementListeners.events[event];
  6878. result.push(elementListeners.element.addEventListener(event, listener, false));
  6879. }
  6880. return result;
  6881. }();
  6882. });
  6883. } // Deactivates all listeners stored in @listeners
  6884. }, {
  6885. key: "removeEventListeners",
  6886. value: function removeEventListeners() {
  6887. return this.listeners.map(function (elementListeners) {
  6888. return function () {
  6889. var result = [];
  6890. for (var event in elementListeners.events) {
  6891. var listener = elementListeners.events[event];
  6892. result.push(elementListeners.element.removeEventListener(event, listener, false));
  6893. }
  6894. return result;
  6895. }();
  6896. });
  6897. } // Removes all event listeners and cancels all files in the queue or being processed.
  6898. }, {
  6899. key: "disable",
  6900. value: function disable() {
  6901. var _this3 = this;
  6902. this.clickableElements.forEach(function (element) {
  6903. return element.classList.remove("dz-clickable");
  6904. });
  6905. this.removeEventListeners();
  6906. this.disabled = true;
  6907. return this.files.map(function (file) {
  6908. return _this3.cancelUpload(file);
  6909. });
  6910. }
  6911. }, {
  6912. key: "enable",
  6913. value: function enable() {
  6914. delete this.disabled;
  6915. this.clickableElements.forEach(function (element) {
  6916. return element.classList.add("dz-clickable");
  6917. });
  6918. return this.setupEventListeners();
  6919. } // Returns a nicely formatted filesize
  6920. }, {
  6921. key: "filesize",
  6922. value: function filesize(size) {
  6923. var selectedSize = 0;
  6924. var selectedUnit = "b";
  6925. if (size > 0) {
  6926. var units = ["tb", "gb", "mb", "kb", "b"];
  6927. for (var i = 0; i < units.length; i++) {
  6928. var unit = units[i];
  6929. var cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10;
  6930. if (size >= cutoff) {
  6931. selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i);
  6932. selectedUnit = unit;
  6933. break;
  6934. }
  6935. }
  6936. selectedSize = Math.round(10 * selectedSize) / 10; // Cutting of digits
  6937. }
  6938. return "<strong>".concat(selectedSize, "</strong> ").concat(this.options.dictFileSizeUnits[selectedUnit]);
  6939. } // Adds or removes the `dz-max-files-reached` class from the form.
  6940. }, {
  6941. key: "_updateMaxFilesReachedClass",
  6942. value: function _updateMaxFilesReachedClass() {
  6943. if (this.options.maxFiles != null && this.getAcceptedFiles().length >= this.options.maxFiles) {
  6944. if (this.getAcceptedFiles().length === this.options.maxFiles) {
  6945. this.emit("maxfilesreached", this.files);
  6946. }
  6947. return this.element.classList.add("dz-max-files-reached");
  6948. } else {
  6949. return this.element.classList.remove("dz-max-files-reached");
  6950. }
  6951. }
  6952. }, {
  6953. key: "drop",
  6954. value: function drop(e) {
  6955. if (!e.dataTransfer) {
  6956. return;
  6957. }
  6958. this.emit("drop", e); // Convert the FileList to an Array
  6959. // This is necessary for IE11
  6960. var files = [];
  6961. for (var i = 0; i < e.dataTransfer.files.length; i++) {
  6962. files[i] = e.dataTransfer.files[i];
  6963. } // Even if it's a folder, files.length will contain the folders.
  6964. if (files.length) {
  6965. var items = e.dataTransfer.items;
  6966. if (items && items.length && items[0].webkitGetAsEntry != null) {
  6967. // The browser supports dropping of folders, so handle items instead of files
  6968. this._addFilesFromItems(items);
  6969. } else {
  6970. this.handleFiles(files);
  6971. }
  6972. }
  6973. this.emit("addedfiles", files);
  6974. }
  6975. }, {
  6976. key: "paste",
  6977. value: function paste(e) {
  6978. if (__guard__(e != null ? e.clipboardData : undefined, function (x) {
  6979. return x.items;
  6980. }) == null) {
  6981. return;
  6982. }
  6983. this.emit("paste", e);
  6984. var items = e.clipboardData.items;
  6985. if (items.length) {
  6986. return this._addFilesFromItems(items);
  6987. }
  6988. }
  6989. }, {
  6990. key: "handleFiles",
  6991. value: function handleFiles(files) {
  6992. var _iterator5 = dropzone_createForOfIteratorHelper(files, true),
  6993. _step5;
  6994. try {
  6995. for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
  6996. var file = _step5.value;
  6997. this.addFile(file);
  6998. }
  6999. } catch (err) {
  7000. _iterator5.e(err);
  7001. } finally {
  7002. _iterator5.f();
  7003. }
  7004. } // When a folder is dropped (or files are pasted), items must be handled
  7005. // instead of files.
  7006. }, {
  7007. key: "_addFilesFromItems",
  7008. value: function _addFilesFromItems(items) {
  7009. var _this4 = this;
  7010. return function () {
  7011. var result = [];
  7012. var _iterator6 = dropzone_createForOfIteratorHelper(items, true),
  7013. _step6;
  7014. try {
  7015. for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
  7016. var item = _step6.value;
  7017. var entry;
  7018. if (item.webkitGetAsEntry != null && (entry = item.webkitGetAsEntry())) {
  7019. if (entry.isFile) {
  7020. result.push(_this4.addFile(item.getAsFile()));
  7021. } else if (entry.isDirectory) {
  7022. // Append all files from that directory to files
  7023. result.push(_this4._addFilesFromDirectory(entry, entry.name));
  7024. } else {
  7025. result.push(undefined);
  7026. }
  7027. } else if (item.getAsFile != null) {
  7028. if (item.kind == null || item.kind === "file") {
  7029. result.push(_this4.addFile(item.getAsFile()));
  7030. } else {
  7031. result.push(undefined);
  7032. }
  7033. } else {
  7034. result.push(undefined);
  7035. }
  7036. }
  7037. } catch (err) {
  7038. _iterator6.e(err);
  7039. } finally {
  7040. _iterator6.f();
  7041. }
  7042. return result;
  7043. }();
  7044. } // Goes through the directory, and adds each file it finds recursively
  7045. }, {
  7046. key: "_addFilesFromDirectory",
  7047. value: function _addFilesFromDirectory(directory, path) {
  7048. var _this5 = this;
  7049. var dirReader = directory.createReader();
  7050. var errorHandler = function errorHandler(error) {
  7051. return __guardMethod__(console, "log", function (o) {
  7052. return o.log(error);
  7053. });
  7054. };
  7055. var readEntries = function readEntries() {
  7056. return dirReader.readEntries(function (entries) {
  7057. if (entries.length > 0) {
  7058. var _iterator7 = dropzone_createForOfIteratorHelper(entries, true),
  7059. _step7;
  7060. try {
  7061. for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
  7062. var entry = _step7.value;
  7063. if (entry.isFile) {
  7064. entry.file(function (file) {
  7065. if (_this5.options.ignoreHiddenFiles && file.name.substring(0, 1) === ".") {
  7066. return;
  7067. }
  7068. file.fullPath = "".concat(path, "/").concat(file.name);
  7069. return _this5.addFile(file);
  7070. });
  7071. } else if (entry.isDirectory) {
  7072. _this5._addFilesFromDirectory(entry, "".concat(path, "/").concat(entry.name));
  7073. }
  7074. } // Recursively call readEntries() again, since browser only handle
  7075. // the first 100 entries.
  7076. // See: https://developer.mozilla.org/en-US/docs/Web/API/DirectoryReader#readEntries
  7077. } catch (err) {
  7078. _iterator7.e(err);
  7079. } finally {
  7080. _iterator7.f();
  7081. }
  7082. readEntries();
  7083. }
  7084. return null;
  7085. }, errorHandler);
  7086. };
  7087. return readEntries();
  7088. } // If `done()` is called without argument the file is accepted
  7089. // If you call it with an error message, the file is rejected
  7090. // (This allows for asynchronous validation)
  7091. //
  7092. // This function checks the filesize, and if the file.type passes the
  7093. // `acceptedFiles` check.
  7094. }, {
  7095. key: "accept",
  7096. value: function accept(file, done) {
  7097. if (this.options.maxFilesize && file.size > this.options.maxFilesize * 1024 * 1024) {
  7098. done(this.options.dictFileTooBig.replace("{{filesize}}", Math.round(file.size / 1024 / 10.24) / 100).replace("{{maxFilesize}}", this.options.maxFilesize));
  7099. } else if (!Dropzone.isValidFile(file, this.options.acceptedFiles)) {
  7100. done(this.options.dictInvalidFileType);
  7101. } else if (this.options.maxFiles != null && this.getAcceptedFiles().length >= this.options.maxFiles) {
  7102. done(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}", this.options.maxFiles));
  7103. this.emit("maxfilesexceeded", file);
  7104. } else {
  7105. this.options.accept.call(this, file, done);
  7106. }
  7107. }
  7108. }, {
  7109. key: "addFile",
  7110. value: function addFile(file) {
  7111. var _this6 = this;
  7112. file.upload = {
  7113. uuid: Dropzone.uuidv4(),
  7114. progress: 0,
  7115. // Setting the total upload size to file.size for the beginning
  7116. // It's actual different than the size to be transmitted.
  7117. total: file.size,
  7118. bytesSent: 0,
  7119. filename: this._renameFile(file) // Not setting chunking information here, because the acutal data — and
  7120. // thus the chunks — might change if `options.transformFile` is set
  7121. // and does something to the data.
  7122. };
  7123. this.files.push(file);
  7124. file.status = Dropzone.ADDED;
  7125. this.emit("addedfile", file);
  7126. this._enqueueThumbnail(file);
  7127. this.accept(file, function (error) {
  7128. if (error) {
  7129. file.accepted = false;
  7130. _this6._errorProcessing([file], error); // Will set the file.status
  7131. } else {
  7132. file.accepted = true;
  7133. if (_this6.options.autoQueue) {
  7134. _this6.enqueueFile(file);
  7135. } // Will set .accepted = true
  7136. }
  7137. _this6._updateMaxFilesReachedClass();
  7138. });
  7139. } // Wrapper for enqueueFile
  7140. }, {
  7141. key: "enqueueFiles",
  7142. value: function enqueueFiles(files) {
  7143. var _iterator8 = dropzone_createForOfIteratorHelper(files, true),
  7144. _step8;
  7145. try {
  7146. for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
  7147. var file = _step8.value;
  7148. this.enqueueFile(file);
  7149. }
  7150. } catch (err) {
  7151. _iterator8.e(err);
  7152. } finally {
  7153. _iterator8.f();
  7154. }
  7155. return null;
  7156. }
  7157. }, {
  7158. key: "enqueueFile",
  7159. value: function enqueueFile(file) {
  7160. var _this7 = this;
  7161. if (file.status === Dropzone.ADDED && file.accepted === true) {
  7162. file.status = Dropzone.QUEUED;
  7163. if (this.options.autoProcessQueue) {
  7164. return setTimeout(function () {
  7165. return _this7.processQueue();
  7166. }, 0); // Deferring the call
  7167. }
  7168. } else {
  7169. throw new Error("This file can't be queued because it has already been processed or was rejected.");
  7170. }
  7171. }
  7172. }, {
  7173. key: "_enqueueThumbnail",
  7174. value: function _enqueueThumbnail(file) {
  7175. var _this8 = this;
  7176. if (this.options.createImageThumbnails && file.type.match(/image.*/) && file.size <= this.options.maxThumbnailFilesize * 1024 * 1024) {
  7177. this._thumbnailQueue.push(file);
  7178. return setTimeout(function () {
  7179. return _this8._processThumbnailQueue();
  7180. }, 0); // Deferring the call
  7181. }
  7182. }
  7183. }, {
  7184. key: "_processThumbnailQueue",
  7185. value: function _processThumbnailQueue() {
  7186. var _this9 = this;
  7187. if (this._processingThumbnail || this._thumbnailQueue.length === 0) {
  7188. return;
  7189. }
  7190. this._processingThumbnail = true;
  7191. var file = this._thumbnailQueue.shift();
  7192. return this.createThumbnail(file, this.options.thumbnailWidth, this.options.thumbnailHeight, this.options.thumbnailMethod, true, function (dataUrl) {
  7193. _this9.emit("thumbnail", file, dataUrl);
  7194. _this9._processingThumbnail = false;
  7195. return _this9._processThumbnailQueue();
  7196. });
  7197. } // Can be called by the user to remove a file
  7198. }, {
  7199. key: "removeFile",
  7200. value: function removeFile(file) {
  7201. if (file.status === Dropzone.UPLOADING) {
  7202. this.cancelUpload(file);
  7203. }
  7204. this.files = without(this.files, file);
  7205. this.emit("removedfile", file);
  7206. if (this.files.length === 0) {
  7207. return this.emit("reset");
  7208. }
  7209. } // Removes all files that aren't currently processed from the list
  7210. }, {
  7211. key: "removeAllFiles",
  7212. value: function removeAllFiles(cancelIfNecessary) {
  7213. // Create a copy of files since removeFile() changes the @files array.
  7214. if (cancelIfNecessary == null) {
  7215. cancelIfNecessary = false;
  7216. }
  7217. var _iterator9 = dropzone_createForOfIteratorHelper(this.files.slice(), true),
  7218. _step9;
  7219. try {
  7220. for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
  7221. var file = _step9.value;
  7222. if (file.status !== Dropzone.UPLOADING || cancelIfNecessary) {
  7223. this.removeFile(file);
  7224. }
  7225. }
  7226. } catch (err) {
  7227. _iterator9.e(err);
  7228. } finally {
  7229. _iterator9.f();
  7230. }
  7231. return null;
  7232. } // Resizes an image before it gets sent to the server. This function is the default behavior of
  7233. // `options.transformFile` if `resizeWidth` or `resizeHeight` are set. The callback is invoked with
  7234. // the resized blob.
  7235. }, {
  7236. key: "resizeImage",
  7237. value: function resizeImage(file, width, height, resizeMethod, callback) {
  7238. var _this10 = this;
  7239. return this.createThumbnail(file, width, height, resizeMethod, true, function (dataUrl, canvas) {
  7240. if (canvas == null) {
  7241. // The image has not been resized
  7242. return callback(file);
  7243. } else {
  7244. var resizeMimeType = _this10.options.resizeMimeType;
  7245. if (resizeMimeType == null) {
  7246. resizeMimeType = file.type;
  7247. }
  7248. var resizedDataURL = canvas.toDataURL(resizeMimeType, _this10.options.resizeQuality);
  7249. if (resizeMimeType === "image/jpeg" || resizeMimeType === "image/jpg") {
  7250. // Now add the original EXIF information
  7251. resizedDataURL = ExifRestore.restore(file.dataURL, resizedDataURL);
  7252. }
  7253. return callback(Dropzone.dataURItoBlob(resizedDataURL));
  7254. }
  7255. });
  7256. }
  7257. }, {
  7258. key: "createThumbnail",
  7259. value: function createThumbnail(file, width, height, resizeMethod, fixOrientation, callback) {
  7260. var _this11 = this;
  7261. var fileReader = new FileReader();
  7262. fileReader.onload = function () {
  7263. file.dataURL = fileReader.result; // Don't bother creating a thumbnail for SVG images since they're vector
  7264. if (file.type === "image/svg+xml") {
  7265. if (callback != null) {
  7266. callback(fileReader.result);
  7267. }
  7268. return;
  7269. }
  7270. _this11.createThumbnailFromUrl(file, width, height, resizeMethod, fixOrientation, callback);
  7271. };
  7272. fileReader.readAsDataURL(file);
  7273. } // `mockFile` needs to have these attributes:
  7274. //
  7275. // { name: 'name', size: 12345, imageUrl: '' }
  7276. //
  7277. // `callback` will be invoked when the image has been downloaded and displayed.
  7278. // `crossOrigin` will be added to the `img` tag when accessing the file.
  7279. }, {
  7280. key: "displayExistingFile",
  7281. value: function displayExistingFile(mockFile, imageUrl, callback, crossOrigin) {
  7282. var _this12 = this;
  7283. var resizeThumbnail = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
  7284. this.emit("addedfile", mockFile);
  7285. this.emit("complete", mockFile);
  7286. if (!resizeThumbnail) {
  7287. this.emit("thumbnail", mockFile, imageUrl);
  7288. if (callback) callback();
  7289. } else {
  7290. var onDone = function onDone(thumbnail) {
  7291. _this12.emit("thumbnail", mockFile, thumbnail);
  7292. if (callback) callback();
  7293. };
  7294. mockFile.dataURL = imageUrl;
  7295. this.createThumbnailFromUrl(mockFile, this.options.thumbnailWidth, this.options.thumbnailHeight, this.options.thumbnailMethod, this.options.fixOrientation, onDone, crossOrigin);
  7296. }
  7297. }
  7298. }, {
  7299. key: "createThumbnailFromUrl",
  7300. value: function createThumbnailFromUrl(file, width, height, resizeMethod, fixOrientation, callback, crossOrigin) {
  7301. var _this13 = this;
  7302. // Not using `new Image` here because of a bug in latest Chrome versions.
  7303. // See https://github.com/enyo/dropzone/pull/226
  7304. var img = document.createElement("img");
  7305. if (crossOrigin) {
  7306. img.crossOrigin = crossOrigin;
  7307. } // fixOrientation is not needed anymore with browsers handling imageOrientation
  7308. fixOrientation = getComputedStyle(document.body)["imageOrientation"] == "from-image" ? false : fixOrientation;
  7309. img.onload = function () {
  7310. var loadExif = function loadExif(callback) {
  7311. return callback(1);
  7312. };
  7313. if (typeof EXIF !== "undefined" && EXIF !== null && fixOrientation) {
  7314. loadExif = function loadExif(callback) {
  7315. return EXIF.getData(img, function () {
  7316. return callback(EXIF.getTag(this, "Orientation"));
  7317. });
  7318. };
  7319. }
  7320. return loadExif(function (orientation) {
  7321. file.width = img.width;
  7322. file.height = img.height;
  7323. var resizeInfo = _this13.options.resize.call(_this13, file, width, height, resizeMethod);
  7324. var canvas = document.createElement("canvas");
  7325. var ctx = canvas.getContext("2d");
  7326. canvas.width = resizeInfo.trgWidth;
  7327. canvas.height = resizeInfo.trgHeight;
  7328. if (orientation > 4) {
  7329. canvas.width = resizeInfo.trgHeight;
  7330. canvas.height = resizeInfo.trgWidth;
  7331. }
  7332. switch (orientation) {
  7333. case 2:
  7334. // horizontal flip
  7335. ctx.translate(canvas.width, 0);
  7336. ctx.scale(-1, 1);
  7337. break;
  7338. case 3:
  7339. // 180° rotate left
  7340. ctx.translate(canvas.width, canvas.height);
  7341. ctx.rotate(Math.PI);
  7342. break;
  7343. case 4:
  7344. // vertical flip
  7345. ctx.translate(0, canvas.height);
  7346. ctx.scale(1, -1);
  7347. break;
  7348. case 5:
  7349. // vertical flip + 90 rotate right
  7350. ctx.rotate(0.5 * Math.PI);
  7351. ctx.scale(1, -1);
  7352. break;
  7353. case 6:
  7354. // 90° rotate right
  7355. ctx.rotate(0.5 * Math.PI);
  7356. ctx.translate(0, -canvas.width);
  7357. break;
  7358. case 7:
  7359. // horizontal flip + 90 rotate right
  7360. ctx.rotate(0.5 * Math.PI);
  7361. ctx.translate(canvas.height, -canvas.width);
  7362. ctx.scale(-1, 1);
  7363. break;
  7364. case 8:
  7365. // 90° rotate left
  7366. ctx.rotate(-0.5 * Math.PI);
  7367. ctx.translate(-canvas.height, 0);
  7368. break;
  7369. } // This is a bugfix for iOS' scaling bug.
  7370. 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);
  7371. var thumbnail = canvas.toDataURL("image/png");
  7372. if (callback != null) {
  7373. return callback(thumbnail, canvas);
  7374. }
  7375. });
  7376. };
  7377. if (callback != null) {
  7378. img.onerror = callback;
  7379. }
  7380. return img.src = file.dataURL;
  7381. } // Goes through the queue and processes files if there aren't too many already.
  7382. }, {
  7383. key: "processQueue",
  7384. value: function processQueue() {
  7385. var parallelUploads = this.options.parallelUploads;
  7386. var processingLength = this.getUploadingFiles().length;
  7387. var i = processingLength; // There are already at least as many files uploading than should be
  7388. if (processingLength >= parallelUploads) {
  7389. return;
  7390. }
  7391. var queuedFiles = this.getQueuedFiles();
  7392. if (!(queuedFiles.length > 0)) {
  7393. return;
  7394. }
  7395. if (this.options.uploadMultiple) {
  7396. // The files should be uploaded in one request
  7397. return this.processFiles(queuedFiles.slice(0, parallelUploads - processingLength));
  7398. } else {
  7399. while (i < parallelUploads) {
  7400. if (!queuedFiles.length) {
  7401. return;
  7402. } // Nothing left to process
  7403. this.processFile(queuedFiles.shift());
  7404. i++;
  7405. }
  7406. }
  7407. } // Wrapper for `processFiles`
  7408. }, {
  7409. key: "processFile",
  7410. value: function processFile(file) {
  7411. return this.processFiles([file]);
  7412. } // Loads the file, then calls finishedLoading()
  7413. }, {
  7414. key: "processFiles",
  7415. value: function processFiles(files) {
  7416. var _iterator10 = dropzone_createForOfIteratorHelper(files, true),
  7417. _step10;
  7418. try {
  7419. for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
  7420. var file = _step10.value;
  7421. file.processing = true; // Backwards compatibility
  7422. file.status = Dropzone.UPLOADING;
  7423. this.emit("processing", file);
  7424. }
  7425. } catch (err) {
  7426. _iterator10.e(err);
  7427. } finally {
  7428. _iterator10.f();
  7429. }
  7430. if (this.options.uploadMultiple) {
  7431. this.emit("processingmultiple", files);
  7432. }
  7433. return this.uploadFiles(files);
  7434. }
  7435. }, {
  7436. key: "_getFilesWithXhr",
  7437. value: function _getFilesWithXhr(xhr) {
  7438. var files;
  7439. return files = this.files.filter(function (file) {
  7440. return file.xhr === xhr;
  7441. }).map(function (file) {
  7442. return file;
  7443. });
  7444. } // Cancels the file upload and sets the status to CANCELED
  7445. // **if** the file is actually being uploaded.
  7446. // If it's still in the queue, the file is being removed from it and the status
  7447. // set to CANCELED.
  7448. }, {
  7449. key: "cancelUpload",
  7450. value: function cancelUpload(file) {
  7451. if (file.status === Dropzone.UPLOADING) {
  7452. var groupedFiles = this._getFilesWithXhr(file.xhr);
  7453. var _iterator11 = dropzone_createForOfIteratorHelper(groupedFiles, true),
  7454. _step11;
  7455. try {
  7456. for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
  7457. var groupedFile = _step11.value;
  7458. groupedFile.status = Dropzone.CANCELED;
  7459. }
  7460. } catch (err) {
  7461. _iterator11.e(err);
  7462. } finally {
  7463. _iterator11.f();
  7464. }
  7465. if (typeof file.xhr !== "undefined") {
  7466. file.xhr.abort();
  7467. }
  7468. var _iterator12 = dropzone_createForOfIteratorHelper(groupedFiles, true),
  7469. _step12;
  7470. try {
  7471. for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
  7472. var _groupedFile = _step12.value;
  7473. this.emit("canceled", _groupedFile);
  7474. }
  7475. } catch (err) {
  7476. _iterator12.e(err);
  7477. } finally {
  7478. _iterator12.f();
  7479. }
  7480. if (this.options.uploadMultiple) {
  7481. this.emit("canceledmultiple", groupedFiles);
  7482. }
  7483. } else if (file.status === Dropzone.ADDED || file.status === Dropzone.QUEUED) {
  7484. file.status = Dropzone.CANCELED;
  7485. this.emit("canceled", file);
  7486. if (this.options.uploadMultiple) {
  7487. this.emit("canceledmultiple", [file]);
  7488. }
  7489. }
  7490. if (this.options.autoProcessQueue) {
  7491. return this.processQueue();
  7492. }
  7493. }
  7494. }, {
  7495. key: "resolveOption",
  7496. value: function resolveOption(option) {
  7497. if (typeof option === "function") {
  7498. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  7499. args[_key - 1] = arguments[_key];
  7500. }
  7501. return option.apply(this, args);
  7502. }
  7503. return option;
  7504. }
  7505. }, {
  7506. key: "uploadFile",
  7507. value: function uploadFile(file) {
  7508. return this.uploadFiles([file]);
  7509. }
  7510. }, {
  7511. key: "uploadFiles",
  7512. value: function uploadFiles(files) {
  7513. var _this14 = this;
  7514. this._transformFiles(files, function (transformedFiles) {
  7515. if (_this14.options.chunking) {
  7516. // Chunking is not allowed to be used with `uploadMultiple` so we know
  7517. // that there is only __one__file.
  7518. var transformedFile = transformedFiles[0];
  7519. files[0].upload.chunked = _this14.options.chunking && (_this14.options.forceChunking || transformedFile.size > _this14.options.chunkSize);
  7520. files[0].upload.totalChunkCount = Math.ceil(transformedFile.size / _this14.options.chunkSize);
  7521. }
  7522. if (files[0].upload.chunked) {
  7523. // This file should be sent in chunks!
  7524. // If the chunking option is set, we **know** that there can only be **one** file, since
  7525. // uploadMultiple is not allowed with this option.
  7526. var file = files[0];
  7527. var _transformedFile = transformedFiles[0];
  7528. var startedChunkCount = 0;
  7529. file.upload.chunks = [];
  7530. var handleNextChunk = function handleNextChunk() {
  7531. var chunkIndex = 0; // Find the next item in file.upload.chunks that is not defined yet.
  7532. while (file.upload.chunks[chunkIndex] !== undefined) {
  7533. chunkIndex++;
  7534. } // This means, that all chunks have already been started.
  7535. if (chunkIndex >= file.upload.totalChunkCount) return;
  7536. startedChunkCount++;
  7537. var start = chunkIndex * _this14.options.chunkSize;
  7538. var end = Math.min(start + _this14.options.chunkSize, _transformedFile.size);
  7539. var dataBlock = {
  7540. name: _this14._getParamName(0),
  7541. data: _transformedFile.webkitSlice ? _transformedFile.webkitSlice(start, end) : _transformedFile.slice(start, end),
  7542. filename: file.upload.filename,
  7543. chunkIndex: chunkIndex
  7544. };
  7545. file.upload.chunks[chunkIndex] = {
  7546. file: file,
  7547. index: chunkIndex,
  7548. dataBlock: dataBlock,
  7549. // In case we want to retry.
  7550. status: Dropzone.UPLOADING,
  7551. progress: 0,
  7552. retries: 0 // The number of times this block has been retried.
  7553. };
  7554. _this14._uploadData(files, [dataBlock]);
  7555. };
  7556. file.upload.finishedChunkUpload = function (chunk, response) {
  7557. var allFinished = true;
  7558. chunk.status = Dropzone.SUCCESS; // Clear the data from the chunk
  7559. chunk.dataBlock = null; // Leaving this reference to xhr intact here will cause memory leaks in some browsers
  7560. chunk.xhr = null;
  7561. for (var i = 0; i < file.upload.totalChunkCount; i++) {
  7562. if (file.upload.chunks[i] === undefined) {
  7563. return handleNextChunk();
  7564. }
  7565. if (file.upload.chunks[i].status !== Dropzone.SUCCESS) {
  7566. allFinished = false;
  7567. }
  7568. }
  7569. if (allFinished) {
  7570. _this14.options.chunksUploaded(file, function () {
  7571. _this14._finished(files, response, null);
  7572. });
  7573. }
  7574. };
  7575. if (_this14.options.parallelChunkUploads) {
  7576. for (var i = 0; i < file.upload.totalChunkCount; i++) {
  7577. handleNextChunk();
  7578. }
  7579. } else {
  7580. handleNextChunk();
  7581. }
  7582. } else {
  7583. var dataBlocks = [];
  7584. for (var _i2 = 0; _i2 < files.length; _i2++) {
  7585. dataBlocks[_i2] = {
  7586. name: _this14._getParamName(_i2),
  7587. data: transformedFiles[_i2],
  7588. filename: files[_i2].upload.filename
  7589. };
  7590. }
  7591. _this14._uploadData(files, dataBlocks);
  7592. }
  7593. });
  7594. } /// Returns the right chunk for given file and xhr
  7595. }, {
  7596. key: "_getChunk",
  7597. value: function _getChunk(file, xhr) {
  7598. for (var i = 0; i < file.upload.totalChunkCount; i++) {
  7599. if (file.upload.chunks[i] !== undefined && file.upload.chunks[i].xhr === xhr) {
  7600. return file.upload.chunks[i];
  7601. }
  7602. }
  7603. } // This function actually uploads the file(s) to the server.
  7604. // If dataBlocks contains the actual data to upload (meaning, that this could either be transformed
  7605. // files, or individual chunks for chunked upload).
  7606. }, {
  7607. key: "_uploadData",
  7608. value: function _uploadData(files, dataBlocks) {
  7609. var _this15 = this;
  7610. var xhr = new XMLHttpRequest(); // Put the xhr object in the file objects to be able to reference it later.
  7611. var _iterator13 = dropzone_createForOfIteratorHelper(files, true),
  7612. _step13;
  7613. try {
  7614. for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
  7615. var file = _step13.value;
  7616. file.xhr = xhr;
  7617. }
  7618. } catch (err) {
  7619. _iterator13.e(err);
  7620. } finally {
  7621. _iterator13.f();
  7622. }
  7623. if (files[0].upload.chunked) {
  7624. // Put the xhr object in the right chunk object, so it can be associated later, and found with _getChunk
  7625. files[0].upload.chunks[dataBlocks[0].chunkIndex].xhr = xhr;
  7626. }
  7627. var method = this.resolveOption(this.options.method, files);
  7628. var url = this.resolveOption(this.options.url, files);
  7629. xhr.open(method, url, true); // Setting the timeout after open because of IE11 issue: https://gitlab.com/meno/dropzone/issues/8
  7630. var timeout = this.resolveOption(this.options.timeout, files);
  7631. if (timeout) xhr.timeout = this.resolveOption(this.options.timeout, files); // Has to be after `.open()`. See https://github.com/enyo/dropzone/issues/179
  7632. xhr.withCredentials = !!this.options.withCredentials;
  7633. xhr.onload = function (e) {
  7634. _this15._finishedUploading(files, xhr, e);
  7635. };
  7636. xhr.ontimeout = function () {
  7637. _this15._handleUploadError(files, xhr, "Request timedout after ".concat(_this15.options.timeout / 1000, " seconds"));
  7638. };
  7639. xhr.onerror = function () {
  7640. _this15._handleUploadError(files, xhr);
  7641. }; // Some browsers do not have the .upload property
  7642. var progressObj = xhr.upload != null ? xhr.upload : xhr;
  7643. progressObj.onprogress = function (e) {
  7644. return _this15._updateFilesUploadProgress(files, xhr, e);
  7645. };
  7646. var headers = {
  7647. Accept: "application/json",
  7648. "Cache-Control": "no-cache",
  7649. "X-Requested-With": "XMLHttpRequest"
  7650. };
  7651. if (this.options.headers) {
  7652. Dropzone.extend(headers, this.options.headers);
  7653. }
  7654. for (var headerName in headers) {
  7655. var headerValue = headers[headerName];
  7656. if (headerValue) {
  7657. xhr.setRequestHeader(headerName, headerValue);
  7658. }
  7659. }
  7660. var formData = new FormData(); // Adding all @options parameters
  7661. if (this.options.params) {
  7662. var additionalParams = this.options.params;
  7663. if (typeof additionalParams === "function") {
  7664. additionalParams = additionalParams.call(this, files, xhr, files[0].upload.chunked ? this._getChunk(files[0], xhr) : null);
  7665. }
  7666. for (var key in additionalParams) {
  7667. var value = additionalParams[key];
  7668. if (Array.isArray(value)) {
  7669. // The additional parameter contains an array,
  7670. // so lets iterate over it to attach each value
  7671. // individually.
  7672. for (var i = 0; i < value.length; i++) {
  7673. formData.append(key, value[i]);
  7674. }
  7675. } else {
  7676. formData.append(key, value);
  7677. }
  7678. }
  7679. } // Let the user add additional data if necessary
  7680. var _iterator14 = dropzone_createForOfIteratorHelper(files, true),
  7681. _step14;
  7682. try {
  7683. for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
  7684. var _file = _step14.value;
  7685. this.emit("sending", _file, xhr, formData);
  7686. }
  7687. } catch (err) {
  7688. _iterator14.e(err);
  7689. } finally {
  7690. _iterator14.f();
  7691. }
  7692. if (this.options.uploadMultiple) {
  7693. this.emit("sendingmultiple", files, xhr, formData);
  7694. }
  7695. this._addFormElementData(formData); // Finally add the files
  7696. // Has to be last because some servers (eg: S3) expect the file to be the last parameter
  7697. for (var _i3 = 0; _i3 < dataBlocks.length; _i3++) {
  7698. var dataBlock = dataBlocks[_i3];
  7699. formData.append(dataBlock.name, dataBlock.data, dataBlock.filename);
  7700. }
  7701. this.submitRequest(xhr, formData, files);
  7702. } // Transforms all files with this.options.transformFile and invokes done with the transformed files when done.
  7703. }, {
  7704. key: "_transformFiles",
  7705. value: function _transformFiles(files, done) {
  7706. var _this16 = this;
  7707. var transformedFiles = []; // Clumsy way of handling asynchronous calls, until I get to add a proper Future library.
  7708. var doneCounter = 0;
  7709. var _loop = function _loop(i) {
  7710. _this16.options.transformFile.call(_this16, files[i], function (transformedFile) {
  7711. transformedFiles[i] = transformedFile;
  7712. if (++doneCounter === files.length) {
  7713. done(transformedFiles);
  7714. }
  7715. });
  7716. };
  7717. for (var i = 0; i < files.length; i++) {
  7718. _loop(i);
  7719. }
  7720. } // Takes care of adding other input elements of the form to the AJAX request
  7721. }, {
  7722. key: "_addFormElementData",
  7723. value: function _addFormElementData(formData) {
  7724. // Take care of other input elements
  7725. if (this.element.tagName === "FORM") {
  7726. var _iterator15 = dropzone_createForOfIteratorHelper(this.element.querySelectorAll("input, textarea, select, button"), true),
  7727. _step15;
  7728. try {
  7729. for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
  7730. var input = _step15.value;
  7731. var inputName = input.getAttribute("name");
  7732. var inputType = input.getAttribute("type");
  7733. if (inputType) inputType = inputType.toLowerCase(); // If the input doesn't have a name, we can't use it.
  7734. if (typeof inputName === "undefined" || inputName === null) continue;
  7735. if (input.tagName === "SELECT" && input.hasAttribute("multiple")) {
  7736. // Possibly multiple values
  7737. var _iterator16 = dropzone_createForOfIteratorHelper(input.options, true),
  7738. _step16;
  7739. try {
  7740. for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {
  7741. var option = _step16.value;
  7742. if (option.selected) {
  7743. formData.append(inputName, option.value);
  7744. }
  7745. }
  7746. } catch (err) {
  7747. _iterator16.e(err);
  7748. } finally {
  7749. _iterator16.f();
  7750. }
  7751. } else if (!inputType || inputType !== "checkbox" && inputType !== "radio" || input.checked) {
  7752. formData.append(inputName, input.value);
  7753. }
  7754. }
  7755. } catch (err) {
  7756. _iterator15.e(err);
  7757. } finally {
  7758. _iterator15.f();
  7759. }
  7760. }
  7761. } // Invoked when there is new progress information about given files.
  7762. // If e is not provided, it is assumed that the upload is finished.
  7763. }, {
  7764. key: "_updateFilesUploadProgress",
  7765. value: function _updateFilesUploadProgress(files, xhr, e) {
  7766. if (!files[0].upload.chunked) {
  7767. // Handle file uploads without chunking
  7768. var _iterator17 = dropzone_createForOfIteratorHelper(files, true),
  7769. _step17;
  7770. try {
  7771. for (_iterator17.s(); !(_step17 = _iterator17.n()).done;) {
  7772. var file = _step17.value;
  7773. if (file.upload.total && file.upload.bytesSent && file.upload.bytesSent == file.upload.total) {
  7774. // If both, the `total` and `bytesSent` have already been set, and
  7775. // they are equal (meaning progress is at 100%), we can skip this
  7776. // file, since an upload progress shouldn't go down.
  7777. continue;
  7778. }
  7779. if (e) {
  7780. file.upload.progress = 100 * e.loaded / e.total;
  7781. file.upload.total = e.total;
  7782. file.upload.bytesSent = e.loaded;
  7783. } else {
  7784. // No event, so we're at 100%
  7785. file.upload.progress = 100;
  7786. file.upload.bytesSent = file.upload.total;
  7787. }
  7788. this.emit("uploadprogress", file, file.upload.progress, file.upload.bytesSent);
  7789. }
  7790. } catch (err) {
  7791. _iterator17.e(err);
  7792. } finally {
  7793. _iterator17.f();
  7794. }
  7795. } else {
  7796. // Handle chunked file uploads
  7797. // Chunked upload is not compatible with uploading multiple files in one
  7798. // request, so we know there's only one file.
  7799. var _file2 = files[0]; // Since this is a chunked upload, we need to update the appropriate chunk
  7800. // progress.
  7801. var chunk = this._getChunk(_file2, xhr);
  7802. if (e) {
  7803. chunk.progress = 100 * e.loaded / e.total;
  7804. chunk.total = e.total;
  7805. chunk.bytesSent = e.loaded;
  7806. } else {
  7807. // No event, so we're at 100%
  7808. chunk.progress = 100;
  7809. chunk.bytesSent = chunk.total;
  7810. } // Now tally the *file* upload progress from its individual chunks
  7811. _file2.upload.progress = 0;
  7812. _file2.upload.total = 0;
  7813. _file2.upload.bytesSent = 0;
  7814. for (var i = 0; i < _file2.upload.totalChunkCount; i++) {
  7815. if (_file2.upload.chunks[i] && typeof _file2.upload.chunks[i].progress !== "undefined") {
  7816. _file2.upload.progress += _file2.upload.chunks[i].progress;
  7817. _file2.upload.total += _file2.upload.chunks[i].total;
  7818. _file2.upload.bytesSent += _file2.upload.chunks[i].bytesSent;
  7819. }
  7820. } // Since the process is a percentage, we need to divide by the amount of
  7821. // chunks we've used.
  7822. _file2.upload.progress = _file2.upload.progress / _file2.upload.totalChunkCount;
  7823. this.emit("uploadprogress", _file2, _file2.upload.progress, _file2.upload.bytesSent);
  7824. }
  7825. }
  7826. }, {
  7827. key: "_finishedUploading",
  7828. value: function _finishedUploading(files, xhr, e) {
  7829. var response;
  7830. if (files[0].status === Dropzone.CANCELED) {
  7831. return;
  7832. }
  7833. if (xhr.readyState !== 4) {
  7834. return;
  7835. }
  7836. if (xhr.responseType !== "arraybuffer" && xhr.responseType !== "blob") {
  7837. response = xhr.responseText;
  7838. if (xhr.getResponseHeader("content-type") && ~xhr.getResponseHeader("content-type").indexOf("application/json")) {
  7839. try {
  7840. response = JSON.parse(response);
  7841. } catch (error) {
  7842. e = error;
  7843. response = "Invalid JSON response from server.";
  7844. }
  7845. }
  7846. }
  7847. this._updateFilesUploadProgress(files, xhr);
  7848. if (!(200 <= xhr.status && xhr.status < 300)) {
  7849. this._handleUploadError(files, xhr, response);
  7850. } else {
  7851. if (files[0].upload.chunked) {
  7852. files[0].upload.finishedChunkUpload(this._getChunk(files[0], xhr), response);
  7853. } else {
  7854. this._finished(files, response, e);
  7855. }
  7856. }
  7857. }
  7858. }, {
  7859. key: "_handleUploadError",
  7860. value: function _handleUploadError(files, xhr, response) {
  7861. if (files[0].status === Dropzone.CANCELED) {
  7862. return;
  7863. }
  7864. if (files[0].upload.chunked && this.options.retryChunks) {
  7865. var chunk = this._getChunk(files[0], xhr);
  7866. if (chunk.retries++ < this.options.retryChunksLimit) {
  7867. this._uploadData(files, [chunk.dataBlock]);
  7868. return;
  7869. } else {
  7870. console.warn("Retried this chunk too often. Giving up.");
  7871. }
  7872. }
  7873. this._errorProcessing(files, response || this.options.dictResponseError.replace("{{statusCode}}", xhr.status), xhr);
  7874. }
  7875. }, {
  7876. key: "submitRequest",
  7877. value: function submitRequest(xhr, formData, files) {
  7878. if (xhr.readyState != 1) {
  7879. console.warn("Cannot send this request because the XMLHttpRequest.readyState is not OPENED.");
  7880. return;
  7881. }
  7882. xhr.send(formData);
  7883. } // Called internally when processing is finished.
  7884. // Individual callbacks have to be called in the appropriate sections.
  7885. }, {
  7886. key: "_finished",
  7887. value: function _finished(files, responseText, e) {
  7888. var _iterator18 = dropzone_createForOfIteratorHelper(files, true),
  7889. _step18;
  7890. try {
  7891. for (_iterator18.s(); !(_step18 = _iterator18.n()).done;) {
  7892. var file = _step18.value;
  7893. file.status = Dropzone.SUCCESS;
  7894. this.emit("success", file, responseText, e);
  7895. this.emit("complete", file);
  7896. }
  7897. } catch (err) {
  7898. _iterator18.e(err);
  7899. } finally {
  7900. _iterator18.f();
  7901. }
  7902. if (this.options.uploadMultiple) {
  7903. this.emit("successmultiple", files, responseText, e);
  7904. this.emit("completemultiple", files);
  7905. }
  7906. if (this.options.autoProcessQueue) {
  7907. return this.processQueue();
  7908. }
  7909. } // Called internally when processing is finished.
  7910. // Individual callbacks have to be called in the appropriate sections.
  7911. }, {
  7912. key: "_errorProcessing",
  7913. value: function _errorProcessing(files, message, xhr) {
  7914. var _iterator19 = dropzone_createForOfIteratorHelper(files, true),
  7915. _step19;
  7916. try {
  7917. for (_iterator19.s(); !(_step19 = _iterator19.n()).done;) {
  7918. var file = _step19.value;
  7919. file.status = Dropzone.ERROR;
  7920. this.emit("error", file, message, xhr);
  7921. this.emit("complete", file);
  7922. }
  7923. } catch (err) {
  7924. _iterator19.e(err);
  7925. } finally {
  7926. _iterator19.f();
  7927. }
  7928. if (this.options.uploadMultiple) {
  7929. this.emit("errormultiple", files, message, xhr);
  7930. this.emit("completemultiple", files);
  7931. }
  7932. if (this.options.autoProcessQueue) {
  7933. return this.processQueue();
  7934. }
  7935. }
  7936. }], [{
  7937. key: "initClass",
  7938. value: function initClass() {
  7939. // Exposing the emitter class, mainly for tests
  7940. this.prototype.Emitter = Emitter;
  7941. /*
  7942. This is a list of all available events you can register on a dropzone object.
  7943. You can register an event handler like this:
  7944. dropzone.on("dragEnter", function() { });
  7945. */
  7946. 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"];
  7947. this.prototype._thumbnailQueue = [];
  7948. this.prototype._processingThumbnail = false;
  7949. } // global utility
  7950. }, {
  7951. key: "extend",
  7952. value: function extend(target) {
  7953. for (var _len2 = arguments.length, objects = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  7954. objects[_key2 - 1] = arguments[_key2];
  7955. }
  7956. for (var _i4 = 0, _objects = objects; _i4 < _objects.length; _i4++) {
  7957. var object = _objects[_i4];
  7958. for (var key in object) {
  7959. var val = object[key];
  7960. target[key] = val;
  7961. }
  7962. }
  7963. return target;
  7964. }
  7965. }, {
  7966. key: "uuidv4",
  7967. value: function uuidv4() {
  7968. return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {
  7969. var r = Math.random() * 16 | 0,
  7970. v = c === "x" ? r : r & 0x3 | 0x8;
  7971. return v.toString(16);
  7972. });
  7973. }
  7974. }]);
  7975. return Dropzone;
  7976. }(Emitter);
  7977. Dropzone.initClass();
  7978. Dropzone.version = "5.9.3"; // This is a map of options for your different dropzones. Add configurations
  7979. // to this object for your different dropzone elemens.
  7980. //
  7981. // Example:
  7982. //
  7983. // Dropzone.options.myDropzoneElementId = { maxFilesize: 1 };
  7984. //
  7985. // To disable autoDiscover for a specific element, you can set `false` as an option:
  7986. //
  7987. // Dropzone.options.myDisabledElementId = false;
  7988. //
  7989. // And in html:
  7990. //
  7991. // <form action="/upload" id="my-dropzone-element-id" class="dropzone"></form>
  7992. Dropzone.options = {}; // Returns the options for an element or undefined if none available.
  7993. Dropzone.optionsForElement = function (element) {
  7994. // Get the `Dropzone.options.elementId` for this element if it exists
  7995. if (element.getAttribute("id")) {
  7996. return Dropzone.options[camelize(element.getAttribute("id"))];
  7997. } else {
  7998. return undefined;
  7999. }
  8000. }; // Holds a list of all dropzone instances
  8001. Dropzone.instances = []; // Returns the dropzone for given element if any
  8002. Dropzone.forElement = function (element) {
  8003. if (typeof element === "string") {
  8004. element = document.querySelector(element);
  8005. }
  8006. if ((element != null ? element.dropzone : undefined) == null) {
  8007. 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.");
  8008. }
  8009. return element.dropzone;
  8010. }; // Set to false if you don't want Dropzone to automatically find and attach to .dropzone elements.
  8011. Dropzone.autoDiscover = true; // Looks for all .dropzone elements and creates a dropzone for them
  8012. Dropzone.discover = function () {
  8013. var dropzones;
  8014. if (document.querySelectorAll) {
  8015. dropzones = document.querySelectorAll(".dropzone");
  8016. } else {
  8017. dropzones = []; // IE :(
  8018. var checkElements = function checkElements(elements) {
  8019. return function () {
  8020. var result = [];
  8021. var _iterator20 = dropzone_createForOfIteratorHelper(elements, true),
  8022. _step20;
  8023. try {
  8024. for (_iterator20.s(); !(_step20 = _iterator20.n()).done;) {
  8025. var el = _step20.value;
  8026. if (/(^| )dropzone($| )/.test(el.className)) {
  8027. result.push(dropzones.push(el));
  8028. } else {
  8029. result.push(undefined);
  8030. }
  8031. }
  8032. } catch (err) {
  8033. _iterator20.e(err);
  8034. } finally {
  8035. _iterator20.f();
  8036. }
  8037. return result;
  8038. }();
  8039. };
  8040. checkElements(document.getElementsByTagName("div"));
  8041. checkElements(document.getElementsByTagName("form"));
  8042. }
  8043. return function () {
  8044. var result = [];
  8045. var _iterator21 = dropzone_createForOfIteratorHelper(dropzones, true),
  8046. _step21;
  8047. try {
  8048. for (_iterator21.s(); !(_step21 = _iterator21.n()).done;) {
  8049. var dropzone = _step21.value;
  8050. // Create a dropzone unless auto discover has been disabled for specific element
  8051. if (Dropzone.optionsForElement(dropzone) !== false) {
  8052. result.push(new Dropzone(dropzone));
  8053. } else {
  8054. result.push(undefined);
  8055. }
  8056. }
  8057. } catch (err) {
  8058. _iterator21.e(err);
  8059. } finally {
  8060. _iterator21.f();
  8061. }
  8062. return result;
  8063. }();
  8064. }; // Some browsers support drag and drog functionality, but not correctly.
  8065. //
  8066. // So I created a blocklist of userAgents. Yes, yes. Browser sniffing, I know.
  8067. // But what to do when browsers *theoretically* support an API, but crash
  8068. // when using it.
  8069. //
  8070. // This is a list of regular expressions tested against navigator.userAgent
  8071. //
  8072. // ** It should only be used on browser that *do* support the API, but
  8073. // incorrectly **
  8074. Dropzone.blockedBrowsers = [// The mac os and windows phone version of opera 12 seems to have a problem with the File drag'n'drop API.
  8075. /opera.*(Macintosh|Windows Phone).*version\/12/i]; // Checks if the browser is supported
  8076. Dropzone.isBrowserSupported = function () {
  8077. var capableBrowser = true;
  8078. if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData && document.querySelector) {
  8079. if (!("classList" in document.createElement("a"))) {
  8080. capableBrowser = false;
  8081. } else {
  8082. if (Dropzone.blacklistedBrowsers !== undefined) {
  8083. // Since this has been renamed, this makes sure we don't break older
  8084. // configuration.
  8085. Dropzone.blockedBrowsers = Dropzone.blacklistedBrowsers;
  8086. } // The browser supports the API, but may be blocked.
  8087. var _iterator22 = dropzone_createForOfIteratorHelper(Dropzone.blockedBrowsers, true),
  8088. _step22;
  8089. try {
  8090. for (_iterator22.s(); !(_step22 = _iterator22.n()).done;) {
  8091. var regex = _step22.value;
  8092. if (regex.test(navigator.userAgent)) {
  8093. capableBrowser = false;
  8094. continue;
  8095. }
  8096. }
  8097. } catch (err) {
  8098. _iterator22.e(err);
  8099. } finally {
  8100. _iterator22.f();
  8101. }
  8102. }
  8103. } else {
  8104. capableBrowser = false;
  8105. }
  8106. return capableBrowser;
  8107. };
  8108. Dropzone.dataURItoBlob = function (dataURI) {
  8109. // convert base64 to raw binary data held in a string
  8110. // doesn't handle URLEncoded DataURIs - see SO answer #6850276 for code that does this
  8111. var byteString = atob(dataURI.split(",")[1]); // separate out the mime component
  8112. var mimeString = dataURI.split(",")[0].split(":")[1].split(";")[0]; // write the bytes of the string to an ArrayBuffer
  8113. var ab = new ArrayBuffer(byteString.length);
  8114. var ia = new Uint8Array(ab);
  8115. for (var i = 0, end = byteString.length, asc = 0 <= end; asc ? i <= end : i >= end; asc ? i++ : i--) {
  8116. ia[i] = byteString.charCodeAt(i);
  8117. } // write the ArrayBuffer to a blob
  8118. return new Blob([ab], {
  8119. type: mimeString
  8120. });
  8121. }; // Returns an array without the rejected item
  8122. var without = function without(list, rejectedItem) {
  8123. return list.filter(function (item) {
  8124. return item !== rejectedItem;
  8125. }).map(function (item) {
  8126. return item;
  8127. });
  8128. }; // abc-def_ghi -> abcDefGhi
  8129. var camelize = function camelize(str) {
  8130. return str.replace(/[\-_](\w)/g, function (match) {
  8131. return match.charAt(1).toUpperCase();
  8132. });
  8133. }; // Creates an element from string
  8134. Dropzone.createElement = function (string) {
  8135. var div = document.createElement("div");
  8136. div.innerHTML = string;
  8137. return div.childNodes[0];
  8138. }; // Tests if given element is inside (or simply is) the container
  8139. Dropzone.elementInside = function (element, container) {
  8140. if (element === container) {
  8141. return true;
  8142. } // Coffeescript doesn't support do/while loops
  8143. while (element = element.parentNode) {
  8144. if (element === container) {
  8145. return true;
  8146. }
  8147. }
  8148. return false;
  8149. };
  8150. Dropzone.getElement = function (el, name) {
  8151. var element;
  8152. if (typeof el === "string") {
  8153. element = document.querySelector(el);
  8154. } else if (el.nodeType != null) {
  8155. element = el;
  8156. }
  8157. if (element == null) {
  8158. throw new Error("Invalid `".concat(name, "` option provided. Please provide a CSS selector or a plain HTML element."));
  8159. }
  8160. return element;
  8161. };
  8162. Dropzone.getElements = function (els, name) {
  8163. var el, elements;
  8164. if (els instanceof Array) {
  8165. elements = [];
  8166. try {
  8167. var _iterator23 = dropzone_createForOfIteratorHelper(els, true),
  8168. _step23;
  8169. try {
  8170. for (_iterator23.s(); !(_step23 = _iterator23.n()).done;) {
  8171. el = _step23.value;
  8172. elements.push(this.getElement(el, name));
  8173. }
  8174. } catch (err) {
  8175. _iterator23.e(err);
  8176. } finally {
  8177. _iterator23.f();
  8178. }
  8179. } catch (e) {
  8180. elements = null;
  8181. }
  8182. } else if (typeof els === "string") {
  8183. elements = [];
  8184. var _iterator24 = dropzone_createForOfIteratorHelper(document.querySelectorAll(els), true),
  8185. _step24;
  8186. try {
  8187. for (_iterator24.s(); !(_step24 = _iterator24.n()).done;) {
  8188. el = _step24.value;
  8189. elements.push(el);
  8190. }
  8191. } catch (err) {
  8192. _iterator24.e(err);
  8193. } finally {
  8194. _iterator24.f();
  8195. }
  8196. } else if (els.nodeType != null) {
  8197. elements = [els];
  8198. }
  8199. if (elements == null || !elements.length) {
  8200. throw new Error("Invalid `".concat(name, "` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));
  8201. }
  8202. return elements;
  8203. }; // Asks the user the question and calls accepted or rejected accordingly
  8204. //
  8205. // The default implementation just uses `window.confirm` and then calls the
  8206. // appropriate callback.
  8207. Dropzone.confirm = function (question, accepted, rejected) {
  8208. if (window.confirm(question)) {
  8209. return accepted();
  8210. } else if (rejected != null) {
  8211. return rejected();
  8212. }
  8213. }; // Validates the mime type like this:
  8214. //
  8215. // https://developer.mozilla.org/en-US/docs/HTML/Element/input#attr-accept
  8216. Dropzone.isValidFile = function (file, acceptedFiles) {
  8217. if (!acceptedFiles) {
  8218. return true;
  8219. } // If there are no accepted mime types, it's OK
  8220. acceptedFiles = acceptedFiles.split(",");
  8221. var mimeType = file.type;
  8222. var baseMimeType = mimeType.replace(/\/.*$/, "");
  8223. var _iterator25 = dropzone_createForOfIteratorHelper(acceptedFiles, true),
  8224. _step25;
  8225. try {
  8226. for (_iterator25.s(); !(_step25 = _iterator25.n()).done;) {
  8227. var validType = _step25.value;
  8228. validType = validType.trim();
  8229. if (validType.charAt(0) === ".") {
  8230. if (file.name.toLowerCase().indexOf(validType.toLowerCase(), file.name.length - validType.length) !== -1) {
  8231. return true;
  8232. }
  8233. } else if (/\/\*$/.test(validType)) {
  8234. // This is something like a image/* mime type
  8235. if (baseMimeType === validType.replace(/\/.*$/, "")) {
  8236. return true;
  8237. }
  8238. } else {
  8239. if (mimeType === validType) {
  8240. return true;
  8241. }
  8242. }
  8243. }
  8244. } catch (err) {
  8245. _iterator25.e(err);
  8246. } finally {
  8247. _iterator25.f();
  8248. }
  8249. return false;
  8250. }; // Augment jQuery
  8251. if (typeof jQuery !== "undefined" && jQuery !== null) {
  8252. jQuery.fn.dropzone = function (options) {
  8253. return this.each(function () {
  8254. return new Dropzone(this, options);
  8255. });
  8256. };
  8257. } // Dropzone file status codes
  8258. Dropzone.ADDED = "added";
  8259. Dropzone.QUEUED = "queued"; // For backwards compatibility. Now, if a file is accepted, it's either queued
  8260. // or uploading.
  8261. Dropzone.ACCEPTED = Dropzone.QUEUED;
  8262. Dropzone.UPLOADING = "uploading";
  8263. Dropzone.PROCESSING = Dropzone.UPLOADING; // alias
  8264. Dropzone.CANCELED = "canceled";
  8265. Dropzone.ERROR = "error";
  8266. Dropzone.SUCCESS = "success";
  8267. /*
  8268. Bugfix for iOS 6 and 7
  8269. Source: http://stackoverflow.com/questions/11929099/html5-canvas-drawimage-ratio-bug-ios
  8270. based on the work of https://github.com/stomita/ios-imagefile-megapixel
  8271. */
  8272. // Detecting vertical squash in loaded image.
  8273. // Fixes a bug which squash image vertically while drawing into canvas for some images.
  8274. // This is a bug in iOS6 devices. This function from https://github.com/stomita/ios-imagefile-megapixel
  8275. var detectVerticalSquash = function detectVerticalSquash(img) {
  8276. var iw = img.naturalWidth;
  8277. var ih = img.naturalHeight;
  8278. var canvas = document.createElement("canvas");
  8279. canvas.width = 1;
  8280. canvas.height = ih;
  8281. var ctx = canvas.getContext("2d");
  8282. ctx.drawImage(img, 0, 0);
  8283. var _ctx$getImageData = ctx.getImageData(1, 0, 1, ih),
  8284. data = _ctx$getImageData.data; // search image edge pixel position in case it is squashed vertically.
  8285. var sy = 0;
  8286. var ey = ih;
  8287. var py = ih;
  8288. while (py > sy) {
  8289. var alpha = data[(py - 1) * 4 + 3];
  8290. if (alpha === 0) {
  8291. ey = py;
  8292. } else {
  8293. sy = py;
  8294. }
  8295. py = ey + sy >> 1;
  8296. }
  8297. var ratio = py / ih;
  8298. if (ratio === 0) {
  8299. return 1;
  8300. } else {
  8301. return ratio;
  8302. }
  8303. }; // A replacement for context.drawImage
  8304. // (args are for source and destination).
  8305. var drawImageIOSFix = function drawImageIOSFix(ctx, img, sx, sy, sw, sh, dx, dy, dw, dh) {
  8306. var vertSquashRatio = detectVerticalSquash(img);
  8307. return ctx.drawImage(img, sx, sy, sw, sh, dx, dy, dw, dh / vertSquashRatio);
  8308. }; // Based on MinifyJpeg
  8309. // Source: http://www.perry.cz/files/ExifRestorer.js
  8310. // http://elicon.blog57.fc2.com/blog-entry-206.html
  8311. var ExifRestore = /*#__PURE__*/function () {
  8312. function ExifRestore() {
  8313. dropzone_classCallCheck(this, ExifRestore);
  8314. }
  8315. dropzone_createClass(ExifRestore, null, [{
  8316. key: "initClass",
  8317. value: function initClass() {
  8318. this.KEY_STR = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
  8319. }
  8320. }, {
  8321. key: "encode64",
  8322. value: function encode64(input) {
  8323. var output = "";
  8324. var chr1 = undefined;
  8325. var chr2 = undefined;
  8326. var chr3 = "";
  8327. var enc1 = undefined;
  8328. var enc2 = undefined;
  8329. var enc3 = undefined;
  8330. var enc4 = "";
  8331. var i = 0;
  8332. while (true) {
  8333. chr1 = input[i++];
  8334. chr2 = input[i++];
  8335. chr3 = input[i++];
  8336. enc1 = chr1 >> 2;
  8337. enc2 = (chr1 & 3) << 4 | chr2 >> 4;
  8338. enc3 = (chr2 & 15) << 2 | chr3 >> 6;
  8339. enc4 = chr3 & 63;
  8340. if (isNaN(chr2)) {
  8341. enc3 = enc4 = 64;
  8342. } else if (isNaN(chr3)) {
  8343. enc4 = 64;
  8344. }
  8345. output = output + this.KEY_STR.charAt(enc1) + this.KEY_STR.charAt(enc2) + this.KEY_STR.charAt(enc3) + this.KEY_STR.charAt(enc4);
  8346. chr1 = chr2 = chr3 = "";
  8347. enc1 = enc2 = enc3 = enc4 = "";
  8348. if (!(i < input.length)) {
  8349. break;
  8350. }
  8351. }
  8352. return output;
  8353. }
  8354. }, {
  8355. key: "restore",
  8356. value: function restore(origFileBase64, resizedFileBase64) {
  8357. if (!origFileBase64.match("data:image/jpeg;base64,")) {
  8358. return resizedFileBase64;
  8359. }
  8360. var rawImage = this.decode64(origFileBase64.replace("data:image/jpeg;base64,", ""));
  8361. var segments = this.slice2Segments(rawImage);
  8362. var image = this.exifManipulation(resizedFileBase64, segments);
  8363. return "data:image/jpeg;base64,".concat(this.encode64(image));
  8364. }
  8365. }, {
  8366. key: "exifManipulation",
  8367. value: function exifManipulation(resizedFileBase64, segments) {
  8368. var exifArray = this.getExifArray(segments);
  8369. var newImageArray = this.insertExif(resizedFileBase64, exifArray);
  8370. var aBuffer = new Uint8Array(newImageArray);
  8371. return aBuffer;
  8372. }
  8373. }, {
  8374. key: "getExifArray",
  8375. value: function getExifArray(segments) {
  8376. var seg = undefined;
  8377. var x = 0;
  8378. while (x < segments.length) {
  8379. seg = segments[x];
  8380. if (seg[0] === 255 & seg[1] === 225) {
  8381. return seg;
  8382. }
  8383. x++;
  8384. }
  8385. return [];
  8386. }
  8387. }, {
  8388. key: "insertExif",
  8389. value: function insertExif(resizedFileBase64, exifArray) {
  8390. var imageData = resizedFileBase64.replace("data:image/jpeg;base64,", "");
  8391. var buf = this.decode64(imageData);
  8392. var separatePoint = buf.indexOf(255, 3);
  8393. var mae = buf.slice(0, separatePoint);
  8394. var ato = buf.slice(separatePoint);
  8395. var array = mae;
  8396. array = array.concat(exifArray);
  8397. array = array.concat(ato);
  8398. return array;
  8399. }
  8400. }, {
  8401. key: "slice2Segments",
  8402. value: function slice2Segments(rawImageArray) {
  8403. var head = 0;
  8404. var segments = [];
  8405. while (true) {
  8406. var length;
  8407. if (rawImageArray[head] === 255 & rawImageArray[head + 1] === 218) {
  8408. break;
  8409. }
  8410. if (rawImageArray[head] === 255 & rawImageArray[head + 1] === 216) {
  8411. head += 2;
  8412. } else {
  8413. length = rawImageArray[head + 2] * 256 + rawImageArray[head + 3];
  8414. var endPoint = head + length + 2;
  8415. var seg = rawImageArray.slice(head, endPoint);
  8416. segments.push(seg);
  8417. head = endPoint;
  8418. }
  8419. if (head > rawImageArray.length) {
  8420. break;
  8421. }
  8422. }
  8423. return segments;
  8424. }
  8425. }, {
  8426. key: "decode64",
  8427. value: function decode64(input) {
  8428. var output = "";
  8429. var chr1 = undefined;
  8430. var chr2 = undefined;
  8431. var chr3 = "";
  8432. var enc1 = undefined;
  8433. var enc2 = undefined;
  8434. var enc3 = undefined;
  8435. var enc4 = "";
  8436. var i = 0;
  8437. var buf = []; // remove all characters that are not A-Z, a-z, 0-9, +, /, or =
  8438. var base64test = /[^A-Za-z0-9\+\/\=]/g;
  8439. if (base64test.exec(input)) {
  8440. 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.");
  8441. }
  8442. input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
  8443. while (true) {
  8444. enc1 = this.KEY_STR.indexOf(input.charAt(i++));
  8445. enc2 = this.KEY_STR.indexOf(input.charAt(i++));
  8446. enc3 = this.KEY_STR.indexOf(input.charAt(i++));
  8447. enc4 = this.KEY_STR.indexOf(input.charAt(i++));
  8448. chr1 = enc1 << 2 | enc2 >> 4;
  8449. chr2 = (enc2 & 15) << 4 | enc3 >> 2;
  8450. chr3 = (enc3 & 3) << 6 | enc4;
  8451. buf.push(chr1);
  8452. if (enc3 !== 64) {
  8453. buf.push(chr2);
  8454. }
  8455. if (enc4 !== 64) {
  8456. buf.push(chr3);
  8457. }
  8458. chr1 = chr2 = chr3 = "";
  8459. enc1 = enc2 = enc3 = enc4 = "";
  8460. if (!(i < input.length)) {
  8461. break;
  8462. }
  8463. }
  8464. return buf;
  8465. }
  8466. }]);
  8467. return ExifRestore;
  8468. }();
  8469. ExifRestore.initClass();
  8470. /*
  8471. * contentloaded.js
  8472. *
  8473. * Author: Diego Perini (diego.perini at gmail.com)
  8474. * Summary: cross-browser wrapper for DOMContentLoaded
  8475. * Updated: 20101020
  8476. * License: MIT
  8477. * Version: 1.2
  8478. *
  8479. * URL:
  8480. * http://javascript.nwbox.com/ContentLoaded/
  8481. * http://javascript.nwbox.com/ContentLoaded/MIT-LICENSE
  8482. */
  8483. // @win window reference
  8484. // @fn function reference
  8485. var contentLoaded = function contentLoaded(win, fn) {
  8486. var done = false;
  8487. var top = true;
  8488. var doc = win.document;
  8489. var root = doc.documentElement;
  8490. var add = doc.addEventListener ? "addEventListener" : "attachEvent";
  8491. var rem = doc.addEventListener ? "removeEventListener" : "detachEvent";
  8492. var pre = doc.addEventListener ? "" : "on";
  8493. var init = function init(e) {
  8494. if (e.type === "readystatechange" && doc.readyState !== "complete") {
  8495. return;
  8496. }
  8497. (e.type === "load" ? win : doc)[rem](pre + e.type, init, false);
  8498. if (!done && (done = true)) {
  8499. return fn.call(win, e.type || e);
  8500. }
  8501. };
  8502. var poll = function poll() {
  8503. try {
  8504. root.doScroll("left");
  8505. } catch (e) {
  8506. setTimeout(poll, 50);
  8507. return;
  8508. }
  8509. return init("poll");
  8510. };
  8511. if (doc.readyState !== "complete") {
  8512. if (doc.createEventObject && root.doScroll) {
  8513. try {
  8514. top = !win.frameElement;
  8515. } catch (error) {}
  8516. if (top) {
  8517. poll();
  8518. }
  8519. }
  8520. doc[add](pre + "DOMContentLoaded", init, false);
  8521. doc[add](pre + "readystatechange", init, false);
  8522. return win[add](pre + "load", init, false);
  8523. }
  8524. }; // As a single function to be able to write tests.
  8525. Dropzone._autoDiscoverFunction = function () {
  8526. if (Dropzone.autoDiscover) {
  8527. return Dropzone.discover();
  8528. }
  8529. };
  8530. contentLoaded(window, Dropzone._autoDiscoverFunction);
  8531. function __guard__(value, transform) {
  8532. return typeof value !== "undefined" && value !== null ? transform(value) : undefined;
  8533. }
  8534. function __guardMethod__(obj, methodName, transform) {
  8535. if (typeof obj !== "undefined" && obj !== null && typeof obj[methodName] === "function") {
  8536. return transform(obj, methodName);
  8537. } else {
  8538. return undefined;
  8539. }
  8540. }
  8541. ;// CONCATENATED MODULE: ./tool/dropzone.dist.js
  8542. /// Make Dropzone a global variable.
  8543. window.Dropzone = Dropzone;
  8544. /* harmony default export */ var dropzone_dist = (Dropzone);
  8545. }();
  8546. /******/ return __webpack_exports__;
  8547. /******/ })()
  8548. ;
  8549. });