rss-parser.js 425 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002
  1. (function webpackUniversalModuleDefinition(root, factory) {
  2. if(typeof exports === 'object' && typeof module === 'object')
  3. module.exports = factory(require("xmlbuilder"));
  4. else if(typeof define === 'function' && define.amd)
  5. define(["xmlbuilder"], factory);
  6. else if(typeof exports === 'object')
  7. exports["RSSParser"] = factory(require("xmlbuilder"));
  8. else
  9. root["RSSParser"] = factory(root["xmlbuilder"]);
  10. })(this, function(__WEBPACK_EXTERNAL_MODULE_xmlbuilder__) {
  11. return /******/ (function(modules) { // webpackBootstrap
  12. /******/ // The module cache
  13. /******/ var installedModules = {};
  14. /******/
  15. /******/ // The require function
  16. /******/ function __webpack_require__(moduleId) {
  17. /******/
  18. /******/ // Check if module is in cache
  19. /******/ if(installedModules[moduleId]) {
  20. /******/ return installedModules[moduleId].exports;
  21. /******/ }
  22. /******/ // Create a new module (and put it into the cache)
  23. /******/ var module = installedModules[moduleId] = {
  24. /******/ i: moduleId,
  25. /******/ l: false,
  26. /******/ exports: {}
  27. /******/ };
  28. /******/
  29. /******/ // Execute the module function
  30. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  31. /******/
  32. /******/ // Flag the module as loaded
  33. /******/ module.l = true;
  34. /******/
  35. /******/ // Return the exports of the module
  36. /******/ return module.exports;
  37. /******/ }
  38. /******/
  39. /******/
  40. /******/ // expose the modules object (__webpack_modules__)
  41. /******/ __webpack_require__.m = modules;
  42. /******/
  43. /******/ // expose the module cache
  44. /******/ __webpack_require__.c = installedModules;
  45. /******/
  46. /******/ // define getter function for harmony exports
  47. /******/ __webpack_require__.d = function(exports, name, getter) {
  48. /******/ if(!__webpack_require__.o(exports, name)) {
  49. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  50. /******/ }
  51. /******/ };
  52. /******/
  53. /******/ // define __esModule on exports
  54. /******/ __webpack_require__.r = function(exports) {
  55. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  56. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  57. /******/ }
  58. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  59. /******/ };
  60. /******/
  61. /******/ // create a fake namespace object
  62. /******/ // mode & 1: value is a module id, require it
  63. /******/ // mode & 2: merge all properties of value into the ns
  64. /******/ // mode & 4: return value when already ns object
  65. /******/ // mode & 8|1: behave like require
  66. /******/ __webpack_require__.t = function(value, mode) {
  67. /******/ if(mode & 1) value = __webpack_require__(value);
  68. /******/ if(mode & 8) return value;
  69. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  70. /******/ var ns = Object.create(null);
  71. /******/ __webpack_require__.r(ns);
  72. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  73. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  74. /******/ return ns;
  75. /******/ };
  76. /******/
  77. /******/ // getDefaultExport function for compatibility with non-harmony modules
  78. /******/ __webpack_require__.n = function(module) {
  79. /******/ var getter = module && module.__esModule ?
  80. /******/ function getDefault() { return module['default']; } :
  81. /******/ function getModuleExports() { return module; };
  82. /******/ __webpack_require__.d(getter, 'a', getter);
  83. /******/ return getter;
  84. /******/ };
  85. /******/
  86. /******/ // Object.prototype.hasOwnProperty.call
  87. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  88. /******/
  89. /******/ // __webpack_public_path__
  90. /******/ __webpack_require__.p = "";
  91. /******/
  92. /******/
  93. /******/ // Load entry module and return exports
  94. /******/ return __webpack_require__(__webpack_require__.s = "./index.js");
  95. /******/ })
  96. /************************************************************************/
  97. /******/ ({
  98. /***/ "./index.js":
  99. /*!******************!*\
  100. !*** ./index.js ***!
  101. \******************/
  102. /*! no static exports found */
  103. /***/ (function(module, exports, __webpack_require__) {
  104. "use strict";
  105. module.exports = __webpack_require__(/*! ./lib/parser */ "./lib/parser.js");
  106. /***/ }),
  107. /***/ "./lib/fields.js":
  108. /*!***********************!*\
  109. !*** ./lib/fields.js ***!
  110. \***********************/
  111. /*! no static exports found */
  112. /***/ (function(module, exports) {
  113. var fields = module.exports = {};
  114. fields.feed = [['author', 'creator'], ['dc:publisher', 'publisher'], ['dc:creator', 'creator'], ['dc:source', 'source'], ['dc:title', 'title'], ['dc:type', 'type'], 'title', 'description', 'author', 'pubDate', 'webMaster', 'managingEditor', 'generator', 'link', 'language', 'copyright', 'lastBuildDate', 'docs', 'generator', 'ttl', 'rating', 'skipHours', 'skipDays'];
  115. fields.item = [['author', 'creator'], ['dc:creator', 'creator'], ['dc:date', 'date'], ['dc:language', 'language'], ['dc:rights', 'rights'], ['dc:source', 'source'], ['dc:title', 'title'], 'title', 'link', 'pubDate', 'author', 'summary', ['content:encoded', 'content:encoded', {
  116. includeSnippet: true
  117. }], 'enclosure', 'dc:creator', 'dc:date', 'comments'];
  118. var mapItunesField = function mapItunesField(f) {
  119. return ['itunes:' + f, f];
  120. };
  121. fields.podcastFeed = ['author', 'subtitle', 'summary', 'explicit'].map(mapItunesField);
  122. fields.podcastItem = ['author', 'subtitle', 'summary', 'explicit', 'duration', 'image', 'episode', 'image', 'season', 'keywords', 'episodeType'].map(mapItunesField);
  123. /***/ }),
  124. /***/ "./lib/parser.js":
  125. /*!***********************!*\
  126. !*** ./lib/parser.js ***!
  127. \***********************/
  128. /*! no static exports found */
  129. /***/ (function(module, exports, __webpack_require__) {
  130. "use strict";
  131. function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
  132. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  133. 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, _toPropertyKey(descriptor.key), descriptor); } }
  134. function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  135. function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
  136. function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
  137. var http = __webpack_require__(/*! http */ "./node_modules/stream-http/index.js");
  138. var https = __webpack_require__(/*! https */ "./node_modules/https-browserify/index.js");
  139. var xml2js = __webpack_require__(/*! xml2js */ "./node_modules/xml2js/lib/xml2js.js");
  140. var url = __webpack_require__(/*! url */ "./node_modules/url/url.js");
  141. var fields = __webpack_require__(/*! ./fields */ "./lib/fields.js");
  142. var utils = __webpack_require__(/*! ./utils */ "./lib/utils.js");
  143. var DEFAULT_HEADERS = {
  144. 'User-Agent': 'rss-parser',
  145. 'Accept': 'application/rss+xml'
  146. };
  147. var DEFAULT_MAX_REDIRECTS = 5;
  148. var DEFAULT_TIMEOUT = 60000;
  149. var Parser = /*#__PURE__*/function () {
  150. function Parser() {
  151. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  152. _classCallCheck(this, Parser);
  153. options.headers = options.headers || {};
  154. options.xml2js = options.xml2js || {};
  155. options.customFields = options.customFields || {};
  156. options.customFields.item = options.customFields.item || [];
  157. options.customFields.feed = options.customFields.feed || [];
  158. options.requestOptions = options.requestOptions || {};
  159. if (!options.maxRedirects) options.maxRedirects = DEFAULT_MAX_REDIRECTS;
  160. if (!options.timeout) options.timeout = DEFAULT_TIMEOUT;
  161. this.options = options;
  162. this.xmlParser = new xml2js.Parser(this.options.xml2js);
  163. }
  164. _createClass(Parser, [{
  165. key: "parseString",
  166. value: function parseString(xml, callback) {
  167. var _this = this;
  168. var prom = new Promise(function (resolve, reject) {
  169. _this.xmlParser.parseString(xml, function (err, result) {
  170. if (err) return reject(err);
  171. if (!result) {
  172. return reject(new Error('Unable to parse XML.'));
  173. }
  174. var feed = null;
  175. if (result.feed) {
  176. feed = _this.buildAtomFeed(result);
  177. } else if (result.rss && result.rss.$ && result.rss.$.version && result.rss.$.version.match(/^2/)) {
  178. feed = _this.buildRSS2(result);
  179. } else if (result['rdf:RDF']) {
  180. feed = _this.buildRSS1(result);
  181. } else if (result.rss && result.rss.$ && result.rss.$.version && result.rss.$.version.match(/0\.9/)) {
  182. feed = _this.buildRSS0_9(result);
  183. } else if (result.rss && _this.options.defaultRSS) {
  184. switch (_this.options.defaultRSS) {
  185. case 0.9:
  186. feed = _this.buildRSS0_9(result);
  187. break;
  188. case 1:
  189. feed = _this.buildRSS1(result);
  190. break;
  191. case 2:
  192. feed = _this.buildRSS2(result);
  193. break;
  194. default:
  195. return reject(new Error("default RSS version not recognized."));
  196. }
  197. } else {
  198. return reject(new Error("Feed not recognized as RSS 1 or 2."));
  199. }
  200. resolve(feed);
  201. });
  202. });
  203. prom = utils.maybePromisify(callback, prom);
  204. return prom;
  205. }
  206. }, {
  207. key: "parseURL",
  208. value: function parseURL(feedUrl, callback) {
  209. var _this2 = this;
  210. var redirectCount = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
  211. var xml = '';
  212. var get = feedUrl.indexOf('https') === 0 ? https.get : http.get;
  213. var urlParts = url.parse(feedUrl);
  214. var headers = Object.assign({}, DEFAULT_HEADERS, this.options.headers);
  215. var timeout = null;
  216. var prom = new Promise(function (resolve, reject) {
  217. var requestOpts = Object.assign({
  218. headers: headers
  219. }, urlParts, _this2.options.requestOptions);
  220. var req = get(requestOpts, function (res) {
  221. if (_this2.options.maxRedirects && res.statusCode >= 300 && res.statusCode < 400 && res.headers['location']) {
  222. if (redirectCount === _this2.options.maxRedirects) {
  223. return reject(new Error("Too many redirects"));
  224. } else {
  225. var newLocation = url.resolve(feedUrl, res.headers['location']);
  226. return _this2.parseURL(newLocation, null, redirectCount + 1).then(resolve, reject);
  227. }
  228. } else if (res.statusCode >= 300) {
  229. return reject(new Error("Status code " + res.statusCode));
  230. }
  231. var encoding = utils.getEncodingFromContentType(res.headers['content-type']);
  232. res.setEncoding(encoding);
  233. res.on('data', function (chunk) {
  234. xml += chunk;
  235. });
  236. res.on('end', function () {
  237. return _this2.parseString(xml).then(resolve, reject);
  238. });
  239. });
  240. req.on('error', reject);
  241. timeout = setTimeout(function () {
  242. return reject(new Error("Request timed out after " + _this2.options.timeout + "ms"));
  243. }, _this2.options.timeout);
  244. }).then(function (data) {
  245. clearTimeout(timeout);
  246. return Promise.resolve(data);
  247. }, function (e) {
  248. clearTimeout(timeout);
  249. return Promise.reject(e);
  250. });
  251. prom = utils.maybePromisify(callback, prom);
  252. return prom;
  253. }
  254. }, {
  255. key: "buildAtomFeed",
  256. value: function buildAtomFeed(xmlObj) {
  257. var _this3 = this;
  258. var feed = {
  259. items: []
  260. };
  261. utils.copyFromXML(xmlObj.feed, feed, this.options.customFields.feed);
  262. if (xmlObj.feed.link) {
  263. feed.link = utils.getLink(xmlObj.feed.link, 'alternate', 0);
  264. feed.feedUrl = utils.getLink(xmlObj.feed.link, 'self', 1);
  265. }
  266. if (xmlObj.feed.title) {
  267. var title = xmlObj.feed.title[0] || '';
  268. if (title._) title = title._;
  269. if (title) feed.title = title;
  270. }
  271. if (xmlObj.feed.updated) {
  272. feed.lastBuildDate = xmlObj.feed.updated[0];
  273. }
  274. feed.items = (xmlObj.feed.entry || []).map(function (entry) {
  275. return _this3.parseItemAtom(entry);
  276. });
  277. return feed;
  278. }
  279. }, {
  280. key: "parseItemAtom",
  281. value: function parseItemAtom(entry) {
  282. var item = {};
  283. utils.copyFromXML(entry, item, this.options.customFields.item);
  284. if (entry.title) {
  285. var title = entry.title[0] || '';
  286. if (title._) title = title._;
  287. if (title) item.title = title;
  288. }
  289. if (entry.link && entry.link.length) {
  290. item.link = utils.getLink(entry.link, 'alternate', 0);
  291. }
  292. if (entry.published && entry.published.length && entry.published[0].length) item.pubDate = new Date(entry.published[0]).toISOString();
  293. if (!item.pubDate && entry.updated && entry.updated.length && entry.updated[0].length) item.pubDate = new Date(entry.updated[0]).toISOString();
  294. if (entry.author && entry.author.length && entry.author[0].name && entry.author[0].name.length) item.author = entry.author[0].name[0];
  295. if (entry.content && entry.content.length) {
  296. item.content = utils.getContent(entry.content[0]);
  297. item.contentSnippet = utils.getSnippet(item.content);
  298. }
  299. if (entry.summary && entry.summary.length) {
  300. item.summary = utils.getContent(entry.summary[0]);
  301. }
  302. if (entry.id) {
  303. item.id = entry.id[0];
  304. }
  305. this.setISODate(item);
  306. return item;
  307. }
  308. }, {
  309. key: "buildRSS0_9",
  310. value: function buildRSS0_9(xmlObj) {
  311. var channel = xmlObj.rss.channel[0];
  312. var items = channel.item;
  313. return this.buildRSS(channel, items);
  314. }
  315. }, {
  316. key: "buildRSS1",
  317. value: function buildRSS1(xmlObj) {
  318. xmlObj = xmlObj['rdf:RDF'];
  319. var channel = xmlObj.channel[0];
  320. var items = xmlObj.item;
  321. return this.buildRSS(channel, items);
  322. }
  323. }, {
  324. key: "buildRSS2",
  325. value: function buildRSS2(xmlObj) {
  326. var channel = xmlObj.rss.channel[0];
  327. var items = channel.item;
  328. var feed = this.buildRSS(channel, items);
  329. if (xmlObj.rss.$ && xmlObj.rss.$['xmlns:itunes']) {
  330. this.decorateItunes(feed, channel);
  331. }
  332. return feed;
  333. }
  334. }, {
  335. key: "buildRSS",
  336. value: function buildRSS(channel, items) {
  337. var _this4 = this;
  338. items = items || [];
  339. var feed = {
  340. items: []
  341. };
  342. var feedFields = fields.feed.concat(this.options.customFields.feed);
  343. var itemFields = fields.item.concat(this.options.customFields.item);
  344. if (channel['atom:link'] && channel['atom:link'][0] && channel['atom:link'][0].$) {
  345. feed.feedUrl = channel['atom:link'][0].$.href;
  346. }
  347. if (channel.image && channel.image[0] && channel.image[0].url) {
  348. feed.image = {};
  349. var image = channel.image[0];
  350. if (image.link) feed.image.link = image.link[0];
  351. if (image.url) feed.image.url = image.url[0];
  352. if (image.title) feed.image.title = image.title[0];
  353. if (image.width) feed.image.width = image.width[0];
  354. if (image.height) feed.image.height = image.height[0];
  355. }
  356. var paginationLinks = this.generatePaginationLinks(channel);
  357. if (Object.keys(paginationLinks).length) {
  358. feed.paginationLinks = paginationLinks;
  359. }
  360. utils.copyFromXML(channel, feed, feedFields);
  361. feed.items = items.map(function (xmlItem) {
  362. return _this4.parseItemRss(xmlItem, itemFields);
  363. });
  364. return feed;
  365. }
  366. }, {
  367. key: "parseItemRss",
  368. value: function parseItemRss(xmlItem, itemFields) {
  369. var item = {};
  370. utils.copyFromXML(xmlItem, item, itemFields);
  371. if (xmlItem.enclosure) {
  372. item.enclosure = xmlItem.enclosure[0].$;
  373. }
  374. if (xmlItem.description) {
  375. item.content = utils.getContent(xmlItem.description[0]);
  376. item.contentSnippet = utils.getSnippet(item.content);
  377. }
  378. if (xmlItem.guid) {
  379. item.guid = xmlItem.guid[0];
  380. if (item.guid._) item.guid = item.guid._;
  381. }
  382. if (xmlItem.$ && xmlItem.$['rdf:about']) {
  383. item['rdf:about'] = xmlItem.$['rdf:about'];
  384. }
  385. if (xmlItem.category) item.categories = xmlItem.category;
  386. this.setISODate(item);
  387. return item;
  388. }
  389. /**
  390. * Add iTunes specific fields from XML to extracted JSON
  391. *
  392. * @access public
  393. * @param {object} feed extracted
  394. * @param {object} channel parsed XML
  395. */
  396. }, {
  397. key: "decorateItunes",
  398. value: function decorateItunes(feed, channel) {
  399. var items = channel.item || [];
  400. var categories = [];
  401. feed.itunes = {};
  402. if (channel['itunes:owner']) {
  403. var owner = {};
  404. if (channel['itunes:owner'][0]['itunes:name']) {
  405. owner.name = channel['itunes:owner'][0]['itunes:name'][0];
  406. }
  407. if (channel['itunes:owner'][0]['itunes:email']) {
  408. owner.email = channel['itunes:owner'][0]['itunes:email'][0];
  409. }
  410. feed.itunes.owner = owner;
  411. }
  412. if (channel['itunes:image']) {
  413. var image;
  414. var hasImageHref = channel['itunes:image'][0] && channel['itunes:image'][0].$ && channel['itunes:image'][0].$.href;
  415. image = hasImageHref ? channel['itunes:image'][0].$.href : null;
  416. if (image) {
  417. feed.itunes.image = image;
  418. }
  419. }
  420. if (channel['itunes:category']) {
  421. var categoriesWithSubs = channel['itunes:category'].map(function (category) {
  422. return {
  423. name: category && category.$ && category.$.text,
  424. subs: category['itunes:category'] ? category['itunes:category'].map(function (subcategory) {
  425. return {
  426. name: subcategory && subcategory.$ && subcategory.$.text
  427. };
  428. }) : null
  429. };
  430. });
  431. feed.itunes.categories = categoriesWithSubs.map(function (category) {
  432. return category.name;
  433. });
  434. feed.itunes.categoriesWithSubs = categoriesWithSubs;
  435. }
  436. if (channel['itunes:keywords']) {
  437. if (channel['itunes:keywords'].length > 1) {
  438. feed.itunes.keywords = channel['itunes:keywords'].map(function (keyword) {
  439. return keyword && keyword.$ && keyword.$.text;
  440. });
  441. } else {
  442. var keywords = channel['itunes:keywords'][0];
  443. if (keywords && typeof keywords._ === 'string') {
  444. keywords = keywords._;
  445. }
  446. if (keywords && keywords.$ && keywords.$.text) {
  447. feed.itunes.keywords = keywords.$.text.split(',');
  448. } else if (typeof keywords === "string") {
  449. feed.itunes.keywords = keywords.split(',');
  450. }
  451. }
  452. }
  453. utils.copyFromXML(channel, feed.itunes, fields.podcastFeed);
  454. items.forEach(function (item, index) {
  455. var entry = feed.items[index];
  456. entry.itunes = {};
  457. utils.copyFromXML(item, entry.itunes, fields.podcastItem);
  458. var image = item['itunes:image'];
  459. if (image && image[0] && image[0].$ && image[0].$.href) {
  460. entry.itunes.image = image[0].$.href;
  461. }
  462. });
  463. }
  464. }, {
  465. key: "setISODate",
  466. value: function setISODate(item) {
  467. var date = item.pubDate || item.date;
  468. if (date) {
  469. try {
  470. item.isoDate = new Date(date.trim()).toISOString();
  471. } catch (e) {
  472. // Ignore bad date format
  473. }
  474. }
  475. }
  476. /**
  477. * Generates a pagination object where the rel attribute is the key and href attribute is the value
  478. * { self: 'self-url', first: 'first-url', ... }
  479. *
  480. * @access private
  481. * @param {Object} channel parsed XML
  482. * @returns {Object}
  483. */
  484. }, {
  485. key: "generatePaginationLinks",
  486. value: function generatePaginationLinks(channel) {
  487. if (!channel['atom:link']) {
  488. return {};
  489. }
  490. var paginationRelAttributes = ['self', 'first', 'next', 'prev', 'last'];
  491. return channel['atom:link'].reduce(function (paginationLinks, link) {
  492. if (!link.$ || !paginationRelAttributes.includes(link.$.rel)) {
  493. return paginationLinks;
  494. }
  495. paginationLinks[link.$.rel] = link.$.href;
  496. return paginationLinks;
  497. }, {});
  498. }
  499. }]);
  500. return Parser;
  501. }();
  502. module.exports = Parser;
  503. /***/ }),
  504. /***/ "./lib/utils.js":
  505. /*!**********************!*\
  506. !*** ./lib/utils.js ***!
  507. \**********************/
  508. /*! no static exports found */
  509. /***/ (function(module, exports, __webpack_require__) {
  510. function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
  511. var utils = module.exports = {};
  512. var entities = __webpack_require__(/*! entities */ "./node_modules/entities/lib/index.js");
  513. var xml2js = __webpack_require__(/*! xml2js */ "./node_modules/xml2js/lib/xml2js.js");
  514. utils.stripHtml = function (str) {
  515. str = str.replace(/([^\n])<\/?(h|br|p|ul|ol|li|blockquote|section|table|tr|div)(?:.|\n)*?>([^\n])/gm, '$1\n$3');
  516. str = str.replace(/<(?:.|\n)*?>/gm, '');
  517. return str;
  518. };
  519. utils.getSnippet = function (str) {
  520. return entities.decodeHTML(utils.stripHtml(str)).trim();
  521. };
  522. utils.getLink = function (links, rel, fallbackIdx) {
  523. if (!links) return;
  524. for (var i = 0; i < links.length; ++i) {
  525. if (links[i].$.rel === rel) return links[i].$.href;
  526. }
  527. if (links[fallbackIdx]) return links[fallbackIdx].$.href;
  528. };
  529. utils.getContent = function (content) {
  530. if (typeof content._ === 'string') {
  531. return content._;
  532. } else if (_typeof(content) === 'object') {
  533. var builder = new xml2js.Builder({
  534. headless: true,
  535. explicitRoot: true,
  536. rootName: 'div',
  537. renderOpts: {
  538. pretty: false
  539. }
  540. });
  541. return builder.buildObject(content);
  542. } else {
  543. return content;
  544. }
  545. };
  546. utils.copyFromXML = function (xml, dest, fields) {
  547. fields.forEach(function (f) {
  548. var from = f;
  549. var to = f;
  550. var options = {};
  551. if (Array.isArray(f)) {
  552. from = f[0];
  553. to = f[1];
  554. if (f.length > 2) {
  555. options = f[2];
  556. }
  557. }
  558. var _options = options,
  559. keepArray = _options.keepArray,
  560. includeSnippet = _options.includeSnippet;
  561. if (xml[from] !== undefined) {
  562. dest[to] = keepArray ? xml[from] : xml[from][0];
  563. }
  564. if (dest[to] && typeof dest[to]._ === 'string') {
  565. dest[to] = dest[to]._;
  566. }
  567. if (includeSnippet && dest[to] && typeof dest[to] === 'string') {
  568. dest[to + 'Snippet'] = utils.getSnippet(dest[to]);
  569. }
  570. });
  571. };
  572. utils.maybePromisify = function (callback, promise) {
  573. if (!callback) return promise;
  574. return promise.then(function (data) {
  575. return setTimeout(function () {
  576. return callback(null, data);
  577. });
  578. }, function (err) {
  579. return setTimeout(function () {
  580. return callback(err);
  581. });
  582. });
  583. };
  584. var DEFAULT_ENCODING = 'utf8';
  585. var ENCODING_REGEX = /(encoding|charset)\s*=\s*(\S+)/;
  586. var SUPPORTED_ENCODINGS = ['ascii', 'utf8', 'utf16le', 'ucs2', 'base64', 'latin1', 'binary', 'hex'];
  587. var ENCODING_ALIASES = {
  588. 'utf-8': 'utf8',
  589. 'iso-8859-1': 'latin1'
  590. };
  591. utils.getEncodingFromContentType = function (contentType) {
  592. contentType = contentType || '';
  593. var match = contentType.match(ENCODING_REGEX);
  594. var encoding = (match || [])[2] || '';
  595. encoding = encoding.toLowerCase();
  596. encoding = ENCODING_ALIASES[encoding] || encoding;
  597. if (!encoding || SUPPORTED_ENCODINGS.indexOf(encoding) === -1) {
  598. encoding = DEFAULT_ENCODING;
  599. }
  600. return encoding;
  601. };
  602. /***/ }),
  603. /***/ "./node_modules/base64-js/index.js":
  604. /*!*****************************************!*\
  605. !*** ./node_modules/base64-js/index.js ***!
  606. \*****************************************/
  607. /*! no static exports found */
  608. /***/ (function(module, exports, __webpack_require__) {
  609. "use strict";
  610. exports.byteLength = byteLength;
  611. exports.toByteArray = toByteArray;
  612. exports.fromByteArray = fromByteArray;
  613. var lookup = [];
  614. var revLookup = [];
  615. var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;
  616. var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
  617. for (var i = 0, len = code.length; i < len; ++i) {
  618. lookup[i] = code[i];
  619. revLookup[code.charCodeAt(i)] = i;
  620. }
  621. // Support decoding URL-safe base64 strings, as Node.js does.
  622. // See: https://en.wikipedia.org/wiki/Base64#URL_applications
  623. revLookup['-'.charCodeAt(0)] = 62;
  624. revLookup['_'.charCodeAt(0)] = 63;
  625. function getLens(b64) {
  626. var len = b64.length;
  627. if (len % 4 > 0) {
  628. throw new Error('Invalid string. Length must be a multiple of 4');
  629. }
  630. // Trim off extra bytes after placeholder bytes are found
  631. // See: https://github.com/beatgammit/base64-js/issues/42
  632. var validLen = b64.indexOf('=');
  633. if (validLen === -1) validLen = len;
  634. var placeHoldersLen = validLen === len ? 0 : 4 - validLen % 4;
  635. return [validLen, placeHoldersLen];
  636. }
  637. // base64 is 4/3 + up to two characters of the original data
  638. function byteLength(b64) {
  639. var lens = getLens(b64);
  640. var validLen = lens[0];
  641. var placeHoldersLen = lens[1];
  642. return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
  643. }
  644. function _byteLength(b64, validLen, placeHoldersLen) {
  645. return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
  646. }
  647. function toByteArray(b64) {
  648. var tmp;
  649. var lens = getLens(b64);
  650. var validLen = lens[0];
  651. var placeHoldersLen = lens[1];
  652. var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));
  653. var curByte = 0;
  654. // if there are placeholders, only get up to the last complete 4 chars
  655. var len = placeHoldersLen > 0 ? validLen - 4 : validLen;
  656. var i;
  657. for (i = 0; i < len; i += 4) {
  658. tmp = revLookup[b64.charCodeAt(i)] << 18 | revLookup[b64.charCodeAt(i + 1)] << 12 | revLookup[b64.charCodeAt(i + 2)] << 6 | revLookup[b64.charCodeAt(i + 3)];
  659. arr[curByte++] = tmp >> 16 & 0xFF;
  660. arr[curByte++] = tmp >> 8 & 0xFF;
  661. arr[curByte++] = tmp & 0xFF;
  662. }
  663. if (placeHoldersLen === 2) {
  664. tmp = revLookup[b64.charCodeAt(i)] << 2 | revLookup[b64.charCodeAt(i + 1)] >> 4;
  665. arr[curByte++] = tmp & 0xFF;
  666. }
  667. if (placeHoldersLen === 1) {
  668. tmp = revLookup[b64.charCodeAt(i)] << 10 | revLookup[b64.charCodeAt(i + 1)] << 4 | revLookup[b64.charCodeAt(i + 2)] >> 2;
  669. arr[curByte++] = tmp >> 8 & 0xFF;
  670. arr[curByte++] = tmp & 0xFF;
  671. }
  672. return arr;
  673. }
  674. function tripletToBase64(num) {
  675. return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F];
  676. }
  677. function encodeChunk(uint8, start, end) {
  678. var tmp;
  679. var output = [];
  680. for (var i = start; i < end; i += 3) {
  681. tmp = (uint8[i] << 16 & 0xFF0000) + (uint8[i + 1] << 8 & 0xFF00) + (uint8[i + 2] & 0xFF);
  682. output.push(tripletToBase64(tmp));
  683. }
  684. return output.join('');
  685. }
  686. function fromByteArray(uint8) {
  687. var tmp;
  688. var len = uint8.length;
  689. var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes
  690. var parts = [];
  691. var maxChunkLength = 16383; // must be multiple of 3
  692. // go through the array every three bytes, we'll deal with trailing stuff later
  693. for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
  694. parts.push(encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength));
  695. }
  696. // pad the end with zeros, but make sure to not forget the extra bytes
  697. if (extraBytes === 1) {
  698. tmp = uint8[len - 1];
  699. parts.push(lookup[tmp >> 2] + lookup[tmp << 4 & 0x3F] + '==');
  700. } else if (extraBytes === 2) {
  701. tmp = (uint8[len - 2] << 8) + uint8[len - 1];
  702. parts.push(lookup[tmp >> 10] + lookup[tmp >> 4 & 0x3F] + lookup[tmp << 2 & 0x3F] + '=');
  703. }
  704. return parts.join('');
  705. }
  706. /***/ }),
  707. /***/ "./node_modules/buffer/index.js":
  708. /*!**************************************!*\
  709. !*** ./node_modules/buffer/index.js ***!
  710. \**************************************/
  711. /*! no static exports found */
  712. /***/ (function(module, exports, __webpack_require__) {
  713. "use strict";
  714. /* WEBPACK VAR INJECTION */(function(global) {/*!
  715. * The buffer module from node.js, for the browser.
  716. *
  717. * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
  718. * @license MIT
  719. */
  720. /* eslint-disable no-proto */
  721. var base64 = __webpack_require__(/*! base64-js */ "./node_modules/base64-js/index.js");
  722. var ieee754 = __webpack_require__(/*! ieee754 */ "./node_modules/ieee754/index.js");
  723. var isArray = __webpack_require__(/*! isarray */ "./node_modules/isarray/index.js");
  724. exports.Buffer = Buffer;
  725. exports.SlowBuffer = SlowBuffer;
  726. exports.INSPECT_MAX_BYTES = 50;
  727. /**
  728. * If `Buffer.TYPED_ARRAY_SUPPORT`:
  729. * === true Use Uint8Array implementation (fastest)
  730. * === false Use Object implementation (most compatible, even IE6)
  731. *
  732. * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
  733. * Opera 11.6+, iOS 4.2+.
  734. *
  735. * Due to various browser bugs, sometimes the Object implementation will be used even
  736. * when the browser supports typed arrays.
  737. *
  738. * Note:
  739. *
  740. * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
  741. * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
  742. *
  743. * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
  744. *
  745. * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
  746. * incorrect length in some situations.
  747. * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
  748. * get the Object implementation, which is slower but behaves correctly.
  749. */
  750. Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined ? global.TYPED_ARRAY_SUPPORT : typedArraySupport();
  751. /*
  752. * Export kMaxLength after typed array support is determined.
  753. */
  754. exports.kMaxLength = kMaxLength();
  755. function typedArraySupport() {
  756. try {
  757. var arr = new Uint8Array(1);
  758. arr.__proto__ = {
  759. __proto__: Uint8Array.prototype,
  760. foo: function foo() {
  761. return 42;
  762. }
  763. };
  764. return arr.foo() === 42 &&
  765. // typed array instances can be augmented
  766. typeof arr.subarray === 'function' &&
  767. // chrome 9-10 lack `subarray`
  768. arr.subarray(1, 1).byteLength === 0; // ie10 has broken `subarray`
  769. } catch (e) {
  770. return false;
  771. }
  772. }
  773. function kMaxLength() {
  774. return Buffer.TYPED_ARRAY_SUPPORT ? 0x7fffffff : 0x3fffffff;
  775. }
  776. function createBuffer(that, length) {
  777. if (kMaxLength() < length) {
  778. throw new RangeError('Invalid typed array length');
  779. }
  780. if (Buffer.TYPED_ARRAY_SUPPORT) {
  781. // Return an augmented `Uint8Array` instance, for best performance
  782. that = new Uint8Array(length);
  783. that.__proto__ = Buffer.prototype;
  784. } else {
  785. // Fallback: Return an object instance of the Buffer class
  786. if (that === null) {
  787. that = new Buffer(length);
  788. }
  789. that.length = length;
  790. }
  791. return that;
  792. }
  793. /**
  794. * The Buffer constructor returns instances of `Uint8Array` that have their
  795. * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
  796. * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
  797. * and the `Uint8Array` methods. Square bracket notation works as expected -- it
  798. * returns a single octet.
  799. *
  800. * The `Uint8Array` prototype remains unmodified.
  801. */
  802. function Buffer(arg, encodingOrOffset, length) {
  803. if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
  804. return new Buffer(arg, encodingOrOffset, length);
  805. }
  806. // Common case.
  807. if (typeof arg === 'number') {
  808. if (typeof encodingOrOffset === 'string') {
  809. throw new Error('If encoding is specified then the first argument must be a string');
  810. }
  811. return allocUnsafe(this, arg);
  812. }
  813. return from(this, arg, encodingOrOffset, length);
  814. }
  815. Buffer.poolSize = 8192; // not used by this implementation
  816. // TODO: Legacy, not needed anymore. Remove in next major version.
  817. Buffer._augment = function (arr) {
  818. arr.__proto__ = Buffer.prototype;
  819. return arr;
  820. };
  821. function from(that, value, encodingOrOffset, length) {
  822. if (typeof value === 'number') {
  823. throw new TypeError('"value" argument must not be a number');
  824. }
  825. if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
  826. return fromArrayBuffer(that, value, encodingOrOffset, length);
  827. }
  828. if (typeof value === 'string') {
  829. return fromString(that, value, encodingOrOffset);
  830. }
  831. return fromObject(that, value);
  832. }
  833. /**
  834. * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
  835. * if value is a number.
  836. * Buffer.from(str[, encoding])
  837. * Buffer.from(array)
  838. * Buffer.from(buffer)
  839. * Buffer.from(arrayBuffer[, byteOffset[, length]])
  840. **/
  841. Buffer.from = function (value, encodingOrOffset, length) {
  842. return from(null, value, encodingOrOffset, length);
  843. };
  844. if (Buffer.TYPED_ARRAY_SUPPORT) {
  845. Buffer.prototype.__proto__ = Uint8Array.prototype;
  846. Buffer.__proto__ = Uint8Array;
  847. if (typeof Symbol !== 'undefined' && Symbol.species && Buffer[Symbol.species] === Buffer) {
  848. // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
  849. Object.defineProperty(Buffer, Symbol.species, {
  850. value: null,
  851. configurable: true
  852. });
  853. }
  854. }
  855. function assertSize(size) {
  856. if (typeof size !== 'number') {
  857. throw new TypeError('"size" argument must be a number');
  858. } else if (size < 0) {
  859. throw new RangeError('"size" argument must not be negative');
  860. }
  861. }
  862. function alloc(that, size, fill, encoding) {
  863. assertSize(size);
  864. if (size <= 0) {
  865. return createBuffer(that, size);
  866. }
  867. if (fill !== undefined) {
  868. // Only pay attention to encoding if it's a string. This
  869. // prevents accidentally sending in a number that would
  870. // be interpretted as a start offset.
  871. return typeof encoding === 'string' ? createBuffer(that, size).fill(fill, encoding) : createBuffer(that, size).fill(fill);
  872. }
  873. return createBuffer(that, size);
  874. }
  875. /**
  876. * Creates a new filled Buffer instance.
  877. * alloc(size[, fill[, encoding]])
  878. **/
  879. Buffer.alloc = function (size, fill, encoding) {
  880. return alloc(null, size, fill, encoding);
  881. };
  882. function allocUnsafe(that, size) {
  883. assertSize(size);
  884. that = createBuffer(that, size < 0 ? 0 : checked(size) | 0);
  885. if (!Buffer.TYPED_ARRAY_SUPPORT) {
  886. for (var i = 0; i < size; ++i) {
  887. that[i] = 0;
  888. }
  889. }
  890. return that;
  891. }
  892. /**
  893. * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
  894. * */
  895. Buffer.allocUnsafe = function (size) {
  896. return allocUnsafe(null, size);
  897. };
  898. /**
  899. * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
  900. */
  901. Buffer.allocUnsafeSlow = function (size) {
  902. return allocUnsafe(null, size);
  903. };
  904. function fromString(that, string, encoding) {
  905. if (typeof encoding !== 'string' || encoding === '') {
  906. encoding = 'utf8';
  907. }
  908. if (!Buffer.isEncoding(encoding)) {
  909. throw new TypeError('"encoding" must be a valid string encoding');
  910. }
  911. var length = byteLength(string, encoding) | 0;
  912. that = createBuffer(that, length);
  913. var actual = that.write(string, encoding);
  914. if (actual !== length) {
  915. // Writing a hex string, for example, that contains invalid characters will
  916. // cause everything after the first invalid character to be ignored. (e.g.
  917. // 'abxxcd' will be treated as 'ab')
  918. that = that.slice(0, actual);
  919. }
  920. return that;
  921. }
  922. function fromArrayLike(that, array) {
  923. var length = array.length < 0 ? 0 : checked(array.length) | 0;
  924. that = createBuffer(that, length);
  925. for (var i = 0; i < length; i += 1) {
  926. that[i] = array[i] & 255;
  927. }
  928. return that;
  929. }
  930. function fromArrayBuffer(that, array, byteOffset, length) {
  931. array.byteLength; // this throws if `array` is not a valid ArrayBuffer
  932. if (byteOffset < 0 || array.byteLength < byteOffset) {
  933. throw new RangeError('\'offset\' is out of bounds');
  934. }
  935. if (array.byteLength < byteOffset + (length || 0)) {
  936. throw new RangeError('\'length\' is out of bounds');
  937. }
  938. if (byteOffset === undefined && length === undefined) {
  939. array = new Uint8Array(array);
  940. } else if (length === undefined) {
  941. array = new Uint8Array(array, byteOffset);
  942. } else {
  943. array = new Uint8Array(array, byteOffset, length);
  944. }
  945. if (Buffer.TYPED_ARRAY_SUPPORT) {
  946. // Return an augmented `Uint8Array` instance, for best performance
  947. that = array;
  948. that.__proto__ = Buffer.prototype;
  949. } else {
  950. // Fallback: Return an object instance of the Buffer class
  951. that = fromArrayLike(that, array);
  952. }
  953. return that;
  954. }
  955. function fromObject(that, obj) {
  956. if (Buffer.isBuffer(obj)) {
  957. var len = checked(obj.length) | 0;
  958. that = createBuffer(that, len);
  959. if (that.length === 0) {
  960. return that;
  961. }
  962. obj.copy(that, 0, 0, len);
  963. return that;
  964. }
  965. if (obj) {
  966. if (typeof ArrayBuffer !== 'undefined' && obj.buffer instanceof ArrayBuffer || 'length' in obj) {
  967. if (typeof obj.length !== 'number' || isnan(obj.length)) {
  968. return createBuffer(that, 0);
  969. }
  970. return fromArrayLike(that, obj);
  971. }
  972. if (obj.type === 'Buffer' && isArray(obj.data)) {
  973. return fromArrayLike(that, obj.data);
  974. }
  975. }
  976. throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.');
  977. }
  978. function checked(length) {
  979. // Note: cannot use `length < kMaxLength()` here because that fails when
  980. // length is NaN (which is otherwise coerced to zero.)
  981. if (length >= kMaxLength()) {
  982. throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + kMaxLength().toString(16) + ' bytes');
  983. }
  984. return length | 0;
  985. }
  986. function SlowBuffer(length) {
  987. if (+length != length) {
  988. // eslint-disable-line eqeqeq
  989. length = 0;
  990. }
  991. return Buffer.alloc(+length);
  992. }
  993. Buffer.isBuffer = function isBuffer(b) {
  994. return !!(b != null && b._isBuffer);
  995. };
  996. Buffer.compare = function compare(a, b) {
  997. if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
  998. throw new TypeError('Arguments must be Buffers');
  999. }
  1000. if (a === b) return 0;
  1001. var x = a.length;
  1002. var y = b.length;
  1003. for (var i = 0, len = Math.min(x, y); i < len; ++i) {
  1004. if (a[i] !== b[i]) {
  1005. x = a[i];
  1006. y = b[i];
  1007. break;
  1008. }
  1009. }
  1010. if (x < y) return -1;
  1011. if (y < x) return 1;
  1012. return 0;
  1013. };
  1014. Buffer.isEncoding = function isEncoding(encoding) {
  1015. switch (String(encoding).toLowerCase()) {
  1016. case 'hex':
  1017. case 'utf8':
  1018. case 'utf-8':
  1019. case 'ascii':
  1020. case 'latin1':
  1021. case 'binary':
  1022. case 'base64':
  1023. case 'ucs2':
  1024. case 'ucs-2':
  1025. case 'utf16le':
  1026. case 'utf-16le':
  1027. return true;
  1028. default:
  1029. return false;
  1030. }
  1031. };
  1032. Buffer.concat = function concat(list, length) {
  1033. if (!isArray(list)) {
  1034. throw new TypeError('"list" argument must be an Array of Buffers');
  1035. }
  1036. if (list.length === 0) {
  1037. return Buffer.alloc(0);
  1038. }
  1039. var i;
  1040. if (length === undefined) {
  1041. length = 0;
  1042. for (i = 0; i < list.length; ++i) {
  1043. length += list[i].length;
  1044. }
  1045. }
  1046. var buffer = Buffer.allocUnsafe(length);
  1047. var pos = 0;
  1048. for (i = 0; i < list.length; ++i) {
  1049. var buf = list[i];
  1050. if (!Buffer.isBuffer(buf)) {
  1051. throw new TypeError('"list" argument must be an Array of Buffers');
  1052. }
  1053. buf.copy(buffer, pos);
  1054. pos += buf.length;
  1055. }
  1056. return buffer;
  1057. };
  1058. function byteLength(string, encoding) {
  1059. if (Buffer.isBuffer(string)) {
  1060. return string.length;
  1061. }
  1062. if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
  1063. return string.byteLength;
  1064. }
  1065. if (typeof string !== 'string') {
  1066. string = '' + string;
  1067. }
  1068. var len = string.length;
  1069. if (len === 0) return 0;
  1070. // Use a for loop to avoid recursion
  1071. var loweredCase = false;
  1072. for (;;) {
  1073. switch (encoding) {
  1074. case 'ascii':
  1075. case 'latin1':
  1076. case 'binary':
  1077. return len;
  1078. case 'utf8':
  1079. case 'utf-8':
  1080. case undefined:
  1081. return utf8ToBytes(string).length;
  1082. case 'ucs2':
  1083. case 'ucs-2':
  1084. case 'utf16le':
  1085. case 'utf-16le':
  1086. return len * 2;
  1087. case 'hex':
  1088. return len >>> 1;
  1089. case 'base64':
  1090. return base64ToBytes(string).length;
  1091. default:
  1092. if (loweredCase) return utf8ToBytes(string).length; // assume utf8
  1093. encoding = ('' + encoding).toLowerCase();
  1094. loweredCase = true;
  1095. }
  1096. }
  1097. }
  1098. Buffer.byteLength = byteLength;
  1099. function slowToString(encoding, start, end) {
  1100. var loweredCase = false;
  1101. // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
  1102. // property of a typed array.
  1103. // This behaves neither like String nor Uint8Array in that we set start/end
  1104. // to their upper/lower bounds if the value passed is out of range.
  1105. // undefined is handled specially as per ECMA-262 6th Edition,
  1106. // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
  1107. if (start === undefined || start < 0) {
  1108. start = 0;
  1109. }
  1110. // Return early if start > this.length. Done here to prevent potential uint32
  1111. // coercion fail below.
  1112. if (start > this.length) {
  1113. return '';
  1114. }
  1115. if (end === undefined || end > this.length) {
  1116. end = this.length;
  1117. }
  1118. if (end <= 0) {
  1119. return '';
  1120. }
  1121. // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
  1122. end >>>= 0;
  1123. start >>>= 0;
  1124. if (end <= start) {
  1125. return '';
  1126. }
  1127. if (!encoding) encoding = 'utf8';
  1128. while (true) {
  1129. switch (encoding) {
  1130. case 'hex':
  1131. return hexSlice(this, start, end);
  1132. case 'utf8':
  1133. case 'utf-8':
  1134. return utf8Slice(this, start, end);
  1135. case 'ascii':
  1136. return asciiSlice(this, start, end);
  1137. case 'latin1':
  1138. case 'binary':
  1139. return latin1Slice(this, start, end);
  1140. case 'base64':
  1141. return base64Slice(this, start, end);
  1142. case 'ucs2':
  1143. case 'ucs-2':
  1144. case 'utf16le':
  1145. case 'utf-16le':
  1146. return utf16leSlice(this, start, end);
  1147. default:
  1148. if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
  1149. encoding = (encoding + '').toLowerCase();
  1150. loweredCase = true;
  1151. }
  1152. }
  1153. }
  1154. // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
  1155. // Buffer instances.
  1156. Buffer.prototype._isBuffer = true;
  1157. function swap(b, n, m) {
  1158. var i = b[n];
  1159. b[n] = b[m];
  1160. b[m] = i;
  1161. }
  1162. Buffer.prototype.swap16 = function swap16() {
  1163. var len = this.length;
  1164. if (len % 2 !== 0) {
  1165. throw new RangeError('Buffer size must be a multiple of 16-bits');
  1166. }
  1167. for (var i = 0; i < len; i += 2) {
  1168. swap(this, i, i + 1);
  1169. }
  1170. return this;
  1171. };
  1172. Buffer.prototype.swap32 = function swap32() {
  1173. var len = this.length;
  1174. if (len % 4 !== 0) {
  1175. throw new RangeError('Buffer size must be a multiple of 32-bits');
  1176. }
  1177. for (var i = 0; i < len; i += 4) {
  1178. swap(this, i, i + 3);
  1179. swap(this, i + 1, i + 2);
  1180. }
  1181. return this;
  1182. };
  1183. Buffer.prototype.swap64 = function swap64() {
  1184. var len = this.length;
  1185. if (len % 8 !== 0) {
  1186. throw new RangeError('Buffer size must be a multiple of 64-bits');
  1187. }
  1188. for (var i = 0; i < len; i += 8) {
  1189. swap(this, i, i + 7);
  1190. swap(this, i + 1, i + 6);
  1191. swap(this, i + 2, i + 5);
  1192. swap(this, i + 3, i + 4);
  1193. }
  1194. return this;
  1195. };
  1196. Buffer.prototype.toString = function toString() {
  1197. var length = this.length | 0;
  1198. if (length === 0) return '';
  1199. if (arguments.length === 0) return utf8Slice(this, 0, length);
  1200. return slowToString.apply(this, arguments);
  1201. };
  1202. Buffer.prototype.equals = function equals(b) {
  1203. if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer');
  1204. if (this === b) return true;
  1205. return Buffer.compare(this, b) === 0;
  1206. };
  1207. Buffer.prototype.inspect = function inspect() {
  1208. var str = '';
  1209. var max = exports.INSPECT_MAX_BYTES;
  1210. if (this.length > 0) {
  1211. str = this.toString('hex', 0, max).match(/.{2}/g).join(' ');
  1212. if (this.length > max) str += ' ... ';
  1213. }
  1214. return '<Buffer ' + str + '>';
  1215. };
  1216. Buffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {
  1217. if (!Buffer.isBuffer(target)) {
  1218. throw new TypeError('Argument must be a Buffer');
  1219. }
  1220. if (start === undefined) {
  1221. start = 0;
  1222. }
  1223. if (end === undefined) {
  1224. end = target ? target.length : 0;
  1225. }
  1226. if (thisStart === undefined) {
  1227. thisStart = 0;
  1228. }
  1229. if (thisEnd === undefined) {
  1230. thisEnd = this.length;
  1231. }
  1232. if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
  1233. throw new RangeError('out of range index');
  1234. }
  1235. if (thisStart >= thisEnd && start >= end) {
  1236. return 0;
  1237. }
  1238. if (thisStart >= thisEnd) {
  1239. return -1;
  1240. }
  1241. if (start >= end) {
  1242. return 1;
  1243. }
  1244. start >>>= 0;
  1245. end >>>= 0;
  1246. thisStart >>>= 0;
  1247. thisEnd >>>= 0;
  1248. if (this === target) return 0;
  1249. var x = thisEnd - thisStart;
  1250. var y = end - start;
  1251. var len = Math.min(x, y);
  1252. var thisCopy = this.slice(thisStart, thisEnd);
  1253. var targetCopy = target.slice(start, end);
  1254. for (var i = 0; i < len; ++i) {
  1255. if (thisCopy[i] !== targetCopy[i]) {
  1256. x = thisCopy[i];
  1257. y = targetCopy[i];
  1258. break;
  1259. }
  1260. }
  1261. if (x < y) return -1;
  1262. if (y < x) return 1;
  1263. return 0;
  1264. };
  1265. // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
  1266. // OR the last index of `val` in `buffer` at offset <= `byteOffset`.
  1267. //
  1268. // Arguments:
  1269. // - buffer - a Buffer to search
  1270. // - val - a string, Buffer, or number
  1271. // - byteOffset - an index into `buffer`; will be clamped to an int32
  1272. // - encoding - an optional encoding, relevant is val is a string
  1273. // - dir - true for indexOf, false for lastIndexOf
  1274. function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {
  1275. // Empty buffer means no match
  1276. if (buffer.length === 0) return -1;
  1277. // Normalize byteOffset
  1278. if (typeof byteOffset === 'string') {
  1279. encoding = byteOffset;
  1280. byteOffset = 0;
  1281. } else if (byteOffset > 0x7fffffff) {
  1282. byteOffset = 0x7fffffff;
  1283. } else if (byteOffset < -0x80000000) {
  1284. byteOffset = -0x80000000;
  1285. }
  1286. byteOffset = +byteOffset; // Coerce to Number.
  1287. if (isNaN(byteOffset)) {
  1288. // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
  1289. byteOffset = dir ? 0 : buffer.length - 1;
  1290. }
  1291. // Normalize byteOffset: negative offsets start from the end of the buffer
  1292. if (byteOffset < 0) byteOffset = buffer.length + byteOffset;
  1293. if (byteOffset >= buffer.length) {
  1294. if (dir) return -1;else byteOffset = buffer.length - 1;
  1295. } else if (byteOffset < 0) {
  1296. if (dir) byteOffset = 0;else return -1;
  1297. }
  1298. // Normalize val
  1299. if (typeof val === 'string') {
  1300. val = Buffer.from(val, encoding);
  1301. }
  1302. // Finally, search either indexOf (if dir is true) or lastIndexOf
  1303. if (Buffer.isBuffer(val)) {
  1304. // Special case: looking for empty string/buffer always fails
  1305. if (val.length === 0) {
  1306. return -1;
  1307. }
  1308. return arrayIndexOf(buffer, val, byteOffset, encoding, dir);
  1309. } else if (typeof val === 'number') {
  1310. val = val & 0xFF; // Search for a byte value [0-255]
  1311. if (Buffer.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') {
  1312. if (dir) {
  1313. return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);
  1314. } else {
  1315. return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);
  1316. }
  1317. }
  1318. return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);
  1319. }
  1320. throw new TypeError('val must be string, number or Buffer');
  1321. }
  1322. function arrayIndexOf(arr, val, byteOffset, encoding, dir) {
  1323. var indexSize = 1;
  1324. var arrLength = arr.length;
  1325. var valLength = val.length;
  1326. if (encoding !== undefined) {
  1327. encoding = String(encoding).toLowerCase();
  1328. if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') {
  1329. if (arr.length < 2 || val.length < 2) {
  1330. return -1;
  1331. }
  1332. indexSize = 2;
  1333. arrLength /= 2;
  1334. valLength /= 2;
  1335. byteOffset /= 2;
  1336. }
  1337. }
  1338. function read(buf, i) {
  1339. if (indexSize === 1) {
  1340. return buf[i];
  1341. } else {
  1342. return buf.readUInt16BE(i * indexSize);
  1343. }
  1344. }
  1345. var i;
  1346. if (dir) {
  1347. var foundIndex = -1;
  1348. for (i = byteOffset; i < arrLength; i++) {
  1349. if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
  1350. if (foundIndex === -1) foundIndex = i;
  1351. if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;
  1352. } else {
  1353. if (foundIndex !== -1) i -= i - foundIndex;
  1354. foundIndex = -1;
  1355. }
  1356. }
  1357. } else {
  1358. if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;
  1359. for (i = byteOffset; i >= 0; i--) {
  1360. var found = true;
  1361. for (var j = 0; j < valLength; j++) {
  1362. if (read(arr, i + j) !== read(val, j)) {
  1363. found = false;
  1364. break;
  1365. }
  1366. }
  1367. if (found) return i;
  1368. }
  1369. }
  1370. return -1;
  1371. }
  1372. Buffer.prototype.includes = function includes(val, byteOffset, encoding) {
  1373. return this.indexOf(val, byteOffset, encoding) !== -1;
  1374. };
  1375. Buffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) {
  1376. return bidirectionalIndexOf(this, val, byteOffset, encoding, true);
  1377. };
  1378. Buffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {
  1379. return bidirectionalIndexOf(this, val, byteOffset, encoding, false);
  1380. };
  1381. function hexWrite(buf, string, offset, length) {
  1382. offset = Number(offset) || 0;
  1383. var remaining = buf.length - offset;
  1384. if (!length) {
  1385. length = remaining;
  1386. } else {
  1387. length = Number(length);
  1388. if (length > remaining) {
  1389. length = remaining;
  1390. }
  1391. }
  1392. // must be an even number of digits
  1393. var strLen = string.length;
  1394. if (strLen % 2 !== 0) throw new TypeError('Invalid hex string');
  1395. if (length > strLen / 2) {
  1396. length = strLen / 2;
  1397. }
  1398. for (var i = 0; i < length; ++i) {
  1399. var parsed = parseInt(string.substr(i * 2, 2), 16);
  1400. if (isNaN(parsed)) return i;
  1401. buf[offset + i] = parsed;
  1402. }
  1403. return i;
  1404. }
  1405. function utf8Write(buf, string, offset, length) {
  1406. return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);
  1407. }
  1408. function asciiWrite(buf, string, offset, length) {
  1409. return blitBuffer(asciiToBytes(string), buf, offset, length);
  1410. }
  1411. function latin1Write(buf, string, offset, length) {
  1412. return asciiWrite(buf, string, offset, length);
  1413. }
  1414. function base64Write(buf, string, offset, length) {
  1415. return blitBuffer(base64ToBytes(string), buf, offset, length);
  1416. }
  1417. function ucs2Write(buf, string, offset, length) {
  1418. return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);
  1419. }
  1420. Buffer.prototype.write = function write(string, offset, length, encoding) {
  1421. // Buffer#write(string)
  1422. if (offset === undefined) {
  1423. encoding = 'utf8';
  1424. length = this.length;
  1425. offset = 0;
  1426. // Buffer#write(string, encoding)
  1427. } else if (length === undefined && typeof offset === 'string') {
  1428. encoding = offset;
  1429. length = this.length;
  1430. offset = 0;
  1431. // Buffer#write(string, offset[, length][, encoding])
  1432. } else if (isFinite(offset)) {
  1433. offset = offset | 0;
  1434. if (isFinite(length)) {
  1435. length = length | 0;
  1436. if (encoding === undefined) encoding = 'utf8';
  1437. } else {
  1438. encoding = length;
  1439. length = undefined;
  1440. }
  1441. // legacy write(string, encoding, offset, length) - remove in v0.13
  1442. } else {
  1443. throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported');
  1444. }
  1445. var remaining = this.length - offset;
  1446. if (length === undefined || length > remaining) length = remaining;
  1447. if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {
  1448. throw new RangeError('Attempt to write outside buffer bounds');
  1449. }
  1450. if (!encoding) encoding = 'utf8';
  1451. var loweredCase = false;
  1452. for (;;) {
  1453. switch (encoding) {
  1454. case 'hex':
  1455. return hexWrite(this, string, offset, length);
  1456. case 'utf8':
  1457. case 'utf-8':
  1458. return utf8Write(this, string, offset, length);
  1459. case 'ascii':
  1460. return asciiWrite(this, string, offset, length);
  1461. case 'latin1':
  1462. case 'binary':
  1463. return latin1Write(this, string, offset, length);
  1464. case 'base64':
  1465. // Warning: maxLength not taken into account in base64Write
  1466. return base64Write(this, string, offset, length);
  1467. case 'ucs2':
  1468. case 'ucs-2':
  1469. case 'utf16le':
  1470. case 'utf-16le':
  1471. return ucs2Write(this, string, offset, length);
  1472. default:
  1473. if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
  1474. encoding = ('' + encoding).toLowerCase();
  1475. loweredCase = true;
  1476. }
  1477. }
  1478. };
  1479. Buffer.prototype.toJSON = function toJSON() {
  1480. return {
  1481. type: 'Buffer',
  1482. data: Array.prototype.slice.call(this._arr || this, 0)
  1483. };
  1484. };
  1485. function base64Slice(buf, start, end) {
  1486. if (start === 0 && end === buf.length) {
  1487. return base64.fromByteArray(buf);
  1488. } else {
  1489. return base64.fromByteArray(buf.slice(start, end));
  1490. }
  1491. }
  1492. function utf8Slice(buf, start, end) {
  1493. end = Math.min(buf.length, end);
  1494. var res = [];
  1495. var i = start;
  1496. while (i < end) {
  1497. var firstByte = buf[i];
  1498. var codePoint = null;
  1499. var bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1;
  1500. if (i + bytesPerSequence <= end) {
  1501. var secondByte, thirdByte, fourthByte, tempCodePoint;
  1502. switch (bytesPerSequence) {
  1503. case 1:
  1504. if (firstByte < 0x80) {
  1505. codePoint = firstByte;
  1506. }
  1507. break;
  1508. case 2:
  1509. secondByte = buf[i + 1];
  1510. if ((secondByte & 0xC0) === 0x80) {
  1511. tempCodePoint = (firstByte & 0x1F) << 0x6 | secondByte & 0x3F;
  1512. if (tempCodePoint > 0x7F) {
  1513. codePoint = tempCodePoint;
  1514. }
  1515. }
  1516. break;
  1517. case 3:
  1518. secondByte = buf[i + 1];
  1519. thirdByte = buf[i + 2];
  1520. if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
  1521. tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | thirdByte & 0x3F;
  1522. if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
  1523. codePoint = tempCodePoint;
  1524. }
  1525. }
  1526. break;
  1527. case 4:
  1528. secondByte = buf[i + 1];
  1529. thirdByte = buf[i + 2];
  1530. fourthByte = buf[i + 3];
  1531. if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
  1532. tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | fourthByte & 0x3F;
  1533. if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
  1534. codePoint = tempCodePoint;
  1535. }
  1536. }
  1537. }
  1538. }
  1539. if (codePoint === null) {
  1540. // we did not generate a valid codePoint so insert a
  1541. // replacement char (U+FFFD) and advance only 1 byte
  1542. codePoint = 0xFFFD;
  1543. bytesPerSequence = 1;
  1544. } else if (codePoint > 0xFFFF) {
  1545. // encode to utf16 (surrogate pair dance)
  1546. codePoint -= 0x10000;
  1547. res.push(codePoint >>> 10 & 0x3FF | 0xD800);
  1548. codePoint = 0xDC00 | codePoint & 0x3FF;
  1549. }
  1550. res.push(codePoint);
  1551. i += bytesPerSequence;
  1552. }
  1553. return decodeCodePointsArray(res);
  1554. }
  1555. // Based on http://stackoverflow.com/a/22747272/680742, the browser with
  1556. // the lowest limit is Chrome, with 0x10000 args.
  1557. // We go 1 magnitude less, for safety
  1558. var MAX_ARGUMENTS_LENGTH = 0x1000;
  1559. function decodeCodePointsArray(codePoints) {
  1560. var len = codePoints.length;
  1561. if (len <= MAX_ARGUMENTS_LENGTH) {
  1562. return String.fromCharCode.apply(String, codePoints); // avoid extra slice()
  1563. }
  1564. // Decode in chunks to avoid "call stack size exceeded".
  1565. var res = '';
  1566. var i = 0;
  1567. while (i < len) {
  1568. res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH));
  1569. }
  1570. return res;
  1571. }
  1572. function asciiSlice(buf, start, end) {
  1573. var ret = '';
  1574. end = Math.min(buf.length, end);
  1575. for (var i = start; i < end; ++i) {
  1576. ret += String.fromCharCode(buf[i] & 0x7F);
  1577. }
  1578. return ret;
  1579. }
  1580. function latin1Slice(buf, start, end) {
  1581. var ret = '';
  1582. end = Math.min(buf.length, end);
  1583. for (var i = start; i < end; ++i) {
  1584. ret += String.fromCharCode(buf[i]);
  1585. }
  1586. return ret;
  1587. }
  1588. function hexSlice(buf, start, end) {
  1589. var len = buf.length;
  1590. if (!start || start < 0) start = 0;
  1591. if (!end || end < 0 || end > len) end = len;
  1592. var out = '';
  1593. for (var i = start; i < end; ++i) {
  1594. out += toHex(buf[i]);
  1595. }
  1596. return out;
  1597. }
  1598. function utf16leSlice(buf, start, end) {
  1599. var bytes = buf.slice(start, end);
  1600. var res = '';
  1601. for (var i = 0; i < bytes.length; i += 2) {
  1602. res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);
  1603. }
  1604. return res;
  1605. }
  1606. Buffer.prototype.slice = function slice(start, end) {
  1607. var len = this.length;
  1608. start = ~~start;
  1609. end = end === undefined ? len : ~~end;
  1610. if (start < 0) {
  1611. start += len;
  1612. if (start < 0) start = 0;
  1613. } else if (start > len) {
  1614. start = len;
  1615. }
  1616. if (end < 0) {
  1617. end += len;
  1618. if (end < 0) end = 0;
  1619. } else if (end > len) {
  1620. end = len;
  1621. }
  1622. if (end < start) end = start;
  1623. var newBuf;
  1624. if (Buffer.TYPED_ARRAY_SUPPORT) {
  1625. newBuf = this.subarray(start, end);
  1626. newBuf.__proto__ = Buffer.prototype;
  1627. } else {
  1628. var sliceLen = end - start;
  1629. newBuf = new Buffer(sliceLen, undefined);
  1630. for (var i = 0; i < sliceLen; ++i) {
  1631. newBuf[i] = this[i + start];
  1632. }
  1633. }
  1634. return newBuf;
  1635. };
  1636. /*
  1637. * Need to make sure that buffer isn't trying to write out of bounds.
  1638. */
  1639. function checkOffset(offset, ext, length) {
  1640. if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint');
  1641. if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length');
  1642. }
  1643. Buffer.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) {
  1644. offset = offset | 0;
  1645. byteLength = byteLength | 0;
  1646. if (!noAssert) checkOffset(offset, byteLength, this.length);
  1647. var val = this[offset];
  1648. var mul = 1;
  1649. var i = 0;
  1650. while (++i < byteLength && (mul *= 0x100)) {
  1651. val += this[offset + i] * mul;
  1652. }
  1653. return val;
  1654. };
  1655. Buffer.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) {
  1656. offset = offset | 0;
  1657. byteLength = byteLength | 0;
  1658. if (!noAssert) {
  1659. checkOffset(offset, byteLength, this.length);
  1660. }
  1661. var val = this[offset + --byteLength];
  1662. var mul = 1;
  1663. while (byteLength > 0 && (mul *= 0x100)) {
  1664. val += this[offset + --byteLength] * mul;
  1665. }
  1666. return val;
  1667. };
  1668. Buffer.prototype.readUInt8 = function readUInt8(offset, noAssert) {
  1669. if (!noAssert) checkOffset(offset, 1, this.length);
  1670. return this[offset];
  1671. };
  1672. Buffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {
  1673. if (!noAssert) checkOffset(offset, 2, this.length);
  1674. return this[offset] | this[offset + 1] << 8;
  1675. };
  1676. Buffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {
  1677. if (!noAssert) checkOffset(offset, 2, this.length);
  1678. return this[offset] << 8 | this[offset + 1];
  1679. };
  1680. Buffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {
  1681. if (!noAssert) checkOffset(offset, 4, this.length);
  1682. return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 0x1000000;
  1683. };
  1684. Buffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {
  1685. if (!noAssert) checkOffset(offset, 4, this.length);
  1686. return this[offset] * 0x1000000 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);
  1687. };
  1688. Buffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) {
  1689. offset = offset | 0;
  1690. byteLength = byteLength | 0;
  1691. if (!noAssert) checkOffset(offset, byteLength, this.length);
  1692. var val = this[offset];
  1693. var mul = 1;
  1694. var i = 0;
  1695. while (++i < byteLength && (mul *= 0x100)) {
  1696. val += this[offset + i] * mul;
  1697. }
  1698. mul *= 0x80;
  1699. if (val >= mul) val -= Math.pow(2, 8 * byteLength);
  1700. return val;
  1701. };
  1702. Buffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) {
  1703. offset = offset | 0;
  1704. byteLength = byteLength | 0;
  1705. if (!noAssert) checkOffset(offset, byteLength, this.length);
  1706. var i = byteLength;
  1707. var mul = 1;
  1708. var val = this[offset + --i];
  1709. while (i > 0 && (mul *= 0x100)) {
  1710. val += this[offset + --i] * mul;
  1711. }
  1712. mul *= 0x80;
  1713. if (val >= mul) val -= Math.pow(2, 8 * byteLength);
  1714. return val;
  1715. };
  1716. Buffer.prototype.readInt8 = function readInt8(offset, noAssert) {
  1717. if (!noAssert) checkOffset(offset, 1, this.length);
  1718. if (!(this[offset] & 0x80)) return this[offset];
  1719. return (0xff - this[offset] + 1) * -1;
  1720. };
  1721. Buffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) {
  1722. if (!noAssert) checkOffset(offset, 2, this.length);
  1723. var val = this[offset] | this[offset + 1] << 8;
  1724. return val & 0x8000 ? val | 0xFFFF0000 : val;
  1725. };
  1726. Buffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) {
  1727. if (!noAssert) checkOffset(offset, 2, this.length);
  1728. var val = this[offset + 1] | this[offset] << 8;
  1729. return val & 0x8000 ? val | 0xFFFF0000 : val;
  1730. };
  1731. Buffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) {
  1732. if (!noAssert) checkOffset(offset, 4, this.length);
  1733. return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;
  1734. };
  1735. Buffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) {
  1736. if (!noAssert) checkOffset(offset, 4, this.length);
  1737. return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];
  1738. };
  1739. Buffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) {
  1740. if (!noAssert) checkOffset(offset, 4, this.length);
  1741. return ieee754.read(this, offset, true, 23, 4);
  1742. };
  1743. Buffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) {
  1744. if (!noAssert) checkOffset(offset, 4, this.length);
  1745. return ieee754.read(this, offset, false, 23, 4);
  1746. };
  1747. Buffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {
  1748. if (!noAssert) checkOffset(offset, 8, this.length);
  1749. return ieee754.read(this, offset, true, 52, 8);
  1750. };
  1751. Buffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {
  1752. if (!noAssert) checkOffset(offset, 8, this.length);
  1753. return ieee754.read(this, offset, false, 52, 8);
  1754. };
  1755. function checkInt(buf, value, offset, ext, max, min) {
  1756. if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance');
  1757. if (value > max || value < min) throw new RangeError('"value" argument is out of bounds');
  1758. if (offset + ext > buf.length) throw new RangeError('Index out of range');
  1759. }
  1760. Buffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) {
  1761. value = +value;
  1762. offset = offset | 0;
  1763. byteLength = byteLength | 0;
  1764. if (!noAssert) {
  1765. var maxBytes = Math.pow(2, 8 * byteLength) - 1;
  1766. checkInt(this, value, offset, byteLength, maxBytes, 0);
  1767. }
  1768. var mul = 1;
  1769. var i = 0;
  1770. this[offset] = value & 0xFF;
  1771. while (++i < byteLength && (mul *= 0x100)) {
  1772. this[offset + i] = value / mul & 0xFF;
  1773. }
  1774. return offset + byteLength;
  1775. };
  1776. Buffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) {
  1777. value = +value;
  1778. offset = offset | 0;
  1779. byteLength = byteLength | 0;
  1780. if (!noAssert) {
  1781. var maxBytes = Math.pow(2, 8 * byteLength) - 1;
  1782. checkInt(this, value, offset, byteLength, maxBytes, 0);
  1783. }
  1784. var i = byteLength - 1;
  1785. var mul = 1;
  1786. this[offset + i] = value & 0xFF;
  1787. while (--i >= 0 && (mul *= 0x100)) {
  1788. this[offset + i] = value / mul & 0xFF;
  1789. }
  1790. return offset + byteLength;
  1791. };
  1792. Buffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {
  1793. value = +value;
  1794. offset = offset | 0;
  1795. if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);
  1796. if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);
  1797. this[offset] = value & 0xff;
  1798. return offset + 1;
  1799. };
  1800. function objectWriteUInt16(buf, value, offset, littleEndian) {
  1801. if (value < 0) value = 0xffff + value + 1;
  1802. for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
  1803. buf[offset + i] = (value & 0xff << 8 * (littleEndian ? i : 1 - i)) >>> (littleEndian ? i : 1 - i) * 8;
  1804. }
  1805. }
  1806. Buffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {
  1807. value = +value;
  1808. offset = offset | 0;
  1809. if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
  1810. if (Buffer.TYPED_ARRAY_SUPPORT) {
  1811. this[offset] = value & 0xff;
  1812. this[offset + 1] = value >>> 8;
  1813. } else {
  1814. objectWriteUInt16(this, value, offset, true);
  1815. }
  1816. return offset + 2;
  1817. };
  1818. Buffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {
  1819. value = +value;
  1820. offset = offset | 0;
  1821. if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
  1822. if (Buffer.TYPED_ARRAY_SUPPORT) {
  1823. this[offset] = value >>> 8;
  1824. this[offset + 1] = value & 0xff;
  1825. } else {
  1826. objectWriteUInt16(this, value, offset, false);
  1827. }
  1828. return offset + 2;
  1829. };
  1830. function objectWriteUInt32(buf, value, offset, littleEndian) {
  1831. if (value < 0) value = 0xffffffff + value + 1;
  1832. for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
  1833. buf[offset + i] = value >>> (littleEndian ? i : 3 - i) * 8 & 0xff;
  1834. }
  1835. }
  1836. Buffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {
  1837. value = +value;
  1838. offset = offset | 0;
  1839. if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
  1840. if (Buffer.TYPED_ARRAY_SUPPORT) {
  1841. this[offset + 3] = value >>> 24;
  1842. this[offset + 2] = value >>> 16;
  1843. this[offset + 1] = value >>> 8;
  1844. this[offset] = value & 0xff;
  1845. } else {
  1846. objectWriteUInt32(this, value, offset, true);
  1847. }
  1848. return offset + 4;
  1849. };
  1850. Buffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {
  1851. value = +value;
  1852. offset = offset | 0;
  1853. if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
  1854. if (Buffer.TYPED_ARRAY_SUPPORT) {
  1855. this[offset] = value >>> 24;
  1856. this[offset + 1] = value >>> 16;
  1857. this[offset + 2] = value >>> 8;
  1858. this[offset + 3] = value & 0xff;
  1859. } else {
  1860. objectWriteUInt32(this, value, offset, false);
  1861. }
  1862. return offset + 4;
  1863. };
  1864. Buffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) {
  1865. value = +value;
  1866. offset = offset | 0;
  1867. if (!noAssert) {
  1868. var limit = Math.pow(2, 8 * byteLength - 1);
  1869. checkInt(this, value, offset, byteLength, limit - 1, -limit);
  1870. }
  1871. var i = 0;
  1872. var mul = 1;
  1873. var sub = 0;
  1874. this[offset] = value & 0xFF;
  1875. while (++i < byteLength && (mul *= 0x100)) {
  1876. if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
  1877. sub = 1;
  1878. }
  1879. this[offset + i] = (value / mul >> 0) - sub & 0xFF;
  1880. }
  1881. return offset + byteLength;
  1882. };
  1883. Buffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) {
  1884. value = +value;
  1885. offset = offset | 0;
  1886. if (!noAssert) {
  1887. var limit = Math.pow(2, 8 * byteLength - 1);
  1888. checkInt(this, value, offset, byteLength, limit - 1, -limit);
  1889. }
  1890. var i = byteLength - 1;
  1891. var mul = 1;
  1892. var sub = 0;
  1893. this[offset + i] = value & 0xFF;
  1894. while (--i >= 0 && (mul *= 0x100)) {
  1895. if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
  1896. sub = 1;
  1897. }
  1898. this[offset + i] = (value / mul >> 0) - sub & 0xFF;
  1899. }
  1900. return offset + byteLength;
  1901. };
  1902. Buffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {
  1903. value = +value;
  1904. offset = offset | 0;
  1905. if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);
  1906. if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);
  1907. if (value < 0) value = 0xff + value + 1;
  1908. this[offset] = value & 0xff;
  1909. return offset + 1;
  1910. };
  1911. Buffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {
  1912. value = +value;
  1913. offset = offset | 0;
  1914. if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
  1915. if (Buffer.TYPED_ARRAY_SUPPORT) {
  1916. this[offset] = value & 0xff;
  1917. this[offset + 1] = value >>> 8;
  1918. } else {
  1919. objectWriteUInt16(this, value, offset, true);
  1920. }
  1921. return offset + 2;
  1922. };
  1923. Buffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {
  1924. value = +value;
  1925. offset = offset | 0;
  1926. if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
  1927. if (Buffer.TYPED_ARRAY_SUPPORT) {
  1928. this[offset] = value >>> 8;
  1929. this[offset + 1] = value & 0xff;
  1930. } else {
  1931. objectWriteUInt16(this, value, offset, false);
  1932. }
  1933. return offset + 2;
  1934. };
  1935. Buffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {
  1936. value = +value;
  1937. offset = offset | 0;
  1938. if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
  1939. if (Buffer.TYPED_ARRAY_SUPPORT) {
  1940. this[offset] = value & 0xff;
  1941. this[offset + 1] = value >>> 8;
  1942. this[offset + 2] = value >>> 16;
  1943. this[offset + 3] = value >>> 24;
  1944. } else {
  1945. objectWriteUInt32(this, value, offset, true);
  1946. }
  1947. return offset + 4;
  1948. };
  1949. Buffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {
  1950. value = +value;
  1951. offset = offset | 0;
  1952. if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
  1953. if (value < 0) value = 0xffffffff + value + 1;
  1954. if (Buffer.TYPED_ARRAY_SUPPORT) {
  1955. this[offset] = value >>> 24;
  1956. this[offset + 1] = value >>> 16;
  1957. this[offset + 2] = value >>> 8;
  1958. this[offset + 3] = value & 0xff;
  1959. } else {
  1960. objectWriteUInt32(this, value, offset, false);
  1961. }
  1962. return offset + 4;
  1963. };
  1964. function checkIEEE754(buf, value, offset, ext, max, min) {
  1965. if (offset + ext > buf.length) throw new RangeError('Index out of range');
  1966. if (offset < 0) throw new RangeError('Index out of range');
  1967. }
  1968. function writeFloat(buf, value, offset, littleEndian, noAssert) {
  1969. if (!noAssert) {
  1970. checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38);
  1971. }
  1972. ieee754.write(buf, value, offset, littleEndian, 23, 4);
  1973. return offset + 4;
  1974. }
  1975. Buffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {
  1976. return writeFloat(this, value, offset, true, noAssert);
  1977. };
  1978. Buffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {
  1979. return writeFloat(this, value, offset, false, noAssert);
  1980. };
  1981. function writeDouble(buf, value, offset, littleEndian, noAssert) {
  1982. if (!noAssert) {
  1983. checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308);
  1984. }
  1985. ieee754.write(buf, value, offset, littleEndian, 52, 8);
  1986. return offset + 8;
  1987. }
  1988. Buffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {
  1989. return writeDouble(this, value, offset, true, noAssert);
  1990. };
  1991. Buffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {
  1992. return writeDouble(this, value, offset, false, noAssert);
  1993. };
  1994. // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
  1995. Buffer.prototype.copy = function copy(target, targetStart, start, end) {
  1996. if (!start) start = 0;
  1997. if (!end && end !== 0) end = this.length;
  1998. if (targetStart >= target.length) targetStart = target.length;
  1999. if (!targetStart) targetStart = 0;
  2000. if (end > 0 && end < start) end = start;
  2001. // Copy 0 bytes; we're done
  2002. if (end === start) return 0;
  2003. if (target.length === 0 || this.length === 0) return 0;
  2004. // Fatal error conditions
  2005. if (targetStart < 0) {
  2006. throw new RangeError('targetStart out of bounds');
  2007. }
  2008. if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds');
  2009. if (end < 0) throw new RangeError('sourceEnd out of bounds');
  2010. // Are we oob?
  2011. if (end > this.length) end = this.length;
  2012. if (target.length - targetStart < end - start) {
  2013. end = target.length - targetStart + start;
  2014. }
  2015. var len = end - start;
  2016. var i;
  2017. if (this === target && start < targetStart && targetStart < end) {
  2018. // descending copy from end
  2019. for (i = len - 1; i >= 0; --i) {
  2020. target[i + targetStart] = this[i + start];
  2021. }
  2022. } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
  2023. // ascending copy from start
  2024. for (i = 0; i < len; ++i) {
  2025. target[i + targetStart] = this[i + start];
  2026. }
  2027. } else {
  2028. Uint8Array.prototype.set.call(target, this.subarray(start, start + len), targetStart);
  2029. }
  2030. return len;
  2031. };
  2032. // Usage:
  2033. // buffer.fill(number[, offset[, end]])
  2034. // buffer.fill(buffer[, offset[, end]])
  2035. // buffer.fill(string[, offset[, end]][, encoding])
  2036. Buffer.prototype.fill = function fill(val, start, end, encoding) {
  2037. // Handle string cases:
  2038. if (typeof val === 'string') {
  2039. if (typeof start === 'string') {
  2040. encoding = start;
  2041. start = 0;
  2042. end = this.length;
  2043. } else if (typeof end === 'string') {
  2044. encoding = end;
  2045. end = this.length;
  2046. }
  2047. if (val.length === 1) {
  2048. var code = val.charCodeAt(0);
  2049. if (code < 256) {
  2050. val = code;
  2051. }
  2052. }
  2053. if (encoding !== undefined && typeof encoding !== 'string') {
  2054. throw new TypeError('encoding must be a string');
  2055. }
  2056. if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
  2057. throw new TypeError('Unknown encoding: ' + encoding);
  2058. }
  2059. } else if (typeof val === 'number') {
  2060. val = val & 255;
  2061. }
  2062. // Invalid ranges are not set to a default, so can range check early.
  2063. if (start < 0 || this.length < start || this.length < end) {
  2064. throw new RangeError('Out of range index');
  2065. }
  2066. if (end <= start) {
  2067. return this;
  2068. }
  2069. start = start >>> 0;
  2070. end = end === undefined ? this.length : end >>> 0;
  2071. if (!val) val = 0;
  2072. var i;
  2073. if (typeof val === 'number') {
  2074. for (i = start; i < end; ++i) {
  2075. this[i] = val;
  2076. }
  2077. } else {
  2078. var bytes = Buffer.isBuffer(val) ? val : utf8ToBytes(new Buffer(val, encoding).toString());
  2079. var len = bytes.length;
  2080. for (i = 0; i < end - start; ++i) {
  2081. this[i + start] = bytes[i % len];
  2082. }
  2083. }
  2084. return this;
  2085. };
  2086. // HELPER FUNCTIONS
  2087. // ================
  2088. var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g;
  2089. function base64clean(str) {
  2090. // Node strips out invalid characters like \n and \t from the string, base64-js does not
  2091. str = stringtrim(str).replace(INVALID_BASE64_RE, '');
  2092. // Node converts strings with length < 2 to ''
  2093. if (str.length < 2) return '';
  2094. // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
  2095. while (str.length % 4 !== 0) {
  2096. str = str + '=';
  2097. }
  2098. return str;
  2099. }
  2100. function stringtrim(str) {
  2101. if (str.trim) return str.trim();
  2102. return str.replace(/^\s+|\s+$/g, '');
  2103. }
  2104. function toHex(n) {
  2105. if (n < 16) return '0' + n.toString(16);
  2106. return n.toString(16);
  2107. }
  2108. function utf8ToBytes(string, units) {
  2109. units = units || Infinity;
  2110. var codePoint;
  2111. var length = string.length;
  2112. var leadSurrogate = null;
  2113. var bytes = [];
  2114. for (var i = 0; i < length; ++i) {
  2115. codePoint = string.charCodeAt(i);
  2116. // is surrogate component
  2117. if (codePoint > 0xD7FF && codePoint < 0xE000) {
  2118. // last char was a lead
  2119. if (!leadSurrogate) {
  2120. // no lead yet
  2121. if (codePoint > 0xDBFF) {
  2122. // unexpected trail
  2123. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
  2124. continue;
  2125. } else if (i + 1 === length) {
  2126. // unpaired lead
  2127. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
  2128. continue;
  2129. }
  2130. // valid lead
  2131. leadSurrogate = codePoint;
  2132. continue;
  2133. }
  2134. // 2 leads in a row
  2135. if (codePoint < 0xDC00) {
  2136. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
  2137. leadSurrogate = codePoint;
  2138. continue;
  2139. }
  2140. // valid surrogate pair
  2141. codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;
  2142. } else if (leadSurrogate) {
  2143. // valid bmp char, but last char was a lead
  2144. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
  2145. }
  2146. leadSurrogate = null;
  2147. // encode utf8
  2148. if (codePoint < 0x80) {
  2149. if ((units -= 1) < 0) break;
  2150. bytes.push(codePoint);
  2151. } else if (codePoint < 0x800) {
  2152. if ((units -= 2) < 0) break;
  2153. bytes.push(codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80);
  2154. } else if (codePoint < 0x10000) {
  2155. if ((units -= 3) < 0) break;
  2156. bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);
  2157. } else if (codePoint < 0x110000) {
  2158. if ((units -= 4) < 0) break;
  2159. bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);
  2160. } else {
  2161. throw new Error('Invalid code point');
  2162. }
  2163. }
  2164. return bytes;
  2165. }
  2166. function asciiToBytes(str) {
  2167. var byteArray = [];
  2168. for (var i = 0; i < str.length; ++i) {
  2169. // Node's code seems to be doing this and not & 0x7F..
  2170. byteArray.push(str.charCodeAt(i) & 0xFF);
  2171. }
  2172. return byteArray;
  2173. }
  2174. function utf16leToBytes(str, units) {
  2175. var c, hi, lo;
  2176. var byteArray = [];
  2177. for (var i = 0; i < str.length; ++i) {
  2178. if ((units -= 2) < 0) break;
  2179. c = str.charCodeAt(i);
  2180. hi = c >> 8;
  2181. lo = c % 256;
  2182. byteArray.push(lo);
  2183. byteArray.push(hi);
  2184. }
  2185. return byteArray;
  2186. }
  2187. function base64ToBytes(str) {
  2188. return base64.toByteArray(base64clean(str));
  2189. }
  2190. function blitBuffer(src, dst, offset, length) {
  2191. for (var i = 0; i < length; ++i) {
  2192. if (i + offset >= dst.length || i >= src.length) break;
  2193. dst[i + offset] = src[i];
  2194. }
  2195. return i;
  2196. }
  2197. function isnan(val) {
  2198. return val !== val; // eslint-disable-line no-self-compare
  2199. }
  2200. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  2201. /***/ }),
  2202. /***/ "./node_modules/builtin-status-codes/browser.js":
  2203. /*!******************************************************!*\
  2204. !*** ./node_modules/builtin-status-codes/browser.js ***!
  2205. \******************************************************/
  2206. /*! no static exports found */
  2207. /***/ (function(module, exports) {
  2208. module.exports = {
  2209. "100": "Continue",
  2210. "101": "Switching Protocols",
  2211. "102": "Processing",
  2212. "200": "OK",
  2213. "201": "Created",
  2214. "202": "Accepted",
  2215. "203": "Non-Authoritative Information",
  2216. "204": "No Content",
  2217. "205": "Reset Content",
  2218. "206": "Partial Content",
  2219. "207": "Multi-Status",
  2220. "208": "Already Reported",
  2221. "226": "IM Used",
  2222. "300": "Multiple Choices",
  2223. "301": "Moved Permanently",
  2224. "302": "Found",
  2225. "303": "See Other",
  2226. "304": "Not Modified",
  2227. "305": "Use Proxy",
  2228. "307": "Temporary Redirect",
  2229. "308": "Permanent Redirect",
  2230. "400": "Bad Request",
  2231. "401": "Unauthorized",
  2232. "402": "Payment Required",
  2233. "403": "Forbidden",
  2234. "404": "Not Found",
  2235. "405": "Method Not Allowed",
  2236. "406": "Not Acceptable",
  2237. "407": "Proxy Authentication Required",
  2238. "408": "Request Timeout",
  2239. "409": "Conflict",
  2240. "410": "Gone",
  2241. "411": "Length Required",
  2242. "412": "Precondition Failed",
  2243. "413": "Payload Too Large",
  2244. "414": "URI Too Long",
  2245. "415": "Unsupported Media Type",
  2246. "416": "Range Not Satisfiable",
  2247. "417": "Expectation Failed",
  2248. "418": "I'm a teapot",
  2249. "421": "Misdirected Request",
  2250. "422": "Unprocessable Entity",
  2251. "423": "Locked",
  2252. "424": "Failed Dependency",
  2253. "425": "Unordered Collection",
  2254. "426": "Upgrade Required",
  2255. "428": "Precondition Required",
  2256. "429": "Too Many Requests",
  2257. "431": "Request Header Fields Too Large",
  2258. "451": "Unavailable For Legal Reasons",
  2259. "500": "Internal Server Error",
  2260. "501": "Not Implemented",
  2261. "502": "Bad Gateway",
  2262. "503": "Service Unavailable",
  2263. "504": "Gateway Timeout",
  2264. "505": "HTTP Version Not Supported",
  2265. "506": "Variant Also Negotiates",
  2266. "507": "Insufficient Storage",
  2267. "508": "Loop Detected",
  2268. "509": "Bandwidth Limit Exceeded",
  2269. "510": "Not Extended",
  2270. "511": "Network Authentication Required"
  2271. };
  2272. /***/ }),
  2273. /***/ "./node_modules/core-util-is/lib/util.js":
  2274. /*!***********************************************!*\
  2275. !*** ./node_modules/core-util-is/lib/util.js ***!
  2276. \***********************************************/
  2277. /*! no static exports found */
  2278. /***/ (function(module, exports, __webpack_require__) {
  2279. /* WEBPACK VAR INJECTION */(function(Buffer) {function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
  2280. // Copyright Joyent, Inc. and other Node contributors.
  2281. //
  2282. // Permission is hereby granted, free of charge, to any person obtaining a
  2283. // copy of this software and associated documentation files (the
  2284. // "Software"), to deal in the Software without restriction, including
  2285. // without limitation the rights to use, copy, modify, merge, publish,
  2286. // distribute, sublicense, and/or sell copies of the Software, and to permit
  2287. // persons to whom the Software is furnished to do so, subject to the
  2288. // following conditions:
  2289. //
  2290. // The above copyright notice and this permission notice shall be included
  2291. // in all copies or substantial portions of the Software.
  2292. //
  2293. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  2294. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  2295. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  2296. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  2297. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  2298. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  2299. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  2300. // NOTE: These type checking functions intentionally don't use `instanceof`
  2301. // because it is fragile and can be easily faked with `Object.create()`.
  2302. function isArray(arg) {
  2303. if (Array.isArray) {
  2304. return Array.isArray(arg);
  2305. }
  2306. return objectToString(arg) === '[object Array]';
  2307. }
  2308. exports.isArray = isArray;
  2309. function isBoolean(arg) {
  2310. return typeof arg === 'boolean';
  2311. }
  2312. exports.isBoolean = isBoolean;
  2313. function isNull(arg) {
  2314. return arg === null;
  2315. }
  2316. exports.isNull = isNull;
  2317. function isNullOrUndefined(arg) {
  2318. return arg == null;
  2319. }
  2320. exports.isNullOrUndefined = isNullOrUndefined;
  2321. function isNumber(arg) {
  2322. return typeof arg === 'number';
  2323. }
  2324. exports.isNumber = isNumber;
  2325. function isString(arg) {
  2326. return typeof arg === 'string';
  2327. }
  2328. exports.isString = isString;
  2329. function isSymbol(arg) {
  2330. return _typeof(arg) === 'symbol';
  2331. }
  2332. exports.isSymbol = isSymbol;
  2333. function isUndefined(arg) {
  2334. return arg === void 0;
  2335. }
  2336. exports.isUndefined = isUndefined;
  2337. function isRegExp(re) {
  2338. return objectToString(re) === '[object RegExp]';
  2339. }
  2340. exports.isRegExp = isRegExp;
  2341. function isObject(arg) {
  2342. return _typeof(arg) === 'object' && arg !== null;
  2343. }
  2344. exports.isObject = isObject;
  2345. function isDate(d) {
  2346. return objectToString(d) === '[object Date]';
  2347. }
  2348. exports.isDate = isDate;
  2349. function isError(e) {
  2350. return objectToString(e) === '[object Error]' || e instanceof Error;
  2351. }
  2352. exports.isError = isError;
  2353. function isFunction(arg) {
  2354. return typeof arg === 'function';
  2355. }
  2356. exports.isFunction = isFunction;
  2357. function isPrimitive(arg) {
  2358. return arg === null || typeof arg === 'boolean' || typeof arg === 'number' || typeof arg === 'string' || _typeof(arg) === 'symbol' ||
  2359. // ES6 symbol
  2360. typeof arg === 'undefined';
  2361. }
  2362. exports.isPrimitive = isPrimitive;
  2363. exports.isBuffer = Buffer.isBuffer;
  2364. function objectToString(o) {
  2365. return Object.prototype.toString.call(o);
  2366. }
  2367. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buffer/index.js */ "./node_modules/buffer/index.js").Buffer))
  2368. /***/ }),
  2369. /***/ "./node_modules/entities/lib/decode.js":
  2370. /*!*********************************************!*\
  2371. !*** ./node_modules/entities/lib/decode.js ***!
  2372. \*********************************************/
  2373. /*! no static exports found */
  2374. /***/ (function(module, exports, __webpack_require__) {
  2375. "use strict";
  2376. var __importDefault = this && this.__importDefault || function (mod) {
  2377. return mod && mod.__esModule ? mod : {
  2378. "default": mod
  2379. };
  2380. };
  2381. Object.defineProperty(exports, "__esModule", {
  2382. value: true
  2383. });
  2384. exports.decodeHTML = exports.decodeHTMLStrict = exports.decodeXML = void 0;
  2385. var entities_json_1 = __importDefault(__webpack_require__(/*! ./maps/entities.json */ "./node_modules/entities/lib/maps/entities.json"));
  2386. var legacy_json_1 = __importDefault(__webpack_require__(/*! ./maps/legacy.json */ "./node_modules/entities/lib/maps/legacy.json"));
  2387. var xml_json_1 = __importDefault(__webpack_require__(/*! ./maps/xml.json */ "./node_modules/entities/lib/maps/xml.json"));
  2388. var decode_codepoint_1 = __importDefault(__webpack_require__(/*! ./decode_codepoint */ "./node_modules/entities/lib/decode_codepoint.js"));
  2389. exports.decodeXML = getStrictDecoder(xml_json_1["default"]);
  2390. exports.decodeHTMLStrict = getStrictDecoder(entities_json_1["default"]);
  2391. function getStrictDecoder(map) {
  2392. var keys = Object.keys(map).join("|");
  2393. var replace = getReplacer(map);
  2394. keys += "|#[xX][\\da-fA-F]+|#\\d+";
  2395. var re = new RegExp("&(?:" + keys + ");", "g");
  2396. return function (str) {
  2397. return String(str).replace(re, replace);
  2398. };
  2399. }
  2400. var sorter = function sorter(a, b) {
  2401. return a < b ? 1 : -1;
  2402. };
  2403. exports.decodeHTML = function () {
  2404. var legacy = Object.keys(legacy_json_1["default"]).sort(sorter);
  2405. var keys = Object.keys(entities_json_1["default"]).sort(sorter);
  2406. for (var i = 0, j = 0; i < keys.length; i++) {
  2407. if (legacy[j] === keys[i]) {
  2408. keys[i] += ";?";
  2409. j++;
  2410. } else {
  2411. keys[i] += ";";
  2412. }
  2413. }
  2414. var re = new RegExp("&(?:" + keys.join("|") + "|#[xX][\\da-fA-F]+;?|#\\d+;?)", "g");
  2415. var replace = getReplacer(entities_json_1["default"]);
  2416. function replacer(str) {
  2417. if (str.substr(-1) !== ";") str += ";";
  2418. return replace(str);
  2419. }
  2420. //TODO consider creating a merged map
  2421. return function (str) {
  2422. return String(str).replace(re, replacer);
  2423. };
  2424. }();
  2425. function getReplacer(map) {
  2426. return function replace(str) {
  2427. if (str.charAt(1) === "#") {
  2428. var secondChar = str.charAt(2);
  2429. if (secondChar === "X" || secondChar === "x") {
  2430. return decode_codepoint_1["default"](parseInt(str.substr(3), 16));
  2431. }
  2432. return decode_codepoint_1["default"](parseInt(str.substr(2), 10));
  2433. }
  2434. return map[str.slice(1, -1)];
  2435. };
  2436. }
  2437. /***/ }),
  2438. /***/ "./node_modules/entities/lib/decode_codepoint.js":
  2439. /*!*******************************************************!*\
  2440. !*** ./node_modules/entities/lib/decode_codepoint.js ***!
  2441. \*******************************************************/
  2442. /*! no static exports found */
  2443. /***/ (function(module, exports, __webpack_require__) {
  2444. "use strict";
  2445. var __importDefault = this && this.__importDefault || function (mod) {
  2446. return mod && mod.__esModule ? mod : {
  2447. "default": mod
  2448. };
  2449. };
  2450. Object.defineProperty(exports, "__esModule", {
  2451. value: true
  2452. });
  2453. var decode_json_1 = __importDefault(__webpack_require__(/*! ./maps/decode.json */ "./node_modules/entities/lib/maps/decode.json"));
  2454. // modified version of https://github.com/mathiasbynens/he/blob/master/src/he.js#L94-L119
  2455. function decodeCodePoint(codePoint) {
  2456. if (codePoint >= 0xd800 && codePoint <= 0xdfff || codePoint > 0x10ffff) {
  2457. return "\uFFFD";
  2458. }
  2459. if (codePoint in decode_json_1["default"]) {
  2460. codePoint = decode_json_1["default"][codePoint];
  2461. }
  2462. var output = "";
  2463. if (codePoint > 0xffff) {
  2464. codePoint -= 0x10000;
  2465. output += String.fromCharCode(codePoint >>> 10 & 0x3ff | 0xd800);
  2466. codePoint = 0xdc00 | codePoint & 0x3ff;
  2467. }
  2468. output += String.fromCharCode(codePoint);
  2469. return output;
  2470. }
  2471. exports["default"] = decodeCodePoint;
  2472. /***/ }),
  2473. /***/ "./node_modules/entities/lib/encode.js":
  2474. /*!*********************************************!*\
  2475. !*** ./node_modules/entities/lib/encode.js ***!
  2476. \*********************************************/
  2477. /*! no static exports found */
  2478. /***/ (function(module, exports, __webpack_require__) {
  2479. "use strict";
  2480. var __importDefault = this && this.__importDefault || function (mod) {
  2481. return mod && mod.__esModule ? mod : {
  2482. "default": mod
  2483. };
  2484. };
  2485. Object.defineProperty(exports, "__esModule", {
  2486. value: true
  2487. });
  2488. exports.escape = exports.encodeHTML = exports.encodeXML = void 0;
  2489. var xml_json_1 = __importDefault(__webpack_require__(/*! ./maps/xml.json */ "./node_modules/entities/lib/maps/xml.json"));
  2490. var inverseXML = getInverseObj(xml_json_1["default"]);
  2491. var xmlReplacer = getInverseReplacer(inverseXML);
  2492. exports.encodeXML = getInverse(inverseXML, xmlReplacer);
  2493. var entities_json_1 = __importDefault(__webpack_require__(/*! ./maps/entities.json */ "./node_modules/entities/lib/maps/entities.json"));
  2494. var inverseHTML = getInverseObj(entities_json_1["default"]);
  2495. var htmlReplacer = getInverseReplacer(inverseHTML);
  2496. exports.encodeHTML = getInverse(inverseHTML, htmlReplacer);
  2497. function getInverseObj(obj) {
  2498. return Object.keys(obj).sort().reduce(function (inverse, name) {
  2499. inverse[obj[name]] = "&" + name + ";";
  2500. return inverse;
  2501. }, {});
  2502. }
  2503. function getInverseReplacer(inverse) {
  2504. var single = [];
  2505. var multiple = [];
  2506. for (var _i = 0, _a = Object.keys(inverse); _i < _a.length; _i++) {
  2507. var k = _a[_i];
  2508. if (k.length === 1) {
  2509. // Add value to single array
  2510. single.push("\\" + k);
  2511. } else {
  2512. // Add value to multiple array
  2513. multiple.push(k);
  2514. }
  2515. }
  2516. // Add ranges to single characters.
  2517. single.sort();
  2518. for (var start = 0; start < single.length - 1; start++) {
  2519. // Find the end of a run of characters
  2520. var end = start;
  2521. while (end < single.length - 1 && single[end].charCodeAt(1) + 1 === single[end + 1].charCodeAt(1)) {
  2522. end += 1;
  2523. }
  2524. var count = 1 + end - start;
  2525. // We want to replace at least three characters
  2526. if (count < 3) continue;
  2527. single.splice(start, count, single[start] + "-" + single[end]);
  2528. }
  2529. multiple.unshift("[" + single.join("") + "]");
  2530. return new RegExp(multiple.join("|"), "g");
  2531. }
  2532. var reNonASCII = /(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g;
  2533. function singleCharReplacer(c) {
  2534. // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
  2535. return "&#x" + c.codePointAt(0).toString(16).toUpperCase() + ";";
  2536. }
  2537. function getInverse(inverse, re) {
  2538. return function (data) {
  2539. return data.replace(re, function (name) {
  2540. return inverse[name];
  2541. }).replace(reNonASCII, singleCharReplacer);
  2542. };
  2543. }
  2544. var reXmlChars = getInverseReplacer(inverseXML);
  2545. function escape(data) {
  2546. return data.replace(reXmlChars, singleCharReplacer).replace(reNonASCII, singleCharReplacer);
  2547. }
  2548. exports.escape = escape;
  2549. /***/ }),
  2550. /***/ "./node_modules/entities/lib/index.js":
  2551. /*!********************************************!*\
  2552. !*** ./node_modules/entities/lib/index.js ***!
  2553. \********************************************/
  2554. /*! no static exports found */
  2555. /***/ (function(module, exports, __webpack_require__) {
  2556. "use strict";
  2557. Object.defineProperty(exports, "__esModule", {
  2558. value: true
  2559. });
  2560. exports.encode = exports.decodeStrict = exports.decode = void 0;
  2561. var decode_1 = __webpack_require__(/*! ./decode */ "./node_modules/entities/lib/decode.js");
  2562. var encode_1 = __webpack_require__(/*! ./encode */ "./node_modules/entities/lib/encode.js");
  2563. /**
  2564. * Decodes a string with entities.
  2565. *
  2566. * @param data String to decode.
  2567. * @param level Optional level to decode at. 0 = XML, 1 = HTML. Default is 0.
  2568. */
  2569. function decode(data, level) {
  2570. return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTML)(data);
  2571. }
  2572. exports.decode = decode;
  2573. /**
  2574. * Decodes a string with entities. Does not allow missing trailing semicolons for entities.
  2575. *
  2576. * @param data String to decode.
  2577. * @param level Optional level to decode at. 0 = XML, 1 = HTML. Default is 0.
  2578. */
  2579. function decodeStrict(data, level) {
  2580. return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTMLStrict)(data);
  2581. }
  2582. exports.decodeStrict = decodeStrict;
  2583. /**
  2584. * Encodes a string with entities.
  2585. *
  2586. * @param data String to encode.
  2587. * @param level Optional level to encode at. 0 = XML, 1 = HTML. Default is 0.
  2588. */
  2589. function encode(data, level) {
  2590. return (!level || level <= 0 ? encode_1.encodeXML : encode_1.encodeHTML)(data);
  2591. }
  2592. exports.encode = encode;
  2593. var encode_2 = __webpack_require__(/*! ./encode */ "./node_modules/entities/lib/encode.js");
  2594. Object.defineProperty(exports, "encodeXML", {
  2595. enumerable: true,
  2596. get: function get() {
  2597. return encode_2.encodeXML;
  2598. }
  2599. });
  2600. Object.defineProperty(exports, "encodeHTML", {
  2601. enumerable: true,
  2602. get: function get() {
  2603. return encode_2.encodeHTML;
  2604. }
  2605. });
  2606. Object.defineProperty(exports, "escape", {
  2607. enumerable: true,
  2608. get: function get() {
  2609. return encode_2.escape;
  2610. }
  2611. });
  2612. // Legacy aliases
  2613. Object.defineProperty(exports, "encodeHTML4", {
  2614. enumerable: true,
  2615. get: function get() {
  2616. return encode_2.encodeHTML;
  2617. }
  2618. });
  2619. Object.defineProperty(exports, "encodeHTML5", {
  2620. enumerable: true,
  2621. get: function get() {
  2622. return encode_2.encodeHTML;
  2623. }
  2624. });
  2625. var decode_2 = __webpack_require__(/*! ./decode */ "./node_modules/entities/lib/decode.js");
  2626. Object.defineProperty(exports, "decodeXML", {
  2627. enumerable: true,
  2628. get: function get() {
  2629. return decode_2.decodeXML;
  2630. }
  2631. });
  2632. Object.defineProperty(exports, "decodeHTML", {
  2633. enumerable: true,
  2634. get: function get() {
  2635. return decode_2.decodeHTML;
  2636. }
  2637. });
  2638. Object.defineProperty(exports, "decodeHTMLStrict", {
  2639. enumerable: true,
  2640. get: function get() {
  2641. return decode_2.decodeHTMLStrict;
  2642. }
  2643. });
  2644. // Legacy aliases
  2645. Object.defineProperty(exports, "decodeHTML4", {
  2646. enumerable: true,
  2647. get: function get() {
  2648. return decode_2.decodeHTML;
  2649. }
  2650. });
  2651. Object.defineProperty(exports, "decodeHTML5", {
  2652. enumerable: true,
  2653. get: function get() {
  2654. return decode_2.decodeHTML;
  2655. }
  2656. });
  2657. Object.defineProperty(exports, "decodeHTML4Strict", {
  2658. enumerable: true,
  2659. get: function get() {
  2660. return decode_2.decodeHTMLStrict;
  2661. }
  2662. });
  2663. Object.defineProperty(exports, "decodeHTML5Strict", {
  2664. enumerable: true,
  2665. get: function get() {
  2666. return decode_2.decodeHTMLStrict;
  2667. }
  2668. });
  2669. Object.defineProperty(exports, "decodeXMLStrict", {
  2670. enumerable: true,
  2671. get: function get() {
  2672. return decode_2.decodeXML;
  2673. }
  2674. });
  2675. /***/ }),
  2676. /***/ "./node_modules/entities/lib/maps/decode.json":
  2677. /*!****************************************************!*\
  2678. !*** ./node_modules/entities/lib/maps/decode.json ***!
  2679. \****************************************************/
  2680. /*! exports provided: 0, 128, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 158, 159, default */
  2681. /***/ (function(module) {
  2682. module.exports = JSON.parse("{\"0\":65533,\"128\":8364,\"130\":8218,\"131\":402,\"132\":8222,\"133\":8230,\"134\":8224,\"135\":8225,\"136\":710,\"137\":8240,\"138\":352,\"139\":8249,\"140\":338,\"142\":381,\"145\":8216,\"146\":8217,\"147\":8220,\"148\":8221,\"149\":8226,\"150\":8211,\"151\":8212,\"152\":732,\"153\":8482,\"154\":353,\"155\":8250,\"156\":339,\"158\":382,\"159\":376}");
  2683. /***/ }),
  2684. /***/ "./node_modules/entities/lib/maps/entities.json":
  2685. /*!******************************************************!*\
  2686. !*** ./node_modules/entities/lib/maps/entities.json ***!
  2687. \******************************************************/
  2688. /*! exports provided: Aacute, aacute, Abreve, abreve, ac, acd, acE, Acirc, acirc, acute, Acy, acy, AElig, aelig, af, Afr, afr, Agrave, agrave, alefsym, aleph, Alpha, alpha, Amacr, amacr, amalg, amp, AMP, andand, And, and, andd, andslope, andv, ang, ange, angle, angmsdaa, angmsdab, angmsdac, angmsdad, angmsdae, angmsdaf, angmsdag, angmsdah, angmsd, angrt, angrtvb, angrtvbd, angsph, angst, angzarr, Aogon, aogon, Aopf, aopf, apacir, ap, apE, ape, apid, apos, ApplyFunction, approx, approxeq, Aring, aring, Ascr, ascr, Assign, ast, asymp, asympeq, Atilde, atilde, Auml, auml, awconint, awint, backcong, backepsilon, backprime, backsim, backsimeq, Backslash, Barv, barvee, barwed, Barwed, barwedge, bbrk, bbrktbrk, bcong, Bcy, bcy, bdquo, becaus, because, Because, bemptyv, bepsi, bernou, Bernoullis, Beta, beta, beth, between, Bfr, bfr, bigcap, bigcirc, bigcup, bigodot, bigoplus, bigotimes, bigsqcup, bigstar, bigtriangledown, bigtriangleup, biguplus, bigvee, bigwedge, bkarow, blacklozenge, blacksquare, blacktriangle, blacktriangledown, blacktriangleleft, blacktriangleright, blank, blk12, blk14, blk34, block, bne, bnequiv, bNot, bnot, Bopf, bopf, bot, bottom, bowtie, boxbox, boxdl, boxdL, boxDl, boxDL, boxdr, boxdR, boxDr, boxDR, boxh, boxH, boxhd, boxHd, boxhD, boxHD, boxhu, boxHu, boxhU, boxHU, boxminus, boxplus, boxtimes, boxul, boxuL, boxUl, boxUL, boxur, boxuR, boxUr, boxUR, boxv, boxV, boxvh, boxvH, boxVh, boxVH, boxvl, boxvL, boxVl, boxVL, boxvr, boxvR, boxVr, boxVR, bprime, breve, Breve, brvbar, bscr, Bscr, bsemi, bsim, bsime, bsolb, bsol, bsolhsub, bull, bullet, bump, bumpE, bumpe, Bumpeq, bumpeq, Cacute, cacute, capand, capbrcup, capcap, cap, Cap, capcup, capdot, CapitalDifferentialD, caps, caret, caron, Cayleys, ccaps, Ccaron, ccaron, Ccedil, ccedil, Ccirc, ccirc, Cconint, ccups, ccupssm, Cdot, cdot, cedil, Cedilla, cemptyv, cent, centerdot, CenterDot, cfr, Cfr, CHcy, chcy, check, checkmark, Chi, chi, circ, circeq, circlearrowleft, circlearrowright, circledast, circledcirc, circleddash, CircleDot, circledR, circledS, CircleMinus, CirclePlus, CircleTimes, cir, cirE, cire, cirfnint, cirmid, cirscir, ClockwiseContourIntegral, CloseCurlyDoubleQuote, CloseCurlyQuote, clubs, clubsuit, colon, Colon, Colone, colone, coloneq, comma, commat, comp, compfn, complement, complexes, cong, congdot, Congruent, conint, Conint, ContourIntegral, copf, Copf, coprod, Coproduct, copy, COPY, copysr, CounterClockwiseContourIntegral, crarr, cross, Cross, Cscr, cscr, csub, csube, csup, csupe, ctdot, cudarrl, cudarrr, cuepr, cuesc, cularr, cularrp, cupbrcap, cupcap, CupCap, cup, Cup, cupcup, cupdot, cupor, cups, curarr, curarrm, curlyeqprec, curlyeqsucc, curlyvee, curlywedge, curren, curvearrowleft, curvearrowright, cuvee, cuwed, cwconint, cwint, cylcty, dagger, Dagger, daleth, darr, Darr, dArr, dash, Dashv, dashv, dbkarow, dblac, Dcaron, dcaron, Dcy, dcy, ddagger, ddarr, DD, dd, DDotrahd, ddotseq, deg, Del, Delta, delta, demptyv, dfisht, Dfr, dfr, dHar, dharl, dharr, DiacriticalAcute, DiacriticalDot, DiacriticalDoubleAcute, DiacriticalGrave, DiacriticalTilde, diam, diamond, Diamond, diamondsuit, diams, die, DifferentialD, digamma, disin, div, divide, divideontimes, divonx, DJcy, djcy, dlcorn, dlcrop, dollar, Dopf, dopf, Dot, dot, DotDot, doteq, doteqdot, DotEqual, dotminus, dotplus, dotsquare, doublebarwedge, DoubleContourIntegral, DoubleDot, DoubleDownArrow, DoubleLeftArrow, DoubleLeftRightArrow, DoubleLeftTee, DoubleLongLeftArrow, DoubleLongLeftRightArrow, DoubleLongRightArrow, DoubleRightArrow, DoubleRightTee, DoubleUpArrow, DoubleUpDownArrow, DoubleVerticalBar, DownArrowBar, downarrow, DownArrow, Downarrow, DownArrowUpArrow, DownBreve, downdownarrows, downharpoonleft, downharpoonright, DownLeftRightVector, DownLeftTeeVector, DownLeftVectorBar, DownLeftVector, DownRightTeeVector, DownRightVectorBar, DownRightVector, DownTeeArrow, DownTee, drbkarow, drcorn, drcrop, Dscr, dscr, DScy, dscy, dsol, Dstrok, dstrok, dtdot, dtri, dtrif, duarr, duhar, dwangle, DZcy, dzcy, dzigrarr, Eacute, eacute, easter, Ecaron, ecaron, Ecirc, ecirc, ecir, ecolon, Ecy, ecy, eDDot, Edot, edot, eDot, ee, efDot, Efr, efr, eg, Egrave, egrave, egs, egsdot, el, Element, elinters, ell, els, elsdot, Emacr, emacr, empty, emptyset, EmptySmallSquare, emptyv, EmptyVerySmallSquare, emsp13, emsp14, emsp, ENG, eng, ensp, Eogon, eogon, Eopf, eopf, epar, eparsl, eplus, epsi, Epsilon, epsilon, epsiv, eqcirc, eqcolon, eqsim, eqslantgtr, eqslantless, Equal, equals, EqualTilde, equest, Equilibrium, equiv, equivDD, eqvparsl, erarr, erDot, escr, Escr, esdot, Esim, esim, Eta, eta, ETH, eth, Euml, euml, euro, excl, exist, Exists, expectation, exponentiale, ExponentialE, fallingdotseq, Fcy, fcy, female, ffilig, fflig, ffllig, Ffr, ffr, filig, FilledSmallSquare, FilledVerySmallSquare, fjlig, flat, fllig, fltns, fnof, Fopf, fopf, forall, ForAll, fork, forkv, Fouriertrf, fpartint, frac12, frac13, frac14, frac15, frac16, frac18, frac23, frac25, frac34, frac35, frac38, frac45, frac56, frac58, frac78, frasl, frown, fscr, Fscr, gacute, Gamma, gamma, Gammad, gammad, gap, Gbreve, gbreve, Gcedil, Gcirc, gcirc, Gcy, gcy, Gdot, gdot, ge, gE, gEl, gel, geq, geqq, geqslant, gescc, ges, gesdot, gesdoto, gesdotol, gesl, gesles, Gfr, gfr, gg, Gg, ggg, gimel, GJcy, gjcy, gla, gl, glE, glj, gnap, gnapprox, gne, gnE, gneq, gneqq, gnsim, Gopf, gopf, grave, GreaterEqual, GreaterEqualLess, GreaterFullEqual, GreaterGreater, GreaterLess, GreaterSlantEqual, GreaterTilde, Gscr, gscr, gsim, gsime, gsiml, gtcc, gtcir, gt, GT, Gt, gtdot, gtlPar, gtquest, gtrapprox, gtrarr, gtrdot, gtreqless, gtreqqless, gtrless, gtrsim, gvertneqq, gvnE, Hacek, hairsp, half, hamilt, HARDcy, hardcy, harrcir, harr, hArr, harrw, Hat, hbar, Hcirc, hcirc, hearts, heartsuit, hellip, hercon, hfr, Hfr, HilbertSpace, hksearow, hkswarow, hoarr, homtht, hookleftarrow, hookrightarrow, hopf, Hopf, horbar, HorizontalLine, hscr, Hscr, hslash, Hstrok, hstrok, HumpDownHump, HumpEqual, hybull, hyphen, Iacute, iacute, ic, Icirc, icirc, Icy, icy, Idot, IEcy, iecy, iexcl, iff, ifr, Ifr, Igrave, igrave, ii, iiiint, iiint, iinfin, iiota, IJlig, ijlig, Imacr, imacr, image, ImaginaryI, imagline, imagpart, imath, Im, imof, imped, Implies, incare, in, infin, infintie, inodot, intcal, int, Int, integers, Integral, intercal, Intersection, intlarhk, intprod, InvisibleComma, InvisibleTimes, IOcy, iocy, Iogon, iogon, Iopf, iopf, Iota, iota, iprod, iquest, iscr, Iscr, isin, isindot, isinE, isins, isinsv, isinv, it, Itilde, itilde, Iukcy, iukcy, Iuml, iuml, Jcirc, jcirc, Jcy, jcy, Jfr, jfr, jmath, Jopf, jopf, Jscr, jscr, Jsercy, jsercy, Jukcy, jukcy, Kappa, kappa, kappav, Kcedil, kcedil, Kcy, kcy, Kfr, kfr, kgreen, KHcy, khcy, KJcy, kjcy, Kopf, kopf, Kscr, kscr, lAarr, Lacute, lacute, laemptyv, lagran, Lambda, lambda, lang, Lang, langd, langle, lap, Laplacetrf, laquo, larrb, larrbfs, larr, Larr, lArr, larrfs, larrhk, larrlp, larrpl, larrsim, larrtl, latail, lAtail, lat, late, lates, lbarr, lBarr, lbbrk, lbrace, lbrack, lbrke, lbrksld, lbrkslu, Lcaron, lcaron, Lcedil, lcedil, lceil, lcub, Lcy, lcy, ldca, ldquo, ldquor, ldrdhar, ldrushar, ldsh, le, lE, LeftAngleBracket, LeftArrowBar, leftarrow, LeftArrow, Leftarrow, LeftArrowRightArrow, leftarrowtail, LeftCeiling, LeftDoubleBracket, LeftDownTeeVector, LeftDownVectorBar, LeftDownVector, LeftFloor, leftharpoondown, leftharpoonup, leftleftarrows, leftrightarrow, LeftRightArrow, Leftrightarrow, leftrightarrows, leftrightharpoons, leftrightsquigarrow, LeftRightVector, LeftTeeArrow, LeftTee, LeftTeeVector, leftthreetimes, LeftTriangleBar, LeftTriangle, LeftTriangleEqual, LeftUpDownVector, LeftUpTeeVector, LeftUpVectorBar, LeftUpVector, LeftVectorBar, LeftVector, lEg, leg, leq, leqq, leqslant, lescc, les, lesdot, lesdoto, lesdotor, lesg, lesges, lessapprox, lessdot, lesseqgtr, lesseqqgtr, LessEqualGreater, LessFullEqual, LessGreater, lessgtr, LessLess, lesssim, LessSlantEqual, LessTilde, lfisht, lfloor, Lfr, lfr, lg, lgE, lHar, lhard, lharu, lharul, lhblk, LJcy, ljcy, llarr, ll, Ll, llcorner, Lleftarrow, llhard, lltri, Lmidot, lmidot, lmoustache, lmoust, lnap, lnapprox, lne, lnE, lneq, lneqq, lnsim, loang, loarr, lobrk, longleftarrow, LongLeftArrow, Longleftarrow, longleftrightarrow, LongLeftRightArrow, Longleftrightarrow, longmapsto, longrightarrow, LongRightArrow, Longrightarrow, looparrowleft, looparrowright, lopar, Lopf, lopf, loplus, lotimes, lowast, lowbar, LowerLeftArrow, LowerRightArrow, loz, lozenge, lozf, lpar, lparlt, lrarr, lrcorner, lrhar, lrhard, lrm, lrtri, lsaquo, lscr, Lscr, lsh, Lsh, lsim, lsime, lsimg, lsqb, lsquo, lsquor, Lstrok, lstrok, ltcc, ltcir, lt, LT, Lt, ltdot, lthree, ltimes, ltlarr, ltquest, ltri, ltrie, ltrif, ltrPar, lurdshar, luruhar, lvertneqq, lvnE, macr, male, malt, maltese, Map, map, mapsto, mapstodown, mapstoleft, mapstoup, marker, mcomma, Mcy, mcy, mdash, mDDot, measuredangle, MediumSpace, Mellintrf, Mfr, mfr, mho, micro, midast, midcir, mid, middot, minusb, minus, minusd, minusdu, MinusPlus, mlcp, mldr, mnplus, models, Mopf, mopf, mp, mscr, Mscr, mstpos, Mu, mu, multimap, mumap, nabla, Nacute, nacute, nang, nap, napE, napid, napos, napprox, natural, naturals, natur, nbsp, nbump, nbumpe, ncap, Ncaron, ncaron, Ncedil, ncedil, ncong, ncongdot, ncup, Ncy, ncy, ndash, nearhk, nearr, neArr, nearrow, ne, nedot, NegativeMediumSpace, NegativeThickSpace, NegativeThinSpace, NegativeVeryThinSpace, nequiv, nesear, nesim, NestedGreaterGreater, NestedLessLess, NewLine, nexist, nexists, Nfr, nfr, ngE, nge, ngeq, ngeqq, ngeqslant, nges, nGg, ngsim, nGt, ngt, ngtr, nGtv, nharr, nhArr, nhpar, ni, nis, nisd, niv, NJcy, njcy, nlarr, nlArr, nldr, nlE, nle, nleftarrow, nLeftarrow, nleftrightarrow, nLeftrightarrow, nleq, nleqq, nleqslant, nles, nless, nLl, nlsim, nLt, nlt, nltri, nltrie, nLtv, nmid, NoBreak, NonBreakingSpace, nopf, Nopf, Not, not, NotCongruent, NotCupCap, NotDoubleVerticalBar, NotElement, NotEqual, NotEqualTilde, NotExists, NotGreater, NotGreaterEqual, NotGreaterFullEqual, NotGreaterGreater, NotGreaterLess, NotGreaterSlantEqual, NotGreaterTilde, NotHumpDownHump, NotHumpEqual, notin, notindot, notinE, notinva, notinvb, notinvc, NotLeftTriangleBar, NotLeftTriangle, NotLeftTriangleEqual, NotLess, NotLessEqual, NotLessGreater, NotLessLess, NotLessSlantEqual, NotLessTilde, NotNestedGreaterGreater, NotNestedLessLess, notni, notniva, notnivb, notnivc, NotPrecedes, NotPrecedesEqual, NotPrecedesSlantEqual, NotReverseElement, NotRightTriangleBar, NotRightTriangle, NotRightTriangleEqual, NotSquareSubset, NotSquareSubsetEqual, NotSquareSuperset, NotSquareSupersetEqual, NotSubset, NotSubsetEqual, NotSucceeds, NotSucceedsEqual, NotSucceedsSlantEqual, NotSucceedsTilde, NotSuperset, NotSupersetEqual, NotTilde, NotTildeEqual, NotTildeFullEqual, NotTildeTilde, NotVerticalBar, nparallel, npar, nparsl, npart, npolint, npr, nprcue, nprec, npreceq, npre, nrarrc, nrarr, nrArr, nrarrw, nrightarrow, nRightarrow, nrtri, nrtrie, nsc, nsccue, nsce, Nscr, nscr, nshortmid, nshortparallel, nsim, nsime, nsimeq, nsmid, nspar, nsqsube, nsqsupe, nsub, nsubE, nsube, nsubset, nsubseteq, nsubseteqq, nsucc, nsucceq, nsup, nsupE, nsupe, nsupset, nsupseteq, nsupseteqq, ntgl, Ntilde, ntilde, ntlg, ntriangleleft, ntrianglelefteq, ntriangleright, ntrianglerighteq, Nu, nu, num, numero, numsp, nvap, nvdash, nvDash, nVdash, nVDash, nvge, nvgt, nvHarr, nvinfin, nvlArr, nvle, nvlt, nvltrie, nvrArr, nvrtrie, nvsim, nwarhk, nwarr, nwArr, nwarrow, nwnear, Oacute, oacute, oast, Ocirc, ocirc, ocir, Ocy, ocy, odash, Odblac, odblac, odiv, odot, odsold, OElig, oelig, ofcir, Ofr, ofr, ogon, Ograve, ograve, ogt, ohbar, ohm, oint, olarr, olcir, olcross, oline, olt, Omacr, omacr, Omega, omega, Omicron, omicron, omid, ominus, Oopf, oopf, opar, OpenCurlyDoubleQuote, OpenCurlyQuote, operp, oplus, orarr, Or, or, ord, order, orderof, ordf, ordm, origof, oror, orslope, orv, oS, Oscr, oscr, Oslash, oslash, osol, Otilde, otilde, otimesas, Otimes, otimes, Ouml, ouml, ovbar, OverBar, OverBrace, OverBracket, OverParenthesis, para, parallel, par, parsim, parsl, part, PartialD, Pcy, pcy, percnt, period, permil, perp, pertenk, Pfr, pfr, Phi, phi, phiv, phmmat, phone, Pi, pi, pitchfork, piv, planck, planckh, plankv, plusacir, plusb, pluscir, plus, plusdo, plusdu, pluse, PlusMinus, plusmn, plussim, plustwo, pm, Poincareplane, pointint, popf, Popf, pound, prap, Pr, pr, prcue, precapprox, prec, preccurlyeq, Precedes, PrecedesEqual, PrecedesSlantEqual, PrecedesTilde, preceq, precnapprox, precneqq, precnsim, pre, prE, precsim, prime, Prime, primes, prnap, prnE, prnsim, prod, Product, profalar, profline, profsurf, prop, Proportional, Proportion, propto, prsim, prurel, Pscr, pscr, Psi, psi, puncsp, Qfr, qfr, qint, qopf, Qopf, qprime, Qscr, qscr, quaternions, quatint, quest, questeq, quot, QUOT, rAarr, race, Racute, racute, radic, raemptyv, rang, Rang, rangd, range, rangle, raquo, rarrap, rarrb, rarrbfs, rarrc, rarr, Rarr, rArr, rarrfs, rarrhk, rarrlp, rarrpl, rarrsim, Rarrtl, rarrtl, rarrw, ratail, rAtail, ratio, rationals, rbarr, rBarr, RBarr, rbbrk, rbrace, rbrack, rbrke, rbrksld, rbrkslu, Rcaron, rcaron, Rcedil, rcedil, rceil, rcub, Rcy, rcy, rdca, rdldhar, rdquo, rdquor, rdsh, real, realine, realpart, reals, Re, rect, reg, REG, ReverseElement, ReverseEquilibrium, ReverseUpEquilibrium, rfisht, rfloor, rfr, Rfr, rHar, rhard, rharu, rharul, Rho, rho, rhov, RightAngleBracket, RightArrowBar, rightarrow, RightArrow, Rightarrow, RightArrowLeftArrow, rightarrowtail, RightCeiling, RightDoubleBracket, RightDownTeeVector, RightDownVectorBar, RightDownVector, RightFloor, rightharpoondown, rightharpoonup, rightleftarrows, rightleftharpoons, rightrightarrows, rightsquigarrow, RightTeeArrow, RightTee, RightTeeVector, rightthreetimes, RightTriangleBar, RightTriangle, RightTriangleEqual, RightUpDownVector, RightUpTeeVector, RightUpVectorBar, RightUpVector, RightVectorBar, RightVector, ring, risingdotseq, rlarr, rlhar, rlm, rmoustache, rmoust, rnmid, roang, roarr, robrk, ropar, ropf, Ropf, roplus, rotimes, RoundImplies, rpar, rpargt, rppolint, rrarr, Rrightarrow, rsaquo, rscr, Rscr, rsh, Rsh, rsqb, rsquo, rsquor, rthree, rtimes, rtri, rtrie, rtrif, rtriltri, RuleDelayed, ruluhar, rx, Sacute, sacute, sbquo, scap, Scaron, scaron, Sc, sc, sccue, sce, scE, Scedil, scedil, Scirc, scirc, scnap, scnE, scnsim, scpolint, scsim, Scy, scy, sdotb, sdot, sdote, searhk, searr, seArr, searrow, sect, semi, seswar, setminus, setmn, sext, Sfr, sfr, sfrown, sharp, SHCHcy, shchcy, SHcy, shcy, ShortDownArrow, ShortLeftArrow, shortmid, shortparallel, ShortRightArrow, ShortUpArrow, shy, Sigma, sigma, sigmaf, sigmav, sim, simdot, sime, simeq, simg, simgE, siml, simlE, simne, simplus, simrarr, slarr, SmallCircle, smallsetminus, smashp, smeparsl, smid, smile, smt, smte, smtes, SOFTcy, softcy, solbar, solb, sol, Sopf, sopf, spades, spadesuit, spar, sqcap, sqcaps, sqcup, sqcups, Sqrt, sqsub, sqsube, sqsubset, sqsubseteq, sqsup, sqsupe, sqsupset, sqsupseteq, square, Square, SquareIntersection, SquareSubset, SquareSubsetEqual, SquareSuperset, SquareSupersetEqual, SquareUnion, squarf, squ, squf, srarr, Sscr, sscr, ssetmn, ssmile, sstarf, Star, star, starf, straightepsilon, straightphi, strns, sub, Sub, subdot, subE, sube, subedot, submult, subnE, subne, subplus, subrarr, subset, Subset, subseteq, subseteqq, SubsetEqual, subsetneq, subsetneqq, subsim, subsub, subsup, succapprox, succ, succcurlyeq, Succeeds, SucceedsEqual, SucceedsSlantEqual, SucceedsTilde, succeq, succnapprox, succneqq, succnsim, succsim, SuchThat, sum, Sum, sung, sup1, sup2, sup3, sup, Sup, supdot, supdsub, supE, supe, supedot, Superset, SupersetEqual, suphsol, suphsub, suplarr, supmult, supnE, supne, supplus, supset, Supset, supseteq, supseteqq, supsetneq, supsetneqq, supsim, supsub, supsup, swarhk, swarr, swArr, swarrow, swnwar, szlig, Tab, target, Tau, tau, tbrk, Tcaron, tcaron, Tcedil, tcedil, Tcy, tcy, tdot, telrec, Tfr, tfr, there4, therefore, Therefore, Theta, theta, thetasym, thetav, thickapprox, thicksim, ThickSpace, ThinSpace, thinsp, thkap, thksim, THORN, thorn, tilde, Tilde, TildeEqual, TildeFullEqual, TildeTilde, timesbar, timesb, times, timesd, tint, toea, topbot, topcir, top, Topf, topf, topfork, tosa, tprime, trade, TRADE, triangle, triangledown, triangleleft, trianglelefteq, triangleq, triangleright, trianglerighteq, tridot, trie, triminus, TripleDot, triplus, trisb, tritime, trpezium, Tscr, tscr, TScy, tscy, TSHcy, tshcy, Tstrok, tstrok, twixt, twoheadleftarrow, twoheadrightarrow, Uacute, uacute, uarr, Uarr, uArr, Uarrocir, Ubrcy, ubrcy, Ubreve, ubreve, Ucirc, ucirc, Ucy, ucy, udarr, Udblac, udblac, udhar, ufisht, Ufr, ufr, Ugrave, ugrave, uHar, uharl, uharr, uhblk, ulcorn, ulcorner, ulcrop, ultri, Umacr, umacr, uml, UnderBar, UnderBrace, UnderBracket, UnderParenthesis, Union, UnionPlus, Uogon, uogon, Uopf, uopf, UpArrowBar, uparrow, UpArrow, Uparrow, UpArrowDownArrow, updownarrow, UpDownArrow, Updownarrow, UpEquilibrium, upharpoonleft, upharpoonright, uplus, UpperLeftArrow, UpperRightArrow, upsi, Upsi, upsih, Upsilon, upsilon, UpTeeArrow, UpTee, upuparrows, urcorn, urcorner, urcrop, Uring, uring, urtri, Uscr, uscr, utdot, Utilde, utilde, utri, utrif, uuarr, Uuml, uuml, uwangle, vangrt, varepsilon, varkappa, varnothing, varphi, varpi, varpropto, varr, vArr, varrho, varsigma, varsubsetneq, varsubsetneqq, varsupsetneq, varsupsetneqq, vartheta, vartriangleleft, vartriangleright, vBar, Vbar, vBarv, Vcy, vcy, vdash, vDash, Vdash, VDash, Vdashl, veebar, vee, Vee, veeeq, vellip, verbar, Verbar, vert, Vert, VerticalBar, VerticalLine, VerticalSeparator, VerticalTilde, VeryThinSpace, Vfr, vfr, vltri, vnsub, vnsup, Vopf, vopf, vprop, vrtri, Vscr, vscr, vsubnE, vsubne, vsupnE, vsupne, Vvdash, vzigzag, Wcirc, wcirc, wedbar, wedge, Wedge, wedgeq, weierp, Wfr, wfr, Wopf, wopf, wp, wr, wreath, Wscr, wscr, xcap, xcirc, xcup, xdtri, Xfr, xfr, xharr, xhArr, Xi, xi, xlarr, xlArr, xmap, xnis, xodot, Xopf, xopf, xoplus, xotime, xrarr, xrArr, Xscr, xscr, xsqcup, xuplus, xutri, xvee, xwedge, Yacute, yacute, YAcy, yacy, Ycirc, ycirc, Ycy, ycy, yen, Yfr, yfr, YIcy, yicy, Yopf, yopf, Yscr, yscr, YUcy, yucy, yuml, Yuml, Zacute, zacute, Zcaron, zcaron, Zcy, zcy, Zdot, zdot, zeetrf, ZeroWidthSpace, Zeta, zeta, zfr, Zfr, ZHcy, zhcy, zigrarr, zopf, Zopf, Zscr, zscr, zwj, zwnj, default */
  2689. /***/ (function(module) {
  2690. module.exports = JSON.parse("{\"Aacute\":\"Á\",\"aacute\":\"á\",\"Abreve\":\"Ă\",\"abreve\":\"ă\",\"ac\":\"∾\",\"acd\":\"∿\",\"acE\":\"∾̳\",\"Acirc\":\"Â\",\"acirc\":\"â\",\"acute\":\"´\",\"Acy\":\"А\",\"acy\":\"а\",\"AElig\":\"Æ\",\"aelig\":\"æ\",\"af\":\"⁡\",\"Afr\":\"𝔄\",\"afr\":\"𝔞\",\"Agrave\":\"À\",\"agrave\":\"à\",\"alefsym\":\"ℵ\",\"aleph\":\"ℵ\",\"Alpha\":\"Α\",\"alpha\":\"α\",\"Amacr\":\"Ā\",\"amacr\":\"ā\",\"amalg\":\"⨿\",\"amp\":\"&\",\"AMP\":\"&\",\"andand\":\"⩕\",\"And\":\"⩓\",\"and\":\"∧\",\"andd\":\"⩜\",\"andslope\":\"⩘\",\"andv\":\"⩚\",\"ang\":\"∠\",\"ange\":\"⦤\",\"angle\":\"∠\",\"angmsdaa\":\"⦨\",\"angmsdab\":\"⦩\",\"angmsdac\":\"⦪\",\"angmsdad\":\"⦫\",\"angmsdae\":\"⦬\",\"angmsdaf\":\"⦭\",\"angmsdag\":\"⦮\",\"angmsdah\":\"⦯\",\"angmsd\":\"∡\",\"angrt\":\"∟\",\"angrtvb\":\"⊾\",\"angrtvbd\":\"⦝\",\"angsph\":\"∢\",\"angst\":\"Å\",\"angzarr\":\"⍼\",\"Aogon\":\"Ą\",\"aogon\":\"ą\",\"Aopf\":\"𝔸\",\"aopf\":\"𝕒\",\"apacir\":\"⩯\",\"ap\":\"≈\",\"apE\":\"⩰\",\"ape\":\"≊\",\"apid\":\"≋\",\"apos\":\"'\",\"ApplyFunction\":\"⁡\",\"approx\":\"≈\",\"approxeq\":\"≊\",\"Aring\":\"Å\",\"aring\":\"å\",\"Ascr\":\"𝒜\",\"ascr\":\"𝒶\",\"Assign\":\"≔\",\"ast\":\"*\",\"asymp\":\"≈\",\"asympeq\":\"≍\",\"Atilde\":\"Ã\",\"atilde\":\"ã\",\"Auml\":\"Ä\",\"auml\":\"ä\",\"awconint\":\"∳\",\"awint\":\"⨑\",\"backcong\":\"≌\",\"backepsilon\":\"϶\",\"backprime\":\"‵\",\"backsim\":\"∽\",\"backsimeq\":\"⋍\",\"Backslash\":\"∖\",\"Barv\":\"⫧\",\"barvee\":\"⊽\",\"barwed\":\"⌅\",\"Barwed\":\"⌆\",\"barwedge\":\"⌅\",\"bbrk\":\"⎵\",\"bbrktbrk\":\"⎶\",\"bcong\":\"≌\",\"Bcy\":\"Б\",\"bcy\":\"б\",\"bdquo\":\"„\",\"becaus\":\"∵\",\"because\":\"∵\",\"Because\":\"∵\",\"bemptyv\":\"⦰\",\"bepsi\":\"϶\",\"bernou\":\"ℬ\",\"Bernoullis\":\"ℬ\",\"Beta\":\"Β\",\"beta\":\"β\",\"beth\":\"ℶ\",\"between\":\"≬\",\"Bfr\":\"𝔅\",\"bfr\":\"𝔟\",\"bigcap\":\"⋂\",\"bigcirc\":\"◯\",\"bigcup\":\"⋃\",\"bigodot\":\"⨀\",\"bigoplus\":\"⨁\",\"bigotimes\":\"⨂\",\"bigsqcup\":\"⨆\",\"bigstar\":\"★\",\"bigtriangledown\":\"▽\",\"bigtriangleup\":\"△\",\"biguplus\":\"⨄\",\"bigvee\":\"⋁\",\"bigwedge\":\"⋀\",\"bkarow\":\"⤍\",\"blacklozenge\":\"⧫\",\"blacksquare\":\"▪\",\"blacktriangle\":\"▴\",\"blacktriangledown\":\"▾\",\"blacktriangleleft\":\"◂\",\"blacktriangleright\":\"▸\",\"blank\":\"␣\",\"blk12\":\"▒\",\"blk14\":\"░\",\"blk34\":\"▓\",\"block\":\"█\",\"bne\":\"=⃥\",\"bnequiv\":\"≡⃥\",\"bNot\":\"⫭\",\"bnot\":\"⌐\",\"Bopf\":\"𝔹\",\"bopf\":\"𝕓\",\"bot\":\"⊥\",\"bottom\":\"⊥\",\"bowtie\":\"⋈\",\"boxbox\":\"⧉\",\"boxdl\":\"┐\",\"boxdL\":\"╕\",\"boxDl\":\"╖\",\"boxDL\":\"╗\",\"boxdr\":\"┌\",\"boxdR\":\"╒\",\"boxDr\":\"╓\",\"boxDR\":\"╔\",\"boxh\":\"─\",\"boxH\":\"═\",\"boxhd\":\"┬\",\"boxHd\":\"╤\",\"boxhD\":\"╥\",\"boxHD\":\"╦\",\"boxhu\":\"┴\",\"boxHu\":\"╧\",\"boxhU\":\"╨\",\"boxHU\":\"╩\",\"boxminus\":\"⊟\",\"boxplus\":\"⊞\",\"boxtimes\":\"⊠\",\"boxul\":\"┘\",\"boxuL\":\"╛\",\"boxUl\":\"╜\",\"boxUL\":\"╝\",\"boxur\":\"└\",\"boxuR\":\"╘\",\"boxUr\":\"╙\",\"boxUR\":\"╚\",\"boxv\":\"│\",\"boxV\":\"║\",\"boxvh\":\"┼\",\"boxvH\":\"╪\",\"boxVh\":\"╫\",\"boxVH\":\"╬\",\"boxvl\":\"┤\",\"boxvL\":\"╡\",\"boxVl\":\"╢\",\"boxVL\":\"╣\",\"boxvr\":\"├\",\"boxvR\":\"╞\",\"boxVr\":\"╟\",\"boxVR\":\"╠\",\"bprime\":\"‵\",\"breve\":\"˘\",\"Breve\":\"˘\",\"brvbar\":\"¦\",\"bscr\":\"𝒷\",\"Bscr\":\"ℬ\",\"bsemi\":\"⁏\",\"bsim\":\"∽\",\"bsime\":\"⋍\",\"bsolb\":\"⧅\",\"bsol\":\"\\\\\",\"bsolhsub\":\"⟈\",\"bull\":\"•\",\"bullet\":\"•\",\"bump\":\"≎\",\"bumpE\":\"⪮\",\"bumpe\":\"≏\",\"Bumpeq\":\"≎\",\"bumpeq\":\"≏\",\"Cacute\":\"Ć\",\"cacute\":\"ć\",\"capand\":\"⩄\",\"capbrcup\":\"⩉\",\"capcap\":\"⩋\",\"cap\":\"∩\",\"Cap\":\"⋒\",\"capcup\":\"⩇\",\"capdot\":\"⩀\",\"CapitalDifferentialD\":\"ⅅ\",\"caps\":\"∩︀\",\"caret\":\"⁁\",\"caron\":\"ˇ\",\"Cayleys\":\"ℭ\",\"ccaps\":\"⩍\",\"Ccaron\":\"Č\",\"ccaron\":\"č\",\"Ccedil\":\"Ç\",\"ccedil\":\"ç\",\"Ccirc\":\"Ĉ\",\"ccirc\":\"ĉ\",\"Cconint\":\"∰\",\"ccups\":\"⩌\",\"ccupssm\":\"⩐\",\"Cdot\":\"Ċ\",\"cdot\":\"ċ\",\"cedil\":\"¸\",\"Cedilla\":\"¸\",\"cemptyv\":\"⦲\",\"cent\":\"¢\",\"centerdot\":\"·\",\"CenterDot\":\"·\",\"cfr\":\"𝔠\",\"Cfr\":\"ℭ\",\"CHcy\":\"Ч\",\"chcy\":\"ч\",\"check\":\"✓\",\"checkmark\":\"✓\",\"Chi\":\"Χ\",\"chi\":\"χ\",\"circ\":\"ˆ\",\"circeq\":\"≗\",\"circlearrowleft\":\"↺\",\"circlearrowright\":\"↻\",\"circledast\":\"⊛\",\"circledcirc\":\"⊚\",\"circleddash\":\"⊝\",\"CircleDot\":\"⊙\",\"circledR\":\"®\",\"circledS\":\"Ⓢ\",\"CircleMinus\":\"⊖\",\"CirclePlus\":\"⊕\",\"CircleTimes\":\"⊗\",\"cir\":\"○\",\"cirE\":\"⧃\",\"cire\":\"≗\",\"cirfnint\":\"⨐\",\"cirmid\":\"⫯\",\"cirscir\":\"⧂\",\"ClockwiseContourIntegral\":\"∲\",\"CloseCurlyDoubleQuote\":\"”\",\"CloseCurlyQuote\":\"’\",\"clubs\":\"♣\",\"clubsuit\":\"♣\",\"colon\":\":\",\"Colon\":\"∷\",\"Colone\":\"⩴\",\"colone\":\"≔\",\"coloneq\":\"≔\",\"comma\":\",\",\"commat\":\"@\",\"comp\":\"∁\",\"compfn\":\"∘\",\"complement\":\"∁\",\"complexes\":\"ℂ\",\"cong\":\"≅\",\"congdot\":\"⩭\",\"Congruent\":\"≡\",\"conint\":\"∮\",\"Conint\":\"∯\",\"ContourIntegral\":\"∮\",\"copf\":\"𝕔\",\"Copf\":\"ℂ\",\"coprod\":\"∐\",\"Coproduct\":\"∐\",\"copy\":\"©\",\"COPY\":\"©\",\"copysr\":\"℗\",\"CounterClockwiseContourIntegral\":\"∳\",\"crarr\":\"↵\",\"cross\":\"✗\",\"Cross\":\"⨯\",\"Cscr\":\"𝒞\",\"cscr\":\"𝒸\",\"csub\":\"⫏\",\"csube\":\"⫑\",\"csup\":\"⫐\",\"csupe\":\"⫒\",\"ctdot\":\"⋯\",\"cudarrl\":\"⤸\",\"cudarrr\":\"⤵\",\"cuepr\":\"⋞\",\"cuesc\":\"⋟\",\"cularr\":\"↶\",\"cularrp\":\"⤽\",\"cupbrcap\":\"⩈\",\"cupcap\":\"⩆\",\"CupCap\":\"≍\",\"cup\":\"∪\",\"Cup\":\"⋓\",\"cupcup\":\"⩊\",\"cupdot\":\"⊍\",\"cupor\":\"⩅\",\"cups\":\"∪︀\",\"curarr\":\"↷\",\"curarrm\":\"⤼\",\"curlyeqprec\":\"⋞\",\"curlyeqsucc\":\"⋟\",\"curlyvee\":\"⋎\",\"curlywedge\":\"⋏\",\"curren\":\"¤\",\"curvearrowleft\":\"↶\",\"curvearrowright\":\"↷\",\"cuvee\":\"⋎\",\"cuwed\":\"⋏\",\"cwconint\":\"∲\",\"cwint\":\"∱\",\"cylcty\":\"⌭\",\"dagger\":\"†\",\"Dagger\":\"‡\",\"daleth\":\"ℸ\",\"darr\":\"↓\",\"Darr\":\"↡\",\"dArr\":\"⇓\",\"dash\":\"‐\",\"Dashv\":\"⫤\",\"dashv\":\"⊣\",\"dbkarow\":\"⤏\",\"dblac\":\"˝\",\"Dcaron\":\"Ď\",\"dcaron\":\"ď\",\"Dcy\":\"Д\",\"dcy\":\"д\",\"ddagger\":\"‡\",\"ddarr\":\"⇊\",\"DD\":\"ⅅ\",\"dd\":\"ⅆ\",\"DDotrahd\":\"⤑\",\"ddotseq\":\"⩷\",\"deg\":\"°\",\"Del\":\"∇\",\"Delta\":\"Δ\",\"delta\":\"δ\",\"demptyv\":\"⦱\",\"dfisht\":\"⥿\",\"Dfr\":\"𝔇\",\"dfr\":\"𝔡\",\"dHar\":\"⥥\",\"dharl\":\"⇃\",\"dharr\":\"⇂\",\"DiacriticalAcute\":\"´\",\"DiacriticalDot\":\"˙\",\"DiacriticalDoubleAcute\":\"˝\",\"DiacriticalGrave\":\"`\",\"DiacriticalTilde\":\"˜\",\"diam\":\"⋄\",\"diamond\":\"⋄\",\"Diamond\":\"⋄\",\"diamondsuit\":\"♦\",\"diams\":\"♦\",\"die\":\"¨\",\"DifferentialD\":\"ⅆ\",\"digamma\":\"ϝ\",\"disin\":\"⋲\",\"div\":\"÷\",\"divide\":\"÷\",\"divideontimes\":\"⋇\",\"divonx\":\"⋇\",\"DJcy\":\"Ђ\",\"djcy\":\"ђ\",\"dlcorn\":\"⌞\",\"dlcrop\":\"⌍\",\"dollar\":\"$\",\"Dopf\":\"𝔻\",\"dopf\":\"𝕕\",\"Dot\":\"¨\",\"dot\":\"˙\",\"DotDot\":\"⃜\",\"doteq\":\"≐\",\"doteqdot\":\"≑\",\"DotEqual\":\"≐\",\"dotminus\":\"∸\",\"dotplus\":\"∔\",\"dotsquare\":\"⊡\",\"doublebarwedge\":\"⌆\",\"DoubleContourIntegral\":\"∯\",\"DoubleDot\":\"¨\",\"DoubleDownArrow\":\"⇓\",\"DoubleLeftArrow\":\"⇐\",\"DoubleLeftRightArrow\":\"⇔\",\"DoubleLeftTee\":\"⫤\",\"DoubleLongLeftArrow\":\"⟸\",\"DoubleLongLeftRightArrow\":\"⟺\",\"DoubleLongRightArrow\":\"⟹\",\"DoubleRightArrow\":\"⇒\",\"DoubleRightTee\":\"⊨\",\"DoubleUpArrow\":\"⇑\",\"DoubleUpDownArrow\":\"⇕\",\"DoubleVerticalBar\":\"∥\",\"DownArrowBar\":\"⤓\",\"downarrow\":\"↓\",\"DownArrow\":\"↓\",\"Downarrow\":\"⇓\",\"DownArrowUpArrow\":\"⇵\",\"DownBreve\":\"̑\",\"downdownarrows\":\"⇊\",\"downharpoonleft\":\"⇃\",\"downharpoonright\":\"⇂\",\"DownLeftRightVector\":\"⥐\",\"DownLeftTeeVector\":\"⥞\",\"DownLeftVectorBar\":\"⥖\",\"DownLeftVector\":\"↽\",\"DownRightTeeVector\":\"⥟\",\"DownRightVectorBar\":\"⥗\",\"DownRightVector\":\"⇁\",\"DownTeeArrow\":\"↧\",\"DownTee\":\"⊤\",\"drbkarow\":\"⤐\",\"drcorn\":\"⌟\",\"drcrop\":\"⌌\",\"Dscr\":\"𝒟\",\"dscr\":\"𝒹\",\"DScy\":\"Ѕ\",\"dscy\":\"ѕ\",\"dsol\":\"⧶\",\"Dstrok\":\"Đ\",\"dstrok\":\"đ\",\"dtdot\":\"⋱\",\"dtri\":\"▿\",\"dtrif\":\"▾\",\"duarr\":\"⇵\",\"duhar\":\"⥯\",\"dwangle\":\"⦦\",\"DZcy\":\"Џ\",\"dzcy\":\"џ\",\"dzigrarr\":\"⟿\",\"Eacute\":\"É\",\"eacute\":\"é\",\"easter\":\"⩮\",\"Ecaron\":\"Ě\",\"ecaron\":\"ě\",\"Ecirc\":\"Ê\",\"ecirc\":\"ê\",\"ecir\":\"≖\",\"ecolon\":\"≕\",\"Ecy\":\"Э\",\"ecy\":\"э\",\"eDDot\":\"⩷\",\"Edot\":\"Ė\",\"edot\":\"ė\",\"eDot\":\"≑\",\"ee\":\"ⅇ\",\"efDot\":\"≒\",\"Efr\":\"𝔈\",\"efr\":\"𝔢\",\"eg\":\"⪚\",\"Egrave\":\"È\",\"egrave\":\"è\",\"egs\":\"⪖\",\"egsdot\":\"⪘\",\"el\":\"⪙\",\"Element\":\"∈\",\"elinters\":\"⏧\",\"ell\":\"ℓ\",\"els\":\"⪕\",\"elsdot\":\"⪗\",\"Emacr\":\"Ē\",\"emacr\":\"ē\",\"empty\":\"∅\",\"emptyset\":\"∅\",\"EmptySmallSquare\":\"◻\",\"emptyv\":\"∅\",\"EmptyVerySmallSquare\":\"▫\",\"emsp13\":\" \",\"emsp14\":\" \",\"emsp\":\" \",\"ENG\":\"Ŋ\",\"eng\":\"ŋ\",\"ensp\":\" \",\"Eogon\":\"Ę\",\"eogon\":\"ę\",\"Eopf\":\"𝔼\",\"eopf\":\"𝕖\",\"epar\":\"⋕\",\"eparsl\":\"⧣\",\"eplus\":\"⩱\",\"epsi\":\"ε\",\"Epsilon\":\"Ε\",\"epsilon\":\"ε\",\"epsiv\":\"ϵ\",\"eqcirc\":\"≖\",\"eqcolon\":\"≕\",\"eqsim\":\"≂\",\"eqslantgtr\":\"⪖\",\"eqslantless\":\"⪕\",\"Equal\":\"⩵\",\"equals\":\"=\",\"EqualTilde\":\"≂\",\"equest\":\"≟\",\"Equilibrium\":\"⇌\",\"equiv\":\"≡\",\"equivDD\":\"⩸\",\"eqvparsl\":\"⧥\",\"erarr\":\"⥱\",\"erDot\":\"≓\",\"escr\":\"ℯ\",\"Escr\":\"ℰ\",\"esdot\":\"≐\",\"Esim\":\"⩳\",\"esim\":\"≂\",\"Eta\":\"Η\",\"eta\":\"η\",\"ETH\":\"Ð\",\"eth\":\"ð\",\"Euml\":\"Ë\",\"euml\":\"ë\",\"euro\":\"€\",\"excl\":\"!\",\"exist\":\"∃\",\"Exists\":\"∃\",\"expectation\":\"ℰ\",\"exponentiale\":\"ⅇ\",\"ExponentialE\":\"ⅇ\",\"fallingdotseq\":\"≒\",\"Fcy\":\"Ф\",\"fcy\":\"ф\",\"female\":\"♀\",\"ffilig\":\"ffi\",\"fflig\":\"ff\",\"ffllig\":\"ffl\",\"Ffr\":\"𝔉\",\"ffr\":\"𝔣\",\"filig\":\"fi\",\"FilledSmallSquare\":\"◼\",\"FilledVerySmallSquare\":\"▪\",\"fjlig\":\"fj\",\"flat\":\"♭\",\"fllig\":\"fl\",\"fltns\":\"▱\",\"fnof\":\"ƒ\",\"Fopf\":\"𝔽\",\"fopf\":\"𝕗\",\"forall\":\"∀\",\"ForAll\":\"∀\",\"fork\":\"⋔\",\"forkv\":\"⫙\",\"Fouriertrf\":\"ℱ\",\"fpartint\":\"⨍\",\"frac12\":\"½\",\"frac13\":\"⅓\",\"frac14\":\"¼\",\"frac15\":\"⅕\",\"frac16\":\"⅙\",\"frac18\":\"⅛\",\"frac23\":\"⅔\",\"frac25\":\"⅖\",\"frac34\":\"¾\",\"frac35\":\"⅗\",\"frac38\":\"⅜\",\"frac45\":\"⅘\",\"frac56\":\"⅚\",\"frac58\":\"⅝\",\"frac78\":\"⅞\",\"frasl\":\"⁄\",\"frown\":\"⌢\",\"fscr\":\"𝒻\",\"Fscr\":\"ℱ\",\"gacute\":\"ǵ\",\"Gamma\":\"Γ\",\"gamma\":\"γ\",\"Gammad\":\"Ϝ\",\"gammad\":\"ϝ\",\"gap\":\"⪆\",\"Gbreve\":\"Ğ\",\"gbreve\":\"ğ\",\"Gcedil\":\"Ģ\",\"Gcirc\":\"Ĝ\",\"gcirc\":\"ĝ\",\"Gcy\":\"Г\",\"gcy\":\"г\",\"Gdot\":\"Ġ\",\"gdot\":\"ġ\",\"ge\":\"≥\",\"gE\":\"≧\",\"gEl\":\"⪌\",\"gel\":\"⋛\",\"geq\":\"≥\",\"geqq\":\"≧\",\"geqslant\":\"⩾\",\"gescc\":\"⪩\",\"ges\":\"⩾\",\"gesdot\":\"⪀\",\"gesdoto\":\"⪂\",\"gesdotol\":\"⪄\",\"gesl\":\"⋛︀\",\"gesles\":\"⪔\",\"Gfr\":\"𝔊\",\"gfr\":\"𝔤\",\"gg\":\"≫\",\"Gg\":\"⋙\",\"ggg\":\"⋙\",\"gimel\":\"ℷ\",\"GJcy\":\"Ѓ\",\"gjcy\":\"ѓ\",\"gla\":\"⪥\",\"gl\":\"≷\",\"glE\":\"⪒\",\"glj\":\"⪤\",\"gnap\":\"⪊\",\"gnapprox\":\"⪊\",\"gne\":\"⪈\",\"gnE\":\"≩\",\"gneq\":\"⪈\",\"gneqq\":\"≩\",\"gnsim\":\"⋧\",\"Gopf\":\"𝔾\",\"gopf\":\"𝕘\",\"grave\":\"`\",\"GreaterEqual\":\"≥\",\"GreaterEqualLess\":\"⋛\",\"GreaterFullEqual\":\"≧\",\"GreaterGreater\":\"⪢\",\"GreaterLess\":\"≷\",\"GreaterSlantEqual\":\"⩾\",\"GreaterTilde\":\"≳\",\"Gscr\":\"𝒢\",\"gscr\":\"ℊ\",\"gsim\":\"≳\",\"gsime\":\"⪎\",\"gsiml\":\"⪐\",\"gtcc\":\"⪧\",\"gtcir\":\"⩺\",\"gt\":\">\",\"GT\":\">\",\"Gt\":\"≫\",\"gtdot\":\"⋗\",\"gtlPar\":\"⦕\",\"gtquest\":\"⩼\",\"gtrapprox\":\"⪆\",\"gtrarr\":\"⥸\",\"gtrdot\":\"⋗\",\"gtreqless\":\"⋛\",\"gtreqqless\":\"⪌\",\"gtrless\":\"≷\",\"gtrsim\":\"≳\",\"gvertneqq\":\"≩︀\",\"gvnE\":\"≩︀\",\"Hacek\":\"ˇ\",\"hairsp\":\" \",\"half\":\"½\",\"hamilt\":\"ℋ\",\"HARDcy\":\"Ъ\",\"hardcy\":\"ъ\",\"harrcir\":\"⥈\",\"harr\":\"↔\",\"hArr\":\"⇔\",\"harrw\":\"↭\",\"Hat\":\"^\",\"hbar\":\"ℏ\",\"Hcirc\":\"Ĥ\",\"hcirc\":\"ĥ\",\"hearts\":\"♥\",\"heartsuit\":\"♥\",\"hellip\":\"…\",\"hercon\":\"⊹\",\"hfr\":\"𝔥\",\"Hfr\":\"ℌ\",\"HilbertSpace\":\"ℋ\",\"hksearow\":\"⤥\",\"hkswarow\":\"⤦\",\"hoarr\":\"⇿\",\"homtht\":\"∻\",\"hookleftarrow\":\"↩\",\"hookrightarrow\":\"↪\",\"hopf\":\"𝕙\",\"Hopf\":\"ℍ\",\"horbar\":\"―\",\"HorizontalLine\":\"─\",\"hscr\":\"𝒽\",\"Hscr\":\"ℋ\",\"hslash\":\"ℏ\",\"Hstrok\":\"Ħ\",\"hstrok\":\"ħ\",\"HumpDownHump\":\"≎\",\"HumpEqual\":\"≏\",\"hybull\":\"⁃\",\"hyphen\":\"‐\",\"Iacute\":\"Í\",\"iacute\":\"í\",\"ic\":\"⁣\",\"Icirc\":\"Î\",\"icirc\":\"î\",\"Icy\":\"И\",\"icy\":\"и\",\"Idot\":\"İ\",\"IEcy\":\"Е\",\"iecy\":\"е\",\"iexcl\":\"¡\",\"iff\":\"⇔\",\"ifr\":\"𝔦\",\"Ifr\":\"ℑ\",\"Igrave\":\"Ì\",\"igrave\":\"ì\",\"ii\":\"ⅈ\",\"iiiint\":\"⨌\",\"iiint\":\"∭\",\"iinfin\":\"⧜\",\"iiota\":\"℩\",\"IJlig\":\"IJ\",\"ijlig\":\"ij\",\"Imacr\":\"Ī\",\"imacr\":\"ī\",\"image\":\"ℑ\",\"ImaginaryI\":\"ⅈ\",\"imagline\":\"ℐ\",\"imagpart\":\"ℑ\",\"imath\":\"ı\",\"Im\":\"ℑ\",\"imof\":\"⊷\",\"imped\":\"Ƶ\",\"Implies\":\"⇒\",\"incare\":\"℅\",\"in\":\"∈\",\"infin\":\"∞\",\"infintie\":\"⧝\",\"inodot\":\"ı\",\"intcal\":\"⊺\",\"int\":\"∫\",\"Int\":\"∬\",\"integers\":\"ℤ\",\"Integral\":\"∫\",\"intercal\":\"⊺\",\"Intersection\":\"⋂\",\"intlarhk\":\"⨗\",\"intprod\":\"⨼\",\"InvisibleComma\":\"⁣\",\"InvisibleTimes\":\"⁢\",\"IOcy\":\"Ё\",\"iocy\":\"ё\",\"Iogon\":\"Į\",\"iogon\":\"į\",\"Iopf\":\"𝕀\",\"iopf\":\"𝕚\",\"Iota\":\"Ι\",\"iota\":\"ι\",\"iprod\":\"⨼\",\"iquest\":\"¿\",\"iscr\":\"𝒾\",\"Iscr\":\"ℐ\",\"isin\":\"∈\",\"isindot\":\"⋵\",\"isinE\":\"⋹\",\"isins\":\"⋴\",\"isinsv\":\"⋳\",\"isinv\":\"∈\",\"it\":\"⁢\",\"Itilde\":\"Ĩ\",\"itilde\":\"ĩ\",\"Iukcy\":\"І\",\"iukcy\":\"і\",\"Iuml\":\"Ï\",\"iuml\":\"ï\",\"Jcirc\":\"Ĵ\",\"jcirc\":\"ĵ\",\"Jcy\":\"Й\",\"jcy\":\"й\",\"Jfr\":\"𝔍\",\"jfr\":\"𝔧\",\"jmath\":\"ȷ\",\"Jopf\":\"𝕁\",\"jopf\":\"𝕛\",\"Jscr\":\"𝒥\",\"jscr\":\"𝒿\",\"Jsercy\":\"Ј\",\"jsercy\":\"ј\",\"Jukcy\":\"Є\",\"jukcy\":\"є\",\"Kappa\":\"Κ\",\"kappa\":\"κ\",\"kappav\":\"ϰ\",\"Kcedil\":\"Ķ\",\"kcedil\":\"ķ\",\"Kcy\":\"К\",\"kcy\":\"к\",\"Kfr\":\"𝔎\",\"kfr\":\"𝔨\",\"kgreen\":\"ĸ\",\"KHcy\":\"Х\",\"khcy\":\"х\",\"KJcy\":\"Ќ\",\"kjcy\":\"ќ\",\"Kopf\":\"𝕂\",\"kopf\":\"𝕜\",\"Kscr\":\"𝒦\",\"kscr\":\"𝓀\",\"lAarr\":\"⇚\",\"Lacute\":\"Ĺ\",\"lacute\":\"ĺ\",\"laemptyv\":\"⦴\",\"lagran\":\"ℒ\",\"Lambda\":\"Λ\",\"lambda\":\"λ\",\"lang\":\"⟨\",\"Lang\":\"⟪\",\"langd\":\"⦑\",\"langle\":\"⟨\",\"lap\":\"⪅\",\"Laplacetrf\":\"ℒ\",\"laquo\":\"«\",\"larrb\":\"⇤\",\"larrbfs\":\"⤟\",\"larr\":\"←\",\"Larr\":\"↞\",\"lArr\":\"⇐\",\"larrfs\":\"⤝\",\"larrhk\":\"↩\",\"larrlp\":\"↫\",\"larrpl\":\"⤹\",\"larrsim\":\"⥳\",\"larrtl\":\"↢\",\"latail\":\"⤙\",\"lAtail\":\"⤛\",\"lat\":\"⪫\",\"late\":\"⪭\",\"lates\":\"⪭︀\",\"lbarr\":\"⤌\",\"lBarr\":\"⤎\",\"lbbrk\":\"❲\",\"lbrace\":\"{\",\"lbrack\":\"[\",\"lbrke\":\"⦋\",\"lbrksld\":\"⦏\",\"lbrkslu\":\"⦍\",\"Lcaron\":\"Ľ\",\"lcaron\":\"ľ\",\"Lcedil\":\"Ļ\",\"lcedil\":\"ļ\",\"lceil\":\"⌈\",\"lcub\":\"{\",\"Lcy\":\"Л\",\"lcy\":\"л\",\"ldca\":\"⤶\",\"ldquo\":\"“\",\"ldquor\":\"„\",\"ldrdhar\":\"⥧\",\"ldrushar\":\"⥋\",\"ldsh\":\"↲\",\"le\":\"≤\",\"lE\":\"≦\",\"LeftAngleBracket\":\"⟨\",\"LeftArrowBar\":\"⇤\",\"leftarrow\":\"←\",\"LeftArrow\":\"←\",\"Leftarrow\":\"⇐\",\"LeftArrowRightArrow\":\"⇆\",\"leftarrowtail\":\"↢\",\"LeftCeiling\":\"⌈\",\"LeftDoubleBracket\":\"⟦\",\"LeftDownTeeVector\":\"⥡\",\"LeftDownVectorBar\":\"⥙\",\"LeftDownVector\":\"⇃\",\"LeftFloor\":\"⌊\",\"leftharpoondown\":\"↽\",\"leftharpoonup\":\"↼\",\"leftleftarrows\":\"⇇\",\"leftrightarrow\":\"↔\",\"LeftRightArrow\":\"↔\",\"Leftrightarrow\":\"⇔\",\"leftrightarrows\":\"⇆\",\"leftrightharpoons\":\"⇋\",\"leftrightsquigarrow\":\"↭\",\"LeftRightVector\":\"⥎\",\"LeftTeeArrow\":\"↤\",\"LeftTee\":\"⊣\",\"LeftTeeVector\":\"⥚\",\"leftthreetimes\":\"⋋\",\"LeftTriangleBar\":\"⧏\",\"LeftTriangle\":\"⊲\",\"LeftTriangleEqual\":\"⊴\",\"LeftUpDownVector\":\"⥑\",\"LeftUpTeeVector\":\"⥠\",\"LeftUpVectorBar\":\"⥘\",\"LeftUpVector\":\"↿\",\"LeftVectorBar\":\"⥒\",\"LeftVector\":\"↼\",\"lEg\":\"⪋\",\"leg\":\"⋚\",\"leq\":\"≤\",\"leqq\":\"≦\",\"leqslant\":\"⩽\",\"lescc\":\"⪨\",\"les\":\"⩽\",\"lesdot\":\"⩿\",\"lesdoto\":\"⪁\",\"lesdotor\":\"⪃\",\"lesg\":\"⋚︀\",\"lesges\":\"⪓\",\"lessapprox\":\"⪅\",\"lessdot\":\"⋖\",\"lesseqgtr\":\"⋚\",\"lesseqqgtr\":\"⪋\",\"LessEqualGreater\":\"⋚\",\"LessFullEqual\":\"≦\",\"LessGreater\":\"≶\",\"lessgtr\":\"≶\",\"LessLess\":\"⪡\",\"lesssim\":\"≲\",\"LessSlantEqual\":\"⩽\",\"LessTilde\":\"≲\",\"lfisht\":\"⥼\",\"lfloor\":\"⌊\",\"Lfr\":\"𝔏\",\"lfr\":\"𝔩\",\"lg\":\"≶\",\"lgE\":\"⪑\",\"lHar\":\"⥢\",\"lhard\":\"↽\",\"lharu\":\"↼\",\"lharul\":\"⥪\",\"lhblk\":\"▄\",\"LJcy\":\"Љ\",\"ljcy\":\"љ\",\"llarr\":\"⇇\",\"ll\":\"≪\",\"Ll\":\"⋘\",\"llcorner\":\"⌞\",\"Lleftarrow\":\"⇚\",\"llhard\":\"⥫\",\"lltri\":\"◺\",\"Lmidot\":\"Ŀ\",\"lmidot\":\"ŀ\",\"lmoustache\":\"⎰\",\"lmoust\":\"⎰\",\"lnap\":\"⪉\",\"lnapprox\":\"⪉\",\"lne\":\"⪇\",\"lnE\":\"≨\",\"lneq\":\"⪇\",\"lneqq\":\"≨\",\"lnsim\":\"⋦\",\"loang\":\"⟬\",\"loarr\":\"⇽\",\"lobrk\":\"⟦\",\"longleftarrow\":\"⟵\",\"LongLeftArrow\":\"⟵\",\"Longleftarrow\":\"⟸\",\"longleftrightarrow\":\"⟷\",\"LongLeftRightArrow\":\"⟷\",\"Longleftrightarrow\":\"⟺\",\"longmapsto\":\"⟼\",\"longrightarrow\":\"⟶\",\"LongRightArrow\":\"⟶\",\"Longrightarrow\":\"⟹\",\"looparrowleft\":\"↫\",\"looparrowright\":\"↬\",\"lopar\":\"⦅\",\"Lopf\":\"𝕃\",\"lopf\":\"𝕝\",\"loplus\":\"⨭\",\"lotimes\":\"⨴\",\"lowast\":\"∗\",\"lowbar\":\"_\",\"LowerLeftArrow\":\"↙\",\"LowerRightArrow\":\"↘\",\"loz\":\"◊\",\"lozenge\":\"◊\",\"lozf\":\"⧫\",\"lpar\":\"(\",\"lparlt\":\"⦓\",\"lrarr\":\"⇆\",\"lrcorner\":\"⌟\",\"lrhar\":\"⇋\",\"lrhard\":\"⥭\",\"lrm\":\"‎\",\"lrtri\":\"⊿\",\"lsaquo\":\"‹\",\"lscr\":\"𝓁\",\"Lscr\":\"ℒ\",\"lsh\":\"↰\",\"Lsh\":\"↰\",\"lsim\":\"≲\",\"lsime\":\"⪍\",\"lsimg\":\"⪏\",\"lsqb\":\"[\",\"lsquo\":\"‘\",\"lsquor\":\"‚\",\"Lstrok\":\"Ł\",\"lstrok\":\"ł\",\"ltcc\":\"⪦\",\"ltcir\":\"⩹\",\"lt\":\"<\",\"LT\":\"<\",\"Lt\":\"≪\",\"ltdot\":\"⋖\",\"lthree\":\"⋋\",\"ltimes\":\"⋉\",\"ltlarr\":\"⥶\",\"ltquest\":\"⩻\",\"ltri\":\"◃\",\"ltrie\":\"⊴\",\"ltrif\":\"◂\",\"ltrPar\":\"⦖\",\"lurdshar\":\"⥊\",\"luruhar\":\"⥦\",\"lvertneqq\":\"≨︀\",\"lvnE\":\"≨︀\",\"macr\":\"¯\",\"male\":\"♂\",\"malt\":\"✠\",\"maltese\":\"✠\",\"Map\":\"⤅\",\"map\":\"↦\",\"mapsto\":\"↦\",\"mapstodown\":\"↧\",\"mapstoleft\":\"↤\",\"mapstoup\":\"↥\",\"marker\":\"▮\",\"mcomma\":\"⨩\",\"Mcy\":\"М\",\"mcy\":\"м\",\"mdash\":\"—\",\"mDDot\":\"∺\",\"measuredangle\":\"∡\",\"MediumSpace\":\" \",\"Mellintrf\":\"ℳ\",\"Mfr\":\"𝔐\",\"mfr\":\"𝔪\",\"mho\":\"℧\",\"micro\":\"µ\",\"midast\":\"*\",\"midcir\":\"⫰\",\"mid\":\"∣\",\"middot\":\"·\",\"minusb\":\"⊟\",\"minus\":\"−\",\"minusd\":\"∸\",\"minusdu\":\"⨪\",\"MinusPlus\":\"∓\",\"mlcp\":\"⫛\",\"mldr\":\"…\",\"mnplus\":\"∓\",\"models\":\"⊧\",\"Mopf\":\"𝕄\",\"mopf\":\"𝕞\",\"mp\":\"∓\",\"mscr\":\"𝓂\",\"Mscr\":\"ℳ\",\"mstpos\":\"∾\",\"Mu\":\"Μ\",\"mu\":\"μ\",\"multimap\":\"⊸\",\"mumap\":\"⊸\",\"nabla\":\"∇\",\"Nacute\":\"Ń\",\"nacute\":\"ń\",\"nang\":\"∠⃒\",\"nap\":\"≉\",\"napE\":\"⩰̸\",\"napid\":\"≋̸\",\"napos\":\"ʼn\",\"napprox\":\"≉\",\"natural\":\"♮\",\"naturals\":\"ℕ\",\"natur\":\"♮\",\"nbsp\":\" \",\"nbump\":\"≎̸\",\"nbumpe\":\"≏̸\",\"ncap\":\"⩃\",\"Ncaron\":\"Ň\",\"ncaron\":\"ň\",\"Ncedil\":\"Ņ\",\"ncedil\":\"ņ\",\"ncong\":\"≇\",\"ncongdot\":\"⩭̸\",\"ncup\":\"⩂\",\"Ncy\":\"Н\",\"ncy\":\"н\",\"ndash\":\"–\",\"nearhk\":\"⤤\",\"nearr\":\"↗\",\"neArr\":\"⇗\",\"nearrow\":\"↗\",\"ne\":\"≠\",\"nedot\":\"≐̸\",\"NegativeMediumSpace\":\"​\",\"NegativeThickSpace\":\"​\",\"NegativeThinSpace\":\"​\",\"NegativeVeryThinSpace\":\"​\",\"nequiv\":\"≢\",\"nesear\":\"⤨\",\"nesim\":\"≂̸\",\"NestedGreaterGreater\":\"≫\",\"NestedLessLess\":\"≪\",\"NewLine\":\"\\n\",\"nexist\":\"∄\",\"nexists\":\"∄\",\"Nfr\":\"𝔑\",\"nfr\":\"𝔫\",\"ngE\":\"≧̸\",\"nge\":\"≱\",\"ngeq\":\"≱\",\"ngeqq\":\"≧̸\",\"ngeqslant\":\"⩾̸\",\"nges\":\"⩾̸\",\"nGg\":\"⋙̸\",\"ngsim\":\"≵\",\"nGt\":\"≫⃒\",\"ngt\":\"≯\",\"ngtr\":\"≯\",\"nGtv\":\"≫̸\",\"nharr\":\"↮\",\"nhArr\":\"⇎\",\"nhpar\":\"⫲\",\"ni\":\"∋\",\"nis\":\"⋼\",\"nisd\":\"⋺\",\"niv\":\"∋\",\"NJcy\":\"Њ\",\"njcy\":\"њ\",\"nlarr\":\"↚\",\"nlArr\":\"⇍\",\"nldr\":\"‥\",\"nlE\":\"≦̸\",\"nle\":\"≰\",\"nleftarrow\":\"↚\",\"nLeftarrow\":\"⇍\",\"nleftrightarrow\":\"↮\",\"nLeftrightarrow\":\"⇎\",\"nleq\":\"≰\",\"nleqq\":\"≦̸\",\"nleqslant\":\"⩽̸\",\"nles\":\"⩽̸\",\"nless\":\"≮\",\"nLl\":\"⋘̸\",\"nlsim\":\"≴\",\"nLt\":\"≪⃒\",\"nlt\":\"≮\",\"nltri\":\"⋪\",\"nltrie\":\"⋬\",\"nLtv\":\"≪̸\",\"nmid\":\"∤\",\"NoBreak\":\"⁠\",\"NonBreakingSpace\":\" \",\"nopf\":\"𝕟\",\"Nopf\":\"ℕ\",\"Not\":\"⫬\",\"not\":\"¬\",\"NotCongruent\":\"≢\",\"NotCupCap\":\"≭\",\"NotDoubleVerticalBar\":\"∦\",\"NotElement\":\"∉\",\"NotEqual\":\"≠\",\"NotEqualTilde\":\"≂̸\",\"NotExists\":\"∄\",\"NotGreater\":\"≯\",\"NotGreaterEqual\":\"≱\",\"NotGreaterFullEqual\":\"≧̸\",\"NotGreaterGreater\":\"≫̸\",\"NotGreaterLess\":\"≹\",\"NotGreaterSlantEqual\":\"⩾̸\",\"NotGreaterTilde\":\"≵\",\"NotHumpDownHump\":\"≎̸\",\"NotHumpEqual\":\"≏̸\",\"notin\":\"∉\",\"notindot\":\"⋵̸\",\"notinE\":\"⋹̸\",\"notinva\":\"∉\",\"notinvb\":\"⋷\",\"notinvc\":\"⋶\",\"NotLeftTriangleBar\":\"⧏̸\",\"NotLeftTriangle\":\"⋪\",\"NotLeftTriangleEqual\":\"⋬\",\"NotLess\":\"≮\",\"NotLessEqual\":\"≰\",\"NotLessGreater\":\"≸\",\"NotLessLess\":\"≪̸\",\"NotLessSlantEqual\":\"⩽̸\",\"NotLessTilde\":\"≴\",\"NotNestedGreaterGreater\":\"⪢̸\",\"NotNestedLessLess\":\"⪡̸\",\"notni\":\"∌\",\"notniva\":\"∌\",\"notnivb\":\"⋾\",\"notnivc\":\"⋽\",\"NotPrecedes\":\"⊀\",\"NotPrecedesEqual\":\"⪯̸\",\"NotPrecedesSlantEqual\":\"⋠\",\"NotReverseElement\":\"∌\",\"NotRightTriangleBar\":\"⧐̸\",\"NotRightTriangle\":\"⋫\",\"NotRightTriangleEqual\":\"⋭\",\"NotSquareSubset\":\"⊏̸\",\"NotSquareSubsetEqual\":\"⋢\",\"NotSquareSuperset\":\"⊐̸\",\"NotSquareSupersetEqual\":\"⋣\",\"NotSubset\":\"⊂⃒\",\"NotSubsetEqual\":\"⊈\",\"NotSucceeds\":\"⊁\",\"NotSucceedsEqual\":\"⪰̸\",\"NotSucceedsSlantEqual\":\"⋡\",\"NotSucceedsTilde\":\"≿̸\",\"NotSuperset\":\"⊃⃒\",\"NotSupersetEqual\":\"⊉\",\"NotTilde\":\"≁\",\"NotTildeEqual\":\"≄\",\"NotTildeFullEqual\":\"≇\",\"NotTildeTilde\":\"≉\",\"NotVerticalBar\":\"∤\",\"nparallel\":\"∦\",\"npar\":\"∦\",\"nparsl\":\"⫽⃥\",\"npart\":\"∂̸\",\"npolint\":\"⨔\",\"npr\":\"⊀\",\"nprcue\":\"⋠\",\"nprec\":\"⊀\",\"npreceq\":\"⪯̸\",\"npre\":\"⪯̸\",\"nrarrc\":\"⤳̸\",\"nrarr\":\"↛\",\"nrArr\":\"⇏\",\"nrarrw\":\"↝̸\",\"nrightarrow\":\"↛\",\"nRightarrow\":\"⇏\",\"nrtri\":\"⋫\",\"nrtrie\":\"⋭\",\"nsc\":\"⊁\",\"nsccue\":\"⋡\",\"nsce\":\"⪰̸\",\"Nscr\":\"𝒩\",\"nscr\":\"𝓃\",\"nshortmid\":\"∤\",\"nshortparallel\":\"∦\",\"nsim\":\"≁\",\"nsime\":\"≄\",\"nsimeq\":\"≄\",\"nsmid\":\"∤\",\"nspar\":\"∦\",\"nsqsube\":\"⋢\",\"nsqsupe\":\"⋣\",\"nsub\":\"⊄\",\"nsubE\":\"⫅̸\",\"nsube\":\"⊈\",\"nsubset\":\"⊂⃒\",\"nsubseteq\":\"⊈\",\"nsubseteqq\":\"⫅̸\",\"nsucc\":\"⊁\",\"nsucceq\":\"⪰̸\",\"nsup\":\"⊅\",\"nsupE\":\"⫆̸\",\"nsupe\":\"⊉\",\"nsupset\":\"⊃⃒\",\"nsupseteq\":\"⊉\",\"nsupseteqq\":\"⫆̸\",\"ntgl\":\"≹\",\"Ntilde\":\"Ñ\",\"ntilde\":\"ñ\",\"ntlg\":\"≸\",\"ntriangleleft\":\"⋪\",\"ntrianglelefteq\":\"⋬\",\"ntriangleright\":\"⋫\",\"ntrianglerighteq\":\"⋭\",\"Nu\":\"Ν\",\"nu\":\"ν\",\"num\":\"#\",\"numero\":\"№\",\"numsp\":\" \",\"nvap\":\"≍⃒\",\"nvdash\":\"⊬\",\"nvDash\":\"⊭\",\"nVdash\":\"⊮\",\"nVDash\":\"⊯\",\"nvge\":\"≥⃒\",\"nvgt\":\">⃒\",\"nvHarr\":\"⤄\",\"nvinfin\":\"⧞\",\"nvlArr\":\"⤂\",\"nvle\":\"≤⃒\",\"nvlt\":\"<⃒\",\"nvltrie\":\"⊴⃒\",\"nvrArr\":\"⤃\",\"nvrtrie\":\"⊵⃒\",\"nvsim\":\"∼⃒\",\"nwarhk\":\"⤣\",\"nwarr\":\"↖\",\"nwArr\":\"⇖\",\"nwarrow\":\"↖\",\"nwnear\":\"⤧\",\"Oacute\":\"Ó\",\"oacute\":\"ó\",\"oast\":\"⊛\",\"Ocirc\":\"Ô\",\"ocirc\":\"ô\",\"ocir\":\"⊚\",\"Ocy\":\"О\",\"ocy\":\"о\",\"odash\":\"⊝\",\"Odblac\":\"Ő\",\"odblac\":\"ő\",\"odiv\":\"⨸\",\"odot\":\"⊙\",\"odsold\":\"⦼\",\"OElig\":\"Œ\",\"oelig\":\"œ\",\"ofcir\":\"⦿\",\"Ofr\":\"𝔒\",\"ofr\":\"𝔬\",\"ogon\":\"˛\",\"Ograve\":\"Ò\",\"ograve\":\"ò\",\"ogt\":\"⧁\",\"ohbar\":\"⦵\",\"ohm\":\"Ω\",\"oint\":\"∮\",\"olarr\":\"↺\",\"olcir\":\"⦾\",\"olcross\":\"⦻\",\"oline\":\"‾\",\"olt\":\"⧀\",\"Omacr\":\"Ō\",\"omacr\":\"ō\",\"Omega\":\"Ω\",\"omega\":\"ω\",\"Omicron\":\"Ο\",\"omicron\":\"ο\",\"omid\":\"⦶\",\"ominus\":\"⊖\",\"Oopf\":\"𝕆\",\"oopf\":\"𝕠\",\"opar\":\"⦷\",\"OpenCurlyDoubleQuote\":\"“\",\"OpenCurlyQuote\":\"‘\",\"operp\":\"⦹\",\"oplus\":\"⊕\",\"orarr\":\"↻\",\"Or\":\"⩔\",\"or\":\"∨\",\"ord\":\"⩝\",\"order\":\"ℴ\",\"orderof\":\"ℴ\",\"ordf\":\"ª\",\"ordm\":\"º\",\"origof\":\"⊶\",\"oror\":\"⩖\",\"orslope\":\"⩗\",\"orv\":\"⩛\",\"oS\":\"Ⓢ\",\"Oscr\":\"𝒪\",\"oscr\":\"ℴ\",\"Oslash\":\"Ø\",\"oslash\":\"ø\",\"osol\":\"⊘\",\"Otilde\":\"Õ\",\"otilde\":\"õ\",\"otimesas\":\"⨶\",\"Otimes\":\"⨷\",\"otimes\":\"⊗\",\"Ouml\":\"Ö\",\"ouml\":\"ö\",\"ovbar\":\"⌽\",\"OverBar\":\"‾\",\"OverBrace\":\"⏞\",\"OverBracket\":\"⎴\",\"OverParenthesis\":\"⏜\",\"para\":\"¶\",\"parallel\":\"∥\",\"par\":\"∥\",\"parsim\":\"⫳\",\"parsl\":\"⫽\",\"part\":\"∂\",\"PartialD\":\"∂\",\"Pcy\":\"П\",\"pcy\":\"п\",\"percnt\":\"%\",\"period\":\".\",\"permil\":\"‰\",\"perp\":\"⊥\",\"pertenk\":\"‱\",\"Pfr\":\"𝔓\",\"pfr\":\"𝔭\",\"Phi\":\"Φ\",\"phi\":\"φ\",\"phiv\":\"ϕ\",\"phmmat\":\"ℳ\",\"phone\":\"☎\",\"Pi\":\"Π\",\"pi\":\"π\",\"pitchfork\":\"⋔\",\"piv\":\"ϖ\",\"planck\":\"ℏ\",\"planckh\":\"ℎ\",\"plankv\":\"ℏ\",\"plusacir\":\"⨣\",\"plusb\":\"⊞\",\"pluscir\":\"⨢\",\"plus\":\"+\",\"plusdo\":\"∔\",\"plusdu\":\"⨥\",\"pluse\":\"⩲\",\"PlusMinus\":\"±\",\"plusmn\":\"±\",\"plussim\":\"⨦\",\"plustwo\":\"⨧\",\"pm\":\"±\",\"Poincareplane\":\"ℌ\",\"pointint\":\"⨕\",\"popf\":\"𝕡\",\"Popf\":\"ℙ\",\"pound\":\"£\",\"prap\":\"⪷\",\"Pr\":\"⪻\",\"pr\":\"≺\",\"prcue\":\"≼\",\"precapprox\":\"⪷\",\"prec\":\"≺\",\"preccurlyeq\":\"≼\",\"Precedes\":\"≺\",\"PrecedesEqual\":\"⪯\",\"PrecedesSlantEqual\":\"≼\",\"PrecedesTilde\":\"≾\",\"preceq\":\"⪯\",\"precnapprox\":\"⪹\",\"precneqq\":\"⪵\",\"precnsim\":\"⋨\",\"pre\":\"⪯\",\"prE\":\"⪳\",\"precsim\":\"≾\",\"prime\":\"′\",\"Prime\":\"″\",\"primes\":\"ℙ\",\"prnap\":\"⪹\",\"prnE\":\"⪵\",\"prnsim\":\"⋨\",\"prod\":\"∏\",\"Product\":\"∏\",\"profalar\":\"⌮\",\"profline\":\"⌒\",\"profsurf\":\"⌓\",\"prop\":\"∝\",\"Proportional\":\"∝\",\"Proportion\":\"∷\",\"propto\":\"∝\",\"prsim\":\"≾\",\"prurel\":\"⊰\",\"Pscr\":\"𝒫\",\"pscr\":\"𝓅\",\"Psi\":\"Ψ\",\"psi\":\"ψ\",\"puncsp\":\" \",\"Qfr\":\"𝔔\",\"qfr\":\"𝔮\",\"qint\":\"⨌\",\"qopf\":\"𝕢\",\"Qopf\":\"ℚ\",\"qprime\":\"⁗\",\"Qscr\":\"𝒬\",\"qscr\":\"𝓆\",\"quaternions\":\"ℍ\",\"quatint\":\"⨖\",\"quest\":\"?\",\"questeq\":\"≟\",\"quot\":\"\\\"\",\"QUOT\":\"\\\"\",\"rAarr\":\"⇛\",\"race\":\"∽̱\",\"Racute\":\"Ŕ\",\"racute\":\"ŕ\",\"radic\":\"√\",\"raemptyv\":\"⦳\",\"rang\":\"⟩\",\"Rang\":\"⟫\",\"rangd\":\"⦒\",\"range\":\"⦥\",\"rangle\":\"⟩\",\"raquo\":\"»\",\"rarrap\":\"⥵\",\"rarrb\":\"⇥\",\"rarrbfs\":\"⤠\",\"rarrc\":\"⤳\",\"rarr\":\"→\",\"Rarr\":\"↠\",\"rArr\":\"⇒\",\"rarrfs\":\"⤞\",\"rarrhk\":\"↪\",\"rarrlp\":\"↬\",\"rarrpl\":\"⥅\",\"rarrsim\":\"⥴\",\"Rarrtl\":\"⤖\",\"rarrtl\":\"↣\",\"rarrw\":\"↝\",\"ratail\":\"⤚\",\"rAtail\":\"⤜\",\"ratio\":\"∶\",\"rationals\":\"ℚ\",\"rbarr\":\"⤍\",\"rBarr\":\"⤏\",\"RBarr\":\"⤐\",\"rbbrk\":\"❳\",\"rbrace\":\"}\",\"rbrack\":\"]\",\"rbrke\":\"⦌\",\"rbrksld\":\"⦎\",\"rbrkslu\":\"⦐\",\"Rcaron\":\"Ř\",\"rcaron\":\"ř\",\"Rcedil\":\"Ŗ\",\"rcedil\":\"ŗ\",\"rceil\":\"⌉\",\"rcub\":\"}\",\"Rcy\":\"Р\",\"rcy\":\"р\",\"rdca\":\"⤷\",\"rdldhar\":\"⥩\",\"rdquo\":\"”\",\"rdquor\":\"”\",\"rdsh\":\"↳\",\"real\":\"ℜ\",\"realine\":\"ℛ\",\"realpart\":\"ℜ\",\"reals\":\"ℝ\",\"Re\":\"ℜ\",\"rect\":\"▭\",\"reg\":\"®\",\"REG\":\"®\",\"ReverseElement\":\"∋\",\"ReverseEquilibrium\":\"⇋\",\"ReverseUpEquilibrium\":\"⥯\",\"rfisht\":\"⥽\",\"rfloor\":\"⌋\",\"rfr\":\"𝔯\",\"Rfr\":\"ℜ\",\"rHar\":\"⥤\",\"rhard\":\"⇁\",\"rharu\":\"⇀\",\"rharul\":\"⥬\",\"Rho\":\"Ρ\",\"rho\":\"ρ\",\"rhov\":\"ϱ\",\"RightAngleBracket\":\"⟩\",\"RightArrowBar\":\"⇥\",\"rightarrow\":\"→\",\"RightArrow\":\"→\",\"Rightarrow\":\"⇒\",\"RightArrowLeftArrow\":\"⇄\",\"rightarrowtail\":\"↣\",\"RightCeiling\":\"⌉\",\"RightDoubleBracket\":\"⟧\",\"RightDownTeeVector\":\"⥝\",\"RightDownVectorBar\":\"⥕\",\"RightDownVector\":\"⇂\",\"RightFloor\":\"⌋\",\"rightharpoondown\":\"⇁\",\"rightharpoonup\":\"⇀\",\"rightleftarrows\":\"⇄\",\"rightleftharpoons\":\"⇌\",\"rightrightarrows\":\"⇉\",\"rightsquigarrow\":\"↝\",\"RightTeeArrow\":\"↦\",\"RightTee\":\"⊢\",\"RightTeeVector\":\"⥛\",\"rightthreetimes\":\"⋌\",\"RightTriangleBar\":\"⧐\",\"RightTriangle\":\"⊳\",\"RightTriangleEqual\":\"⊵\",\"RightUpDownVector\":\"⥏\",\"RightUpTeeVector\":\"⥜\",\"RightUpVectorBar\":\"⥔\",\"RightUpVector\":\"↾\",\"RightVectorBar\":\"⥓\",\"RightVector\":\"⇀\",\"ring\":\"˚\",\"risingdotseq\":\"≓\",\"rlarr\":\"⇄\",\"rlhar\":\"⇌\",\"rlm\":\"‏\",\"rmoustache\":\"⎱\",\"rmoust\":\"⎱\",\"rnmid\":\"⫮\",\"roang\":\"⟭\",\"roarr\":\"⇾\",\"robrk\":\"⟧\",\"ropar\":\"⦆\",\"ropf\":\"𝕣\",\"Ropf\":\"ℝ\",\"roplus\":\"⨮\",\"rotimes\":\"⨵\",\"RoundImplies\":\"⥰\",\"rpar\":\")\",\"rpargt\":\"⦔\",\"rppolint\":\"⨒\",\"rrarr\":\"⇉\",\"Rrightarrow\":\"⇛\",\"rsaquo\":\"›\",\"rscr\":\"𝓇\",\"Rscr\":\"ℛ\",\"rsh\":\"↱\",\"Rsh\":\"↱\",\"rsqb\":\"]\",\"rsquo\":\"’\",\"rsquor\":\"’\",\"rthree\":\"⋌\",\"rtimes\":\"⋊\",\"rtri\":\"▹\",\"rtrie\":\"⊵\",\"rtrif\":\"▸\",\"rtriltri\":\"⧎\",\"RuleDelayed\":\"⧴\",\"ruluhar\":\"⥨\",\"rx\":\"℞\",\"Sacute\":\"Ś\",\"sacute\":\"ś\",\"sbquo\":\"‚\",\"scap\":\"⪸\",\"Scaron\":\"Š\",\"scaron\":\"š\",\"Sc\":\"⪼\",\"sc\":\"≻\",\"sccue\":\"≽\",\"sce\":\"⪰\",\"scE\":\"⪴\",\"Scedil\":\"Ş\",\"scedil\":\"ş\",\"Scirc\":\"Ŝ\",\"scirc\":\"ŝ\",\"scnap\":\"⪺\",\"scnE\":\"⪶\",\"scnsim\":\"⋩\",\"scpolint\":\"⨓\",\"scsim\":\"≿\",\"Scy\":\"С\",\"scy\":\"с\",\"sdotb\":\"⊡\",\"sdot\":\"⋅\",\"sdote\":\"⩦\",\"searhk\":\"⤥\",\"searr\":\"↘\",\"seArr\":\"⇘\",\"searrow\":\"↘\",\"sect\":\"§\",\"semi\":\";\",\"seswar\":\"⤩\",\"setminus\":\"∖\",\"setmn\":\"∖\",\"sext\":\"✶\",\"Sfr\":\"𝔖\",\"sfr\":\"𝔰\",\"sfrown\":\"⌢\",\"sharp\":\"♯\",\"SHCHcy\":\"Щ\",\"shchcy\":\"щ\",\"SHcy\":\"Ш\",\"shcy\":\"ш\",\"ShortDownArrow\":\"↓\",\"ShortLeftArrow\":\"←\",\"shortmid\":\"∣\",\"shortparallel\":\"∥\",\"ShortRightArrow\":\"→\",\"ShortUpArrow\":\"↑\",\"shy\":\"­\",\"Sigma\":\"Σ\",\"sigma\":\"σ\",\"sigmaf\":\"ς\",\"sigmav\":\"ς\",\"sim\":\"∼\",\"simdot\":\"⩪\",\"sime\":\"≃\",\"simeq\":\"≃\",\"simg\":\"⪞\",\"simgE\":\"⪠\",\"siml\":\"⪝\",\"simlE\":\"⪟\",\"simne\":\"≆\",\"simplus\":\"⨤\",\"simrarr\":\"⥲\",\"slarr\":\"←\",\"SmallCircle\":\"∘\",\"smallsetminus\":\"∖\",\"smashp\":\"⨳\",\"smeparsl\":\"⧤\",\"smid\":\"∣\",\"smile\":\"⌣\",\"smt\":\"⪪\",\"smte\":\"⪬\",\"smtes\":\"⪬︀\",\"SOFTcy\":\"Ь\",\"softcy\":\"ь\",\"solbar\":\"⌿\",\"solb\":\"⧄\",\"sol\":\"/\",\"Sopf\":\"𝕊\",\"sopf\":\"𝕤\",\"spades\":\"♠\",\"spadesuit\":\"♠\",\"spar\":\"∥\",\"sqcap\":\"⊓\",\"sqcaps\":\"⊓︀\",\"sqcup\":\"⊔\",\"sqcups\":\"⊔︀\",\"Sqrt\":\"√\",\"sqsub\":\"⊏\",\"sqsube\":\"⊑\",\"sqsubset\":\"⊏\",\"sqsubseteq\":\"⊑\",\"sqsup\":\"⊐\",\"sqsupe\":\"⊒\",\"sqsupset\":\"⊐\",\"sqsupseteq\":\"⊒\",\"square\":\"□\",\"Square\":\"□\",\"SquareIntersection\":\"⊓\",\"SquareSubset\":\"⊏\",\"SquareSubsetEqual\":\"⊑\",\"SquareSuperset\":\"⊐\",\"SquareSupersetEqual\":\"⊒\",\"SquareUnion\":\"⊔\",\"squarf\":\"▪\",\"squ\":\"□\",\"squf\":\"▪\",\"srarr\":\"→\",\"Sscr\":\"𝒮\",\"sscr\":\"𝓈\",\"ssetmn\":\"∖\",\"ssmile\":\"⌣\",\"sstarf\":\"⋆\",\"Star\":\"⋆\",\"star\":\"☆\",\"starf\":\"★\",\"straightepsilon\":\"ϵ\",\"straightphi\":\"ϕ\",\"strns\":\"¯\",\"sub\":\"⊂\",\"Sub\":\"⋐\",\"subdot\":\"⪽\",\"subE\":\"⫅\",\"sube\":\"⊆\",\"subedot\":\"⫃\",\"submult\":\"⫁\",\"subnE\":\"⫋\",\"subne\":\"⊊\",\"subplus\":\"⪿\",\"subrarr\":\"⥹\",\"subset\":\"⊂\",\"Subset\":\"⋐\",\"subseteq\":\"⊆\",\"subseteqq\":\"⫅\",\"SubsetEqual\":\"⊆\",\"subsetneq\":\"⊊\",\"subsetneqq\":\"⫋\",\"subsim\":\"⫇\",\"subsub\":\"⫕\",\"subsup\":\"⫓\",\"succapprox\":\"⪸\",\"succ\":\"≻\",\"succcurlyeq\":\"≽\",\"Succeeds\":\"≻\",\"SucceedsEqual\":\"⪰\",\"SucceedsSlantEqual\":\"≽\",\"SucceedsTilde\":\"≿\",\"succeq\":\"⪰\",\"succnapprox\":\"⪺\",\"succneqq\":\"⪶\",\"succnsim\":\"⋩\",\"succsim\":\"≿\",\"SuchThat\":\"∋\",\"sum\":\"∑\",\"Sum\":\"∑\",\"sung\":\"♪\",\"sup1\":\"¹\",\"sup2\":\"²\",\"sup3\":\"³\",\"sup\":\"⊃\",\"Sup\":\"⋑\",\"supdot\":\"⪾\",\"supdsub\":\"⫘\",\"supE\":\"⫆\",\"supe\":\"⊇\",\"supedot\":\"⫄\",\"Superset\":\"⊃\",\"SupersetEqual\":\"⊇\",\"suphsol\":\"⟉\",\"suphsub\":\"⫗\",\"suplarr\":\"⥻\",\"supmult\":\"⫂\",\"supnE\":\"⫌\",\"supne\":\"⊋\",\"supplus\":\"⫀\",\"supset\":\"⊃\",\"Supset\":\"⋑\",\"supseteq\":\"⊇\",\"supseteqq\":\"⫆\",\"supsetneq\":\"⊋\",\"supsetneqq\":\"⫌\",\"supsim\":\"⫈\",\"supsub\":\"⫔\",\"supsup\":\"⫖\",\"swarhk\":\"⤦\",\"swarr\":\"↙\",\"swArr\":\"⇙\",\"swarrow\":\"↙\",\"swnwar\":\"⤪\",\"szlig\":\"ß\",\"Tab\":\"\\t\",\"target\":\"⌖\",\"Tau\":\"Τ\",\"tau\":\"τ\",\"tbrk\":\"⎴\",\"Tcaron\":\"Ť\",\"tcaron\":\"ť\",\"Tcedil\":\"Ţ\",\"tcedil\":\"ţ\",\"Tcy\":\"Т\",\"tcy\":\"т\",\"tdot\":\"⃛\",\"telrec\":\"⌕\",\"Tfr\":\"𝔗\",\"tfr\":\"𝔱\",\"there4\":\"∴\",\"therefore\":\"∴\",\"Therefore\":\"∴\",\"Theta\":\"Θ\",\"theta\":\"θ\",\"thetasym\":\"ϑ\",\"thetav\":\"ϑ\",\"thickapprox\":\"≈\",\"thicksim\":\"∼\",\"ThickSpace\":\"  \",\"ThinSpace\":\" \",\"thinsp\":\" \",\"thkap\":\"≈\",\"thksim\":\"∼\",\"THORN\":\"Þ\",\"thorn\":\"þ\",\"tilde\":\"˜\",\"Tilde\":\"∼\",\"TildeEqual\":\"≃\",\"TildeFullEqual\":\"≅\",\"TildeTilde\":\"≈\",\"timesbar\":\"⨱\",\"timesb\":\"⊠\",\"times\":\"×\",\"timesd\":\"⨰\",\"tint\":\"∭\",\"toea\":\"⤨\",\"topbot\":\"⌶\",\"topcir\":\"⫱\",\"top\":\"⊤\",\"Topf\":\"𝕋\",\"topf\":\"𝕥\",\"topfork\":\"⫚\",\"tosa\":\"⤩\",\"tprime\":\"‴\",\"trade\":\"™\",\"TRADE\":\"™\",\"triangle\":\"▵\",\"triangledown\":\"▿\",\"triangleleft\":\"◃\",\"trianglelefteq\":\"⊴\",\"triangleq\":\"≜\",\"triangleright\":\"▹\",\"trianglerighteq\":\"⊵\",\"tridot\":\"◬\",\"trie\":\"≜\",\"triminus\":\"⨺\",\"TripleDot\":\"⃛\",\"triplus\":\"⨹\",\"trisb\":\"⧍\",\"tritime\":\"⨻\",\"trpezium\":\"⏢\",\"Tscr\":\"𝒯\",\"tscr\":\"𝓉\",\"TScy\":\"Ц\",\"tscy\":\"ц\",\"TSHcy\":\"Ћ\",\"tshcy\":\"ћ\",\"Tstrok\":\"Ŧ\",\"tstrok\":\"ŧ\",\"twixt\":\"≬\",\"twoheadleftarrow\":\"↞\",\"twoheadrightarrow\":\"↠\",\"Uacute\":\"Ú\",\"uacute\":\"ú\",\"uarr\":\"↑\",\"Uarr\":\"↟\",\"uArr\":\"⇑\",\"Uarrocir\":\"⥉\",\"Ubrcy\":\"Ў\",\"ubrcy\":\"ў\",\"Ubreve\":\"Ŭ\",\"ubreve\":\"ŭ\",\"Ucirc\":\"Û\",\"ucirc\":\"û\",\"Ucy\":\"У\",\"ucy\":\"у\",\"udarr\":\"⇅\",\"Udblac\":\"Ű\",\"udblac\":\"ű\",\"udhar\":\"⥮\",\"ufisht\":\"⥾\",\"Ufr\":\"𝔘\",\"ufr\":\"𝔲\",\"Ugrave\":\"Ù\",\"ugrave\":\"ù\",\"uHar\":\"⥣\",\"uharl\":\"↿\",\"uharr\":\"↾\",\"uhblk\":\"▀\",\"ulcorn\":\"⌜\",\"ulcorner\":\"⌜\",\"ulcrop\":\"⌏\",\"ultri\":\"◸\",\"Umacr\":\"Ū\",\"umacr\":\"ū\",\"uml\":\"¨\",\"UnderBar\":\"_\",\"UnderBrace\":\"⏟\",\"UnderBracket\":\"⎵\",\"UnderParenthesis\":\"⏝\",\"Union\":\"⋃\",\"UnionPlus\":\"⊎\",\"Uogon\":\"Ų\",\"uogon\":\"ų\",\"Uopf\":\"𝕌\",\"uopf\":\"𝕦\",\"UpArrowBar\":\"⤒\",\"uparrow\":\"↑\",\"UpArrow\":\"↑\",\"Uparrow\":\"⇑\",\"UpArrowDownArrow\":\"⇅\",\"updownarrow\":\"↕\",\"UpDownArrow\":\"↕\",\"Updownarrow\":\"⇕\",\"UpEquilibrium\":\"⥮\",\"upharpoonleft\":\"↿\",\"upharpoonright\":\"↾\",\"uplus\":\"⊎\",\"UpperLeftArrow\":\"↖\",\"UpperRightArrow\":\"↗\",\"upsi\":\"υ\",\"Upsi\":\"ϒ\",\"upsih\":\"ϒ\",\"Upsilon\":\"Υ\",\"upsilon\":\"υ\",\"UpTeeArrow\":\"↥\",\"UpTee\":\"⊥\",\"upuparrows\":\"⇈\",\"urcorn\":\"⌝\",\"urcorner\":\"⌝\",\"urcrop\":\"⌎\",\"Uring\":\"Ů\",\"uring\":\"ů\",\"urtri\":\"◹\",\"Uscr\":\"𝒰\",\"uscr\":\"𝓊\",\"utdot\":\"⋰\",\"Utilde\":\"Ũ\",\"utilde\":\"ũ\",\"utri\":\"▵\",\"utrif\":\"▴\",\"uuarr\":\"⇈\",\"Uuml\":\"Ü\",\"uuml\":\"ü\",\"uwangle\":\"⦧\",\"vangrt\":\"⦜\",\"varepsilon\":\"ϵ\",\"varkappa\":\"ϰ\",\"varnothing\":\"∅\",\"varphi\":\"ϕ\",\"varpi\":\"ϖ\",\"varpropto\":\"∝\",\"varr\":\"↕\",\"vArr\":\"⇕\",\"varrho\":\"ϱ\",\"varsigma\":\"ς\",\"varsubsetneq\":\"⊊︀\",\"varsubsetneqq\":\"⫋︀\",\"varsupsetneq\":\"⊋︀\",\"varsupsetneqq\":\"⫌︀\",\"vartheta\":\"ϑ\",\"vartriangleleft\":\"⊲\",\"vartriangleright\":\"⊳\",\"vBar\":\"⫨\",\"Vbar\":\"⫫\",\"vBarv\":\"⫩\",\"Vcy\":\"В\",\"vcy\":\"в\",\"vdash\":\"⊢\",\"vDash\":\"⊨\",\"Vdash\":\"⊩\",\"VDash\":\"⊫\",\"Vdashl\":\"⫦\",\"veebar\":\"⊻\",\"vee\":\"∨\",\"Vee\":\"⋁\",\"veeeq\":\"≚\",\"vellip\":\"⋮\",\"verbar\":\"|\",\"Verbar\":\"‖\",\"vert\":\"|\",\"Vert\":\"‖\",\"VerticalBar\":\"∣\",\"VerticalLine\":\"|\",\"VerticalSeparator\":\"❘\",\"VerticalTilde\":\"≀\",\"VeryThinSpace\":\" \",\"Vfr\":\"𝔙\",\"vfr\":\"𝔳\",\"vltri\":\"⊲\",\"vnsub\":\"⊂⃒\",\"vnsup\":\"⊃⃒\",\"Vopf\":\"𝕍\",\"vopf\":\"𝕧\",\"vprop\":\"∝\",\"vrtri\":\"⊳\",\"Vscr\":\"𝒱\",\"vscr\":\"𝓋\",\"vsubnE\":\"⫋︀\",\"vsubne\":\"⊊︀\",\"vsupnE\":\"⫌︀\",\"vsupne\":\"⊋︀\",\"Vvdash\":\"⊪\",\"vzigzag\":\"⦚\",\"Wcirc\":\"Ŵ\",\"wcirc\":\"ŵ\",\"wedbar\":\"⩟\",\"wedge\":\"∧\",\"Wedge\":\"⋀\",\"wedgeq\":\"≙\",\"weierp\":\"℘\",\"Wfr\":\"𝔚\",\"wfr\":\"𝔴\",\"Wopf\":\"𝕎\",\"wopf\":\"𝕨\",\"wp\":\"℘\",\"wr\":\"≀\",\"wreath\":\"≀\",\"Wscr\":\"𝒲\",\"wscr\":\"𝓌\",\"xcap\":\"⋂\",\"xcirc\":\"◯\",\"xcup\":\"⋃\",\"xdtri\":\"▽\",\"Xfr\":\"𝔛\",\"xfr\":\"𝔵\",\"xharr\":\"⟷\",\"xhArr\":\"⟺\",\"Xi\":\"Ξ\",\"xi\":\"ξ\",\"xlarr\":\"⟵\",\"xlArr\":\"⟸\",\"xmap\":\"⟼\",\"xnis\":\"⋻\",\"xodot\":\"⨀\",\"Xopf\":\"𝕏\",\"xopf\":\"𝕩\",\"xoplus\":\"⨁\",\"xotime\":\"⨂\",\"xrarr\":\"⟶\",\"xrArr\":\"⟹\",\"Xscr\":\"𝒳\",\"xscr\":\"𝓍\",\"xsqcup\":\"⨆\",\"xuplus\":\"⨄\",\"xutri\":\"△\",\"xvee\":\"⋁\",\"xwedge\":\"⋀\",\"Yacute\":\"Ý\",\"yacute\":\"ý\",\"YAcy\":\"Я\",\"yacy\":\"я\",\"Ycirc\":\"Ŷ\",\"ycirc\":\"ŷ\",\"Ycy\":\"Ы\",\"ycy\":\"ы\",\"yen\":\"¥\",\"Yfr\":\"𝔜\",\"yfr\":\"𝔶\",\"YIcy\":\"Ї\",\"yicy\":\"ї\",\"Yopf\":\"𝕐\",\"yopf\":\"𝕪\",\"Yscr\":\"𝒴\",\"yscr\":\"𝓎\",\"YUcy\":\"Ю\",\"yucy\":\"ю\",\"yuml\":\"ÿ\",\"Yuml\":\"Ÿ\",\"Zacute\":\"Ź\",\"zacute\":\"ź\",\"Zcaron\":\"Ž\",\"zcaron\":\"ž\",\"Zcy\":\"З\",\"zcy\":\"з\",\"Zdot\":\"Ż\",\"zdot\":\"ż\",\"zeetrf\":\"ℨ\",\"ZeroWidthSpace\":\"​\",\"Zeta\":\"Ζ\",\"zeta\":\"ζ\",\"zfr\":\"𝔷\",\"Zfr\":\"ℨ\",\"ZHcy\":\"Ж\",\"zhcy\":\"ж\",\"zigrarr\":\"⇝\",\"zopf\":\"𝕫\",\"Zopf\":\"ℤ\",\"Zscr\":\"𝒵\",\"zscr\":\"𝓏\",\"zwj\":\"‍\",\"zwnj\":\"‌\"}");
  2691. /***/ }),
  2692. /***/ "./node_modules/entities/lib/maps/legacy.json":
  2693. /*!****************************************************!*\
  2694. !*** ./node_modules/entities/lib/maps/legacy.json ***!
  2695. \****************************************************/
  2696. /*! exports provided: Aacute, aacute, Acirc, acirc, acute, AElig, aelig, Agrave, agrave, amp, AMP, Aring, aring, Atilde, atilde, Auml, auml, brvbar, Ccedil, ccedil, cedil, cent, copy, COPY, curren, deg, divide, Eacute, eacute, Ecirc, ecirc, Egrave, egrave, ETH, eth, Euml, euml, frac12, frac14, frac34, gt, GT, Iacute, iacute, Icirc, icirc, iexcl, Igrave, igrave, iquest, Iuml, iuml, laquo, lt, LT, macr, micro, middot, nbsp, not, Ntilde, ntilde, Oacute, oacute, Ocirc, ocirc, Ograve, ograve, ordf, ordm, Oslash, oslash, Otilde, otilde, Ouml, ouml, para, plusmn, pound, quot, QUOT, raquo, reg, REG, sect, shy, sup1, sup2, sup3, szlig, THORN, thorn, times, Uacute, uacute, Ucirc, ucirc, Ugrave, ugrave, uml, Uuml, uuml, Yacute, yacute, yen, yuml, default */
  2697. /***/ (function(module) {
  2698. module.exports = JSON.parse("{\"Aacute\":\"Á\",\"aacute\":\"á\",\"Acirc\":\"Â\",\"acirc\":\"â\",\"acute\":\"´\",\"AElig\":\"Æ\",\"aelig\":\"æ\",\"Agrave\":\"À\",\"agrave\":\"à\",\"amp\":\"&\",\"AMP\":\"&\",\"Aring\":\"Å\",\"aring\":\"å\",\"Atilde\":\"Ã\",\"atilde\":\"ã\",\"Auml\":\"Ä\",\"auml\":\"ä\",\"brvbar\":\"¦\",\"Ccedil\":\"Ç\",\"ccedil\":\"ç\",\"cedil\":\"¸\",\"cent\":\"¢\",\"copy\":\"©\",\"COPY\":\"©\",\"curren\":\"¤\",\"deg\":\"°\",\"divide\":\"÷\",\"Eacute\":\"É\",\"eacute\":\"é\",\"Ecirc\":\"Ê\",\"ecirc\":\"ê\",\"Egrave\":\"È\",\"egrave\":\"è\",\"ETH\":\"Ð\",\"eth\":\"ð\",\"Euml\":\"Ë\",\"euml\":\"ë\",\"frac12\":\"½\",\"frac14\":\"¼\",\"frac34\":\"¾\",\"gt\":\">\",\"GT\":\">\",\"Iacute\":\"Í\",\"iacute\":\"í\",\"Icirc\":\"Î\",\"icirc\":\"î\",\"iexcl\":\"¡\",\"Igrave\":\"Ì\",\"igrave\":\"ì\",\"iquest\":\"¿\",\"Iuml\":\"Ï\",\"iuml\":\"ï\",\"laquo\":\"«\",\"lt\":\"<\",\"LT\":\"<\",\"macr\":\"¯\",\"micro\":\"µ\",\"middot\":\"·\",\"nbsp\":\" \",\"not\":\"¬\",\"Ntilde\":\"Ñ\",\"ntilde\":\"ñ\",\"Oacute\":\"Ó\",\"oacute\":\"ó\",\"Ocirc\":\"Ô\",\"ocirc\":\"ô\",\"Ograve\":\"Ò\",\"ograve\":\"ò\",\"ordf\":\"ª\",\"ordm\":\"º\",\"Oslash\":\"Ø\",\"oslash\":\"ø\",\"Otilde\":\"Õ\",\"otilde\":\"õ\",\"Ouml\":\"Ö\",\"ouml\":\"ö\",\"para\":\"¶\",\"plusmn\":\"±\",\"pound\":\"£\",\"quot\":\"\\\"\",\"QUOT\":\"\\\"\",\"raquo\":\"»\",\"reg\":\"®\",\"REG\":\"®\",\"sect\":\"§\",\"shy\":\"­\",\"sup1\":\"¹\",\"sup2\":\"²\",\"sup3\":\"³\",\"szlig\":\"ß\",\"THORN\":\"Þ\",\"thorn\":\"þ\",\"times\":\"×\",\"Uacute\":\"Ú\",\"uacute\":\"ú\",\"Ucirc\":\"Û\",\"ucirc\":\"û\",\"Ugrave\":\"Ù\",\"ugrave\":\"ù\",\"uml\":\"¨\",\"Uuml\":\"Ü\",\"uuml\":\"ü\",\"Yacute\":\"Ý\",\"yacute\":\"ý\",\"yen\":\"¥\",\"yuml\":\"ÿ\"}");
  2699. /***/ }),
  2700. /***/ "./node_modules/entities/lib/maps/xml.json":
  2701. /*!*************************************************!*\
  2702. !*** ./node_modules/entities/lib/maps/xml.json ***!
  2703. \*************************************************/
  2704. /*! exports provided: amp, apos, gt, lt, quot, default */
  2705. /***/ (function(module) {
  2706. module.exports = JSON.parse("{\"amp\":\"&\",\"apos\":\"'\",\"gt\":\">\",\"lt\":\"<\",\"quot\":\"\\\"\"}");
  2707. /***/ }),
  2708. /***/ "./node_modules/events/events.js":
  2709. /*!***************************************!*\
  2710. !*** ./node_modules/events/events.js ***!
  2711. \***************************************/
  2712. /*! no static exports found */
  2713. /***/ (function(module, exports, __webpack_require__) {
  2714. "use strict";
  2715. // Copyright Joyent, Inc. and other Node contributors.
  2716. //
  2717. // Permission is hereby granted, free of charge, to any person obtaining a
  2718. // copy of this software and associated documentation files (the
  2719. // "Software"), to deal in the Software without restriction, including
  2720. // without limitation the rights to use, copy, modify, merge, publish,
  2721. // distribute, sublicense, and/or sell copies of the Software, and to permit
  2722. // persons to whom the Software is furnished to do so, subject to the
  2723. // following conditions:
  2724. //
  2725. // The above copyright notice and this permission notice shall be included
  2726. // in all copies or substantial portions of the Software.
  2727. //
  2728. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  2729. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  2730. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  2731. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  2732. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  2733. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  2734. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  2735. function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
  2736. var R = (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === 'object' ? Reflect : null;
  2737. var ReflectApply = R && typeof R.apply === 'function' ? R.apply : function ReflectApply(target, receiver, args) {
  2738. return Function.prototype.apply.call(target, receiver, args);
  2739. };
  2740. var ReflectOwnKeys;
  2741. if (R && typeof R.ownKeys === 'function') {
  2742. ReflectOwnKeys = R.ownKeys;
  2743. } else if (Object.getOwnPropertySymbols) {
  2744. ReflectOwnKeys = function ReflectOwnKeys(target) {
  2745. return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target));
  2746. };
  2747. } else {
  2748. ReflectOwnKeys = function ReflectOwnKeys(target) {
  2749. return Object.getOwnPropertyNames(target);
  2750. };
  2751. }
  2752. function ProcessEmitWarning(warning) {
  2753. if (console && console.warn) console.warn(warning);
  2754. }
  2755. var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {
  2756. return value !== value;
  2757. };
  2758. function EventEmitter() {
  2759. EventEmitter.init.call(this);
  2760. }
  2761. module.exports = EventEmitter;
  2762. // Backwards-compat with node 0.10.x
  2763. EventEmitter.EventEmitter = EventEmitter;
  2764. EventEmitter.prototype._events = undefined;
  2765. EventEmitter.prototype._eventsCount = 0;
  2766. EventEmitter.prototype._maxListeners = undefined;
  2767. // By default EventEmitters will print a warning if more than 10 listeners are
  2768. // added to it. This is a useful default which helps finding memory leaks.
  2769. var defaultMaxListeners = 10;
  2770. Object.defineProperty(EventEmitter, 'defaultMaxListeners', {
  2771. enumerable: true,
  2772. get: function get() {
  2773. return defaultMaxListeners;
  2774. },
  2775. set: function set(arg) {
  2776. if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {
  2777. throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.');
  2778. }
  2779. defaultMaxListeners = arg;
  2780. }
  2781. });
  2782. EventEmitter.init = function () {
  2783. if (this._events === undefined || this._events === Object.getPrototypeOf(this)._events) {
  2784. this._events = Object.create(null);
  2785. this._eventsCount = 0;
  2786. }
  2787. this._maxListeners = this._maxListeners || undefined;
  2788. };
  2789. // Obviously not all Emitters should be limited to 10. This function allows
  2790. // that to be increased. Set to zero for unlimited.
  2791. EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
  2792. if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {
  2793. throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.');
  2794. }
  2795. this._maxListeners = n;
  2796. return this;
  2797. };
  2798. function $getMaxListeners(that) {
  2799. if (that._maxListeners === undefined) return EventEmitter.defaultMaxListeners;
  2800. return that._maxListeners;
  2801. }
  2802. EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
  2803. return $getMaxListeners(this);
  2804. };
  2805. EventEmitter.prototype.emit = function emit(type) {
  2806. var args = [];
  2807. for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);
  2808. var doError = type === 'error';
  2809. var events = this._events;
  2810. if (events !== undefined) doError = doError && events.error === undefined;else if (!doError) return false;
  2811. // If there is no 'error' event listener then throw.
  2812. if (doError) {
  2813. var er;
  2814. if (args.length > 0) er = args[0];
  2815. if (er instanceof Error) {
  2816. // Note: The comments on the `throw` lines are intentional, they show
  2817. // up in Node's output if this results in an unhandled exception.
  2818. throw er; // Unhandled 'error' event
  2819. }
  2820. // At least give some kind of context to the user
  2821. var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));
  2822. err.context = er;
  2823. throw err; // Unhandled 'error' event
  2824. }
  2825. var handler = events[type];
  2826. if (handler === undefined) return false;
  2827. if (typeof handler === 'function') {
  2828. ReflectApply(handler, this, args);
  2829. } else {
  2830. var len = handler.length;
  2831. var listeners = arrayClone(handler, len);
  2832. for (var i = 0; i < len; ++i) ReflectApply(listeners[i], this, args);
  2833. }
  2834. return true;
  2835. };
  2836. function _addListener(target, type, listener, prepend) {
  2837. var m;
  2838. var events;
  2839. var existing;
  2840. if (typeof listener !== 'function') {
  2841. throw new TypeError('The "listener" argument must be of type Function. Received type ' + _typeof(listener));
  2842. }
  2843. events = target._events;
  2844. if (events === undefined) {
  2845. events = target._events = Object.create(null);
  2846. target._eventsCount = 0;
  2847. } else {
  2848. // To avoid recursion in the case that type === "newListener"! Before
  2849. // adding it to the listeners, first emit "newListener".
  2850. if (events.newListener !== undefined) {
  2851. target.emit('newListener', type, listener.listener ? listener.listener : listener);
  2852. // Re-assign `events` because a newListener handler could have caused the
  2853. // this._events to be assigned to a new object
  2854. events = target._events;
  2855. }
  2856. existing = events[type];
  2857. }
  2858. if (existing === undefined) {
  2859. // Optimize the case of one listener. Don't need the extra array object.
  2860. existing = events[type] = listener;
  2861. ++target._eventsCount;
  2862. } else {
  2863. if (typeof existing === 'function') {
  2864. // Adding the second element, need to change to array.
  2865. existing = events[type] = prepend ? [listener, existing] : [existing, listener];
  2866. // If we've already got an array, just append.
  2867. } else if (prepend) {
  2868. existing.unshift(listener);
  2869. } else {
  2870. existing.push(listener);
  2871. }
  2872. // Check for listener leak
  2873. m = $getMaxListeners(target);
  2874. if (m > 0 && existing.length > m && !existing.warned) {
  2875. existing.warned = true;
  2876. // No error code for this since it is a Warning
  2877. // eslint-disable-next-line no-restricted-syntax
  2878. var w = new Error('Possible EventEmitter memory leak detected. ' + existing.length + ' ' + String(type) + ' listeners ' + 'added. Use emitter.setMaxListeners() to ' + 'increase limit');
  2879. w.name = 'MaxListenersExceededWarning';
  2880. w.emitter = target;
  2881. w.type = type;
  2882. w.count = existing.length;
  2883. ProcessEmitWarning(w);
  2884. }
  2885. }
  2886. return target;
  2887. }
  2888. EventEmitter.prototype.addListener = function addListener(type, listener) {
  2889. return _addListener(this, type, listener, false);
  2890. };
  2891. EventEmitter.prototype.on = EventEmitter.prototype.addListener;
  2892. EventEmitter.prototype.prependListener = function prependListener(type, listener) {
  2893. return _addListener(this, type, listener, true);
  2894. };
  2895. function onceWrapper() {
  2896. var args = [];
  2897. for (var i = 0; i < arguments.length; i++) args.push(arguments[i]);
  2898. if (!this.fired) {
  2899. this.target.removeListener(this.type, this.wrapFn);
  2900. this.fired = true;
  2901. ReflectApply(this.listener, this.target, args);
  2902. }
  2903. }
  2904. function _onceWrap(target, type, listener) {
  2905. var state = {
  2906. fired: false,
  2907. wrapFn: undefined,
  2908. target: target,
  2909. type: type,
  2910. listener: listener
  2911. };
  2912. var wrapped = onceWrapper.bind(state);
  2913. wrapped.listener = listener;
  2914. state.wrapFn = wrapped;
  2915. return wrapped;
  2916. }
  2917. EventEmitter.prototype.once = function once(type, listener) {
  2918. if (typeof listener !== 'function') {
  2919. throw new TypeError('The "listener" argument must be of type Function. Received type ' + _typeof(listener));
  2920. }
  2921. this.on(type, _onceWrap(this, type, listener));
  2922. return this;
  2923. };
  2924. EventEmitter.prototype.prependOnceListener = function prependOnceListener(type, listener) {
  2925. if (typeof listener !== 'function') {
  2926. throw new TypeError('The "listener" argument must be of type Function. Received type ' + _typeof(listener));
  2927. }
  2928. this.prependListener(type, _onceWrap(this, type, listener));
  2929. return this;
  2930. };
  2931. // Emits a 'removeListener' event if and only if the listener was removed.
  2932. EventEmitter.prototype.removeListener = function removeListener(type, listener) {
  2933. var list, events, position, i, originalListener;
  2934. if (typeof listener !== 'function') {
  2935. throw new TypeError('The "listener" argument must be of type Function. Received type ' + _typeof(listener));
  2936. }
  2937. events = this._events;
  2938. if (events === undefined) return this;
  2939. list = events[type];
  2940. if (list === undefined) return this;
  2941. if (list === listener || list.listener === listener) {
  2942. if (--this._eventsCount === 0) this._events = Object.create(null);else {
  2943. delete events[type];
  2944. if (events.removeListener) this.emit('removeListener', type, list.listener || listener);
  2945. }
  2946. } else if (typeof list !== 'function') {
  2947. position = -1;
  2948. for (i = list.length - 1; i >= 0; i--) {
  2949. if (list[i] === listener || list[i].listener === listener) {
  2950. originalListener = list[i].listener;
  2951. position = i;
  2952. break;
  2953. }
  2954. }
  2955. if (position < 0) return this;
  2956. if (position === 0) list.shift();else {
  2957. spliceOne(list, position);
  2958. }
  2959. if (list.length === 1) events[type] = list[0];
  2960. if (events.removeListener !== undefined) this.emit('removeListener', type, originalListener || listener);
  2961. }
  2962. return this;
  2963. };
  2964. EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
  2965. EventEmitter.prototype.removeAllListeners = function removeAllListeners(type) {
  2966. var listeners, events, i;
  2967. events = this._events;
  2968. if (events === undefined) return this;
  2969. // not listening for removeListener, no need to emit
  2970. if (events.removeListener === undefined) {
  2971. if (arguments.length === 0) {
  2972. this._events = Object.create(null);
  2973. this._eventsCount = 0;
  2974. } else if (events[type] !== undefined) {
  2975. if (--this._eventsCount === 0) this._events = Object.create(null);else delete events[type];
  2976. }
  2977. return this;
  2978. }
  2979. // emit removeListener for all listeners on all events
  2980. if (arguments.length === 0) {
  2981. var keys = Object.keys(events);
  2982. var key;
  2983. for (i = 0; i < keys.length; ++i) {
  2984. key = keys[i];
  2985. if (key === 'removeListener') continue;
  2986. this.removeAllListeners(key);
  2987. }
  2988. this.removeAllListeners('removeListener');
  2989. this._events = Object.create(null);
  2990. this._eventsCount = 0;
  2991. return this;
  2992. }
  2993. listeners = events[type];
  2994. if (typeof listeners === 'function') {
  2995. this.removeListener(type, listeners);
  2996. } else if (listeners !== undefined) {
  2997. // LIFO order
  2998. for (i = listeners.length - 1; i >= 0; i--) {
  2999. this.removeListener(type, listeners[i]);
  3000. }
  3001. }
  3002. return this;
  3003. };
  3004. function _listeners(target, type, unwrap) {
  3005. var events = target._events;
  3006. if (events === undefined) return [];
  3007. var evlistener = events[type];
  3008. if (evlistener === undefined) return [];
  3009. if (typeof evlistener === 'function') return unwrap ? [evlistener.listener || evlistener] : [evlistener];
  3010. return unwrap ? unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
  3011. }
  3012. EventEmitter.prototype.listeners = function listeners(type) {
  3013. return _listeners(this, type, true);
  3014. };
  3015. EventEmitter.prototype.rawListeners = function rawListeners(type) {
  3016. return _listeners(this, type, false);
  3017. };
  3018. EventEmitter.listenerCount = function (emitter, type) {
  3019. if (typeof emitter.listenerCount === 'function') {
  3020. return emitter.listenerCount(type);
  3021. } else {
  3022. return listenerCount.call(emitter, type);
  3023. }
  3024. };
  3025. EventEmitter.prototype.listenerCount = listenerCount;
  3026. function listenerCount(type) {
  3027. var events = this._events;
  3028. if (events !== undefined) {
  3029. var evlistener = events[type];
  3030. if (typeof evlistener === 'function') {
  3031. return 1;
  3032. } else if (evlistener !== undefined) {
  3033. return evlistener.length;
  3034. }
  3035. }
  3036. return 0;
  3037. }
  3038. EventEmitter.prototype.eventNames = function eventNames() {
  3039. return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
  3040. };
  3041. function arrayClone(arr, n) {
  3042. var copy = new Array(n);
  3043. for (var i = 0; i < n; ++i) copy[i] = arr[i];
  3044. return copy;
  3045. }
  3046. function spliceOne(list, index) {
  3047. for (; index + 1 < list.length; index++) list[index] = list[index + 1];
  3048. list.pop();
  3049. }
  3050. function unwrapListeners(arr) {
  3051. var ret = new Array(arr.length);
  3052. for (var i = 0; i < ret.length; ++i) {
  3053. ret[i] = arr[i].listener || arr[i];
  3054. }
  3055. return ret;
  3056. }
  3057. /***/ }),
  3058. /***/ "./node_modules/https-browserify/index.js":
  3059. /*!************************************************!*\
  3060. !*** ./node_modules/https-browserify/index.js ***!
  3061. \************************************************/
  3062. /*! no static exports found */
  3063. /***/ (function(module, exports, __webpack_require__) {
  3064. var http = __webpack_require__(/*! http */ "./node_modules/stream-http/index.js");
  3065. var url = __webpack_require__(/*! url */ "./node_modules/url/url.js");
  3066. var https = module.exports;
  3067. for (var key in http) {
  3068. if (http.hasOwnProperty(key)) https[key] = http[key];
  3069. }
  3070. https.request = function (params, cb) {
  3071. params = validateParams(params);
  3072. return http.request.call(this, params, cb);
  3073. };
  3074. https.get = function (params, cb) {
  3075. params = validateParams(params);
  3076. return http.get.call(this, params, cb);
  3077. };
  3078. function validateParams(params) {
  3079. if (typeof params === 'string') {
  3080. params = url.parse(params);
  3081. }
  3082. if (!params.protocol) {
  3083. params.protocol = 'https:';
  3084. }
  3085. if (params.protocol !== 'https:') {
  3086. throw new Error('Protocol "' + params.protocol + '" not supported. Expected "https:"');
  3087. }
  3088. return params;
  3089. }
  3090. /***/ }),
  3091. /***/ "./node_modules/ieee754/index.js":
  3092. /*!***************************************!*\
  3093. !*** ./node_modules/ieee754/index.js ***!
  3094. \***************************************/
  3095. /*! no static exports found */
  3096. /***/ (function(module, exports) {
  3097. exports.read = function (buffer, offset, isLE, mLen, nBytes) {
  3098. var e, m;
  3099. var eLen = nBytes * 8 - mLen - 1;
  3100. var eMax = (1 << eLen) - 1;
  3101. var eBias = eMax >> 1;
  3102. var nBits = -7;
  3103. var i = isLE ? nBytes - 1 : 0;
  3104. var d = isLE ? -1 : 1;
  3105. var s = buffer[offset + i];
  3106. i += d;
  3107. e = s & (1 << -nBits) - 1;
  3108. s >>= -nBits;
  3109. nBits += eLen;
  3110. for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
  3111. m = e & (1 << -nBits) - 1;
  3112. e >>= -nBits;
  3113. nBits += mLen;
  3114. for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}
  3115. if (e === 0) {
  3116. e = 1 - eBias;
  3117. } else if (e === eMax) {
  3118. return m ? NaN : (s ? -1 : 1) * Infinity;
  3119. } else {
  3120. m = m + Math.pow(2, mLen);
  3121. e = e - eBias;
  3122. }
  3123. return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
  3124. };
  3125. exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
  3126. var e, m, c;
  3127. var eLen = nBytes * 8 - mLen - 1;
  3128. var eMax = (1 << eLen) - 1;
  3129. var eBias = eMax >> 1;
  3130. var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
  3131. var i = isLE ? 0 : nBytes - 1;
  3132. var d = isLE ? 1 : -1;
  3133. var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
  3134. value = Math.abs(value);
  3135. if (isNaN(value) || value === Infinity) {
  3136. m = isNaN(value) ? 1 : 0;
  3137. e = eMax;
  3138. } else {
  3139. e = Math.floor(Math.log(value) / Math.LN2);
  3140. if (value * (c = Math.pow(2, -e)) < 1) {
  3141. e--;
  3142. c *= 2;
  3143. }
  3144. if (e + eBias >= 1) {
  3145. value += rt / c;
  3146. } else {
  3147. value += rt * Math.pow(2, 1 - eBias);
  3148. }
  3149. if (value * c >= 2) {
  3150. e++;
  3151. c /= 2;
  3152. }
  3153. if (e + eBias >= eMax) {
  3154. m = 0;
  3155. e = eMax;
  3156. } else if (e + eBias >= 1) {
  3157. m = (value * c - 1) * Math.pow(2, mLen);
  3158. e = e + eBias;
  3159. } else {
  3160. m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
  3161. e = 0;
  3162. }
  3163. }
  3164. for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
  3165. e = e << mLen | m;
  3166. eLen += mLen;
  3167. for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
  3168. buffer[offset + i - d] |= s * 128;
  3169. };
  3170. /***/ }),
  3171. /***/ "./node_modules/inherits/inherits_browser.js":
  3172. /*!***************************************************!*\
  3173. !*** ./node_modules/inherits/inherits_browser.js ***!
  3174. \***************************************************/
  3175. /*! no static exports found */
  3176. /***/ (function(module, exports) {
  3177. if (typeof Object.create === 'function') {
  3178. // implementation from standard node.js 'util' module
  3179. module.exports = function inherits(ctor, superCtor) {
  3180. ctor.super_ = superCtor;
  3181. ctor.prototype = Object.create(superCtor.prototype, {
  3182. constructor: {
  3183. value: ctor,
  3184. enumerable: false,
  3185. writable: true,
  3186. configurable: true
  3187. }
  3188. });
  3189. };
  3190. } else {
  3191. // old school shim for old browsers
  3192. module.exports = function inherits(ctor, superCtor) {
  3193. ctor.super_ = superCtor;
  3194. var TempCtor = function TempCtor() {};
  3195. TempCtor.prototype = superCtor.prototype;
  3196. ctor.prototype = new TempCtor();
  3197. ctor.prototype.constructor = ctor;
  3198. };
  3199. }
  3200. /***/ }),
  3201. /***/ "./node_modules/isarray/index.js":
  3202. /*!***************************************!*\
  3203. !*** ./node_modules/isarray/index.js ***!
  3204. \***************************************/
  3205. /*! no static exports found */
  3206. /***/ (function(module, exports) {
  3207. var toString = {}.toString;
  3208. module.exports = Array.isArray || function (arr) {
  3209. return toString.call(arr) == '[object Array]';
  3210. };
  3211. /***/ }),
  3212. /***/ "./node_modules/node-libs-browser/node_modules/punycode/punycode.js":
  3213. /*!**************************************************************************!*\
  3214. !*** ./node_modules/node-libs-browser/node_modules/punycode/punycode.js ***!
  3215. \**************************************************************************/
  3216. /*! no static exports found */
  3217. /***/ (function(module, exports, __webpack_require__) {
  3218. /* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
  3219. /*! https://mths.be/punycode v1.4.1 by @mathias */
  3220. ;
  3221. (function (root) {
  3222. /** Detect free variables */
  3223. var freeExports = ( false ? undefined : _typeof(exports)) == 'object' && exports && !exports.nodeType && exports;
  3224. var freeModule = ( false ? undefined : _typeof(module)) == 'object' && module && !module.nodeType && module;
  3225. var freeGlobal = (typeof global === "undefined" ? "undefined" : _typeof(global)) == 'object' && global;
  3226. if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal) {
  3227. root = freeGlobal;
  3228. }
  3229. /**
  3230. * The `punycode` object.
  3231. * @name punycode
  3232. * @type Object
  3233. */
  3234. var punycode,
  3235. /** Highest positive signed 32-bit float value */
  3236. maxInt = 2147483647,
  3237. // aka. 0x7FFFFFFF or 2^31-1
  3238. /** Bootstring parameters */
  3239. base = 36,
  3240. tMin = 1,
  3241. tMax = 26,
  3242. skew = 38,
  3243. damp = 700,
  3244. initialBias = 72,
  3245. initialN = 128,
  3246. // 0x80
  3247. delimiter = '-',
  3248. // '\x2D'
  3249. /** Regular expressions */
  3250. regexPunycode = /^xn--/,
  3251. regexNonASCII = /[^\x20-\x7E]/,
  3252. // unprintable ASCII chars + non-ASCII chars
  3253. regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g,
  3254. // RFC 3490 separators
  3255. /** Error messages */
  3256. errors = {
  3257. 'overflow': 'Overflow: input needs wider integers to process',
  3258. 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
  3259. 'invalid-input': 'Invalid input'
  3260. },
  3261. /** Convenience shortcuts */
  3262. baseMinusTMin = base - tMin,
  3263. floor = Math.floor,
  3264. stringFromCharCode = String.fromCharCode,
  3265. /** Temporary variable */
  3266. key;
  3267. /*--------------------------------------------------------------------------*/
  3268. /**
  3269. * A generic error utility function.
  3270. * @private
  3271. * @param {String} type The error type.
  3272. * @returns {Error} Throws a `RangeError` with the applicable error message.
  3273. */
  3274. function error(type) {
  3275. throw new RangeError(errors[type]);
  3276. }
  3277. /**
  3278. * A generic `Array#map` utility function.
  3279. * @private
  3280. * @param {Array} array The array to iterate over.
  3281. * @param {Function} callback The function that gets called for every array
  3282. * item.
  3283. * @returns {Array} A new array of values returned by the callback function.
  3284. */
  3285. function map(array, fn) {
  3286. var length = array.length;
  3287. var result = [];
  3288. while (length--) {
  3289. result[length] = fn(array[length]);
  3290. }
  3291. return result;
  3292. }
  3293. /**
  3294. * A simple `Array#map`-like wrapper to work with domain name strings or email
  3295. * addresses.
  3296. * @private
  3297. * @param {String} domain The domain name or email address.
  3298. * @param {Function} callback The function that gets called for every
  3299. * character.
  3300. * @returns {Array} A new string of characters returned by the callback
  3301. * function.
  3302. */
  3303. function mapDomain(string, fn) {
  3304. var parts = string.split('@');
  3305. var result = '';
  3306. if (parts.length > 1) {
  3307. // In email addresses, only the domain name should be punycoded. Leave
  3308. // the local part (i.e. everything up to `@`) intact.
  3309. result = parts[0] + '@';
  3310. string = parts[1];
  3311. }
  3312. // Avoid `split(regex)` for IE8 compatibility. See #17.
  3313. string = string.replace(regexSeparators, '\x2E');
  3314. var labels = string.split('.');
  3315. var encoded = map(labels, fn).join('.');
  3316. return result + encoded;
  3317. }
  3318. /**
  3319. * Creates an array containing the numeric code points of each Unicode
  3320. * character in the string. While JavaScript uses UCS-2 internally,
  3321. * this function will convert a pair of surrogate halves (each of which
  3322. * UCS-2 exposes as separate characters) into a single code point,
  3323. * matching UTF-16.
  3324. * @see `punycode.ucs2.encode`
  3325. * @see <https://mathiasbynens.be/notes/javascript-encoding>
  3326. * @memberOf punycode.ucs2
  3327. * @name decode
  3328. * @param {String} string The Unicode input string (UCS-2).
  3329. * @returns {Array} The new array of code points.
  3330. */
  3331. function ucs2decode(string) {
  3332. var output = [],
  3333. counter = 0,
  3334. length = string.length,
  3335. value,
  3336. extra;
  3337. while (counter < length) {
  3338. value = string.charCodeAt(counter++);
  3339. if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
  3340. // high surrogate, and there is a next character
  3341. extra = string.charCodeAt(counter++);
  3342. if ((extra & 0xFC00) == 0xDC00) {
  3343. // low surrogate
  3344. output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
  3345. } else {
  3346. // unmatched surrogate; only append this code unit, in case the next
  3347. // code unit is the high surrogate of a surrogate pair
  3348. output.push(value);
  3349. counter--;
  3350. }
  3351. } else {
  3352. output.push(value);
  3353. }
  3354. }
  3355. return output;
  3356. }
  3357. /**
  3358. * Creates a string based on an array of numeric code points.
  3359. * @see `punycode.ucs2.decode`
  3360. * @memberOf punycode.ucs2
  3361. * @name encode
  3362. * @param {Array} codePoints The array of numeric code points.
  3363. * @returns {String} The new Unicode string (UCS-2).
  3364. */
  3365. function ucs2encode(array) {
  3366. return map(array, function (value) {
  3367. var output = '';
  3368. if (value > 0xFFFF) {
  3369. value -= 0x10000;
  3370. output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
  3371. value = 0xDC00 | value & 0x3FF;
  3372. }
  3373. output += stringFromCharCode(value);
  3374. return output;
  3375. }).join('');
  3376. }
  3377. /**
  3378. * Converts a basic code point into a digit/integer.
  3379. * @see `digitToBasic()`
  3380. * @private
  3381. * @param {Number} codePoint The basic numeric code point value.
  3382. * @returns {Number} The numeric value of a basic code point (for use in
  3383. * representing integers) in the range `0` to `base - 1`, or `base` if
  3384. * the code point does not represent a value.
  3385. */
  3386. function basicToDigit(codePoint) {
  3387. if (codePoint - 48 < 10) {
  3388. return codePoint - 22;
  3389. }
  3390. if (codePoint - 65 < 26) {
  3391. return codePoint - 65;
  3392. }
  3393. if (codePoint - 97 < 26) {
  3394. return codePoint - 97;
  3395. }
  3396. return base;
  3397. }
  3398. /**
  3399. * Converts a digit/integer into a basic code point.
  3400. * @see `basicToDigit()`
  3401. * @private
  3402. * @param {Number} digit The numeric value of a basic code point.
  3403. * @returns {Number} The basic code point whose value (when used for
  3404. * representing integers) is `digit`, which needs to be in the range
  3405. * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
  3406. * used; else, the lowercase form is used. The behavior is undefined
  3407. * if `flag` is non-zero and `digit` has no uppercase form.
  3408. */
  3409. function digitToBasic(digit, flag) {
  3410. // 0..25 map to ASCII a..z or A..Z
  3411. // 26..35 map to ASCII 0..9
  3412. return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
  3413. }
  3414. /**
  3415. * Bias adaptation function as per section 3.4 of RFC 3492.
  3416. * https://tools.ietf.org/html/rfc3492#section-3.4
  3417. * @private
  3418. */
  3419. function adapt(delta, numPoints, firstTime) {
  3420. var k = 0;
  3421. delta = firstTime ? floor(delta / damp) : delta >> 1;
  3422. delta += floor(delta / numPoints);
  3423. for /* no initialization */
  3424. (; delta > baseMinusTMin * tMax >> 1; k += base) {
  3425. delta = floor(delta / baseMinusTMin);
  3426. }
  3427. return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
  3428. }
  3429. /**
  3430. * Converts a Punycode string of ASCII-only symbols to a string of Unicode
  3431. * symbols.
  3432. * @memberOf punycode
  3433. * @param {String} input The Punycode string of ASCII-only symbols.
  3434. * @returns {String} The resulting string of Unicode symbols.
  3435. */
  3436. function decode(input) {
  3437. // Don't use UCS-2
  3438. var output = [],
  3439. inputLength = input.length,
  3440. out,
  3441. i = 0,
  3442. n = initialN,
  3443. bias = initialBias,
  3444. basic,
  3445. j,
  3446. index,
  3447. oldi,
  3448. w,
  3449. k,
  3450. digit,
  3451. t,
  3452. /** Cached calculation results */
  3453. baseMinusT;
  3454. // Handle the basic code points: let `basic` be the number of input code
  3455. // points before the last delimiter, or `0` if there is none, then copy
  3456. // the first basic code points to the output.
  3457. basic = input.lastIndexOf(delimiter);
  3458. if (basic < 0) {
  3459. basic = 0;
  3460. }
  3461. for (j = 0; j < basic; ++j) {
  3462. // if it's not a basic code point
  3463. if (input.charCodeAt(j) >= 0x80) {
  3464. error('not-basic');
  3465. }
  3466. output.push(input.charCodeAt(j));
  3467. }
  3468. // Main decoding loop: start just after the last delimiter if any basic code
  3469. // points were copied; start at the beginning otherwise.
  3470. for /* no final expression */
  3471. (index = basic > 0 ? basic + 1 : 0; index < inputLength;) {
  3472. // `index` is the index of the next character to be consumed.
  3473. // Decode a generalized variable-length integer into `delta`,
  3474. // which gets added to `i`. The overflow checking is easier
  3475. // if we increase `i` as we go, then subtract off its starting
  3476. // value at the end to obtain `delta`.
  3477. for /* no condition */
  3478. (oldi = i, w = 1, k = base;; k += base) {
  3479. if (index >= inputLength) {
  3480. error('invalid-input');
  3481. }
  3482. digit = basicToDigit(input.charCodeAt(index++));
  3483. if (digit >= base || digit > floor((maxInt - i) / w)) {
  3484. error('overflow');
  3485. }
  3486. i += digit * w;
  3487. t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
  3488. if (digit < t) {
  3489. break;
  3490. }
  3491. baseMinusT = base - t;
  3492. if (w > floor(maxInt / baseMinusT)) {
  3493. error('overflow');
  3494. }
  3495. w *= baseMinusT;
  3496. }
  3497. out = output.length + 1;
  3498. bias = adapt(i - oldi, out, oldi == 0);
  3499. // `i` was supposed to wrap around from `out` to `0`,
  3500. // incrementing `n` each time, so we'll fix that now:
  3501. if (floor(i / out) > maxInt - n) {
  3502. error('overflow');
  3503. }
  3504. n += floor(i / out);
  3505. i %= out;
  3506. // Insert `n` at position `i` of the output
  3507. output.splice(i++, 0, n);
  3508. }
  3509. return ucs2encode(output);
  3510. }
  3511. /**
  3512. * Converts a string of Unicode symbols (e.g. a domain name label) to a
  3513. * Punycode string of ASCII-only symbols.
  3514. * @memberOf punycode
  3515. * @param {String} input The string of Unicode symbols.
  3516. * @returns {String} The resulting Punycode string of ASCII-only symbols.
  3517. */
  3518. function encode(input) {
  3519. var n,
  3520. delta,
  3521. handledCPCount,
  3522. basicLength,
  3523. bias,
  3524. j,
  3525. m,
  3526. q,
  3527. k,
  3528. t,
  3529. currentValue,
  3530. output = [],
  3531. /** `inputLength` will hold the number of code points in `input`. */
  3532. inputLength,
  3533. /** Cached calculation results */
  3534. handledCPCountPlusOne,
  3535. baseMinusT,
  3536. qMinusT;
  3537. // Convert the input in UCS-2 to Unicode
  3538. input = ucs2decode(input);
  3539. // Cache the length
  3540. inputLength = input.length;
  3541. // Initialize the state
  3542. n = initialN;
  3543. delta = 0;
  3544. bias = initialBias;
  3545. // Handle the basic code points
  3546. for (j = 0; j < inputLength; ++j) {
  3547. currentValue = input[j];
  3548. if (currentValue < 0x80) {
  3549. output.push(stringFromCharCode(currentValue));
  3550. }
  3551. }
  3552. handledCPCount = basicLength = output.length;
  3553. // `handledCPCount` is the number of code points that have been handled;
  3554. // `basicLength` is the number of basic code points.
  3555. // Finish the basic string - if it is not empty - with a delimiter
  3556. if (basicLength) {
  3557. output.push(delimiter);
  3558. }
  3559. // Main encoding loop:
  3560. while (handledCPCount < inputLength) {
  3561. // All non-basic code points < n have been handled already. Find the next
  3562. // larger one:
  3563. for (m = maxInt, j = 0; j < inputLength; ++j) {
  3564. currentValue = input[j];
  3565. if (currentValue >= n && currentValue < m) {
  3566. m = currentValue;
  3567. }
  3568. }
  3569. // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
  3570. // but guard against overflow
  3571. handledCPCountPlusOne = handledCPCount + 1;
  3572. if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
  3573. error('overflow');
  3574. }
  3575. delta += (m - n) * handledCPCountPlusOne;
  3576. n = m;
  3577. for (j = 0; j < inputLength; ++j) {
  3578. currentValue = input[j];
  3579. if (currentValue < n && ++delta > maxInt) {
  3580. error('overflow');
  3581. }
  3582. if (currentValue == n) {
  3583. // Represent delta as a generalized variable-length integer
  3584. for /* no condition */
  3585. (q = delta, k = base;; k += base) {
  3586. t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
  3587. if (q < t) {
  3588. break;
  3589. }
  3590. qMinusT = q - t;
  3591. baseMinusT = base - t;
  3592. output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)));
  3593. q = floor(qMinusT / baseMinusT);
  3594. }
  3595. output.push(stringFromCharCode(digitToBasic(q, 0)));
  3596. bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
  3597. delta = 0;
  3598. ++handledCPCount;
  3599. }
  3600. }
  3601. ++delta;
  3602. ++n;
  3603. }
  3604. return output.join('');
  3605. }
  3606. /**
  3607. * Converts a Punycode string representing a domain name or an email address
  3608. * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
  3609. * it doesn't matter if you call it on a string that has already been
  3610. * converted to Unicode.
  3611. * @memberOf punycode
  3612. * @param {String} input The Punycoded domain name or email address to
  3613. * convert to Unicode.
  3614. * @returns {String} The Unicode representation of the given Punycode
  3615. * string.
  3616. */
  3617. function toUnicode(input) {
  3618. return mapDomain(input, function (string) {
  3619. return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
  3620. });
  3621. }
  3622. /**
  3623. * Converts a Unicode string representing a domain name or an email address to
  3624. * Punycode. Only the non-ASCII parts of the domain name will be converted,
  3625. * i.e. it doesn't matter if you call it with a domain that's already in
  3626. * ASCII.
  3627. * @memberOf punycode
  3628. * @param {String} input The domain name or email address to convert, as a
  3629. * Unicode string.
  3630. * @returns {String} The Punycode representation of the given domain name or
  3631. * email address.
  3632. */
  3633. function toASCII(input) {
  3634. return mapDomain(input, function (string) {
  3635. return regexNonASCII.test(string) ? 'xn--' + encode(string) : string;
  3636. });
  3637. }
  3638. /*--------------------------------------------------------------------------*/
  3639. /** Define the public API */
  3640. punycode = {
  3641. /**
  3642. * A string representing the current Punycode.js version number.
  3643. * @memberOf punycode
  3644. * @type String
  3645. */
  3646. 'version': '1.4.1',
  3647. /**
  3648. * An object of methods to convert from JavaScript's internal character
  3649. * representation (UCS-2) to Unicode code points, and back.
  3650. * @see <https://mathiasbynens.be/notes/javascript-encoding>
  3651. * @memberOf punycode
  3652. * @type Object
  3653. */
  3654. 'ucs2': {
  3655. 'decode': ucs2decode,
  3656. 'encode': ucs2encode
  3657. },
  3658. 'decode': decode,
  3659. 'encode': encode,
  3660. 'toASCII': toASCII,
  3661. 'toUnicode': toUnicode
  3662. };
  3663. /** Expose `punycode` */
  3664. // Some AMD build optimizers, like r.js, check for specific condition patterns
  3665. // like the following:
  3666. if ( true && _typeof(__webpack_require__(/*! !webpack amd options */ "./node_modules/webpack/buildin/amd-options.js")) == 'object' && __webpack_require__(/*! !webpack amd options */ "./node_modules/webpack/buildin/amd-options.js")) {
  3667. !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {
  3668. return punycode;
  3669. }).call(exports, __webpack_require__, exports, module),
  3670. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  3671. } else if (freeExports && freeModule) {
  3672. if (module.exports == freeExports) {
  3673. // in Node.js, io.js, or RingoJS v0.8.0+
  3674. freeModule.exports = punycode;
  3675. } else {
  3676. // in Narwhal or RingoJS v0.7.0-
  3677. for (key in punycode) {
  3678. punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);
  3679. }
  3680. }
  3681. } else {
  3682. // in Rhino or a web browser
  3683. root.punycode = punycode;
  3684. }
  3685. })(this);
  3686. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module), __webpack_require__(/*! ./../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  3687. /***/ }),
  3688. /***/ "./node_modules/process-nextick-args/index.js":
  3689. /*!****************************************************!*\
  3690. !*** ./node_modules/process-nextick-args/index.js ***!
  3691. \****************************************************/
  3692. /*! no static exports found */
  3693. /***/ (function(module, exports, __webpack_require__) {
  3694. "use strict";
  3695. /* WEBPACK VAR INJECTION */(function(process) {
  3696. if (!process.version || process.version.indexOf('v0.') === 0 || process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {
  3697. module.exports = {
  3698. nextTick: nextTick
  3699. };
  3700. } else {
  3701. module.exports = process;
  3702. }
  3703. function nextTick(fn, arg1, arg2, arg3) {
  3704. if (typeof fn !== 'function') {
  3705. throw new TypeError('"callback" argument must be a function');
  3706. }
  3707. var len = arguments.length;
  3708. var args, i;
  3709. switch (len) {
  3710. case 0:
  3711. case 1:
  3712. return process.nextTick(fn);
  3713. case 2:
  3714. return process.nextTick(function afterTickOne() {
  3715. fn.call(null, arg1);
  3716. });
  3717. case 3:
  3718. return process.nextTick(function afterTickTwo() {
  3719. fn.call(null, arg1, arg2);
  3720. });
  3721. case 4:
  3722. return process.nextTick(function afterTickThree() {
  3723. fn.call(null, arg1, arg2, arg3);
  3724. });
  3725. default:
  3726. args = new Array(len - 1);
  3727. i = 0;
  3728. while (i < args.length) {
  3729. args[i++] = arguments[i];
  3730. }
  3731. return process.nextTick(function afterTick() {
  3732. fn.apply(null, args);
  3733. });
  3734. }
  3735. }
  3736. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../process/browser.js */ "./node_modules/process/browser.js")))
  3737. /***/ }),
  3738. /***/ "./node_modules/process/browser.js":
  3739. /*!*****************************************!*\
  3740. !*** ./node_modules/process/browser.js ***!
  3741. \*****************************************/
  3742. /*! no static exports found */
  3743. /***/ (function(module, exports) {
  3744. // shim for using process in browser
  3745. var process = module.exports = {};
  3746. // cached from whatever global is present so that test runners that stub it
  3747. // don't break things. But we need to wrap it in a try catch in case it is
  3748. // wrapped in strict mode code which doesn't define any globals. It's inside a
  3749. // function because try/catches deoptimize in certain engines.
  3750. var cachedSetTimeout;
  3751. var cachedClearTimeout;
  3752. function defaultSetTimout() {
  3753. throw new Error('setTimeout has not been defined');
  3754. }
  3755. function defaultClearTimeout() {
  3756. throw new Error('clearTimeout has not been defined');
  3757. }
  3758. (function () {
  3759. try {
  3760. if (typeof setTimeout === 'function') {
  3761. cachedSetTimeout = setTimeout;
  3762. } else {
  3763. cachedSetTimeout = defaultSetTimout;
  3764. }
  3765. } catch (e) {
  3766. cachedSetTimeout = defaultSetTimout;
  3767. }
  3768. try {
  3769. if (typeof clearTimeout === 'function') {
  3770. cachedClearTimeout = clearTimeout;
  3771. } else {
  3772. cachedClearTimeout = defaultClearTimeout;
  3773. }
  3774. } catch (e) {
  3775. cachedClearTimeout = defaultClearTimeout;
  3776. }
  3777. })();
  3778. function runTimeout(fun) {
  3779. if (cachedSetTimeout === setTimeout) {
  3780. //normal enviroments in sane situations
  3781. return setTimeout(fun, 0);
  3782. }
  3783. // if setTimeout wasn't available but was latter defined
  3784. if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
  3785. cachedSetTimeout = setTimeout;
  3786. return setTimeout(fun, 0);
  3787. }
  3788. try {
  3789. // when when somebody has screwed with setTimeout but no I.E. maddness
  3790. return cachedSetTimeout(fun, 0);
  3791. } catch (e) {
  3792. try {
  3793. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  3794. return cachedSetTimeout.call(null, fun, 0);
  3795. } catch (e) {
  3796. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
  3797. return cachedSetTimeout.call(this, fun, 0);
  3798. }
  3799. }
  3800. }
  3801. function runClearTimeout(marker) {
  3802. if (cachedClearTimeout === clearTimeout) {
  3803. //normal enviroments in sane situations
  3804. return clearTimeout(marker);
  3805. }
  3806. // if clearTimeout wasn't available but was latter defined
  3807. if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
  3808. cachedClearTimeout = clearTimeout;
  3809. return clearTimeout(marker);
  3810. }
  3811. try {
  3812. // when when somebody has screwed with setTimeout but no I.E. maddness
  3813. return cachedClearTimeout(marker);
  3814. } catch (e) {
  3815. try {
  3816. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  3817. return cachedClearTimeout.call(null, marker);
  3818. } catch (e) {
  3819. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
  3820. // Some versions of I.E. have different rules for clearTimeout vs setTimeout
  3821. return cachedClearTimeout.call(this, marker);
  3822. }
  3823. }
  3824. }
  3825. var queue = [];
  3826. var draining = false;
  3827. var currentQueue;
  3828. var queueIndex = -1;
  3829. function cleanUpNextTick() {
  3830. if (!draining || !currentQueue) {
  3831. return;
  3832. }
  3833. draining = false;
  3834. if (currentQueue.length) {
  3835. queue = currentQueue.concat(queue);
  3836. } else {
  3837. queueIndex = -1;
  3838. }
  3839. if (queue.length) {
  3840. drainQueue();
  3841. }
  3842. }
  3843. function drainQueue() {
  3844. if (draining) {
  3845. return;
  3846. }
  3847. var timeout = runTimeout(cleanUpNextTick);
  3848. draining = true;
  3849. var len = queue.length;
  3850. while (len) {
  3851. currentQueue = queue;
  3852. queue = [];
  3853. while (++queueIndex < len) {
  3854. if (currentQueue) {
  3855. currentQueue[queueIndex].run();
  3856. }
  3857. }
  3858. queueIndex = -1;
  3859. len = queue.length;
  3860. }
  3861. currentQueue = null;
  3862. draining = false;
  3863. runClearTimeout(timeout);
  3864. }
  3865. process.nextTick = function (fun) {
  3866. var args = new Array(arguments.length - 1);
  3867. if (arguments.length > 1) {
  3868. for (var i = 1; i < arguments.length; i++) {
  3869. args[i - 1] = arguments[i];
  3870. }
  3871. }
  3872. queue.push(new Item(fun, args));
  3873. if (queue.length === 1 && !draining) {
  3874. runTimeout(drainQueue);
  3875. }
  3876. };
  3877. // v8 likes predictible objects
  3878. function Item(fun, array) {
  3879. this.fun = fun;
  3880. this.array = array;
  3881. }
  3882. Item.prototype.run = function () {
  3883. this.fun.apply(null, this.array);
  3884. };
  3885. process.title = 'browser';
  3886. process.browser = true;
  3887. process.env = {};
  3888. process.argv = [];
  3889. process.version = ''; // empty string to avoid regexp issues
  3890. process.versions = {};
  3891. function noop() {}
  3892. process.on = noop;
  3893. process.addListener = noop;
  3894. process.once = noop;
  3895. process.off = noop;
  3896. process.removeListener = noop;
  3897. process.removeAllListeners = noop;
  3898. process.emit = noop;
  3899. process.prependListener = noop;
  3900. process.prependOnceListener = noop;
  3901. process.listeners = function (name) {
  3902. return [];
  3903. };
  3904. process.binding = function (name) {
  3905. throw new Error('process.binding is not supported');
  3906. };
  3907. process.cwd = function () {
  3908. return '/';
  3909. };
  3910. process.chdir = function (dir) {
  3911. throw new Error('process.chdir is not supported');
  3912. };
  3913. process.umask = function () {
  3914. return 0;
  3915. };
  3916. /***/ }),
  3917. /***/ "./node_modules/querystring-es3/decode.js":
  3918. /*!************************************************!*\
  3919. !*** ./node_modules/querystring-es3/decode.js ***!
  3920. \************************************************/
  3921. /*! no static exports found */
  3922. /***/ (function(module, exports, __webpack_require__) {
  3923. "use strict";
  3924. // Copyright Joyent, Inc. and other Node contributors.
  3925. //
  3926. // Permission is hereby granted, free of charge, to any person obtaining a
  3927. // copy of this software and associated documentation files (the
  3928. // "Software"), to deal in the Software without restriction, including
  3929. // without limitation the rights to use, copy, modify, merge, publish,
  3930. // distribute, sublicense, and/or sell copies of the Software, and to permit
  3931. // persons to whom the Software is furnished to do so, subject to the
  3932. // following conditions:
  3933. //
  3934. // The above copyright notice and this permission notice shall be included
  3935. // in all copies or substantial portions of the Software.
  3936. //
  3937. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  3938. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  3939. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  3940. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  3941. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  3942. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  3943. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  3944. // If obj.hasOwnProperty has been overridden, then calling
  3945. // obj.hasOwnProperty(prop) will break.
  3946. // See: https://github.com/joyent/node/issues/1707
  3947. function hasOwnProperty(obj, prop) {
  3948. return Object.prototype.hasOwnProperty.call(obj, prop);
  3949. }
  3950. module.exports = function (qs, sep, eq, options) {
  3951. sep = sep || '&';
  3952. eq = eq || '=';
  3953. var obj = {};
  3954. if (typeof qs !== 'string' || qs.length === 0) {
  3955. return obj;
  3956. }
  3957. var regexp = /\+/g;
  3958. qs = qs.split(sep);
  3959. var maxKeys = 1000;
  3960. if (options && typeof options.maxKeys === 'number') {
  3961. maxKeys = options.maxKeys;
  3962. }
  3963. var len = qs.length;
  3964. // maxKeys <= 0 means that we should not limit keys count
  3965. if (maxKeys > 0 && len > maxKeys) {
  3966. len = maxKeys;
  3967. }
  3968. for (var i = 0; i < len; ++i) {
  3969. var x = qs[i].replace(regexp, '%20'),
  3970. idx = x.indexOf(eq),
  3971. kstr,
  3972. vstr,
  3973. k,
  3974. v;
  3975. if (idx >= 0) {
  3976. kstr = x.substr(0, idx);
  3977. vstr = x.substr(idx + 1);
  3978. } else {
  3979. kstr = x;
  3980. vstr = '';
  3981. }
  3982. k = decodeURIComponent(kstr);
  3983. v = decodeURIComponent(vstr);
  3984. if (!hasOwnProperty(obj, k)) {
  3985. obj[k] = v;
  3986. } else if (isArray(obj[k])) {
  3987. obj[k].push(v);
  3988. } else {
  3989. obj[k] = [obj[k], v];
  3990. }
  3991. }
  3992. return obj;
  3993. };
  3994. var isArray = Array.isArray || function (xs) {
  3995. return Object.prototype.toString.call(xs) === '[object Array]';
  3996. };
  3997. /***/ }),
  3998. /***/ "./node_modules/querystring-es3/encode.js":
  3999. /*!************************************************!*\
  4000. !*** ./node_modules/querystring-es3/encode.js ***!
  4001. \************************************************/
  4002. /*! no static exports found */
  4003. /***/ (function(module, exports, __webpack_require__) {
  4004. "use strict";
  4005. // Copyright Joyent, Inc. and other Node contributors.
  4006. //
  4007. // Permission is hereby granted, free of charge, to any person obtaining a
  4008. // copy of this software and associated documentation files (the
  4009. // "Software"), to deal in the Software without restriction, including
  4010. // without limitation the rights to use, copy, modify, merge, publish,
  4011. // distribute, sublicense, and/or sell copies of the Software, and to permit
  4012. // persons to whom the Software is furnished to do so, subject to the
  4013. // following conditions:
  4014. //
  4015. // The above copyright notice and this permission notice shall be included
  4016. // in all copies or substantial portions of the Software.
  4017. //
  4018. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  4019. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  4020. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  4021. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  4022. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  4023. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  4024. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  4025. function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
  4026. var stringifyPrimitive = function stringifyPrimitive(v) {
  4027. switch (_typeof(v)) {
  4028. case 'string':
  4029. return v;
  4030. case 'boolean':
  4031. return v ? 'true' : 'false';
  4032. case 'number':
  4033. return isFinite(v) ? v : '';
  4034. default:
  4035. return '';
  4036. }
  4037. };
  4038. module.exports = function (obj, sep, eq, name) {
  4039. sep = sep || '&';
  4040. eq = eq || '=';
  4041. if (obj === null) {
  4042. obj = undefined;
  4043. }
  4044. if (_typeof(obj) === 'object') {
  4045. return map(objectKeys(obj), function (k) {
  4046. var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;
  4047. if (isArray(obj[k])) {
  4048. return map(obj[k], function (v) {
  4049. return ks + encodeURIComponent(stringifyPrimitive(v));
  4050. }).join(sep);
  4051. } else {
  4052. return ks + encodeURIComponent(stringifyPrimitive(obj[k]));
  4053. }
  4054. }).join(sep);
  4055. }
  4056. if (!name) return '';
  4057. return encodeURIComponent(stringifyPrimitive(name)) + eq + encodeURIComponent(stringifyPrimitive(obj));
  4058. };
  4059. var isArray = Array.isArray || function (xs) {
  4060. return Object.prototype.toString.call(xs) === '[object Array]';
  4061. };
  4062. function map(xs, f) {
  4063. if (xs.map) return xs.map(f);
  4064. var res = [];
  4065. for (var i = 0; i < xs.length; i++) {
  4066. res.push(f(xs[i], i));
  4067. }
  4068. return res;
  4069. }
  4070. var objectKeys = Object.keys || function (obj) {
  4071. var res = [];
  4072. for (var key in obj) {
  4073. if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);
  4074. }
  4075. return res;
  4076. };
  4077. /***/ }),
  4078. /***/ "./node_modules/querystring-es3/index.js":
  4079. /*!***********************************************!*\
  4080. !*** ./node_modules/querystring-es3/index.js ***!
  4081. \***********************************************/
  4082. /*! no static exports found */
  4083. /***/ (function(module, exports, __webpack_require__) {
  4084. "use strict";
  4085. exports.decode = exports.parse = __webpack_require__(/*! ./decode */ "./node_modules/querystring-es3/decode.js");
  4086. exports.encode = exports.stringify = __webpack_require__(/*! ./encode */ "./node_modules/querystring-es3/encode.js");
  4087. /***/ }),
  4088. /***/ "./node_modules/readable-stream/duplex-browser.js":
  4089. /*!********************************************************!*\
  4090. !*** ./node_modules/readable-stream/duplex-browser.js ***!
  4091. \********************************************************/
  4092. /*! no static exports found */
  4093. /***/ (function(module, exports, __webpack_require__) {
  4094. module.exports = __webpack_require__(/*! ./lib/_stream_duplex.js */ "./node_modules/readable-stream/lib/_stream_duplex.js");
  4095. /***/ }),
  4096. /***/ "./node_modules/readable-stream/lib/_stream_duplex.js":
  4097. /*!************************************************************!*\
  4098. !*** ./node_modules/readable-stream/lib/_stream_duplex.js ***!
  4099. \************************************************************/
  4100. /*! no static exports found */
  4101. /***/ (function(module, exports, __webpack_require__) {
  4102. "use strict";
  4103. // Copyright Joyent, Inc. and other Node contributors.
  4104. //
  4105. // Permission is hereby granted, free of charge, to any person obtaining a
  4106. // copy of this software and associated documentation files (the
  4107. // "Software"), to deal in the Software without restriction, including
  4108. // without limitation the rights to use, copy, modify, merge, publish,
  4109. // distribute, sublicense, and/or sell copies of the Software, and to permit
  4110. // persons to whom the Software is furnished to do so, subject to the
  4111. // following conditions:
  4112. //
  4113. // The above copyright notice and this permission notice shall be included
  4114. // in all copies or substantial portions of the Software.
  4115. //
  4116. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  4117. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  4118. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  4119. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  4120. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  4121. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  4122. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  4123. // a duplex stream is just a stream that is both readable and writable.
  4124. // Since JS doesn't have multiple prototypal inheritance, this class
  4125. // prototypally inherits from Readable, and then parasitically from
  4126. // Writable.
  4127. /*<replacement>*/
  4128. var pna = __webpack_require__(/*! process-nextick-args */ "./node_modules/process-nextick-args/index.js");
  4129. /*</replacement>*/
  4130. /*<replacement>*/
  4131. var objectKeys = Object.keys || function (obj) {
  4132. var keys = [];
  4133. for (var key in obj) {
  4134. keys.push(key);
  4135. }
  4136. return keys;
  4137. };
  4138. /*</replacement>*/
  4139. module.exports = Duplex;
  4140. /*<replacement>*/
  4141. var util = __webpack_require__(/*! core-util-is */ "./node_modules/core-util-is/lib/util.js");
  4142. util.inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
  4143. /*</replacement>*/
  4144. var Readable = __webpack_require__(/*! ./_stream_readable */ "./node_modules/readable-stream/lib/_stream_readable.js");
  4145. var Writable = __webpack_require__(/*! ./_stream_writable */ "./node_modules/readable-stream/lib/_stream_writable.js");
  4146. util.inherits(Duplex, Readable);
  4147. {
  4148. // avoid scope creep, the keys array can then be collected
  4149. var keys = objectKeys(Writable.prototype);
  4150. for (var v = 0; v < keys.length; v++) {
  4151. var method = keys[v];
  4152. if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
  4153. }
  4154. }
  4155. function Duplex(options) {
  4156. if (!(this instanceof Duplex)) return new Duplex(options);
  4157. Readable.call(this, options);
  4158. Writable.call(this, options);
  4159. if (options && options.readable === false) this.readable = false;
  4160. if (options && options.writable === false) this.writable = false;
  4161. this.allowHalfOpen = true;
  4162. if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
  4163. this.once('end', onend);
  4164. }
  4165. Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
  4166. // making it explicit this property is not enumerable
  4167. // because otherwise some prototype manipulation in
  4168. // userland will fail
  4169. enumerable: false,
  4170. get: function get() {
  4171. return this._writableState.highWaterMark;
  4172. }
  4173. });
  4174. // the no-half-open enforcer
  4175. function onend() {
  4176. // if we allow half-open state, or if the writable side ended,
  4177. // then we're ok.
  4178. if (this.allowHalfOpen || this._writableState.ended) return;
  4179. // no more data can be written.
  4180. // But allow more writes to happen in this tick.
  4181. pna.nextTick(onEndNT, this);
  4182. }
  4183. function onEndNT(self) {
  4184. self.end();
  4185. }
  4186. Object.defineProperty(Duplex.prototype, 'destroyed', {
  4187. get: function get() {
  4188. if (this._readableState === undefined || this._writableState === undefined) {
  4189. return false;
  4190. }
  4191. return this._readableState.destroyed && this._writableState.destroyed;
  4192. },
  4193. set: function set(value) {
  4194. // we ignore the value if the stream
  4195. // has not been initialized yet
  4196. if (this._readableState === undefined || this._writableState === undefined) {
  4197. return;
  4198. }
  4199. // backward compatibility, the user is explicitly
  4200. // managing destroyed
  4201. this._readableState.destroyed = value;
  4202. this._writableState.destroyed = value;
  4203. }
  4204. });
  4205. Duplex.prototype._destroy = function (err, cb) {
  4206. this.push(null);
  4207. this.end();
  4208. pna.nextTick(cb, err);
  4209. };
  4210. /***/ }),
  4211. /***/ "./node_modules/readable-stream/lib/_stream_passthrough.js":
  4212. /*!*****************************************************************!*\
  4213. !*** ./node_modules/readable-stream/lib/_stream_passthrough.js ***!
  4214. \*****************************************************************/
  4215. /*! no static exports found */
  4216. /***/ (function(module, exports, __webpack_require__) {
  4217. "use strict";
  4218. // Copyright Joyent, Inc. and other Node contributors.
  4219. //
  4220. // Permission is hereby granted, free of charge, to any person obtaining a
  4221. // copy of this software and associated documentation files (the
  4222. // "Software"), to deal in the Software without restriction, including
  4223. // without limitation the rights to use, copy, modify, merge, publish,
  4224. // distribute, sublicense, and/or sell copies of the Software, and to permit
  4225. // persons to whom the Software is furnished to do so, subject to the
  4226. // following conditions:
  4227. //
  4228. // The above copyright notice and this permission notice shall be included
  4229. // in all copies or substantial portions of the Software.
  4230. //
  4231. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  4232. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  4233. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  4234. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  4235. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  4236. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  4237. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  4238. // a passthrough stream.
  4239. // basically just the most minimal sort of Transform stream.
  4240. // Every written chunk gets output as-is.
  4241. module.exports = PassThrough;
  4242. var Transform = __webpack_require__(/*! ./_stream_transform */ "./node_modules/readable-stream/lib/_stream_transform.js");
  4243. /*<replacement>*/
  4244. var util = __webpack_require__(/*! core-util-is */ "./node_modules/core-util-is/lib/util.js");
  4245. util.inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
  4246. /*</replacement>*/
  4247. util.inherits(PassThrough, Transform);
  4248. function PassThrough(options) {
  4249. if (!(this instanceof PassThrough)) return new PassThrough(options);
  4250. Transform.call(this, options);
  4251. }
  4252. PassThrough.prototype._transform = function (chunk, encoding, cb) {
  4253. cb(null, chunk);
  4254. };
  4255. /***/ }),
  4256. /***/ "./node_modules/readable-stream/lib/_stream_readable.js":
  4257. /*!**************************************************************!*\
  4258. !*** ./node_modules/readable-stream/lib/_stream_readable.js ***!
  4259. \**************************************************************/
  4260. /*! no static exports found */
  4261. /***/ (function(module, exports, __webpack_require__) {
  4262. "use strict";
  4263. /* WEBPACK VAR INJECTION */(function(global, process) {// Copyright Joyent, Inc. and other Node contributors.
  4264. //
  4265. // Permission is hereby granted, free of charge, to any person obtaining a
  4266. // copy of this software and associated documentation files (the
  4267. // "Software"), to deal in the Software without restriction, including
  4268. // without limitation the rights to use, copy, modify, merge, publish,
  4269. // distribute, sublicense, and/or sell copies of the Software, and to permit
  4270. // persons to whom the Software is furnished to do so, subject to the
  4271. // following conditions:
  4272. //
  4273. // The above copyright notice and this permission notice shall be included
  4274. // in all copies or substantial portions of the Software.
  4275. //
  4276. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  4277. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  4278. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  4279. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  4280. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  4281. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  4282. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  4283. /*<replacement>*/
  4284. var pna = __webpack_require__(/*! process-nextick-args */ "./node_modules/process-nextick-args/index.js");
  4285. /*</replacement>*/
  4286. module.exports = Readable;
  4287. /*<replacement>*/
  4288. var isArray = __webpack_require__(/*! isarray */ "./node_modules/isarray/index.js");
  4289. /*</replacement>*/
  4290. /*<replacement>*/
  4291. var Duplex;
  4292. /*</replacement>*/
  4293. Readable.ReadableState = ReadableState;
  4294. /*<replacement>*/
  4295. var EE = __webpack_require__(/*! events */ "./node_modules/events/events.js").EventEmitter;
  4296. var EElistenerCount = function EElistenerCount(emitter, type) {
  4297. return emitter.listeners(type).length;
  4298. };
  4299. /*</replacement>*/
  4300. /*<replacement>*/
  4301. var Stream = __webpack_require__(/*! ./internal/streams/stream */ "./node_modules/readable-stream/lib/internal/streams/stream-browser.js");
  4302. /*</replacement>*/
  4303. /*<replacement>*/
  4304. var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer;
  4305. var OurUint8Array = global.Uint8Array || function () {};
  4306. function _uint8ArrayToBuffer(chunk) {
  4307. return Buffer.from(chunk);
  4308. }
  4309. function _isUint8Array(obj) {
  4310. return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
  4311. }
  4312. /*</replacement>*/
  4313. /*<replacement>*/
  4314. var util = __webpack_require__(/*! core-util-is */ "./node_modules/core-util-is/lib/util.js");
  4315. util.inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
  4316. /*</replacement>*/
  4317. /*<replacement>*/
  4318. var debugUtil = __webpack_require__(/*! util */ 0);
  4319. var debug = void 0;
  4320. if (debugUtil && debugUtil.debuglog) {
  4321. debug = debugUtil.debuglog('stream');
  4322. } else {
  4323. debug = function debug() {};
  4324. }
  4325. /*</replacement>*/
  4326. var BufferList = __webpack_require__(/*! ./internal/streams/BufferList */ "./node_modules/readable-stream/lib/internal/streams/BufferList.js");
  4327. var destroyImpl = __webpack_require__(/*! ./internal/streams/destroy */ "./node_modules/readable-stream/lib/internal/streams/destroy.js");
  4328. var StringDecoder;
  4329. util.inherits(Readable, Stream);
  4330. var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
  4331. function prependListener(emitter, event, fn) {
  4332. // Sadly this is not cacheable as some libraries bundle their own
  4333. // event emitter implementation with them.
  4334. if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);
  4335. // This is a hack to make sure that our error handler is attached before any
  4336. // userland ones. NEVER DO THIS. This is here only because this code needs
  4337. // to continue to work with older versions of Node.js that do not include
  4338. // the prependListener() method. The goal is to eventually remove this hack.
  4339. if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
  4340. }
  4341. function ReadableState(options, stream) {
  4342. Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ "./node_modules/readable-stream/lib/_stream_duplex.js");
  4343. options = options || {};
  4344. // Duplex streams are both readable and writable, but share
  4345. // the same options object.
  4346. // However, some cases require setting options to different
  4347. // values for the readable and the writable sides of the duplex stream.
  4348. // These options can be provided separately as readableXXX and writableXXX.
  4349. var isDuplex = stream instanceof Duplex;
  4350. // object stream flag. Used to make read(n) ignore n and to
  4351. // make all the buffer merging and length checks go away
  4352. this.objectMode = !!options.objectMode;
  4353. if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
  4354. // the point at which it stops calling _read() to fill the buffer
  4355. // Note: 0 is a valid value, means "don't call _read preemptively ever"
  4356. var hwm = options.highWaterMark;
  4357. var readableHwm = options.readableHighWaterMark;
  4358. var defaultHwm = this.objectMode ? 16 : 16 * 1024;
  4359. if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;
  4360. // cast to ints.
  4361. this.highWaterMark = Math.floor(this.highWaterMark);
  4362. // A linked list is used to store data chunks instead of an array because the
  4363. // linked list can remove elements from the beginning faster than
  4364. // array.shift()
  4365. this.buffer = new BufferList();
  4366. this.length = 0;
  4367. this.pipes = null;
  4368. this.pipesCount = 0;
  4369. this.flowing = null;
  4370. this.ended = false;
  4371. this.endEmitted = false;
  4372. this.reading = false;
  4373. // a flag to be able to tell if the event 'readable'/'data' is emitted
  4374. // immediately, or on a later tick. We set this to true at first, because
  4375. // any actions that shouldn't happen until "later" should generally also
  4376. // not happen before the first read call.
  4377. this.sync = true;
  4378. // whenever we return null, then we set a flag to say
  4379. // that we're awaiting a 'readable' event emission.
  4380. this.needReadable = false;
  4381. this.emittedReadable = false;
  4382. this.readableListening = false;
  4383. this.resumeScheduled = false;
  4384. // has it been destroyed
  4385. this.destroyed = false;
  4386. // Crypto is kind of old and crusty. Historically, its default string
  4387. // encoding is 'binary' so we have to make this configurable.
  4388. // Everything else in the universe uses 'utf8', though.
  4389. this.defaultEncoding = options.defaultEncoding || 'utf8';
  4390. // the number of writers that are awaiting a drain event in .pipe()s
  4391. this.awaitDrain = 0;
  4392. // if true, a maybeReadMore has been scheduled
  4393. this.readingMore = false;
  4394. this.decoder = null;
  4395. this.encoding = null;
  4396. if (options.encoding) {
  4397. if (!StringDecoder) StringDecoder = __webpack_require__(/*! string_decoder/ */ "./node_modules/string_decoder/lib/string_decoder.js").StringDecoder;
  4398. this.decoder = new StringDecoder(options.encoding);
  4399. this.encoding = options.encoding;
  4400. }
  4401. }
  4402. function Readable(options) {
  4403. Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ "./node_modules/readable-stream/lib/_stream_duplex.js");
  4404. if (!(this instanceof Readable)) return new Readable(options);
  4405. this._readableState = new ReadableState(options, this);
  4406. // legacy
  4407. this.readable = true;
  4408. if (options) {
  4409. if (typeof options.read === 'function') this._read = options.read;
  4410. if (typeof options.destroy === 'function') this._destroy = options.destroy;
  4411. }
  4412. Stream.call(this);
  4413. }
  4414. Object.defineProperty(Readable.prototype, 'destroyed', {
  4415. get: function get() {
  4416. if (this._readableState === undefined) {
  4417. return false;
  4418. }
  4419. return this._readableState.destroyed;
  4420. },
  4421. set: function set(value) {
  4422. // we ignore the value if the stream
  4423. // has not been initialized yet
  4424. if (!this._readableState) {
  4425. return;
  4426. }
  4427. // backward compatibility, the user is explicitly
  4428. // managing destroyed
  4429. this._readableState.destroyed = value;
  4430. }
  4431. });
  4432. Readable.prototype.destroy = destroyImpl.destroy;
  4433. Readable.prototype._undestroy = destroyImpl.undestroy;
  4434. Readable.prototype._destroy = function (err, cb) {
  4435. this.push(null);
  4436. cb(err);
  4437. };
  4438. // Manually shove something into the read() buffer.
  4439. // This returns true if the highWaterMark has not been hit yet,
  4440. // similar to how Writable.write() returns true if you should
  4441. // write() some more.
  4442. Readable.prototype.push = function (chunk, encoding) {
  4443. var state = this._readableState;
  4444. var skipChunkCheck;
  4445. if (!state.objectMode) {
  4446. if (typeof chunk === 'string') {
  4447. encoding = encoding || state.defaultEncoding;
  4448. if (encoding !== state.encoding) {
  4449. chunk = Buffer.from(chunk, encoding);
  4450. encoding = '';
  4451. }
  4452. skipChunkCheck = true;
  4453. }
  4454. } else {
  4455. skipChunkCheck = true;
  4456. }
  4457. return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
  4458. };
  4459. // Unshift should *always* be something directly out of read()
  4460. Readable.prototype.unshift = function (chunk) {
  4461. return readableAddChunk(this, chunk, null, true, false);
  4462. };
  4463. function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
  4464. var state = stream._readableState;
  4465. if (chunk === null) {
  4466. state.reading = false;
  4467. onEofChunk(stream, state);
  4468. } else {
  4469. var er;
  4470. if (!skipChunkCheck) er = chunkInvalid(state, chunk);
  4471. if (er) {
  4472. stream.emit('error', er);
  4473. } else if (state.objectMode || chunk && chunk.length > 0) {
  4474. if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
  4475. chunk = _uint8ArrayToBuffer(chunk);
  4476. }
  4477. if (addToFront) {
  4478. if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
  4479. } else if (state.ended) {
  4480. stream.emit('error', new Error('stream.push() after EOF'));
  4481. } else {
  4482. state.reading = false;
  4483. if (state.decoder && !encoding) {
  4484. chunk = state.decoder.write(chunk);
  4485. if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
  4486. } else {
  4487. addChunk(stream, state, chunk, false);
  4488. }
  4489. }
  4490. } else if (!addToFront) {
  4491. state.reading = false;
  4492. }
  4493. }
  4494. return needMoreData(state);
  4495. }
  4496. function addChunk(stream, state, chunk, addToFront) {
  4497. if (state.flowing && state.length === 0 && !state.sync) {
  4498. stream.emit('data', chunk);
  4499. stream.read(0);
  4500. } else {
  4501. // update the buffer info.
  4502. state.length += state.objectMode ? 1 : chunk.length;
  4503. if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
  4504. if (state.needReadable) emitReadable(stream);
  4505. }
  4506. maybeReadMore(stream, state);
  4507. }
  4508. function chunkInvalid(state, chunk) {
  4509. var er;
  4510. if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
  4511. er = new TypeError('Invalid non-string/buffer chunk');
  4512. }
  4513. return er;
  4514. }
  4515. // if it's past the high water mark, we can push in some more.
  4516. // Also, if we have no data yet, we can stand some
  4517. // more bytes. This is to work around cases where hwm=0,
  4518. // such as the repl. Also, if the push() triggered a
  4519. // readable event, and the user called read(largeNumber) such that
  4520. // needReadable was set, then we ought to push more, so that another
  4521. // 'readable' event will be triggered.
  4522. function needMoreData(state) {
  4523. return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
  4524. }
  4525. Readable.prototype.isPaused = function () {
  4526. return this._readableState.flowing === false;
  4527. };
  4528. // backwards compatibility.
  4529. Readable.prototype.setEncoding = function (enc) {
  4530. if (!StringDecoder) StringDecoder = __webpack_require__(/*! string_decoder/ */ "./node_modules/string_decoder/lib/string_decoder.js").StringDecoder;
  4531. this._readableState.decoder = new StringDecoder(enc);
  4532. this._readableState.encoding = enc;
  4533. return this;
  4534. };
  4535. // Don't raise the hwm > 8MB
  4536. var MAX_HWM = 0x800000;
  4537. function computeNewHighWaterMark(n) {
  4538. if (n >= MAX_HWM) {
  4539. n = MAX_HWM;
  4540. } else {
  4541. // Get the next highest power of 2 to prevent increasing hwm excessively in
  4542. // tiny amounts
  4543. n--;
  4544. n |= n >>> 1;
  4545. n |= n >>> 2;
  4546. n |= n >>> 4;
  4547. n |= n >>> 8;
  4548. n |= n >>> 16;
  4549. n++;
  4550. }
  4551. return n;
  4552. }
  4553. // This function is designed to be inlinable, so please take care when making
  4554. // changes to the function body.
  4555. function howMuchToRead(n, state) {
  4556. if (n <= 0 || state.length === 0 && state.ended) return 0;
  4557. if (state.objectMode) return 1;
  4558. if (n !== n) {
  4559. // Only flow one buffer at a time
  4560. if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
  4561. }
  4562. // If we're asking for more than the current hwm, then raise the hwm.
  4563. if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
  4564. if (n <= state.length) return n;
  4565. // Don't have enough
  4566. if (!state.ended) {
  4567. state.needReadable = true;
  4568. return 0;
  4569. }
  4570. return state.length;
  4571. }
  4572. // you can override either this method, or the async _read(n) below.
  4573. Readable.prototype.read = function (n) {
  4574. debug('read', n);
  4575. n = parseInt(n, 10);
  4576. var state = this._readableState;
  4577. var nOrig = n;
  4578. if (n !== 0) state.emittedReadable = false;
  4579. // if we're doing read(0) to trigger a readable event, but we
  4580. // already have a bunch of data in the buffer, then just trigger
  4581. // the 'readable' event and move on.
  4582. if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
  4583. debug('read: emitReadable', state.length, state.ended);
  4584. if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
  4585. return null;
  4586. }
  4587. n = howMuchToRead(n, state);
  4588. // if we've ended, and we're now clear, then finish it up.
  4589. if (n === 0 && state.ended) {
  4590. if (state.length === 0) endReadable(this);
  4591. return null;
  4592. }
  4593. // All the actual chunk generation logic needs to be
  4594. // *below* the call to _read. The reason is that in certain
  4595. // synthetic stream cases, such as passthrough streams, _read
  4596. // may be a completely synchronous operation which may change
  4597. // the state of the read buffer, providing enough data when
  4598. // before there was *not* enough.
  4599. //
  4600. // So, the steps are:
  4601. // 1. Figure out what the state of things will be after we do
  4602. // a read from the buffer.
  4603. //
  4604. // 2. If that resulting state will trigger a _read, then call _read.
  4605. // Note that this may be asynchronous, or synchronous. Yes, it is
  4606. // deeply ugly to write APIs this way, but that still doesn't mean
  4607. // that the Readable class should behave improperly, as streams are
  4608. // designed to be sync/async agnostic.
  4609. // Take note if the _read call is sync or async (ie, if the read call
  4610. // has returned yet), so that we know whether or not it's safe to emit
  4611. // 'readable' etc.
  4612. //
  4613. // 3. Actually pull the requested chunks out of the buffer and return.
  4614. // if we need a readable event, then we need to do some reading.
  4615. var doRead = state.needReadable;
  4616. debug('need readable', doRead);
  4617. // if we currently have less than the highWaterMark, then also read some
  4618. if (state.length === 0 || state.length - n < state.highWaterMark) {
  4619. doRead = true;
  4620. debug('length less than watermark', doRead);
  4621. }
  4622. // however, if we've ended, then there's no point, and if we're already
  4623. // reading, then it's unnecessary.
  4624. if (state.ended || state.reading) {
  4625. doRead = false;
  4626. debug('reading or ended', doRead);
  4627. } else if (doRead) {
  4628. debug('do read');
  4629. state.reading = true;
  4630. state.sync = true;
  4631. // if the length is currently zero, then we *need* a readable event.
  4632. if (state.length === 0) state.needReadable = true;
  4633. // call internal read method
  4634. this._read(state.highWaterMark);
  4635. state.sync = false;
  4636. // If _read pushed data synchronously, then `reading` will be false,
  4637. // and we need to re-evaluate how much data we can return to the user.
  4638. if (!state.reading) n = howMuchToRead(nOrig, state);
  4639. }
  4640. var ret;
  4641. if (n > 0) ret = fromList(n, state);else ret = null;
  4642. if (ret === null) {
  4643. state.needReadable = true;
  4644. n = 0;
  4645. } else {
  4646. state.length -= n;
  4647. }
  4648. if (state.length === 0) {
  4649. // If we have nothing in the buffer, then we want to know
  4650. // as soon as we *do* get something into the buffer.
  4651. if (!state.ended) state.needReadable = true;
  4652. // If we tried to read() past the EOF, then emit end on the next tick.
  4653. if (nOrig !== n && state.ended) endReadable(this);
  4654. }
  4655. if (ret !== null) this.emit('data', ret);
  4656. return ret;
  4657. };
  4658. function onEofChunk(stream, state) {
  4659. if (state.ended) return;
  4660. if (state.decoder) {
  4661. var chunk = state.decoder.end();
  4662. if (chunk && chunk.length) {
  4663. state.buffer.push(chunk);
  4664. state.length += state.objectMode ? 1 : chunk.length;
  4665. }
  4666. }
  4667. state.ended = true;
  4668. // emit 'readable' now to make sure it gets picked up.
  4669. emitReadable(stream);
  4670. }
  4671. // Don't emit readable right away in sync mode, because this can trigger
  4672. // another read() call => stack overflow. This way, it might trigger
  4673. // a nextTick recursion warning, but that's not so bad.
  4674. function emitReadable(stream) {
  4675. var state = stream._readableState;
  4676. state.needReadable = false;
  4677. if (!state.emittedReadable) {
  4678. debug('emitReadable', state.flowing);
  4679. state.emittedReadable = true;
  4680. if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);
  4681. }
  4682. }
  4683. function emitReadable_(stream) {
  4684. debug('emit readable');
  4685. stream.emit('readable');
  4686. flow(stream);
  4687. }
  4688. // at this point, the user has presumably seen the 'readable' event,
  4689. // and called read() to consume some data. that may have triggered
  4690. // in turn another _read(n) call, in which case reading = true if
  4691. // it's in progress.
  4692. // However, if we're not ended, or reading, and the length < hwm,
  4693. // then go ahead and try to read some more preemptively.
  4694. function maybeReadMore(stream, state) {
  4695. if (!state.readingMore) {
  4696. state.readingMore = true;
  4697. pna.nextTick(maybeReadMore_, stream, state);
  4698. }
  4699. }
  4700. function maybeReadMore_(stream, state) {
  4701. var len = state.length;
  4702. while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
  4703. debug('maybeReadMore read 0');
  4704. stream.read(0);
  4705. if (len === state.length)
  4706. // didn't get any data, stop spinning.
  4707. break;else len = state.length;
  4708. }
  4709. state.readingMore = false;
  4710. }
  4711. // abstract method. to be overridden in specific implementation classes.
  4712. // call cb(er, data) where data is <= n in length.
  4713. // for virtual (non-string, non-buffer) streams, "length" is somewhat
  4714. // arbitrary, and perhaps not very meaningful.
  4715. Readable.prototype._read = function (n) {
  4716. this.emit('error', new Error('_read() is not implemented'));
  4717. };
  4718. Readable.prototype.pipe = function (dest, pipeOpts) {
  4719. var src = this;
  4720. var state = this._readableState;
  4721. switch (state.pipesCount) {
  4722. case 0:
  4723. state.pipes = dest;
  4724. break;
  4725. case 1:
  4726. state.pipes = [state.pipes, dest];
  4727. break;
  4728. default:
  4729. state.pipes.push(dest);
  4730. break;
  4731. }
  4732. state.pipesCount += 1;
  4733. debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
  4734. var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
  4735. var endFn = doEnd ? onend : unpipe;
  4736. if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);
  4737. dest.on('unpipe', onunpipe);
  4738. function onunpipe(readable, unpipeInfo) {
  4739. debug('onunpipe');
  4740. if (readable === src) {
  4741. if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
  4742. unpipeInfo.hasUnpiped = true;
  4743. cleanup();
  4744. }
  4745. }
  4746. }
  4747. function onend() {
  4748. debug('onend');
  4749. dest.end();
  4750. }
  4751. // when the dest drains, it reduces the awaitDrain counter
  4752. // on the source. This would be more elegant with a .once()
  4753. // handler in flow(), but adding and removing repeatedly is
  4754. // too slow.
  4755. var ondrain = pipeOnDrain(src);
  4756. dest.on('drain', ondrain);
  4757. var cleanedUp = false;
  4758. function cleanup() {
  4759. debug('cleanup');
  4760. // cleanup event handlers once the pipe is broken
  4761. dest.removeListener('close', onclose);
  4762. dest.removeListener('finish', onfinish);
  4763. dest.removeListener('drain', ondrain);
  4764. dest.removeListener('error', onerror);
  4765. dest.removeListener('unpipe', onunpipe);
  4766. src.removeListener('end', onend);
  4767. src.removeListener('end', unpipe);
  4768. src.removeListener('data', ondata);
  4769. cleanedUp = true;
  4770. // if the reader is waiting for a drain event from this
  4771. // specific writer, then it would cause it to never start
  4772. // flowing again.
  4773. // So, if this is awaiting a drain, then we just call it now.
  4774. // If we don't know, then assume that we are waiting for one.
  4775. if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
  4776. }
  4777. // If the user pushes more data while we're writing to dest then we'll end up
  4778. // in ondata again. However, we only want to increase awaitDrain once because
  4779. // dest will only emit one 'drain' event for the multiple writes.
  4780. // => Introduce a guard on increasing awaitDrain.
  4781. var increasedAwaitDrain = false;
  4782. src.on('data', ondata);
  4783. function ondata(chunk) {
  4784. debug('ondata');
  4785. increasedAwaitDrain = false;
  4786. var ret = dest.write(chunk);
  4787. if (false === ret && !increasedAwaitDrain) {
  4788. // If the user unpiped during `dest.write()`, it is possible
  4789. // to get stuck in a permanently paused state if that write
  4790. // also returned false.
  4791. // => Check whether `dest` is still a piping destination.
  4792. if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
  4793. debug('false write response, pause', src._readableState.awaitDrain);
  4794. src._readableState.awaitDrain++;
  4795. increasedAwaitDrain = true;
  4796. }
  4797. src.pause();
  4798. }
  4799. }
  4800. // if the dest has an error, then stop piping into it.
  4801. // however, don't suppress the throwing behavior for this.
  4802. function onerror(er) {
  4803. debug('onerror', er);
  4804. unpipe();
  4805. dest.removeListener('error', onerror);
  4806. if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
  4807. }
  4808. // Make sure our error handler is attached before userland ones.
  4809. prependListener(dest, 'error', onerror);
  4810. // Both close and finish should trigger unpipe, but only once.
  4811. function onclose() {
  4812. dest.removeListener('finish', onfinish);
  4813. unpipe();
  4814. }
  4815. dest.once('close', onclose);
  4816. function onfinish() {
  4817. debug('onfinish');
  4818. dest.removeListener('close', onclose);
  4819. unpipe();
  4820. }
  4821. dest.once('finish', onfinish);
  4822. function unpipe() {
  4823. debug('unpipe');
  4824. src.unpipe(dest);
  4825. }
  4826. // tell the dest that it's being piped to
  4827. dest.emit('pipe', src);
  4828. // start the flow if it hasn't been started already.
  4829. if (!state.flowing) {
  4830. debug('pipe resume');
  4831. src.resume();
  4832. }
  4833. return dest;
  4834. };
  4835. function pipeOnDrain(src) {
  4836. return function () {
  4837. var state = src._readableState;
  4838. debug('pipeOnDrain', state.awaitDrain);
  4839. if (state.awaitDrain) state.awaitDrain--;
  4840. if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
  4841. state.flowing = true;
  4842. flow(src);
  4843. }
  4844. };
  4845. }
  4846. Readable.prototype.unpipe = function (dest) {
  4847. var state = this._readableState;
  4848. var unpipeInfo = {
  4849. hasUnpiped: false
  4850. };
  4851. // if we're not piping anywhere, then do nothing.
  4852. if (state.pipesCount === 0) return this;
  4853. // just one destination. most common case.
  4854. if (state.pipesCount === 1) {
  4855. // passed in one, but it's not the right one.
  4856. if (dest && dest !== state.pipes) return this;
  4857. if (!dest) dest = state.pipes;
  4858. // got a match.
  4859. state.pipes = null;
  4860. state.pipesCount = 0;
  4861. state.flowing = false;
  4862. if (dest) dest.emit('unpipe', this, unpipeInfo);
  4863. return this;
  4864. }
  4865. // slow case. multiple pipe destinations.
  4866. if (!dest) {
  4867. // remove all.
  4868. var dests = state.pipes;
  4869. var len = state.pipesCount;
  4870. state.pipes = null;
  4871. state.pipesCount = 0;
  4872. state.flowing = false;
  4873. for (var i = 0; i < len; i++) {
  4874. dests[i].emit('unpipe', this, unpipeInfo);
  4875. }
  4876. return this;
  4877. }
  4878. // try to find the right one.
  4879. var index = indexOf(state.pipes, dest);
  4880. if (index === -1) return this;
  4881. state.pipes.splice(index, 1);
  4882. state.pipesCount -= 1;
  4883. if (state.pipesCount === 1) state.pipes = state.pipes[0];
  4884. dest.emit('unpipe', this, unpipeInfo);
  4885. return this;
  4886. };
  4887. // set up data events if they are asked for
  4888. // Ensure readable listeners eventually get something
  4889. Readable.prototype.on = function (ev, fn) {
  4890. var res = Stream.prototype.on.call(this, ev, fn);
  4891. if (ev === 'data') {
  4892. // Start flowing on next tick if stream isn't explicitly paused
  4893. if (this._readableState.flowing !== false) this.resume();
  4894. } else if (ev === 'readable') {
  4895. var state = this._readableState;
  4896. if (!state.endEmitted && !state.readableListening) {
  4897. state.readableListening = state.needReadable = true;
  4898. state.emittedReadable = false;
  4899. if (!state.reading) {
  4900. pna.nextTick(nReadingNextTick, this);
  4901. } else if (state.length) {
  4902. emitReadable(this);
  4903. }
  4904. }
  4905. }
  4906. return res;
  4907. };
  4908. Readable.prototype.addListener = Readable.prototype.on;
  4909. function nReadingNextTick(self) {
  4910. debug('readable nexttick read 0');
  4911. self.read(0);
  4912. }
  4913. // pause() and resume() are remnants of the legacy readable stream API
  4914. // If the user uses them, then switch into old mode.
  4915. Readable.prototype.resume = function () {
  4916. var state = this._readableState;
  4917. if (!state.flowing) {
  4918. debug('resume');
  4919. state.flowing = true;
  4920. resume(this, state);
  4921. }
  4922. return this;
  4923. };
  4924. function resume(stream, state) {
  4925. if (!state.resumeScheduled) {
  4926. state.resumeScheduled = true;
  4927. pna.nextTick(resume_, stream, state);
  4928. }
  4929. }
  4930. function resume_(stream, state) {
  4931. if (!state.reading) {
  4932. debug('resume read 0');
  4933. stream.read(0);
  4934. }
  4935. state.resumeScheduled = false;
  4936. state.awaitDrain = 0;
  4937. stream.emit('resume');
  4938. flow(stream);
  4939. if (state.flowing && !state.reading) stream.read(0);
  4940. }
  4941. Readable.prototype.pause = function () {
  4942. debug('call pause flowing=%j', this._readableState.flowing);
  4943. if (false !== this._readableState.flowing) {
  4944. debug('pause');
  4945. this._readableState.flowing = false;
  4946. this.emit('pause');
  4947. }
  4948. return this;
  4949. };
  4950. function flow(stream) {
  4951. var state = stream._readableState;
  4952. debug('flow', state.flowing);
  4953. while (state.flowing && stream.read() !== null) {}
  4954. }
  4955. // wrap an old-style stream as the async data source.
  4956. // This is *not* part of the readable stream interface.
  4957. // It is an ugly unfortunate mess of history.
  4958. Readable.prototype.wrap = function (stream) {
  4959. var _this = this;
  4960. var state = this._readableState;
  4961. var paused = false;
  4962. stream.on('end', function () {
  4963. debug('wrapped end');
  4964. if (state.decoder && !state.ended) {
  4965. var chunk = state.decoder.end();
  4966. if (chunk && chunk.length) _this.push(chunk);
  4967. }
  4968. _this.push(null);
  4969. });
  4970. stream.on('data', function (chunk) {
  4971. debug('wrapped data');
  4972. if (state.decoder) chunk = state.decoder.write(chunk);
  4973. // don't skip over falsy values in objectMode
  4974. if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
  4975. var ret = _this.push(chunk);
  4976. if (!ret) {
  4977. paused = true;
  4978. stream.pause();
  4979. }
  4980. });
  4981. // proxy all the other methods.
  4982. // important when wrapping filters and duplexes.
  4983. for (var i in stream) {
  4984. if (this[i] === undefined && typeof stream[i] === 'function') {
  4985. this[i] = function (method) {
  4986. return function () {
  4987. return stream[method].apply(stream, arguments);
  4988. };
  4989. }(i);
  4990. }
  4991. }
  4992. // proxy certain important events.
  4993. for (var n = 0; n < kProxyEvents.length; n++) {
  4994. stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
  4995. }
  4996. // when we try to consume some more bytes, simply unpause the
  4997. // underlying stream.
  4998. this._read = function (n) {
  4999. debug('wrapped _read', n);
  5000. if (paused) {
  5001. paused = false;
  5002. stream.resume();
  5003. }
  5004. };
  5005. return this;
  5006. };
  5007. Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
  5008. // making it explicit this property is not enumerable
  5009. // because otherwise some prototype manipulation in
  5010. // userland will fail
  5011. enumerable: false,
  5012. get: function get() {
  5013. return this._readableState.highWaterMark;
  5014. }
  5015. });
  5016. // exposed for testing purposes only.
  5017. Readable._fromList = fromList;
  5018. // Pluck off n bytes from an array of buffers.
  5019. // Length is the combined lengths of all the buffers in the list.
  5020. // This function is designed to be inlinable, so please take care when making
  5021. // changes to the function body.
  5022. function fromList(n, state) {
  5023. // nothing buffered
  5024. if (state.length === 0) return null;
  5025. var ret;
  5026. if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
  5027. // read it all, truncate the list
  5028. if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
  5029. state.buffer.clear();
  5030. } else {
  5031. // read part of list
  5032. ret = fromListPartial(n, state.buffer, state.decoder);
  5033. }
  5034. return ret;
  5035. }
  5036. // Extracts only enough buffered data to satisfy the amount requested.
  5037. // This function is designed to be inlinable, so please take care when making
  5038. // changes to the function body.
  5039. function fromListPartial(n, list, hasStrings) {
  5040. var ret;
  5041. if (n < list.head.data.length) {
  5042. // slice is the same for buffers and strings
  5043. ret = list.head.data.slice(0, n);
  5044. list.head.data = list.head.data.slice(n);
  5045. } else if (n === list.head.data.length) {
  5046. // first chunk is a perfect match
  5047. ret = list.shift();
  5048. } else {
  5049. // result spans more than one buffer
  5050. ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
  5051. }
  5052. return ret;
  5053. }
  5054. // Copies a specified amount of characters from the list of buffered data
  5055. // chunks.
  5056. // This function is designed to be inlinable, so please take care when making
  5057. // changes to the function body.
  5058. function copyFromBufferString(n, list) {
  5059. var p = list.head;
  5060. var c = 1;
  5061. var ret = p.data;
  5062. n -= ret.length;
  5063. while (p = p.next) {
  5064. var str = p.data;
  5065. var nb = n > str.length ? str.length : n;
  5066. if (nb === str.length) ret += str;else ret += str.slice(0, n);
  5067. n -= nb;
  5068. if (n === 0) {
  5069. if (nb === str.length) {
  5070. ++c;
  5071. if (p.next) list.head = p.next;else list.head = list.tail = null;
  5072. } else {
  5073. list.head = p;
  5074. p.data = str.slice(nb);
  5075. }
  5076. break;
  5077. }
  5078. ++c;
  5079. }
  5080. list.length -= c;
  5081. return ret;
  5082. }
  5083. // Copies a specified amount of bytes from the list of buffered data chunks.
  5084. // This function is designed to be inlinable, so please take care when making
  5085. // changes to the function body.
  5086. function copyFromBuffer(n, list) {
  5087. var ret = Buffer.allocUnsafe(n);
  5088. var p = list.head;
  5089. var c = 1;
  5090. p.data.copy(ret);
  5091. n -= p.data.length;
  5092. while (p = p.next) {
  5093. var buf = p.data;
  5094. var nb = n > buf.length ? buf.length : n;
  5095. buf.copy(ret, ret.length - n, 0, nb);
  5096. n -= nb;
  5097. if (n === 0) {
  5098. if (nb === buf.length) {
  5099. ++c;
  5100. if (p.next) list.head = p.next;else list.head = list.tail = null;
  5101. } else {
  5102. list.head = p;
  5103. p.data = buf.slice(nb);
  5104. }
  5105. break;
  5106. }
  5107. ++c;
  5108. }
  5109. list.length -= c;
  5110. return ret;
  5111. }
  5112. function endReadable(stream) {
  5113. var state = stream._readableState;
  5114. // If we get here before consuming all the bytes, then that is a
  5115. // bug in node. Should never happen.
  5116. if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
  5117. if (!state.endEmitted) {
  5118. state.ended = true;
  5119. pna.nextTick(endReadableNT, state, stream);
  5120. }
  5121. }
  5122. function endReadableNT(state, stream) {
  5123. // Check that we didn't get one last unshift.
  5124. if (!state.endEmitted && state.length === 0) {
  5125. state.endEmitted = true;
  5126. stream.readable = false;
  5127. stream.emit('end');
  5128. }
  5129. }
  5130. function indexOf(xs, x) {
  5131. for (var i = 0, l = xs.length; i < l; i++) {
  5132. if (xs[i] === x) return i;
  5133. }
  5134. return -1;
  5135. }
  5136. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"), __webpack_require__(/*! ./../../process/browser.js */ "./node_modules/process/browser.js")))
  5137. /***/ }),
  5138. /***/ "./node_modules/readable-stream/lib/_stream_transform.js":
  5139. /*!***************************************************************!*\
  5140. !*** ./node_modules/readable-stream/lib/_stream_transform.js ***!
  5141. \***************************************************************/
  5142. /*! no static exports found */
  5143. /***/ (function(module, exports, __webpack_require__) {
  5144. "use strict";
  5145. // Copyright Joyent, Inc. and other Node contributors.
  5146. //
  5147. // Permission is hereby granted, free of charge, to any person obtaining a
  5148. // copy of this software and associated documentation files (the
  5149. // "Software"), to deal in the Software without restriction, including
  5150. // without limitation the rights to use, copy, modify, merge, publish,
  5151. // distribute, sublicense, and/or sell copies of the Software, and to permit
  5152. // persons to whom the Software is furnished to do so, subject to the
  5153. // following conditions:
  5154. //
  5155. // The above copyright notice and this permission notice shall be included
  5156. // in all copies or substantial portions of the Software.
  5157. //
  5158. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  5159. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  5160. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  5161. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  5162. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  5163. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  5164. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  5165. // a transform stream is a readable/writable stream where you do
  5166. // something with the data. Sometimes it's called a "filter",
  5167. // but that's not a great name for it, since that implies a thing where
  5168. // some bits pass through, and others are simply ignored. (That would
  5169. // be a valid example of a transform, of course.)
  5170. //
  5171. // While the output is causally related to the input, it's not a
  5172. // necessarily symmetric or synchronous transformation. For example,
  5173. // a zlib stream might take multiple plain-text writes(), and then
  5174. // emit a single compressed chunk some time in the future.
  5175. //
  5176. // Here's how this works:
  5177. //
  5178. // The Transform stream has all the aspects of the readable and writable
  5179. // stream classes. When you write(chunk), that calls _write(chunk,cb)
  5180. // internally, and returns false if there's a lot of pending writes
  5181. // buffered up. When you call read(), that calls _read(n) until
  5182. // there's enough pending readable data buffered up.
  5183. //
  5184. // In a transform stream, the written data is placed in a buffer. When
  5185. // _read(n) is called, it transforms the queued up data, calling the
  5186. // buffered _write cb's as it consumes chunks. If consuming a single
  5187. // written chunk would result in multiple output chunks, then the first
  5188. // outputted bit calls the readcb, and subsequent chunks just go into
  5189. // the read buffer, and will cause it to emit 'readable' if necessary.
  5190. //
  5191. // This way, back-pressure is actually determined by the reading side,
  5192. // since _read has to be called to start processing a new chunk. However,
  5193. // a pathological inflate type of transform can cause excessive buffering
  5194. // here. For example, imagine a stream where every byte of input is
  5195. // interpreted as an integer from 0-255, and then results in that many
  5196. // bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
  5197. // 1kb of data being output. In this case, you could write a very small
  5198. // amount of input, and end up with a very large amount of output. In
  5199. // such a pathological inflating mechanism, there'd be no way to tell
  5200. // the system to stop doing the transform. A single 4MB write could
  5201. // cause the system to run out of memory.
  5202. //
  5203. // However, even in such a pathological case, only a single written chunk
  5204. // would be consumed, and then the rest would wait (un-transformed) until
  5205. // the results of the previous transformed chunk were consumed.
  5206. module.exports = Transform;
  5207. var Duplex = __webpack_require__(/*! ./_stream_duplex */ "./node_modules/readable-stream/lib/_stream_duplex.js");
  5208. /*<replacement>*/
  5209. var util = __webpack_require__(/*! core-util-is */ "./node_modules/core-util-is/lib/util.js");
  5210. util.inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
  5211. /*</replacement>*/
  5212. util.inherits(Transform, Duplex);
  5213. function afterTransform(er, data) {
  5214. var ts = this._transformState;
  5215. ts.transforming = false;
  5216. var cb = ts.writecb;
  5217. if (!cb) {
  5218. return this.emit('error', new Error('write callback called multiple times'));
  5219. }
  5220. ts.writechunk = null;
  5221. ts.writecb = null;
  5222. if (data != null)
  5223. // single equals check for both `null` and `undefined`
  5224. this.push(data);
  5225. cb(er);
  5226. var rs = this._readableState;
  5227. rs.reading = false;
  5228. if (rs.needReadable || rs.length < rs.highWaterMark) {
  5229. this._read(rs.highWaterMark);
  5230. }
  5231. }
  5232. function Transform(options) {
  5233. if (!(this instanceof Transform)) return new Transform(options);
  5234. Duplex.call(this, options);
  5235. this._transformState = {
  5236. afterTransform: afterTransform.bind(this),
  5237. needTransform: false,
  5238. transforming: false,
  5239. writecb: null,
  5240. writechunk: null,
  5241. writeencoding: null
  5242. };
  5243. // start out asking for a readable event once data is transformed.
  5244. this._readableState.needReadable = true;
  5245. // we have implemented the _read method, and done the other things
  5246. // that Readable wants before the first _read call, so unset the
  5247. // sync guard flag.
  5248. this._readableState.sync = false;
  5249. if (options) {
  5250. if (typeof options.transform === 'function') this._transform = options.transform;
  5251. if (typeof options.flush === 'function') this._flush = options.flush;
  5252. }
  5253. // When the writable side finishes, then flush out anything remaining.
  5254. this.on('prefinish', prefinish);
  5255. }
  5256. function prefinish() {
  5257. var _this = this;
  5258. if (typeof this._flush === 'function') {
  5259. this._flush(function (er, data) {
  5260. done(_this, er, data);
  5261. });
  5262. } else {
  5263. done(this, null, null);
  5264. }
  5265. }
  5266. Transform.prototype.push = function (chunk, encoding) {
  5267. this._transformState.needTransform = false;
  5268. return Duplex.prototype.push.call(this, chunk, encoding);
  5269. };
  5270. // This is the part where you do stuff!
  5271. // override this function in implementation classes.
  5272. // 'chunk' is an input chunk.
  5273. //
  5274. // Call `push(newChunk)` to pass along transformed output
  5275. // to the readable side. You may call 'push' zero or more times.
  5276. //
  5277. // Call `cb(err)` when you are done with this chunk. If you pass
  5278. // an error, then that'll put the hurt on the whole operation. If you
  5279. // never call cb(), then you'll never get another chunk.
  5280. Transform.prototype._transform = function (chunk, encoding, cb) {
  5281. throw new Error('_transform() is not implemented');
  5282. };
  5283. Transform.prototype._write = function (chunk, encoding, cb) {
  5284. var ts = this._transformState;
  5285. ts.writecb = cb;
  5286. ts.writechunk = chunk;
  5287. ts.writeencoding = encoding;
  5288. if (!ts.transforming) {
  5289. var rs = this._readableState;
  5290. if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
  5291. }
  5292. };
  5293. // Doesn't matter what the args are here.
  5294. // _transform does all the work.
  5295. // That we got here means that the readable side wants more data.
  5296. Transform.prototype._read = function (n) {
  5297. var ts = this._transformState;
  5298. if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
  5299. ts.transforming = true;
  5300. this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
  5301. } else {
  5302. // mark that we need a transform, so that any data that comes in
  5303. // will get processed, now that we've asked for it.
  5304. ts.needTransform = true;
  5305. }
  5306. };
  5307. Transform.prototype._destroy = function (err, cb) {
  5308. var _this2 = this;
  5309. Duplex.prototype._destroy.call(this, err, function (err2) {
  5310. cb(err2);
  5311. _this2.emit('close');
  5312. });
  5313. };
  5314. function done(stream, er, data) {
  5315. if (er) return stream.emit('error', er);
  5316. if (data != null)
  5317. // single equals check for both `null` and `undefined`
  5318. stream.push(data);
  5319. // if there's nothing in the write buffer, then that means
  5320. // that nothing more will ever be provided
  5321. if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');
  5322. if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');
  5323. return stream.push(null);
  5324. }
  5325. /***/ }),
  5326. /***/ "./node_modules/readable-stream/lib/_stream_writable.js":
  5327. /*!**************************************************************!*\
  5328. !*** ./node_modules/readable-stream/lib/_stream_writable.js ***!
  5329. \**************************************************************/
  5330. /*! no static exports found */
  5331. /***/ (function(module, exports, __webpack_require__) {
  5332. "use strict";
  5333. /* WEBPACK VAR INJECTION */(function(process, setImmediate, global) {// Copyright Joyent, Inc. and other Node contributors.
  5334. //
  5335. // Permission is hereby granted, free of charge, to any person obtaining a
  5336. // copy of this software and associated documentation files (the
  5337. // "Software"), to deal in the Software without restriction, including
  5338. // without limitation the rights to use, copy, modify, merge, publish,
  5339. // distribute, sublicense, and/or sell copies of the Software, and to permit
  5340. // persons to whom the Software is furnished to do so, subject to the
  5341. // following conditions:
  5342. //
  5343. // The above copyright notice and this permission notice shall be included
  5344. // in all copies or substantial portions of the Software.
  5345. //
  5346. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  5347. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  5348. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  5349. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  5350. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  5351. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  5352. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  5353. // A bit simpler than readable streams.
  5354. // Implement an async ._write(chunk, encoding, cb), and it'll handle all
  5355. // the drain event emission and buffering.
  5356. /*<replacement>*/
  5357. var pna = __webpack_require__(/*! process-nextick-args */ "./node_modules/process-nextick-args/index.js");
  5358. /*</replacement>*/
  5359. module.exports = Writable;
  5360. /* <replacement> */
  5361. function WriteReq(chunk, encoding, cb) {
  5362. this.chunk = chunk;
  5363. this.encoding = encoding;
  5364. this.callback = cb;
  5365. this.next = null;
  5366. }
  5367. // It seems a linked list but it is not
  5368. // there will be only 2 of these for each stream
  5369. function CorkedRequest(state) {
  5370. var _this = this;
  5371. this.next = null;
  5372. this.entry = null;
  5373. this.finish = function () {
  5374. onCorkedFinish(_this, state);
  5375. };
  5376. }
  5377. /* </replacement> */
  5378. /*<replacement>*/
  5379. var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
  5380. /*</replacement>*/
  5381. /*<replacement>*/
  5382. var Duplex;
  5383. /*</replacement>*/
  5384. Writable.WritableState = WritableState;
  5385. /*<replacement>*/
  5386. var util = __webpack_require__(/*! core-util-is */ "./node_modules/core-util-is/lib/util.js");
  5387. util.inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
  5388. /*</replacement>*/
  5389. /*<replacement>*/
  5390. var internalUtil = {
  5391. deprecate: __webpack_require__(/*! util-deprecate */ "./node_modules/util-deprecate/browser.js")
  5392. };
  5393. /*</replacement>*/
  5394. /*<replacement>*/
  5395. var Stream = __webpack_require__(/*! ./internal/streams/stream */ "./node_modules/readable-stream/lib/internal/streams/stream-browser.js");
  5396. /*</replacement>*/
  5397. /*<replacement>*/
  5398. var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer;
  5399. var OurUint8Array = global.Uint8Array || function () {};
  5400. function _uint8ArrayToBuffer(chunk) {
  5401. return Buffer.from(chunk);
  5402. }
  5403. function _isUint8Array(obj) {
  5404. return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
  5405. }
  5406. /*</replacement>*/
  5407. var destroyImpl = __webpack_require__(/*! ./internal/streams/destroy */ "./node_modules/readable-stream/lib/internal/streams/destroy.js");
  5408. util.inherits(Writable, Stream);
  5409. function nop() {}
  5410. function WritableState(options, stream) {
  5411. Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ "./node_modules/readable-stream/lib/_stream_duplex.js");
  5412. options = options || {};
  5413. // Duplex streams are both readable and writable, but share
  5414. // the same options object.
  5415. // However, some cases require setting options to different
  5416. // values for the readable and the writable sides of the duplex stream.
  5417. // These options can be provided separately as readableXXX and writableXXX.
  5418. var isDuplex = stream instanceof Duplex;
  5419. // object stream flag to indicate whether or not this stream
  5420. // contains buffers or objects.
  5421. this.objectMode = !!options.objectMode;
  5422. if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
  5423. // the point at which write() starts returning false
  5424. // Note: 0 is a valid value, means that we always return false if
  5425. // the entire buffer is not flushed immediately on write()
  5426. var hwm = options.highWaterMark;
  5427. var writableHwm = options.writableHighWaterMark;
  5428. var defaultHwm = this.objectMode ? 16 : 16 * 1024;
  5429. if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;
  5430. // cast to ints.
  5431. this.highWaterMark = Math.floor(this.highWaterMark);
  5432. // if _final has been called
  5433. this.finalCalled = false;
  5434. // drain event flag.
  5435. this.needDrain = false;
  5436. // at the start of calling end()
  5437. this.ending = false;
  5438. // when end() has been called, and returned
  5439. this.ended = false;
  5440. // when 'finish' is emitted
  5441. this.finished = false;
  5442. // has it been destroyed
  5443. this.destroyed = false;
  5444. // should we decode strings into buffers before passing to _write?
  5445. // this is here so that some node-core streams can optimize string
  5446. // handling at a lower level.
  5447. var noDecode = options.decodeStrings === false;
  5448. this.decodeStrings = !noDecode;
  5449. // Crypto is kind of old and crusty. Historically, its default string
  5450. // encoding is 'binary' so we have to make this configurable.
  5451. // Everything else in the universe uses 'utf8', though.
  5452. this.defaultEncoding = options.defaultEncoding || 'utf8';
  5453. // not an actual buffer we keep track of, but a measurement
  5454. // of how much we're waiting to get pushed to some underlying
  5455. // socket or file.
  5456. this.length = 0;
  5457. // a flag to see when we're in the middle of a write.
  5458. this.writing = false;
  5459. // when true all writes will be buffered until .uncork() call
  5460. this.corked = 0;
  5461. // a flag to be able to tell if the onwrite cb is called immediately,
  5462. // or on a later tick. We set this to true at first, because any
  5463. // actions that shouldn't happen until "later" should generally also
  5464. // not happen before the first write call.
  5465. this.sync = true;
  5466. // a flag to know if we're processing previously buffered items, which
  5467. // may call the _write() callback in the same tick, so that we don't
  5468. // end up in an overlapped onwrite situation.
  5469. this.bufferProcessing = false;
  5470. // the callback that's passed to _write(chunk,cb)
  5471. this.onwrite = function (er) {
  5472. onwrite(stream, er);
  5473. };
  5474. // the callback that the user supplies to write(chunk,encoding,cb)
  5475. this.writecb = null;
  5476. // the amount that is being written when _write is called.
  5477. this.writelen = 0;
  5478. this.bufferedRequest = null;
  5479. this.lastBufferedRequest = null;
  5480. // number of pending user-supplied write callbacks
  5481. // this must be 0 before 'finish' can be emitted
  5482. this.pendingcb = 0;
  5483. // emit prefinish if the only thing we're waiting for is _write cbs
  5484. // This is relevant for synchronous Transform streams
  5485. this.prefinished = false;
  5486. // True if the error was already emitted and should not be thrown again
  5487. this.errorEmitted = false;
  5488. // count buffered requests
  5489. this.bufferedRequestCount = 0;
  5490. // allocate the first CorkedRequest, there is always
  5491. // one allocated and free to use, and we maintain at most two
  5492. this.corkedRequestsFree = new CorkedRequest(this);
  5493. }
  5494. WritableState.prototype.getBuffer = function getBuffer() {
  5495. var current = this.bufferedRequest;
  5496. var out = [];
  5497. while (current) {
  5498. out.push(current);
  5499. current = current.next;
  5500. }
  5501. return out;
  5502. };
  5503. (function () {
  5504. try {
  5505. Object.defineProperty(WritableState.prototype, 'buffer', {
  5506. get: internalUtil.deprecate(function () {
  5507. return this.getBuffer();
  5508. }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
  5509. });
  5510. } catch (_) {}
  5511. })();
  5512. // Test _writableState for inheritance to account for Duplex streams,
  5513. // whose prototype chain only points to Readable.
  5514. var realHasInstance;
  5515. if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
  5516. realHasInstance = Function.prototype[Symbol.hasInstance];
  5517. Object.defineProperty(Writable, Symbol.hasInstance, {
  5518. value: function value(object) {
  5519. if (realHasInstance.call(this, object)) return true;
  5520. if (this !== Writable) return false;
  5521. return object && object._writableState instanceof WritableState;
  5522. }
  5523. });
  5524. } else {
  5525. realHasInstance = function realHasInstance(object) {
  5526. return object instanceof this;
  5527. };
  5528. }
  5529. function Writable(options) {
  5530. Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ "./node_modules/readable-stream/lib/_stream_duplex.js");
  5531. // Writable ctor is applied to Duplexes, too.
  5532. // `realHasInstance` is necessary because using plain `instanceof`
  5533. // would return false, as no `_writableState` property is attached.
  5534. // Trying to use the custom `instanceof` for Writable here will also break the
  5535. // Node.js LazyTransform implementation, which has a non-trivial getter for
  5536. // `_writableState` that would lead to infinite recursion.
  5537. if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {
  5538. return new Writable(options);
  5539. }
  5540. this._writableState = new WritableState(options, this);
  5541. // legacy.
  5542. this.writable = true;
  5543. if (options) {
  5544. if (typeof options.write === 'function') this._write = options.write;
  5545. if (typeof options.writev === 'function') this._writev = options.writev;
  5546. if (typeof options.destroy === 'function') this._destroy = options.destroy;
  5547. if (typeof options["final"] === 'function') this._final = options["final"];
  5548. }
  5549. Stream.call(this);
  5550. }
  5551. // Otherwise people can pipe Writable streams, which is just wrong.
  5552. Writable.prototype.pipe = function () {
  5553. this.emit('error', new Error('Cannot pipe, not readable'));
  5554. };
  5555. function writeAfterEnd(stream, cb) {
  5556. var er = new Error('write after end');
  5557. // TODO: defer error events consistently everywhere, not just the cb
  5558. stream.emit('error', er);
  5559. pna.nextTick(cb, er);
  5560. }
  5561. // Checks that a user-supplied chunk is valid, especially for the particular
  5562. // mode the stream is in. Currently this means that `null` is never accepted
  5563. // and undefined/non-string values are only allowed in object mode.
  5564. function validChunk(stream, state, chunk, cb) {
  5565. var valid = true;
  5566. var er = false;
  5567. if (chunk === null) {
  5568. er = new TypeError('May not write null values to stream');
  5569. } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
  5570. er = new TypeError('Invalid non-string/buffer chunk');
  5571. }
  5572. if (er) {
  5573. stream.emit('error', er);
  5574. pna.nextTick(cb, er);
  5575. valid = false;
  5576. }
  5577. return valid;
  5578. }
  5579. Writable.prototype.write = function (chunk, encoding, cb) {
  5580. var state = this._writableState;
  5581. var ret = false;
  5582. var isBuf = !state.objectMode && _isUint8Array(chunk);
  5583. if (isBuf && !Buffer.isBuffer(chunk)) {
  5584. chunk = _uint8ArrayToBuffer(chunk);
  5585. }
  5586. if (typeof encoding === 'function') {
  5587. cb = encoding;
  5588. encoding = null;
  5589. }
  5590. if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
  5591. if (typeof cb !== 'function') cb = nop;
  5592. if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
  5593. state.pendingcb++;
  5594. ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
  5595. }
  5596. return ret;
  5597. };
  5598. Writable.prototype.cork = function () {
  5599. var state = this._writableState;
  5600. state.corked++;
  5601. };
  5602. Writable.prototype.uncork = function () {
  5603. var state = this._writableState;
  5604. if (state.corked) {
  5605. state.corked--;
  5606. if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
  5607. }
  5608. };
  5609. Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
  5610. // node::ParseEncoding() requires lower case.
  5611. if (typeof encoding === 'string') encoding = encoding.toLowerCase();
  5612. if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
  5613. this._writableState.defaultEncoding = encoding;
  5614. return this;
  5615. };
  5616. function decodeChunk(state, chunk, encoding) {
  5617. if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
  5618. chunk = Buffer.from(chunk, encoding);
  5619. }
  5620. return chunk;
  5621. }
  5622. Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
  5623. // making it explicit this property is not enumerable
  5624. // because otherwise some prototype manipulation in
  5625. // userland will fail
  5626. enumerable: false,
  5627. get: function get() {
  5628. return this._writableState.highWaterMark;
  5629. }
  5630. });
  5631. // if we're already writing something, then just put this
  5632. // in the queue, and wait our turn. Otherwise, call _write
  5633. // If we return false, then we need a drain event, so set that flag.
  5634. function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
  5635. if (!isBuf) {
  5636. var newChunk = decodeChunk(state, chunk, encoding);
  5637. if (chunk !== newChunk) {
  5638. isBuf = true;
  5639. encoding = 'buffer';
  5640. chunk = newChunk;
  5641. }
  5642. }
  5643. var len = state.objectMode ? 1 : chunk.length;
  5644. state.length += len;
  5645. var ret = state.length < state.highWaterMark;
  5646. // we must ensure that previous needDrain will not be reset to false.
  5647. if (!ret) state.needDrain = true;
  5648. if (state.writing || state.corked) {
  5649. var last = state.lastBufferedRequest;
  5650. state.lastBufferedRequest = {
  5651. chunk: chunk,
  5652. encoding: encoding,
  5653. isBuf: isBuf,
  5654. callback: cb,
  5655. next: null
  5656. };
  5657. if (last) {
  5658. last.next = state.lastBufferedRequest;
  5659. } else {
  5660. state.bufferedRequest = state.lastBufferedRequest;
  5661. }
  5662. state.bufferedRequestCount += 1;
  5663. } else {
  5664. doWrite(stream, state, false, len, chunk, encoding, cb);
  5665. }
  5666. return ret;
  5667. }
  5668. function doWrite(stream, state, writev, len, chunk, encoding, cb) {
  5669. state.writelen = len;
  5670. state.writecb = cb;
  5671. state.writing = true;
  5672. state.sync = true;
  5673. if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
  5674. state.sync = false;
  5675. }
  5676. function onwriteError(stream, state, sync, er, cb) {
  5677. --state.pendingcb;
  5678. if (sync) {
  5679. // defer the callback if we are being called synchronously
  5680. // to avoid piling up things on the stack
  5681. pna.nextTick(cb, er);
  5682. // this can emit finish, and it will always happen
  5683. // after error
  5684. pna.nextTick(finishMaybe, stream, state);
  5685. stream._writableState.errorEmitted = true;
  5686. stream.emit('error', er);
  5687. } else {
  5688. // the caller expect this to happen before if
  5689. // it is async
  5690. cb(er);
  5691. stream._writableState.errorEmitted = true;
  5692. stream.emit('error', er);
  5693. // this can emit finish, but finish must
  5694. // always follow error
  5695. finishMaybe(stream, state);
  5696. }
  5697. }
  5698. function onwriteStateUpdate(state) {
  5699. state.writing = false;
  5700. state.writecb = null;
  5701. state.length -= state.writelen;
  5702. state.writelen = 0;
  5703. }
  5704. function onwrite(stream, er) {
  5705. var state = stream._writableState;
  5706. var sync = state.sync;
  5707. var cb = state.writecb;
  5708. onwriteStateUpdate(state);
  5709. if (er) onwriteError(stream, state, sync, er, cb);else {
  5710. // Check if we're actually ready to finish, but don't emit yet
  5711. var finished = needFinish(state);
  5712. if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
  5713. clearBuffer(stream, state);
  5714. }
  5715. if (sync) {
  5716. /*<replacement>*/
  5717. asyncWrite(afterWrite, stream, state, finished, cb);
  5718. /*</replacement>*/
  5719. } else {
  5720. afterWrite(stream, state, finished, cb);
  5721. }
  5722. }
  5723. }
  5724. function afterWrite(stream, state, finished, cb) {
  5725. if (!finished) onwriteDrain(stream, state);
  5726. state.pendingcb--;
  5727. cb();
  5728. finishMaybe(stream, state);
  5729. }
  5730. // Must force callback to be called on nextTick, so that we don't
  5731. // emit 'drain' before the write() consumer gets the 'false' return
  5732. // value, and has a chance to attach a 'drain' listener.
  5733. function onwriteDrain(stream, state) {
  5734. if (state.length === 0 && state.needDrain) {
  5735. state.needDrain = false;
  5736. stream.emit('drain');
  5737. }
  5738. }
  5739. // if there's something in the buffer waiting, then process it
  5740. function clearBuffer(stream, state) {
  5741. state.bufferProcessing = true;
  5742. var entry = state.bufferedRequest;
  5743. if (stream._writev && entry && entry.next) {
  5744. // Fast case, write everything using _writev()
  5745. var l = state.bufferedRequestCount;
  5746. var buffer = new Array(l);
  5747. var holder = state.corkedRequestsFree;
  5748. holder.entry = entry;
  5749. var count = 0;
  5750. var allBuffers = true;
  5751. while (entry) {
  5752. buffer[count] = entry;
  5753. if (!entry.isBuf) allBuffers = false;
  5754. entry = entry.next;
  5755. count += 1;
  5756. }
  5757. buffer.allBuffers = allBuffers;
  5758. doWrite(stream, state, true, state.length, buffer, '', holder.finish);
  5759. // doWrite is almost always async, defer these to save a bit of time
  5760. // as the hot path ends with doWrite
  5761. state.pendingcb++;
  5762. state.lastBufferedRequest = null;
  5763. if (holder.next) {
  5764. state.corkedRequestsFree = holder.next;
  5765. holder.next = null;
  5766. } else {
  5767. state.corkedRequestsFree = new CorkedRequest(state);
  5768. }
  5769. state.bufferedRequestCount = 0;
  5770. } else {
  5771. // Slow case, write chunks one-by-one
  5772. while (entry) {
  5773. var chunk = entry.chunk;
  5774. var encoding = entry.encoding;
  5775. var cb = entry.callback;
  5776. var len = state.objectMode ? 1 : chunk.length;
  5777. doWrite(stream, state, false, len, chunk, encoding, cb);
  5778. entry = entry.next;
  5779. state.bufferedRequestCount--;
  5780. // if we didn't call the onwrite immediately, then
  5781. // it means that we need to wait until it does.
  5782. // also, that means that the chunk and cb are currently
  5783. // being processed, so move the buffer counter past them.
  5784. if (state.writing) {
  5785. break;
  5786. }
  5787. }
  5788. if (entry === null) state.lastBufferedRequest = null;
  5789. }
  5790. state.bufferedRequest = entry;
  5791. state.bufferProcessing = false;
  5792. }
  5793. Writable.prototype._write = function (chunk, encoding, cb) {
  5794. cb(new Error('_write() is not implemented'));
  5795. };
  5796. Writable.prototype._writev = null;
  5797. Writable.prototype.end = function (chunk, encoding, cb) {
  5798. var state = this._writableState;
  5799. if (typeof chunk === 'function') {
  5800. cb = chunk;
  5801. chunk = null;
  5802. encoding = null;
  5803. } else if (typeof encoding === 'function') {
  5804. cb = encoding;
  5805. encoding = null;
  5806. }
  5807. if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);
  5808. // .end() fully uncorks
  5809. if (state.corked) {
  5810. state.corked = 1;
  5811. this.uncork();
  5812. }
  5813. // ignore unnecessary end() calls.
  5814. if (!state.ending && !state.finished) endWritable(this, state, cb);
  5815. };
  5816. function needFinish(state) {
  5817. return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
  5818. }
  5819. function callFinal(stream, state) {
  5820. stream._final(function (err) {
  5821. state.pendingcb--;
  5822. if (err) {
  5823. stream.emit('error', err);
  5824. }
  5825. state.prefinished = true;
  5826. stream.emit('prefinish');
  5827. finishMaybe(stream, state);
  5828. });
  5829. }
  5830. function prefinish(stream, state) {
  5831. if (!state.prefinished && !state.finalCalled) {
  5832. if (typeof stream._final === 'function') {
  5833. state.pendingcb++;
  5834. state.finalCalled = true;
  5835. pna.nextTick(callFinal, stream, state);
  5836. } else {
  5837. state.prefinished = true;
  5838. stream.emit('prefinish');
  5839. }
  5840. }
  5841. }
  5842. function finishMaybe(stream, state) {
  5843. var need = needFinish(state);
  5844. if (need) {
  5845. prefinish(stream, state);
  5846. if (state.pendingcb === 0) {
  5847. state.finished = true;
  5848. stream.emit('finish');
  5849. }
  5850. }
  5851. return need;
  5852. }
  5853. function endWritable(stream, state, cb) {
  5854. state.ending = true;
  5855. finishMaybe(stream, state);
  5856. if (cb) {
  5857. if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);
  5858. }
  5859. state.ended = true;
  5860. stream.writable = false;
  5861. }
  5862. function onCorkedFinish(corkReq, state, err) {
  5863. var entry = corkReq.entry;
  5864. corkReq.entry = null;
  5865. while (entry) {
  5866. var cb = entry.callback;
  5867. state.pendingcb--;
  5868. cb(err);
  5869. entry = entry.next;
  5870. }
  5871. if (state.corkedRequestsFree) {
  5872. state.corkedRequestsFree.next = corkReq;
  5873. } else {
  5874. state.corkedRequestsFree = corkReq;
  5875. }
  5876. }
  5877. Object.defineProperty(Writable.prototype, 'destroyed', {
  5878. get: function get() {
  5879. if (this._writableState === undefined) {
  5880. return false;
  5881. }
  5882. return this._writableState.destroyed;
  5883. },
  5884. set: function set(value) {
  5885. // we ignore the value if the stream
  5886. // has not been initialized yet
  5887. if (!this._writableState) {
  5888. return;
  5889. }
  5890. // backward compatibility, the user is explicitly
  5891. // managing destroyed
  5892. this._writableState.destroyed = value;
  5893. }
  5894. });
  5895. Writable.prototype.destroy = destroyImpl.destroy;
  5896. Writable.prototype._undestroy = destroyImpl.undestroy;
  5897. Writable.prototype._destroy = function (err, cb) {
  5898. this.end();
  5899. cb(err);
  5900. };
  5901. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../timers-browserify/main.js */ "./node_modules/timers-browserify/main.js").setImmediate, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  5902. /***/ }),
  5903. /***/ "./node_modules/readable-stream/lib/internal/streams/BufferList.js":
  5904. /*!*************************************************************************!*\
  5905. !*** ./node_modules/readable-stream/lib/internal/streams/BufferList.js ***!
  5906. \*************************************************************************/
  5907. /*! no static exports found */
  5908. /***/ (function(module, exports, __webpack_require__) {
  5909. "use strict";
  5910. function _classCallCheck(instance, Constructor) {
  5911. if (!(instance instanceof Constructor)) {
  5912. throw new TypeError("Cannot call a class as a function");
  5913. }
  5914. }
  5915. var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer;
  5916. var util = __webpack_require__(/*! util */ 1);
  5917. function copyBuffer(src, target, offset) {
  5918. src.copy(target, offset);
  5919. }
  5920. module.exports = function () {
  5921. function BufferList() {
  5922. _classCallCheck(this, BufferList);
  5923. this.head = null;
  5924. this.tail = null;
  5925. this.length = 0;
  5926. }
  5927. BufferList.prototype.push = function push(v) {
  5928. var entry = {
  5929. data: v,
  5930. next: null
  5931. };
  5932. if (this.length > 0) this.tail.next = entry;else this.head = entry;
  5933. this.tail = entry;
  5934. ++this.length;
  5935. };
  5936. BufferList.prototype.unshift = function unshift(v) {
  5937. var entry = {
  5938. data: v,
  5939. next: this.head
  5940. };
  5941. if (this.length === 0) this.tail = entry;
  5942. this.head = entry;
  5943. ++this.length;
  5944. };
  5945. BufferList.prototype.shift = function shift() {
  5946. if (this.length === 0) return;
  5947. var ret = this.head.data;
  5948. if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
  5949. --this.length;
  5950. return ret;
  5951. };
  5952. BufferList.prototype.clear = function clear() {
  5953. this.head = this.tail = null;
  5954. this.length = 0;
  5955. };
  5956. BufferList.prototype.join = function join(s) {
  5957. if (this.length === 0) return '';
  5958. var p = this.head;
  5959. var ret = '' + p.data;
  5960. while (p = p.next) {
  5961. ret += s + p.data;
  5962. }
  5963. return ret;
  5964. };
  5965. BufferList.prototype.concat = function concat(n) {
  5966. if (this.length === 0) return Buffer.alloc(0);
  5967. if (this.length === 1) return this.head.data;
  5968. var ret = Buffer.allocUnsafe(n >>> 0);
  5969. var p = this.head;
  5970. var i = 0;
  5971. while (p) {
  5972. copyBuffer(p.data, ret, i);
  5973. i += p.data.length;
  5974. p = p.next;
  5975. }
  5976. return ret;
  5977. };
  5978. return BufferList;
  5979. }();
  5980. if (util && util.inspect && util.inspect.custom) {
  5981. module.exports.prototype[util.inspect.custom] = function () {
  5982. var obj = util.inspect({
  5983. length: this.length
  5984. });
  5985. return this.constructor.name + ' ' + obj;
  5986. };
  5987. }
  5988. /***/ }),
  5989. /***/ "./node_modules/readable-stream/lib/internal/streams/destroy.js":
  5990. /*!**********************************************************************!*\
  5991. !*** ./node_modules/readable-stream/lib/internal/streams/destroy.js ***!
  5992. \**********************************************************************/
  5993. /*! no static exports found */
  5994. /***/ (function(module, exports, __webpack_require__) {
  5995. "use strict";
  5996. /*<replacement>*/
  5997. var pna = __webpack_require__(/*! process-nextick-args */ "./node_modules/process-nextick-args/index.js");
  5998. /*</replacement>*/
  5999. // undocumented cb() API, needed for core, not for public API
  6000. function destroy(err, cb) {
  6001. var _this = this;
  6002. var readableDestroyed = this._readableState && this._readableState.destroyed;
  6003. var writableDestroyed = this._writableState && this._writableState.destroyed;
  6004. if (readableDestroyed || writableDestroyed) {
  6005. if (cb) {
  6006. cb(err);
  6007. } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
  6008. pna.nextTick(emitErrorNT, this, err);
  6009. }
  6010. return this;
  6011. }
  6012. // we set destroyed to true before firing error callbacks in order
  6013. // to make it re-entrance safe in case destroy() is called within callbacks
  6014. if (this._readableState) {
  6015. this._readableState.destroyed = true;
  6016. }
  6017. // if this is a duplex stream mark the writable part as destroyed as well
  6018. if (this._writableState) {
  6019. this._writableState.destroyed = true;
  6020. }
  6021. this._destroy(err || null, function (err) {
  6022. if (!cb && err) {
  6023. pna.nextTick(emitErrorNT, _this, err);
  6024. if (_this._writableState) {
  6025. _this._writableState.errorEmitted = true;
  6026. }
  6027. } else if (cb) {
  6028. cb(err);
  6029. }
  6030. });
  6031. return this;
  6032. }
  6033. function undestroy() {
  6034. if (this._readableState) {
  6035. this._readableState.destroyed = false;
  6036. this._readableState.reading = false;
  6037. this._readableState.ended = false;
  6038. this._readableState.endEmitted = false;
  6039. }
  6040. if (this._writableState) {
  6041. this._writableState.destroyed = false;
  6042. this._writableState.ended = false;
  6043. this._writableState.ending = false;
  6044. this._writableState.finished = false;
  6045. this._writableState.errorEmitted = false;
  6046. }
  6047. }
  6048. function emitErrorNT(self, err) {
  6049. self.emit('error', err);
  6050. }
  6051. module.exports = {
  6052. destroy: destroy,
  6053. undestroy: undestroy
  6054. };
  6055. /***/ }),
  6056. /***/ "./node_modules/readable-stream/lib/internal/streams/stream-browser.js":
  6057. /*!*****************************************************************************!*\
  6058. !*** ./node_modules/readable-stream/lib/internal/streams/stream-browser.js ***!
  6059. \*****************************************************************************/
  6060. /*! no static exports found */
  6061. /***/ (function(module, exports, __webpack_require__) {
  6062. module.exports = __webpack_require__(/*! events */ "./node_modules/events/events.js").EventEmitter;
  6063. /***/ }),
  6064. /***/ "./node_modules/readable-stream/passthrough.js":
  6065. /*!*****************************************************!*\
  6066. !*** ./node_modules/readable-stream/passthrough.js ***!
  6067. \*****************************************************/
  6068. /*! no static exports found */
  6069. /***/ (function(module, exports, __webpack_require__) {
  6070. module.exports = __webpack_require__(/*! ./readable */ "./node_modules/readable-stream/readable-browser.js").PassThrough;
  6071. /***/ }),
  6072. /***/ "./node_modules/readable-stream/readable-browser.js":
  6073. /*!**********************************************************!*\
  6074. !*** ./node_modules/readable-stream/readable-browser.js ***!
  6075. \**********************************************************/
  6076. /*! no static exports found */
  6077. /***/ (function(module, exports, __webpack_require__) {
  6078. exports = module.exports = __webpack_require__(/*! ./lib/_stream_readable.js */ "./node_modules/readable-stream/lib/_stream_readable.js");
  6079. exports.Stream = exports;
  6080. exports.Readable = exports;
  6081. exports.Writable = __webpack_require__(/*! ./lib/_stream_writable.js */ "./node_modules/readable-stream/lib/_stream_writable.js");
  6082. exports.Duplex = __webpack_require__(/*! ./lib/_stream_duplex.js */ "./node_modules/readable-stream/lib/_stream_duplex.js");
  6083. exports.Transform = __webpack_require__(/*! ./lib/_stream_transform.js */ "./node_modules/readable-stream/lib/_stream_transform.js");
  6084. exports.PassThrough = __webpack_require__(/*! ./lib/_stream_passthrough.js */ "./node_modules/readable-stream/lib/_stream_passthrough.js");
  6085. /***/ }),
  6086. /***/ "./node_modules/readable-stream/transform.js":
  6087. /*!***************************************************!*\
  6088. !*** ./node_modules/readable-stream/transform.js ***!
  6089. \***************************************************/
  6090. /*! no static exports found */
  6091. /***/ (function(module, exports, __webpack_require__) {
  6092. module.exports = __webpack_require__(/*! ./readable */ "./node_modules/readable-stream/readable-browser.js").Transform;
  6093. /***/ }),
  6094. /***/ "./node_modules/readable-stream/writable-browser.js":
  6095. /*!**********************************************************!*\
  6096. !*** ./node_modules/readable-stream/writable-browser.js ***!
  6097. \**********************************************************/
  6098. /*! no static exports found */
  6099. /***/ (function(module, exports, __webpack_require__) {
  6100. module.exports = __webpack_require__(/*! ./lib/_stream_writable.js */ "./node_modules/readable-stream/lib/_stream_writable.js");
  6101. /***/ }),
  6102. /***/ "./node_modules/safe-buffer/index.js":
  6103. /*!*******************************************!*\
  6104. !*** ./node_modules/safe-buffer/index.js ***!
  6105. \*******************************************/
  6106. /*! no static exports found */
  6107. /***/ (function(module, exports, __webpack_require__) {
  6108. /* eslint-disable node/no-deprecated-api */
  6109. var buffer = __webpack_require__(/*! buffer */ "./node_modules/buffer/index.js");
  6110. var Buffer = buffer.Buffer;
  6111. // alternative to using Object.keys for old browsers
  6112. function copyProps(src, dst) {
  6113. for (var key in src) {
  6114. dst[key] = src[key];
  6115. }
  6116. }
  6117. if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
  6118. module.exports = buffer;
  6119. } else {
  6120. // Copy properties from require('buffer')
  6121. copyProps(buffer, exports);
  6122. exports.Buffer = SafeBuffer;
  6123. }
  6124. function SafeBuffer(arg, encodingOrOffset, length) {
  6125. return Buffer(arg, encodingOrOffset, length);
  6126. }
  6127. // Copy static methods from Buffer
  6128. copyProps(Buffer, SafeBuffer);
  6129. SafeBuffer.from = function (arg, encodingOrOffset, length) {
  6130. if (typeof arg === 'number') {
  6131. throw new TypeError('Argument must not be a number');
  6132. }
  6133. return Buffer(arg, encodingOrOffset, length);
  6134. };
  6135. SafeBuffer.alloc = function (size, fill, encoding) {
  6136. if (typeof size !== 'number') {
  6137. throw new TypeError('Argument must be a number');
  6138. }
  6139. var buf = Buffer(size);
  6140. if (fill !== undefined) {
  6141. if (typeof encoding === 'string') {
  6142. buf.fill(fill, encoding);
  6143. } else {
  6144. buf.fill(fill);
  6145. }
  6146. } else {
  6147. buf.fill(0);
  6148. }
  6149. return buf;
  6150. };
  6151. SafeBuffer.allocUnsafe = function (size) {
  6152. if (typeof size !== 'number') {
  6153. throw new TypeError('Argument must be a number');
  6154. }
  6155. return Buffer(size);
  6156. };
  6157. SafeBuffer.allocUnsafeSlow = function (size) {
  6158. if (typeof size !== 'number') {
  6159. throw new TypeError('Argument must be a number');
  6160. }
  6161. return buffer.SlowBuffer(size);
  6162. };
  6163. /***/ }),
  6164. /***/ "./node_modules/sax/lib/sax.js":
  6165. /*!*************************************!*\
  6166. !*** ./node_modules/sax/lib/sax.js ***!
  6167. \*************************************/
  6168. /*! no static exports found */
  6169. /***/ (function(module, exports, __webpack_require__) {
  6170. /* WEBPACK VAR INJECTION */(function(Buffer) {function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
  6171. ;
  6172. (function (sax) {
  6173. // wrapper for non-node envs
  6174. sax.parser = function (strict, opt) {
  6175. return new SAXParser(strict, opt);
  6176. };
  6177. sax.SAXParser = SAXParser;
  6178. sax.SAXStream = SAXStream;
  6179. sax.createStream = createStream;
  6180. // When we pass the MAX_BUFFER_LENGTH position, start checking for buffer overruns.
  6181. // When we check, schedule the next check for MAX_BUFFER_LENGTH - (max(buffer lengths)),
  6182. // since that's the earliest that a buffer overrun could occur. This way, checks are
  6183. // as rare as required, but as often as necessary to ensure never crossing this bound.
  6184. // Furthermore, buffers are only tested at most once per write(), so passing a very
  6185. // large string into write() might have undesirable effects, but this is manageable by
  6186. // the caller, so it is assumed to be safe. Thus, a call to write() may, in the extreme
  6187. // edge case, result in creating at most one complete copy of the string passed in.
  6188. // Set to Infinity to have unlimited buffers.
  6189. sax.MAX_BUFFER_LENGTH = 64 * 1024;
  6190. var buffers = ['comment', 'sgmlDecl', 'textNode', 'tagName', 'doctype', 'procInstName', 'procInstBody', 'entity', 'attribName', 'attribValue', 'cdata', 'script'];
  6191. sax.EVENTS = ['text', 'processinginstruction', 'sgmldeclaration', 'doctype', 'comment', 'opentagstart', 'attribute', 'opentag', 'closetag', 'opencdata', 'cdata', 'closecdata', 'error', 'end', 'ready', 'script', 'opennamespace', 'closenamespace'];
  6192. function SAXParser(strict, opt) {
  6193. if (!(this instanceof SAXParser)) {
  6194. return new SAXParser(strict, opt);
  6195. }
  6196. var parser = this;
  6197. clearBuffers(parser);
  6198. parser.q = parser.c = '';
  6199. parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH;
  6200. parser.opt = opt || {};
  6201. parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags;
  6202. parser.looseCase = parser.opt.lowercase ? 'toLowerCase' : 'toUpperCase';
  6203. parser.tags = [];
  6204. parser.closed = parser.closedRoot = parser.sawRoot = false;
  6205. parser.tag = parser.error = null;
  6206. parser.strict = !!strict;
  6207. parser.noscript = !!(strict || parser.opt.noscript);
  6208. parser.state = S.BEGIN;
  6209. parser.strictEntities = parser.opt.strictEntities;
  6210. parser.ENTITIES = parser.strictEntities ? Object.create(sax.XML_ENTITIES) : Object.create(sax.ENTITIES);
  6211. parser.attribList = [];
  6212. // namespaces form a prototype chain.
  6213. // it always points at the current tag,
  6214. // which protos to its parent tag.
  6215. if (parser.opt.xmlns) {
  6216. parser.ns = Object.create(rootNS);
  6217. }
  6218. // mostly just for error reporting
  6219. parser.trackPosition = parser.opt.position !== false;
  6220. if (parser.trackPosition) {
  6221. parser.position = parser.line = parser.column = 0;
  6222. }
  6223. emit(parser, 'onready');
  6224. }
  6225. if (!Object.create) {
  6226. Object.create = function (o) {
  6227. function F() {}
  6228. F.prototype = o;
  6229. var newf = new F();
  6230. return newf;
  6231. };
  6232. }
  6233. if (!Object.keys) {
  6234. Object.keys = function (o) {
  6235. var a = [];
  6236. for (var i in o) if (o.hasOwnProperty(i)) a.push(i);
  6237. return a;
  6238. };
  6239. }
  6240. function checkBufferLength(parser) {
  6241. var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10);
  6242. var maxActual = 0;
  6243. for (var i = 0, l = buffers.length; i < l; i++) {
  6244. var len = parser[buffers[i]].length;
  6245. if (len > maxAllowed) {
  6246. // Text/cdata nodes can get big, and since they're buffered,
  6247. // we can get here under normal conditions.
  6248. // Avoid issues by emitting the text node now,
  6249. // so at least it won't get any bigger.
  6250. switch (buffers[i]) {
  6251. case 'textNode':
  6252. closeText(parser);
  6253. break;
  6254. case 'cdata':
  6255. emitNode(parser, 'oncdata', parser.cdata);
  6256. parser.cdata = '';
  6257. break;
  6258. case 'script':
  6259. emitNode(parser, 'onscript', parser.script);
  6260. parser.script = '';
  6261. break;
  6262. default:
  6263. error(parser, 'Max buffer length exceeded: ' + buffers[i]);
  6264. }
  6265. }
  6266. maxActual = Math.max(maxActual, len);
  6267. }
  6268. // schedule the next check for the earliest possible buffer overrun.
  6269. var m = sax.MAX_BUFFER_LENGTH - maxActual;
  6270. parser.bufferCheckPosition = m + parser.position;
  6271. }
  6272. function clearBuffers(parser) {
  6273. for (var i = 0, l = buffers.length; i < l; i++) {
  6274. parser[buffers[i]] = '';
  6275. }
  6276. }
  6277. function flushBuffers(parser) {
  6278. closeText(parser);
  6279. if (parser.cdata !== '') {
  6280. emitNode(parser, 'oncdata', parser.cdata);
  6281. parser.cdata = '';
  6282. }
  6283. if (parser.script !== '') {
  6284. emitNode(parser, 'onscript', parser.script);
  6285. parser.script = '';
  6286. }
  6287. }
  6288. SAXParser.prototype = {
  6289. end: function end() {
  6290. _end(this);
  6291. },
  6292. write: write,
  6293. resume: function resume() {
  6294. this.error = null;
  6295. return this;
  6296. },
  6297. close: function close() {
  6298. return this.write(null);
  6299. },
  6300. flush: function flush() {
  6301. flushBuffers(this);
  6302. }
  6303. };
  6304. var Stream;
  6305. try {
  6306. Stream = __webpack_require__(/*! stream */ "./node_modules/stream-browserify/index.js").Stream;
  6307. } catch (ex) {
  6308. Stream = function Stream() {};
  6309. }
  6310. var streamWraps = sax.EVENTS.filter(function (ev) {
  6311. return ev !== 'error' && ev !== 'end';
  6312. });
  6313. function createStream(strict, opt) {
  6314. return new SAXStream(strict, opt);
  6315. }
  6316. function SAXStream(strict, opt) {
  6317. if (!(this instanceof SAXStream)) {
  6318. return new SAXStream(strict, opt);
  6319. }
  6320. Stream.apply(this);
  6321. this._parser = new SAXParser(strict, opt);
  6322. this.writable = true;
  6323. this.readable = true;
  6324. var me = this;
  6325. this._parser.onend = function () {
  6326. me.emit('end');
  6327. };
  6328. this._parser.onerror = function (er) {
  6329. me.emit('error', er);
  6330. // if didn't throw, then means error was handled.
  6331. // go ahead and clear error, so we can write again.
  6332. me._parser.error = null;
  6333. };
  6334. this._decoder = null;
  6335. streamWraps.forEach(function (ev) {
  6336. Object.defineProperty(me, 'on' + ev, {
  6337. get: function get() {
  6338. return me._parser['on' + ev];
  6339. },
  6340. set: function set(h) {
  6341. if (!h) {
  6342. me.removeAllListeners(ev);
  6343. me._parser['on' + ev] = h;
  6344. return h;
  6345. }
  6346. me.on(ev, h);
  6347. },
  6348. enumerable: true,
  6349. configurable: false
  6350. });
  6351. });
  6352. }
  6353. SAXStream.prototype = Object.create(Stream.prototype, {
  6354. constructor: {
  6355. value: SAXStream
  6356. }
  6357. });
  6358. SAXStream.prototype.write = function (data) {
  6359. if (typeof Buffer === 'function' && typeof Buffer.isBuffer === 'function' && Buffer.isBuffer(data)) {
  6360. if (!this._decoder) {
  6361. var SD = __webpack_require__(/*! string_decoder */ "./node_modules/string_decoder/lib/string_decoder.js").StringDecoder;
  6362. this._decoder = new SD('utf8');
  6363. }
  6364. data = this._decoder.write(data);
  6365. }
  6366. this._parser.write(data.toString());
  6367. this.emit('data', data);
  6368. return true;
  6369. };
  6370. SAXStream.prototype.end = function (chunk) {
  6371. if (chunk && chunk.length) {
  6372. this.write(chunk);
  6373. }
  6374. this._parser.end();
  6375. return true;
  6376. };
  6377. SAXStream.prototype.on = function (ev, handler) {
  6378. var me = this;
  6379. if (!me._parser['on' + ev] && streamWraps.indexOf(ev) !== -1) {
  6380. me._parser['on' + ev] = function () {
  6381. var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments);
  6382. args.splice(0, 0, ev);
  6383. me.emit.apply(me, args);
  6384. };
  6385. }
  6386. return Stream.prototype.on.call(me, ev, handler);
  6387. };
  6388. // this really needs to be replaced with character classes.
  6389. // XML allows all manner of ridiculous numbers and digits.
  6390. var CDATA = '[CDATA[';
  6391. var DOCTYPE = 'DOCTYPE';
  6392. var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace';
  6393. var XMLNS_NAMESPACE = 'http://www.w3.org/2000/xmlns/';
  6394. var rootNS = {
  6395. xml: XML_NAMESPACE,
  6396. xmlns: XMLNS_NAMESPACE
  6397. };
  6398. // http://www.w3.org/TR/REC-xml/#NT-NameStartChar
  6399. // This implementation works on strings, a single character at a time
  6400. // as such, it cannot ever support astral-plane characters (10000-EFFFF)
  6401. // without a significant breaking change to either this parser, or the
  6402. // JavaScript language. Implementation of an emoji-capable xml parser
  6403. // is left as an exercise for the reader.
  6404. var nameStart = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;
  6405. var nameBody = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;
  6406. var entityStart = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;
  6407. var entityBody = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;
  6408. function isWhitespace(c) {
  6409. return c === ' ' || c === '\n' || c === '\r' || c === '\t';
  6410. }
  6411. function isQuote(c) {
  6412. return c === '"' || c === '\'';
  6413. }
  6414. function isAttribEnd(c) {
  6415. return c === '>' || isWhitespace(c);
  6416. }
  6417. function isMatch(regex, c) {
  6418. return regex.test(c);
  6419. }
  6420. function notMatch(regex, c) {
  6421. return !isMatch(regex, c);
  6422. }
  6423. var S = 0;
  6424. sax.STATE = {
  6425. BEGIN: S++,
  6426. // leading byte order mark or whitespace
  6427. BEGIN_WHITESPACE: S++,
  6428. // leading whitespace
  6429. TEXT: S++,
  6430. // general stuff
  6431. TEXT_ENTITY: S++,
  6432. // &amp and such.
  6433. OPEN_WAKA: S++,
  6434. // <
  6435. SGML_DECL: S++,
  6436. // <!BLARG
  6437. SGML_DECL_QUOTED: S++,
  6438. // <!BLARG foo "bar
  6439. DOCTYPE: S++,
  6440. // <!DOCTYPE
  6441. DOCTYPE_QUOTED: S++,
  6442. // <!DOCTYPE "//blah
  6443. DOCTYPE_DTD: S++,
  6444. // <!DOCTYPE "//blah" [ ...
  6445. DOCTYPE_DTD_QUOTED: S++,
  6446. // <!DOCTYPE "//blah" [ "foo
  6447. COMMENT_STARTING: S++,
  6448. // <!-
  6449. COMMENT: S++,
  6450. // <!--
  6451. COMMENT_ENDING: S++,
  6452. // <!-- blah -
  6453. COMMENT_ENDED: S++,
  6454. // <!-- blah --
  6455. CDATA: S++,
  6456. // <![CDATA[ something
  6457. CDATA_ENDING: S++,
  6458. // ]
  6459. CDATA_ENDING_2: S++,
  6460. // ]]
  6461. PROC_INST: S++,
  6462. // <?hi
  6463. PROC_INST_BODY: S++,
  6464. // <?hi there
  6465. PROC_INST_ENDING: S++,
  6466. // <?hi "there" ?
  6467. OPEN_TAG: S++,
  6468. // <strong
  6469. OPEN_TAG_SLASH: S++,
  6470. // <strong /
  6471. ATTRIB: S++,
  6472. // <a
  6473. ATTRIB_NAME: S++,
  6474. // <a foo
  6475. ATTRIB_NAME_SAW_WHITE: S++,
  6476. // <a foo _
  6477. ATTRIB_VALUE: S++,
  6478. // <a foo=
  6479. ATTRIB_VALUE_QUOTED: S++,
  6480. // <a foo="bar
  6481. ATTRIB_VALUE_CLOSED: S++,
  6482. // <a foo="bar"
  6483. ATTRIB_VALUE_UNQUOTED: S++,
  6484. // <a foo=bar
  6485. ATTRIB_VALUE_ENTITY_Q: S++,
  6486. // <foo bar="&quot;"
  6487. ATTRIB_VALUE_ENTITY_U: S++,
  6488. // <foo bar=&quot
  6489. CLOSE_TAG: S++,
  6490. // </a
  6491. CLOSE_TAG_SAW_WHITE: S++,
  6492. // </a >
  6493. SCRIPT: S++,
  6494. // <script> ...
  6495. SCRIPT_ENDING: S++ // <script> ... <
  6496. };
  6497. sax.XML_ENTITIES = {
  6498. 'amp': '&',
  6499. 'gt': '>',
  6500. 'lt': '<',
  6501. 'quot': '"',
  6502. 'apos': "'"
  6503. };
  6504. sax.ENTITIES = {
  6505. 'amp': '&',
  6506. 'gt': '>',
  6507. 'lt': '<',
  6508. 'quot': '"',
  6509. 'apos': "'",
  6510. 'AElig': 198,
  6511. 'Aacute': 193,
  6512. 'Acirc': 194,
  6513. 'Agrave': 192,
  6514. 'Aring': 197,
  6515. 'Atilde': 195,
  6516. 'Auml': 196,
  6517. 'Ccedil': 199,
  6518. 'ETH': 208,
  6519. 'Eacute': 201,
  6520. 'Ecirc': 202,
  6521. 'Egrave': 200,
  6522. 'Euml': 203,
  6523. 'Iacute': 205,
  6524. 'Icirc': 206,
  6525. 'Igrave': 204,
  6526. 'Iuml': 207,
  6527. 'Ntilde': 209,
  6528. 'Oacute': 211,
  6529. 'Ocirc': 212,
  6530. 'Ograve': 210,
  6531. 'Oslash': 216,
  6532. 'Otilde': 213,
  6533. 'Ouml': 214,
  6534. 'THORN': 222,
  6535. 'Uacute': 218,
  6536. 'Ucirc': 219,
  6537. 'Ugrave': 217,
  6538. 'Uuml': 220,
  6539. 'Yacute': 221,
  6540. 'aacute': 225,
  6541. 'acirc': 226,
  6542. 'aelig': 230,
  6543. 'agrave': 224,
  6544. 'aring': 229,
  6545. 'atilde': 227,
  6546. 'auml': 228,
  6547. 'ccedil': 231,
  6548. 'eacute': 233,
  6549. 'ecirc': 234,
  6550. 'egrave': 232,
  6551. 'eth': 240,
  6552. 'euml': 235,
  6553. 'iacute': 237,
  6554. 'icirc': 238,
  6555. 'igrave': 236,
  6556. 'iuml': 239,
  6557. 'ntilde': 241,
  6558. 'oacute': 243,
  6559. 'ocirc': 244,
  6560. 'ograve': 242,
  6561. 'oslash': 248,
  6562. 'otilde': 245,
  6563. 'ouml': 246,
  6564. 'szlig': 223,
  6565. 'thorn': 254,
  6566. 'uacute': 250,
  6567. 'ucirc': 251,
  6568. 'ugrave': 249,
  6569. 'uuml': 252,
  6570. 'yacute': 253,
  6571. 'yuml': 255,
  6572. 'copy': 169,
  6573. 'reg': 174,
  6574. 'nbsp': 160,
  6575. 'iexcl': 161,
  6576. 'cent': 162,
  6577. 'pound': 163,
  6578. 'curren': 164,
  6579. 'yen': 165,
  6580. 'brvbar': 166,
  6581. 'sect': 167,
  6582. 'uml': 168,
  6583. 'ordf': 170,
  6584. 'laquo': 171,
  6585. 'not': 172,
  6586. 'shy': 173,
  6587. 'macr': 175,
  6588. 'deg': 176,
  6589. 'plusmn': 177,
  6590. 'sup1': 185,
  6591. 'sup2': 178,
  6592. 'sup3': 179,
  6593. 'acute': 180,
  6594. 'micro': 181,
  6595. 'para': 182,
  6596. 'middot': 183,
  6597. 'cedil': 184,
  6598. 'ordm': 186,
  6599. 'raquo': 187,
  6600. 'frac14': 188,
  6601. 'frac12': 189,
  6602. 'frac34': 190,
  6603. 'iquest': 191,
  6604. 'times': 215,
  6605. 'divide': 247,
  6606. 'OElig': 338,
  6607. 'oelig': 339,
  6608. 'Scaron': 352,
  6609. 'scaron': 353,
  6610. 'Yuml': 376,
  6611. 'fnof': 402,
  6612. 'circ': 710,
  6613. 'tilde': 732,
  6614. 'Alpha': 913,
  6615. 'Beta': 914,
  6616. 'Gamma': 915,
  6617. 'Delta': 916,
  6618. 'Epsilon': 917,
  6619. 'Zeta': 918,
  6620. 'Eta': 919,
  6621. 'Theta': 920,
  6622. 'Iota': 921,
  6623. 'Kappa': 922,
  6624. 'Lambda': 923,
  6625. 'Mu': 924,
  6626. 'Nu': 925,
  6627. 'Xi': 926,
  6628. 'Omicron': 927,
  6629. 'Pi': 928,
  6630. 'Rho': 929,
  6631. 'Sigma': 931,
  6632. 'Tau': 932,
  6633. 'Upsilon': 933,
  6634. 'Phi': 934,
  6635. 'Chi': 935,
  6636. 'Psi': 936,
  6637. 'Omega': 937,
  6638. 'alpha': 945,
  6639. 'beta': 946,
  6640. 'gamma': 947,
  6641. 'delta': 948,
  6642. 'epsilon': 949,
  6643. 'zeta': 950,
  6644. 'eta': 951,
  6645. 'theta': 952,
  6646. 'iota': 953,
  6647. 'kappa': 954,
  6648. 'lambda': 955,
  6649. 'mu': 956,
  6650. 'nu': 957,
  6651. 'xi': 958,
  6652. 'omicron': 959,
  6653. 'pi': 960,
  6654. 'rho': 961,
  6655. 'sigmaf': 962,
  6656. 'sigma': 963,
  6657. 'tau': 964,
  6658. 'upsilon': 965,
  6659. 'phi': 966,
  6660. 'chi': 967,
  6661. 'psi': 968,
  6662. 'omega': 969,
  6663. 'thetasym': 977,
  6664. 'upsih': 978,
  6665. 'piv': 982,
  6666. 'ensp': 8194,
  6667. 'emsp': 8195,
  6668. 'thinsp': 8201,
  6669. 'zwnj': 8204,
  6670. 'zwj': 8205,
  6671. 'lrm': 8206,
  6672. 'rlm': 8207,
  6673. 'ndash': 8211,
  6674. 'mdash': 8212,
  6675. 'lsquo': 8216,
  6676. 'rsquo': 8217,
  6677. 'sbquo': 8218,
  6678. 'ldquo': 8220,
  6679. 'rdquo': 8221,
  6680. 'bdquo': 8222,
  6681. 'dagger': 8224,
  6682. 'Dagger': 8225,
  6683. 'bull': 8226,
  6684. 'hellip': 8230,
  6685. 'permil': 8240,
  6686. 'prime': 8242,
  6687. 'Prime': 8243,
  6688. 'lsaquo': 8249,
  6689. 'rsaquo': 8250,
  6690. 'oline': 8254,
  6691. 'frasl': 8260,
  6692. 'euro': 8364,
  6693. 'image': 8465,
  6694. 'weierp': 8472,
  6695. 'real': 8476,
  6696. 'trade': 8482,
  6697. 'alefsym': 8501,
  6698. 'larr': 8592,
  6699. 'uarr': 8593,
  6700. 'rarr': 8594,
  6701. 'darr': 8595,
  6702. 'harr': 8596,
  6703. 'crarr': 8629,
  6704. 'lArr': 8656,
  6705. 'uArr': 8657,
  6706. 'rArr': 8658,
  6707. 'dArr': 8659,
  6708. 'hArr': 8660,
  6709. 'forall': 8704,
  6710. 'part': 8706,
  6711. 'exist': 8707,
  6712. 'empty': 8709,
  6713. 'nabla': 8711,
  6714. 'isin': 8712,
  6715. 'notin': 8713,
  6716. 'ni': 8715,
  6717. 'prod': 8719,
  6718. 'sum': 8721,
  6719. 'minus': 8722,
  6720. 'lowast': 8727,
  6721. 'radic': 8730,
  6722. 'prop': 8733,
  6723. 'infin': 8734,
  6724. 'ang': 8736,
  6725. 'and': 8743,
  6726. 'or': 8744,
  6727. 'cap': 8745,
  6728. 'cup': 8746,
  6729. 'int': 8747,
  6730. 'there4': 8756,
  6731. 'sim': 8764,
  6732. 'cong': 8773,
  6733. 'asymp': 8776,
  6734. 'ne': 8800,
  6735. 'equiv': 8801,
  6736. 'le': 8804,
  6737. 'ge': 8805,
  6738. 'sub': 8834,
  6739. 'sup': 8835,
  6740. 'nsub': 8836,
  6741. 'sube': 8838,
  6742. 'supe': 8839,
  6743. 'oplus': 8853,
  6744. 'otimes': 8855,
  6745. 'perp': 8869,
  6746. 'sdot': 8901,
  6747. 'lceil': 8968,
  6748. 'rceil': 8969,
  6749. 'lfloor': 8970,
  6750. 'rfloor': 8971,
  6751. 'lang': 9001,
  6752. 'rang': 9002,
  6753. 'loz': 9674,
  6754. 'spades': 9824,
  6755. 'clubs': 9827,
  6756. 'hearts': 9829,
  6757. 'diams': 9830
  6758. };
  6759. Object.keys(sax.ENTITIES).forEach(function (key) {
  6760. var e = sax.ENTITIES[key];
  6761. var s = typeof e === 'number' ? String.fromCharCode(e) : e;
  6762. sax.ENTITIES[key] = s;
  6763. });
  6764. for (var s in sax.STATE) {
  6765. sax.STATE[sax.STATE[s]] = s;
  6766. }
  6767. // shorthand
  6768. S = sax.STATE;
  6769. function emit(parser, event, data) {
  6770. parser[event] && parser[event](data);
  6771. }
  6772. function emitNode(parser, nodeType, data) {
  6773. if (parser.textNode) closeText(parser);
  6774. emit(parser, nodeType, data);
  6775. }
  6776. function closeText(parser) {
  6777. parser.textNode = textopts(parser.opt, parser.textNode);
  6778. if (parser.textNode) emit(parser, 'ontext', parser.textNode);
  6779. parser.textNode = '';
  6780. }
  6781. function textopts(opt, text) {
  6782. if (opt.trim) text = text.trim();
  6783. if (opt.normalize) text = text.replace(/\s+/g, ' ');
  6784. return text;
  6785. }
  6786. function error(parser, er) {
  6787. closeText(parser);
  6788. if (parser.trackPosition) {
  6789. er += '\nLine: ' + parser.line + '\nColumn: ' + parser.column + '\nChar: ' + parser.c;
  6790. }
  6791. er = new Error(er);
  6792. parser.error = er;
  6793. emit(parser, 'onerror', er);
  6794. return parser;
  6795. }
  6796. function _end(parser) {
  6797. if (parser.sawRoot && !parser.closedRoot) strictFail(parser, 'Unclosed root tag');
  6798. if (parser.state !== S.BEGIN && parser.state !== S.BEGIN_WHITESPACE && parser.state !== S.TEXT) {
  6799. error(parser, 'Unexpected end');
  6800. }
  6801. closeText(parser);
  6802. parser.c = '';
  6803. parser.closed = true;
  6804. emit(parser, 'onend');
  6805. SAXParser.call(parser, parser.strict, parser.opt);
  6806. return parser;
  6807. }
  6808. function strictFail(parser, message) {
  6809. if (_typeof(parser) !== 'object' || !(parser instanceof SAXParser)) {
  6810. throw new Error('bad call to strictFail');
  6811. }
  6812. if (parser.strict) {
  6813. error(parser, message);
  6814. }
  6815. }
  6816. function newTag(parser) {
  6817. if (!parser.strict) parser.tagName = parser.tagName[parser.looseCase]();
  6818. var parent = parser.tags[parser.tags.length - 1] || parser;
  6819. var tag = parser.tag = {
  6820. name: parser.tagName,
  6821. attributes: {}
  6822. };
  6823. // will be overridden if tag contails an xmlns="foo" or xmlns:foo="bar"
  6824. if (parser.opt.xmlns) {
  6825. tag.ns = parent.ns;
  6826. }
  6827. parser.attribList.length = 0;
  6828. emitNode(parser, 'onopentagstart', tag);
  6829. }
  6830. function qname(name, attribute) {
  6831. var i = name.indexOf(':');
  6832. var qualName = i < 0 ? ['', name] : name.split(':');
  6833. var prefix = qualName[0];
  6834. var local = qualName[1];
  6835. // <x "xmlns"="http://foo">
  6836. if (attribute && name === 'xmlns') {
  6837. prefix = 'xmlns';
  6838. local = '';
  6839. }
  6840. return {
  6841. prefix: prefix,
  6842. local: local
  6843. };
  6844. }
  6845. function attrib(parser) {
  6846. if (!parser.strict) {
  6847. parser.attribName = parser.attribName[parser.looseCase]();
  6848. }
  6849. if (parser.attribList.indexOf(parser.attribName) !== -1 || parser.tag.attributes.hasOwnProperty(parser.attribName)) {
  6850. parser.attribName = parser.attribValue = '';
  6851. return;
  6852. }
  6853. if (parser.opt.xmlns) {
  6854. var qn = qname(parser.attribName, true);
  6855. var prefix = qn.prefix;
  6856. var local = qn.local;
  6857. if (prefix === 'xmlns') {
  6858. // namespace binding attribute. push the binding into scope
  6859. if (local === 'xml' && parser.attribValue !== XML_NAMESPACE) {
  6860. strictFail(parser, 'xml: prefix must be bound to ' + XML_NAMESPACE + '\n' + 'Actual: ' + parser.attribValue);
  6861. } else if (local === 'xmlns' && parser.attribValue !== XMLNS_NAMESPACE) {
  6862. strictFail(parser, 'xmlns: prefix must be bound to ' + XMLNS_NAMESPACE + '\n' + 'Actual: ' + parser.attribValue);
  6863. } else {
  6864. var tag = parser.tag;
  6865. var parent = parser.tags[parser.tags.length - 1] || parser;
  6866. if (tag.ns === parent.ns) {
  6867. tag.ns = Object.create(parent.ns);
  6868. }
  6869. tag.ns[local] = parser.attribValue;
  6870. }
  6871. }
  6872. // defer onattribute events until all attributes have been seen
  6873. // so any new bindings can take effect. preserve attribute order
  6874. // so deferred events can be emitted in document order
  6875. parser.attribList.push([parser.attribName, parser.attribValue]);
  6876. } else {
  6877. // in non-xmlns mode, we can emit the event right away
  6878. parser.tag.attributes[parser.attribName] = parser.attribValue;
  6879. emitNode(parser, 'onattribute', {
  6880. name: parser.attribName,
  6881. value: parser.attribValue
  6882. });
  6883. }
  6884. parser.attribName = parser.attribValue = '';
  6885. }
  6886. function openTag(parser, selfClosing) {
  6887. if (parser.opt.xmlns) {
  6888. // emit namespace binding events
  6889. var tag = parser.tag;
  6890. // add namespace info to tag
  6891. var qn = qname(parser.tagName);
  6892. tag.prefix = qn.prefix;
  6893. tag.local = qn.local;
  6894. tag.uri = tag.ns[qn.prefix] || '';
  6895. if (tag.prefix && !tag.uri) {
  6896. strictFail(parser, 'Unbound namespace prefix: ' + JSON.stringify(parser.tagName));
  6897. tag.uri = qn.prefix;
  6898. }
  6899. var parent = parser.tags[parser.tags.length - 1] || parser;
  6900. if (tag.ns && parent.ns !== tag.ns) {
  6901. Object.keys(tag.ns).forEach(function (p) {
  6902. emitNode(parser, 'onopennamespace', {
  6903. prefix: p,
  6904. uri: tag.ns[p]
  6905. });
  6906. });
  6907. }
  6908. // handle deferred onattribute events
  6909. // Note: do not apply default ns to attributes:
  6910. // http://www.w3.org/TR/REC-xml-names/#defaulting
  6911. for (var i = 0, l = parser.attribList.length; i < l; i++) {
  6912. var nv = parser.attribList[i];
  6913. var name = nv[0];
  6914. var value = nv[1];
  6915. var qualName = qname(name, true);
  6916. var prefix = qualName.prefix;
  6917. var local = qualName.local;
  6918. var uri = prefix === '' ? '' : tag.ns[prefix] || '';
  6919. var a = {
  6920. name: name,
  6921. value: value,
  6922. prefix: prefix,
  6923. local: local,
  6924. uri: uri
  6925. };
  6926. // if there's any attributes with an undefined namespace,
  6927. // then fail on them now.
  6928. if (prefix && prefix !== 'xmlns' && !uri) {
  6929. strictFail(parser, 'Unbound namespace prefix: ' + JSON.stringify(prefix));
  6930. a.uri = prefix;
  6931. }
  6932. parser.tag.attributes[name] = a;
  6933. emitNode(parser, 'onattribute', a);
  6934. }
  6935. parser.attribList.length = 0;
  6936. }
  6937. parser.tag.isSelfClosing = !!selfClosing;
  6938. // process the tag
  6939. parser.sawRoot = true;
  6940. parser.tags.push(parser.tag);
  6941. emitNode(parser, 'onopentag', parser.tag);
  6942. if (!selfClosing) {
  6943. // special case for <script> in non-strict mode.
  6944. if (!parser.noscript && parser.tagName.toLowerCase() === 'script') {
  6945. parser.state = S.SCRIPT;
  6946. } else {
  6947. parser.state = S.TEXT;
  6948. }
  6949. parser.tag = null;
  6950. parser.tagName = '';
  6951. }
  6952. parser.attribName = parser.attribValue = '';
  6953. parser.attribList.length = 0;
  6954. }
  6955. function closeTag(parser) {
  6956. if (!parser.tagName) {
  6957. strictFail(parser, 'Weird empty close tag.');
  6958. parser.textNode += '</>';
  6959. parser.state = S.TEXT;
  6960. return;
  6961. }
  6962. if (parser.script) {
  6963. if (parser.tagName !== 'script') {
  6964. parser.script += '</' + parser.tagName + '>';
  6965. parser.tagName = '';
  6966. parser.state = S.SCRIPT;
  6967. return;
  6968. }
  6969. emitNode(parser, 'onscript', parser.script);
  6970. parser.script = '';
  6971. }
  6972. // first make sure that the closing tag actually exists.
  6973. // <a><b></c></b></a> will close everything, otherwise.
  6974. var t = parser.tags.length;
  6975. var tagName = parser.tagName;
  6976. if (!parser.strict) {
  6977. tagName = tagName[parser.looseCase]();
  6978. }
  6979. var closeTo = tagName;
  6980. while (t--) {
  6981. var close = parser.tags[t];
  6982. if (close.name !== closeTo) {
  6983. // fail the first time in strict mode
  6984. strictFail(parser, 'Unexpected close tag');
  6985. } else {
  6986. break;
  6987. }
  6988. }
  6989. // didn't find it. we already failed for strict, so just abort.
  6990. if (t < 0) {
  6991. strictFail(parser, 'Unmatched closing tag: ' + parser.tagName);
  6992. parser.textNode += '</' + parser.tagName + '>';
  6993. parser.state = S.TEXT;
  6994. return;
  6995. }
  6996. parser.tagName = tagName;
  6997. var s = parser.tags.length;
  6998. while (s-- > t) {
  6999. var tag = parser.tag = parser.tags.pop();
  7000. parser.tagName = parser.tag.name;
  7001. emitNode(parser, 'onclosetag', parser.tagName);
  7002. var x = {};
  7003. for (var i in tag.ns) {
  7004. x[i] = tag.ns[i];
  7005. }
  7006. var parent = parser.tags[parser.tags.length - 1] || parser;
  7007. if (parser.opt.xmlns && tag.ns !== parent.ns) {
  7008. // remove namespace bindings introduced by tag
  7009. Object.keys(tag.ns).forEach(function (p) {
  7010. var n = tag.ns[p];
  7011. emitNode(parser, 'onclosenamespace', {
  7012. prefix: p,
  7013. uri: n
  7014. });
  7015. });
  7016. }
  7017. }
  7018. if (t === 0) parser.closedRoot = true;
  7019. parser.tagName = parser.attribValue = parser.attribName = '';
  7020. parser.attribList.length = 0;
  7021. parser.state = S.TEXT;
  7022. }
  7023. function parseEntity(parser) {
  7024. var entity = parser.entity;
  7025. var entityLC = entity.toLowerCase();
  7026. var num;
  7027. var numStr = '';
  7028. if (parser.ENTITIES[entity]) {
  7029. return parser.ENTITIES[entity];
  7030. }
  7031. if (parser.ENTITIES[entityLC]) {
  7032. return parser.ENTITIES[entityLC];
  7033. }
  7034. entity = entityLC;
  7035. if (entity.charAt(0) === '#') {
  7036. if (entity.charAt(1) === 'x') {
  7037. entity = entity.slice(2);
  7038. num = parseInt(entity, 16);
  7039. numStr = num.toString(16);
  7040. } else {
  7041. entity = entity.slice(1);
  7042. num = parseInt(entity, 10);
  7043. numStr = num.toString(10);
  7044. }
  7045. }
  7046. entity = entity.replace(/^0+/, '');
  7047. if (isNaN(num) || numStr.toLowerCase() !== entity) {
  7048. strictFail(parser, 'Invalid character entity');
  7049. return '&' + parser.entity + ';';
  7050. }
  7051. return String.fromCodePoint(num);
  7052. }
  7053. function beginWhiteSpace(parser, c) {
  7054. if (c === '<') {
  7055. parser.state = S.OPEN_WAKA;
  7056. parser.startTagPosition = parser.position;
  7057. } else if (!isWhitespace(c)) {
  7058. // have to process this as a text node.
  7059. // weird, but happens.
  7060. strictFail(parser, 'Non-whitespace before first tag.');
  7061. parser.textNode = c;
  7062. parser.state = S.TEXT;
  7063. }
  7064. }
  7065. function charAt(chunk, i) {
  7066. var result = '';
  7067. if (i < chunk.length) {
  7068. result = chunk.charAt(i);
  7069. }
  7070. return result;
  7071. }
  7072. function write(chunk) {
  7073. var parser = this;
  7074. if (this.error) {
  7075. throw this.error;
  7076. }
  7077. if (parser.closed) {
  7078. return error(parser, 'Cannot write after close. Assign an onready handler.');
  7079. }
  7080. if (chunk === null) {
  7081. return _end(parser);
  7082. }
  7083. if (_typeof(chunk) === 'object') {
  7084. chunk = chunk.toString();
  7085. }
  7086. var i = 0;
  7087. var c = '';
  7088. while (true) {
  7089. c = charAt(chunk, i++);
  7090. parser.c = c;
  7091. if (!c) {
  7092. break;
  7093. }
  7094. if (parser.trackPosition) {
  7095. parser.position++;
  7096. if (c === '\n') {
  7097. parser.line++;
  7098. parser.column = 0;
  7099. } else {
  7100. parser.column++;
  7101. }
  7102. }
  7103. switch (parser.state) {
  7104. case S.BEGIN:
  7105. parser.state = S.BEGIN_WHITESPACE;
  7106. if (c === "\uFEFF") {
  7107. continue;
  7108. }
  7109. beginWhiteSpace(parser, c);
  7110. continue;
  7111. case S.BEGIN_WHITESPACE:
  7112. beginWhiteSpace(parser, c);
  7113. continue;
  7114. case S.TEXT:
  7115. if (parser.sawRoot && !parser.closedRoot) {
  7116. var starti = i - 1;
  7117. while (c && c !== '<' && c !== '&') {
  7118. c = charAt(chunk, i++);
  7119. if (c && parser.trackPosition) {
  7120. parser.position++;
  7121. if (c === '\n') {
  7122. parser.line++;
  7123. parser.column = 0;
  7124. } else {
  7125. parser.column++;
  7126. }
  7127. }
  7128. }
  7129. parser.textNode += chunk.substring(starti, i - 1);
  7130. }
  7131. if (c === '<' && !(parser.sawRoot && parser.closedRoot && !parser.strict)) {
  7132. parser.state = S.OPEN_WAKA;
  7133. parser.startTagPosition = parser.position;
  7134. } else {
  7135. if (!isWhitespace(c) && (!parser.sawRoot || parser.closedRoot)) {
  7136. strictFail(parser, 'Text data outside of root node.');
  7137. }
  7138. if (c === '&') {
  7139. parser.state = S.TEXT_ENTITY;
  7140. } else {
  7141. parser.textNode += c;
  7142. }
  7143. }
  7144. continue;
  7145. case S.SCRIPT:
  7146. // only non-strict
  7147. if (c === '<') {
  7148. parser.state = S.SCRIPT_ENDING;
  7149. } else {
  7150. parser.script += c;
  7151. }
  7152. continue;
  7153. case S.SCRIPT_ENDING:
  7154. if (c === '/') {
  7155. parser.state = S.CLOSE_TAG;
  7156. } else {
  7157. parser.script += '<' + c;
  7158. parser.state = S.SCRIPT;
  7159. }
  7160. continue;
  7161. case S.OPEN_WAKA:
  7162. // either a /, ?, !, or text is coming next.
  7163. if (c === '!') {
  7164. parser.state = S.SGML_DECL;
  7165. parser.sgmlDecl = '';
  7166. } else if (isWhitespace(c)) {
  7167. // wait for it...
  7168. } else if (isMatch(nameStart, c)) {
  7169. parser.state = S.OPEN_TAG;
  7170. parser.tagName = c;
  7171. } else if (c === '/') {
  7172. parser.state = S.CLOSE_TAG;
  7173. parser.tagName = '';
  7174. } else if (c === '?') {
  7175. parser.state = S.PROC_INST;
  7176. parser.procInstName = parser.procInstBody = '';
  7177. } else {
  7178. strictFail(parser, 'Unencoded <');
  7179. // if there was some whitespace, then add that in.
  7180. if (parser.startTagPosition + 1 < parser.position) {
  7181. var pad = parser.position - parser.startTagPosition;
  7182. c = new Array(pad).join(' ') + c;
  7183. }
  7184. parser.textNode += '<' + c;
  7185. parser.state = S.TEXT;
  7186. }
  7187. continue;
  7188. case S.SGML_DECL:
  7189. if ((parser.sgmlDecl + c).toUpperCase() === CDATA) {
  7190. emitNode(parser, 'onopencdata');
  7191. parser.state = S.CDATA;
  7192. parser.sgmlDecl = '';
  7193. parser.cdata = '';
  7194. } else if (parser.sgmlDecl + c === '--') {
  7195. parser.state = S.COMMENT;
  7196. parser.comment = '';
  7197. parser.sgmlDecl = '';
  7198. } else if ((parser.sgmlDecl + c).toUpperCase() === DOCTYPE) {
  7199. parser.state = S.DOCTYPE;
  7200. if (parser.doctype || parser.sawRoot) {
  7201. strictFail(parser, 'Inappropriately located doctype declaration');
  7202. }
  7203. parser.doctype = '';
  7204. parser.sgmlDecl = '';
  7205. } else if (c === '>') {
  7206. emitNode(parser, 'onsgmldeclaration', parser.sgmlDecl);
  7207. parser.sgmlDecl = '';
  7208. parser.state = S.TEXT;
  7209. } else if (isQuote(c)) {
  7210. parser.state = S.SGML_DECL_QUOTED;
  7211. parser.sgmlDecl += c;
  7212. } else {
  7213. parser.sgmlDecl += c;
  7214. }
  7215. continue;
  7216. case S.SGML_DECL_QUOTED:
  7217. if (c === parser.q) {
  7218. parser.state = S.SGML_DECL;
  7219. parser.q = '';
  7220. }
  7221. parser.sgmlDecl += c;
  7222. continue;
  7223. case S.DOCTYPE:
  7224. if (c === '>') {
  7225. parser.state = S.TEXT;
  7226. emitNode(parser, 'ondoctype', parser.doctype);
  7227. parser.doctype = true; // just remember that we saw it.
  7228. } else {
  7229. parser.doctype += c;
  7230. if (c === '[') {
  7231. parser.state = S.DOCTYPE_DTD;
  7232. } else if (isQuote(c)) {
  7233. parser.state = S.DOCTYPE_QUOTED;
  7234. parser.q = c;
  7235. }
  7236. }
  7237. continue;
  7238. case S.DOCTYPE_QUOTED:
  7239. parser.doctype += c;
  7240. if (c === parser.q) {
  7241. parser.q = '';
  7242. parser.state = S.DOCTYPE;
  7243. }
  7244. continue;
  7245. case S.DOCTYPE_DTD:
  7246. parser.doctype += c;
  7247. if (c === ']') {
  7248. parser.state = S.DOCTYPE;
  7249. } else if (isQuote(c)) {
  7250. parser.state = S.DOCTYPE_DTD_QUOTED;
  7251. parser.q = c;
  7252. }
  7253. continue;
  7254. case S.DOCTYPE_DTD_QUOTED:
  7255. parser.doctype += c;
  7256. if (c === parser.q) {
  7257. parser.state = S.DOCTYPE_DTD;
  7258. parser.q = '';
  7259. }
  7260. continue;
  7261. case S.COMMENT:
  7262. if (c === '-') {
  7263. parser.state = S.COMMENT_ENDING;
  7264. } else {
  7265. parser.comment += c;
  7266. }
  7267. continue;
  7268. case S.COMMENT_ENDING:
  7269. if (c === '-') {
  7270. parser.state = S.COMMENT_ENDED;
  7271. parser.comment = textopts(parser.opt, parser.comment);
  7272. if (parser.comment) {
  7273. emitNode(parser, 'oncomment', parser.comment);
  7274. }
  7275. parser.comment = '';
  7276. } else {
  7277. parser.comment += '-' + c;
  7278. parser.state = S.COMMENT;
  7279. }
  7280. continue;
  7281. case S.COMMENT_ENDED:
  7282. if (c !== '>') {
  7283. strictFail(parser, 'Malformed comment');
  7284. // allow <!-- blah -- bloo --> in non-strict mode,
  7285. // which is a comment of " blah -- bloo "
  7286. parser.comment += '--' + c;
  7287. parser.state = S.COMMENT;
  7288. } else {
  7289. parser.state = S.TEXT;
  7290. }
  7291. continue;
  7292. case S.CDATA:
  7293. if (c === ']') {
  7294. parser.state = S.CDATA_ENDING;
  7295. } else {
  7296. parser.cdata += c;
  7297. }
  7298. continue;
  7299. case S.CDATA_ENDING:
  7300. if (c === ']') {
  7301. parser.state = S.CDATA_ENDING_2;
  7302. } else {
  7303. parser.cdata += ']' + c;
  7304. parser.state = S.CDATA;
  7305. }
  7306. continue;
  7307. case S.CDATA_ENDING_2:
  7308. if (c === '>') {
  7309. if (parser.cdata) {
  7310. emitNode(parser, 'oncdata', parser.cdata);
  7311. }
  7312. emitNode(parser, 'onclosecdata');
  7313. parser.cdata = '';
  7314. parser.state = S.TEXT;
  7315. } else if (c === ']') {
  7316. parser.cdata += ']';
  7317. } else {
  7318. parser.cdata += ']]' + c;
  7319. parser.state = S.CDATA;
  7320. }
  7321. continue;
  7322. case S.PROC_INST:
  7323. if (c === '?') {
  7324. parser.state = S.PROC_INST_ENDING;
  7325. } else if (isWhitespace(c)) {
  7326. parser.state = S.PROC_INST_BODY;
  7327. } else {
  7328. parser.procInstName += c;
  7329. }
  7330. continue;
  7331. case S.PROC_INST_BODY:
  7332. if (!parser.procInstBody && isWhitespace(c)) {
  7333. continue;
  7334. } else if (c === '?') {
  7335. parser.state = S.PROC_INST_ENDING;
  7336. } else {
  7337. parser.procInstBody += c;
  7338. }
  7339. continue;
  7340. case S.PROC_INST_ENDING:
  7341. if (c === '>') {
  7342. emitNode(parser, 'onprocessinginstruction', {
  7343. name: parser.procInstName,
  7344. body: parser.procInstBody
  7345. });
  7346. parser.procInstName = parser.procInstBody = '';
  7347. parser.state = S.TEXT;
  7348. } else {
  7349. parser.procInstBody += '?' + c;
  7350. parser.state = S.PROC_INST_BODY;
  7351. }
  7352. continue;
  7353. case S.OPEN_TAG:
  7354. if (isMatch(nameBody, c)) {
  7355. parser.tagName += c;
  7356. } else {
  7357. newTag(parser);
  7358. if (c === '>') {
  7359. openTag(parser);
  7360. } else if (c === '/') {
  7361. parser.state = S.OPEN_TAG_SLASH;
  7362. } else {
  7363. if (!isWhitespace(c)) {
  7364. strictFail(parser, 'Invalid character in tag name');
  7365. }
  7366. parser.state = S.ATTRIB;
  7367. }
  7368. }
  7369. continue;
  7370. case S.OPEN_TAG_SLASH:
  7371. if (c === '>') {
  7372. openTag(parser, true);
  7373. closeTag(parser);
  7374. } else {
  7375. strictFail(parser, 'Forward-slash in opening tag not followed by >');
  7376. parser.state = S.ATTRIB;
  7377. }
  7378. continue;
  7379. case S.ATTRIB:
  7380. // haven't read the attribute name yet.
  7381. if (isWhitespace(c)) {
  7382. continue;
  7383. } else if (c === '>') {
  7384. openTag(parser);
  7385. } else if (c === '/') {
  7386. parser.state = S.OPEN_TAG_SLASH;
  7387. } else if (isMatch(nameStart, c)) {
  7388. parser.attribName = c;
  7389. parser.attribValue = '';
  7390. parser.state = S.ATTRIB_NAME;
  7391. } else {
  7392. strictFail(parser, 'Invalid attribute name');
  7393. }
  7394. continue;
  7395. case S.ATTRIB_NAME:
  7396. if (c === '=') {
  7397. parser.state = S.ATTRIB_VALUE;
  7398. } else if (c === '>') {
  7399. strictFail(parser, 'Attribute without value');
  7400. parser.attribValue = parser.attribName;
  7401. attrib(parser);
  7402. openTag(parser);
  7403. } else if (isWhitespace(c)) {
  7404. parser.state = S.ATTRIB_NAME_SAW_WHITE;
  7405. } else if (isMatch(nameBody, c)) {
  7406. parser.attribName += c;
  7407. } else {
  7408. strictFail(parser, 'Invalid attribute name');
  7409. }
  7410. continue;
  7411. case S.ATTRIB_NAME_SAW_WHITE:
  7412. if (c === '=') {
  7413. parser.state = S.ATTRIB_VALUE;
  7414. } else if (isWhitespace(c)) {
  7415. continue;
  7416. } else {
  7417. strictFail(parser, 'Attribute without value');
  7418. parser.tag.attributes[parser.attribName] = '';
  7419. parser.attribValue = '';
  7420. emitNode(parser, 'onattribute', {
  7421. name: parser.attribName,
  7422. value: ''
  7423. });
  7424. parser.attribName = '';
  7425. if (c === '>') {
  7426. openTag(parser);
  7427. } else if (isMatch(nameStart, c)) {
  7428. parser.attribName = c;
  7429. parser.state = S.ATTRIB_NAME;
  7430. } else {
  7431. strictFail(parser, 'Invalid attribute name');
  7432. parser.state = S.ATTRIB;
  7433. }
  7434. }
  7435. continue;
  7436. case S.ATTRIB_VALUE:
  7437. if (isWhitespace(c)) {
  7438. continue;
  7439. } else if (isQuote(c)) {
  7440. parser.q = c;
  7441. parser.state = S.ATTRIB_VALUE_QUOTED;
  7442. } else {
  7443. strictFail(parser, 'Unquoted attribute value');
  7444. parser.state = S.ATTRIB_VALUE_UNQUOTED;
  7445. parser.attribValue = c;
  7446. }
  7447. continue;
  7448. case S.ATTRIB_VALUE_QUOTED:
  7449. if (c !== parser.q) {
  7450. if (c === '&') {
  7451. parser.state = S.ATTRIB_VALUE_ENTITY_Q;
  7452. } else {
  7453. parser.attribValue += c;
  7454. }
  7455. continue;
  7456. }
  7457. attrib(parser);
  7458. parser.q = '';
  7459. parser.state = S.ATTRIB_VALUE_CLOSED;
  7460. continue;
  7461. case S.ATTRIB_VALUE_CLOSED:
  7462. if (isWhitespace(c)) {
  7463. parser.state = S.ATTRIB;
  7464. } else if (c === '>') {
  7465. openTag(parser);
  7466. } else if (c === '/') {
  7467. parser.state = S.OPEN_TAG_SLASH;
  7468. } else if (isMatch(nameStart, c)) {
  7469. strictFail(parser, 'No whitespace between attributes');
  7470. parser.attribName = c;
  7471. parser.attribValue = '';
  7472. parser.state = S.ATTRIB_NAME;
  7473. } else {
  7474. strictFail(parser, 'Invalid attribute name');
  7475. }
  7476. continue;
  7477. case S.ATTRIB_VALUE_UNQUOTED:
  7478. if (!isAttribEnd(c)) {
  7479. if (c === '&') {
  7480. parser.state = S.ATTRIB_VALUE_ENTITY_U;
  7481. } else {
  7482. parser.attribValue += c;
  7483. }
  7484. continue;
  7485. }
  7486. attrib(parser);
  7487. if (c === '>') {
  7488. openTag(parser);
  7489. } else {
  7490. parser.state = S.ATTRIB;
  7491. }
  7492. continue;
  7493. case S.CLOSE_TAG:
  7494. if (!parser.tagName) {
  7495. if (isWhitespace(c)) {
  7496. continue;
  7497. } else if (notMatch(nameStart, c)) {
  7498. if (parser.script) {
  7499. parser.script += '</' + c;
  7500. parser.state = S.SCRIPT;
  7501. } else {
  7502. strictFail(parser, 'Invalid tagname in closing tag.');
  7503. }
  7504. } else {
  7505. parser.tagName = c;
  7506. }
  7507. } else if (c === '>') {
  7508. closeTag(parser);
  7509. } else if (isMatch(nameBody, c)) {
  7510. parser.tagName += c;
  7511. } else if (parser.script) {
  7512. parser.script += '</' + parser.tagName;
  7513. parser.tagName = '';
  7514. parser.state = S.SCRIPT;
  7515. } else {
  7516. if (!isWhitespace(c)) {
  7517. strictFail(parser, 'Invalid tagname in closing tag');
  7518. }
  7519. parser.state = S.CLOSE_TAG_SAW_WHITE;
  7520. }
  7521. continue;
  7522. case S.CLOSE_TAG_SAW_WHITE:
  7523. if (isWhitespace(c)) {
  7524. continue;
  7525. }
  7526. if (c === '>') {
  7527. closeTag(parser);
  7528. } else {
  7529. strictFail(parser, 'Invalid characters in closing tag');
  7530. }
  7531. continue;
  7532. case S.TEXT_ENTITY:
  7533. case S.ATTRIB_VALUE_ENTITY_Q:
  7534. case S.ATTRIB_VALUE_ENTITY_U:
  7535. var returnState;
  7536. var buffer;
  7537. switch (parser.state) {
  7538. case S.TEXT_ENTITY:
  7539. returnState = S.TEXT;
  7540. buffer = 'textNode';
  7541. break;
  7542. case S.ATTRIB_VALUE_ENTITY_Q:
  7543. returnState = S.ATTRIB_VALUE_QUOTED;
  7544. buffer = 'attribValue';
  7545. break;
  7546. case S.ATTRIB_VALUE_ENTITY_U:
  7547. returnState = S.ATTRIB_VALUE_UNQUOTED;
  7548. buffer = 'attribValue';
  7549. break;
  7550. }
  7551. if (c === ';') {
  7552. parser[buffer] += parseEntity(parser);
  7553. parser.entity = '';
  7554. parser.state = returnState;
  7555. } else if (isMatch(parser.entity.length ? entityBody : entityStart, c)) {
  7556. parser.entity += c;
  7557. } else {
  7558. strictFail(parser, 'Invalid character in entity name');
  7559. parser[buffer] += '&' + parser.entity + c;
  7560. parser.entity = '';
  7561. parser.state = returnState;
  7562. }
  7563. continue;
  7564. default:
  7565. throw new Error(parser, 'Unknown state: ' + parser.state);
  7566. }
  7567. } // while
  7568. if (parser.position >= parser.bufferCheckPosition) {
  7569. checkBufferLength(parser);
  7570. }
  7571. return parser;
  7572. }
  7573. /*! http://mths.be/fromcodepoint v0.1.0 by @mathias */
  7574. /* istanbul ignore next */
  7575. if (!String.fromCodePoint) {
  7576. (function () {
  7577. var stringFromCharCode = String.fromCharCode;
  7578. var floor = Math.floor;
  7579. var fromCodePoint = function fromCodePoint() {
  7580. var MAX_SIZE = 0x4000;
  7581. var codeUnits = [];
  7582. var highSurrogate;
  7583. var lowSurrogate;
  7584. var index = -1;
  7585. var length = arguments.length;
  7586. if (!length) {
  7587. return '';
  7588. }
  7589. var result = '';
  7590. while (++index < length) {
  7591. var codePoint = Number(arguments[index]);
  7592. if (!isFinite(codePoint) ||
  7593. // `NaN`, `+Infinity`, or `-Infinity`
  7594. codePoint < 0 ||
  7595. // not a valid Unicode code point
  7596. codePoint > 0x10FFFF ||
  7597. // not a valid Unicode code point
  7598. floor(codePoint) !== codePoint // not an integer
  7599. ) {
  7600. throw RangeError('Invalid code point: ' + codePoint);
  7601. }
  7602. if (codePoint <= 0xFFFF) {
  7603. // BMP code point
  7604. codeUnits.push(codePoint);
  7605. } else {
  7606. // Astral code point; split in surrogate halves
  7607. // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
  7608. codePoint -= 0x10000;
  7609. highSurrogate = (codePoint >> 10) + 0xD800;
  7610. lowSurrogate = codePoint % 0x400 + 0xDC00;
  7611. codeUnits.push(highSurrogate, lowSurrogate);
  7612. }
  7613. if (index + 1 === length || codeUnits.length > MAX_SIZE) {
  7614. result += stringFromCharCode.apply(null, codeUnits);
  7615. codeUnits.length = 0;
  7616. }
  7617. }
  7618. return result;
  7619. };
  7620. /* istanbul ignore next */
  7621. if (Object.defineProperty) {
  7622. Object.defineProperty(String, 'fromCodePoint', {
  7623. value: fromCodePoint,
  7624. configurable: true,
  7625. writable: true
  7626. });
  7627. } else {
  7628. String.fromCodePoint = fromCodePoint;
  7629. }
  7630. })();
  7631. }
  7632. })( false ? undefined : exports);
  7633. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buffer/index.js */ "./node_modules/buffer/index.js").Buffer))
  7634. /***/ }),
  7635. /***/ "./node_modules/setimmediate/setImmediate.js":
  7636. /*!***************************************************!*\
  7637. !*** ./node_modules/setimmediate/setImmediate.js ***!
  7638. \***************************************************/
  7639. /*! no static exports found */
  7640. /***/ (function(module, exports, __webpack_require__) {
  7641. /* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {
  7642. "use strict";
  7643. if (global.setImmediate) {
  7644. return;
  7645. }
  7646. var nextHandle = 1; // Spec says greater than zero
  7647. var tasksByHandle = {};
  7648. var currentlyRunningATask = false;
  7649. var doc = global.document;
  7650. var registerImmediate;
  7651. function setImmediate(callback) {
  7652. // Callback can either be a function or a string
  7653. if (typeof callback !== "function") {
  7654. callback = new Function("" + callback);
  7655. }
  7656. // Copy function arguments
  7657. var args = new Array(arguments.length - 1);
  7658. for (var i = 0; i < args.length; i++) {
  7659. args[i] = arguments[i + 1];
  7660. }
  7661. // Store and register the task
  7662. var task = {
  7663. callback: callback,
  7664. args: args
  7665. };
  7666. tasksByHandle[nextHandle] = task;
  7667. registerImmediate(nextHandle);
  7668. return nextHandle++;
  7669. }
  7670. function clearImmediate(handle) {
  7671. delete tasksByHandle[handle];
  7672. }
  7673. function run(task) {
  7674. var callback = task.callback;
  7675. var args = task.args;
  7676. switch (args.length) {
  7677. case 0:
  7678. callback();
  7679. break;
  7680. case 1:
  7681. callback(args[0]);
  7682. break;
  7683. case 2:
  7684. callback(args[0], args[1]);
  7685. break;
  7686. case 3:
  7687. callback(args[0], args[1], args[2]);
  7688. break;
  7689. default:
  7690. callback.apply(undefined, args);
  7691. break;
  7692. }
  7693. }
  7694. function runIfPresent(handle) {
  7695. // From the spec: "Wait until any invocations of this algorithm started before this one have completed."
  7696. // So if we're currently running a task, we'll need to delay this invocation.
  7697. if (currentlyRunningATask) {
  7698. // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a
  7699. // "too much recursion" error.
  7700. setTimeout(runIfPresent, 0, handle);
  7701. } else {
  7702. var task = tasksByHandle[handle];
  7703. if (task) {
  7704. currentlyRunningATask = true;
  7705. try {
  7706. run(task);
  7707. } finally {
  7708. clearImmediate(handle);
  7709. currentlyRunningATask = false;
  7710. }
  7711. }
  7712. }
  7713. }
  7714. function installNextTickImplementation() {
  7715. registerImmediate = function registerImmediate(handle) {
  7716. process.nextTick(function () {
  7717. runIfPresent(handle);
  7718. });
  7719. };
  7720. }
  7721. function canUsePostMessage() {
  7722. // The test against `importScripts` prevents this implementation from being installed inside a web worker,
  7723. // where `global.postMessage` means something completely different and can't be used for this purpose.
  7724. if (global.postMessage && !global.importScripts) {
  7725. var postMessageIsAsynchronous = true;
  7726. var oldOnMessage = global.onmessage;
  7727. global.onmessage = function () {
  7728. postMessageIsAsynchronous = false;
  7729. };
  7730. global.postMessage("", "*");
  7731. global.onmessage = oldOnMessage;
  7732. return postMessageIsAsynchronous;
  7733. }
  7734. }
  7735. function installPostMessageImplementation() {
  7736. // Installs an event handler on `global` for the `message` event: see
  7737. // * https://developer.mozilla.org/en/DOM/window.postMessage
  7738. // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages
  7739. var messagePrefix = "setImmediate$" + Math.random() + "$";
  7740. var onGlobalMessage = function onGlobalMessage(event) {
  7741. if (event.source === global && typeof event.data === "string" && event.data.indexOf(messagePrefix) === 0) {
  7742. runIfPresent(+event.data.slice(messagePrefix.length));
  7743. }
  7744. };
  7745. if (global.addEventListener) {
  7746. global.addEventListener("message", onGlobalMessage, false);
  7747. } else {
  7748. global.attachEvent("onmessage", onGlobalMessage);
  7749. }
  7750. registerImmediate = function registerImmediate(handle) {
  7751. global.postMessage(messagePrefix + handle, "*");
  7752. };
  7753. }
  7754. function installMessageChannelImplementation() {
  7755. var channel = new MessageChannel();
  7756. channel.port1.onmessage = function (event) {
  7757. var handle = event.data;
  7758. runIfPresent(handle);
  7759. };
  7760. registerImmediate = function registerImmediate(handle) {
  7761. channel.port2.postMessage(handle);
  7762. };
  7763. }
  7764. function installReadyStateChangeImplementation() {
  7765. var html = doc.documentElement;
  7766. registerImmediate = function registerImmediate(handle) {
  7767. // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted
  7768. // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.
  7769. var script = doc.createElement("script");
  7770. script.onreadystatechange = function () {
  7771. runIfPresent(handle);
  7772. script.onreadystatechange = null;
  7773. html.removeChild(script);
  7774. script = null;
  7775. };
  7776. html.appendChild(script);
  7777. };
  7778. }
  7779. function installSetTimeoutImplementation() {
  7780. registerImmediate = function registerImmediate(handle) {
  7781. setTimeout(runIfPresent, 0, handle);
  7782. };
  7783. }
  7784. // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.
  7785. var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);
  7786. attachTo = attachTo && attachTo.setTimeout ? attachTo : global;
  7787. // Don't get fooled by e.g. browserify environments.
  7788. if ({}.toString.call(global.process) === "[object process]") {
  7789. // For Node.js before 0.9
  7790. installNextTickImplementation();
  7791. } else if (canUsePostMessage()) {
  7792. // For non-IE10 modern browsers
  7793. installPostMessageImplementation();
  7794. } else if (global.MessageChannel) {
  7795. // For web workers, where supported
  7796. installMessageChannelImplementation();
  7797. } else if (doc && "onreadystatechange" in doc.createElement("script")) {
  7798. // For IE 6–8
  7799. installReadyStateChangeImplementation();
  7800. } else {
  7801. // For older browsers
  7802. installSetTimeoutImplementation();
  7803. }
  7804. attachTo.setImmediate = setImmediate;
  7805. attachTo.clearImmediate = clearImmediate;
  7806. })(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self);
  7807. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"), __webpack_require__(/*! ./../process/browser.js */ "./node_modules/process/browser.js")))
  7808. /***/ }),
  7809. /***/ "./node_modules/stream-browserify/index.js":
  7810. /*!*************************************************!*\
  7811. !*** ./node_modules/stream-browserify/index.js ***!
  7812. \*************************************************/
  7813. /*! no static exports found */
  7814. /***/ (function(module, exports, __webpack_require__) {
  7815. // Copyright Joyent, Inc. and other Node contributors.
  7816. //
  7817. // Permission is hereby granted, free of charge, to any person obtaining a
  7818. // copy of this software and associated documentation files (the
  7819. // "Software"), to deal in the Software without restriction, including
  7820. // without limitation the rights to use, copy, modify, merge, publish,
  7821. // distribute, sublicense, and/or sell copies of the Software, and to permit
  7822. // persons to whom the Software is furnished to do so, subject to the
  7823. // following conditions:
  7824. //
  7825. // The above copyright notice and this permission notice shall be included
  7826. // in all copies or substantial portions of the Software.
  7827. //
  7828. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  7829. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  7830. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  7831. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  7832. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  7833. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  7834. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  7835. module.exports = Stream;
  7836. var EE = __webpack_require__(/*! events */ "./node_modules/events/events.js").EventEmitter;
  7837. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
  7838. inherits(Stream, EE);
  7839. Stream.Readable = __webpack_require__(/*! readable-stream/readable.js */ "./node_modules/readable-stream/readable-browser.js");
  7840. Stream.Writable = __webpack_require__(/*! readable-stream/writable.js */ "./node_modules/readable-stream/writable-browser.js");
  7841. Stream.Duplex = __webpack_require__(/*! readable-stream/duplex.js */ "./node_modules/readable-stream/duplex-browser.js");
  7842. Stream.Transform = __webpack_require__(/*! readable-stream/transform.js */ "./node_modules/readable-stream/transform.js");
  7843. Stream.PassThrough = __webpack_require__(/*! readable-stream/passthrough.js */ "./node_modules/readable-stream/passthrough.js");
  7844. // Backwards-compat with node 0.4.x
  7845. Stream.Stream = Stream;
  7846. // old-style streams. Note that the pipe method (the only relevant
  7847. // part of this class) is overridden in the Readable class.
  7848. function Stream() {
  7849. EE.call(this);
  7850. }
  7851. Stream.prototype.pipe = function (dest, options) {
  7852. var source = this;
  7853. function ondata(chunk) {
  7854. if (dest.writable) {
  7855. if (false === dest.write(chunk) && source.pause) {
  7856. source.pause();
  7857. }
  7858. }
  7859. }
  7860. source.on('data', ondata);
  7861. function ondrain() {
  7862. if (source.readable && source.resume) {
  7863. source.resume();
  7864. }
  7865. }
  7866. dest.on('drain', ondrain);
  7867. // If the 'end' option is not supplied, dest.end() will be called when
  7868. // source gets the 'end' or 'close' events. Only dest.end() once.
  7869. if (!dest._isStdio && (!options || options.end !== false)) {
  7870. source.on('end', onend);
  7871. source.on('close', onclose);
  7872. }
  7873. var didOnEnd = false;
  7874. function onend() {
  7875. if (didOnEnd) return;
  7876. didOnEnd = true;
  7877. dest.end();
  7878. }
  7879. function onclose() {
  7880. if (didOnEnd) return;
  7881. didOnEnd = true;
  7882. if (typeof dest.destroy === 'function') dest.destroy();
  7883. }
  7884. // don't leave dangling pipes when there are errors.
  7885. function onerror(er) {
  7886. cleanup();
  7887. if (EE.listenerCount(this, 'error') === 0) {
  7888. throw er; // Unhandled stream error in pipe.
  7889. }
  7890. }
  7891. source.on('error', onerror);
  7892. dest.on('error', onerror);
  7893. // remove all the event listeners that were added.
  7894. function cleanup() {
  7895. source.removeListener('data', ondata);
  7896. dest.removeListener('drain', ondrain);
  7897. source.removeListener('end', onend);
  7898. source.removeListener('close', onclose);
  7899. source.removeListener('error', onerror);
  7900. dest.removeListener('error', onerror);
  7901. source.removeListener('end', cleanup);
  7902. source.removeListener('close', cleanup);
  7903. dest.removeListener('close', cleanup);
  7904. }
  7905. source.on('end', cleanup);
  7906. source.on('close', cleanup);
  7907. dest.on('close', cleanup);
  7908. dest.emit('pipe', source);
  7909. // Allow for unix-like usage: A.pipe(B).pipe(C)
  7910. return dest;
  7911. };
  7912. /***/ }),
  7913. /***/ "./node_modules/stream-http/index.js":
  7914. /*!*******************************************!*\
  7915. !*** ./node_modules/stream-http/index.js ***!
  7916. \*******************************************/
  7917. /*! no static exports found */
  7918. /***/ (function(module, exports, __webpack_require__) {
  7919. /* WEBPACK VAR INJECTION */(function(global) {var ClientRequest = __webpack_require__(/*! ./lib/request */ "./node_modules/stream-http/lib/request.js");
  7920. var response = __webpack_require__(/*! ./lib/response */ "./node_modules/stream-http/lib/response.js");
  7921. var extend = __webpack_require__(/*! xtend */ "./node_modules/xtend/immutable.js");
  7922. var statusCodes = __webpack_require__(/*! builtin-status-codes */ "./node_modules/builtin-status-codes/browser.js");
  7923. var url = __webpack_require__(/*! url */ "./node_modules/url/url.js");
  7924. var http = exports;
  7925. http.request = function (opts, cb) {
  7926. if (typeof opts === 'string') opts = url.parse(opts);else opts = extend(opts);
  7927. // Normally, the page is loaded from http or https, so not specifying a protocol
  7928. // will result in a (valid) protocol-relative url. However, this won't work if
  7929. // the protocol is something else, like 'file:'
  7930. var defaultProtocol = global.location.protocol.search(/^https?:$/) === -1 ? 'http:' : '';
  7931. var protocol = opts.protocol || defaultProtocol;
  7932. var host = opts.hostname || opts.host;
  7933. var port = opts.port;
  7934. var path = opts.path || '/';
  7935. // Necessary for IPv6 addresses
  7936. if (host && host.indexOf(':') !== -1) host = '[' + host + ']';
  7937. // This may be a relative url. The browser should always be able to interpret it correctly.
  7938. opts.url = (host ? protocol + '//' + host : '') + (port ? ':' + port : '') + path;
  7939. opts.method = (opts.method || 'GET').toUpperCase();
  7940. opts.headers = opts.headers || {};
  7941. // Also valid opts.auth, opts.mode
  7942. var req = new ClientRequest(opts);
  7943. if (cb) req.on('response', cb);
  7944. return req;
  7945. };
  7946. http.get = function get(opts, cb) {
  7947. var req = http.request(opts, cb);
  7948. req.end();
  7949. return req;
  7950. };
  7951. http.ClientRequest = ClientRequest;
  7952. http.IncomingMessage = response.IncomingMessage;
  7953. http.Agent = function () {};
  7954. http.Agent.defaultMaxSockets = 4;
  7955. http.globalAgent = new http.Agent();
  7956. http.STATUS_CODES = statusCodes;
  7957. http.METHODS = ['CHECKOUT', 'CONNECT', 'COPY', 'DELETE', 'GET', 'HEAD', 'LOCK', 'M-SEARCH', 'MERGE', 'MKACTIVITY', 'MKCOL', 'MOVE', 'NOTIFY', 'OPTIONS', 'PATCH', 'POST', 'PROPFIND', 'PROPPATCH', 'PURGE', 'PUT', 'REPORT', 'SEARCH', 'SUBSCRIBE', 'TRACE', 'UNLOCK', 'UNSUBSCRIBE'];
  7958. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  7959. /***/ }),
  7960. /***/ "./node_modules/stream-http/lib/capability.js":
  7961. /*!****************************************************!*\
  7962. !*** ./node_modules/stream-http/lib/capability.js ***!
  7963. \****************************************************/
  7964. /*! no static exports found */
  7965. /***/ (function(module, exports, __webpack_require__) {
  7966. /* WEBPACK VAR INJECTION */(function(global) {exports.fetch = isFunction(global.fetch) && isFunction(global.ReadableStream);
  7967. exports.writableStream = isFunction(global.WritableStream);
  7968. exports.abortController = isFunction(global.AbortController);
  7969. exports.blobConstructor = false;
  7970. try {
  7971. new Blob([new ArrayBuffer(1)]);
  7972. exports.blobConstructor = true;
  7973. } catch (e) {}
  7974. // The xhr request to example.com may violate some restrictive CSP configurations,
  7975. // so if we're running in a browser that supports `fetch`, avoid calling getXHR()
  7976. // and assume support for certain features below.
  7977. var xhr;
  7978. function getXHR() {
  7979. // Cache the xhr value
  7980. if (xhr !== undefined) return xhr;
  7981. if (global.XMLHttpRequest) {
  7982. xhr = new global.XMLHttpRequest();
  7983. // If XDomainRequest is available (ie only, where xhr might not work
  7984. // cross domain), use the page location. Otherwise use example.com
  7985. // Note: this doesn't actually make an http request.
  7986. try {
  7987. xhr.open('GET', global.XDomainRequest ? '/' : 'https://example.com');
  7988. } catch (e) {
  7989. xhr = null;
  7990. }
  7991. } else {
  7992. // Service workers don't have XHR
  7993. xhr = null;
  7994. }
  7995. return xhr;
  7996. }
  7997. function checkTypeSupport(type) {
  7998. var xhr = getXHR();
  7999. if (!xhr) return false;
  8000. try {
  8001. xhr.responseType = type;
  8002. return xhr.responseType === type;
  8003. } catch (e) {}
  8004. return false;
  8005. }
  8006. // For some strange reason, Safari 7.0 reports typeof global.ArrayBuffer === 'object'.
  8007. // Safari 7.1 appears to have fixed this bug.
  8008. var haveArrayBuffer = typeof global.ArrayBuffer !== 'undefined';
  8009. var haveSlice = haveArrayBuffer && isFunction(global.ArrayBuffer.prototype.slice);
  8010. // If fetch is supported, then arraybuffer will be supported too. Skip calling
  8011. // checkTypeSupport(), since that calls getXHR().
  8012. exports.arraybuffer = exports.fetch || haveArrayBuffer && checkTypeSupport('arraybuffer');
  8013. // These next two tests unavoidably show warnings in Chrome. Since fetch will always
  8014. // be used if it's available, just return false for these to avoid the warnings.
  8015. exports.msstream = !exports.fetch && haveSlice && checkTypeSupport('ms-stream');
  8016. exports.mozchunkedarraybuffer = !exports.fetch && haveArrayBuffer && checkTypeSupport('moz-chunked-arraybuffer');
  8017. // If fetch is supported, then overrideMimeType will be supported too. Skip calling
  8018. // getXHR().
  8019. exports.overrideMimeType = exports.fetch || (getXHR() ? isFunction(getXHR().overrideMimeType) : false);
  8020. exports.vbArray = isFunction(global.VBArray);
  8021. function isFunction(value) {
  8022. return typeof value === 'function';
  8023. }
  8024. xhr = null; // Help gc
  8025. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  8026. /***/ }),
  8027. /***/ "./node_modules/stream-http/lib/request.js":
  8028. /*!*************************************************!*\
  8029. !*** ./node_modules/stream-http/lib/request.js ***!
  8030. \*************************************************/
  8031. /*! no static exports found */
  8032. /***/ (function(module, exports, __webpack_require__) {
  8033. /* WEBPACK VAR INJECTION */(function(Buffer, global, process) {var capability = __webpack_require__(/*! ./capability */ "./node_modules/stream-http/lib/capability.js");
  8034. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
  8035. var response = __webpack_require__(/*! ./response */ "./node_modules/stream-http/lib/response.js");
  8036. var stream = __webpack_require__(/*! readable-stream */ "./node_modules/readable-stream/readable-browser.js");
  8037. var toArrayBuffer = __webpack_require__(/*! to-arraybuffer */ "./node_modules/to-arraybuffer/index.js");
  8038. var IncomingMessage = response.IncomingMessage;
  8039. var rStates = response.readyStates;
  8040. function decideMode(preferBinary, useFetch) {
  8041. if (capability.fetch && useFetch) {
  8042. return 'fetch';
  8043. } else if (capability.mozchunkedarraybuffer) {
  8044. return 'moz-chunked-arraybuffer';
  8045. } else if (capability.msstream) {
  8046. return 'ms-stream';
  8047. } else if (capability.arraybuffer && preferBinary) {
  8048. return 'arraybuffer';
  8049. } else if (capability.vbArray && preferBinary) {
  8050. return 'text:vbarray';
  8051. } else {
  8052. return 'text';
  8053. }
  8054. }
  8055. var ClientRequest = module.exports = function (opts) {
  8056. var self = this;
  8057. stream.Writable.call(self);
  8058. self._opts = opts;
  8059. self._body = [];
  8060. self._headers = {};
  8061. if (opts.auth) self.setHeader('Authorization', 'Basic ' + new Buffer(opts.auth).toString('base64'));
  8062. Object.keys(opts.headers).forEach(function (name) {
  8063. self.setHeader(name, opts.headers[name]);
  8064. });
  8065. var preferBinary;
  8066. var useFetch = true;
  8067. if (opts.mode === 'disable-fetch' || 'requestTimeout' in opts && !capability.abortController) {
  8068. // If the use of XHR should be preferred. Not typically needed.
  8069. useFetch = false;
  8070. preferBinary = true;
  8071. } else if (opts.mode === 'prefer-streaming') {
  8072. // If streaming is a high priority but binary compatibility and
  8073. // the accuracy of the 'content-type' header aren't
  8074. preferBinary = false;
  8075. } else if (opts.mode === 'allow-wrong-content-type') {
  8076. // If streaming is more important than preserving the 'content-type' header
  8077. preferBinary = !capability.overrideMimeType;
  8078. } else if (!opts.mode || opts.mode === 'default' || opts.mode === 'prefer-fast') {
  8079. // Use binary if text streaming may corrupt data or the content-type header, or for speed
  8080. preferBinary = true;
  8081. } else {
  8082. throw new Error('Invalid value for opts.mode');
  8083. }
  8084. self._mode = decideMode(preferBinary, useFetch);
  8085. self._fetchTimer = null;
  8086. self.on('finish', function () {
  8087. self._onFinish();
  8088. });
  8089. };
  8090. inherits(ClientRequest, stream.Writable);
  8091. ClientRequest.prototype.setHeader = function (name, value) {
  8092. var self = this;
  8093. var lowerName = name.toLowerCase();
  8094. // This check is not necessary, but it prevents warnings from browsers about setting unsafe
  8095. // headers. To be honest I'm not entirely sure hiding these warnings is a good thing, but
  8096. // http-browserify did it, so I will too.
  8097. if (unsafeHeaders.indexOf(lowerName) !== -1) return;
  8098. self._headers[lowerName] = {
  8099. name: name,
  8100. value: value
  8101. };
  8102. };
  8103. ClientRequest.prototype.getHeader = function (name) {
  8104. var header = this._headers[name.toLowerCase()];
  8105. if (header) return header.value;
  8106. return null;
  8107. };
  8108. ClientRequest.prototype.removeHeader = function (name) {
  8109. var self = this;
  8110. delete self._headers[name.toLowerCase()];
  8111. };
  8112. ClientRequest.prototype._onFinish = function () {
  8113. var self = this;
  8114. if (self._destroyed) return;
  8115. var opts = self._opts;
  8116. var headersObj = self._headers;
  8117. var body = null;
  8118. if (opts.method !== 'GET' && opts.method !== 'HEAD') {
  8119. if (capability.arraybuffer) {
  8120. body = toArrayBuffer(Buffer.concat(self._body));
  8121. } else if (capability.blobConstructor) {
  8122. body = new global.Blob(self._body.map(function (buffer) {
  8123. return toArrayBuffer(buffer);
  8124. }), {
  8125. type: (headersObj['content-type'] || {}).value || ''
  8126. });
  8127. } else {
  8128. // get utf8 string
  8129. body = Buffer.concat(self._body).toString();
  8130. }
  8131. }
  8132. // create flattened list of headers
  8133. var headersList = [];
  8134. Object.keys(headersObj).forEach(function (keyName) {
  8135. var name = headersObj[keyName].name;
  8136. var value = headersObj[keyName].value;
  8137. if (Array.isArray(value)) {
  8138. value.forEach(function (v) {
  8139. headersList.push([name, v]);
  8140. });
  8141. } else {
  8142. headersList.push([name, value]);
  8143. }
  8144. });
  8145. if (self._mode === 'fetch') {
  8146. var signal = null;
  8147. var fetchTimer = null;
  8148. if (capability.abortController) {
  8149. var controller = new AbortController();
  8150. signal = controller.signal;
  8151. self._fetchAbortController = controller;
  8152. if ('requestTimeout' in opts && opts.requestTimeout !== 0) {
  8153. self._fetchTimer = global.setTimeout(function () {
  8154. self.emit('requestTimeout');
  8155. if (self._fetchAbortController) self._fetchAbortController.abort();
  8156. }, opts.requestTimeout);
  8157. }
  8158. }
  8159. global.fetch(self._opts.url, {
  8160. method: self._opts.method,
  8161. headers: headersList,
  8162. body: body || undefined,
  8163. mode: 'cors',
  8164. credentials: opts.withCredentials ? 'include' : 'same-origin',
  8165. signal: signal
  8166. }).then(function (response) {
  8167. self._fetchResponse = response;
  8168. self._connect();
  8169. }, function (reason) {
  8170. global.clearTimeout(self._fetchTimer);
  8171. if (!self._destroyed) self.emit('error', reason);
  8172. });
  8173. } else {
  8174. var xhr = self._xhr = new global.XMLHttpRequest();
  8175. try {
  8176. xhr.open(self._opts.method, self._opts.url, true);
  8177. } catch (err) {
  8178. process.nextTick(function () {
  8179. self.emit('error', err);
  8180. });
  8181. return;
  8182. }
  8183. // Can't set responseType on really old browsers
  8184. if ('responseType' in xhr) xhr.responseType = self._mode.split(':')[0];
  8185. if ('withCredentials' in xhr) xhr.withCredentials = !!opts.withCredentials;
  8186. if (self._mode === 'text' && 'overrideMimeType' in xhr) xhr.overrideMimeType('text/plain; charset=x-user-defined');
  8187. if ('requestTimeout' in opts) {
  8188. xhr.timeout = opts.requestTimeout;
  8189. xhr.ontimeout = function () {
  8190. self.emit('requestTimeout');
  8191. };
  8192. }
  8193. headersList.forEach(function (header) {
  8194. xhr.setRequestHeader(header[0], header[1]);
  8195. });
  8196. self._response = null;
  8197. xhr.onreadystatechange = function () {
  8198. switch (xhr.readyState) {
  8199. case rStates.LOADING:
  8200. case rStates.DONE:
  8201. self._onXHRProgress();
  8202. break;
  8203. }
  8204. };
  8205. // Necessary for streaming in Firefox, since xhr.response is ONLY defined
  8206. // in onprogress, not in onreadystatechange with xhr.readyState = 3
  8207. if (self._mode === 'moz-chunked-arraybuffer') {
  8208. xhr.onprogress = function () {
  8209. self._onXHRProgress();
  8210. };
  8211. }
  8212. xhr.onerror = function () {
  8213. if (self._destroyed) return;
  8214. self.emit('error', new Error('XHR error'));
  8215. };
  8216. try {
  8217. xhr.send(body);
  8218. } catch (err) {
  8219. process.nextTick(function () {
  8220. self.emit('error', err);
  8221. });
  8222. return;
  8223. }
  8224. }
  8225. };
  8226. /**
  8227. * Checks if xhr.status is readable and non-zero, indicating no error.
  8228. * Even though the spec says it should be available in readyState 3,
  8229. * accessing it throws an exception in IE8
  8230. */
  8231. function statusValid(xhr) {
  8232. try {
  8233. var status = xhr.status;
  8234. return status !== null && status !== 0;
  8235. } catch (e) {
  8236. return false;
  8237. }
  8238. }
  8239. ClientRequest.prototype._onXHRProgress = function () {
  8240. var self = this;
  8241. if (!statusValid(self._xhr) || self._destroyed) return;
  8242. if (!self._response) self._connect();
  8243. self._response._onXHRProgress();
  8244. };
  8245. ClientRequest.prototype._connect = function () {
  8246. var self = this;
  8247. if (self._destroyed) return;
  8248. self._response = new IncomingMessage(self._xhr, self._fetchResponse, self._mode, self._fetchTimer);
  8249. self._response.on('error', function (err) {
  8250. self.emit('error', err);
  8251. });
  8252. self.emit('response', self._response);
  8253. };
  8254. ClientRequest.prototype._write = function (chunk, encoding, cb) {
  8255. var self = this;
  8256. self._body.push(chunk);
  8257. cb();
  8258. };
  8259. ClientRequest.prototype.abort = ClientRequest.prototype.destroy = function () {
  8260. var self = this;
  8261. self._destroyed = true;
  8262. global.clearTimeout(self._fetchTimer);
  8263. if (self._response) self._response._destroyed = true;
  8264. if (self._xhr) self._xhr.abort();else if (self._fetchAbortController) self._fetchAbortController.abort();
  8265. };
  8266. ClientRequest.prototype.end = function (data, encoding, cb) {
  8267. var self = this;
  8268. if (typeof data === 'function') {
  8269. cb = data;
  8270. data = undefined;
  8271. }
  8272. stream.Writable.prototype.end.call(self, data, encoding, cb);
  8273. };
  8274. ClientRequest.prototype.flushHeaders = function () {};
  8275. ClientRequest.prototype.setTimeout = function () {};
  8276. ClientRequest.prototype.setNoDelay = function () {};
  8277. ClientRequest.prototype.setSocketKeepAlive = function () {};
  8278. // Taken from http://www.w3.org/TR/XMLHttpRequest/#the-setrequestheader%28%29-method
  8279. var unsafeHeaders = ['accept-charset', 'accept-encoding', 'access-control-request-headers', 'access-control-request-method', 'connection', 'content-length', 'cookie', 'cookie2', 'date', 'dnt', 'expect', 'host', 'keep-alive', 'origin', 'referer', 'te', 'trailer', 'transfer-encoding', 'upgrade', 'via'];
  8280. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buffer/index.js */ "./node_modules/buffer/index.js").Buffer, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"), __webpack_require__(/*! ./../../process/browser.js */ "./node_modules/process/browser.js")))
  8281. /***/ }),
  8282. /***/ "./node_modules/stream-http/lib/response.js":
  8283. /*!**************************************************!*\
  8284. !*** ./node_modules/stream-http/lib/response.js ***!
  8285. \**************************************************/
  8286. /*! no static exports found */
  8287. /***/ (function(module, exports, __webpack_require__) {
  8288. /* WEBPACK VAR INJECTION */(function(process, global, Buffer) {var capability = __webpack_require__(/*! ./capability */ "./node_modules/stream-http/lib/capability.js");
  8289. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
  8290. var stream = __webpack_require__(/*! readable-stream */ "./node_modules/readable-stream/readable-browser.js");
  8291. var rStates = exports.readyStates = {
  8292. UNSENT: 0,
  8293. OPENED: 1,
  8294. HEADERS_RECEIVED: 2,
  8295. LOADING: 3,
  8296. DONE: 4
  8297. };
  8298. var IncomingMessage = exports.IncomingMessage = function (xhr, response, mode, fetchTimer) {
  8299. var self = this;
  8300. stream.Readable.call(self);
  8301. self._mode = mode;
  8302. self.headers = {};
  8303. self.rawHeaders = [];
  8304. self.trailers = {};
  8305. self.rawTrailers = [];
  8306. // Fake the 'close' event, but only once 'end' fires
  8307. self.on('end', function () {
  8308. // The nextTick is necessary to prevent the 'request' module from causing an infinite loop
  8309. process.nextTick(function () {
  8310. self.emit('close');
  8311. });
  8312. });
  8313. if (mode === 'fetch') {
  8314. var read = function read() {
  8315. reader.read().then(function (result) {
  8316. if (self._destroyed) return;
  8317. if (result.done) {
  8318. global.clearTimeout(fetchTimer);
  8319. self.push(null);
  8320. return;
  8321. }
  8322. self.push(new Buffer(result.value));
  8323. read();
  8324. })["catch"](function (err) {
  8325. global.clearTimeout(fetchTimer);
  8326. if (!self._destroyed) self.emit('error', err);
  8327. });
  8328. };
  8329. self._fetchResponse = response;
  8330. self.url = response.url;
  8331. self.statusCode = response.status;
  8332. self.statusMessage = response.statusText;
  8333. response.headers.forEach(function (header, key) {
  8334. self.headers[key.toLowerCase()] = header;
  8335. self.rawHeaders.push(key, header);
  8336. });
  8337. if (capability.writableStream) {
  8338. var writable = new WritableStream({
  8339. write: function write(chunk) {
  8340. return new Promise(function (resolve, reject) {
  8341. if (self._destroyed) {
  8342. reject();
  8343. } else if (self.push(new Buffer(chunk))) {
  8344. resolve();
  8345. } else {
  8346. self._resumeFetch = resolve;
  8347. }
  8348. });
  8349. },
  8350. close: function close() {
  8351. global.clearTimeout(fetchTimer);
  8352. if (!self._destroyed) self.push(null);
  8353. },
  8354. abort: function abort(err) {
  8355. if (!self._destroyed) self.emit('error', err);
  8356. }
  8357. });
  8358. try {
  8359. response.body.pipeTo(writable)["catch"](function (err) {
  8360. global.clearTimeout(fetchTimer);
  8361. if (!self._destroyed) self.emit('error', err);
  8362. });
  8363. return;
  8364. } catch (e) {} // pipeTo method isn't defined. Can't find a better way to feature test this
  8365. }
  8366. // fallback for when writableStream or pipeTo aren't available
  8367. var reader = response.body.getReader();
  8368. read();
  8369. } else {
  8370. self._xhr = xhr;
  8371. self._pos = 0;
  8372. self.url = xhr.responseURL;
  8373. self.statusCode = xhr.status;
  8374. self.statusMessage = xhr.statusText;
  8375. var headers = xhr.getAllResponseHeaders().split(/\r?\n/);
  8376. headers.forEach(function (header) {
  8377. var matches = header.match(/^([^:]+):\s*(.*)/);
  8378. if (matches) {
  8379. var key = matches[1].toLowerCase();
  8380. if (key === 'set-cookie') {
  8381. if (self.headers[key] === undefined) {
  8382. self.headers[key] = [];
  8383. }
  8384. self.headers[key].push(matches[2]);
  8385. } else if (self.headers[key] !== undefined) {
  8386. self.headers[key] += ', ' + matches[2];
  8387. } else {
  8388. self.headers[key] = matches[2];
  8389. }
  8390. self.rawHeaders.push(matches[1], matches[2]);
  8391. }
  8392. });
  8393. self._charset = 'x-user-defined';
  8394. if (!capability.overrideMimeType) {
  8395. var mimeType = self.rawHeaders['mime-type'];
  8396. if (mimeType) {
  8397. var charsetMatch = mimeType.match(/;\s*charset=([^;])(;|$)/);
  8398. if (charsetMatch) {
  8399. self._charset = charsetMatch[1].toLowerCase();
  8400. }
  8401. }
  8402. if (!self._charset) self._charset = 'utf-8'; // best guess
  8403. }
  8404. }
  8405. };
  8406. inherits(IncomingMessage, stream.Readable);
  8407. IncomingMessage.prototype._read = function () {
  8408. var self = this;
  8409. var resolve = self._resumeFetch;
  8410. if (resolve) {
  8411. self._resumeFetch = null;
  8412. resolve();
  8413. }
  8414. };
  8415. IncomingMessage.prototype._onXHRProgress = function () {
  8416. var self = this;
  8417. var xhr = self._xhr;
  8418. var response = null;
  8419. switch (self._mode) {
  8420. case 'text:vbarray':
  8421. // For IE9
  8422. if (xhr.readyState !== rStates.DONE) break;
  8423. try {
  8424. // This fails in IE8
  8425. response = new global.VBArray(xhr.responseBody).toArray();
  8426. } catch (e) {}
  8427. if (response !== null) {
  8428. self.push(new Buffer(response));
  8429. break;
  8430. }
  8431. // Falls through in IE8
  8432. case 'text':
  8433. try {
  8434. // This will fail when readyState = 3 in IE9. Switch mode and wait for readyState = 4
  8435. response = xhr.responseText;
  8436. } catch (e) {
  8437. self._mode = 'text:vbarray';
  8438. break;
  8439. }
  8440. if (response.length > self._pos) {
  8441. var newData = response.substr(self._pos);
  8442. if (self._charset === 'x-user-defined') {
  8443. var buffer = new Buffer(newData.length);
  8444. for (var i = 0; i < newData.length; i++) buffer[i] = newData.charCodeAt(i) & 0xff;
  8445. self.push(buffer);
  8446. } else {
  8447. self.push(newData, self._charset);
  8448. }
  8449. self._pos = response.length;
  8450. }
  8451. break;
  8452. case 'arraybuffer':
  8453. if (xhr.readyState !== rStates.DONE || !xhr.response) break;
  8454. response = xhr.response;
  8455. self.push(new Buffer(new Uint8Array(response)));
  8456. break;
  8457. case 'moz-chunked-arraybuffer':
  8458. // take whole
  8459. response = xhr.response;
  8460. if (xhr.readyState !== rStates.LOADING || !response) break;
  8461. self.push(new Buffer(new Uint8Array(response)));
  8462. break;
  8463. case 'ms-stream':
  8464. response = xhr.response;
  8465. if (xhr.readyState !== rStates.LOADING) break;
  8466. var reader = new global.MSStreamReader();
  8467. reader.onprogress = function () {
  8468. if (reader.result.byteLength > self._pos) {
  8469. self.push(new Buffer(new Uint8Array(reader.result.slice(self._pos))));
  8470. self._pos = reader.result.byteLength;
  8471. }
  8472. };
  8473. reader.onload = function () {
  8474. self.push(null);
  8475. };
  8476. // reader.onerror = ??? // TODO: this
  8477. reader.readAsArrayBuffer(response);
  8478. break;
  8479. }
  8480. // The ms-stream case handles end separately in reader.onload()
  8481. if (self._xhr.readyState === rStates.DONE && self._mode !== 'ms-stream') {
  8482. self.push(null);
  8483. }
  8484. };
  8485. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"), __webpack_require__(/*! ./../../buffer/index.js */ "./node_modules/buffer/index.js").Buffer))
  8486. /***/ }),
  8487. /***/ "./node_modules/string_decoder/lib/string_decoder.js":
  8488. /*!***********************************************************!*\
  8489. !*** ./node_modules/string_decoder/lib/string_decoder.js ***!
  8490. \***********************************************************/
  8491. /*! no static exports found */
  8492. /***/ (function(module, exports, __webpack_require__) {
  8493. "use strict";
  8494. // Copyright Joyent, Inc. and other Node contributors.
  8495. //
  8496. // Permission is hereby granted, free of charge, to any person obtaining a
  8497. // copy of this software and associated documentation files (the
  8498. // "Software"), to deal in the Software without restriction, including
  8499. // without limitation the rights to use, copy, modify, merge, publish,
  8500. // distribute, sublicense, and/or sell copies of the Software, and to permit
  8501. // persons to whom the Software is furnished to do so, subject to the
  8502. // following conditions:
  8503. //
  8504. // The above copyright notice and this permission notice shall be included
  8505. // in all copies or substantial portions of the Software.
  8506. //
  8507. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  8508. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  8509. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  8510. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  8511. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  8512. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  8513. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  8514. /*<replacement>*/
  8515. var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer;
  8516. /*</replacement>*/
  8517. var isEncoding = Buffer.isEncoding || function (encoding) {
  8518. encoding = '' + encoding;
  8519. switch (encoding && encoding.toLowerCase()) {
  8520. case 'hex':
  8521. case 'utf8':
  8522. case 'utf-8':
  8523. case 'ascii':
  8524. case 'binary':
  8525. case 'base64':
  8526. case 'ucs2':
  8527. case 'ucs-2':
  8528. case 'utf16le':
  8529. case 'utf-16le':
  8530. case 'raw':
  8531. return true;
  8532. default:
  8533. return false;
  8534. }
  8535. };
  8536. function _normalizeEncoding(enc) {
  8537. if (!enc) return 'utf8';
  8538. var retried;
  8539. while (true) {
  8540. switch (enc) {
  8541. case 'utf8':
  8542. case 'utf-8':
  8543. return 'utf8';
  8544. case 'ucs2':
  8545. case 'ucs-2':
  8546. case 'utf16le':
  8547. case 'utf-16le':
  8548. return 'utf16le';
  8549. case 'latin1':
  8550. case 'binary':
  8551. return 'latin1';
  8552. case 'base64':
  8553. case 'ascii':
  8554. case 'hex':
  8555. return enc;
  8556. default:
  8557. if (retried) return; // undefined
  8558. enc = ('' + enc).toLowerCase();
  8559. retried = true;
  8560. }
  8561. }
  8562. }
  8563. ;
  8564. // Do not cache `Buffer.isEncoding` when checking encoding names as some
  8565. // modules monkey-patch it to support additional encodings
  8566. function normalizeEncoding(enc) {
  8567. var nenc = _normalizeEncoding(enc);
  8568. if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
  8569. return nenc || enc;
  8570. }
  8571. // StringDecoder provides an interface for efficiently splitting a series of
  8572. // buffers into a series of JS strings without breaking apart multi-byte
  8573. // characters.
  8574. exports.StringDecoder = StringDecoder;
  8575. function StringDecoder(encoding) {
  8576. this.encoding = normalizeEncoding(encoding);
  8577. var nb;
  8578. switch (this.encoding) {
  8579. case 'utf16le':
  8580. this.text = utf16Text;
  8581. this.end = utf16End;
  8582. nb = 4;
  8583. break;
  8584. case 'utf8':
  8585. this.fillLast = utf8FillLast;
  8586. nb = 4;
  8587. break;
  8588. case 'base64':
  8589. this.text = base64Text;
  8590. this.end = base64End;
  8591. nb = 3;
  8592. break;
  8593. default:
  8594. this.write = simpleWrite;
  8595. this.end = simpleEnd;
  8596. return;
  8597. }
  8598. this.lastNeed = 0;
  8599. this.lastTotal = 0;
  8600. this.lastChar = Buffer.allocUnsafe(nb);
  8601. }
  8602. StringDecoder.prototype.write = function (buf) {
  8603. if (buf.length === 0) return '';
  8604. var r;
  8605. var i;
  8606. if (this.lastNeed) {
  8607. r = this.fillLast(buf);
  8608. if (r === undefined) return '';
  8609. i = this.lastNeed;
  8610. this.lastNeed = 0;
  8611. } else {
  8612. i = 0;
  8613. }
  8614. if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
  8615. return r || '';
  8616. };
  8617. StringDecoder.prototype.end = utf8End;
  8618. // Returns only complete characters in a Buffer
  8619. StringDecoder.prototype.text = utf8Text;
  8620. // Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
  8621. StringDecoder.prototype.fillLast = function (buf) {
  8622. if (this.lastNeed <= buf.length) {
  8623. buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
  8624. return this.lastChar.toString(this.encoding, 0, this.lastTotal);
  8625. }
  8626. buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
  8627. this.lastNeed -= buf.length;
  8628. };
  8629. // Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
  8630. // continuation byte. If an invalid byte is detected, -2 is returned.
  8631. function utf8CheckByte(_byte) {
  8632. if (_byte <= 0x7F) return 0;else if (_byte >> 5 === 0x06) return 2;else if (_byte >> 4 === 0x0E) return 3;else if (_byte >> 3 === 0x1E) return 4;
  8633. return _byte >> 6 === 0x02 ? -1 : -2;
  8634. }
  8635. // Checks at most 3 bytes at the end of a Buffer in order to detect an
  8636. // incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
  8637. // needed to complete the UTF-8 character (if applicable) are returned.
  8638. function utf8CheckIncomplete(self, buf, i) {
  8639. var j = buf.length - 1;
  8640. if (j < i) return 0;
  8641. var nb = utf8CheckByte(buf[j]);
  8642. if (nb >= 0) {
  8643. if (nb > 0) self.lastNeed = nb - 1;
  8644. return nb;
  8645. }
  8646. if (--j < i || nb === -2) return 0;
  8647. nb = utf8CheckByte(buf[j]);
  8648. if (nb >= 0) {
  8649. if (nb > 0) self.lastNeed = nb - 2;
  8650. return nb;
  8651. }
  8652. if (--j < i || nb === -2) return 0;
  8653. nb = utf8CheckByte(buf[j]);
  8654. if (nb >= 0) {
  8655. if (nb > 0) {
  8656. if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
  8657. }
  8658. return nb;
  8659. }
  8660. return 0;
  8661. }
  8662. // Validates as many continuation bytes for a multi-byte UTF-8 character as
  8663. // needed or are available. If we see a non-continuation byte where we expect
  8664. // one, we "replace" the validated continuation bytes we've seen so far with
  8665. // a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
  8666. // behavior. The continuation byte check is included three times in the case
  8667. // where all of the continuation bytes for a character exist in the same buffer.
  8668. // It is also done this way as a slight performance increase instead of using a
  8669. // loop.
  8670. function utf8CheckExtraBytes(self, buf, p) {
  8671. if ((buf[0] & 0xC0) !== 0x80) {
  8672. self.lastNeed = 0;
  8673. return "\uFFFD";
  8674. }
  8675. if (self.lastNeed > 1 && buf.length > 1) {
  8676. if ((buf[1] & 0xC0) !== 0x80) {
  8677. self.lastNeed = 1;
  8678. return "\uFFFD";
  8679. }
  8680. if (self.lastNeed > 2 && buf.length > 2) {
  8681. if ((buf[2] & 0xC0) !== 0x80) {
  8682. self.lastNeed = 2;
  8683. return "\uFFFD";
  8684. }
  8685. }
  8686. }
  8687. }
  8688. // Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
  8689. function utf8FillLast(buf) {
  8690. var p = this.lastTotal - this.lastNeed;
  8691. var r = utf8CheckExtraBytes(this, buf, p);
  8692. if (r !== undefined) return r;
  8693. if (this.lastNeed <= buf.length) {
  8694. buf.copy(this.lastChar, p, 0, this.lastNeed);
  8695. return this.lastChar.toString(this.encoding, 0, this.lastTotal);
  8696. }
  8697. buf.copy(this.lastChar, p, 0, buf.length);
  8698. this.lastNeed -= buf.length;
  8699. }
  8700. // Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
  8701. // partial character, the character's bytes are buffered until the required
  8702. // number of bytes are available.
  8703. function utf8Text(buf, i) {
  8704. var total = utf8CheckIncomplete(this, buf, i);
  8705. if (!this.lastNeed) return buf.toString('utf8', i);
  8706. this.lastTotal = total;
  8707. var end = buf.length - (total - this.lastNeed);
  8708. buf.copy(this.lastChar, 0, end);
  8709. return buf.toString('utf8', i, end);
  8710. }
  8711. // For UTF-8, a replacement character is added when ending on a partial
  8712. // character.
  8713. function utf8End(buf) {
  8714. var r = buf && buf.length ? this.write(buf) : '';
  8715. if (this.lastNeed) return r + "\uFFFD";
  8716. return r;
  8717. }
  8718. // UTF-16LE typically needs two bytes per character, but even if we have an even
  8719. // number of bytes available, we need to check if we end on a leading/high
  8720. // surrogate. In that case, we need to wait for the next two bytes in order to
  8721. // decode the last character properly.
  8722. function utf16Text(buf, i) {
  8723. if ((buf.length - i) % 2 === 0) {
  8724. var r = buf.toString('utf16le', i);
  8725. if (r) {
  8726. var c = r.charCodeAt(r.length - 1);
  8727. if (c >= 0xD800 && c <= 0xDBFF) {
  8728. this.lastNeed = 2;
  8729. this.lastTotal = 4;
  8730. this.lastChar[0] = buf[buf.length - 2];
  8731. this.lastChar[1] = buf[buf.length - 1];
  8732. return r.slice(0, -1);
  8733. }
  8734. }
  8735. return r;
  8736. }
  8737. this.lastNeed = 1;
  8738. this.lastTotal = 2;
  8739. this.lastChar[0] = buf[buf.length - 1];
  8740. return buf.toString('utf16le', i, buf.length - 1);
  8741. }
  8742. // For UTF-16LE we do not explicitly append special replacement characters if we
  8743. // end on a partial character, we simply let v8 handle that.
  8744. function utf16End(buf) {
  8745. var r = buf && buf.length ? this.write(buf) : '';
  8746. if (this.lastNeed) {
  8747. var end = this.lastTotal - this.lastNeed;
  8748. return r + this.lastChar.toString('utf16le', 0, end);
  8749. }
  8750. return r;
  8751. }
  8752. function base64Text(buf, i) {
  8753. var n = (buf.length - i) % 3;
  8754. if (n === 0) return buf.toString('base64', i);
  8755. this.lastNeed = 3 - n;
  8756. this.lastTotal = 3;
  8757. if (n === 1) {
  8758. this.lastChar[0] = buf[buf.length - 1];
  8759. } else {
  8760. this.lastChar[0] = buf[buf.length - 2];
  8761. this.lastChar[1] = buf[buf.length - 1];
  8762. }
  8763. return buf.toString('base64', i, buf.length - n);
  8764. }
  8765. function base64End(buf) {
  8766. var r = buf && buf.length ? this.write(buf) : '';
  8767. if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
  8768. return r;
  8769. }
  8770. // Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
  8771. function simpleWrite(buf) {
  8772. return buf.toString(this.encoding);
  8773. }
  8774. function simpleEnd(buf) {
  8775. return buf && buf.length ? this.write(buf) : '';
  8776. }
  8777. /***/ }),
  8778. /***/ "./node_modules/timers-browserify/main.js":
  8779. /*!************************************************!*\
  8780. !*** ./node_modules/timers-browserify/main.js ***!
  8781. \************************************************/
  8782. /*! no static exports found */
  8783. /***/ (function(module, exports, __webpack_require__) {
  8784. /* WEBPACK VAR INJECTION */(function(global) {var scope = typeof global !== "undefined" && global || typeof self !== "undefined" && self || window;
  8785. var apply = Function.prototype.apply;
  8786. // DOM APIs, for completeness
  8787. exports.setTimeout = function () {
  8788. return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);
  8789. };
  8790. exports.setInterval = function () {
  8791. return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);
  8792. };
  8793. exports.clearTimeout = exports.clearInterval = function (timeout) {
  8794. if (timeout) {
  8795. timeout.close();
  8796. }
  8797. };
  8798. function Timeout(id, clearFn) {
  8799. this._id = id;
  8800. this._clearFn = clearFn;
  8801. }
  8802. Timeout.prototype.unref = Timeout.prototype.ref = function () {};
  8803. Timeout.prototype.close = function () {
  8804. this._clearFn.call(scope, this._id);
  8805. };
  8806. // Does not start the time, just sets up the members needed.
  8807. exports.enroll = function (item, msecs) {
  8808. clearTimeout(item._idleTimeoutId);
  8809. item._idleTimeout = msecs;
  8810. };
  8811. exports.unenroll = function (item) {
  8812. clearTimeout(item._idleTimeoutId);
  8813. item._idleTimeout = -1;
  8814. };
  8815. exports._unrefActive = exports.active = function (item) {
  8816. clearTimeout(item._idleTimeoutId);
  8817. var msecs = item._idleTimeout;
  8818. if (msecs >= 0) {
  8819. item._idleTimeoutId = setTimeout(function onTimeout() {
  8820. if (item._onTimeout) item._onTimeout();
  8821. }, msecs);
  8822. }
  8823. };
  8824. // setimmediate attaches itself to the global object
  8825. __webpack_require__(/*! setimmediate */ "./node_modules/setimmediate/setImmediate.js");
  8826. // On some exotic environments, it's not clear which object `setimmediate` was
  8827. // able to install onto. Search each possibility in the same order as the
  8828. // `setimmediate` library.
  8829. exports.setImmediate = typeof self !== "undefined" && self.setImmediate || typeof global !== "undefined" && global.setImmediate || this && this.setImmediate;
  8830. exports.clearImmediate = typeof self !== "undefined" && self.clearImmediate || typeof global !== "undefined" && global.clearImmediate || this && this.clearImmediate;
  8831. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  8832. /***/ }),
  8833. /***/ "./node_modules/to-arraybuffer/index.js":
  8834. /*!**********************************************!*\
  8835. !*** ./node_modules/to-arraybuffer/index.js ***!
  8836. \**********************************************/
  8837. /*! no static exports found */
  8838. /***/ (function(module, exports, __webpack_require__) {
  8839. var Buffer = __webpack_require__(/*! buffer */ "./node_modules/buffer/index.js").Buffer;
  8840. module.exports = function (buf) {
  8841. // If the buffer is backed by a Uint8Array, a faster version will work
  8842. if (buf instanceof Uint8Array) {
  8843. // If the buffer isn't a subarray, return the underlying ArrayBuffer
  8844. if (buf.byteOffset === 0 && buf.byteLength === buf.buffer.byteLength) {
  8845. return buf.buffer;
  8846. } else if (typeof buf.buffer.slice === 'function') {
  8847. // Otherwise we need to get a proper copy
  8848. return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
  8849. }
  8850. }
  8851. if (Buffer.isBuffer(buf)) {
  8852. // This is the slow version that will work with any Buffer
  8853. // implementation (even in old browsers)
  8854. var arrayCopy = new Uint8Array(buf.length);
  8855. var len = buf.length;
  8856. for (var i = 0; i < len; i++) {
  8857. arrayCopy[i] = buf[i];
  8858. }
  8859. return arrayCopy.buffer;
  8860. } else {
  8861. throw new Error('Argument must be a Buffer');
  8862. }
  8863. };
  8864. /***/ }),
  8865. /***/ "./node_modules/url/url.js":
  8866. /*!*********************************!*\
  8867. !*** ./node_modules/url/url.js ***!
  8868. \*********************************/
  8869. /*! no static exports found */
  8870. /***/ (function(module, exports, __webpack_require__) {
  8871. "use strict";
  8872. // Copyright Joyent, Inc. and other Node contributors.
  8873. //
  8874. // Permission is hereby granted, free of charge, to any person obtaining a
  8875. // copy of this software and associated documentation files (the
  8876. // "Software"), to deal in the Software without restriction, including
  8877. // without limitation the rights to use, copy, modify, merge, publish,
  8878. // distribute, sublicense, and/or sell copies of the Software, and to permit
  8879. // persons to whom the Software is furnished to do so, subject to the
  8880. // following conditions:
  8881. //
  8882. // The above copyright notice and this permission notice shall be included
  8883. // in all copies or substantial portions of the Software.
  8884. //
  8885. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  8886. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  8887. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  8888. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  8889. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  8890. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  8891. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  8892. function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
  8893. var punycode = __webpack_require__(/*! punycode */ "./node_modules/node-libs-browser/node_modules/punycode/punycode.js");
  8894. var util = __webpack_require__(/*! ./util */ "./node_modules/url/util.js");
  8895. exports.parse = urlParse;
  8896. exports.resolve = urlResolve;
  8897. exports.resolveObject = urlResolveObject;
  8898. exports.format = urlFormat;
  8899. exports.Url = Url;
  8900. function Url() {
  8901. this.protocol = null;
  8902. this.slashes = null;
  8903. this.auth = null;
  8904. this.host = null;
  8905. this.port = null;
  8906. this.hostname = null;
  8907. this.hash = null;
  8908. this.search = null;
  8909. this.query = null;
  8910. this.pathname = null;
  8911. this.path = null;
  8912. this.href = null;
  8913. }
  8914. // Reference: RFC 3986, RFC 1808, RFC 2396
  8915. // define these here so at least they only have to be
  8916. // compiled once on the first module load.
  8917. var protocolPattern = /^([a-z0-9.+-]+:)/i,
  8918. portPattern = /:[0-9]*$/,
  8919. // Special case for a simple path URL
  8920. simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,
  8921. // RFC 2396: characters reserved for delimiting URLs.
  8922. // We actually just auto-escape these.
  8923. delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'],
  8924. // RFC 2396: characters not allowed for various reasons.
  8925. unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims),
  8926. // Allowed by RFCs, but cause of XSS attacks. Always escape these.
  8927. autoEscape = ['\''].concat(unwise),
  8928. // Characters that are never ever allowed in a hostname.
  8929. // Note that any invalid chars are also handled, but these
  8930. // are the ones that are *expected* to be seen, so we fast-path
  8931. // them.
  8932. nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),
  8933. hostEndingChars = ['/', '?', '#'],
  8934. hostnameMaxLen = 255,
  8935. hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,
  8936. hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,
  8937. // protocols that can allow "unsafe" and "unwise" chars.
  8938. unsafeProtocol = {
  8939. 'javascript': true,
  8940. 'javascript:': true
  8941. },
  8942. // protocols that never have a hostname.
  8943. hostlessProtocol = {
  8944. 'javascript': true,
  8945. 'javascript:': true
  8946. },
  8947. // protocols that always contain a // bit.
  8948. slashedProtocol = {
  8949. 'http': true,
  8950. 'https': true,
  8951. 'ftp': true,
  8952. 'gopher': true,
  8953. 'file': true,
  8954. 'http:': true,
  8955. 'https:': true,
  8956. 'ftp:': true,
  8957. 'gopher:': true,
  8958. 'file:': true
  8959. },
  8960. querystring = __webpack_require__(/*! querystring */ "./node_modules/querystring-es3/index.js");
  8961. function urlParse(url, parseQueryString, slashesDenoteHost) {
  8962. if (url && util.isObject(url) && url instanceof Url) return url;
  8963. var u = new Url();
  8964. u.parse(url, parseQueryString, slashesDenoteHost);
  8965. return u;
  8966. }
  8967. Url.prototype.parse = function (url, parseQueryString, slashesDenoteHost) {
  8968. if (!util.isString(url)) {
  8969. throw new TypeError("Parameter 'url' must be a string, not " + _typeof(url));
  8970. }
  8971. // Copy chrome, IE, opera backslash-handling behavior.
  8972. // Back slashes before the query string get converted to forward slashes
  8973. // See: https://code.google.com/p/chromium/issues/detail?id=25916
  8974. var queryIndex = url.indexOf('?'),
  8975. splitter = queryIndex !== -1 && queryIndex < url.indexOf('#') ? '?' : '#',
  8976. uSplit = url.split(splitter),
  8977. slashRegex = /\\/g;
  8978. uSplit[0] = uSplit[0].replace(slashRegex, '/');
  8979. url = uSplit.join(splitter);
  8980. var rest = url;
  8981. // trim before proceeding.
  8982. // This is to support parse stuff like " http://foo.com \n"
  8983. rest = rest.trim();
  8984. if (!slashesDenoteHost && url.split('#').length === 1) {
  8985. // Try fast path regexp
  8986. var simplePath = simplePathPattern.exec(rest);
  8987. if (simplePath) {
  8988. this.path = rest;
  8989. this.href = rest;
  8990. this.pathname = simplePath[1];
  8991. if (simplePath[2]) {
  8992. this.search = simplePath[2];
  8993. if (parseQueryString) {
  8994. this.query = querystring.parse(this.search.substr(1));
  8995. } else {
  8996. this.query = this.search.substr(1);
  8997. }
  8998. } else if (parseQueryString) {
  8999. this.search = '';
  9000. this.query = {};
  9001. }
  9002. return this;
  9003. }
  9004. }
  9005. var proto = protocolPattern.exec(rest);
  9006. if (proto) {
  9007. proto = proto[0];
  9008. var lowerProto = proto.toLowerCase();
  9009. this.protocol = lowerProto;
  9010. rest = rest.substr(proto.length);
  9011. }
  9012. // figure out if it's got a host
  9013. // user@server is *always* interpreted as a hostname, and url
  9014. // resolution will treat //foo/bar as host=foo,path=bar because that's
  9015. // how the browser resolves relative URLs.
  9016. if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) {
  9017. var slashes = rest.substr(0, 2) === '//';
  9018. if (slashes && !(proto && hostlessProtocol[proto])) {
  9019. rest = rest.substr(2);
  9020. this.slashes = true;
  9021. }
  9022. }
  9023. if (!hostlessProtocol[proto] && (slashes || proto && !slashedProtocol[proto])) {
  9024. // there's a hostname.
  9025. // the first instance of /, ?, ;, or # ends the host.
  9026. //
  9027. // If there is an @ in the hostname, then non-host chars *are* allowed
  9028. // to the left of the last @ sign, unless some host-ending character
  9029. // comes *before* the @-sign.
  9030. // URLs are obnoxious.
  9031. //
  9032. // ex:
  9033. // http://a@b@c/ => user:a@b host:c
  9034. // http://a@b?@c => user:a host:c path:/?@c
  9035. // v0.12 TODO(isaacs): This is not quite how Chrome does things.
  9036. // Review our test case against browsers more comprehensively.
  9037. // find the first instance of any hostEndingChars
  9038. var hostEnd = -1;
  9039. for (var i = 0; i < hostEndingChars.length; i++) {
  9040. var hec = rest.indexOf(hostEndingChars[i]);
  9041. if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) hostEnd = hec;
  9042. }
  9043. // at this point, either we have an explicit point where the
  9044. // auth portion cannot go past, or the last @ char is the decider.
  9045. var auth, atSign;
  9046. if (hostEnd === -1) {
  9047. // atSign can be anywhere.
  9048. atSign = rest.lastIndexOf('@');
  9049. } else {
  9050. // atSign must be in auth portion.
  9051. // http://a@b/c@d => host:b auth:a path:/c@d
  9052. atSign = rest.lastIndexOf('@', hostEnd);
  9053. }
  9054. // Now we have a portion which is definitely the auth.
  9055. // Pull that off.
  9056. if (atSign !== -1) {
  9057. auth = rest.slice(0, atSign);
  9058. rest = rest.slice(atSign + 1);
  9059. this.auth = decodeURIComponent(auth);
  9060. }
  9061. // the host is the remaining to the left of the first non-host char
  9062. hostEnd = -1;
  9063. for (var i = 0; i < nonHostChars.length; i++) {
  9064. var hec = rest.indexOf(nonHostChars[i]);
  9065. if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) hostEnd = hec;
  9066. }
  9067. // if we still have not hit it, then the entire thing is a host.
  9068. if (hostEnd === -1) hostEnd = rest.length;
  9069. this.host = rest.slice(0, hostEnd);
  9070. rest = rest.slice(hostEnd);
  9071. // pull out port.
  9072. this.parseHost();
  9073. // we've indicated that there is a hostname,
  9074. // so even if it's empty, it has to be present.
  9075. this.hostname = this.hostname || '';
  9076. // if hostname begins with [ and ends with ]
  9077. // assume that it's an IPv6 address.
  9078. var ipv6Hostname = this.hostname[0] === '[' && this.hostname[this.hostname.length - 1] === ']';
  9079. // validate a little.
  9080. if (!ipv6Hostname) {
  9081. var hostparts = this.hostname.split(/\./);
  9082. for (var i = 0, l = hostparts.length; i < l; i++) {
  9083. var part = hostparts[i];
  9084. if (!part) continue;
  9085. if (!part.match(hostnamePartPattern)) {
  9086. var newpart = '';
  9087. for (var j = 0, k = part.length; j < k; j++) {
  9088. if (part.charCodeAt(j) > 127) {
  9089. // we replace non-ASCII char with a temporary placeholder
  9090. // we need this to make sure size of hostname is not
  9091. // broken by replacing non-ASCII by nothing
  9092. newpart += 'x';
  9093. } else {
  9094. newpart += part[j];
  9095. }
  9096. }
  9097. // we test again with ASCII char only
  9098. if (!newpart.match(hostnamePartPattern)) {
  9099. var validParts = hostparts.slice(0, i);
  9100. var notHost = hostparts.slice(i + 1);
  9101. var bit = part.match(hostnamePartStart);
  9102. if (bit) {
  9103. validParts.push(bit[1]);
  9104. notHost.unshift(bit[2]);
  9105. }
  9106. if (notHost.length) {
  9107. rest = '/' + notHost.join('.') + rest;
  9108. }
  9109. this.hostname = validParts.join('.');
  9110. break;
  9111. }
  9112. }
  9113. }
  9114. }
  9115. if (this.hostname.length > hostnameMaxLen) {
  9116. this.hostname = '';
  9117. } else {
  9118. // hostnames are always lower case.
  9119. this.hostname = this.hostname.toLowerCase();
  9120. }
  9121. if (!ipv6Hostname) {
  9122. // IDNA Support: Returns a punycoded representation of "domain".
  9123. // It only converts parts of the domain name that
  9124. // have non-ASCII characters, i.e. it doesn't matter if
  9125. // you call it with a domain that already is ASCII-only.
  9126. this.hostname = punycode.toASCII(this.hostname);
  9127. }
  9128. var p = this.port ? ':' + this.port : '';
  9129. var h = this.hostname || '';
  9130. this.host = h + p;
  9131. this.href += this.host;
  9132. // strip [ and ] from the hostname
  9133. // the host field still retains them, though
  9134. if (ipv6Hostname) {
  9135. this.hostname = this.hostname.substr(1, this.hostname.length - 2);
  9136. if (rest[0] !== '/') {
  9137. rest = '/' + rest;
  9138. }
  9139. }
  9140. }
  9141. // now rest is set to the post-host stuff.
  9142. // chop off any delim chars.
  9143. if (!unsafeProtocol[lowerProto]) {
  9144. // First, make 100% sure that any "autoEscape" chars get
  9145. // escaped, even if encodeURIComponent doesn't think they
  9146. // need to be.
  9147. for (var i = 0, l = autoEscape.length; i < l; i++) {
  9148. var ae = autoEscape[i];
  9149. if (rest.indexOf(ae) === -1) continue;
  9150. var esc = encodeURIComponent(ae);
  9151. if (esc === ae) {
  9152. esc = escape(ae);
  9153. }
  9154. rest = rest.split(ae).join(esc);
  9155. }
  9156. }
  9157. // chop off from the tail first.
  9158. var hash = rest.indexOf('#');
  9159. if (hash !== -1) {
  9160. // got a fragment string.
  9161. this.hash = rest.substr(hash);
  9162. rest = rest.slice(0, hash);
  9163. }
  9164. var qm = rest.indexOf('?');
  9165. if (qm !== -1) {
  9166. this.search = rest.substr(qm);
  9167. this.query = rest.substr(qm + 1);
  9168. if (parseQueryString) {
  9169. this.query = querystring.parse(this.query);
  9170. }
  9171. rest = rest.slice(0, qm);
  9172. } else if (parseQueryString) {
  9173. // no query string, but parseQueryString still requested
  9174. this.search = '';
  9175. this.query = {};
  9176. }
  9177. if (rest) this.pathname = rest;
  9178. if (slashedProtocol[lowerProto] && this.hostname && !this.pathname) {
  9179. this.pathname = '/';
  9180. }
  9181. //to support http.request
  9182. if (this.pathname || this.search) {
  9183. var p = this.pathname || '';
  9184. var s = this.search || '';
  9185. this.path = p + s;
  9186. }
  9187. // finally, reconstruct the href based on what has been validated.
  9188. this.href = this.format();
  9189. return this;
  9190. };
  9191. // format a parsed object into a url string
  9192. function urlFormat(obj) {
  9193. // ensure it's an object, and not a string url.
  9194. // If it's an obj, this is a no-op.
  9195. // this way, you can call url_format() on strings
  9196. // to clean up potentially wonky urls.
  9197. if (util.isString(obj)) obj = urlParse(obj);
  9198. if (!(obj instanceof Url)) return Url.prototype.format.call(obj);
  9199. return obj.format();
  9200. }
  9201. Url.prototype.format = function () {
  9202. var auth = this.auth || '';
  9203. if (auth) {
  9204. auth = encodeURIComponent(auth);
  9205. auth = auth.replace(/%3A/i, ':');
  9206. auth += '@';
  9207. }
  9208. var protocol = this.protocol || '',
  9209. pathname = this.pathname || '',
  9210. hash = this.hash || '',
  9211. host = false,
  9212. query = '';
  9213. if (this.host) {
  9214. host = auth + this.host;
  9215. } else if (this.hostname) {
  9216. host = auth + (this.hostname.indexOf(':') === -1 ? this.hostname : '[' + this.hostname + ']');
  9217. if (this.port) {
  9218. host += ':' + this.port;
  9219. }
  9220. }
  9221. if (this.query && util.isObject(this.query) && Object.keys(this.query).length) {
  9222. query = querystring.stringify(this.query);
  9223. }
  9224. var search = this.search || query && '?' + query || '';
  9225. if (protocol && protocol.substr(-1) !== ':') protocol += ':';
  9226. // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.
  9227. // unless they had them to begin with.
  9228. if (this.slashes || (!protocol || slashedProtocol[protocol]) && host !== false) {
  9229. host = '//' + (host || '');
  9230. if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;
  9231. } else if (!host) {
  9232. host = '';
  9233. }
  9234. if (hash && hash.charAt(0) !== '#') hash = '#' + hash;
  9235. if (search && search.charAt(0) !== '?') search = '?' + search;
  9236. pathname = pathname.replace(/[?#]/g, function (match) {
  9237. return encodeURIComponent(match);
  9238. });
  9239. search = search.replace('#', '%23');
  9240. return protocol + host + pathname + search + hash;
  9241. };
  9242. function urlResolve(source, relative) {
  9243. return urlParse(source, false, true).resolve(relative);
  9244. }
  9245. Url.prototype.resolve = function (relative) {
  9246. return this.resolveObject(urlParse(relative, false, true)).format();
  9247. };
  9248. function urlResolveObject(source, relative) {
  9249. if (!source) return relative;
  9250. return urlParse(source, false, true).resolveObject(relative);
  9251. }
  9252. Url.prototype.resolveObject = function (relative) {
  9253. if (util.isString(relative)) {
  9254. var rel = new Url();
  9255. rel.parse(relative, false, true);
  9256. relative = rel;
  9257. }
  9258. var result = new Url();
  9259. var tkeys = Object.keys(this);
  9260. for (var tk = 0; tk < tkeys.length; tk++) {
  9261. var tkey = tkeys[tk];
  9262. result[tkey] = this[tkey];
  9263. }
  9264. // hash is always overridden, no matter what.
  9265. // even href="" will remove it.
  9266. result.hash = relative.hash;
  9267. // if the relative url is empty, then there's nothing left to do here.
  9268. if (relative.href === '') {
  9269. result.href = result.format();
  9270. return result;
  9271. }
  9272. // hrefs like //foo/bar always cut to the protocol.
  9273. if (relative.slashes && !relative.protocol) {
  9274. // take everything except the protocol from relative
  9275. var rkeys = Object.keys(relative);
  9276. for (var rk = 0; rk < rkeys.length; rk++) {
  9277. var rkey = rkeys[rk];
  9278. if (rkey !== 'protocol') result[rkey] = relative[rkey];
  9279. }
  9280. //urlParse appends trailing / to urls like http://www.example.com
  9281. if (slashedProtocol[result.protocol] && result.hostname && !result.pathname) {
  9282. result.path = result.pathname = '/';
  9283. }
  9284. result.href = result.format();
  9285. return result;
  9286. }
  9287. if (relative.protocol && relative.protocol !== result.protocol) {
  9288. // if it's a known url protocol, then changing
  9289. // the protocol does weird things
  9290. // first, if it's not file:, then we MUST have a host,
  9291. // and if there was a path
  9292. // to begin with, then we MUST have a path.
  9293. // if it is file:, then the host is dropped,
  9294. // because that's known to be hostless.
  9295. // anything else is assumed to be absolute.
  9296. if (!slashedProtocol[relative.protocol]) {
  9297. var keys = Object.keys(relative);
  9298. for (var v = 0; v < keys.length; v++) {
  9299. var k = keys[v];
  9300. result[k] = relative[k];
  9301. }
  9302. result.href = result.format();
  9303. return result;
  9304. }
  9305. result.protocol = relative.protocol;
  9306. if (!relative.host && !hostlessProtocol[relative.protocol]) {
  9307. var relPath = (relative.pathname || '').split('/');
  9308. while (relPath.length && !(relative.host = relPath.shift()));
  9309. if (!relative.host) relative.host = '';
  9310. if (!relative.hostname) relative.hostname = '';
  9311. if (relPath[0] !== '') relPath.unshift('');
  9312. if (relPath.length < 2) relPath.unshift('');
  9313. result.pathname = relPath.join('/');
  9314. } else {
  9315. result.pathname = relative.pathname;
  9316. }
  9317. result.search = relative.search;
  9318. result.query = relative.query;
  9319. result.host = relative.host || '';
  9320. result.auth = relative.auth;
  9321. result.hostname = relative.hostname || relative.host;
  9322. result.port = relative.port;
  9323. // to support http.request
  9324. if (result.pathname || result.search) {
  9325. var p = result.pathname || '';
  9326. var s = result.search || '';
  9327. result.path = p + s;
  9328. }
  9329. result.slashes = result.slashes || relative.slashes;
  9330. result.href = result.format();
  9331. return result;
  9332. }
  9333. var isSourceAbs = result.pathname && result.pathname.charAt(0) === '/',
  9334. isRelAbs = relative.host || relative.pathname && relative.pathname.charAt(0) === '/',
  9335. mustEndAbs = isRelAbs || isSourceAbs || result.host && relative.pathname,
  9336. removeAllDots = mustEndAbs,
  9337. srcPath = result.pathname && result.pathname.split('/') || [],
  9338. relPath = relative.pathname && relative.pathname.split('/') || [],
  9339. psychotic = result.protocol && !slashedProtocol[result.protocol];
  9340. // if the url is a non-slashed url, then relative
  9341. // links like ../.. should be able
  9342. // to crawl up to the hostname, as well. This is strange.
  9343. // result.protocol has already been set by now.
  9344. // Later on, put the first path part into the host field.
  9345. if (psychotic) {
  9346. result.hostname = '';
  9347. result.port = null;
  9348. if (result.host) {
  9349. if (srcPath[0] === '') srcPath[0] = result.host;else srcPath.unshift(result.host);
  9350. }
  9351. result.host = '';
  9352. if (relative.protocol) {
  9353. relative.hostname = null;
  9354. relative.port = null;
  9355. if (relative.host) {
  9356. if (relPath[0] === '') relPath[0] = relative.host;else relPath.unshift(relative.host);
  9357. }
  9358. relative.host = null;
  9359. }
  9360. mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');
  9361. }
  9362. if (isRelAbs) {
  9363. // it's absolute.
  9364. result.host = relative.host || relative.host === '' ? relative.host : result.host;
  9365. result.hostname = relative.hostname || relative.hostname === '' ? relative.hostname : result.hostname;
  9366. result.search = relative.search;
  9367. result.query = relative.query;
  9368. srcPath = relPath;
  9369. // fall through to the dot-handling below.
  9370. } else if (relPath.length) {
  9371. // it's relative
  9372. // throw away the existing file, and take the new path instead.
  9373. if (!srcPath) srcPath = [];
  9374. srcPath.pop();
  9375. srcPath = srcPath.concat(relPath);
  9376. result.search = relative.search;
  9377. result.query = relative.query;
  9378. } else if (!util.isNullOrUndefined(relative.search)) {
  9379. // just pull out the search.
  9380. // like href='?foo'.
  9381. // Put this after the other two cases because it simplifies the booleans
  9382. if (psychotic) {
  9383. result.hostname = result.host = srcPath.shift();
  9384. //occationaly the auth can get stuck only in host
  9385. //this especially happens in cases like
  9386. //url.resolveObject('mailto:local1@domain1', 'local2@domain2')
  9387. var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false;
  9388. if (authInHost) {
  9389. result.auth = authInHost.shift();
  9390. result.host = result.hostname = authInHost.shift();
  9391. }
  9392. }
  9393. result.search = relative.search;
  9394. result.query = relative.query;
  9395. //to support http.request
  9396. if (!util.isNull(result.pathname) || !util.isNull(result.search)) {
  9397. result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : '');
  9398. }
  9399. result.href = result.format();
  9400. return result;
  9401. }
  9402. if (!srcPath.length) {
  9403. // no path at all. easy.
  9404. // we've already handled the other stuff above.
  9405. result.pathname = null;
  9406. //to support http.request
  9407. if (result.search) {
  9408. result.path = '/' + result.search;
  9409. } else {
  9410. result.path = null;
  9411. }
  9412. result.href = result.format();
  9413. return result;
  9414. }
  9415. // if a url ENDs in . or .., then it must get a trailing slash.
  9416. // however, if it ends in anything else non-slashy,
  9417. // then it must NOT get a trailing slash.
  9418. var last = srcPath.slice(-1)[0];
  9419. var hasTrailingSlash = (result.host || relative.host || srcPath.length > 1) && (last === '.' || last === '..') || last === '';
  9420. // strip single dots, resolve double dots to parent dir
  9421. // if the path tries to go above the root, `up` ends up > 0
  9422. var up = 0;
  9423. for (var i = srcPath.length; i >= 0; i--) {
  9424. last = srcPath[i];
  9425. if (last === '.') {
  9426. srcPath.splice(i, 1);
  9427. } else if (last === '..') {
  9428. srcPath.splice(i, 1);
  9429. up++;
  9430. } else if (up) {
  9431. srcPath.splice(i, 1);
  9432. up--;
  9433. }
  9434. }
  9435. // if the path is allowed to go above the root, restore leading ..s
  9436. if (!mustEndAbs && !removeAllDots) {
  9437. for (; up--; up) {
  9438. srcPath.unshift('..');
  9439. }
  9440. }
  9441. if (mustEndAbs && srcPath[0] !== '' && (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {
  9442. srcPath.unshift('');
  9443. }
  9444. if (hasTrailingSlash && srcPath.join('/').substr(-1) !== '/') {
  9445. srcPath.push('');
  9446. }
  9447. var isAbsolute = srcPath[0] === '' || srcPath[0] && srcPath[0].charAt(0) === '/';
  9448. // put the host back
  9449. if (psychotic) {
  9450. result.hostname = result.host = isAbsolute ? '' : srcPath.length ? srcPath.shift() : '';
  9451. //occationaly the auth can get stuck only in host
  9452. //this especially happens in cases like
  9453. //url.resolveObject('mailto:local1@domain1', 'local2@domain2')
  9454. var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false;
  9455. if (authInHost) {
  9456. result.auth = authInHost.shift();
  9457. result.host = result.hostname = authInHost.shift();
  9458. }
  9459. }
  9460. mustEndAbs = mustEndAbs || result.host && srcPath.length;
  9461. if (mustEndAbs && !isAbsolute) {
  9462. srcPath.unshift('');
  9463. }
  9464. if (!srcPath.length) {
  9465. result.pathname = null;
  9466. result.path = null;
  9467. } else {
  9468. result.pathname = srcPath.join('/');
  9469. }
  9470. //to support request.http
  9471. if (!util.isNull(result.pathname) || !util.isNull(result.search)) {
  9472. result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : '');
  9473. }
  9474. result.auth = relative.auth || result.auth;
  9475. result.slashes = result.slashes || relative.slashes;
  9476. result.href = result.format();
  9477. return result;
  9478. };
  9479. Url.prototype.parseHost = function () {
  9480. var host = this.host;
  9481. var port = portPattern.exec(host);
  9482. if (port) {
  9483. port = port[0];
  9484. if (port !== ':') {
  9485. this.port = port.substr(1);
  9486. }
  9487. host = host.substr(0, host.length - port.length);
  9488. }
  9489. if (host) this.hostname = host;
  9490. };
  9491. /***/ }),
  9492. /***/ "./node_modules/url/util.js":
  9493. /*!**********************************!*\
  9494. !*** ./node_modules/url/util.js ***!
  9495. \**********************************/
  9496. /*! no static exports found */
  9497. /***/ (function(module, exports, __webpack_require__) {
  9498. "use strict";
  9499. function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
  9500. module.exports = {
  9501. isString: function isString(arg) {
  9502. return typeof arg === 'string';
  9503. },
  9504. isObject: function isObject(arg) {
  9505. return _typeof(arg) === 'object' && arg !== null;
  9506. },
  9507. isNull: function isNull(arg) {
  9508. return arg === null;
  9509. },
  9510. isNullOrUndefined: function isNullOrUndefined(arg) {
  9511. return arg == null;
  9512. }
  9513. };
  9514. /***/ }),
  9515. /***/ "./node_modules/util-deprecate/browser.js":
  9516. /*!************************************************!*\
  9517. !*** ./node_modules/util-deprecate/browser.js ***!
  9518. \************************************************/
  9519. /*! no static exports found */
  9520. /***/ (function(module, exports, __webpack_require__) {
  9521. /* WEBPACK VAR INJECTION */(function(global) {/**
  9522. * Module exports.
  9523. */
  9524. module.exports = deprecate;
  9525. /**
  9526. * Mark that a method should not be used.
  9527. * Returns a modified function which warns once by default.
  9528. *
  9529. * If `localStorage.noDeprecation = true` is set, then it is a no-op.
  9530. *
  9531. * If `localStorage.throwDeprecation = true` is set, then deprecated functions
  9532. * will throw an Error when invoked.
  9533. *
  9534. * If `localStorage.traceDeprecation = true` is set, then deprecated functions
  9535. * will invoke `console.trace()` instead of `console.error()`.
  9536. *
  9537. * @param {Function} fn - the function to deprecate
  9538. * @param {String} msg - the string to print to the console when `fn` is invoked
  9539. * @returns {Function} a new "deprecated" version of `fn`
  9540. * @api public
  9541. */
  9542. function deprecate(fn, msg) {
  9543. if (config('noDeprecation')) {
  9544. return fn;
  9545. }
  9546. var warned = false;
  9547. function deprecated() {
  9548. if (!warned) {
  9549. if (config('throwDeprecation')) {
  9550. throw new Error(msg);
  9551. } else if (config('traceDeprecation')) {
  9552. console.trace(msg);
  9553. } else {
  9554. console.warn(msg);
  9555. }
  9556. warned = true;
  9557. }
  9558. return fn.apply(this, arguments);
  9559. }
  9560. return deprecated;
  9561. }
  9562. /**
  9563. * Checks `localStorage` for boolean values for the given `name`.
  9564. *
  9565. * @param {String} name
  9566. * @returns {Boolean}
  9567. * @api private
  9568. */
  9569. function config(name) {
  9570. // accessing global.localStorage can trigger a DOMException in sandboxed iframes
  9571. try {
  9572. if (!global.localStorage) return false;
  9573. } catch (_) {
  9574. return false;
  9575. }
  9576. var val = global.localStorage[name];
  9577. if (null == val) return false;
  9578. return String(val).toLowerCase() === 'true';
  9579. }
  9580. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  9581. /***/ }),
  9582. /***/ "./node_modules/webpack/buildin/amd-options.js":
  9583. /*!****************************************!*\
  9584. !*** (webpack)/buildin/amd-options.js ***!
  9585. \****************************************/
  9586. /*! no static exports found */
  9587. /***/ (function(module, exports) {
  9588. /* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */
  9589. module.exports = __webpack_amd_options__;
  9590. /* WEBPACK VAR INJECTION */}.call(this, {}))
  9591. /***/ }),
  9592. /***/ "./node_modules/webpack/buildin/global.js":
  9593. /*!***********************************!*\
  9594. !*** (webpack)/buildin/global.js ***!
  9595. \***********************************/
  9596. /*! no static exports found */
  9597. /***/ (function(module, exports) {
  9598. function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
  9599. var g;
  9600. // This works in non-strict mode
  9601. g = function () {
  9602. return this;
  9603. }();
  9604. try {
  9605. // This works if eval is allowed (see CSP)
  9606. g = g || new Function("return this")();
  9607. } catch (e) {
  9608. // This works if the window reference is available
  9609. if ((typeof window === "undefined" ? "undefined" : _typeof(window)) === "object") g = window;
  9610. }
  9611. // g can still be undefined, but nothing to do about it...
  9612. // We return undefined, instead of nothing here, so it's
  9613. // easier to handle this case. if(!global) { ...}
  9614. module.exports = g;
  9615. /***/ }),
  9616. /***/ "./node_modules/webpack/buildin/module.js":
  9617. /*!***********************************!*\
  9618. !*** (webpack)/buildin/module.js ***!
  9619. \***********************************/
  9620. /*! no static exports found */
  9621. /***/ (function(module, exports) {
  9622. module.exports = function (module) {
  9623. if (!module.webpackPolyfill) {
  9624. module.deprecate = function () {};
  9625. module.paths = [];
  9626. // module.parent = undefined by default
  9627. if (!module.children) module.children = [];
  9628. Object.defineProperty(module, "loaded", {
  9629. enumerable: true,
  9630. get: function get() {
  9631. return module.l;
  9632. }
  9633. });
  9634. Object.defineProperty(module, "id", {
  9635. enumerable: true,
  9636. get: function get() {
  9637. return module.i;
  9638. }
  9639. });
  9640. module.webpackPolyfill = 1;
  9641. }
  9642. return module;
  9643. };
  9644. /***/ }),
  9645. /***/ "./node_modules/xml2js/lib/bom.js":
  9646. /*!****************************************!*\
  9647. !*** ./node_modules/xml2js/lib/bom.js ***!
  9648. \****************************************/
  9649. /*! no static exports found */
  9650. /***/ (function(module, exports) {
  9651. // Generated by CoffeeScript 1.12.7
  9652. (function () {
  9653. "use strict";
  9654. exports.stripBOM = function (str) {
  9655. if (str[0] === "\uFEFF") {
  9656. return str.substring(1);
  9657. } else {
  9658. return str;
  9659. }
  9660. };
  9661. }).call(this);
  9662. /***/ }),
  9663. /***/ "./node_modules/xml2js/lib/builder.js":
  9664. /*!********************************************!*\
  9665. !*** ./node_modules/xml2js/lib/builder.js ***!
  9666. \********************************************/
  9667. /*! no static exports found */
  9668. /***/ (function(module, exports, __webpack_require__) {
  9669. function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
  9670. // Generated by CoffeeScript 1.12.7
  9671. (function () {
  9672. "use strict";
  9673. var builder,
  9674. defaults,
  9675. escapeCDATA,
  9676. requiresCDATA,
  9677. wrapCDATA,
  9678. hasProp = {}.hasOwnProperty;
  9679. builder = __webpack_require__(/*! xmlbuilder */ "xmlbuilder");
  9680. defaults = __webpack_require__(/*! ./defaults */ "./node_modules/xml2js/lib/defaults.js").defaults;
  9681. requiresCDATA = function requiresCDATA(entry) {
  9682. return typeof entry === "string" && (entry.indexOf('&') >= 0 || entry.indexOf('>') >= 0 || entry.indexOf('<') >= 0);
  9683. };
  9684. wrapCDATA = function wrapCDATA(entry) {
  9685. return "<![CDATA[" + escapeCDATA(entry) + "]]>";
  9686. };
  9687. escapeCDATA = function escapeCDATA(entry) {
  9688. return entry.replace(']]>', ']]]]><![CDATA[>');
  9689. };
  9690. exports.Builder = function () {
  9691. function Builder(opts) {
  9692. var key, ref, value;
  9693. this.options = {};
  9694. ref = defaults["0.2"];
  9695. for (key in ref) {
  9696. if (!hasProp.call(ref, key)) continue;
  9697. value = ref[key];
  9698. this.options[key] = value;
  9699. }
  9700. for (key in opts) {
  9701. if (!hasProp.call(opts, key)) continue;
  9702. value = opts[key];
  9703. this.options[key] = value;
  9704. }
  9705. }
  9706. Builder.prototype.buildObject = function (rootObj) {
  9707. var attrkey, charkey, render, rootElement, rootName;
  9708. attrkey = this.options.attrkey;
  9709. charkey = this.options.charkey;
  9710. if (Object.keys(rootObj).length === 1 && this.options.rootName === defaults['0.2'].rootName) {
  9711. rootName = Object.keys(rootObj)[0];
  9712. rootObj = rootObj[rootName];
  9713. } else {
  9714. rootName = this.options.rootName;
  9715. }
  9716. render = function (_this) {
  9717. return function (element, obj) {
  9718. var attr, child, entry, index, key, value;
  9719. if (_typeof(obj) !== 'object') {
  9720. if (_this.options.cdata && requiresCDATA(obj)) {
  9721. element.raw(wrapCDATA(obj));
  9722. } else {
  9723. element.txt(obj);
  9724. }
  9725. } else if (Array.isArray(obj)) {
  9726. for (index in obj) {
  9727. if (!hasProp.call(obj, index)) continue;
  9728. child = obj[index];
  9729. for (key in child) {
  9730. entry = child[key];
  9731. element = render(element.ele(key), entry).up();
  9732. }
  9733. }
  9734. } else {
  9735. for (key in obj) {
  9736. if (!hasProp.call(obj, key)) continue;
  9737. child = obj[key];
  9738. if (key === attrkey) {
  9739. if (_typeof(child) === "object") {
  9740. for (attr in child) {
  9741. value = child[attr];
  9742. element = element.att(attr, value);
  9743. }
  9744. }
  9745. } else if (key === charkey) {
  9746. if (_this.options.cdata && requiresCDATA(child)) {
  9747. element = element.raw(wrapCDATA(child));
  9748. } else {
  9749. element = element.txt(child);
  9750. }
  9751. } else if (Array.isArray(child)) {
  9752. for (index in child) {
  9753. if (!hasProp.call(child, index)) continue;
  9754. entry = child[index];
  9755. if (typeof entry === 'string') {
  9756. if (_this.options.cdata && requiresCDATA(entry)) {
  9757. element = element.ele(key).raw(wrapCDATA(entry)).up();
  9758. } else {
  9759. element = element.ele(key, entry).up();
  9760. }
  9761. } else {
  9762. element = render(element.ele(key), entry).up();
  9763. }
  9764. }
  9765. } else if (_typeof(child) === "object") {
  9766. element = render(element.ele(key), child).up();
  9767. } else {
  9768. if (typeof child === 'string' && _this.options.cdata && requiresCDATA(child)) {
  9769. element = element.ele(key).raw(wrapCDATA(child)).up();
  9770. } else {
  9771. if (child == null) {
  9772. child = '';
  9773. }
  9774. element = element.ele(key, child.toString()).up();
  9775. }
  9776. }
  9777. }
  9778. }
  9779. return element;
  9780. };
  9781. }(this);
  9782. rootElement = builder.create(rootName, this.options.xmldec, this.options.doctype, {
  9783. headless: this.options.headless,
  9784. allowSurrogateChars: this.options.allowSurrogateChars
  9785. });
  9786. return render(rootElement, rootObj).end(this.options.renderOpts);
  9787. };
  9788. return Builder;
  9789. }();
  9790. }).call(this);
  9791. /***/ }),
  9792. /***/ "./node_modules/xml2js/lib/defaults.js":
  9793. /*!*********************************************!*\
  9794. !*** ./node_modules/xml2js/lib/defaults.js ***!
  9795. \*********************************************/
  9796. /*! no static exports found */
  9797. /***/ (function(module, exports) {
  9798. // Generated by CoffeeScript 1.12.7
  9799. (function () {
  9800. exports.defaults = {
  9801. "0.1": {
  9802. explicitCharkey: false,
  9803. trim: true,
  9804. normalize: true,
  9805. normalizeTags: false,
  9806. attrkey: "@",
  9807. charkey: "#",
  9808. explicitArray: false,
  9809. ignoreAttrs: false,
  9810. mergeAttrs: false,
  9811. explicitRoot: false,
  9812. validator: null,
  9813. xmlns: false,
  9814. explicitChildren: false,
  9815. childkey: '@@',
  9816. charsAsChildren: false,
  9817. includeWhiteChars: false,
  9818. async: false,
  9819. strict: true,
  9820. attrNameProcessors: null,
  9821. attrValueProcessors: null,
  9822. tagNameProcessors: null,
  9823. valueProcessors: null,
  9824. emptyTag: ''
  9825. },
  9826. "0.2": {
  9827. explicitCharkey: false,
  9828. trim: false,
  9829. normalize: false,
  9830. normalizeTags: false,
  9831. attrkey: "$",
  9832. charkey: "_",
  9833. explicitArray: true,
  9834. ignoreAttrs: false,
  9835. mergeAttrs: false,
  9836. explicitRoot: true,
  9837. validator: null,
  9838. xmlns: false,
  9839. explicitChildren: false,
  9840. preserveChildrenOrder: false,
  9841. childkey: '$$',
  9842. charsAsChildren: false,
  9843. includeWhiteChars: false,
  9844. async: false,
  9845. strict: true,
  9846. attrNameProcessors: null,
  9847. attrValueProcessors: null,
  9848. tagNameProcessors: null,
  9849. valueProcessors: null,
  9850. rootName: 'root',
  9851. xmldec: {
  9852. 'version': '1.0',
  9853. 'encoding': 'UTF-8',
  9854. 'standalone': true
  9855. },
  9856. doctype: null,
  9857. renderOpts: {
  9858. 'pretty': true,
  9859. 'indent': ' ',
  9860. 'newline': '\n'
  9861. },
  9862. headless: false,
  9863. chunkSize: 10000,
  9864. emptyTag: '',
  9865. cdata: false
  9866. }
  9867. };
  9868. }).call(this);
  9869. /***/ }),
  9870. /***/ "./node_modules/xml2js/lib/parser.js":
  9871. /*!*******************************************!*\
  9872. !*** ./node_modules/xml2js/lib/parser.js ***!
  9873. \*******************************************/
  9874. /*! no static exports found */
  9875. /***/ (function(module, exports, __webpack_require__) {
  9876. function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
  9877. // Generated by CoffeeScript 1.12.7
  9878. (function () {
  9879. "use strict";
  9880. var bom,
  9881. defaults,
  9882. events,
  9883. isEmpty,
  9884. processItem,
  9885. processors,
  9886. sax,
  9887. setImmediate,
  9888. bind = function bind(fn, me) {
  9889. return function () {
  9890. return fn.apply(me, arguments);
  9891. };
  9892. },
  9893. extend = function extend(child, parent) {
  9894. for (var key in parent) {
  9895. if (hasProp.call(parent, key)) child[key] = parent[key];
  9896. }
  9897. function ctor() {
  9898. this.constructor = child;
  9899. }
  9900. ctor.prototype = parent.prototype;
  9901. child.prototype = new ctor();
  9902. child.__super__ = parent.prototype;
  9903. return child;
  9904. },
  9905. hasProp = {}.hasOwnProperty;
  9906. sax = __webpack_require__(/*! sax */ "./node_modules/sax/lib/sax.js");
  9907. events = __webpack_require__(/*! events */ "./node_modules/events/events.js");
  9908. bom = __webpack_require__(/*! ./bom */ "./node_modules/xml2js/lib/bom.js");
  9909. processors = __webpack_require__(/*! ./processors */ "./node_modules/xml2js/lib/processors.js");
  9910. setImmediate = __webpack_require__(/*! timers */ "./node_modules/timers-browserify/main.js").setImmediate;
  9911. defaults = __webpack_require__(/*! ./defaults */ "./node_modules/xml2js/lib/defaults.js").defaults;
  9912. isEmpty = function isEmpty(thing) {
  9913. return _typeof(thing) === "object" && thing != null && Object.keys(thing).length === 0;
  9914. };
  9915. processItem = function processItem(processors, item, key) {
  9916. var i, len, process;
  9917. for (i = 0, len = processors.length; i < len; i++) {
  9918. process = processors[i];
  9919. item = process(item, key);
  9920. }
  9921. return item;
  9922. };
  9923. exports.Parser = function (superClass) {
  9924. extend(Parser, superClass);
  9925. function Parser(opts) {
  9926. this.parseStringPromise = bind(this.parseStringPromise, this);
  9927. this.parseString = bind(this.parseString, this);
  9928. this.reset = bind(this.reset, this);
  9929. this.assignOrPush = bind(this.assignOrPush, this);
  9930. this.processAsync = bind(this.processAsync, this);
  9931. var key, ref, value;
  9932. if (!(this instanceof exports.Parser)) {
  9933. return new exports.Parser(opts);
  9934. }
  9935. this.options = {};
  9936. ref = defaults["0.2"];
  9937. for (key in ref) {
  9938. if (!hasProp.call(ref, key)) continue;
  9939. value = ref[key];
  9940. this.options[key] = value;
  9941. }
  9942. for (key in opts) {
  9943. if (!hasProp.call(opts, key)) continue;
  9944. value = opts[key];
  9945. this.options[key] = value;
  9946. }
  9947. if (this.options.xmlns) {
  9948. this.options.xmlnskey = this.options.attrkey + "ns";
  9949. }
  9950. if (this.options.normalizeTags) {
  9951. if (!this.options.tagNameProcessors) {
  9952. this.options.tagNameProcessors = [];
  9953. }
  9954. this.options.tagNameProcessors.unshift(processors.normalize);
  9955. }
  9956. this.reset();
  9957. }
  9958. Parser.prototype.processAsync = function () {
  9959. var chunk, err;
  9960. try {
  9961. if (this.remaining.length <= this.options.chunkSize) {
  9962. chunk = this.remaining;
  9963. this.remaining = '';
  9964. this.saxParser = this.saxParser.write(chunk);
  9965. return this.saxParser.close();
  9966. } else {
  9967. chunk = this.remaining.substr(0, this.options.chunkSize);
  9968. this.remaining = this.remaining.substr(this.options.chunkSize, this.remaining.length);
  9969. this.saxParser = this.saxParser.write(chunk);
  9970. return setImmediate(this.processAsync);
  9971. }
  9972. } catch (error1) {
  9973. err = error1;
  9974. if (!this.saxParser.errThrown) {
  9975. this.saxParser.errThrown = true;
  9976. return this.emit(err);
  9977. }
  9978. }
  9979. };
  9980. Parser.prototype.assignOrPush = function (obj, key, newValue) {
  9981. if (!(key in obj)) {
  9982. if (!this.options.explicitArray) {
  9983. return obj[key] = newValue;
  9984. } else {
  9985. return obj[key] = [newValue];
  9986. }
  9987. } else {
  9988. if (!(obj[key] instanceof Array)) {
  9989. obj[key] = [obj[key]];
  9990. }
  9991. return obj[key].push(newValue);
  9992. }
  9993. };
  9994. Parser.prototype.reset = function () {
  9995. var attrkey, charkey, ontext, stack;
  9996. this.removeAllListeners();
  9997. this.saxParser = sax.parser(this.options.strict, {
  9998. trim: false,
  9999. normalize: false,
  10000. xmlns: this.options.xmlns
  10001. });
  10002. this.saxParser.errThrown = false;
  10003. this.saxParser.onerror = function (_this) {
  10004. return function (error) {
  10005. _this.saxParser.resume();
  10006. if (!_this.saxParser.errThrown) {
  10007. _this.saxParser.errThrown = true;
  10008. return _this.emit("error", error);
  10009. }
  10010. };
  10011. }(this);
  10012. this.saxParser.onend = function (_this) {
  10013. return function () {
  10014. if (!_this.saxParser.ended) {
  10015. _this.saxParser.ended = true;
  10016. return _this.emit("end", _this.resultObject);
  10017. }
  10018. };
  10019. }(this);
  10020. this.saxParser.ended = false;
  10021. this.EXPLICIT_CHARKEY = this.options.explicitCharkey;
  10022. this.resultObject = null;
  10023. stack = [];
  10024. attrkey = this.options.attrkey;
  10025. charkey = this.options.charkey;
  10026. this.saxParser.onopentag = function (_this) {
  10027. return function (node) {
  10028. var key, newValue, obj, processedKey, ref;
  10029. obj = Object.create(null);
  10030. obj[charkey] = "";
  10031. if (!_this.options.ignoreAttrs) {
  10032. ref = node.attributes;
  10033. for (key in ref) {
  10034. if (!hasProp.call(ref, key)) continue;
  10035. if (!(attrkey in obj) && !_this.options.mergeAttrs) {
  10036. obj[attrkey] = Object.create(null);
  10037. }
  10038. newValue = _this.options.attrValueProcessors ? processItem(_this.options.attrValueProcessors, node.attributes[key], key) : node.attributes[key];
  10039. processedKey = _this.options.attrNameProcessors ? processItem(_this.options.attrNameProcessors, key) : key;
  10040. if (_this.options.mergeAttrs) {
  10041. _this.assignOrPush(obj, processedKey, newValue);
  10042. } else {
  10043. obj[attrkey][processedKey] = newValue;
  10044. }
  10045. }
  10046. }
  10047. obj["#name"] = _this.options.tagNameProcessors ? processItem(_this.options.tagNameProcessors, node.name) : node.name;
  10048. if (_this.options.xmlns) {
  10049. obj[_this.options.xmlnskey] = {
  10050. uri: node.uri,
  10051. local: node.local
  10052. };
  10053. }
  10054. return stack.push(obj);
  10055. };
  10056. }(this);
  10057. this.saxParser.onclosetag = function (_this) {
  10058. return function () {
  10059. var cdata, emptyStr, key, node, nodeName, obj, objClone, old, s, xpath;
  10060. obj = stack.pop();
  10061. nodeName = obj["#name"];
  10062. if (!_this.options.explicitChildren || !_this.options.preserveChildrenOrder) {
  10063. delete obj["#name"];
  10064. }
  10065. if (obj.cdata === true) {
  10066. cdata = obj.cdata;
  10067. delete obj.cdata;
  10068. }
  10069. s = stack[stack.length - 1];
  10070. if (obj[charkey].match(/^\s*$/) && !cdata) {
  10071. emptyStr = obj[charkey];
  10072. delete obj[charkey];
  10073. } else {
  10074. if (_this.options.trim) {
  10075. obj[charkey] = obj[charkey].trim();
  10076. }
  10077. if (_this.options.normalize) {
  10078. obj[charkey] = obj[charkey].replace(/\s{2,}/g, " ").trim();
  10079. }
  10080. obj[charkey] = _this.options.valueProcessors ? processItem(_this.options.valueProcessors, obj[charkey], nodeName) : obj[charkey];
  10081. if (Object.keys(obj).length === 1 && charkey in obj && !_this.EXPLICIT_CHARKEY) {
  10082. obj = obj[charkey];
  10083. }
  10084. }
  10085. if (isEmpty(obj)) {
  10086. if (typeof _this.options.emptyTag === 'function') {
  10087. obj = _this.options.emptyTag();
  10088. } else {
  10089. obj = _this.options.emptyTag !== '' ? _this.options.emptyTag : emptyStr;
  10090. }
  10091. }
  10092. if (_this.options.validator != null) {
  10093. xpath = "/" + function () {
  10094. var i, len, results;
  10095. results = [];
  10096. for (i = 0, len = stack.length; i < len; i++) {
  10097. node = stack[i];
  10098. results.push(node["#name"]);
  10099. }
  10100. return results;
  10101. }().concat(nodeName).join("/");
  10102. (function () {
  10103. var err;
  10104. try {
  10105. return obj = _this.options.validator(xpath, s && s[nodeName], obj);
  10106. } catch (error1) {
  10107. err = error1;
  10108. return _this.emit("error", err);
  10109. }
  10110. })();
  10111. }
  10112. if (_this.options.explicitChildren && !_this.options.mergeAttrs && _typeof(obj) === 'object') {
  10113. if (!_this.options.preserveChildrenOrder) {
  10114. node = Object.create(null);
  10115. if (_this.options.attrkey in obj) {
  10116. node[_this.options.attrkey] = obj[_this.options.attrkey];
  10117. delete obj[_this.options.attrkey];
  10118. }
  10119. if (!_this.options.charsAsChildren && _this.options.charkey in obj) {
  10120. node[_this.options.charkey] = obj[_this.options.charkey];
  10121. delete obj[_this.options.charkey];
  10122. }
  10123. if (Object.getOwnPropertyNames(obj).length > 0) {
  10124. node[_this.options.childkey] = obj;
  10125. }
  10126. obj = node;
  10127. } else if (s) {
  10128. s[_this.options.childkey] = s[_this.options.childkey] || [];
  10129. objClone = Object.create(null);
  10130. for (key in obj) {
  10131. if (!hasProp.call(obj, key)) continue;
  10132. objClone[key] = obj[key];
  10133. }
  10134. s[_this.options.childkey].push(objClone);
  10135. delete obj["#name"];
  10136. if (Object.keys(obj).length === 1 && charkey in obj && !_this.EXPLICIT_CHARKEY) {
  10137. obj = obj[charkey];
  10138. }
  10139. }
  10140. }
  10141. if (stack.length > 0) {
  10142. return _this.assignOrPush(s, nodeName, obj);
  10143. } else {
  10144. if (_this.options.explicitRoot) {
  10145. old = obj;
  10146. obj = Object.create(null);
  10147. obj[nodeName] = old;
  10148. }
  10149. _this.resultObject = obj;
  10150. _this.saxParser.ended = true;
  10151. return _this.emit("end", _this.resultObject);
  10152. }
  10153. };
  10154. }(this);
  10155. ontext = function (_this) {
  10156. return function (text) {
  10157. var charChild, s;
  10158. s = stack[stack.length - 1];
  10159. if (s) {
  10160. s[charkey] += text;
  10161. if (_this.options.explicitChildren && _this.options.preserveChildrenOrder && _this.options.charsAsChildren && (_this.options.includeWhiteChars || text.replace(/\\n/g, '').trim() !== '')) {
  10162. s[_this.options.childkey] = s[_this.options.childkey] || [];
  10163. charChild = {
  10164. '#name': '__text__'
  10165. };
  10166. charChild[charkey] = text;
  10167. if (_this.options.normalize) {
  10168. charChild[charkey] = charChild[charkey].replace(/\s{2,}/g, " ").trim();
  10169. }
  10170. s[_this.options.childkey].push(charChild);
  10171. }
  10172. return s;
  10173. }
  10174. };
  10175. }(this);
  10176. this.saxParser.ontext = ontext;
  10177. return this.saxParser.oncdata = function (_this) {
  10178. return function (text) {
  10179. var s;
  10180. s = ontext(text);
  10181. if (s) {
  10182. return s.cdata = true;
  10183. }
  10184. };
  10185. }(this);
  10186. };
  10187. Parser.prototype.parseString = function (str, cb) {
  10188. var err;
  10189. if (cb != null && typeof cb === "function") {
  10190. this.on("end", function (result) {
  10191. this.reset();
  10192. return cb(null, result);
  10193. });
  10194. this.on("error", function (err) {
  10195. this.reset();
  10196. return cb(err);
  10197. });
  10198. }
  10199. try {
  10200. str = str.toString();
  10201. if (str.trim() === '') {
  10202. this.emit("end", null);
  10203. return true;
  10204. }
  10205. str = bom.stripBOM(str);
  10206. if (this.options.async) {
  10207. this.remaining = str;
  10208. setImmediate(this.processAsync);
  10209. return this.saxParser;
  10210. }
  10211. return this.saxParser.write(str).close();
  10212. } catch (error1) {
  10213. err = error1;
  10214. if (!(this.saxParser.errThrown || this.saxParser.ended)) {
  10215. this.emit('error', err);
  10216. return this.saxParser.errThrown = true;
  10217. } else if (this.saxParser.ended) {
  10218. throw err;
  10219. }
  10220. }
  10221. };
  10222. Parser.prototype.parseStringPromise = function (str) {
  10223. return new Promise(function (_this) {
  10224. return function (resolve, reject) {
  10225. return _this.parseString(str, function (err, value) {
  10226. if (err) {
  10227. return reject(err);
  10228. } else {
  10229. return resolve(value);
  10230. }
  10231. });
  10232. };
  10233. }(this));
  10234. };
  10235. return Parser;
  10236. }(events);
  10237. exports.parseString = function (str, a, b) {
  10238. var cb, options, parser;
  10239. if (b != null) {
  10240. if (typeof b === 'function') {
  10241. cb = b;
  10242. }
  10243. if (_typeof(a) === 'object') {
  10244. options = a;
  10245. }
  10246. } else {
  10247. if (typeof a === 'function') {
  10248. cb = a;
  10249. }
  10250. options = {};
  10251. }
  10252. parser = new exports.Parser(options);
  10253. return parser.parseString(str, cb);
  10254. };
  10255. exports.parseStringPromise = function (str, a) {
  10256. var options, parser;
  10257. if (_typeof(a) === 'object') {
  10258. options = a;
  10259. }
  10260. parser = new exports.Parser(options);
  10261. return parser.parseStringPromise(str);
  10262. };
  10263. }).call(this);
  10264. /***/ }),
  10265. /***/ "./node_modules/xml2js/lib/processors.js":
  10266. /*!***********************************************!*\
  10267. !*** ./node_modules/xml2js/lib/processors.js ***!
  10268. \***********************************************/
  10269. /*! no static exports found */
  10270. /***/ (function(module, exports) {
  10271. // Generated by CoffeeScript 1.12.7
  10272. (function () {
  10273. "use strict";
  10274. var prefixMatch;
  10275. prefixMatch = new RegExp(/(?!xmlns)^.*:/);
  10276. exports.normalize = function (str) {
  10277. return str.toLowerCase();
  10278. };
  10279. exports.firstCharLowerCase = function (str) {
  10280. return str.charAt(0).toLowerCase() + str.slice(1);
  10281. };
  10282. exports.stripPrefix = function (str) {
  10283. return str.replace(prefixMatch, '');
  10284. };
  10285. exports.parseNumbers = function (str) {
  10286. if (!isNaN(str)) {
  10287. str = str % 1 === 0 ? parseInt(str, 10) : parseFloat(str);
  10288. }
  10289. return str;
  10290. };
  10291. exports.parseBooleans = function (str) {
  10292. if (/^(?:true|false)$/i.test(str)) {
  10293. str = str.toLowerCase() === 'true';
  10294. }
  10295. return str;
  10296. };
  10297. }).call(this);
  10298. /***/ }),
  10299. /***/ "./node_modules/xml2js/lib/xml2js.js":
  10300. /*!*******************************************!*\
  10301. !*** ./node_modules/xml2js/lib/xml2js.js ***!
  10302. \*******************************************/
  10303. /*! no static exports found */
  10304. /***/ (function(module, exports, __webpack_require__) {
  10305. // Generated by CoffeeScript 1.12.7
  10306. (function () {
  10307. "use strict";
  10308. var builder,
  10309. defaults,
  10310. parser,
  10311. processors,
  10312. extend = function extend(child, parent) {
  10313. for (var key in parent) {
  10314. if (hasProp.call(parent, key)) child[key] = parent[key];
  10315. }
  10316. function ctor() {
  10317. this.constructor = child;
  10318. }
  10319. ctor.prototype = parent.prototype;
  10320. child.prototype = new ctor();
  10321. child.__super__ = parent.prototype;
  10322. return child;
  10323. },
  10324. hasProp = {}.hasOwnProperty;
  10325. defaults = __webpack_require__(/*! ./defaults */ "./node_modules/xml2js/lib/defaults.js");
  10326. builder = __webpack_require__(/*! ./builder */ "./node_modules/xml2js/lib/builder.js");
  10327. parser = __webpack_require__(/*! ./parser */ "./node_modules/xml2js/lib/parser.js");
  10328. processors = __webpack_require__(/*! ./processors */ "./node_modules/xml2js/lib/processors.js");
  10329. exports.defaults = defaults.defaults;
  10330. exports.processors = processors;
  10331. exports.ValidationError = function (superClass) {
  10332. extend(ValidationError, superClass);
  10333. function ValidationError(message) {
  10334. this.message = message;
  10335. }
  10336. return ValidationError;
  10337. }(Error);
  10338. exports.Builder = builder.Builder;
  10339. exports.Parser = parser.Parser;
  10340. exports.parseString = parser.parseString;
  10341. exports.parseStringPromise = parser.parseStringPromise;
  10342. }).call(this);
  10343. /***/ }),
  10344. /***/ "./node_modules/xtend/immutable.js":
  10345. /*!*****************************************!*\
  10346. !*** ./node_modules/xtend/immutable.js ***!
  10347. \*****************************************/
  10348. /*! no static exports found */
  10349. /***/ (function(module, exports) {
  10350. module.exports = extend;
  10351. var hasOwnProperty = Object.prototype.hasOwnProperty;
  10352. function extend() {
  10353. var target = {};
  10354. for (var i = 0; i < arguments.length; i++) {
  10355. var source = arguments[i];
  10356. for (var key in source) {
  10357. if (hasOwnProperty.call(source, key)) {
  10358. target[key] = source[key];
  10359. }
  10360. }
  10361. }
  10362. return target;
  10363. }
  10364. /***/ }),
  10365. /***/ 0:
  10366. /*!**********************!*\
  10367. !*** util (ignored) ***!
  10368. \**********************/
  10369. /*! no static exports found */
  10370. /***/ (function(module, exports) {
  10371. /* (ignored) */
  10372. /***/ }),
  10373. /***/ 1:
  10374. /*!**********************!*\
  10375. !*** util (ignored) ***!
  10376. \**********************/
  10377. /*! no static exports found */
  10378. /***/ (function(module, exports) {
  10379. /* (ignored) */
  10380. /***/ }),
  10381. /***/ "xmlbuilder":
  10382. /*!*****************************!*\
  10383. !*** external "xmlbuilder" ***!
  10384. \*****************************/
  10385. /*! no static exports found */
  10386. /***/ (function(module, exports) {
  10387. module.exports = __WEBPACK_EXTERNAL_MODULE_xmlbuilder__;
  10388. /***/ })
  10389. /******/ });
  10390. });
  10391. //# sourceMappingURL=rss-parser.js.map